06-18-2013 09:04 AM
I am trying to follow this guide here: http://www.ni.com/white-paper/4056/en/. It seems pretty straight forward, however I am confused by the GPIB Wait function call inside the while loop of the Example 1.
Here is the picture of the code from Example 1 that I am referring to (taken from the above website):
My issues are the following:
Here is the input value table from the GPIB Wait page:
wait state vector indicates the states for which the function waits. Each Boolean element in the array corresponds to a state that the device can wait on. If more than one element is set to TRUE, the function terminates when any one of the states exists.
The following table defines the states that you can specify in wait state vector. This table also lists the numeric value and description of each element. While these elements are the same as those that other GPIB functions return, only the states listed are valid for this function.
Wait State Vector Bit | Numeric Value | Symbolic Status | Description |
---|---|---|---|
0 | 1 | DCAS | Device Clear state |
1 | 2 | DTAS | Device Trigger State |
2 | 4 | LACS | Listener Active |
3 | 8 | TACS | Talker Active |
4 | 16 | ATN | Attention Asserted |
5 | 32 | CIC | Controller-In-Charge |
6 | 64 | REM | Remote State |
7 | 128 | LOK | Lockout State |
12 | 4096 | SRQI | SRQ Detected while CIC |
13 | 8192 | END | EOI or EOS Detected |
14 | 16384 | TIMO | Timeout |
06-18-2013 09:19 AM
Oh yes, and one more comment (that would apply to your other post as well)...
The GPIB VIs you are using are very old. You should only use the VISA drivers for any new work.
Mike...
06-18-2013 09:24 AM - edited 06-18-2013 09:38 AM
Well would you mind explaining how to use the VISA commands to do basically the same thing as this example? I am trying to find a way to wait on a SRQ and then respond depending on what is discovered from the Status Byte from the Serial Poll. The only example I could find via google was this one. (Perhaps I was searching for the wrong topic?)