Specifications

Remote Programming
5-18
always be ready to receive the next byte. In general, using binary transfers on the
RS232 interface is not recommended.
The parameter i selects the display buffer (i=1, 2) and is required. Points are read
starting at bin j (j0). A total of k bins are read (k1) for a total transfer of 4k 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 9 (oldest) to N-1 (most recent). If data storage is set to Loop mode, make
sure that storage is paused before reading any data. This is because the points are
indexed relative to the most recent point which is continually changing.
FAST (?) {i} The FAST command sets the data transfer mode on and off. The parameter i selects:
i=0: Off
i=1: On (DOS programs or other dedicated data collection computers)
i=2: On (Windows Operating System Programs)
When the fast transfer mode is on, whenever data is sampled (during a scan), the
values of X and Y are automatically transmitted over GPIB (not available over RS232).
The sample rate sets the frequency of the data transfers. It is important that the
receiving interface be able to keep up with the transfers.
To use the FAST2 mode, a ROM version of 1.06 or higher is required. The FAST2
version uses the lock-in transmit queue to buffer the GPIB data being sent to the host.
Since the transmit queue can buffer a maximum of 63 X and Y data pairs, the host can
only be diverted for short periods of time (e.g. 120mS at 512Hz sample rate) without
causing the lock-in to "time out" and abort the FAST mode data transfer.
The values of X and Y are transferred as signed integers, 2 bytes long (16 bits). X is
sent first followed by Y for a total of 4 bytes per sample. The values range from -32768
to 32767. The value ±30000 represents ±full scale (i.e. the sensitivity).
Offsets and expands are included in the values of X and Y. The transferred values are
(raw data - offset) x expand. The resulting value must still be a 16 bit integer. The value
±30000 now represents ±full scale divided by the expand factor.
At fast sample rates, it is important that the receiving interface be able to keep up. If the
SR830 finds that the interface is not ready to receive a point, then the fast transfer
mode is turned off. The fast transfer mode may be turned off with the FAST0 command.
The transfer mode should be turned on (using FAST1 or FAST 2) before a scan is
started. Then use the STRD command (see below) to start a scan. After sending the
STRD command, immediately make the SR830 a talker and the controlling interface a
listener. Remember, the first transfer will occur with the first point in the scan. If the
scan is started from the front panel or from a trigger, then make sure that the SR830 is
a talker and the controlling interface a listener BEFORE the scan actually starts.
STRD After using FAST1 or FAST 2 to turn on fast data transfer, use the STRD command to
start the scan. STRD starts a scan after a delay of 0.5 sec. This delay allows the
controlling interface to place itself in the read mode before the first data points are
transmitted. Do not use the STRT command to start the scan. See the programming
examples at the end of this section.