beautypg.com

4 program message structure, 1 keyword, 2 keywords for dual units – KEPCO EL Series Electronic Load Operator Manual P/N 243-1295 Firmware Version 3.22 through 3.41 User Manual

Page 47: 3 keyword separator, 4 query indicator, 5 data, 6 data separator, Program message structure -13, Keyword -13, Keywords for dual units -13

background image

SERIES EL 062011

3-13

3.13.4

PROGRAM MESSAGE STRUCTURE

SCPI program messages (commands from controller to load) 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” must be
defined as CR (0D

H

) followed by LF (0A

H

). The message unit is a keyword consisting of a single

command or query word followed by a message terminator (e.g., CURR? or
INPut). 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), but may also be a
string (e.g., OUTP ON). The following subparagraphs explain each component of the
message structure.

Each command must use the full syntax shown in Appendix B. Each command must be a sepa-
rate line.

3.13.4.1 KEYWORD

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

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 and VOLTAGE are long form keywords). For the short form only
the first three or four letters of the long form are used (e.g., STAT, OUTP and VOLT). Figure 3-3
shows the short form keywords; both short and long form keywords are found in Appendix B.

3.13.4.2 KEYWORDS FOR DUAL UNITS

Keywords sent to dual units must identify which load is to be controlled. This is done by adding
a 1 (for unit A) or 2 (for unit B) to the root keyword. This means that the root keyword is
required for dual units. For example, SOUR1:MEAS:VOLT;SOUR2:MEAS:CURR reports volt-
age from unit A and current from unit B. If the root keyword is not included, or the unit number is
not specified, unit A is automatically selected.

3.13.4.3 KEYWORD SEPARATOR

If a command has two or more keywords, adjacent keywords must be separated by a colon (:)
which acts as the keyword separator (e.g., SOUR:MEAS:VOLT).

3.13.4.4 QUERY INDICATOR

The question mark (?) following a keyword is a query indicator. This changes the command into
a query. If there is more than one keyword in the command, the query indicator follows the last
keyword. (e.g., VOLT? and MEAS:CURR?).

3.13.4.5 DATA

Some commands require data to accompany the keyword either in the form of a numeric value
or character string. Data always follows the last keyword of a command or query (e.g.,
SOUR:VOLT:LEV 100 or LOCK OFF.

3.13.4.6 DATA SEPARATOR

Data must be separated from the last keyword by a space (e.g., SOUR:VOLT:LEV 100 or
LOCK OFF).