Specifications
Remote Programming
38
Note that the terminating characters are sent with
each value returned by the SR400. Thus, the
response to the command string CM;CI0;GD0<cr>
while using the RS-232 non-echo mode would be
1<cr>1<cr>1.2E-6<cr>.
In general, it is good programming practice to
receive the response from one query command
before sending another command.
FRONT PANEL STATUS LED's
The ACT LED flashes whenever the SR400 is
sending or receiving characters over the computer
interfaces.
The ERR LED flashes whenever an error has
occurred, such as, an illegal command has been
received, a parameter is out of range, or a
communication buffer has exceeded 240
characters.
The REM LED is on whenever the SR400 is
programmed to be in the remote (front panel
locked out) state.
RS-232 ECHO AND NO ECHO OPERATION
In order to allow the SR400 to be operated from a
terminal, an echo feature has been included which
causes the unit to echo back commands received
over the RS-232 port. This feature is enabled by
setting the RS-232 ECHO mode to ON in the
COM menu. In this mode, the SR400 will send
line-feeds in addition to carriage returns with each
value returned and will also send the prompts
'OK>' and '??>' to indicate that the previous
command line was either processed correctly or
contained an error. Operating the SR400 from a
terminal is an ideal way to learn the commands
and responses before attempting to program a
computer to control the SR400. When the unit is
controlled by a computer, the echo feature should
be turned OFF to prevent the sending of spurious
characters which the computer is not expecting.
TRY-OUT WITH AN ASCII TERMINAL
Before attempting any detailed programming with
the SR400, it is a good idea to try out the
commands using a terminal. Connect a terminal
with an RS-232 port to the RS-232 connector on
the rear panel of the SR400. A 'straight' RS-232
cable is required since the SR400 is a DCE and the
terminal is a DTE. After connecting the terminal,
hold down the STOP key while turning the unit
on. This causes the SR400 to assume its default
settings so that the following discussion will agree
with the actual responses of the SR400. Set the
baud rate, parity, and character length to match the
terminal using the COM menu. The RS-232 echo
mode should be changed to ON. Now turn the unit
off and on again. The ACT LED will flash for a
second and the sign-on message will appear on the
terminal. Following the message, the prompt
'OK>' will be displayed. This indicates that the
SR400 is ready to accept commands. The sign on
message is only sent if the RS-232 echo mode is
ON.
Type the letters 'CM' followed by a carriage return
(CM<cr>). The SR400 responds by sending to the
terminal the character 0 indicating that the
counting mode is A,B FOR T PRESET. In
general, a command with no arguments or
parameters reads a setting of the unit. Now type
the command MD1,2<cr>. The menu line of the
display should now read A=INPUT 1. Type the
command CI0,0<cr> to change the counter A
input to 10 MHz. The menu line should now read
A=10MHz.
Now use the command CS<cr> to start counting.
After one second, counter A should have
10000000 displayed (10 MHz for 1 second). The
data from counter A can now be read. Type the
command QA<cr> and the response should be the
counter A value.
Attach a dc voltmeter to the PORT1 D/A output
on the rear panel. The range should allow for 10V
readings. The voltage at this output can be set
using the PL command. Type PL1,5.0<cr> and the
output will change to 5.0V. To read this back to
the terminal, just type PL1<cr>. When setting the
voltage, the value may be sent as an integer (5),
real (5.000), or floating point (0.500E1) number.
At this point, the user should experiment with a
few of the commands. A detailed command list
follows.