Ibrdf – Measurement Computing GPIB-488 User Manual
Page 50
![background image](https://www.manualsdir.com/files/797797/content/doc050.png)
Chapter 3
GPIB 488.1 Library Reference
GPIB-488
3-37
IBRDF
Reads data from the GPIB into a file.
Syntax
C
ibrdf (int boarddev, char filename [])
Parameters
boarddev
is an integer containing the board or device handle.
filename
is the name of the file (up to 250 characters, including drive/path) in which the data
is to be stored. Be certain to specify a drive and path if necessary. This file is automatically
opened as a binary file. It is created if it does not already exist.
Returns
ibsta
will contain a 16-bit status word as described in Appendix B,
.
iberr
will contain an error code, if an error occurred. An
EFSO
error is generated if the file
can not be opened, created, found, written to, or closed.
ibcnt
,
ibcntl
will contain the number of bytes that were read.
ibcnt
is a 16-bit integer.
ibcntl
is a 32-bit integer. If the requested count was greater than 64 K, use
ibcntl
instead
of
ibcnt
.
Usage Notes
A read terminates when one of the following occurs:
•
The allocated buffer becomes full.
•
An error is detected.
•
The time limit is exceeded.
•
A terminator (or EOI) is detected.
•
A DCL or SDC command is received from the Active Controller.
If
boarddev
specifies a device, the specified device is addressed to talk and its associated
access board is addressed to listen.
If
boarddev
specifies a GPIB Interface board, you must have already addressed a device as
a talker and the board as a listener. If the board is the Active Controller, it unasserts ATN in
order to receive data. This routine leaves the board in that state.