Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous monitor for new GPIB messages

I have an automated wafer prober that periodically sends GPIB messages that need to be parsed and acted on.  There can be as much as a minute between messages, or as little as a few millisenconds.  I am using VISA Read STB to check the status byte every 10 milliseconds.  If I see the ATN bit asserted, then I perform a VISA Read and parse the message.  I suppose I could use a VISA Read with infinite timout, but I am worried that this will tie up the thread if I need to shutdown quickly.  Is there a better way to do this other than repeatedly polling the STB?

 

 

0 Kudos
Message 1 of 6
(4,973 Views)
What programming platform are you using? Have you tried using VISA Events?
0 Kudos
Message 2 of 6
(4,960 Views)
I am using LabVIEW 7.0 on Solaris.  I have not heard of VISA events. 
0 Kudos
Message 3 of 6
(4,953 Views)
You can enable events and then wait on events. LabVIEW 7.1 has these, but I'm not sure about 7.0. If they're available there's an example that uses these to detect a break event on a serial connection. You could try to make use of the GPIB Talk and Listen events.
0 Kudos
Message 4 of 6
(4,941 Views)

I looked into VISA events, and it seems this is not the right solution for me.  The automated prober I am communicating with sends unsolicited commands that need to be parsed and acted on.  While I am listening for these commands, I need the GPIB bus available for writes in case I need to abort the actions of the prober.  The wait for VISA events seems to tie up the GPIB bus preventing any writes.  There is no way that I can see to abort the wait vi once it is started, so this really does not solve my problem.

 

My original message shows I was confused between the "interface status byte" and the "device status byte".  Using VISA Read STB vi, the "device status byte" can be read.  Bit 4 of the device status byte is Message Available (MAV).  By polling this bit, I can check if there are any unsolicited messages pending from the prober.

 

Polling is not the most elegant solution, but from the information I have been able to dig up it seems the only one.

0 Kudos
Message 5 of 6
(4,920 Views)
0 Kudos
Message 6 of 6
(4,899 Views)