Provided by: libgpib-doc_4.3.7-5_all 

NAME
ibsta - holds status
SYNOPSIS
#include <gpib/ib.h>
volatile int ibsta;
DESCRIPTION
ibsta is set whenever a function from the 'traditional' or 'multidevice' API is called. Each of the bits
in ibsta has a different meaning, summarized in the following table:
Table 4. ibsta Bits
┌───────────┬────────────────────────────┬────────────────────────────────┬───────────────────────────┐
│ bit │ value (hexadecimal) │ meaning │ used for board/device │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ DCAS │ 0x1 │ DCAS is set when a │ board │
│ │ │ board receives the │ │
│ │ │ device clear command │ │
│ │ │ (that is, the │ │
│ │ │ SDC or DCL │ │
│ │ │ command byte). │ │
│ │ │ It is cleared on │ │
│ │ │ the next 'traditional' │ │
│ │ │ or 'multidevice' │ │
│ │ │ function call │ │
│ │ │ following ibwait() │ │
│ │ │ (with DCAS set in the │ │
│ │ │ wait mask), or │ │
│ │ │ following a read │ │
│ │ │ or write (ibrd(), │ │
│ │ │ ibwrt(), Receive(), │ │
│ │ │ etc.). The DCAS │ │
│ │ │ and DTAS bits will │ │
│ │ │ only be set if the │ │
│ │ │ event queue is │ │
│ │ │ disabled. The │ │
│ │ │ event queue may be │ │
│ │ │ disabled with │ │
│ │ │ ibconfig(). │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ DTAS │ 0x2 │ DTAS is set when a │ board │
│ │ │ board has received a │ │
│ │ │ device trigger command │ │
│ │ │ (that is, │ │
│ │ │ the GET command │ │
│ │ │ byte). It is │ │
│ │ │ cleared on the next │ │
│ │ │ 'traditional' or │ │
│ │ │ 'multidevice' │ │
│ │ │ function call │ │
│ │ │ following ibwait() │ │
│ │ │ (with DTAS in the wait │ │
│ │ │ mask). The │ │
│ │ │ DCAS and DTAS bits │ │
│ │ │ will only be set if │ │
│ │ │ the event queue is │ │
│ │ │ disabled. The │ │
│ │ │ event queue may be │ │
│ │ │ disabled with │ │
│ │ │ ibconfig(). │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ LACS │ 0x4 │ Board is currently │ board │
│ │ │ addressed as a │ │
│ │ │ listener (IEEE │ │
│ │ │ listener state machine │ │
│ │ │ is in LACS or LADS). │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ TACS │ 0x8 │ Board is currently │ board │
│ │ │ addressed as talker │ │
│ │ │ (IEEE talker state │ │
│ │ │ machine is in TACS or │ │
│ │ │ TADS). │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ ATN │ 0x10 │ The ATN line is │ board │
│ │ │ asserted. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ CIC │ 0x20 │ Board is │ board │
│ │ │ controller-in-charge, │ │
│ │ │ so it is able to set │ │
│ │ │ the ATN line. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ REM │ 0x40 │ Board is in 'remote' │ board │
│ │ │ state. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ LOK │ 0x80 │ Board is in 'lockout' │ board │
│ │ │ state. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ CMPL │ 0x100 │ I/O operation is │ board or device │
│ │ │ complete. Useful for │ │
│ │ │ determining when │ │
│ │ │ an asynchronous │ │
│ │ │ I/O operation │ │
│ │ │ (ibrda(), ibwrta(), │ │
│ │ │ etc) has │ │
│ │ │ completed. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ EVENT │ 0x200 │ One or more clear, │ board │
│ │ │ trigger, or interface │ │
│ │ │ clear events have been │ │
│ │ │ received, and are │ │
│ │ │ available in the event │ │
│ │ │ queue (see │ │
│ │ │ ibevent()). The │ │
│ │ │ EVENT bit will only be │ │
│ │ │ set if the event queue │ │
│ │ │ is enabled. The │ │
│ │ │ event queue may │ │
│ │ │ be enabled with │ │
│ │ │ ibconfig(). │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ SPOLL │ 0x400 │ If this bit is enabled │ board │
│ │ │ (see ibconfig()), it │ │
│ │ │ is set when the board │ │
│ │ │ is serial polled. │ │
│ │ │ The SPOLL bit is │ │
│ │ │ cleared when the board │ │
│ │ │ requests service │ │
│ │ │ (see ibrsv()) or │ │
│ │ │ you call ibwait() on │ │
│ │ │ the board with SPOLL │ │
│ │ │ in the wait mask. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ RQS │ 0x800 │ RQS indicates that the │ device │
│ │ │ device has requested │ │
│ │ │ service, and one │ │
│ │ │ or more status │ │
│ │ │ bytes are available │ │
│ │ │ for reading with │ │
│ │ │ ibrsp(). RQS will │ │
│ │ │ only be set if │ │
│ │ │ you have automatic │ │
│ │ │ serial polling enabled │ │
│ │ │ (see ibconfig()). │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ SRQI │ 0x1000 │ SRQI indicates that a │ board │
│ │ │ device connected to │ │
│ │ │ the board is asserting │ │
│ │ │ the SRQ line. It │ │
│ │ │ is only set if │ │
│ │ │ the board is the │ │
│ │ │ controller-in-charge. │ │
│ │ │ If automatic │ │
│ │ │ serial polling is │ │
│ │ │ enabled (see │ │
│ │ │ ibconfig()), │ │
│ │ │ SRQI will │ │
│ │ │ generally be cleared, │ │
│ │ │ since when a │ │
│ │ │ device requests │ │
│ │ │ service it will be │ │
│ │ │ automatically │ │
│ │ │ polled and then │ │
│ │ │ unassert SRQ. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ END │ 0x2000 │ END is set if the last │ board or device │
│ │ │ io operation ended │ │
│ │ │ with the EOI line │ │
│ │ │ asserted, and may be │ │
│ │ │ set on reception of │ │
│ │ │ the end-of-string │ │
│ │ │ character. The │ │
│ │ │ IbcEndBitIsNormal │ │
│ │ │ option of ibconfig() │ │
│ │ │ can be used to │ │
│ │ │ configure whether │ │
│ │ │ or not END should be │ │
│ │ │ set on reception of │ │
│ │ │ the eos character. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ TIMO │ 0x4000 │ TIMO indicates that │ board or device │
│ │ │ the last io operation │ │
│ │ │ or ibwait() timed out. │ │
├───────────┼────────────────────────────┼────────────────────────────────┼───────────────────────────┤
│ ERR │ 0x8000 │ ERR is set if the last │ board or device │
│ │ │ 'traditional' or │ │
│ │ │ 'multidevice' function │ │
│ │ │ call failed. The │ │
│ │ │ global variable iberr │ │
│ │ │ will be set │ │
│ │ │ indicate the │ │
│ │ │ cause of the │ │
│ │ │ error. │ │
└───────────┴────────────────────────────┴────────────────────────────────┴───────────────────────────┘
If you wish to avoid using a global variable, you may instead use ThreadIbsta() which returns a
thread-specific value.
COPYRIGHT
Copyright © 2003-2006, 2008 Frank Mori Hess
linux-gpib 4.3.7 11/28/2025 IBSTA(3)