if the timeout < ~3000 ms, query(:WAV:PRE?), times out. with timeout > ~5000 ms, this query is successful. Alternatively, if I do a gpib_write(:WAV:PRE?), manually wait a couple seconds and then '''gpib_read()''' in MAX or using the scope server, things are fine. Immediately reading after the write times out.
I attempted to use the timeout parameter, but this doesn't seem to actually set the timeout. I set gpib_query(':WAV:PRE?',timeout = 10.0) or gpib_query(':WAV:PRE?',timeout = 10000.0) and it still kicks back a timeout error in ~2-3 seconds.
Additionally, this behavior seems tied to the number of averages on the scope. Since the waveform preamble has little to do with the number of averages, I think this may just be the device taking a little longer to reply to the query while averaging or something else unrelated to my being able to actually set the query timeout.
In [685]: scope.get_trace(1)
---------------------------------------------------------------------------
Error Traceback (most recent call last)
<ipython-input-685-f55e13445fe5> in <module>()
----> 1 scope.get_trace(1)
C:\pylabrad\labrad\client.pyc in __call__(self, *args, **kw)
63 if wrap:
64 future.addCallback(lambda resp: resp[0][1])
---> 65 return future.wait() if wait else future
66
67 # data to be loaded on demand
C:\pylabrad\labrad\backend.pyc in wait(self)
396 # If any Future in the queue fails,
397 # we immediately bail.
--> 398 result.raiseException()
399 else:
400 for func, args, kw in f.callbacks:
C:\Python27\lib\site-packages\twisted\python\failure.pyc in raiseException(self)
Error: (0) [Agilent Infiniium Oscilloscope] Remote Traceback (most recent call l
ast):
Failure: labrad.types.Error: (0) [terminator GPIB Bus] Remote Traceback (most re
cent call last):
File "C:\pylabrad\labrad\server.py", line 262, in handleRequest
result = yield setting.handleRequest(self, c.data, data)
File "gpib_server.py", line 194, in query
ans = instr.read_raw()
File "C:\Python27\lib\site-packages\pyvisa\resources\messagebased.py", line 28
1, in read_raw
chunk, status = self.visalib.read(self.session, size)
File "C:\Python27\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1569,
in read
ret = library.viRead(session, buffer, count, byref(return_count))
File "C:\Python27\lib\site-packages\pyvisa\ctwrapper\highlevel.py", line 145,
in _return_handler
raise errors.VisaIOError(ret_value)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before op
eration completed.
[payload=None]
[payload=None]
In MAX:
if the timeout < ~3000 ms,
query(:WAV:PRE?)
, times out. with timeout > ~5000 ms, this query is successful. Alternatively, if I do agpib_write(:WAV:PRE?)
, manually wait a couple seconds and then '''gpib_read()''' in MAX or using the scope server, things are fine. Immediately reading after the write times out.I attempted to use the timeout parameter, but this doesn't seem to actually set the timeout. I set
gpib_query(':WAV:PRE?',timeout = 10.0)
orgpib_query(':WAV:PRE?',timeout = 10000.0)
and it still kicks back a timeout error in ~2-3 seconds.Additionally, this behavior seems tied to the number of averages on the scope. Since the waveform preamble has little to do with the number of averages, I think this may just be the device taking a little longer to reply to the query while averaging or something else unrelated to my being able to actually set the query timeout.
the above works, and then:
also works, but
errors out with the following: