1)This manual is valid for the following Model and associated serial numbers:
MODELSERIAL NO.REV. NO.
2)A Change Page may be included at the end of the manual. All applicable changes and
revision number changes are documented with reference to the equipment serial numbers. Before using this Instruction Manual, check your equipment serial number to
identify your model. If in doubt, contact your nearest Kepco Representative, or the
Kepco Documentation Office in New York, (718) 461-7000, requesting the correct
revision for your particular model and serial number.
3)The contents of this manual are protected by copyright. Reproduction of any part can
be made only with the specific written permission of Kepco, Inc.
KEPCO, INC. 131-38 SANFORD AVENUE FLUSHING, NY. 11352 U.S.A. TEL (718) 461-7000 FAX (718) 767-1102
THE POWER SUPPLIER™
TABLE OF CONTENTS
SECTIONPAGE
SECTION 1 - INTRODUCTION
1.1 Scope of Manual ..................................................................................................................................... 1-1
1.2 General Description................................................................................................................................. 1-1
1.3 Specifications, BIT 232/BIT 232-F........................................................................................................... 1-1
4.4.4.4 Data ............................................................................................................................................. 4-6
4.4.4.5 Data Separator............................................................................................................................. 4-6
4.4.4.6 Message Unit Separator .............................................................................................................. 4-6
F.2Open Serial Port Using ROM BIOS Routine ............................................................................................F-1
F.3Put Character to Serial Port .....................................................................................................................F-1
F.4Send, Wait for Echo .................................................................................................................................F-2
F.5Get Character from Serial Port ................................................................................................................ F-2
F.6Check to See If a Character Was Received ............................................................................................ F-3
1-1 Remotely Controlled Power Supply Configurations Using Kepco Products............................................... vi
2-1 Installation of BIT Card into BOP ................................................................................................................ 2-2
2-2 BIT 232/BIT 232-F Switch and Adjustment Locations ................................................................................ 2-4
3-1 BOP Power Supply, Internal Calibration Control Locations........................................................................ 3-2
3-2 Current Shunt Connections......................................................................................................................... 3-5
4-1 Tree Diagram of SCPI Commands Used with BIT 232/BIT 232-F Interface Card ...................................... 4-3
B-4 MEASure:CURRent? and MEASure:VOLTage? Queries........................................................................... B-3
B-5 CURRent Command .................................................................................................................................. B-4
B-6 CURRent Query......................................................................................................................................... B-4
B-9 VOLTage Command ................................................................................................................................... B-6
B-10 VOLTage Query.......................................................................................................................................... B-6
C-4 SET Command .......................................................................................................................................... C-3
C-6 CNF, IST — Confidence Test, Internal Self Test Commands.................................................................... C-4
C-7 STA — Status Command........................................................................................................................... C-5
C-8 GAL — Go to Alternate Language Command .......................................................................................... C-6
BIT 232 022800
iii/iv Blank)
LIST OF TABLES
TABLETITLEPAGE
1-1 Kepco BIT 232, 488 and 4882 Digital Programming Cards ........................................................................1-1
1-2 Applicability of BIT Interface Cards to Specific BOP Models ......................................................................1-2
1-3 Specifications, BIT 232 and BIT 232-F .......................................................................................................1-2
2-1 Power Supply Identification Switch S2 Setting ...........................................................................................2-4
3-1 BOP Power Supply, Internal Calibration Controls .......................................................................................3-3
4-1 SCPI Command Index ................................................................................................................................4-4
D-1 ROM BIOS Routines to be replaced with equivalent for non-IBM-PC-compatible PC’s ............................ D-1
E-1 ROM BIOS Routines to be replaced with equivalent for non-IBM-PC-compatible PC’s ............................ E-1
BIT 232 022800
v
FIGURE 1-1. REMOTELY CONTROLLED POWER SUPPLY CONFIGURATIONS USING KEPCO PRODUCTS
vi
BIT 232 022800
SECTION 1 - INTRODUCTION
1.1SCOPE OF MANUAL
This manual contains instructions for the installation, operation and maintenance of the BIT
232 and BIT 232-F Interface Cards manufactured by Kepco, Inc., Flushing, NY, U.S.A. References to “BIT Card” refer to both models.
1.2GENERAL DESCRIPTION
The Kepco BIT Card Series were designed as an accessory for the Kepco BOP series bipolar
power supplies. The BIT cards make it possible to control the BOP output by means of digital
input signals (see Figure 1-1). The BIT card acts as an interface between the digital data bus
and the BOP, accepting the digital input data and converting it to an analog signal, which in
turn, controls the BOP output. The BIT 232 provides RS232 communication capability. It is
fully compliant with SCPI and CIIL high level programming languages.
The BIT design group consists of five models. Field installable interface cards carry the prefix
“BIT”. BOP bipolar power supplies with an installed BIT card carry the suffixes shown in Table
1-1.
TABLE 1-1. KEPCO BIT 232, 488 AND 4882 DIGITAL PROGRAMMING CARDS
FIELD INSTALLABLE
PROGRAMMING
CARD MODEL
BIT 232 (See Table 1-2)
BIT 232-F (See Table 1-2)
BIT 488-B-488-BBYTE-SERIAL
BIT 488-D-488-DBYTE-SERIAL
BIT 4882 (See Table 1-2)
BIT 4882-F (See Table 1-2)
BIT TMA-27-TMA2-WIRE-SERIAL
FACTORY
INSTALLED
PROGRAMMING
CARD BOP SUFFIX
-232
-4882BYTE-SERIAL
INPUT CODING
SERIAL:
8 DATA BITS,
NO PARITY BIT
1 STOP BIT
MAIN
CHANNEL
12 BITS
(BINARY)
3-DIGIT
(BCD)
12 BITS
(BINARY)
12 BITS
(BINARY)
Except for the installation procedures, the BIT 232 and 232-F cards are identical. The BIT
232F includes a replacement transformer needed to modify earlier BOP Models indicated in
Table 1-2.
1.3SPECIFICATIONS, BIT 232/BIT 232-F (SEE TABLE 1-3)
RESOLUTION
LIMIT
CHANNEL
––
8 BITS
(BINARY)
2-DIGIT
(BCD)
12 BITS
(BINARY)
12 BITS
(BINARY)
RS 232-C BUS
OR GPIB BUS
CONTROL BUS
REMARKS
FOR THE
FOR THE
IEEE-488
KEPCO
Refer to Table 1-3 for BIT 232/BIT 232-F specifications.
1.4ACCESSORIES
The sample programs illustrated in Appendices E through G are available on 3.5 in. diskette,
Kepco P/N 254-0019.
BIT 232 OPR 022800
1-1
TABLE 1-2. APPLICABILITY OF BIT INTERFACE CARDS TO SPECIFIC BOP MODELS
BOP TO BE MODIFIED
MODELREVISION NO.MODELREVISION NO.
1BIT 232-F, BIT 4882-F
20-5M
2 AND LATERBIT 232, BIT 488210 AND LATERBIT 232, BIT 4882
12 TO 16BIT 232-F, BIT 4882-F
20-10M
17 AND LATERBIT 232, BIT 488210 AND LATERBIT 232, BIT 4882
8 TO 14BIT 232-F, BIT 4882-F
20-20M
15 AND LATERBIT 232, BIT 488214 AND LATERBIT 232, BIT 4882
12 TO 18BIT 232-F, BIT 4882-F
36-6M
19 AND LATERBIT 232, BIT 488224 AND LATERBIT 232, BIT 4882
7 TO 12BIT 232-F, BIT 4882-F
36-12M
13 AND LATERBIT 232, BIT 488215 AND LATERBIT 232, BIT 4882
16 TO 20BIT 232-F, BIT 4882-F
50-2M
21 AND LATERBIT 232, BIT 488214 AND LATERBIT 232, BIT 4882
6 TO 12BIT 232-F, BIT 4882-F
50-4M
13 AND LATERBIT 232, BIT 48827 AND LATERBIT 232, BIT 4882
NOTE:For modification of BOP Models with revision numbers that do not appear in this table, contact Kepco for assistance.
APPLICABLE
CARD
BOP TO BE MODIFIED
4 TO 9BIT 232-F, BIT 4882-F
50-8M
5 TO 9BIT 232-F, BIT 4882-F
72-3M
7 TO 13BIT 232-F, BIT 4882-F
72-6M
17 TO 23BIT 232-F, BIT 4882-F
100-1M
10 TO 14BIT 232-F, BIT 4882-F
100-2M
6 TO 13BIT 232-F, BIT 4882-F
100-4M
6 AND EARLIERBIT 232-F, BIT 4882-F
200-1M
APPLICABLE
CARD
TABLE 1-3. SPECIFICATIONS, BIT 232 AND BIT 232-F
SPECIFICATIONDESCRIPTION
OUTPUT VOLTAGE (MAIN CHANNEL)0 ± 10V
OUTPUT VOLTAGE (LIMIT CHANNEL)0 to +10V
OUTPUT CURRENT (EACH CHANNEL)0 to ± 2 mA max.
OUTPUT IMPEDANCE<0.05 ohms
TEMPERATURE COEFFICIENT
OPTICAL ISOLATION
DIGITAL INPUT FORMATSerial, 8 data bits, no parity, 1 stop
POWER REQUIREMENTSupplied by BOP
PRGRAMMING RESOLUTION
DATA READBACK ACCURACY
VOLTAGE
CURRENT
VOLTAGE
CURRENTof Max. Current
Full scale: ± 35 ppm/ °C max
Zero:± 20µV/°C max
Digital and Analog grounds can be separated
by a maximum of 500 Volts.
RATING/DESCRIPTIONCONDITION
0.024%12 Bits
0.2%
of Max. Voltage
1-2
BIT 232 SVC 022800
SECTION 2 - INSTALLATION
2.1UNPACKING AND INSPECTION
The BIT Card has been thoroughly inspected and tested prior to packing and is ready for operation following installation. Unpack, saving original packing material. If any indication of damage
is found, file a claim immediately with the responsible transport service.
2.2SET START-UP DEFAULTS (SEE FIGURE 2-2)
Start-up defaults, consisting of Start-up Language and Power Supply Identification are initially
set by means of DIP switches as described in the following paragraphs.
2.2.1START-UP LANGUAGE DEFAULT (SEE FIGURE 2-2)
DIP switch S1 position 6 sets the Start-up Language Default:
•OFF (0) = SCPI (factory default)
•ON (1) = CIIL
2.2.2SET POWER SUPPLY IDENTIFICATION SWITCH (SEE FIGURE 2-2)
Power Supply Identification switch S2 (Figure 2-2) identifies the BOP model to be controlled by
the BIT Card. Set Switch S2 positions 1 through 6 in accordance with Table 2-1.
2.3INSTALLATION OF BIT CARD INTO THE BOP
Refer to Figure 2-1 to install the BIT 232-F BIT Card.
BIT 232 022800
2-1
NOTE:Step numbers coincide with encircled numbers on Figure 2-1, sheet 2.
Step 1.Disconnect a-c power from BOP by removing line cord.
Step 2.Remove BOP cover (see Section 5, Figure 5-1 of your BOP Instruction Manual).
Step 3.Remove and discard Rear Cover Plate (PN 128-1434) and associated hardware.
Step 4.Remove J204 Connector Assembly (PN 241-0680) from Location #1, save for Step 11.
Step 5.Locate Transformer T202 and note part number (stamped on top):
if PN 100-2167, remove from unit and discard (applicable to BIT 232-F only).
if PN 100-2354, unplug connector from Location #4 only.
Step 6.Locate Rear Bracket and note part number (stamped on outside left edge)
if PN 128-1566, remove and discard, replace with Bracket noted in Step 9.
Step 7.Unpack the BIT Card Installation Components
BIT 232-F: (Transformer, PCB Assembly, Cables #1 and #2, Connector Assembly, three
(3) Knurled Nuts, five (5) washers, Spacer and Bracket).
BIT 232:PCB Assembly, Cables #1 and #2, Connector Assembly, three (3) Knurled
Nuts, five (5) washers, Spacer and Bracket).
Step 8.BIT 232-F only: Mount Transformer T202 (PN 100-2354) if required (ref. Step 5, above).
Affix revised “Control Identification” label (PN 188-1826) and “Address Label” (PN
188-1726) in vacated positions (with part numbers facing front panel).
Step 17. Affix “Connector Identification” label (PN 188-1912) to rear bracket (PN 188-1810) between
rear programming connector and Interface Card (see Detail C).
Step 18. Reinstall BOP cover.
Step 19. Perform calibration procedure detailed in Section 3 of this manual.
2-2
FIGURE 2-1. INSTALLATION OF BIT CARD INTO BOP (SHEET 1 OF 2)
BIT 232 022800
FIGURE 2-1. INSTALLATION OF BIT CARD INTO BOP (SHEET 2 OF 2).
BIT 232 022800
2-3
FIGURE 2-2. BIT 232/BIT 232-F SWITCH AND ADJUSTMENT LOCATIONS
TABLE 2-1. POWER SUPPLY IDENTIFICATION SWITCH S2 SETTING
2-4
MODEL
BOP 50-2M00000000
100-1M10000001
20-10M01000002
36-6M11000003
50-4M00100004
72-3M10100005
100-2M01100005
20-20M11100007
36-12M00010008
50-8M10010009
72-6M0101000A
100-4M1101000B
200-1M1011000C
20-5M0111000D
BOP 50-2M00000000
SW#1SW#2SW#3SW#4SW#5SW#6
SELECTOR SWITCH S2 SECTION
HEX
VA LU E
BIT 232 022800
2.4INPUT/OUTPUT SIGNALS
The RS232 port is a standard 9 pin connector (Figure 2-4) conforming to the IBM AT 9-Pin RS
232 Serial Interface. Refer to Table 2-3 for pin assignments.
TABLE 2-2. INPUT/OUTPUT PIN ASSIGNMENTS
PINSIGNAL NAMEFUNCTION
1SGNDSignal Ground
2RXDReceive Data
3TXDTransmit Data
4DTRData Terminal Ready
5SGNDSignal Ground
6DSRData Set Ready
7RTSRequest To Send
8CTSClear To Send
9SGNDSignal Ground
2.5RS 232 CONNECTIONS
Since the BIT Card uses a 9-pin male connector, it is classified as a Data Terminal Equipment
(DTE) in accordance with the RS 232 Standard (equipment using a female connector is classified as Data Communication Equipment, DCE).
Either a DTE to DTE or a null modem cable is required to connect the BIT Card to an IBM-PC
compatible computer. This cable connects RXD at one end to TXD at the other end, DTR at one
end to DSR at the other end, and CTS at one end with RTS at the other end
FIGURE 2-3. RS 232C CONNECTOR
BIT 232 022800
2-5/2-6
SECTION 3 - CALIBRATION
NOTE: The calibration procedures below are for the purpose of recalibration and for the case
where the BIT card is installed by the user. Unless otherwise noted, syntax is in SCPI.
3.1EQUIPMENT REQUIRED
The following is a listing of equipment required for calibration of the BIT Card installed in a
Kepco “BOP” Series Power Supply:
A. Precision digital voltmeter (DVM), 5 digit minimum resolution (suggested).
B. An RS232 compatible Controller, (with appropriate software) connected to BOP Power Sup-
ply with an RS232 cable.
C. Precision four-terminal current shunt (with suitable power rating and tolerance for the cur-
rents to be measured).
3.2ADJUSTMENT OF THE BOP ±10 VOLT CALIBRATION CONTROLS (R31, R32)
NOTE: BOP cover removal required for this procedure.
1. Connect a DVM to the REAR PROGRAMMING CONNECTOR (PC-12); between common
and pin 28 (+10Vdc REFERENCE).
2. Turn the BOP Power Supply “ON” and locate the calibration controls (see Figure 3-1, refer to
Table 3-1). Adjust R31 for +10.000Vdc.
3. Turn the BOP Power Supply “OFF” and connect DVM between common and pin 22 (–10Vdc
REFERENCE).
4. Turn the BOP Power Supply “ON”. Adjust R32 for –10.000Vdc.
5. Turn the BOP Power Supply “OFF”.
3.3ADJUSTMENT OF THE AMMETER ZERO (R50)
1. Without a load connected to the BOP output, connect the DVM to the REAR PROGRAMMING CONNECTOR (PC-12); between COMMON and pin 10.
2. Turn the BOP Power Supply “ON” and locate AMMETER ZERO control R50 (see Figure 3-1,
refer to Table 3-1).
3. Adjust the control for zero, ±100 microvolts.
4. Turn the BOP Power Supply “OFF”.
BIT 232 022800
3-1
FIGURE 3-1. BOP POWER SUPPLY, INTERNAL CALIBRATION CONTROL LOCATIONS
3.4ADJUSTMENT OF THE OUTPUT VOLTAGE ZERO (R81)
1. Without a load connected to the BOP output, connect a DVM between the FRONT PANEL
SENSING TERMINALS of the BOP Power Supply.
2. Turn the BOP Power Supply “ON”, program the BOP Power Supply to ZERO VOLTAGE
AND MAXIMUM CURRENT LIMIT.
3. Locate Eo COMP AMP ZERO control R81 (see Figure 3-1, refer to Table 3-1).
4. Adjust control R81 for zero, ±100 microvolts.
3.5ADJUSTMENT OF THE FULL SCALE OUTPUT VOLTAGE (R21)
1. Program the BOP Power Supply for PLUS FULL SCALE VOLTAGE.
2. Locate VOLTAGE FULL SCALE control R21 (see Figures 2-1 and 3-1, refer to Table 3-1).
3. Adjust control R21 for FULL SCALE VOLTAGE, ±1 millivolt.
4. Program the BOP Power Supply for MINUS FULL SCALE. The output should be NEGATIVE
FULL SCALE ±0.024% (±1 LSB).
3-2
BIT 232 022800
TABLE 3-1. BOP POWER SUPPLY, INTERNAL CALIBRATION CONTROLS
REFERENCE
DESIGNATION
R19VOLTAGE READING
R20CURRENT READING
R21VOLTAGE FULL SCALE
R22CURRENT FULL SCALE
R31, R32( ± ) 10V CAL.
R35VOLTAGE READBACK ZERO
R36CURRENT READBACK ZERO
R50AMMETER ZERO
R81
R83
CONTROL
NAME
EO COMP AMP ZERO
IO COMP AMP ZERO
‘MEASURE’d voltage reading adjustment3.7
‘MEASURE’d current reading adjustment3.11
Full scale output voltage adjustment3.5
Full scale output current adjustment3.9
Reference voltage calibration3.2
Aero output voltage adjustment3.6
Zero output current adjustment3.10
Sensing amplifier offset adjustment3.3
Voltage channel zero adjustment
Current channel zero adjustment
3.6VOLTAGE READING ZERO CALIBRATION (R35)
PURPOSE
ADJUSTMENT
PROCEDURE
(PAR.)
3.4
3.8
1. Program the BOP power supply for ZERO VOLTAGE and MAXIMUM CURRENT LIMIT.
2. ‘MEASURE’ (‘FETCH’ in CIIL syntax) the OUTPUT VOLTAGE of the BOP.
3. Locate VOLTAGE READBACK ZERO control R35 (see Figures 2-1 and 3-1, refer to Table
3-1).
4. Continue to ‘MEASURE’ (‘FETCH’ in CIIL syntax) the VOLTAGE READING while adjusting
control R35 until the ‘MEASUREd’ (‘FETCHed’ in CIIL syntax) value is not 0.0.
5. Continue to ‘MEASURE’ (‘FETCH’ in CIIL syntax) the VOLTAGE READING while adjusting
control R35 until the ‘MEASUREd’ (‘FETCHed’ in CIIL syntax) value is 0.0. Once a stable
value of 0.0 is reached, continue rotating R35 four full (360°) turns in the same direction. Verify VOLTAGE READING is 0.0.
3.7VOLTAGE READING CALIBRATION (R19)
1. Program the BOP Power Supply for PLUS FULL SCALE VOLTAGE, less one percent (verify
by reading external DVM).
NOTE: If the unit is calibrated using CIIL syntax, send the ‘GAL’ command followed by
the ‘FØ ’ switch command.
2. ‘MEASURE’ (‘FETCH’ in CIIL syntax) the OUTPUT VOLTAGE of the BOP Power Supply.
BIT 232 022800
3. Locate VOLTAGE READ. CAL. control R19 (see Figures 2-1 and 3-1, refer to Table 3-1).
3-3
4. Continue to ‘MEASURE’ (‘FETCH’ in CIIL syntax) the VOLTAGE READING while adjusting
control R19, until the ‘MEASUREd’ (‘FETCHed’ in CIIL syntax) value matches the programmed value.
5. Turn the BOP Power Supply “OFF”.
3.8ADJUSTMENT OF THE OUTPUT CURRENT ZERO (R83)
1. With the BOP Power Supply “OFF”, connect a precision current shunt between the FRONT
PANEL OUTPUT TERMINALS.
2. Connect the DVM to the REAR PROGRAMMING CONNECTOR (PC 12); between COMMON and pin 10.
3. Turn the BOP “ON” and program the BOP Power Supply to ZERO CURRENT and MAXIMUM VOLTAGE LIMIT.
4. Locate Io COMP AMP ZERO control R83 (see Figure 3-1, refer to Table 3-1).
5. Adjust control R83 for zero, ±0.5 millivolts.
6. Turn the BOP Power Supply “OFF”.
3.9ADJUSTMENT OF THE FULL SCALE OUTPUT CURRENT (R22)
1. With the BOP Power Supply “OFF”, connect the DVM to the PRECISION 4-TERMINAL
SHUNT (see Figure 3-2)
2. Turn the BOP Power Supply “ON” and program the BOP Power Supply for PLUS FULL
SCALE CURRENT and MAXIMUM VOLTAGE LIMIT.
3. Locate CURRENT FULL SCALE control R22 (see Figures 2-1 and 3-1, refer to Table 3-1).
4. Adjust control R22 for exactly FULL SCALE CURRENT.
5. Program the BOP Power Supply for MINUS FULL SCALE CURRENT. The output should be
NEGATIVE FULL SCALE within ±0.024% (±1 LSB or ±1 mA [which ever is greater] ) of the
POSITIVE VALUE.
3.10CURRENT READING ZERO CALIBRATION (R36)
1. Program the BOP Power Supply for ZERO CURRENT and MAXIMUM VOLTAGE LIMIT.
2. ‘MEASURE’ (‘FETCH’ in CIIL syntax) the OUTPUT CURRENT of the BOP Power Supply.
3. Locate CURRENT READBACK ZERO control R36 (see Figures 2-1 and 3-1, refer to Table
3-1).
4. Continue to ‘MEASURE’ (‘FETCH’ in CIIL syntax) the CURRENT, while adjusting control
R36, until the ‘MEASUREd’ (‘FETCHed’ in CIIL syntax) value is not 0.0.
5. Continue to ‘MEASURE’ (‘FETCH’ in CIIL syntax) the OUTPUT CURRENT while adjusting
control R36 until the ‘MEASUREd’ (‘FETCHed’ in CIIL syntax) value is 0.0. Once a stable
value of 0.0 is reached, continue rotating R36 four full (360°) turns in the same direction. Verify OUTPUT CURRRENT is 0.0.
3-4
BIT 232 022800
FIGURE 3-2. CURRENT SHUNT CONNECTIONS
3.11CURRENT READING CALIBRATION (R20)
1. Program the BOP Power Supply for PLUS FULL SCALE CURRENT, less one percent (verify
by reading external DVM).
NOTE: If the unit is calibrated using CIIL syntax, send the ‘GAL’ command followed by the
‘FØ ’ switch command.
2. ‘MEASURE’ (‘FETCH’ in CIIL syntax) the OUTPUT CURRENT of the BOP Power Supply.
3. Locate CURRENT READ. CAL. control R20 (see Figures 2-1 and 3-1, refer to Table 3-1).
4. Continue to ‘MEASURE’ (‘FETCH’ in CIIL syntax) the CURRENT while adjusting control
R20, until the ‘MEASUREd’ (‘FETCHed’ in CIIL syntax) value matches the programmed
value.
BIT 232 022800
3-5/3-6
4.1GENERAL
The Kepco BOP Power Supply, with an installed BIT 232/BIT 232-F Interface Card, may be programmed over the RS232C bus using either SCPI (Standard Commands for Programmable
Instruments) or CIIL (Control Interface Intermediate Language) commands. SCPI and CIIL provide a common language used in an automatic test system. (Refer to Table 2-3 for input/output
signal allocations.)
4.2RS232-C BUS PROTOCOL
The BIT Card may be operated via an RS232-C terminal, or from a PC using a terminal emulation program. The following settings must be observed:
•Baud rate: 9600
•Parity:None
•Data Bits8
•Stop Bits 1
The above settings are established by the firmware and cannot be changed by the user
although firmware with alternate settings can be ordered. It is recommended that the user program the computer’s serial interface to match the above setting. Refer to PAR. 2.5 for RS232
connections.
SECTION 4 - OPERATION
4.3RS232 IMPLEMENTATION
The following paragraphs are provided to help the user understand how the RS232 interface is
implemented in the BIT 232 and BIT 232-F Interface Cards. Since the RS232 protocol does not
use a parity bit, the echo method is used to ensure reliable communication between the command originator (computer) and the BIT Card, thus avoiding a more complex “handshake” protocol.
When a character is received through the RS232 Interface, the software checks for the backspace character, hex value 08 (08
character is put in a buffer, the buffer pointer is incremented, and it is sent (echoed) back to the
originator. If the backspace character is detected, the buffer pointer is decremented, and three
characters are sent to the originator: Backspace (08
These three characters permit a direct interface with a terminal emulation program, effectively
erasing the last character.
When either a Carriage Return, CR, (0D
is received by the BIT Card, the buffer contents are transferred to the SCPI (PAR.4.4) or CIIL
(PAR. 4.5) parser for analysis and execution of command(s). If the command requires the power
supply to respond, the response message is immediately returned to the command originator
via the RS232 interface.
To inform the command originator that the parsing and execution phases are complete, the BIT
Card returns the following three characters: CR, LF, and > (3E
the “prompt” effect if a terminal emulation program is the command(s) originator.
). If the backspace character is not detected, the received
H
), Blank (20H), and Backspace (08H).
H
decimal value 13, 1310) or Line Feed, LF, (0AH, 1010)
H
, 6210). These characters create
H
BIT 232 022800
4-1
Sample programs provided in Appendices D through G guide the user in setting up a program to
communicate with the BOP via the BIT 232/BIT 232-F Interface Card.
4.4SCPI PROGRAMMING
SCPI (Standard Commands for Programmable Instruments) is a programming language conforming to the protocols and standards established by IEEE 488.2 (reference document
IEEE Std 488.2, IEEE Standard Codes, Formats, Protocols, and Common Commands
mands are sent to the BIT Card as output strings within the selected programming language
(PASCAL, BASIC, etc.) in accordance with the manufacturer’s requirements for the particular
interface card used.
Different programming languages (e.g., BASIC, C, PASCAL, etc.) have different ways of representing data that is to be put on the RS232C bus. It is up to the programmer to determine how to
output the character sequence required for the programming language used. Address information must be included before the command sequence.
4.4.1SCPI 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.
ANSI/
). SCPI com-
4.4.2COMMON 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 (see Table 4-4). Refer
also to syntax considerations (PARs 4.4.3 through 4.4.6).
4.4.3SCPI SUBSYSTEM COMMAND/QUERY STRUCTURE
Subsystem commands/queries are related to specific power supply functions (such as setting
output voltage, current limit, etc.) Figure 4-1 is a tree diagram illustrating the structure of SCPI
subsystem commands used in the BIT Card with the “root” at the left side, and specific commands forming the branches. The subsystem commands are defined and explained in Appendix
B (see Table 4-4).
4-2
BIT 232 022800
ROOT : (colon)
INITiate
[:IMMediate]
:CONTinuous
MEASure
:CURRent?
:VOLTage?
[SOURce:]
VOLTage
[:LEVel]
[:IMMediate]
:TRIGgered
CURRent
[:LEVel]
[:IMMediate]
:TRIGgered
FUNCtion
:MODE
STATus
:OPERation
:CONDition?
:ENABle
[:EVENt]?
:PRESet
:QUEStionable
:CONDition?
:ENABle
[:EVENt]?
SYSTem
:ERRor?
:LANGuage
FIGURE 4-1. TREE DIAGRAM OF SCPI COMMANDS USED WITH BIT 232/BIT 232-F INTERFACE CARD
4.4.4PROGRAM 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 indicates the end of a line (such as a “newline” or “end-of-line” character). The message unit is a
keyword consisting of a single 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 separated 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 4-2 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 command must use the full syntax shown in Appendix B.
4.4.4.1KEYWORD
Keywords are instructions recognized by a decoder within the BIT Card, referred to as a
“parser.” Each keyword describes a command function; all keywords used by the BIT Card are
listed in Figure 4-1.
Each keyword has a long form and a short form. For the long form the word is spelled out completely (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 4-5.
BIT 232 022800
4-3
TABLE 4-1. SCPI COMMAND INDEX
COMMANDPAGECOMMANDPAGE
*CLSA-1[SOUR]:CURR?B-5
*ESEA-2[SOUR]:CURR:TRIGB-6
*ESE?A-2[SOUR]:CURR:TRIG?B-6
*ESR?A-3[SOUR]:VOLTB-7
*IDN?A-3[SOUR]:VOLT?B-7
*OPCA-4[SOUR]:VOLT:TRIGB-8
OPC?A-4[SOUR]:VOLT:TRIG?B-8
*RSTA-5[SOUR]:FUNC:MODEB-9
*SREA-6STAT:OPER:COND?B-9
*SRE?A-6STAT:OPER:ENABB-10
*STB?A-7STAT:OPER:ENAB?B-10
*TRGA-7STAT:OPER?B-11
*TSTA-8STAT:PRESB-11
*WAIA-8STAT:QUES?B-12
INIT[:IMM]B-1STAT:QUES:COND?B-12
INIT:CONTB-1STAT:QUES:ENABB-13
INIT:CONT?B-2STAT:QUES:ENAB?B-13
MEAS:CURR?B-3SYST:ERR?B-14
MEAS:VOLT?B-3SYST:LANGB-14
[SOUR]:CURRB-4
TABLE 4-2. RULES GOVERNING SHORTFORM KEYWORDS
IF NUMBER OF LETTERS IN
LONGFORM KEYWORD IS:
4 OR FEWER(DOES NOT MATTER)ALL LONG FORM LETTERSMODE
5 OR MORE
AND FOURTH LETTER
IS A VOWEL?
NO
YES
THEN SHORT FORM
CONSISTS OF:
THE FIRST FOUR
LONG FORM LETTERS
THE FIRST THREE
LONG FORM LETTERS
EXAMPLES
MEASure, OUTPut, EVENt
LEVel, IMMediate, ERRor
4-4
BIT 232 022800
KEYWORD
ROOT SPECIFIER
MESSAGE UNIT SEPARATOR
DATA SEPARATOR
DATA
DATA SEPARATOR
KEYWORD
KEYWORD SEPARATOR
KEYWORD
You must use the rules above when using keywords. Using an arbitrary short form such as
ENABL for ENAB (ENABLE) or IMME for IMM (IMMEDIATE) will result in an error. Regardless
of which form chosen, you must include all the letters required by that form.
DATA
CURR:LEV 3.5;:OUTP ON;:CURR?<NL>
FIGURE 4-2. MESSAGE STRUCTURE
MESSAGE UNIT SEPARATOR
ROOT SPECIFIER
KEYWORD
QUERY INDICATOR
MESSAGE TERMINATOR
MESSAGE UNIT
To identify the short form and long form in this manual, keywords are written in upper case letters to represent the short form, followed by lower case letters indicating the long form (e.g.,
IMMediate, EVENt, and OUTPut). The parser, however, is not sensitive to case (e.g., outp,
OutP, OUTPUt, ouTPut, or OUTp are all valid).
4.4.4.2KEYWORD 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., CURR:LEV:TRIG). The colon can also act as a root
specifier (paragraph 4.4.4.7).
4.4.4.3QUERY 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?).
BIT 232 022800
4-5
4.4.4.4DATA
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.,
VOLT:LEV:TRIG 14 or SOUR:VOLT? MAX
4.4.4.5DATA SEPARATOR
Data must be separated from the last keyword by a space (e.g., VOLT:LEV:TRIG 14 or
SOUR:VOLT? MAX
4.4.4.6MESSAGE UNIT SEPARATOR
When two or more message units are combined in a program message, they must be separated
by a semicolon (;) (e.g., VOLT 15;MEAS:VOLT? and CURR 12; CURR:TRIG 12.5).
4.4.4.7ROOT SPECIFIER
The root specifier is a colon (:) that precedes the first keyword of a program message. This
places the parser at the root (top left, Figure 4-3) of the command tree. Note the difference
between using the colon as a keyword separator and a root specifier in the following examples:
VOLT:LEV:IMM 16 Both colons are keyword separators.
:CURR:LEV:IMM 4 The first colon is the root specifier, the other two are keyword separators.
VOLT:LEV 6;:CURR:LEV 15 The second colon is the root specifier, the first and third are keyword separators
:INIT ON;:TRIG;:MEAS:CURR?;VOLT? The first three colons are root specifiers.
4.4.4.8MESSAGE TERMINATOR
The message terminator defines the end of a message. Three message terminators are permitted:
•new line (<NL>), ASCII 10 (decimal) or 0A (hex)
•(<CR>), ASCII 13 (decimal) or 0D (hex)
•both of the above (<CR> <NL>)
NOTE: Kepco power modules
require
a message terminator at the end of each program message. The examples shown in this manual assume a message terminator will be added
at the end of each message. Where a message terminator is shown it is represented
as <NL> regardless of the actual terminator character.
4.4.5UNDERSTANDING THE COMMAND STRUCTURE
Understanding the command structure requires an understanding of the subsystem command
tree illustrated in Figure 4-3. The “root” is located at the top left corner of the diagram. The
parser goes to the root if:
4-6
•a message terminator is recognized by the parser
•a root specifier is recognized by the parser
BIT 232 022800
Optional keywords
are enclosed in brackets [ ] for identification; optional keywords can be omitted and the power supply will respond as if they were included in the message. The root level
keyword [SOURce] is an optional keyword. Starting at the root, there are various branches or
paths corresponding to the subsystems. The root keywords for the BIT Card are :INITiate,
:MEASure, :OUTPut, [:SOURce], :STATus, and :SYSTem. Because the [SOURce] keyword is
optional, the parser moves the path to the next level, so that VOLTage, CURRent, and FUNCtion commands are at the root level.
Each time the parser encounters a keyword separator, the parser moves to the next indented
level of the tree diagram. As an example, the STATus branch is a root level branch that has
three sub-branches: OPERation, PRESet, and QUEStionable. The following illustrates how
SCPI code is interpreted by the parser:
STAT:PRES<NL>
The parser returns to the root due to the message terminator.
STAT:OPER?;PRES<NL>
The parser moves one level in from STAT. The next command is expected at the level defined
by the colon in front of OPER?. Thus you can combine the following message units
STAT:OPER? and STAT:PRES;
STAT:OPER:COND?;ENAB 16<NL>
After the OPER:COND? message unit, the parser moves in one level from OPER, allowing the
abbreviated notation for STAT:OPER:ENAB.
4.4.6PROGRAM MESSAGE SYNTAX SUMMARY
•Common commands begin with an asterisk (*).
•Queries end with a question mark (?).
•Program messages consist of a root keyword and, in some cases, one or more message
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
since both
volt?
meas:volt?;curr?
curr?
and
are interpreted as subunits of the
•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 message starts at the root, therefor a colon (:) at the beginning is not mandatory.
e.g., the command
rent since the colon preceding
meas:volt?;:curr?
curr?
mand and starts at the root.
will read output voltage and output current
meas
command.
will read output voltage and programmed cur-
indicates that
curr?
is not part of the
meas
com-
BIT 232 022800
•UPPER case letters in mnemonics are mandatory (short form). Lower case letters may
either be omitted, or must be specified completely (long form)
INSTrument
e.g.,
(long form) has the same effect as
INST
(short form).
4-7
•Commands/queries may be given in upper/lower case (long form)
SoUrCe
e.g.,
is allowed.
•Text shown between brackets [] is optional.
:[SOUR]VOLT:[LEV] TRIG
e.g.,
4.5CIIL PROGRAMMING
The CIIL command language is used on early models of Kepco power supplies and controllers.
The command functions are included here for compatibility with other equipment programmed
with CIIL commands. The CIIL command set for the BIT Card is defined and explained in
Appendix C.
4.6PROGRAMMING EXAMPLES
Appendices D through G provide sample programs which can be altered and adapted by the
user for specific applications, or used exactly as shown. All programs shown use SCPI commands; these can be adapted to use CIIL commands by changing the command strings to CIIL.
Appendix D is a C language program used with an IBM compatible computer running a terminal
emulation program.
Appendix E is a C language program which automatically programs a series of commands
has the same effect as
:VOLT TRIG
Appendix F is comprised of C language function prototypes used as building blocks for the programs in Appendices D and E. These function prototypes can also aid the user in creating new
programs for unique applications.
Appendix G is a QuickBasic language program which executes some commands and also
implements terminal emulation .
4-8
BIT 232 022800
APPENDIX A - SCPI COMMON COMMAND/QUERY DEFINITIONS
A.1INTRODUCTION
This appendix defines the SCPI common commands and queries used with the BIT 232/BIT
232-F Interface Card. Common commands and queries are preceded by an asterisk (*) and are
defined and explained in Figures A-1 through A-14, arranged in alphabetical order. Table A-1
provides a quick reference of all SCPI common commands and queries used in the BIT Card.
TABLE A-1. SCPI COMMON COMMAND/QUERY INDEX
COMMANDPAGECOMMANDPAGE
*CLSA-1*RSTA-5
*ESEA-2*SREA-6
*ESE?A-2*SRE?A-6
*ESR?A-3*STB?A-7
*IDN?A-3*TRGA-7
*OPCA-4*TSTA-8
*OPC?A-4*WAIA-8
Syntax:
Function:
Response:
Description:
Example:
*CLS
*CLS
Clear status data
Not Applicable
Forces power supply to “operation complete idle” and “operation complete query” state. Clears all
Event Registers summarized in Status Byte Register.
Clears Standard Event Status, Operation Status Event, Questionable Status Event, and Status Byte
Registers. Clears the error queue.
*CLSPower supply clears status data.
FIGURE A-1. *CLS — CLEAR STATUS COMMAND
BIT 232 022800
A-1
*ESE
r
ying
Syntax:
Function:
Response:
Description:
Example:
*ESE <integer>
<integer> = positive whole number: 0 to 255 per
STANDARD EVENT STATUS ENABLE REGISTER BITS
table below.
Sets ESE (standard Event Status Enable) register bits to enable the Standard events to be summarized in the Status Byte register (1 = set = enable function, 0 = reset = disable function).
Not applicable
Contents of Standard Event Status Enable register (*ESE) determine which bits of Standard Event
Status register (*ESR) are enabled, allowing them to be summarized in the Status Byte register
(*STB). All of the enabled events of the Standard Event Status Enable Register are logically ORed
to cause ESB (bit 5) of the Status Byte Register to be set.
*ESE 49 Power supply enables bits 0, 4 and 5) allowing command error, execution error
and operation complete conditions to be recorded in the Event Status Register.
FIGURE A-2. *ESE — STANDARD EVENT STATUS ENABLE COMMAND
Syntax:
Response:
Function
:Returns the status of the Standard Event Status Enable Register
Description:
Example:
A-2
*ESE?
*ESE?
<integer> value per
Contents of Standard Event Status Enable register (*ESE) determine which bits of Standard Event
Status register (*ESR) are enabled, allowing them to be summarized in the Status Byte registe
(*STB). All of the enabled events of the Standard Event Status Enable Register are logically ORed to
cause ESB (bit 5) of the Status Byte Register to be set (1 = set = enable function, 0 = reset = disable
function).
CONDITIONNU NUCMEEXEDDEQUENUOPC
BIT 76543210
VALUE1286432168421
*ESE 49 Power Supply enables bits 0, 4 and 5
*ESE?Controller reads <value> 49, verif
FIGURE A-3. *ESE? — STANDARD EVENT STATUS ENABLE QUERY
*IDN?Controller reads character string: “KEPCO BOP BIT 232 REV
n
where
FIGURE A-5. *IDN? — IDENTIFICATION QUERY
= applicable revision number.
n
”
BIT 232 022800
A-3
*OPC
Syntax:
Function
Description:
Example:
:Causes power supply to set status bit 0 (Operation Complete) when pending operations are complete
*OPC
This command sets Standard Event Status Register bit 0 to “1” when all previous commands have
been executed and changes in output level have been completed. This command does not prevent
processing of subsequent commands, but bit 0 will not be set until all pending operations are completed. (1 = set = enable function, 0 = reset = disable function)
STANDARD EVENT STATUS REGISTER BITS
CONDITIONNU NUCMEEXEDDEQUENUOPC
BIT 76543210
VALUE1286432168421
Controller sends command(s), then sends *OPC
If controller then sends *ESR?, the power supply responds with either a “0” (if the power supply is
busy executing the programmed commands), or a “1” (if the previously programmed commands are
complete).
:Indicates when pending operations have been completed.
A-4
*OPC?
*OPC?
<1>
When all pending operations are complete (all previous commands have been executed and changes
in output level have been completed) a “1” is placed in the Output Queue. Subsequent commands are
inhibited until the pending operations are completed. *OPC? is intended to be used at the end of a
command line so that the application program can monitor the bus for data until it receives the “1” from
the power supply Output Queue.
Controller sends command(s), then sends *OPC?
Controller waits until power supply responds with “1” on bus, indicating previous commands are complete, then proceeds to execute subsequent commands.
FIGURE A-7. *OPC? — OPERATION COMPLETE QUERY
BIT 232 022800
*RST
Syntax:
Function
Response:
Description:
Example:
:Resets power supply as defined below:
*RST
None
Establishes the following power supply parameters:
CURR[:LEV][:IMM]0
VOLT[:LEV][:IMM]0
FUNC:MODEVOLT
*RSTPower supply responds by establishing default states defined above.
BIT 232 022800
FIGURE A-8. *RST — RESET COMMAND
A-5
f
*SRE
Syntax:
*SRE<integer>
<integer> = value from 0 - 255 per
SERVICE REQUEST ENABLE REGISTER
cannot be programmed.
Function
:Programs the Service Enable Register to determine which events of the Status Byte Register will
cause the power supply to generate a service request
Description:
When a Service Request Enable Register bit is set (“1”), the corresponding Status Byte Register bit
(set to “1”) causes the RQS and MSS bits to be set (1 = set = enable function, 0 = reset = disable function). All enabled Service Request Enable Register bits are logically ORed to set bit 6 (MSS/RQS) o
the Status byte register. Bit 6 is also set by the power supply to request service (RQS). (See also Figure 3-12, *STB?)
SERVICE REQUEST ENABLE REGISTER BITS
CONDITIONNU
BIT 7 6543210
VALUE1286432168421
Example:
*SRE112Power supply will set bit 6 (MSS/RQS) if any event status register bit is set (ESB = 1),
MSS
RQS
ESBMAVNU
or any message is available (MAV = 1)
FIGURE A-9. *SRE — SERVICE REQUEST ENABLE COMMAND
table below, except bit 6
MSS Master Status Summary
RQS Request for Service
ESB Event Status Byte summary
MAV Message available
NU(Not Used)
Syntax:
Response:
Function
*SRE?
<integer> = value from 0 - 255 per
SERVICE REQUEST ENABLE REGISTER
:Reads the Service Enable Register to determine which events of the Status Byte Register are pro-
grammed to cause the power supply to generate a a service request (1 = set = function enabled, 0 =
reset = function disables).
Description:
CONDITIONNU
BIT 7 6543210
VALUE1286432168421
Example:
See *SRE command (Figure 3-11) and *STB? command (Figure 3-13).
SERVICE REQUEST ENABLE REGISTER BITS
MSS
RQS
ESBMAVNU
*SRE?Power supply responds with 32 to indicate that the power supply will request service
if the Event Status Byte summary bit is set.
FIGURE A-10. *SRE? — SERVICE REQUEST ENABLE QUERY
A-6
*SRE?
table below,.
MSS Master Status Summary
RQS Request for Service
ESB Event Status Byte summary
MAV Message available
NU(Not Used)
BIT 232 022800
Syntax:
*STB?
*STB?
Response:
Function
Description:
CONDITIONN#HI
BIT 7 6543210
VALUE1286432168421
Example:
<integer> value from 0 to 255 per table below
:Read Status Byte Register without clearing it
This Query reads the Status Byte Register (bit 6 = MSS) without clearing it (1 = set = function enabled,
0 = reset = function disabled). The register is cleared only when subsequent action clears all set bits.
MSS is set when the power supply has one ore more reasons for requesting service. (A serial poll also
reads the Status Byte Register, except that bit 6 = RQS, not MSS; ands RQS will be reset.)
STATUS BYTE REGISTER BITS
MSS
RQS
*STB?Power supply responds with 96 (64 + 32) to indicate MSS and the Event Status
ESBMAVNODE NUMBERS (ADDRESS)
Byte summary bit have been set.
FIGURE A-11. *STB? — STATUS BYTE REGISTER QUERY
N#HI Node number high
MSS Master Status Summary
RQS Request for Service
ESB Event Status Byte summary
MAV Message available
Syntax:
Function
Description:
Example 1:
:Triggers the power supply to be commanded to preprogrammed value of output current and voltage.
*TRG
*TRG
This command causes the power supply to be commanded to the output voltage and current levels
specified by VOLT:TRIG and CURR:TRIG commands, respectively (see Figures B-13 and B-9).
VOLT 25 Power supply voltage commanded to 25V.
VOLT:TRIG 15 Programs power supply voltage to 15V when *TRG received.
INITTrigger event is initialized.
*TRGPower supply reverts to commanded output voltage of 15V.
FIGURE A-12. *TRG — TRIGGER COMMAND
BIT 232 022800
A-7
*TST?
Syntax:
Response:
Function
Description:
Example:
:Power Supply test
*TST?
0 = pass test
1 = fail test
This query causes the power supply to do a self-test and provide the controller with pass/fail results.
CAUTION: TO AVOID DAMAGE TO THE LOAD, DISCONNECT THE LOAD BEFORE ISSUING
THIS COMMAND. (DURING THE SELF-TEST, THE BOP IS PROGRAMMED TO FULL
SCALE POSITIVE AND FULL SCALE NEGATIVE OUTPUT.)
*TST?Power supply executes self test and responds with 0 if test completed successfully,
with 1 if test failed.
FIGURE A-13. *TST? — SELF TEST QUERY
*WAI
Syntax:
Function
Description:
Example:
:Causes the power supply to wait until all previously issued commands and queries are complete
A-8
*WAI
before executing subsequent commands or queries.
This command can be used to guarantee sequential execution of commands and queries. When all
pending operations are complete (all previous commands have been executed, changes in output
level have been completed), the WAI command is completed and execution of subsequent commands
can continue.
Controller sends Command 1Power supply begins execution of command 1.
Controller sends *WAIPower supply waits for command 1 to be completed before
executing command 2.
Controller sends Command 2Command 2 executed after command 1 is completed.
FIGURE A-14. *WAI — WAIT-TO-CONTINUE COMMAND
BIT 232 022800
APPENDIX B - SCPI COMMAND/QUERY DEFINITIONS
f
B.1INTRODUCTION
This appendix defines the SCPI subsystem commands and queries used with the BIT 232/BIT
232-F Interface Card. Subsystem commands are defined in Figures B-1 through B-26, arranged
in groups as they appear in the tree diagram, Figure 3-3. Table B-1 provides a quick reference of
all SCPI subsystem commands and queries used in the BIT Card.
TABLE B-1. SCPI SUBSYSTEM COMMAND/QUERY INDEX
COMMANDPAGECOMMANDPAGE
INIT[:IMM]B-1[SOUR]:FUNC:MODEB-9
INIT:CONTB-2STAT:OPER:COND?B-9
INIT:CONT?B-2STAT:OPER:ENABB-10
MEAS:CURR?B-3STAT:OPER:ENAB?B-10
MEAS:VOLT?B-3STAT:OPER[EVENT]?B-11
[SOUR]:CURRB-5STAT:PRESB-11
[SOUR]:CURR?B-5STAT:QUES[EVENT]?B-12
[SOUR]:CURR:TRIGB-6STAT:QUES:COND?B-12
[SOUR]:CURR:TRIG?B-6STAT:QUES:ENABB-13
Syntax
Function
:Short Form:INIT
:Enables a single trigger.
Description:
Example:
[SOUR]:VOLTB-7STAT:QUES:ENAB?B-13
[SOUR]:VOLT?B-7SYST:ERR?B-14
[SOUR]:VOLT:TRIGB-8SYST:LANGB-14
[SOUR]:VOLT:TRIG?B-8
INIT[:IMM]
Long Form::INITiate[:IMMediate]
This command enables a single trigger. A *TRG command completes the sequence. Upon receipt o
the *TRG command, the power supply will return to the commanded values of voltage and current
established by the VOLT:TRIG and CURR:TRIG commands. After a *TRG command has been
received, subsequent *TRG commands have no effect unless preceded by INIT or INIT:CONT ON.
VOLT 21; CURR 5Power supply output commanded to go to 21V, 5A
VOLT:TRIG 15;CURR:TRIG 3Power supply output programmed to return to 15V, 3A upon
receipt of *TRG trigger.
INIT;*TRGUpon receipt of *TRG command power supply is
commanded to 15V, 3A.
NOTE: Commanded voltage and current parameters will either be output or limit parameters,
depending on whether output is enabled, load and mode
BIT 232 022800
FIGURE B-1. INITiate[:IMMediate] COMMAND
B-1
Syntax
:Short Form:INIT:CONT <value>
Long Form::INITiate:CONTinuous <value>
INIT:CONT
Function
Description:
Example:
:INIT:CONT ON Enables continuous triggers.
INIT:CONT OFFDisables continuous triggers.
This command enables/disables triggers. *TRG commands complete the sequence. Once INIT:CONT
ON enables continuous triggers, subsequent *TRG commands return the power supply output to the
commanded values of voltage and current established by the VOLT:TRIG and CURR:TRIG commands until INIT:CONT OFF is received.
VOLT 21; CURR 5Power supply output commanded to go to 21V, 5A
INIT:CONT ONContinuous triggers enabled.
VOLT:TRIG 15;CURR:TRIG 3Power supply output programmed to return to 15V, 3A upon
receipt of trigger.
*TRGUpon receipt of *TRG command power supply output returns
to 15V, 3A.
VOLT 17; CURR 2Power supply output commanded to go to 17V, 2A
*TRGUpon receipt of *TRG command power supply output returns
to 15V, 3A.
INIT:CONT OFFTriggers disabled.
FIGURE B-2. INITiate:CONTinuous COMMAND
INIT:CONT?
Syntax:
Function
Response:
Description:
Example:
:Determines whether continuous triggers are enabled or disabled.
B-2
Short Form:INIT:CONT?
Long Form::INITiate:CONTinuous?
Power supply returns value of INIT:CONT flag to controller
VOLT 21; CURR 5Power supply output commanded to go to 21V, 5A
INIT:CONT ONContinuous triggers enabled.
VOLT:TRIG 15;CURR:TRIG 3Power supply programmed to return to 15V, 3A upon
receipt of *TRG trigger.
*TRGPower supply returns to 15V, 3A.
INIT:CONT?Controller reads “1” to indicate that continuous triggers are
enabled.
FIGURE B-3. INITiate:CONTinuous QUERY
BIT 232 022800
MEAS:CURR?
Syntax
:Short Form:MEAS:CURR?
Function
Description:
Example:
BIT 232 022800
:Measures actual current or voltage
MEAS:VOLT?
:MEAS:VOLT?
Long Form:MEASure:CURRent[:DC]?
MEASure:VOLTage[:DC]?
This query returns the actual value of output current or voltage (measured at the sense terminals) as
determined by the commanded value of voltage and current and load conditions.
VOLT 21; CURR 5Power supply output commanded to go to 21V, 5A
MEAS:CURR?Controller reads actual value of output current, e.g., 4.83A.
MEAS:VOLT?Controller reads actual value of output voltage, e.g., 20.9.
FIGURE B-4. MEASure:CURRent? and MEASure:VOLTage? QUERIES
B-3
Syntax
f
:Short Form:CURR <value>
Long Form:[SOURce]:CURRent[:LEVel][:IMMediate] <value>
CURR
Function
Description
Example
Syntax
:Sets commanded current or current limit to specified level.
:This command programs output current (Current mode) or current limit (Voltage mode) to a specific
value. Actual output current will depend on load conditions.
:VOLT 21; CURR 5Power supply output commanded to go to 21V, 5A
:Short Form:CURR?
Long Form:[SOURce]:CURRent?
FIGURE B-5. CURRent COMMAND
CURR?
Function
Description
Example
:CURR?Returns programmed current value.
:VOLT 21; CURR 1.1Power supply commanded to go to 21V, 1.1A
B-4
CURR? MAXReturns maximum current allowed for power supply.
CURR? MINReturns minimum current allowed for power supply (always 0).
:The CURR? query returns the programmed current (Current mode) or current limit (Voltage mode) o
the power supply. Actual output current will depend on load conditions. The CURR?MAX query returns
the maximum current allowed for a particular model.
CURR?Controller reads 1.1, indicating programmed current value = 1.1A
CURR? MAXController reads 3.6 (assuming maximum allowable current for power
supply being addressed is 3.6 A).
FIGURE B-6. CURRent QUERY
BIT 232 022800
CURR:TRIG
Syntax
Function
Description
Example
:Short Form:CURR:TRIG <value>
:Programs current value to be implemented by *TRG command. Actual output current will depend on
:VOLT 21; CURR 1.1Power supply commanded to go to 21V, 1.1A
Long Form:[SOURce]:CURRent:TRIGgered <value>
load conditions.
:This command can be used to reset many power supplies to preselected parameters by issuing a sin-
gle *TRG command.
CURR:TRIG 2.3Power supply current programmed to 2.3A upon receipt of *TRG
CURR?Controller reads 1.1, indicating programmed current value = 1.1A
*TRGPower supply commanded to current value established by CURR:TRIG
command (2.3) and voltage value established by VOLT:TRIG
CURR?Controller reads 2.3, indicating programmed current value = 2.3A
FIGURE B-7. CURRent:TRIGgered COMMAND
CURR:TRIG?
Syntax
Function
Description
Example
BIT 232 022800
:Short Form:CURR:TRIG?
:Returns value to controller which represents current value to be programmed by *TRG command.
:VOLT 21; CURR 1.1Power supply commanded to go to 21V, 1.1A
Long Form:[SOURce]:CURRent:TRIGgered?
:This command returns the current value established by CURR:TRIG command.
CURR:TRIG 2.3Power supply current programmed to 2.3 upon receipt of *TRG
CURR?Controller reads 1.1, indicating programmed current value = 1.1A
CURR:TRIG?Controller reads 2.3 (current value established by CURR:TRIG
command
FIGURE B-8. CURRent:TRIGgered QUERY
B-5
Syntax
:Short Form:VOLT <value>
Long Form:[SOURce]:VOLTage[:LEVel][:IMMediate] <value>
VOLT
Function
Description
Example
Syntax
:Sets commanded voltage or voltage limit to specified level.
:This command programs commanded output voltage (Voltage mode) or voltage limit (Current mode)
to a specific value. Actual output voltage will depend on load conditions.
:VOLT 21; CURR 5Power supply commanded to go to 21V, 5A
:Short Form:VOLT?
Long Form:[SOURce]:VOLTage?
FIGURE B-9. VOLTage COMMAND
VOLT?
Function
Description
Example
:VOLT?Returns programmed voltage value.
:VOLT 21; CURR 1.1Power supply commanded to go to 21V, 1.1A
B-6
VOLT? MAXReturns maximum voltage allowed for power supply.
VOLT? MINReturns minimum voltage allowed for power supply (always 0).
:The VOLT? query returns the programmed voltage (Voltage mode) or voltage limit (Current mode) of
the power supply to the controller. Actual output voltage will depend on load conditions. The
VOLT?MAX query returns the maximum voltage allowed for a particular model.
VOLT?Controller reads 21, indicating programmed voltage value = 21V
VOLT? MAXController reads 100 (assuming maximum allowable voltage for power
supply being addressed is 100V).
FIGURE B-10. VOLTage QUERY
BIT 232 022800
Syntax
:Short Form:VOLT:TRIG <value>
Long Form:[SOURce]:VOLTage:TRIGgered <value>
VOLT:TRIG
Function
Description
Example
:Programs voltage value to be implemented by *TRG command. Actual output voltage will depend on
:VOLT 21; CURR 1.1Power supply commanded to go to 21V, 1.1A
load conditions.
:This command can be used to reset many power supplies to preselected parameters by issuing a sin-
gle *TRG command.
VOLT:TRIG 29.3Power supply current programmed to 29.3 upon receipt of *TRG
VOLT?Controller reads 21, indicating programmed current value = 21V
*TRGPower supply commanded to voltage value established by VOLT:TRIG
command (29.3) and current value established by CURR:TRIG
VOLT?Controller reads 29.3, indicating programmed current value = 2.3A
FIGURE B-11. VOLTage:TRIGgered COMMAND
VOLT:TRIG?
Syntax
Function
Description
Example
BIT 232 022800
:Short Form:VOLT:TRIG?
:Returns value to controller representing voltage value to be programmed by *TRG command.
:VOLT 21; CURR 1.1Power supply commanded to go to 21V, 1.1A
Long Form:[SOURce]:VOLTage:TRIGgered?
:This command returns the voltage value established by VOLT:TRIG command.
VOLT:TRIG 29.3Power supply voltage programmed to 29.3 upon receipt of *TRG
VOLT?Controller reads 21, indicating programmed voltage value = 21V
VOLT:TRIG?Controller reads 29.3 (voltage value established by VOLT:TRIG
command
FIGURE B-12. VOLTage:TRIGgered QUERY
B-7
Syntax
r
:Short Form:FUNC:MODE
Long Form:[SOURce]:FUNCtion:MODE
FUNC:MODE
Function
Description
Example
:FUNC:MODE VOLTCommands power supply to Voltage mode
:FUNC:MODE VOLTPower supply commanded to Voltage mode.
FUNC:MODE CURRCommands power supply to Current mode
:Commanded mode establishes parameters (voltage or current) monitored for error conditions. Actual
mode depends upon load conditions. When commanded to Voltage mode, if load conditions cause the
power supply to try to exceed the current limit, the unit will automatically switch to Current mode and
flag an error condition. When commanded to Current mode, if load conditions cause the power supply
to try to exceed the voltage limit, the unit will automatically switch to Voltage mode and flag an erro
condition.
VOLT 21; CURR 1.1Power supply commanded to output 21V, current limit set to 1.1A.
FUNC:MODE CURRPower supply commanded to Current mode.
CURR 1.1; VOLT 21Power supply commanded to output 1.1A, voltage limit set to 21V.
FIGURE B-13. FUNCtion:MODE COMMAND
STAT:OPER:COND?
Syntax:
Function
Description:
CONDITION
BIT1098 76543210
VALUE1024512256128 6432168421
Example:
Short Form:STAT:OPER:COND?
Long Form:STATus:OPERation:CONDition?
:Returns the value of the Operation Condition Register to controller (1 = set = function enabled, 0 =
reset = function disabled).
The Operation Condition Register contains unlatched real-time information about the operating conditions of the power supply.
OPERATION CONDITION REGISTER BITS
CURRENT
MODE
STAT:OPER:COND?Power supply returns <value> 1536 (1024 + 512) to indicate that power
RELAY
CLOSED
VOLTAGE
MODE
supply is operating in Current mode with relay closed.
FIGURE B-14. STATus:OPERation:CONDition QUERY
NOT USED
B-8
BIT 232 022800
STAT:OPER:ENAB
Syntax:
Short Form:STAT:OPER:ENAB <value>
Long Form:STATus:OPERation:ENABle <value>
Function
Description:
:Programs Operational Condition Enable Register)
The Operation Condition Enable Register determines which conditions are allowed to set the Operation Condition Register. The value sent by the controller sets the corresponding bits of the Operation
Condition Enable Register in the power supply (1 = set = function enabled, 0 = reset = function disabled).
OPERATION CONDITION ENABLE REGISTER BITS
CONDITION
BIT1098 76543210
VALUE1024512256128 6432168421
Example:
CURRENT
MODE
STAT:OPER:ENAB 1280Bits 8 and 10 of Operation Condition Enable Register are set, allowing
RELAY
CLOSED
VOLTAGE
MODE
NOT USED
the Operation Condition Register to monitor Voltage and Current mode
conditions, but not report the status of the relay.
FIGURE B-15. STATus:OPEReration:ENABle COMMAND
STAT:OPER:ENAB?
Syntax:
Function
Description:
CONDITION
BIT1098 76543210
VALUE1024512256128 6432168421
Example:
Short Form:STAT:OPER:ENAB?
Long Form:STATus:OPERation:ENABle?
:Reads Operational Condition Enable Register)
Power supply returns value of Operation Condition Enable Register to controller, indicating which conditions are being monitored. (1 = set = function enabled, 0 = reset = function disabled)
OPERATION CONDITION ENABLE REGISTER BITS
CURRENT
MODE
RELAY
CLOSED
VOLTAGE
MODE
NOT USED
STAT:OPER:ENAB?Controller reads <value> 1792 (1024 + 512 + 256) to indicate that bits
8, 9, and 10 of the Operation Condition Register are set, allowing
Voltage mode, relay closed, and Current mode conditions to be
monitored.
FIGURE B-16. STATus:OPEReration:ENABle QUERY
BIT 232 022800
B-9
STAT:OPER?
Syntax:
Function
Description:
CONDITION
BIT1098 76543210
VALUE1024512256128 6432168421
Example:
Short Form:STAT:OPER[EVEN]?
Long Form:STATus:OPERation[EVENT]?
:Indicates changes in conditions monitored by Operational Event Register)
Power supply returns value to controller indicating conditions of Operation Event Register which have
changed since the last STAT:OPER? query. This value is cleared once reported...
OPERATION EVENT REGISTER BITS
CURRENT
MODE
STAT:OPER?Controller reads <value> 768 (512 + 256) to indicate that bits 8 and 9
RELAY
CLOSED
VOLTAGE
MODE
are set, indicating that the power supply has changed to Voltage mode
and the relay has closed since the last STAT:OPER? query.
FIGURE B-17. STATus:OPERation QUERY
NOT USED
Syntax:
Function
Description:
Example:
:Disables reporting of all status events.
STAT:PRES
Short Form:STAT:PRES
Long Form:STATus:PRESet
This command sets all bits of the Operation Condition and Questionable Condition Registers to 0, preventing all status events from being reported...
STAT:PRESOperation Condition and Questionable Condition registers can no
longer be set.
FIGURE B-18. STATus:PRESet COMMAND
B-10
BIT 232 022800
STAT:QUES?
Syntax:
Short Form:STAT:QUES[EVEN]?
Long Form:STATus:QUEStionable[EVENT]?
Function
Description:
:Indicates changes in conditions monitored by Questionable Event Register)
Power supply returns value to controller indicating conditions of Questionable Event Register which
have changed since the last STAT:OPER? query. This value is cleared once reported.
QUESTIONABLE EVENT REGISTER BITS
CONDITIONPLOLRENUNUNUNUNUOTNUCEVE
BIT 111098 76543210
VALUE204810245122561286432168421
Example:
STAT:OPER?Controller reads <value> 1026 (1024 + 2) to indicate that bits 1 and 10
are set, indicating that the power supply has detected overload and
current error conditions since the last STAT:QUES? query.
FIGURE B-19. STATus:QUEStionable? QUERY
PL POWER LOSS
OL OVERLOAD
RE RELAY ERROR
OT OVERTEMPERATURE
CE CURRENT ERROR
VE VOLTAGE ERROR
NU NOT USED
STAT:QUES:COND?
Syntax:
Function
Description:
CONDITIONPLOLRENUNUNUNUNUOTNUCEVE
BIT 111098 76543210
VALUE204810245122561286432168421
Example:
Short Form:STAT:QUES:COND?
Long Form:STATus:QUEStionable:CONDition?
:Returns the value of the Questionable Condition Register to controller. (1 = set = function enabled, 0 =
reset = function disabled)
The Questionable Condition Register contains unlatched real-time information about questionable
conditions of the power supply.
that overload, relay, overtemperature and voltage errors were detected.
FIGURE B-20. STATus:QUEStionable:CONDition? QUERY
PL POWER LOSS
OL OVERLOAD
RE RELAY ERROR
OT OVERTEMPERATURE
CE CURRENT ERROR
VE VOLTAGE ERROR
NU NOT USED
BIT 232 022800
B-11
STAT:QUES:ENAB
Syntax:
Short Form:STAT:QUES:ENAB <value>
Long Form:STATus:QUESionable:ENABle <value>
Function:
Description:
Programs Questionable Condition Enable Register)
The Questionable Condition Enable Register determines which conditions are allowed to set the
Questionable Condition Register. The value sent by the controller sets the corresponding bits of the
Questionable Condition Enable Register in the power supply (1 = set = function enabled, 0 = reset =
function disabled
QUESTIONABLE CONDITION ENABLE REGISTER BITS
CONDITIONPLOLRENUNUNUNUNUOTNUCEVE
BIT 111098 76543210
VALUE204810245122561286432168421
Example:
STAT:QUES:ENAB 3595Bits 0, 1, 3, 9, 10, and 11 of the Questionable Condition Enable
.
Register are set, causing the power supply to monitor voltage error,
current error, overtemperature, relay error, overload and power loss
conditions.
FIGURE B-21. STATus:QUEStionable:ENABle COMMAND
PL POWER LOSS
OL OVERLOAD
RE RELAY ERROR
OT OVERTEMPERATURE
CE CURRENT ERROR
VE VOLTAGE ERROR
NU NOT USED
STAT:QUES:ENAB?
Syntax:
Function:
Description:
CONDITIONPLOLRENUNUNUNUNUOTNUCEVE
BIT 111098 76543210
VALUE204810245122561286432168421
Example:
Short Form:STAT:QUES:ENAB?
Long Form:STATus:QUESionable:ENABle?
Reads Questionable Condition Enable Register)
Power supply returns value of Questionable Condition Enable Register to controller, indicating which
conditions are being monitored
indicate that voltage error, current error, overtemperature, relay error,
overload and power loss conditions are being monitored.
FIGURE B-22. STATus:QUEStionable:ENABle? QUERY
PL POWER LOSS
OL OVERLOAD
RE RELAY ERROR
OT OVERTEMPERATURE
CE CURRENT ERROR
VE VOLTAGE ERROR
NU NOT USED
B-12
BIT 232 022800
Syntax:
SYST:ERR?
Short Form:SYST:ERR?
Long Form:SYSTem:ERRor?
Function
Description:
Example:
:Provides error messages to controller.
Returns error number and character string containing error message. Error messages are defined as
:
follows
ERROR MESSAGEEXPLANATION
0 “No error”
-100 “Command error”
-222 “Voltage out of range”
-222 “Current out of range”
-240 “Hardware error”
SYST:ERR?Controller reads: 0, “No error”
ERROR MESSAGES
No error
Wrong syntax; command not understood.
Value Exceeds Power Supply Rating
Value exceeds power supply rating
Power supply did not respond to command
FIGURE B-23. SYSTem:ERRor? QUERY
Syntax:
Function
Description:
Example:
BIT 232 022800
:Selects the CIIL language command set (See Appendix C.)
SYST:LANG
Short Form:SYST:LANG CIIL
Long Form:SYSTem:LANGuage
This command allows the CIIL command language to be used to program the power supply. (CIIL is
included to provide compatibility with earlier Kepco equipment.) Once CIIL is selected, the CIIL command ‘GAL’ followed by the command ‘SCPI’ must be sent for the power supply to respond to SCPI
commands.
SYST:LANG CIILPower supply responds to CIIL command set.
FIGURE B-24. SYSTem:LANGuage COMMAND
B-13/B-14
APPENDIX C - CIIL COMMAND DEFINITIONS
C.1INTRODUCTION
This appendix defines the CIIL commands used with the BIT 232/BIT 232-F Interface Card.
Table C-1 provides a quick reference of all CIIL commands used in the BIT Card.
TABLE C-1. CIIL SUBSYSTEM COMMAND/QUERY INDEX
COMMANDPAGECOMMANDPAGE
CNFC-4RSTC-4
FNCC-1SETC-3
FTHC-2SRNC-3
GALC-6SRXC-3
INXC-2STAC-5
ISTC-4
Syntax:
Function
Description:
Example:
:This operator is used with either the SET command to program a power supply's output (stimulus
mode), or with the VOLT and CURR commands to read its output settings (sensor mode).
The first operand contains the three (3) letter mnemonic pertaining to the device on the control bus, in
this case DCS (Direct Current Source). If a reading is being set up, the modifier VOLT or CURR follows. The next operand is used to select the specific channel of the device being programmed or read
from.
FNC DCS :CH1 SET VOLT 15Power supply commanded to 15V
FNC DCS :CH1 SET CURR 3Power supply commanded to 3A
FNC DCS VOLT :CH1Power supply returns value which represents actual output
voltage
FNC DCS CURR :CH1Power supply returns value which represents actual output
current
NOTE: Actual output voltage and current depends on load conditions
FIGURE C-1. FNC — FUNCTION COMMAND
BIT 232 022800
C-1
INX
Syntax:
Function
Description:
Example:
: Commences a data acquisition process in accordance with the preceding FNC command.
INX VOLT (initiate voltage reading)
INX CURR (initiate current reading)
The response to the INX command is a dynamic time-out value, unless a catastrophic error condition
exists, in which case an error message will be returned. If the time-out value returned is not zero, this
indicates the power supply’s output voltage or current has not yet settled. A time delay should be
observed before proceeding with the FTH command, or the command may be repeated until a zero
value is returned, but the preceding FTH command must also be repeated.
INX VOLT Power supply initiates voltage reading)
FTH VOLTPower supply sends voltage reading to controller)
FIGURE C-2. INX — INITIATE OP CODE COMMAND
Syntax:
Function
Description:
Example:
: Commands the previously designated power supply to return the requested data reading.
C-2
FTH
FTH VOLT (fetch voltage reading)
FTH CURR (fetch current reading)
This command must immediately follow an INX command. The value returned is the value of the output voltage or current, whichever was requested, unless a catastrophic error condition exists, in which
case an error message will be returned. The value observed will be in scientific notation.
INX VOLT Power supply initiates voltage reading)
FTH VOLTPower supply sends voltage reading to controller)
FIGURE C-3. FTH — FETCH COMMAND
BIT 232 022800
SET, SRX, SRN
Syntax:
Function
Description:
:This operator is used in conjunction with FNC (in stimulus mode) to specify the output mode of the
FNC DCS :CH1 SET VOLT <value> CURL <value>
FNC DCS :CH1 SET CURR <value> VLTL <value>
SRXSet Range Maximum
SRNSet Range Minimum
power supply being programmed.
The first operand is the noun modifier and the second operand specifies the value. The first operand
field of the command contains the four(4) letter mnemonic for the output mode of the power supply.
The choices are:
The second operand field of the command contains the value assigned to the chosen output mode.
This value may be specified as accurately as the resolution of the power supply allows. It can be
directly specified in ASCII integer, decimal, or in scientific notation.
There may be two (2) set commands, separated by a space (ASCII 32), for each power supply being
programmed. The following are the only allowable combinations:
VOLT with CURL
CURR with VLTL
Example:
The limit parameter (CURL or VLTL) may not be set without the main parameter. A polarity sign may
precede the VOLT or CURR value so that the power supply's polarity may be selected.
In the case of Kepco's BOP power supplies, the two related Op Codes, SRX and SRN are functionally
identical to the SET command, since there is only one range, 0 - maximum. The commands are
included only for compatibility.
FNC DCS :CH1 SET VOLT 5 CURL 3Power supply commanded to 5V (Voltage mode) with
current limit of 3A.
FNC DCS :CH1 SET CURR 2 VLTL 17 Power supply commanded to 2A Current mode) with
voltage limit of 17V
FIGURE C-4. SET COMMAND
BIT 232 022800
C-3
RST
Syntax:
Function
Example:
RST DCS :CH1
:This operator is used to return a power supply to its power-on state. The output voltage and current
are programmed to zero.
RST DCS :CH1The power supply is reset.
FIGURE C-5. RST — RESET COMMAND
CNF, IST
Syntax:
Function
Description:
Example:
C-4
:Causes power supply to execute confidence test.
CNF or IST
The CNF operator commands the BOP to execute the confidence test procedure defined for the BOP
power supplies (IST is functionally identical to CNF for BOP power supplies). The procedure consists
of programming voltage and current to their maximum values, checking for error flags, then programming voltage and current to zero. The results of CNF are obtained through the STA command.
FIGURE C-6. CNF, IST — CONFIDENCE TEST, INTERNAL SELF TEST COMMANDS
BIT 232 022800
STA
Syntax:
Function
Description:
STA
:Causes power supply to return operating status to controller.
This operator commands the power supply to report its present operating status. Status is reported in
the form of a message (character string) as defined below. Any catastrophic error conditions (indicated
by * in the table below) which exist will be reported, until the error condition is corrected. As required
by CIIL, all error messages begin with an ASCII “F” (Fault) followed by a 2 digit code, “07” (Halt). The
code that follows (DCSnn) indicates the type of device and the channel number. The next 3 digit code
describes the nature of the fault: “DEV” for device related errors or “MOD” for non-device errors, such
as syntax.
ERROR MESSAGEEXPLANATION
F07 DCSnn DEV Power Loss
F07 DCSnn DEV Device Turned Off (BOP)
F07 DCSnn DEV Over Temperature
F07 DCSnn DEV Overload
F07 DCSnn DEV Voltage Fault
F07 DCSnn DEV Current Fault
F07 DCSnn DEV Load Path Fault
F07 DCSnn MOD Invalid Command
F07 DCSnn DEV Not Ready
F07 DCSnn DEV Device Not Present
F07 DCSnn DEV Device Not Responding
F07 DCSnn DEV Invalid Voltage Range
F07 DCSnn DEV Invalid Current Range
F07 DCSnn DEV Set Modifier Error
F07 DCSnn DEV Invalid Device ID
*Catastrophic error
**Non-Catastrophic error
TABLE C-2. CIIL ERROR MESSAGES
The power supply has lost its input power. *
A shutdown occurred due to overvoltage or overcurrent. *
A shutdown occurred due to thermal causes. *
The voltage or current limit point was exceeded. *
The output voltage is not within limits (voltage mode). *
The output current is not within limits (current mode). *
Open or miswired load or error sense leads detected. *
Improper syntax was used. **
The output voltage or current has not settled. **
The specified power supply was not present during power up or
during the last DCL. **
The power supply has failed to communicate to the controller. **
The programmed voltage is outside the power supply's range. **
The programmed current is outside the power supply's range. **
An improper SET command was sent. **
The selected channel was not between 1-31. **
BIT 232 022800
FIGURE C-7. STA — STATUS COMMAND
C-5
GAL
Syntax:
Function
:Enables utility commands which change error handling defaults.
Description:
GAL
This command enables the utility commands listed below. If no GAL command is issued, the default
conditions are T0, F1, and P1. Once the GAL command is issued, the appropriate utility command
may be sent to change the default condition.
TABLE C-3. CIIL ERROR HANDLING UTILITY COMMANDS
UTILITY COMMANDDESCRIPTION
T0
T1
F0
F1
P0
P1
Instructs non-catastrophic error messages to be erased from memory if any
command is sent prior to STA command.
Instructs non-catastrophic error messages to be stacked in memory until
STA command is sent.
Fetch Mode 0. Ignores error conditions when performing FTH command.
Fetch Mode 1. Reports any error conditions which are present during FTH
command.
Power Loss Mode 0. Reports a power loss message only once until power
is restored to the power module.
Power Loss Mode 1. Continuously reports a power loss message until
power is restored to the power module.
Example:
C-6
Note: The defaults are T0, F1 and P1
GALEnables utility commands.
F0Causes controller to ignore error conditions during FTH command.
FIGURE C-8. GAL — GO TO ALTERNATE LANGUAGE COMMAND
BIT 232 022800
APPENDIX D - TERMINAL EMULATION PROGRAM
D.1INTRODUCTION
Appendix D is a C language program used with an IBM-PC-compatible computer as a terminal
emulator, allowing the BOP to be controlled directly from a keyboard. Refer to Appendix F for all
functions. (See PAR. 1.4 to order Sample Programs diskette.)
To modify this program for computers other than IBM-PC-compatible (e.g., Macintosh), four
ROM BIOS routines must be replaced with their equivalent (see Table D-1).
TABLE D-1. ROM BIOS ROUTINES TO BE REPLACED WITH EQUIVALENT
ROM BIOS ROUTINEFUNCTION
FOR NON-IBM-PC-COMPATIBLE PC’S
open_port(n) n=0 for COM1 or n=1 for COM 2
put_serc(n,c)
get_serc(n)
in_ready(n)
The Terminal Emulation program is a loop in which typed characters from the computer keyboard are sent to the BIT Card using the SendWecho function (see Appendix F). This allows the
BOP to be exercised by typing the appropriate commands (SCPI or CIIL) directly from the keyboard. Responses to the typed commands are received from the BIT Card and displayed on the
computer monitor. Typing ALT+Q ends the program.
The Terminal Emulation program can be set to run on either COM 1 or COM 2. For convenience
it is recommended that two separate programs be created, one for COM 1, one for COM 2.
If this program is started before power is applied to the BOP, the sign on message will be displayed on the computer monitor when the BOP is powered up:
KEPCO BOP BIT232 REV. 1.0
POWER SUPPLY Type = XX (BOP YY-Y)
whereXX =hex value representing setting of Power Supply Identifications switch
S2 (see PAR. 2.2.2)
Initialize the serial port.
Write the character c to COM 1 or COM 2 serial port.
Read a character from the serial port.
Fetch the current status of the serial port.
BIT 232 2/28/00
YY-Y = BOP Model No. (e.g., 20-5)
NOTE: If switch S2 is set to an illegal setting, the message will read:
UNDEFINED BOP TYPE
D-1
/********************************************************************
* RS232 interactive driver for BIT232
* use ROM BIOS INT 14 function calls
********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#define TRUE 1
#define FALSE 0
#define PORT 2 /* serial port */
/* function prototypes */
void open_port(int n);
void put_serc(int n, int c);
int get_serc(int n);
int in_ready(int n);
int SendWecho(int n,int c);
void SendCommand(char *send_cmmd);
void SendCmmdWready(char *send_cmmd);
void main(void)
{
int c;
clrscr();
printf(“ ** BIT232 Interactive Driver Program - Press ALT + Q to exit \n”);
/* open the serial port */
open_port(PORT);
/* main program loop */
while (TRUE) {
}
}
/* process keyboard presses */
if (kbhit()) {
c = getch();
switch (c) {
case 0:/* exit on Alt-X */
/* if ALT + Q */
if (getch() == 16)
exit(0);
break;
default:
{
SendWecho(PORT,c);
/* display it if one was available */
if (c != EOF)
putch(c);
if (c == ‘\r’)
putch(‘\n’);
}
}
}
/* process remote characters */
if (in_ready(PORT)) {
/* get character from serial port*/
c = get_serc(PORT);
/* display it if one was available */
if (c != EOF)
putch(c);
}
D-2
BIT 232 2/28/00
APPENDIX E - RS232 COMMAND LOOP PROGRAM
E.1INTRODUCTION
This appendix is a C language program used with an IBM-PC-compatible computer running a
terminal emulation program to set up a command loop. Refer to Appendix F for all function prototypes. (See PAR. 1.4 to order Sample Programs diskette.)
To modify this program for computers other that IBM-PC-compatible (e.g., Macintosh), four
ROM BIOS routines must be replaced with their equivalent (see Table E-1).
TABLE E-1. ROM BIOS ROUTINES TO BE REPLACED WITH EQUIVALENT
ROM BIOS ROUTINEFUNCTION
FOR NON-IBM-PC-COMPATIBLE PC’S
open_port(n) n=0 for COM1 or n=1 for COM 2
put_serc(n,c)
get_serc(n)
in_ready(n)
The Command Loop program performs the following functions
1. Interrogates the power supply (SCPI command VOLT?MAX) to determine the maximum voltage of the BOP (XXX).
2. Sets the voltage to full scale, current to 0.5A (VOLT XXX;CURR 0.5).
3. Reads the voltage and current (MEAS:VOLT?CURR?) and displays it on the computer monitor.
4. Sets voltage to minus full scale, current to 0.5A (VOLT –XXX;CURR 0.5).
5. Reads the voltage and current (MEAS:VOLT?CURR?) and displays it on the monitor.
6. Sends a reset command (*RST).
7. Reads the voltage and current (MEAS:VOLT?CURR?) and displays it on the monitor.
Initialize the serial port.
Write the character c to COM 1 or COM 2 serial port.
Read a character from the serial port.
Fetch the current status of the serial port.
BIT 232 022800
8. Sends a test command (*TST?).
9. Reads the voltage and current (MEAS:VOLT?CURR?) and displays it on the monitor.
10.Checks for errors (SYST:ERR?); the message: 0. “No Error” is displayed on the monitor.
11. The program continuously cycles through steps 1 through 10 above; to exit the program
press ALT+Q.
This program can be set to run on either COM 1 or COM 2; for convenience it is recommended
that the user create two separate programs, one for COM1, one for COM 2.
E-1
/********************************************************************
* RS232 command loop program for BIT232
* use ROM BIOS INT 14 function calls
********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#define TRUE 1
#define FALSE 0
#define PORT 2 /* serial port */
/* function prototypes */
void open_port(int n);
void put_serc(int n, int c);
int get_serc(int n);
int in_ready(int n);
int SendWecho(int n,int c);
void SendCommand(char *send_cmmd);
void SendCmmdWready(char *send_cmmd);
clrscr();
printf(“ ** BIT232 Command Loop Program - Press ALT + Q to exit \n”);
/* open the serial port */
open_port(PORT);
/* get power supply id */
strcpy(string, id);
SendCommand(string);
on_line = FALSE;
for (k=0; k < 10000; k++)
}
if (on_line == FALSE)
exit(0);
/* change the first \r in end of string */
for (j = 0; j < strlen(string); j++)
{
if (in_ready(PORT)) {
/* get character from serial port*/
c = get_serc(PORT);
/* display it if one was available */
if (c != EOF)
{
putch(c);
on_line = TRUE;
}
}
E-2
BIT 232 022800
{
if (string[j] == ‘\r’)
}
/* get maximum voltage */
strcpy(string, “volt?max”);
SendCmmdWready(string);
/* change the first \r in end of string */
for (j = 0; j < strlen(string); j++)
}
max = atof(string);
j=0;
volt[0]=string[j];
volt[1]=’\0’;
j ++;
if (vl > 1)
This appendix contains examples of C language functions which can be used as the building
blocks for unique programs to interface the BIT Card and associated power supply with an IBMPC-compatible computer. These functions are used in the sample programs shown in Appendices D and E.
F.2OPEN SERIAL PORT USING ROM BIOS ROUTINE
This function opens the serial port selected by n, using the ROM BIOS routine; if the computer is
not IBM-PC-compatible the ROM BIOS routine must be replaced by an equivalent.
/* open serial port using ROM BIOS routine */
void open_port(int n)
{
union REGS regs;
/* AH has the function code */
regs.h.ah = 0x00;
/* AL has the baud rate for 8 bits No parity 1 Stop bit */
regs.h.al = 0xe3;
/* DX has the port number */
if (n == 1)
regs.x.dx = 0;
else
regs.x.dx = 1;
/* call the ROM BIOS routine */
int86(0x14, ®s, ®s);
}
F.3PUT CHARACTER TO SERIAL PORT
This function sends a character (c) to the serial port specified by (n) using the ROM BIOS routine; if the computer is not IBM-PC-compatible the ROM BIOS routine must be replaced by an
equivalent.
/* put character to serial port */
void put_serc(int n, int c)
{
union REGS regs;
/* AH has the function code */
regs.h.ah = 0x01;
/* AL has the character */
regs.h.al = c;
/* DX has the port number */
if (n == 1)
regs.x.dx = 0;
else
regs.x.dx = 1;
/* call the ROM BIOS routine */
int86(0x14, ®s, ®s);
}
BIT 232 022800
F-1
F.4SEND, WAIT FOR ECHO
This function sends a character to the serial port specified by (n), allows a small delay (about 50
msec) for the character to be received by the BIT card, analyzed, put in a buffer and echoed
back. If the BIT Card did not receive the character, or if the time-out expires, the BIT card
returns the EOF character.
This command could be modified so that if the time-out expires, the last character is sent to the
BIT Card again.
int SendWecho(int n, int c)
{
int j;
/* send to the serial port */
put_serc(n, c);
/* timeout delay = 1000 - biger for faster computers */
for(j=1;j<1000;j++)
if (in_ready(PORT)) {
/* get character from serial port*/
c = get_serc(PORT);
return c;
}
/* if timeout - no character returned */
c = EOF;
return c;
}
F.5GET CHARACTER FROM SERIAL PORT
This function accepts a character from the serial port specified by n using the ROM BIOS routine; if the computer is not IBM-PC-compatible the ROM BIOS routine must be replaced by an
equivalent.
/* get character from serial port */
int get_serc(int n)
{
union REGS regs;
/* AH has the function code */
regs.h.ah = 0x02;
/* DX has the port number */
if (n == 1)
regs.x.dx = 0;
else
regs.x.dx = 1;
/* call the ROM BIOS routine */
int86(0x14, ®s, ®s);
/* return EOF if timed out */
if (regs.h.ah & 0x80)
return EOF;
return regs.h.al;
}
F-2
BIT 232 022800
F.6CHECK TO SEE IF A CHARACTER WAS RECEIVED
This function checks to see if a character was received using the ROM BIOS routine; if the computer is not IBM-PC-compatible the ROM BIOS routine must be replaced by an equivalent.
/* check to see if a character was received */
int in_ready(int n)
{
union REGS regs;
/* AH has the function code */
regs.h.ah = 0x03;
/* DX has the port number */
if (n == 1)
regs.x.dx = 0;
else
regs.x.dx = 1;
/* call the ROM BIOS routine */
int86(0x14, ®s, ®s);
/* check for received data ready */
if (regs.h.ah & 1)
return TRUE;
return FALSE;
}
F.7SEND COMMAND
This function sends a character string to the BIT Card and sends the echoed characters to the
monitor screen. The SendWecho function is used to send the command, byte by byte, to the BIT
Card. After the last byte of the command is sent, the Carriage Return (CR) character is sent to
the BIT Card to cause the parser to execute the command, and CR and Line Feed (LF) characters are sent to the monitor screen.
This function could be modified by comparing the character sent with the echoed character,
then if they do not match, send the last character again.
void SendCommand(char *send_cmmd)
{
int chr;
while( *send_cmmd != ‘\0’) {
/* output character here */
chr = *send_cmmd ++;
SendWecho(PORT,chr);
/* display returned byte if available */
if (chr != EOF)
putch(chr);
}
/* output end command */
chr = ‘\r’;
SendWecho(PORT,chr);
/* display returned byte if available */
if (chr != EOF)
putch(chr);
if (chr == ‘\r’)
putch(‘\n’);
}
BIT 232 022800
F-3
F.8SEND COMMAND AND WAIT UNTIL READY
This function uses the SendCommand function to send commands to the BIT Card and display
echoed characters and response messages on the screen until the > character is received,
indicating that parsing and execution of the command has been completed.
void SendCmmdWready(char *send_cmmd)
{
int not_endcmd;
char recv, *st_buff;
This appendix presents a program written in BASIC language intended to aid the user in building BASIC language test programs using the BIT Card. (See PAR. 1.4 to order Sample Programs diskette.)
The BASIC Language Terminal Emulation program performs a series of commands, then allows
the user to type commands and control a BOP via the BIT Card from a keyboard. The keyboard
commands are displayed on the screen while the commands are executed and response messages are displayed on the screen.
SCPI commands are used, however the program may easily be modified to use CIIL commands
by changing the applicable character strings.
The program is written to use COM port 2; to use COM port 1 change the following line:
OPEN “COM2:9600,N,8,1,RS,CS,DS” FOR RANDOM AS #1 LEN = 256
to:
OPEN “COM1:9600,N,8,1,RS,CS,DS” FOR RANDOM AS #1 LEN = 256
With the program loaded under a BASIC interpreter, press ALT+R to run the program or ALT+Q
to exit.
The program performs the following functions
1. Request power supply identification (*IDN?).
2. Reset the power supply (*RST).
3. Test the power supply (*TST).
4. Check for errors (SYST:ERR)
5. Wait for keyboard commands. When keyboard commands are entered, the echoed commands and response messages are displayed.
DEFINT A-Z
DECLARE SUB SendWecho (SendChar$)
DECLARE SUB SendCommand (SendCmmd$)
DECLARE SUB SendCmmdWready (SendCmd$)
DECLARE SUB Filter (InString$)
CONST FALSE = 0, TRUE = NOT FALSE
COLOR 7, 1 ‘ Set screen color.
CLS
Quit$ = CHR$(0) + CHR$(16) ‘ Value returned by INKEY$
‘ Set up prompt on bottom line of screen and turn cursor on:
LOCATE 24, 1, 1
PRINT STRING$(80, “_”);
LOCATE 25, 1
PRINT TAB(30); “Press ALT+q to quit”;
‘ when ALT+q is pressed.
BIT 232 2/28/00
G-1
VIEW PRINT 1 TO 23 ‘ Print between lines 1 & 23.
‘ Open communications (9600 baud, no parity, 8-bit data,
‘ 1 stop bit, 256-byte input buffer):
OPEN “COM2:9600,N,8,1,RS,CS,DS” FOR RANDOM AS #1 LEN = 256
‘ Check the RS 232 interface if characters are waiting (EOF(1) is
‘ true) and get them
IF NOT EOF(1) THEN
‘ LOC(1) gives the number of characters waiting:
SendChar$ = INPUT$(LOC(1), #1)
END IF
IF KeyInput$ = Quit$ THEN ‘ Exit the loop if the user
EXIT DO ‘ pressed ALT+q.
ELSEIF KeyInput$ <> ““ THEN ‘ Otherwise, if the user has pressed a key
SendWecho KeyInput$
END IF ‘ character typed to the modem.
PRINT KeyInput$; ‘ then print.
‘ Check the modem. If characters are waiting (EOF(1) is
‘ true), get them and print them to the screen:
IF NOT EOF(1) THEN
‘ LOC(1) gives the number of characters waiting:
CharInput$ = INPUT$(LOC(1), #1)
Filter CharInput$ ‘ Filter out line feeds and
PRINT CharInput$; ‘ backspaces, then print.
END IF
LOOP
CLOSE ‘ End communications.
CLS
END
‘
G-2
BIT 232 2/28/00
‘ ========================= FILTER ==========================
‘ Filters characters in an input string.
‘ ============================================================
‘
SUB Filter (InString$) STATIC
‘ Look for backspace characters and recode them to
‘ CHR$(29) (the LEFT cursor key):
DO
BackSpace = INSTR(InString$, CHR$(8))
IF BackSpace THEN
END IF
LOOP WHILE BackSpace
‘ Look for line-feed characters and remove any found:
DO
LineFeed = INSTR(InString$, CHR$(10))
IF LineFeed THEN
END IF
LOOP WHILE LineFeed
END SUB
‘
‘ ========================= Send Command =====================
‘ Send command line and wait for the command to be completed
‘ ============================================================
‘
SUB SendCmmdWready (SendCmd$) STATIC
WHILE Notendcm
‘ Check the modem. If characters are waiting (EOF(1) is
‘ true), get them and print them to the screen:
IF NOT EOF(1) THEN
‘ LOC(1) gives the number of characters waiting:
CharInput$ = INPUT$(LOC(1), #1)
IF CharInput$ = CHR$(62) THEN
Notendcm = FALSE
END IF
Filter CharInput$
END IF
WEND
END SUB
‘
PRINT CharInput$; ‘ backspaces, then print.
BIT 232 2/28/00
G-3
‘ ========================= Send Command =====================
‘ Send command line using SendWecho
‘ ============================================================
‘
SUB SendCommand (SendCmmd$) STATIC
FOR K = 1 TO LEN(SendCmmd$)
Istr$ = MID$(SendCmmd$, K, 1)
SendWecho Istr$
PRINT Istr$; ‘ then print.
NEXT K
Istr$ = CHR$(13)
SendWecho Istr$
PRINT Istr$
END SUB
‘
‘ ========================= Send with Echo ===================
‘ Send character and wait for the character to be echoed back
‘ ============================================================
‘
SUB SendWecho (SendChar$) STATIC
PRINT #1, SendChar$; ‘ send the pressed key
FOR J = 1 TO 100
‘ Check the RS 232 interface if characters are waiting (EOF(1) is
‘ true), get them and print them to the screen:
IF NOT EOF(1) THEN
SendChar$ = INPUT$(1, #1)
Filter SendChar$ ‘ Filter out backspace
END IF
‘ If timeout expire return empty string
SendChar$ = ““
NEXT J
END SUB
EXIT FOR
G-4
BIT 232 2/28/00
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.