7 scpi program example, 7 enhanced operation, Scpi program example -21 – KEPCO BIT 4886 Operator Manual User Manual

Page 55: Enhanced operation -21

Advertising
background image

BIT 4886 120413

4-21

units separated by a colon (:) followed by a message terminator. Several message units
of a program message may be separated by a semicolon (;) without repeating the root
keyword.

• If a program message has more than one message unit, then a colon (:) must precede

the next keyword in order to set the parser back to the root (otherwise the next keyword
will be taken as a subunit of the previous message unit).

e.g., the command

meas:volt?;curr?

will read output voltage and output current

since both

volt?

and

curr?

are interpreted as subunits of the

meas

command.

• Several commands may be sent as one message; a line feed terminates the message.

Commands sent together are separated by a semicolon (;). The first command in a mes-
sage starts at the root, therefor a colon (:) at the beginning is not mandatory.

e.g., the command

meas:volt?;curr?

will read output voltage and output current,

however the command

meas:volt?;:curr?

will read actual output voltage and pro-

grammed current since the colon preceding curr? indicates that

curr?

is not part of the

meas

command and starts at the root.

• UPPER case letters in mnemonics are mandatory (short form). Lower case letters may

either be omitted, or must be specified completely (long form)
e.g.,

INSTrument

(long form) has the same effect as

INST

(short form).

• Commands/queries may be given in upper/lower case (long form)

e.g.,

SoUrCe

is allowed.

• Text shown between brackets [] is optional.

e.g.,

[SOUR:]VOLT[:LEV]:TRIG

has the same effect as

VOLT:TRIG

4.6.7

SCPI PROGRAM EXAMPLE

Figure 4-7 is an example of a program written in C using SCPI commands to program a BOP
Power Supply. The program illustrated is for a configuration using a National Instruments GPIB
interface card. (It will be necessary to consult the manufacturer’s data to achieve comparable
functions with an interface card from a different manufacturer.) This program sets output voltage
(Voltage mode) or voltage limit (Current mode) to 5V, and current limit (Voltage mode) or output
current (Current mode) to 1A, then reads the measured (actual) voltage and current, then prints
the measurements.

4.7

ENHANCED OPERATION

The following paragraphs describe options that will permanently modify the behavior of the BIT
4886 and associated BOP power supply. Although these options use SCPI commands, they are
not intended to be used during normal programming of the BOP output.

The commands described in the following paragraphs affect only RAM variables. The power up
state of the variables is retrieved from the FLASH EEPROM. The command MEMORY:UPDATE
can be used to copy this RAM information to the FLASH EEPROM. The WINDOW variable is
stored using the command MEM:UPDATE SHUTDOWN and the other variables, including the
DIAG:SAV command, use the command MEMORY:UPDATE INTERFACE

Advertising