LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Read/Write Hang never times out (Agilent 82357A)

I’m getting an intermittent hang on GPIB Reads and Writes with an Agilent 82357A USB-GPIB connected to an SR760.  I have enabled the Agilent 488 and Tulip, and have communication between my VI and the SR760.  However, GPIB Read or Write eventually fail to return and do not timeout.  I have adjusted the Agilent GPIB timeout, as well as set the LabVIEW global timeout and fed a timeout value directly into the GPIB Read and Write VI’s, with no change in behavior.  The timeout just never occurs no matter how short it is set.  It would not be a big problem if the function call at least returned after the timeout instead of hanging the entire program.

Other VI’s operating in the same LabVIEW process still run after a hang, until I attempt to close the hung GPIB VI.  At which point a small window pops up saying it is Resetting VI: <filename>.vi, and all VI’s in the process become unresponsive until it is killed in the Task Manager.

Is there a workaround for using GPIB Read and Write reliably with the Agilent system?

Is there a way to wrap the GPIB Read or Write VI’s into separate and killable threads so that I can try to make the calls, then timeout and kill the calls/calling threads when they don’t return?  This is a hack I've used in c++ with unreliable hardware/3rd party software.

Thanks for your help, please let me know if you need more detailed information.



Message Edited by Nazgul on 01-22-2008 01:01 PM
0 Kudos
Message 1 of 5
(3,106 Views)
Are you using the GPIB functions on the LabVIEW palette or are you using some different GPIB functions provided by Agilent? If you are using the LabVIEW functions, replace them. You should not expect the LabVIEW functions to work with an Agilent GPIB controller. They are only for NI controllers. I am surprised that they don't immediately error out though. Instead of GPIB, use VISA.
0 Kudos
Message 2 of 5
(3,099 Views)
I am using the LabVIEW palette functions.  Will search around for alternatives, thanks.
0 Kudos
Message 3 of 5
(3,094 Views)
I gave you the alternative. Use the VISA functions (Instrument I/O>VISA).
0 Kudos
Message 4 of 5
(3,089 Views)
Now using VISA Open, Clear, Read, Write, and Close.  Seems stable so far.  Thanks for the help.
0 Kudos
Message 5 of 5
(3,083 Views)