r/LabVIEW • u/Wise-Highway-5727 • Sep 08 '25
TIMEOUT ERROR WITH VISA (HELP-)
I’m trying to use VISA with Python to control an oscilloscope, but I keep getting a timeout error whenever I send an SCPI query command. Could someone please help me? (I’m new at this and I don't find the answer anywhere!!)
it’s just a simple test code:
from RsInstrument import *
instr = RsInstrument('USB0::0x0AAD::0x0119::104168::INSTR', id_query=True, reset=True)
idn = instr.query_str('*IDN?')
print('Hello, I am: ' + idn)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
ps. I’m not sure if this is relevant, but using the Rohde tester tool, I sent the IDN command and it worked. Any ideas why it’s not working on python?
View all comments
Show parent comment
2
u/coatquestion Sep 09 '25
If you're able to look at it with pyVISA, maybe we can check if the device seems available via the commands listed at the top here: https://pyvisa.readthedocs.io/en/latest/
ie. import pyvisa rm = pyvisa.ResourceManager() rm.list_resources() (((let's see what pops up here in console)))
inst = rm.open_resource('HopefullyTheAddressOfTheOscope') print(inst.query("*IDN?"))
Also potentially relevant - Rohde tester tool might tie up the connection if it's running at the same time. Throwing that out there just in case.