Ibwrt, Ibwrt -52 – Measurement Computing GPIB-488 User Manual

Page 65

Advertising
background image

Chapter 3

GPIB 488.1 Library Reference

Programming Reference Manual

3-52

GPIB-488

IBWRT

Writes data from a string to the specified device or GPIB Interface Board.

Syntax

C

ibwrt (int boarddev, char buf[], unsigned long

bytecount)

Parameters

boarddev

is an integer containing the board or device handle.

buf

is the string containing the data to be written.

buf

can contain up to 4 gigabytes-1 (2

32

-1

bytes). String size may be limited by the language you are using. Check documentation for
your language.

bytecount

specifies the number of bytes to be written from the string.

Returns

ibsta

will contain a 16-bit status word as described in Appendix B,

IBSTA

.

iberr

will contain an error code of the first error detected, if an error occurred. An

EADR

results if

boarddev

specifies a board and the board has not already been addressed to talk.

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

This routine is used to send device-specific commands. A write terminates when one of the
following occurs:

All bytes are transferred.

An error is detected.

The time limit is exceeded.

A DCL (Device Clear) or SDC (Selected DC) is received from the CIC.

All data is sent.

If

boarddev

specifies a device, the specified device is addressed to listen and its associated

access board is addressed to talk. If

boarddev

specifies a GPIB Interface Board, the

Controller-In-Charge must have already addressed a device as a listener and the board as a
talker. If the board is the Active Controller, it unasserts ATN in order to send data. This routine
leaves the board in that state.

Advertising