5 understanding the command structure, 6 program message syntax summary, Understanding the command structure -20 – KEPCO BIT 4886 Operator Manual User Manual
Page 54: Program message syntax summary -20
![background image](/manuals/367872/54/background.png)
4-20
BIT 4886 120413
• carriage return (
), ASCII 13 (decimal) or 0D (hex)
• both of the above (
). If both are sent, the second is null and has no effect.
Your GPIB interface card software will automatically send a message terminator. For example,
the HP BASIC OUTPUT statement inserts
after the last data byte. When binary data is
exchanged,
must be used. The combination
terminator can be used for all
data except binary data.
NOTE: Kepco power modules 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
regardless of the actual terminator character.
4.6.5
UNDERSTANDING THE COMMAND STRUCTURE
Understanding the command structure requires an understanding of the subsystem command
tree illustrated in Figure 4-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
omitted 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 Interface Card
are
:INITiate
,
:MEASure
,
:OUTPut
,
[:SOURce]
,
:STATus
, and
:SYSTem
. 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
STAT
. The next command is expected at the level defined
by the colon in front of
OPER?
. Thus you can combine the following message units
STAT:OPER?
and
STAT:PRES;
STAT:OPER:COND?;ENAB 16
OPER:COND?
message unit, the parser moves in one level from
OPER
, allowing the
abbreviated notation for
STAT:OPER:ENAB
.
4.6.6
PROGRAM MESSAGE SYNTAX SUMMARY
• Common commands begin with an asterisk (*).
• Queries end with a question mark (?).
• Program messages consist of a root keyword and, in some cases, one or more message