GPIB Wait

Waits for the state(s) indicated by wait state vector at the device indicated by address string. Refer to Wait for GPIB RQS for more information.

timeout ms contains the bit number you specify. GPIB Wait will either complete or time out. To enable timeouts set bit 14 in the wait state vector. To disable timeouts, set timeout ms to 0. To use the 488.2 global timeout, leave this input unwired. The operation aborts if it does not complete within timeout ms.

Use the SetTimeOut function to change the default value (the 488.2 global timeout) of timeout ms. Initially, timeout ms defaults to 10,000.

address string contains the address of the GPIB device with which the function communicates. You can input both the primary and secondary addresses in address string by using the form primary+secondary. Both primary and secondary are decimal values, so if primary is 2 and secondary is 3, address string is 2+3.

If you do not specify an address, the functions do not perform addressing before they attempt to read and write the string. They assume you have either sent these commands another way or that another Controller is in charge and therefore responsible for the addressing. If the Controller is supposed to address the device but does not do so before the time limit expires, the functions terminate with GPIB error 6 (timeout) and set bit 14 in status. If the GPIB is not the Controller-In-Charge, do not specify address string.

When there are multiple GPIB Controllers that LabVIEW can use, a prefix to address string in the form ID:address (or ID: if no address is necessary) determines the Controller that a specific function uses. If a Controller ID is not present, the functions assume Controller (or bus) 0.

wait state vector Bits set to TRUE in wait state vector indicate states for which the function waits. If more than one bit is set, the function terminates when any one of the desired states exists.

The following table defines the bits that you can set in wait state vector. This table also lists the numeric value and description of each bit. While these bits are the same as the ones that other GPIB functions return, only the bits 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
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurs before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
status If you are waiting for multiple states, check status to see which state caused the function to terminate. Refer to the GPIB Status function for other status bit descriptions. If an error occurs, bit 15 is set. The code field of the error out cluster is a GPIB error code only if bit 15 of status is set.

This function can run in parallel with other functions because LabVIEW alternately checks for status and executes other functions. In addition, multiple calls to this function can execute in parallel, so you can wait for different states on different Controllers at the same time or for multiple states to exist.

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.