Agilent Technologies N3280A TV Cables User Manual


 
4 - Introduction to Programming
34
Types of SCPI Messages
There are two types of SCPI messages, program and response.
A program message consists of one or more properly formatted SCPI commands sent from the
controller to the dc source. The message, which may be sent at any time, requests the dc source to
perform some action.
A response message consists of data in a specific SCPI format sent from the dc source to the
controller. The dc source sends the message only when commanded by a program message "query."
Figure 4-2 illustrates the SCPI message structure.
Data
Keywords
Keyword Separator
Message Unit Separators
Message Unit Query Indicator
Message Terminator
Root Specifier
VOLT : LEV 10 (@1) ; PROT ON, (@1) ; : CURR? (@1) <NL>
Channel
Space
Figure 4-2. Command Message Structure
The Message Unit
The simplest SCPI command is a single message unit consisting of a command header (or keyword)
followed by a message terminator. The message unit may include a parameter after the header. The
parameter can be numeric or a string.
ABORt<NL>
VOLTage 20<NL>
Channel List Parameter
The channel parameter is required to address one or more channels. It has the following syntax:
(@<channel> [,<channel>][,<channel>][,<channel>])
You can also specify a range of sequential channels using the following syntax:
<start_channel> : <end_channel>
For example, (@2) specifies channel 2 and (@1:3) specifies channels 1 through 3. The Agilent N3280A
only supports channels 1 through 4. A maximum of 4 channels may be specified through a combination
of single channels and ranges. Query and measurement channel lists are order-sensitive. Results are
returned in the order they are specified in the list.
NOTE: When adding a channel list parameter to a query, you must include a space (white space)
between the query indicator (?) and the channel list parameter. Otherwise error –103,
Invalid separator will occur