Delimiters; Command Format - Ametek 7124 Instruction Manual

Precision lock-in amplifier
Table of Contents

Advertisement

6.5.06 Delimiters

6.6 Command Format

1) A carriage return character (CR - ASCII 13)
In the case of commands that generate a single response, the controlling program
should send the null-terminated command string to the instrument and then read the
response bytes sent back from it. If using port 50000, read until the null is detected.
Two further bytes (the status and overload bytes) should then be read to complete the
transfer. If using port 50001 then read until the CR is detected.
Commands that do not return data still always return the three terminator bytes,
allowing the controlling program to know that the command has been implemented.
Data stored in the instrument's curve buffer can be transferred in two ways. In the
ASCII mode, each value is terminated in a null character until the last value, which is
then terminated as above, whereas in the binary dump mode each data point occupies
two bytes, with the complete dump being terminated as above.
In either case it is necessary to know how much data will be transferred, by sending
the M (monitor) command and reading the response, before initiating the transfer.
This is because in the ASCII dump mode the controlling program needs to "count"
each instance of a null character until all available points have been read, while in
the binary dump mode it needs to know exactly how many bytes to read, since the
data itself can contain null characters. Only by doing this can the program be
prevented from requesting more data from the socket than the lock-in has actually
sent.
Most response transmissions consist of one or two numbers (expressed as ASCII
text) followed by a response terminator. Where the response of the lock-in amplifier
consists of two numbers in succession, they are separated by a byte called a
delimiter. This delimiter can be any printing ASCII character and is common to all
interfaces; it is set via the RS232 Settings menu or by the use of the DD command.
The simple commands listed in section 6.7 have one of five forms:
CMDNAME terminator
CMDNAME n terminator
CMDNAME [n] terminator
CMDNAME [n
[n
1
2
CMDNAME n
[n
] terminator
1
2
where CMDNAME is an alphanumeric string that defines the command, and n, n
are parameters separated by spaces. When n is not enclosed in square brackets it
must be supplied. [n] means that n is optional. [n
if present may optionally be followed by n
are equivalent. Terminator bytes are defined in section 6.3.09.
Where the command syntax includes optional parameters and the command is
sent without the optional parameters, the response consists of a transmission of
the present values of the parameter(s).
Any response transmission consists of one or more numbers followed by a response
terminator. Where the response consists of two or more numbers in succession, they
are separated by a delimiter (sections 6.3.09, 6.3.04, and 6.5.05).
Some commands have an optional floating point mode which is invoked by
Chapter 6, COMPUTER OPERATION
]] terminator
. Upper-case and lower-case characters
2
[n
]] means that n
is optional and
1
2
1
, n
1
2
6-9

Advertisement

Table of Contents
loading

Table of Contents