Syntax and Commands
AFG3000 Series Arbitrary/Function Generators Reference Manual 3-7
Chaining Commands and
Queries
You can chain several commands or queries together into a single message. To
create a chained message, first create a command or query, then add a semicolon
(;), and finally add more commands or queries and semicolons until you are done.
If the command following a semicolon is a root node, precede it with a colon (:).
Figure 3-4 illustrates a chained message consisting of several commands and
queries. The chained message should end in a command or query, not a semicolon.
Responses to any queries in your message are separated by semicolons.
Figure 3-4: Example of chaining commands and queries
If a command or query has the same root and lower-level nodes as the previous
command or query, you can omit these nodes. In Figure 3-5, the second command
has the same root node (SEQuence) as the first command, so these nodes can be
omitted.
Figure 3-5: Example of omitting root and lower level nodes
Units and SI Prefix
If the decimal numeric argument refers to voltage, frequency, impedance, or time,
you can express it using SI units instead of using the scaled explicit point input
value format <NR3>. (SI units are units that conform to the System International
d’Unites standard.) For example, you can use the input format 200 mV or 1.0 MHz
instead of 200.0E–3 or 1.0E+6, respectively, to specify voltage or frequency.
:SOUR:FREQ:FIX 100;:OUTP:STAT ON;:SOUR:VOLT:AMPL?;:TRIG:SEQ:TIM?
First command Second command First query Second query
The response from this chained message might be: 1.000E0;1.000E-3
Response from first query
Response from second query
:TRIG:SEQ:TIM 2.5;:TRIG:SEQ:SLOP POS;:TRIG:SEQ:SOUR EXT
Identical root and lower level nodes
:TRIG:SEQ:TIM 2.5;SLOP POS;SOUR EXT
First command Additional commands
(omitted the root nodes)