S Mode Functions
Chapter 5
GPIB-232CT User Manual
5-32
© National Instruments Corp.
For example, if you send the GPIB-232CT the programming
message
"rd 10"
<CR>, it reads data from the GPIB until it
receives 10 bytes of data, the END message, or an
eos
byte.
Let's say the GPIB-232CT receives END with the fourth data
byte. The GPIB-232CT then returns to you the 4 data bytes,
followed by 6 null bytes, followed by an ASCII 4 and
<CR><LF>. A null byte is decimal 0. You should always
read back count bytes of data from the serial port, then look at
the remaining bytes to determine how many of the count bytes
were read from the GPIB. Refer to the example at the end of
this description.
The GPIB-232CT aborts the GPIB read and records the
EABO error if, at any time during the GPIB read, the time
limit set for I/O functions expires. This limit is 10 seconds
unless you use
tmo
to change it.
If the GPIB-232CT is CIC,
rd
will cause the GPIB-232CT to
address itself to listen if it is not already addressed. If you
specify the address of the Talker, the GPIB-232CT will also
address that device to talk. If you do not specify the address
of the Talker, the GPIB-232CT will assume that the Talker
has already been addressed.
The GPIB-232CT then places itself in Standby Controller
state with ATN off and remains there after the read operation
is completed.
If you specify an address, the GPIB-232CT must be CIC to
perform the addressing.
If this is the first function you call that requires GPIB
Controller capability, and you have not disabled System
Controller capability with
rsc
, the GPIB-232CT sends
Interface Clear (IFC) to make itself CIC. It also asserts
Remote Enable.
If you call
rd
with the address argument, and you previously
passed control to some other GPIB device, control must be
passed back to you or you must send IFC to make yourself
CIC before making this call. Otherwise, the ECIC error will
be posted.