GPIB Programming Techniques
Chapter 6
NI-488.2M SRM for OS/2
6-2
© National Instruments Corp.
•
The EOS read method. If the EOS read method is enabled, the
NI-488.2M driver terminates
ibrd
calls when the EOS byte is detected on
the GPIB or when the GPIB EOI line is asserted or when the specified
count has been reached. If the EOS read method is disabled,
ibrd
calls
terminate only when the GPIB EOI line is asserted or the specified count
has been read.
You can use the
ibconfig
function to determine whether the GPIB
EOI line was asserted when the EOS byte was read in. Use the
IbcEndBitIsNormal
option to configure the software to report only
the END bit in
ibsta
when the GPIB EOI line is asserted. By default, the NI-
488.2M driver reports END in
ibsta
when either the EOS byte is read in or
the EOI line is asserted during a read.
Waiting for GPIB Conditions
You can use the
ibwait
function to obtain the current
ibsta
value or to
suspend your application until a specified condition occurs on the GPIB. If you
use
ibwait
with a parameter of 0, it immediately updates
ibsta
and returns.
If you want to use
ibwait
to wait for one or more events to occur, then pass a
wait mask to the function. The wait mask should always include the TIMO
event; otherwise, your application is suspended indefinitely until one of the
wait mask events occurs.
Device-Level Calls and Bus Management
The NI-488 device-level calls are designed to perform all of the GPIB
management for your application program. However, the NI-488.2M driver can
handle bus management only when the GPIB interface board is CIC. Only the
CIC is able to send command bytes to the devices on the bus in order to perform
device addressing or other bus management activities. Use one of the following
methods to make your GPIB board the CIC:
•
If your GPIB board is configured as the System Controller (default), it
automatically makes itself the CIC by asserting the IFC line the first time
you make a device-level call.