KPCI-488LPA-900-01 Rev. A / December 2008
Return to
2-13
Model KPCI-488LPA GPIB Controller Interface Card User’s Manual
Section 2: NI Command Compatible Functions
ibcmd
Description
This command sends GPIB commands. Command words are used to configure the
GPIB status.
ibwrt
is used to send the device self-control command. To return the
number of transferred command bytes in the global variable, use
ibcntl
.
Support Level
Board level
Syntax
Microsoft C/C++ and Borland C++
int ibcmd (int ud, const void *cmd, long cnt)
Visual Basic
idcmd (ByVal ud As Integer, ByVal buf As String,
ByVal cnt As Long) As Integer
- or -
call ibcmd (ByVal ud As Integer, ByVal buf As
String)
Parameters
ud
: device unit descriptor
buf
: the buffer contains the sent command string
cnt
: the number of the command bytes; the command bytes that are to be sent
Return Value
The value of the
ibsta
Error Codes
EARG, ECIC, EDVR, EOIP, ENEB, EABO, ENOL
ibcmda
Description
This command sends GPIB commands asynchronously. Command words are used to
configure the GPIB status and control GPIB devices.
ibwrt
is used to send the device
self-control command. To return the number of transferred command bytes in the
global variable, use
ibcntl
.
The design of the asynchronous I/O commands (
ibcmda
,
ibrda
,
ibwrta
) is that
applications can perform other non-GPIB operations while the I/O is in progress. If
asynchronous I/O has begun, later GPIB commands are strictly limited — any
commands that would interfere with the I/O that is in progress are not allowed. If the I/
O has completed, the application and the driver must be re-synchronized.
Use one of the following functions to re-synchronize:
ibwait
: If the CMPL bit of the returned
ibsta
is set, the driver and application are re-
synchronized.
ibnotify
: If the
ibsta
value sent to the
ibnotify
callback contains CMPL, the driver and
application are re-synchronized.
ibstop
: The I/O is stopped, and the driver and application are re-synchronized.
ibonl
: The I/O is stopped and the interface is reset; the driver and application are re-
synchronized.
Support Level
Board level
Syntax
Microsoft C/C++ and Borland C++
int ibcmda (int ud, const void *cmd, long cnt)