beautypg.com

4 program message structure, Figure 3-19. message structure, 1 keyword – KEPCO BOP 1KW-MG Operator Manual, Firmware Ver.3.05 to 4.07 User Manual

Page 124: Program message structure -60, Keyword -60, 19 message structure -60

background image

3-60

BOP HIPWR 031912

3.6.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. The message terminator is not part of the syntax; it
is defined by the way your programming language indicates the end of a line (“newline” charac-
ter). Sending a character with EOL line asserted is another way of sending a message termina-
tor. The message unit is a keyword consisting of a single command or query word followed by a
message terminator (e.g., CURR? or TRIG). The message unit may
include a data parameter after the keyword separated by a space; the parameter is usually
numeric (e.g., CURR 5), but may also be a string (e.g., OUTP ON). Figure
3-19 illustrates the message structure, showing how message units are combined. The follow-
ing 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.

FIGURE 3-19. MESSAGE STRUCTURE

3.6.4.1

KEYWORD

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

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
short form only the first three or four letters of the long form are used (e.g., STAT, VOLT, OUTP,
and TRIG). The rules governing short form keywords are presented in Table 3-21.

CURR:LEV 3.5;:OUTP ON;:CURR?

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