beautypg.com

Status word (ibsta), Table 4-1. status word layout, Status word (ibsta) -5 – National Instruments NI-488.2 User Manual

Page 42

background image

Chapter 4

Developing Your NI-488.2 Application

© National Instruments Corporation

4-5

NI-488.2 User Manual

Status Word (ibsta)

All NI-488.2 calls update a global status word,

ibsta

, which contains

information about the state of the GPIB and the GPIB hardware. The value
stored in

ibsta

is the return value of all the traditional NI-488.2 calls,

except

ibfind

and

ibdev

. You can examine various status bits in

ibsta

and use that information to make decisions about continued processing.
If you check for possible errors after each call using the

ibsta

ERR bit,

debugging your application is much easier.

ibsta

is a 16-bit value. A bit value of one (1) indicates that a certain

condition is in effect. A bit value of zero (0) indicates that the condition
is not in effect. Each bit in

ibsta

can be set for device-level traditional

NI-488.2 calls (dev), board-level traditional NI-488.2 calls and
multi-device NI-488.2 calls (brd), or all (dev, brd).

Table 4-1 shows the condition that each bit position represents, the bit
mnemonics, and the type of calls for which the bit can be set. For a detailed
explanation of each status condition, refer to Appendix B,

Status Word

Conditions

.

Table 4-1. Status Word Layout

Mnemonic

Bit

Pos

Hex

Value

Type

Description

ERR

15

8000

dev, brd

NI-488.2 error

TIMO

14

4000

dev, brd

Time limit exceeded

END

13

2000

dev, brd

END or EOS detected

SRQI

12

1000

brd

SRQ interrupt received

RQS

11

800

dev

Device requesting
service

CMPL

8

100

dev, brd

I/O completed

LOK

7

80

brd

Lockout State

REM

6

40

brd

Remote State

CIC

5

20

brd

Controller-In-Charge

ATN

4

10

brd

Attention is asserted

TACS

3

8

brd

Talker

LACS

2

4

brd

Listener