Ibwait – National Instruments GPIB-PC User Manual

Page 159

Advertising
background image

BASICA/QuickBASIC GPIB-PC Function Calls

Section Four A

GPIB-PC User Manual

4A-84

©National Instruments Corp.

BASICA/QuickBASIC

BASICA/QuickBASIC

IBWAIT

IBWAIT

Purpose:

Wait for selected event

Format:

CALL IBWAIT (BD%,MASK%)

Remarks:

BD%

specifies a device or an interface board.

MASK%

is a

bit mask with the same bit assignments as the status word,

IBSTA%

. Each

MASK%

bit is set or cleared to wait or not

wait, respectively, for the corresponding event to occur.

The

IBWAIT

function is used to monitor the events

selected in

MASK%

and to delay processing until any of

them occur. These events and bit assignments are shown in
Table 4A.4.

IBWAIT

also updates all conditions of the status word,

which may be read in the

IBSTA%

variable.

If

MASK%

=0 or

MASK%

=&H8000 (the ERR bit), the function

returns immediately.

If the TIMO bit is 0, or the time limit is set to 0 with the

IBTMO

function, timeouts are disabled. Disabling timeouts

should be done only when setting

MASK%

=0 or when it is

certain the selected event will occur; otherwise, the
processor may wait indefinitely for the event to occur.

Advertising