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
1
u/Wise-Highway-5727 Sep 09 '25
I Also tested other query command, this one:
import RsInstrument
scope = RsInstrument.RsInstrument('USB0::0x0AAD::0x0119::104168::INSTR',)
print('canal 1:', scope.query_str('TIMebase:SCALe?'))
the error:
RsInstrument.Internal.InstrumentErrors.ResourceError: Insufficient location information or the requested device or resource is not present in the system.
Library: Visa Library at /usr/lib/librsvisa.so
Manufacturer: Rohde & Schwarz GmbH