Spectrum Master™ Programming Manual : 2 Programming Overview : Controller Interface

Controller Interface
The physical interface is the RJ-45 connection on the instrument for 10BASE-T.
Data transfer takes place over Ethernet using TCP/IP and the VXI-11 protocol. In order to communicate with the instrument the PC must have a VXI-11 client implementation either as part of the controller program or using a third party software package on the controlling PC. The examples in Appendix A of this manual are written using National Instruments’ NI-VISA™ product.
Command Structure
Format
The Master™ product line implements a remote interface based on the 1999 SCPI Standard. This is an ASCII-based command set.
Some basic details are described below. For a more detailed description see the SCPI Standard, available for download on the SCPI Consortium website.
Command Tree
SCPI commands are organized in a “tree” structure. The base of the tree is called the “root”. The “branches” are the functional subsystems. Each “branch” can have sub-branches. The final node is called the “leaf”. The entire sequence of branches, plus the leaf, make up the command. For example, part of the “SENSe” branch looks like this:
[:SENSE]
:FREQuency
:CENTer
:STARt
:STOP
:SPAN
:FULL
:PREVious
Although they are at different levels in the tree, “CENTer” and “FULL” are both leaves on the tree.
There can be branches and leaves in the tree with the same name as long as they appear at different levels. For example, there is an “AUTO” leaf at the tip of both of these branches:
Subsystems
A colon (‘:’) separates each subsystem. For example, the command :SENSe:FREQuency:STARt <freq> sets the start frequency. The start frequency is part of the :FREQuency subsystem which is part of the :SENSe subsystem. Stop frequency is also part of the :SENSe:FREQuency subsystem. It is specified by :SENSe:FREQuency:STOP.
Optional Subsystems
One subsystem at each “tree” level can be specified as optional. That is, the optional subsystem does not need to be specified to create a valid command. For example, if the specification is written as [:SENSe]:FREQuency:STARt, the :SENSe subsystem is optional. So, both :SENS:FREQ:STAR and :FREQ:START are valid commands and will have the same result.
Long Format vs. Short Format
Each keyword has a long format and a short format. The start frequency can be specified by :SENSe:FREQuency:STARt or :SENS:FREQ:STAR. The capital letters in the command specification indicate the short form of the command.
Only the short form and the long form are acceptable. For example, :SENS:FREQuen:STA is not an acceptable form of the command.
Case Sensitivity
Commands are not case sensitive. For example, :SENS:FREQ:STAR 1 MHZ and :sens:freq:star 1 mhz will have the same result.
Parameters
The command and its parameters are separated by a space. Parameters may be specified with optional units, depending on the command.
For example,
:SENS:FREQ:STAR 1 MHZ sets the start frequency to 1 MHz.
Multiple parameters are separated by a comma (“,”).
Query Format
Many commands have a query format that will return a parameter value or other data. For example, :SENS:FREQ:STAR? will return the current value of the start frequency.
Combining Multiple Commands
Multiple commands can be sent together if separated by a semi-colon (‘;’). For example, :SENSe:FREQ:STAR 1MHZ;:SENSe:FREQ:STOP 2 MHZ would set the start frequency to 1 MHz and then set the stop frequency to 2 MHz.
Creating Valid Commands
Command Terminators
The <new line> character (ASCII 10) in the last data byte of a command string is used as a command terminator. Use of a command terminator will reset the command path to the root of the tree.
 

Copyright 2011 Anritsu Company
Anritsu Company
1800-ANRITSU
10450-00034, Rev. A
mmdtechpubs@anritsu.com