Introduction to Programming - 4
35
Headers
Headers, also referred to as keywords, are instructions recognized by the dc source. Headers may be
either in the long form or the short form. In the long form, the header is completely spelled out, such as
VOLTAGE, STATUS, and DELAY. In the short form, the header has only the first three or four letters,
such as VOLT, STAT, and DEL.
Query Indicator
Following a header with a question mark turns it into a query (VOLTage?, VOLTage:TRIGgered?). If a
query contains a parameter, place the query indicator at the end of the last header.
VOLTage:TRIGgered? MAX,(@1)
Message Unit Separator
When two or more message units are combined into a compound message, separate the units with a
semicolon.
STATus:OPERation?(@1);QUEStionable?(@1)
Root Specifier
When it precedes the first header of a message unit, the colon becomes the root specifier. It tells the
command parser that this is the root or the top node of the command tree.
Message Terminator
A terminator informs SCPI that it has reached the end of a message. Three permitted messages
terminators are:
♦ newline (<NL>), which is ASCII decimal 10 or hex 0A.
♦ end or identify (<END>)
♦ both of the above (<NL><END>).
In the examples of this guide, there is an assumed message terminator at the end of each message.
SCPI Data Formats
All data programmed to or returned from the dc source is ASCII. The data may be numerical or character
string.
Numerical Data Formats
Symbol
Response Formats
<NR1> Digits with an implied decimal point assumed at the right of the least-significant digit. Examples: 273
<NR2> Digits with an explicit decimal point. Example: .0273
<NR3> Digits with an explicit decimal point and an exponent. Example: 2.73E+2
Parameter Formats
<Nrf> Extended format that includes <NR1>, <NR2> and <NR3>. Examples: 273 273. 2.73E2
<Nrf+> Expanded decimal format that includes <NRf> and MIN MAX. Examples: 273 273. 2.73E2
MAX. MIN
and MAX are the minimum and maximum limit values that are implicit in the range
specification for the parameter.
<Bool> Boolean Data. Example: 0 | 1 or ON | OFF