2 program message header separator, 3 program message data, 3 scpi command structure – B&K Precision 4034 - Manual User Manual

Page 40

Advertising
background image


40

This means it is not necessary to write the mnemonic into the Program Header: it is a default condition.
The 'SOURCE' mnemonic, for example, is optional. Not specifying it will cause the device to search
for the mnemonics in the Program Header under the Source Subsystem. For example, the period may
be set by the command:

:PULS:PER 1US

4.9.2.2 Program Message Header Separator

The Program Header Separator is used to separate the program header from the program data. It
consists of one or more white-space characters, denoted as <ws>. Typically, it is a space.

4.9.2.3 Program Message Data

The Program Data represent the values of the parameters being set, for example, the '1US' in the above
examples. Different forms of program data are accepted, depending on the command. The Program
Data types used in the pulse generator are as follows:

1.

Character program data – This form of data is comprised of a mnemonic made up of lower - or
upper-case alpha characters. As with Program Header mnemonics, some Character Data
mnemonics have short and long forms. Only the short or the long form may be used.

2.

Boolean data – Boolean data indicate that the parameter can take one of two states, ON or OFF.
The parameter may be character type ON or OFF or numeric. A numeric value is rounded to an
integer. A non-zero result is interpreted as 1 (ON), and a zero result as 0 (OFF). Queries return
the values 0 or 1.

3.

NRf – This is a decimal numeric data type, where

NR1 indicates an integer number,
NR2 indicates a fixed-point real number, and
NR3 indicates a floating-point real number.

All parameters that have associated units accept a suffix, which may be specified using upper -
or lower-case characters. When the suffix is not specified, the numeric value is accepted in the
default units, which are Hertz for frequency, Seconds for time, and Volts for voltage. To set the
period to 1 microsecond we can send one of the following commands:

:PULS:PER 1E-6 or :PULS:PER 1000NS

The special forms of character data accepted as numbers as defined by SCPI are NOT accepted
by the pulse generator.

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 period might be queried with the following query:

:PULS:PER?

Not all Program Message units have query forms, such as STATUS:PRESET, and some
Program Message Units might have only the query form, such as SYSTEM:VERSION?. The
pulse generator 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.

4.9.3 SCPI Command Structure

SCPI commands are based on a hierarchical structure. This allows the same instrument-control

header to be used several times for different purposes, providing that the mnemonic occurs in a unique
position in the hierarchy. Each level in the hierarchy is defined as a node. Mnemonics in the different
levels are separated from each other by a colon (':'). The first Program Message Unit, or command, in a
Program Message is always referenced to the root node. Subsequent commands are referenced to the
same level as the previous command.

Advertising
This manual is related to the following products: