Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Time Delay, a necessity?

Hello everyone,

 

While writing some communication with GPIB support devices, sometimes you have to implement some "time delay" to let the device become ready to response to the controller (Or something like that, this is my guess, I am not sure about the technical issue). I see the same thing in an example named as"LabVIEW- GPIB.VI" in LabVIEW Find Example.  Since the delay is not consistent in all computer, is there any thing like handshaking or CRC code to make a more fail-safe and secure communication?

 

I guess I get to use "GPIB Wait" or "Wait for RQS", but I am not sure.

 

Does anyone have any idea about this issue? It would be appreciated.

0 Kudos
Message 1 of 4
(5,138 Views)
A delay is required when the instrument takes a long time to respond to a measurement request. A fixed delay is seldom the correct way to do this though. Many have an operation complete that you can query or you can program it to generate a service request when it is done. There is of course GPIB handshaking and sometimes that is enough so you can immediately do a VISA Read after your write. Depends on the instrument and the type of measurement. You also have a VISA timeout setting that can be adjusted.
Message 2 of 4
(5,134 Views)

Hi Dennis,

 

Thanks a lot for your kind help. I got everything you said but just need more help about one issue. How can I use VISA timeout you tackle with this problem? I could not find a relation between these two!

 

0 Kudos
Message 3 of 4
(5,093 Views)

You set the VISA timeout to something much greater than the amount of time you expect for the measurement/response to come back.  I think the default timeout is 10seconds.  If you leave the timeout at that, you should be just fine for most measurements.  Just send your command and then try to read.  If it takes more time than the timeout allows, you will get an error.  Either you sent a bogus command, you made an addressing error, or the measurement takes longer and you need to increase the timeout.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(5,083 Views)