Model 2110 5½ Digit Multimeter Reference Manual
Section 5: Remote commands
2110-901-01 Rev. C/August 2013
5-11
Single command messages
The above command structure has three levels. The first level is made up of the root command
(:STATus) and serves as a path. The second level is made up of another path (:QUESTionable) and
a command (:PRESet). The third level of the structure is occupied by the ENABle and EVENt
commands. The commands in this structure can be executed by sending four separate program
messages as follows:
:stat:ques:enab <NRf>
:stat:ques:enab?
:stat:ques:even?
:stat:pres
In each of the above program messages, the path pointer starts at the root command (:stat) and
moves down the command levels until the command is executed.
Multiple command messages
You can send multiple command messages in the same program message as long as they are
separated by semicolons (;). The following example shows two commands in one program message:
:stat:pres; :stat:ques:enab <NRf>
When the above message is sent, the first command word is recognized as the root command (:stat).
When the next colon is detected, the path pointer moves down to the next command level and
executes the command. When the path pointer sees the colon after the semicolon (;), it resets back to
the root level and starts over.
Commands that are on the same command level can be executed without having to retype the entire
command path. For example:
:stat:ques:enab <n>; enab?
After the first command (:enab) is executed, the path pointer is at the third command level in the
structure. Since :enab? is also on the third level, it can be typed in without repeating the entire path
name. Notice that the leading colon for :enab? is not included in the program message. If a colon
were included, the path pointer would reset to the root level and expect a root command. Since
:enab? is not a root command, an error would occur.
Command path rules
•
Each new program message must begin with the root command, unless it is optional (for
example, [:SENSe]). If the root is optional, simply treat a command word on the next level as the
root.
•
The colon (:) at the beginning of a program message is optional and need not be used. For
example, the following two lines of code are equivalent:
:stat:pres
stat:pres
•
When the path pointer detects a colon (:) it moves down to the next command level. An exception
is when the path pointer detects a semicolon (;), which is used to separate commands within the
program message (see next rule).
•
When the path pointer detects a colon (:) that immediately follows a semicolon (;), it resets back
to the root level.
•
The path pointer can only move down. It cannot be moved up a level. Executing a command at a
higher level requires that you start over at the root command.