Tektronix AFG2021 Programmer's Manual page 23

Arbitrary function generator
Hide thumbs Also See for AFG2021:
Table of Contents

Advertisement

Creating Commands
Creating Queries
Query Responses
Parameter Types
AFG2021 Arbitrary Function Generator Programmer Manual
You can create commands and queries from these subsystem hierarchy trees.
Commands specify actions for the instrument to perform. Queries return
measurement data and information about parameter settings.
SCPI commands are created by stringing together the nodes of a subsystem
hierarchy and separating each node by a colon.
In the figure above, TRIGger is the root node and SEQuence, SLOPe, SOURce,
and TIMer are lower level nodes. To create a SCPI command, start with the root
node TRIGger and move down the tree structure adding nodes until you reach the
end of a branch. Most commands and some queries have parameters; you must
include a value for these parameters. If you specify a parameter value that is out
of range, the parameter will be set to a default value. The command descriptions,
list the valid values for all parameters.
For example, TRIGger:SEQuence:SOURce EXTernal is a valid SCPI command
created from the hierarchy tree. (See Figure 2-1.)
To create a query, start at the root node of a tree structure, move down to the end of
a branch, and add a question mark. TRIGger:SEQuence:SOURce? is an example
of a valid SCPI query using the hierarchy tree in the figure. (See Figure 2-1.)
The query causes the instrument to return information about its status or settings.
When a query is sent to the instrument, only the values are returned. When the
returned value is a mnemonic, it is noted in abbreviated format. (See Table 2-3.)
Every parameter in the command and query descriptions is of a specified type.
(See Table 2-4.) The parameters are enclosed in brackets, such as <value>.
The parameter type is listed after the parameter and is enclosed in parentheses,
for example, (boolean). Some parameter types are defined specifically for the
instrument command set and some are defined by SCPI.
Table 2-4: Parameter types used in syntax descriptions
Parameter type
Description
arbitrary block
1
A specified length of
arbitrary data
boolean
Boolean numbers or values
Command Syntax
Example
#512234xxxxx . . . where
5 indicates that the following
5 digits (12234) specify the
length of the data in bytes;
xxxxx ... indicates the data
or
#0xxxxx...<LF><&EOI>
ON or ≠ 0
OFF or 0
2-5

Advertisement

Table of Contents
loading

Table of Contents