Group i, Ibrd (bd,buf,cnt), Ibwrt (bd,buf,cnt) – National Instruments GPIB-PC User Manual

Page 45

Advertising
background image

GPIB-PC Functions — Introduction

Section Three

GPIB-PC User Manual

3-2

©National Instruments Corp.

Group I

Group I functions may be the only functions you need for many of your
instrument control applications. Group I functions are as follows:

IBRD

,

IBWRT

, and

IBFIND

.

They are suitable for your applications under the following conditions:

Communication is between the Controller (computer) and one
device at a time. Messages are not broadcast to several
devices at once, and devices do not talk to each other directly.

Devices do not require special services or operations, such as
polling or triggering, to send or receive data.

IBRD

and

IBWRT

are high-level input/output (I/O) functions.

IBFIND

is a start-up function that opens the device.

IBRD (bd,buf,cnt)

IBRD

reads a specified number of bytes from a device and stores them

in memory. The device is automatically addressed before reading and
unaddressed afterward. If not done previously, the GPIB is initialized on
entering the function and the device is placed in remote programming
mode.

When programming in BASIC,

IBRD

performs string transfers.

IBRDI

is available for binary transfers to an integer array.

IBWRT (bd,buf,cnt)

IBWRT

writes a specified number of bytes from the memory buffer to a

device. The device is automatically addressed before writing and
unaddressed afterward. If not done previously, the GPIB is initialized on
entering the function, and the device is placed in remote programming
mode.

When programming in BASIC,

IBWRT

performs string transfers.

IBWRTI

is available for binary transfers from an integer array.

Advertising