95x Series Operating Manual - May 17, 2022
Page
122
of
155
SECTION 11
–
PROGRAMMING VIA AN INTERFACE
The 95x may be programmed via the RS232, GPIB or Ethernet interface. All use the same general format for
commands and query responses. All data uses the standard 7-bit ASCII character set. In general, all activities are
independent for each interface.
There are two types of command
–
•
Commands which do not have a response. These always cause the 95x to take an action.
•
Commands which have a response (these are named Query commands in this document). These
generally do not cause the 95x to take an action other than sending back the response. These all have a
keyword which ends with the ? character.
Throughout this section reference is made to several special ASCII characters
–
<CR>
the carriage return character
<LF>
the line feed character
<FF>
the form feed character
<TAB>
the tab character
<SPACE>
the space character
Throughout this section reference is made to whitespace characters, the
<SPACE>
and
<TAB>
characters are
considered whitespace characters.
Throughout this section reference is made to data field formats, these are described in more detail later in this
section
–
<EMPTY>
is an empty field, containing nothing other than optional whitespace characters
<STRING>
is a general string of ASCII characters
<NR1>
is an integer numeric
<NR3>
is a floating point numeric
<BOOL>
is a boolean, indicating true or false
GENERAL COMMAND SYNTAX
Every command takes the form of a set of one or more fields; each field is separated from the next by a field
separator. The first field is always the command keyword, the remaining fields and their syntax depends on the
command keyword and in some cases the content of a preceding field in the command.
Multiple commands can be transferred as a single set of commands; each command is separated from the next by
a command separator. If there are multiple query commands in a single set then each response is given as
separate fields in the overall response, which is not transmitted until all commands in the set have been
successfully actioned. The maximum overall length of a response set is 19999 characters (except for the Ethernet
interface which is limited to 1500). Commands are always actioned in the same order as they are received.
The end of a set of commands is denoted by the inclusion of a command terminator. Sets of commands are always
actioned in the same order as they are received.
Received characters on each interface are buffered from the actual communications stream, the contents of the
buffer being decoded and actioned when a command terminator is found in the stream. The maximum length of a
set of commands is 1023 characters.