Specifications

Remote Programming – Command List
45
the decimal ASCII codes (0-127) j,k,l, and m. If
no argument is included, the end-of-record
sequence returns to the default (a carriage return),
otherwise, up to four characters may be specified.
The end-of-record required by the SR400 when
receiving commands is not affected. The SE
command may only be sent via the RS-232
interface.
STORE/RECALL
ST m
The ST command stores the instrument settings to
location m = 1 to 9. Parameters in the SETUP and
COM menus are NOT stored by this command.
The SETUP and COM parameters are stored on
power down as part of the current setup.
RC m
The RC command recalls instrument settings from
location m = 0 to 9. If m = 0, the default settings
are recalled (see the Instrument Setups section for
a list of the default settings). In all cases, the
SETUP and COM parameters are not altered by
this command. The RC command also resets the
counters. The menu display returns to the menu
displayed when the instrument settings were
stored. This is very often the STORE menu.
POLLED DATA
QA
QB
The QA command reads the most recent complete
data point from counter A, QB reads the most
recent data point from counter B. QA and QB
commands should only be sent after checking the
Data Ready status bit. This bit is set at the end of
each complete count period and signals the
availability of valid data. The Data Ready status
bit is reset after it is read. Sending QA or QB
commands without polling the Data Ready status
can cause data points to be read multiple times.
Note that QA and QB do not reset the Data Ready
status.
If data is not ready, the QA and QB commands
return -1. If counter B is preset, QB returns -1.
QA m
QB m
When m is included in a QA or QB command,
buffered data from scan point m is read. m = 1 is
the first data point in the scan and m = N
PERIODS is the last data point. If m>2000 or
m=0, an error occurs. If counter B is preset, then
QB m returns 1.
If m > last completed point of the current scan,
then -1 is returned. Therefore during a scan, QA 1
can be sent until a positive count is returned. At
this point, the QA 2 command should be sent until
a positive count is returned. All data from the scan
can be read in this manner. This is the fastest way
to read data during a scan while still maintaining
full handshaking.
Data from the scan buffer can also be read after
the scan is completed. The Scan Done status bit
can be polled to determine when the scan finishes.
The Scan Done status bit is set at the end of a scan
only if the scan end mode is STOP. The Scan
Done status bit is reset after it is read. To prevent
ambiguity, the status byte should be cleared before
starting a scan and then polled to determine when
the scan is finished.
Whenever scan data is to be read, the scan end
mode should be STOP and a new scan started
only after reading the desired data from the
previous scan.
If m is absent or between 1 and 2000, data is
always returned from a Q command. The value -1
is reserved for errors.
CONTINUOUS DATA
EA
EB
ET
The E commands dump the scan buffers at the end
of a scan. The E commands may only be sent
while paused at the end of a scan. Data will be sent
continuously starting with data point 1 and ending
with data point N PERIODS. Each data point is
separated by an end-of-record sequence. If an E
command is used with the RS-232 interface, the
controlling computer interface should be interrupt
driven or have fast data communication routines