Operating instructions

Introduction To Programming
21
Figure 3-3. What the Semicolon Does
Note There is no single command to move the parser back two colons. In example a above, backing up from
Level 2 to Level 1 requires a return to the root.
Getting Back to the Root
To go from a command in one branch to a command in another branch, you must first return to the root. You can do this by:
entering a new-line character. This is symbolized by (<nl>) and can be any control character that starts a new line, such
as:
linefeed (LF).
an end-of-line (EOI).
entering a semicolon followed by a colon (;:). This instructs the parser to return to the root.
Looking at Figure 4-2 in the Language Dictionary, suppose you wanted to set two trigger levels; the CURRent level to 15.5
and the VOLTage level to 25.5. Either of the following commands would do this.
CURR:TRIG 15.5 < nl >
VOLT:TRlG 25.5 < nl >
or
CURR:TRIG 15.5;:VOLT:TRlG 25.5 < nl >
Similarly, the following query would return the present values of current, power, and voltage and the state of the output port.
MEAS:CURR?;POW?;VOLT?;:PORT0? < nl >
Note The < nl > notation is assumed and will be omitted in later programming examples.