Count variable, Read and write termination – National Instruments GPIB-PC User Manual

Page 72

Advertising
background image

Section Four

GPIB-PC Functions — Overview

©National Instruments Corp.

4-11

GPIB-PC User Manual

Count Variable

The

IBCNT

variable is updated after each read, write, or command

function call with the number of bytes actually transferred by the
operation.

Read and Write Termination

The IEEE-488 specification defines two methods of identifying the last
byte of device-dependent (data) messages. The two methods permit a
Talker to send data messages of any length without the Listener(s)
knowing in advance the number of bytes in the transmission. The two
methods are as follows:

END message. In this method, the Talker asserts the EOI (End
Or Identify) signal simultaneously with transmission of the last
data byte. By design, the Listener stops reading when it detects
a data message accompanied by EOI, regardless of the value of
the byte.

End-of-string (EOS) character. In this method, the Talker uses
a special character at the end of its data string. By prior
arrangement, the Listener stops receiving data when it detects
that character. Either a 7-bit ASCII character or a full 8-bit
binary byte may be used.

The methods can be used individually or in combination. However, it is
important that the Listener be properly configured to unambiguously
detect the end of a transmission.

The GPIB-PC always terminates

IBRD

operations on the END message.

Using the configuration program, you can accommodate all permissible
forms of read and write termination. The default configuration settings
for read and write termination can be changed at run time using the

IBEOS

and

IBEOT

functions, if necessary.

Advertising