IbcEOS (ibconfig Board Configuration Option)

NI-488.2

IbcEOS (ibconfig Board Configuration Option)

Using this option makes your application break backwards compatibility with older drivers. Consider using IbcEOSchar, IbcEOScmp, IbcEOSrd, and IbcEOSwrt separately instead.

IbcEOS is the parameter that describes the new EOS configuration to use. If v is zero, the EOS configuration is disabled. Otherwise, the low byte is the EOS character and the upper byte contains flags that define the EOS mode. For the upper byte, the third bit flags, terminating the read when EOS is detected, the fourth bit flags, setting EOI with EOS on write functions, and the fifth bit flags, comparing all 8 bits of the EOS byte instead of comparing the lower 7 bits. The following table describes the different EOS configurations:

Value of v
Bit Configuration High Byte Low Byte
A Terminate read when EOS is detected. 00000100 EOS character
B Set EOI with EOS on write function. 00001000 EOS character
C Compare all 8 bits of EOS byte rather than low 7 bits (all read and write calls). 00010000 EOS character

Configuration bits A and C determine how to terminate read I/O operations. If bit A is set and bit C is clear, a read ends when a byte that matches the low seven bits of the EOS character is received. If bits A and C are both set, a read ends when a byte that matches all eight bits of the EOS character is received.

Configuration bits B and C determine when a write I/O operation asserts the GPIB EOI line. If bit B is set and bit C is clear, EOI is asserted when the written character matches the low seven bits of the EOS character. If bits B and C are both set, EOI is asserted when the written character matches all eight bits of the EOS character.

Refer to Terminating Data Transfers for more information about EOS and EOI termination methods.

Examples

ibconfig (ud, IbcEOS 0x140A);
/* Configure the software to end reads on
   newline character (hex 0A) for the unit
   descriptor, ud */
ibconfig (ud, IbcEOS 0x180A);
/* Configure the software to assert the GPIB 
   EOI line whenever the newline character
   (hex 0A) is written out by the unit
   descriptor, ud */