IBLINES

NI-488.2

IBLINES

Board-Level


Purpose

Return the status of the eight GPIB control lines.

Format

C

unsigned long iblines (int ud, short *clines)

Visual Basic

CALL iblines (ud%, clines%)

or

status% = illines (ud%, clines%)

Interactive Control (Usage Notes)

iblines

Input

ud Board descriptor

Output

clines Returns GPIB control line state information
Function Return The value of Ibsta

Description

iblines returns the state of the GPIB control lines in clines. The low-order byte (bits 0 through 7) of clines contains a mask indicating the capability of the GPIB interface to sense the status of each GPIB control line. The upper byte (bits 8 through 15) contains the GPIB control line state information. The following is a pattern of each byte.

7 6 5 4 3 2 1 0
EOI ATN SRQ REN IFC NRFD NDAC DAV

To determine if a GPIB control line is asserted, first check the appropriate bit in the lower byte to determine if the line can be monitored. If the line can be monitored (indicated by a 1 in the appropriate bit position), check the corresponding bit in the upper byte. If the bit is set (1), the corresponding control line is asserted. If the bit is clear (0), the control line is unasserted.

Example

short lines;
iblines (ud, &lines);
if (lines & ValidREN) {  
   /* check to see if REN is asserted */
   if (lines & BusREN) {
      printf ("REN is asserted");
   }
}

Possible Errors

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.