pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
282 stars 120 forks source link

Waits in query indefinitely #106

Open sudhanthiradasan opened 6 years ago

sudhanthiradasan commented 6 years ago

tried below in raspberry pi

import visa rm = visa.ResourceManager('@py') rm.list_resources()

which shows following resources, (u'ASRL/dev/ttyUSB0::INSTR', u'ASRL/dev/ttyAMA0::INSTR')

inst = rm.open_resource('ASRL/dev/ttyAMA0::INSTR') print(inst.query('*IDN?')) ---waits here indefinitely

vascotenner commented 6 years ago

What happens if you add timeout=1000:

inst = rm.open_resource('ASRL/dev/ttyAMA0::INSTR')

Now it should return within 1000ms