IBEOS

NI-488.2

IBEOS

Board-Level/Device-Level


Note ibeos is deprecated. Use ibconfig (IbcEOS) instead.

Purpose

Configure the end-of-string (EOS) termination mode or character.

Format

C

unsigned long ibeos (int ud, int v)

Visual Basic

CALL ibeos (ud%, v%)

or

status% = ileos (ud%, v%)

Interactive Control (Usage Notes)

ibeos v

Input

ud Board or device descriptor
v EOS mode and character information

Output

Function Return The value of Ibsta

Description

ibeos configures the EOS termination mode or EOS character for the board or device. The parameter v describes the new end-of-string (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 which define the EOS mode.

Note Defining an EOS byte does not cause the driver to automatically send that byte at the end of write I/O operations. Your application is responsible for placing the EOS byte at the end of the data strings that it defines.

The following table describes the different EOS configurations and the corresponding values of v. If no error occurs during the call, the value of the previous EOS setting is returned in Iberr.

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

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

Possible Errors

EARG The high byte of v contains invalid bits.
EDVR The NI-488.2 driver is either configured incorrectly or is not properly installed.
EHDL ud is invalid or out of range.
ELCK The requested operation could not be performed because of an existing lock by another process.
ENEB The interface is not installed or is not properly configured.
EOIP Asynchronous I/O is in progress.