National Instruments GPIB-MAC User Manual page 69

Table of Contents

Advertisement

November 1985
rd - Read Data *
Syntax: rd #count [addr]<CR>
Purpose: You use rd to read data from the GPIB.
Remarks: The argument #count is a numeric string preceded by a
number sign (#). #count specifies the number of bytes
to read. count must not contain a comma. It can
specify a number between 1 and 65535.
The argument addr is a device address that specifies the
address of the device to be addressed as a Talker. addr
consists of a primary address and an optional secondary
address. The secondary address is separated from the
primary address by a plus sign (+).
Only the lower five bits of each address are significant
These bits may be in the range from 0 through 30 for
both the primary and the secondary address. Therefore,
the binary value 01100010 (decimal 98) is interpreted as
decimal 2.
The following examples all specify a primary address of
0 and a secondary address of 2. The listen address is
32, the talk address is 64, and the secondary address is 2
or 98, which are equivalent.
The GPIB-MAC reads data from the GPIB until the
specified byte count is reached, the GPIB END message
is received with a data byte, the EOS byte is received, or
a timeout occurs.
Refer also to eos, eot, and tmo.
58
SECTION FOUR - FUNCTIONS

Advertisement

Table of Contents
loading

Table of Contents