Delimiters - Ametek 7124 Instruction Manual

Precision lock-in amplifier
Table of Contents

Advertisement

Chapter 6, COMPUTER OPERATION

6.4.04 Delimiters

6-6
Responses from the instrument consist of a string that is terminated with one or three
bytes depending on the setting of the Output Terminator control on the USB Status
Menu – see section 5.3.19 – as follows:
Output Terminator = NULL
1) A null character (ASCII 0)
Output Terminator = STATUS
1) A null character (ASCII 0)
2) A byte representing the value of the Status Byte (table 6-1)
3) A byte representing the value of the Overload Byte (table 6-1)
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 until the null is detected. If the Output Terminator =
STATUS then two further bytes (the status and overload bytes) should then be read to
complete the transfer.
Commands that do not return data still always return the one or 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 USB endpoint 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.

Advertisement

Table of Contents
loading

Table of Contents