Chapter 3
Developing Your Application
© National Instruments Corp.
3-5
NI-488.2M SRM for OS/2
Table 3-1 shows the condition that each bit position represents, the mnemonic
representation of each bit, and the type of calls for which the bit is set. For a
detailed explanation of each of the status conditions, refer to Appendix A, Status
Word Conditions.
Mnemonic
Bit
Pos.
Hex
Value
Type
Description
ERR
15
8000
dev, brd
GPIB 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
DTAS
1
2
brd
Device Trigger State
DCAS
0
1
brd
Device Clear State
The language header files included on your distribution disk contain the
mnemonic constants for
ibsta
. You can check a bit position in
ibsta
by
using its numeric value or its mnemonic constant. For example, bit position 15
(hex 8000) detects a GPIB error. The mnemonic for this bit is ERR. To check
for a GPIB error, use either of the following statements after each NI-488
function and NI-488.2 routine:
if (ibsta & ERR) gpiberr();
or
if (ibsta & 0x8000) gpiberr();
where
gpiberr()
is an error-handling routine that you have defined.
Table 3-1. Status Word (ibsta) Layout