SR510 Guide to
Programming
The SR510
Communicating with the SR510
Before using either the RS232 or GPIB interface, the appropriate configuration switches need to be set. There are two banks of 8 switches, SW1 and SW2, located on the rear panel. SW1 sets the GPIB address and SW2 sets the RS232 parameters. The configuration switches are read continuously and any changes will be effective immediately. For details on switch settings, see page 7 at the front of this manual.
Command Syntax
Communications with the SR510 use ASCII characters. Commands to the SR510 may be in either UPPER or lower case.
A command to the SR510 consists of one or two command letters, arguments or parameters if necessary, and an ASCII carriage return (<cr>) or
G 5 <cr> | set the sensitivity to 200 nV | |
T 1,4 <cr> | set the pre filter to 30 mS | |
F <cr> | read the reference frequency | |
P 45.10 <cr> | set phase shift to 45.10° | |
X | set port X5 to |
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:
G 5; T 1,4; P 45.10 <cr>
It is not necessary to wait between commands. The SR510 has a command input buffer of 256 characters and processes the commands in the order received. Likewise, the SR510 has an output buffer (for each interface) of 256 characters.
In general, if a command is sent without parameters, it is interpreted as a request to read the status of the associated function or setting. Values returned by the SR510 are sent as a string of ASCII characters terminated usually by carriage return,
Command | Response from the SR510 |
G <cr> | 5<cr><lf> |
T 1 <cr> | 4<cr><lf> |
P <cr> | 45.10<cr><lf> |
The choice of terminating characters sent by the SR510 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> (with EOI). The default sequence for RS232 is <cr> when the echo mode is off, and <cr><lf> when the echo mode is on. The terminating sequence for the RS232 interface may be changed using the J command.
Note that the terminating characters are sent with each value returned by the SR510. Thus, the response to the command string G;T1;P<cr> while using the RS232
Front Panel Status LED's
The ACT LED flashes whenever the SR510 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. This LED flashes for about three seconds on
15