IBWAIT

NI-488.2

IBWAIT

Board-Level/Device-Level


Purpose

Wait for GPIB events.

Format

C

unsigned long ibwait (int ud, int mask)

Visual Basic

CALL ibwait (ud%, mask%)

or

status% = ilwait (ud%, mask%)

Interactive Control (Usage Notes)

ibwait mask

Input

ud Board or device descriptor
mask Bit mask of GPIB events to wait for

Output

Function Return The value of Ibsta

Description

ibwait monitors the events specified by mask and delays processing until one or more of the events occurs. If the wait mask is zero, ibwait returns immediately with the updated Ibsta status word. If TIMO is set in the wait mask, ibwait returns when the timeout period has elapsed, if one or more of the other specified events have not already occurred. If TIMO is not set in the wait mask, the function waits indefinitely for one or more of the specified events to occur. The existing ibwait mask bits are identical to the Ibsta bits. If ud is a device descriptor, the only valid wait mask bits are TIMO, END, RQS, and CMPL. If ud is a board descriptor, all wait mask bits are valid except for RQS. You can configure the timeout period using the ibconfig function (option IbcTMO).

Possible Errors

EARG The bit set in mask is invalid.
EBUS Device-level: No devices are connected to the GPIB.
ECIC Device-level: The access board is not CIC. See Device-Level Calls and Bus Management.
EDVR The NI-488.2 driver is either configured incorrectly or is not properly installed.
EHDL ud is invalid or out of range.
ELCK The requested operation could not be performed because of an existing lock by another process.
ENEB The interface is not installed or is not properly configured.
ESRQ Device-level: If RQS is set in the wait mask, ESRQ indicates that the Stuck SRQ condition exists. For more information about serial polling, refer to the Serial Polling Overview.
EWIP An ibwait call is already in progress on the specified unit descriptor.
ERST The event notification was cancelled due to a reset of the interface.