41
The Definite Form has the structure
-#-Byte Count Length - Byte Count - 8-bit byte
The Byte Count Length consists of a single ASCII digit from 1 to 9. It tells the parser how many digits are
in the Byte Count.
The Byte Count is a decimal integer made up of the number of digits specified in the Byte Count Length.
It tells the parser how many 8-bit bytes are being sent.
Indefinite Form
The Indefinite Form has the structure
- # - 0 – 8-bit byte – LF^EOI
Some Program Message Units either require, or can accept, more than one data element. Program data
elements are separated from each other by the Program Data Separator. It is defined as optional
whitespace characters followed by a comma (','), which in turn is followed by optional whitespace
characters.
There are two types of Program Message Units: Command Message Units and Query Message Units. A
Query differs from a Command in that the Program Header is terminated with a question mark ('?'). For
example, the frequency might be queried with the following query:
FREQ?
Some Query Message Units accept data, giving the device more specific information about what is
being queried. In many cases the Query Message Unit may optionally be supplied with the MIN or MAX
mnemonics as data. This tells the device to return the minimum or maximum value to which the
parameter may currently be set. For example,
FREQ? MAX
will return the maximum value to which the frequency may currently be set.
Not all Program Message units have query forms (for example, STATUS:PRESET), and some Program
Message Units might have only the query form (for example SYSTEM:VERSION?).
The instrument puts the response to the query into the output queue, from where it may be read by
the controller. The Status Byte MAV bit is set to indicate to the controller that a response is ready to be
read.
SCPI Command Structure
SCPI commands are based on a hierarchical structure. This allows the same instrument-control header
www.calcert.com
1.800.544.2843
0
5
10
15
20
25
30