09-16-2013 10:43 PM
11-28-2016 12:22 PM - edited 11-28-2016 12:27 PM
Hi All,
When I the following program am getting : pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
Am using RS232 and keithely sourcemeter 2400,
Please help me,
import visa
rm = visa.ResourceManager()
print rm.list_resources()
inst = rm.open_resource('ASRL7::INSTR')
print(inst.query('*IDN?'))
print inst.write("*RST")
inst.write("SOUR:FUNC VOLT;:SOUR:VOLT 1.800000;:CURR:PROT 0.100000;")
inst.write(":MEAS:VOLT?")
print "voltage", inst.read()
inst.write(":MEAS:CURR?")
print "current", inst.read()
inst.write("OUTP ON;")
inst.write("OUTP OFF;")
11-29-2016 02:36 PM
Hi Devarajulju,
Just as a side note, you will probably get more visibility on your post by creating a new post instead of just adding to this one, especially as it's three years old and has already been marked as solved.
That being said, if you could include some more information here or when you post elsewhere that would be helpful. What program are you using to communicate with the device? What troubleshooting steps have you tried already? Howe have you connected your PC to the sourcemeter?
A good first test is to open up NI MAX and use the VISA test panel to see if you can send a *IDN? query to the device and get a response. If this isn't working then there's probably not successful communication between the device and your PC.
Unfortunately a timeout error can be caused by a number of issues, this KnowledgeBase article describes some good troubleshooting steps to try:
"Why Do I Receive Timeout Error -1073807339 on VISA Read or Write?"
http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0
If by any chance you're planning on using LabVIEW you can download drivers for this device here: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=1583
Hope this is helpful!
11-29-2016 02:59 PM