Measurement-computing GPIB-488 Instrukcja Użytkownika Strona 68

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 116
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 67
Chapter 3 GPIB 488.1 Library Reference
GPIB-488 3-55 Programming Reference Manual
IBWRTF
Writes data from a file to the specified device or GPIB Interface Board.
Syntax
C ibwrtf (int boarddev, char filename [])
Parameters
boarddev is an integer containing the board or device handle.
filename is the name of the file (up to 50 characters, including drive/path) to store the data.
Specify a drive and path if necessary. This file is automatically opened as a binary file.
Returns
ibsta will contain a 16-bit status word as described in Appendix B, IBSTA.
iberr will contain an error code, if an error occurred. An EFSO error is generated if the file
can not be found.
ibcnt, ibcntl will contain the number of bytes that were written. 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 write terminates when one of the following occurs:
An error is detected.
The time limit is exceeded.
A DCL or SDC is received from the Active Controller.
All data has been sent.
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 listener and the board as a talker. If the board is the CIC,
it unasserts ATN in order to receive data. This routine leaves the board in that state.
Example
This program sends the command "UPLOAD" to a device and prepares the device to receive a
large amount of data. The program then sends the data from a file to the device.
C int device;
ibwrt (device, "UPLOAD");
ibwrtf (device, "c:gpib.dat");
Przeglądanie stron 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 115 116

Komentarze do niniejszej Instrukcji

Brak uwag