Ibcmda – National Instruments GPIB-PC User Manual

Page 98

Advertising
background image

Section Four A

BASICA/QuickBASIC GPIB-PC Function Calls

©National Instruments Corp.

4A-23

GPIB-PC User Manual

BASICA/QuickBASIC

BASICA/QuickBASIC

IBCMDA

IBCMDA

Purpose:

Send commands asynchronously from string

Format:

CALL IBCMDA (BD%,CMD$)

Remarks:

BD%

specifies an interface board.

CMD$

contains the

commands to be sent over the GPIB.

The

IBCMDA

function is used to transmit interface

messages (commands) over the GPIB. These commands,
which are listed in Appendix A, include device talk and
listen addresses, secondary addresses, serial and parallel
poll configuration messages, and device clear and trigger
instructions. The

IBCMDA

function is also used to pass

GPIB control to another device. This function is NOT used
to transmit programming instructions to devices.
Programming instructions and other device-dependent
information are transmitted with the write and read
functions.

IBCMDA

is used in place of

IBCMD

when the application

program must perform other functions while processing the
GPIB I/O operation.

IBCMDA

returns after starting the I/O

operation. If the number of bytes to send is small and the
bytes are accepted quickly by the GPIB device(s), the
operation may complete on the initial call. In this case,
the CMPL bit will be set in

IBSTA%

. If the operation does

not complete on the initial call, you should monitor the

IBSTA%

variable after subsequent calls (usually

IBWAIT

calls) to know that the I/O is completed. When CMPL
becomes set in

IBSTA%

, indicating that the I/O is

complete, the number of bytes sent is reported in the

IBCNT%

variable.

Between the issuing of the

IBCMDA

call and the

corresponding CMPL, other GPIB function calls to this
board will return the error EOIP, with the following
exceptions:

IBSTOP

-

to cancel the asynchronous I/O;

IBWAIT

-

to monitor other GPIB conditions; and

Advertising