Open gdavis-xilinx opened 9 years ago
Anyway, in Lantz 0.3 (currently in develop and to be released tomorrow, yeah!) the TCPDriver is replaced by the MessageBasedDriver
. The MessageBasedDriver
uses PyVISA under the hood as a frontend to many backends. NI-VISA is one, but pyvisa-py is another one which has a TCPDriver like class.
So if you cannot used NI-VISA, the more Lantz-ish
(I like that!) will be to make pyvisa-py respect the timeout (Actually it implements it but has not been throughly tested).
Let me know if you need assistance.
If I use an instrument 'inst' with the TCPDriver,
inst.query('misspelled command')
hangs.The inst.TIMEOUT is not effective because the socket is blocking by default.
Would the proper thing to do be to:
__init__
self.socket.settimeout(my_value)
self.socket.settimeout(0)
I'm not sure which approach is more Lantz-ish. I could do a PR if modifying a Lantz class is advised.