7 root specifier, 8 message terminator, 5 understanding the command structure – KEPCO BHK-MG 200W (Full Rack) Series User Manual
Page 73: Root specifier -29, Message terminator -29, Understanding the command structure -29

BHK-MG (OPR) 022014
3-29
3.5.4.7
ROOT SPECIFIER
The root specifier is a colon (:) that precedes the first keyword of a program message. This
places the parser at the root (top left, Figure 4-3) of the command tree. Note the difference
between using the colon as a keyword separator and a root specifier in the following examples:
VOLT:LEV:IMM 16 Both colons are keyword separators.
:CURR:LEV:IMM 4 The first colon is the root specifier, the other two are keyword separators.
VOLT:LEV 6;:CURR:LEV 15 The second colon is the root specifier, the first and third are key-
word separators
:INIT ON;:TRIG;:MEAS:CURR?;VOLT? The first three colons are root specifiers.
3.5.4.8
MESSAGE TERMINATOR
The message terminator defines the end of a message. One message terminator is permitted:
• new line (
NOTE: Kepco power supplies require a message terminator at the end of each program mes-
sage. The examples shown in this manual assume a message terminator will be added
at the end of each message. Where a message terminator is shown it is represented
as
3.5.5
UNDERSTANDING THE COMMAND STRUCTURE
Understanding the command structure requires an understanding of the subsystem command
tree illustrated in Figure 3-5. The “root” is located at the top left corner of the diagram. The
parser goes to the root if:
• a message terminator is recognized by the parser
• a root specifier is recognized by the parser
Optional keywords are enclosed in brackets [ ] for identification; optional keywords can be omit-
ted and the power supply will respond as if they were included in the message. The root level
keyword [SOURce] is an optional keyword. Starting at the root, there are various branches or
paths corresponding to the subsystems. The root keywords for the BHK-MG Power Supply are
:ABORt, :CALibrate, :DISPlay, :INITiate, :LIST, :MEASure, :OUTPut, [:SOURce], :STATus,
:SYSTem and :TRIGger. Because the [SOURce] keyword is optional, the parser moves the path
to the next level, so that VOLTage, CURRent, and FUNCtion commands are at the root level.
Each time the parser encounters a keyword separator, the parser moves to the next indented
level of the tree diagram. As an example, the STATus branch is a root level branch that has
three sub-branches: OPERation, PRESet, and QUEStionable. The following illustrates how
SCPI code is interpreted by the parser:
STAT:PRES
STAT:OPER?;PRES
by the colon in front of OPER?. Thus you can combine the following message units
STAT:OPER? and STAT:PRES;