Technical data

1 Introduction to SCPI
4 U2761A Programmer’s Reference
Use a semicolon and a colon to link commands from different subsystems.
For example, in the following command string, an error is generated if you
do not use both the semicolon and colon:
SWE:STAT ON;:TRIG:SOUR EXT
Using a comma ( , )
If a command requires more than one parameter, you must separate
adjacent parameters using a comma as shown in the following example:
APPL:SIN 5 KHZ, 3.0 VPP, –2.5 V
Using whitespace
You must use whitespace characters, [tab], or [space] to separate a
parameter from a command keyword. Whitespace characters are generally
ignored only in parameter lists.
Using “?” commands
The bus controller may send commands at any time, but a SCPI
instrument may only send responses when specifically instructed to do so.
Only query commands (commands that end with a “?”) will instruct the
instrument to send a response message. Queries return either measured
values or internal instrument settings.
For example, the following command sets the output frequency to 5 kHz:
FREQ 5000
You can then query the current range setting by sending:
FREQ?
Typical response:
+5.0000000000000E+03
NOTE
If you send two query commands without reading the response from the first, then attempt to
read the second response, you may receive some data from the first response followed by the
complete second response. To avoid this, do not send a query command without reading the
response. When you cannot avoid this situation, send a device clear before sending the
second query command. For more information on device clear, refer to “Using device
clear” on page 10.