1 scpi programming, 2 scpi messages, 3 common commands/queries – KEPCO KLP Series Developer's Guide, Rev 1 User Manual

Page 81: 4 scpi subsystem command/query structure, 1 display subsystem, 2 trigger subsystem, Ion 6, Section 6), 6, pro- gramming the klp using scpi commands

Advertising
background image

KLP-DEV 031113

6-1

SECTION 6 - PROGRAMMING THE KLP USING SCPI COMMANDS

6.1

SCPI PROGRAMMING

SCPI (Standard Commands for Programmable Instruments) is a programming language con-
forming to the protocols and standards established by IEEE 488.2 (reference document ANSI/
IEEE Std 488.2, IEEE Standard Codes, Formats, Protocols, and Common Commands
). SCPI com-
mands are sent to the KLP Power Supply as ASCII output strings within the selected program-
ming language (PASCAL, C, BASIC, etc.) in accordance with the manufacturer’s requirements
for the particular GPIB controller card used.

Different programming languages (e.g., BASIC, C, PASCAL, etc.) have different ways of repre-
senting data that is to be put on the control bus. It is up to the programmer to determine how to
output the character sequence required for the programming language used. If the IEEE 488.2
(GPIB) control bus is used, address information (GPIB address) must be included before the
command sequence. (See PAR.7.2.1 to establish the KLP Power Supply GPIB address.)

6.2

SCPI MESSAGES

There are two kinds of SCPI messages: program messages from controller to power supply,
and response messages from the power supply to the controller. Program messages consist of
one or more properly formatted commands/queries and instruct the power supply to perform an
action; the controller may send a program message at any time. Response messages consist of
formatted data; the data can contain information regarding operating parameters, power supply
state, status, or error conditions.

6.3

COMMON COMMANDS/QUERIES

Common commands and queries are defined by the IEEE 488.2 standard to perform overall
power supply functions (such as identification, status, or synchronization) unrelated to specific
power supply operation (such as setting voltage/current). Common commands and queries are
preceded by an asterisk (*) and are defined and explained in Appendix A. Refer also to syntax
considerations (PARs 6.5 through 6.7).

6.4

SCPI SUBSYSTEM COMMAND/QUERY STRUCTURE

Subsystem commands/queries are related to specific power supply functions (such as setting
output voltage, current limit, etc.) Figure 6-2 is a tree diagram illustrating the structure of SCPI
subsystem commands used in the KLP Power Supply with the “root” at the left side, and specific
commands forming the branches. The following paragraphs introduce the subsystems; sub-
system commands are defined and explained in Appendix B.

6.4.1

DISPLAY SUBSYSTEM

This subsystem returns the character string displayed in the Status display.

6.4.2

TRIGGER SUBSYSTEM

This subsystem enables the trigger system. When an internal trigger is enabled, the triggering
action will occur upon receipt of a GPIB <GET>, *TRG or TRIGger command. When an external
trigger is enabled, the triggering action occurs when a ground is applied to J2, pin 14. If a trigger
circuit is not enabled, all trigger commands are ignored. Abort sets the trigger subsystem to the
ready-to-arm state.

Advertising