BASICA/QuickBASIC GPIB-PC Function Calls Section Four A
GPIB-PC User Manual 4A-90 ©National Instruments Corp.
BASICA/QuickBASIC BASICA/QuickBASIC
IBWRTA IBWRTA
Purpose: Write data asynchronously from string
Format: CALL IBWRTA (BD%,WRT$)
Remarks: BD% specifies a device or an interface board. WRT$
contains the data to be sent over the GPIB.
This is a special case of the IBWRTA function which in
BASICA writes a maximum of 255 bytes from a character
string to the GPIB. In QuickBASIC the function IBWRTA
writes a maximum of 32K bytes of data from a character
string to the GPIB.
IBWRTA is used in place of IBWRT when the application
program must perform other functions while processing the
GPIB I/O operation. IBWRTA returns after starting the I/O
operation. If the number of bytes to write is small and the
bytes are received quickly by the GPIB device, 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 written is reported in the
IBCNT% variable.
Device IBWRTA Function:
When BD% specifies a device, the following board steps are performed
automatically to write to the device:
1. The IBCMD function is called to address the device to listen
and the assigned interface board to talk.
2. The board IBWRTA function is called to write the data to the
device, as explained in the following discussion.
Other command bytes may be sent as necessary.