Introduction to Programming 2
Keysight Models 6811C, 6812C, and 6813C Programming Guide 39
The effect of optional headers
If a command includes optional headers, the interface assumes they are there. For
example, if you enter OUTPut OFF, the interface recognizes it as OUTPut:STATe
OFF. This returns the active path to the root (:OUTPut). But if you enter
|OUTPut:STATe OFF,| then the active path remains at :STATe. This allows you to
send
OUTPut:STATe OFF;PROTection:CLEar
in one message. If you tried to send
OUTPut OFF;PROTection:CLEar
the header path would return to :OUTPut instead of :PROTection.
The optional header [SOURce] precedes the current, frequency, function, phase,
pulse, list, and voltage subsystems. This effectively makes :CURRent,
:FREQuency, :FUNCtion, :PHASe, :PULse, :LIST, and :VOLTage root-level
commands.
Moving among subsystems
In order to combine commands from different subsystems, you need to be able to
restore the active path to the root. You do this with the root specifier (:). For
example, you could clear the output protection and check the status of the
Operation Condition register as follows:
OUTPut:PROTection:CLEAr
STATus:OPERation:CONDition?
Because the root specifier resets the command parser to the root, you can use the
root specifier and do the same thing in one message:
OUTPut:PROTection:CLEAr;:STATus:OPERation:CONDition?
The following message shows how to combine commands from different
subsystems as well as within the same subsystem:
VOLTage:LEVel 70;PROTection 80;:CURRent:LEVel 3;PROTection:STATe
ON
Note the use of the optional header LEVel to maintain the correct path within the
voltage and current subsystems and the use of the root specifier to move between
subsytems.