6517B-900-01 Rev. A / Jun 2008 Return to Section Topics 5-7
Model 6517B Electrometer User’s Manual Section 5: Remote Operation
Query commands
With few exceptions, every SCPI command has a corresponding query. A command sets a control 
point in the instrument; a query determines the present setting of the control point. The query is 
simply the command name with a question mark (?) attached.
Some commands are actions rather than control poin
t settings. These commands have no query 
form. For example,
SENSe1:VOLTage[:DC]:REFerence:ACQuire
is an action command, not a setting, and so has no query form.
There are some queries that have no 
corresponding command. For example, SENSe1:DATA? 
causes the instrument to return the latest reading. Of course, there is no corresponding command 
to send a reading value to the instrument.
Default nodes
SCPI uses the concept of default nodes. Consider the example command tree shown previously in 
Figure 5-2. What is within square brackets is not necessary to send to the instrument, but the 
instrument will accept it if you 
send it. Consider the :UPPer command, which sets the 
measurement range. To set the Model 6517B to measure 15VDC, any of the following commands 
works:
SENSe1:VOLTage[:DC]:RANGe:UPPer 15
SENSe:VOLTage[:DC]:RANGe:UPPer 15
SENSe1:VOLTage[:DC]:RANGe 15
VOLTage[:DC]:RANGe:UPPer 15
VOLTage[:DC]:RANGe 15
These are shown in long form, but short forms could also be used.
Command syntax
Notice in the preceding examples that there is no colon character at the beginning of the 
commands. A leading colon instructs the Model 6517B to interpret the command starting at the 
root (highest level) of the command tree. Since the Model 6517B also starts at the root each time 
you send it a new command, the leading colon is not needed (although the instrument will accept it 
if you send it).
You can send multiple commands in a single messag
e. Separate the commands with a semicolon 
character. When the Model 6517B encounters a command following a semicolon, it attempts to 
interpret the command starting at the level of the previous command, unless you precede the 
second command with a colon. For example, either of the following command strings programs 
the Model 6517B to the 20V range and uses 5V as a relative value (with the REFerence 
commands):
volt[:dc]:rang 20;ref 5;ref:stat on
volt[:dc]:rang 20;:volt[:dc]:ref 5;:volt[:dc]:ref:stat on
The two command strings are treated identically by the Model 6517B. In the first string when the 
instrument encounters ";ref 5", it notices the following:
  • It is not the first command in the string
  • There is no leading colon on the command
  • The previous command was at the VOLTage[:DC] level
Therefore, it interprets the co
mmand as if it were at the VOLTage[:DC] level.
Test Equipment Depot - 800.517.8431 - 99 Washington Street Melrose, MA 02176 
TestEquipmentDepot.com