![Keithley KPCI-488 LPA Скачать руководство пользователя страница 52](http://html1.mh-extra.com/html/keithley/kpci-488-lpa/kpci-488-lpa_user-manual_3940953052.webp)
2-26
Return to
KPCI-488LPA-900-01 Rev. A / December 2008
Section 2: NI Command Compatible Functions
Model KPCI-488LPA GPIB Controller Interface Card User’s Manual
ibrd
Description
This command reads data from a device to the indicated buffer.
The GPIB is addressed by
ibrd
, which reads count data bytes (count is the counting
value in the counter); when
ud
is the device descriptor, the count data bytes are
placed in the user buffer. The operation ends when the count data bytes have been
read or when
END
is read. If the count bytes reading does not finish before the
timeout period ends, the operation stops with an error. The actual number of
transferred bytes is returned in the global variable,
ibcntl
.
When
ud
is the board descriptor
,
count data bytes are read by
ibrd
and placed in the
user buffer. The GPIB has already been addressed by the board-level
ibrd
; the
operation ends when the count data bytes or
END
are read. If the count bytes reading
is not complete within the timeout period (or the board is not CIC, and CIC sends the
Device Clear
message on the GPIB bus), the operation stops with an error. The
actual number of transferred bytes is returned in the global variable,
ibcntl
.
Support Level
Board / device level
Syntax
Microsoft C/C++ and Borland C++
int ibrd (int ud, void *buf, long cnt)
Visual Basic
ibrd (ByVal ud As Integer, buf As String,
ByVal cnt As Long) As Integer
- or -
call ibrd (ByVal ud As Integer, buf As String)
Parameters
ud
: device descriptor
buf
: the buffer that stores the data that is read from the GPIB
cnt
: the number of the bytes read from the GPIB
Return Value
The value of the
ibsta
Error Codes
EABO, EADR, EBUS, ECIC, EDVR, ENEB, EOIP
ibrda
Description
This command asynchronously reads data from a device to the designated buffer.
The GPIB is addressed by
ibrda
, which reads count data bytes (count is the counting
value in the counter); when
ud
is the device descriptor, the count data bytes are
placed in the user buffer. The operation ends when the count data bytes have been
read or when
END
is read. If the count bytes reading does not finish before the
timeout period ends, the operation stops with an error. The actual number of
transferred bytes is returned in the global variable,
ibcntl
.
Count data bytes are read by
ibrda
and placed in the user buffer when
ud
is the board
descriptor. The GPIB has already been addressed by the board-level
ibrda
; the
operation ends when the count data bytes or
END
are read. If the count bytes reading
is not complete within the timeout period (or the board is not CIC, and CIC sends the
Device Clear
message on the GPIB bus), the operation stops with an error. The
actual number of transferred bytes is returned in the global variable,
ibcntl
.
The design purpose 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.