Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

GPIB Wait Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: GPIB Functions

Requires: Base Development System

Waits for the state(s) indicated by wait state vector at the device indicated by address string.

Use the Wait for GPIB RQS function to wait for a device to assert RQS.

timeout ms specifies the time, in milliseconds, that the function waits before timing out. To enable timeouts, set bit 14 in the wait state vector input. To disable timeouts, set timeout ms to 0. The operation aborts if it does not complete within timeout ms.

To use the 488.2 global timeout, leave this input unwired. Then use the SetTimeOut function to change the default value of timeout ms. The default is 10000.
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. For example, to set GPIB controller 2 to talk to a device on address 3, use the prefix 2:3. If a controller ID is not present, the function defaults to controller (or bus) number 0.
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 BitNumeric ValueSymbolic StatusDescription
01DCASDevice Clear state
12DTASDevice Trigger State
24LACSListener Active
38TACSTalker Active
416ATNAttention Asserted
532CICController-In-Charge
664REMRemote State
7128LOKLockout State
124096SRQISRQ Detected while CIC
138192ENDEOI or EOS Detected
1416384TIMOTimeout
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
status is a Boolean array in which each bit describes a state of the GPIB Controller. If an error occurs, the GPIB function sets bit 15. GPIB error is valid only if bit 15 of status is set. Refer to the GPIB Status function for more information about status bits and GPIB error codes.

If you are waiting for multiple states, check status to see which state caused the function to terminate.

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. This output provides standard error out functionality.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit