Ibtrap – National Instruments GPIB-PC User Manual

Page 156

Advertising
background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-81

GPIB-PC User Manual

BASICA/QuickBASIC

BASICA/QuickBASIC

IBTRAP

IBTRAP

Purpose:

Alter applications monitor trap and display modes

Format:

CALL IBTRAP (MASK%,DISPLAY%)

Remarks:

MASK%

specifies a bit mask with the same bit assignments

as the mask used with the function

IBWAIT

. Each

MASK%

bit is set, cleared to trap, or cleared not to trap,
respectively, when the corresponding bit appears in the
status word after a GPIB call. If all the bits are set, then
every GPIB call is trapped.

MODE%

determines when the recording and trapping occur.

The valid values are:

1

Turn monitor off. No recording or trapping
occurs.

2

Turn record on. All calls are recorded but
no trapping occurs.

3

Turn record and trap on. All calls are
recorded and the monitor is displayed
whenever a trap condition occurs.

If an error occurs during this call, the ERR bit of

IBSTA

will be set and

IBERR

will be one of the following:

1

Applications monitor not installed.

2

Invalid monitor mode.

4 (EARG)

IBTRAP

not supported by installed

handler.

Otherwise,

IBERR

will contain the previous mask value.

Refer to Section Six for more information.

Advertising