06-05-2009 11:25 AM
Hi.
I'm having a bit of touble with my labview program to run my experiements. The way it is setup, there are 2 main infinite loops running in parallel. The first checks th displays the status of my device which is connected on GPIB and the 2nd loop performs the actions for the experiment. The reason I have two loops is because in the loop that performs the experiement, the program can be waiting in one of the subVI calls for something to stablize and during this time, I still want to have regular updates for the device status. So what is happening now is, in both of the loops, sometimes a GPIB read is attemped at the same time which causes and EABO error. I'm not sure how labview handles mutliple GPIB reads to the same device. I'd appreciate any help on this situation.
Thanks.
06-05-2009 11:53 AM
06-08-2009 10:18 AM
Hello,
You need synchronization for your queries. Lets say you have two loops and each one is sending a command and reading the response. Only one command can be accessing the GPIB bus at a time, so they will become serialized.
The following order could happen:
Loop 1, Writes *IDN?
Loop 2, Writes *SRE?
Loop 2, Reads the response for *SRE?
Loop 1, attempts to read the response for *IDN? but times out!
Each Query (consisting of a write and read) should not be interrupted by other VIs attempting to access the GPIB. So, you should be using syncrhonization so that Loop 2 will not attempt to start its query until after Loop 1 is done performing its current query (as Dennis suggests).
Thanks,
Steven T.