6-25
Remote Programming
transfer does not pause between bytes. The receiving interface must
always be ready to receive the next byte. In general, using binary trans-
fers on the RS232 interface is not recommended.
The parameter i selects a trace (1, 2, 3 or 4) and is required. If Trace i is
not stored, then an error occurs. Points are read from the buffer starting
at bin j (j≥0). A total of k bins are read (k≥1) for a total transfer of k*4
bytes. To read a single point, set k=1. Both j and k are required. If j+k
exceeds the number of stored points (as returned by the SPTS? query),
then an error occurs. Remember, SPTS? returns N where N is the total
number of bins - the TRCB? command numbers the bins from 0 (oldest)
to N-1 (most recent).
TRCL ? i, j, k The TRCL? command queries the points stored in Trace i. The values
are returned in a non-normalized floating point format (with the units of
the trace). There are 4 bytes per point. Multiple points are not separated
by any delimiter. The bytes CANNOT be read directly into a floating point
array.
Each point consists of four bytes. Byte 0 is the LSB and Byte 3 is the
MSB. The format is illustrated below.
The mantissa is a signed 16 bit integer (-32768 to 32767). The exponent
is a signed integer whose value ranges from 0 to 248 (thus byte 3 is
always zero). The value of a data point is simply,
value = m x 2
(exp-124)
where m is the mantissa and exp is the exponent.
The trace data within the SR850 is stored in this format. Data transfers
using this format are faster than IEEE floating point format. If data trans-
fer speed is important, the TRCL? command should be used.
Do not query the IFC (no command in progress) status bit after sending
the TRCL command. This bit will not be set until the transfer is complete.
When using the GPIB interface, EOI is sent with the final byte. The points
must be read using a binary transfer (see your GPIB interface card soft-
ware manual). Make sure that the software is configured to NOT termi-
nate reading upon receipt of a CR or LF.
When using the RS232 interface, the word length must be 8 bits. The
points must be read as binary bytes (no checking for linefeeds, carriage
returns or other control characters). Most serial interface drivers are
designed for ASCII text only and will not work here. In addition, the data
transfer does not pause between bytes. The receiving interface must
always be ready to receive the next byte. In general, using binary trans-
fers on the RS232 interface is not recommended.
exp mantissa
16 bits 16 bits
0
byte3 byte2 byte1 byte0