IBCMD

NI-488.2

IBCMD

Board-Level


Purpose

Send GPIB commands.

Format

C

unsigned long ibcmd (int ud, const void *cmdbuf, size_t count)

Visual Basic

CALL ibcmd (ud%, cmdbuf$)

or

status% = ilcmd (ud%, cmdbuf$, count&)

Interactive Control (Usage Notes)

ibcmd cmdbuf

Input

ud A board unit descriptor
cmdbuf Buffer of command bytes to send
count Number of command bytes to send

Output

Function Return The value of Ibsta

Description

ibcmd sends count bytes from cmdbuf over the GPIB as command bytes (interface messages). The number of command bytes transferred is returned in the global function, Ibcnt. Refer to the list of IEEE 488 command messages for defined interface messages.

Command bytes are used to configure the state of the GPIB. They are not used to send instructions to GPIB devices. Use ibwrt to send device-specific instructions.

Possible Errors

EABO The timeout period expired before all of the command bytes were sent.
ECIC The interface is not Controller-In-Charge.
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.
ENOL No Listeners are on the GPIB.
EOIP Asynchronous I/O is in progress.