Specifications

Remote Programming
37
REMOTE PROGRAMMING
The SR400 Photon Counter is remotely
programmable via both RS-232 and GPIB (IEEE-
488) interfaces. It may be used with laboratory
computers or simply with a terminal. All front
panel features (except power) may be controlled
and read via the computer interfaces. The SR400
also has two programmable analog output ports
available to provide general purpose control
voltages.
COMMUNICATING WITH THE SR400
Before using either the RS-232 or GPIB interface,
the appropriate communication parameters need to
be set. These parameters are set from the front
panel in the COM menu. If the GPIB interface is
being used, only the GPIB address of the
instrument needs to be set. If the RS-232 interface
is being used, the baud rate, number of bits in a
character, and parity need to be set. The RS-232
wait interval programs the delay between
characters sent from the SR400. The delay is the
wait value times 3.3 ms. For most computers this
can be set to 0. Some terminal emulators may
require a delay. The RS-232 echo mode should be
OFF if the SR400 is connected to a computer. It
may ON if connected to a terminal.
COMMAND SYNTAX
Communications with the SR400 use ASCII
characters. Commands to the SR400 may be in
either UPPER or lower case.
A command to the SR400 consists of two
command letters, arguments or parameters if
necessary, and an ASCII carriage return (<cr>) or
line-feed (<lf>) or both. The different parts of the
command do not need to be separated by spaces.
Spaces can improve the readability of your
programs and, if included in a command, they will
be ignored. If more than one parameter is required
by a command, the parameters must be separated
by a comma. Examples of commands are:
CM 1 <cr> set the counting mode to A-B
FOR T PRESET
CI 0,1 <cr> set the input to counter A to
INPUT 1
NP 5E2 <cr> set N PERIODS to 500
GD 0,1.2E-6 <cr> set A gate delay to 1.2 ยตs
PL 1, -3.4E-1<cr> set the PORT1 output to
-0.34 V
Multiple commands may be sent on a single line.
The commands must be separated by a semicolon
(;) character. The commands will not be executed
until the terminating carriage return is sent.
An example of a multiple command is:
CM 1; CI 0,1; GD 0,1.2E-6 <cr>
It is not necessary to wait between commands. The
SR400 has a command input buffer of 256
characters and processes the commands in the
order received. Likewise, the SR400 has an output
buffer (for each interface) of 256 characters. If a
buffer overflows, the message "DATA BUFFER
OVERFLOW" appears on the LCD display for 5 s
and all buffered data is erased.
In general, if a command is sent without
parameters, it is interpreted as a request to read the
value of the associated function or setting. Values
returned by the SR400 are sent as a string of
ASCII characters terminated usually by carriage
return, line-feed. For example, after the above
command is sent, the following read commands
would generate the responses shown below.
Command
Response from SR400
CM1 <cr><lf>
CI 0 1<cr><lf>
GD 0 1.2E-6<cr><lf>
The choice of terminating characters sent by the
SR400 is determined by which interface is being
used and whether the 'echo' feature is in use. The
terminating sequence for the GPIB interface is
always <cr><lf>. The default sequence for RS-232
is <cr> when the echo mode is off, and <cr><lf>
when the echo mode is on. The terminating
sequence for the RS-232 interface may be changed
using the SE command.