Figure 3-5. message structure, 4 program message structure, 1 keyword – KEPCO BHK-MG 40W (Half Rack) Series User Manual

Page 70: Program message structure -26, Keyword -26, Message structure -26

Advertising
background image

3-26

BHK-1/2-MG 121313

FIGURE 3-5. MESSAGE STRUCTURE

3.7.4

PROGRAM MESSAGE STRUCTURE

SCPI program messages (commands from controller to power supply) consist of one or more
message units ending in a message terminator (required by Kepco power modules). The message
terminator is not part of the syntax; it is defined by the way your programming language indi-
cates the end of a line (“newline” character). The message unit is a keyword consisting of a sin-
gle command or query word followed by a message terminator (e.g., CURR?<newline> or
TRIG<end-of-line>). The message unit may include a data parameter after the keyword sepa-
rated by a space; the parameter is usually numeric (e.g., CURR 5<newline>), but may also be a
string (e.g., OUTP ON<newline>). Figure 3-5 illustrates the message structure, showing how
message units are combined. The following subparagraphs explain each component of the
message structure.

NOTE: An alternative to using the message structure for multiple messages defined in the fol-

lowing paragraphs is to send each command as a separate line. In this case each com-
mand must use the full syntax shown in Appendix B.

3.7.4.1

KEYWORD

Keywords are instructions recognized by a decoder within the BHK-MG, referred to as a
“parser.” Each keyword describes a command function; all keywords used by the BHK-MG are
listed in Figure 3-4.

Each keyword has a long form and a short form. For the long form the word is spelled out com-
pletely (e.g. STATUS, OUTPUT, VOLTAGE, and TRIGGER are long form keywords). For the

CURR:LEV 3.5;:OUTP ON;:CURR?<NL>

MESSAGE TERMINATOR

KEYWORD

QUERY INDICATOR

ROOT SPECIFIER

MESSAGE UNIT SEPARATOR

DATA

KEYWORD

KEYWORD

KEYWORD SEPARATOR

KEYWORD

MESSAGE UNIT SEPARATOR

DATA

MESSAGE UNIT

DATA SEPARATOR

DATA SEPARATOR

ROOT SPECIFIER

Advertising