KPCI-488LPA-900-01 Rev. A / December 2008
Return to
2-35
Model KPCI-488LPA GPIB Controller Interface Card User’s Manual
Section 2: NI Command Compatible Functions
Support Level
Board / device level
Syntax
Microsoft C/C++ and Borland C++
int ibwrta (int ud, const void *buf, long cnt)
Visual Basic
ibwrta (ByVal ud As Integer, ByVal buf As String,
ByVal cnt As Long) As Integer
- or -
call ibwrta (ByVal ud As Integer, ByVal buf As
String)
Parameters
ud
: device unit descriptor
buf
: the buffer that contains the sent data bytes
cnt
: the number of sent data bytes
Return Value
The value of the
ibsta
Error Codes
EADR, EABO, EBUS, ECIC, EDVR, EOIP, ENEB, ENOL
ibwrtf
Description
This command writes data from a file to a device.
When
ud
is a device descriptor,
ibwrtf
addresses the GPIB and writes all data bytes
in
filename
to the GPIB device. The operation normally ends when all the data bytes
have been written; if all the bytes are not written during the timeout period, the
operation stops with an error. The number of bytes actually transferred is returned in
the global variable
ibcntl
.
When
ud
is a board descriptor, the board-level
ibwrtf
automatically writes all data
bytes in
filename
to the GPIB device. Normally, this operation ends when all the data
bytes are completely written; if all data bytes are not written during the timeout period
(or, if the board is not CIC and CIC sends the
Device Clear
message on the GPIB
bus), the operation stops with an error. The number of bytes actually transferred is
returned in the global variable,
ibcntl
.
Support Level
Board / device level
Syntax
Microsoft C/C++ and Borland C++
int ibwrtf (int ud, const char *filename)
Visual Basic
ibwrtf (ByVal ud As Integer, ByVal filename As
String) As Integer
- or -
call ibwrtf (ByVal ud As Integer, ByVal filename
As String)
Parameters
ud
: device descriptor
filename
: the file name; the file contains the data written
Return Value
The value of the
ibsta
Error Codes
EABO, EADR, EBUS, ECIC, EDVR