Open sudhanthiradasan opened 7 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
What happens if you add timeout=1000:
timeout=1000
inst = rm.open_resource('ASRL/dev/ttyAMA0::INSTR')
Now it should return within 1000ms
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