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
email: hq@kepcopower.com ! World Wide Web: http://www.kepcopower.com
THE POWER SUPPLIER™
ABC VISA INSTRUMENT DRIVER
The VISA instrument driver supplied with the ABC Power Supply is provided to simplify programming with
a VISA compatible GPIB controller. The latest driver can be downloaded from the Kepco website
(http://www.kepcopower.com/drivers.htm). Included on the driver are:
•source code (C) for all VISA functions (kp_ABC.c)
•a sample application of the VISA functions (written in C) which can be used to program
one or more ABC power supplies using a virtual front panel observed on a computer
monitor (ABC_appl.c).
Since the software drivers supplied by Kepco are VISA compliant, they require the installation of the proper
VISA driver from your GPIB card supplier. The Kepco website (http://www.kepcopower.com/drivers.htm)
provides links to various vendor sites for these drivers.
1. VISA INSTRUMENT DRIVER FUNCTIONS
Kepco’s ABC VISA instrument driver provides programming support for Kepco’s ABC Power Supply (VISA
I/O). It contains functions for opening, configuring, taking measurements from, test, calibration and closing
the instrument. To successfully use this module, the instrument must be connected to the GPIB and the
GPIB address supplied to the initialize function must match the GPIB address of the instrument.
Table 1 lists the functions that are available.
TABLE 1. ABC VISA DRIVER FUNCTIONS
PurposeFunction NameDescription
INITIALIZE FUNCTION
InitializeKpAbc_initInitializes the instrument and sets it to a default configuration.
APPLICATION FUNCTIONS — This class of functions contains high-level test and measurement routines. These functions call
other instrument driver functions to configure, start, and get readings from the instrument.
Set and MeasureKpAbc_ApplicSetMeas Used to either set and read back, or just read back the output voltage,
Get/Set Memory ValueKpAbc_GetSetListValueThis function can either get or set the values stored in any one of the 40
CONFIGURATION FUNCTIONS — This class of functions configures the instrument by setting system configuration parameters.
Set Program Start
Address
Get Program Start
Address
Set Maximum Limit
Val ue
Get Minimum or Maximum Value
KpAbc_SetStartAddrSets the memory start address for the program chain. The program
KpAbc_GetStartAddrGets the memory start address for the program chain. The program
KpAbc_SetMaxLimValueSets the temporary voltage limit or current limit of the power supply.
KpAbc_GetMinMaxValueGets the minimum or the maximum output voltage, output current,
current and operating mode of the power supply
available memory locations. Six parameter values can be stored in any
one of the 40 locations: voltage level, current level, overvoltage level,
overcurrent level, duration of the setting (if used in a program) and next
memory address (if used in a program). Depending on the slide selection position, and the value of get/set switch, one of these values is
read or set. The values are checked against the maximum acceptable
values for the corresponding power supply.
chain can also be executed in local mode. The start memory address
range is from 1 to 40.
chain can also be executed in local mode. The start memory address
range is from 1 to 40.
The limit reduces the output range of the power supply. For example,
the output voltage range of a 0 to 10V power supply can be limited to
the range of 0 to 5.25V by setting the voltage limit to 5.25V.
overvoltage level, or overcurrent level of the power supply depending
on the min_max switch and slide selection position.
ABC-VISA 092303
3
TABLE 1. ABC VISA DRIVER FUNCTIONS (CONTINUED)
PurposeFunction NameDescription
Set Trigger Voltage and
Current
Set Trigger ValueKpAbc_SetTrigValueSets the trigger voltage or trigger current level, depending on the switch
Get Trigger ValueKpAbc_GetTrigValueGets the trigger voltage or the trigger current level, depending on the
Set Overvoltage and
Overcurrent
Set Protection DelayKpAbc_setProtDelaySets the protection delay: the delay between the moment the output
Get Protection DelayKpAbc_getProtDelayDisplays the protection delay count for the power supply. A count of 30
ACTION/STATUS FUNCTIONS — This class of functions executes commands and queries. It also provides functions which allow
the user to determine the current status of the instrument.
Set Voltage and CurrentKpAbc_Set_Volt_CurrSets the output voltage and current at the same time.
Set ValueKpAbc_SetValueSets the output voltage, the output current, the overvoltage level, or the
Get ValueKpAbc_GetValueGets the output voltage, the output current, the overvoltage level, or the
TriggerKpAbc_TrigTriggers the instrument once. The output will go to the trigger voltage
Measure Output ValueKpAbc_MeasValueMeasures the value of output voltage or current depending on the
Get Source ModeKpAbc_GetSourceModeGets the operating mode of the power supply.
Output On/OffKpAbc_OutputOnOffSets the output on or off.
Get Output StatusKpAbc_getOutputStateReturns the output status (on or off).
Get Protection StatusKpAbc_getProtectionStatusGets the status of overvoltage or overcurrent protection (triggered or
Clear ProtectionKpAbc_clearProtectionClears the overvoltage or overcurrent protection.
Abort MeasurementKpAbc_abortMeasSends the abort command.
BeepKpAbc_beepThe selected ABC power supply will emit a beep.
DATA FUNCTIONS — This class of functions transfers data to or from the instrument.
Set Memory IndexKpAbc_SetIndexSets the index pointer to one of the 40 available memory locations The
Get Memory IndexKpAbc_GetIndexGets the value of the index pointer.
Set Memory ValueKpAbc_SetListValueDepending on the slide selection position, this function sets the value of
Get Memory ValueKpAbc_GetListValueDepending on the slide selection position, this function gets the value
KpAbc_SetTrig_Volt_CurrSets the trigger voltage and trigger current at the same time
position.
switch position.
KpAbc_Set_OVvolt_OVcurrSets both the overvoltage and overcurrent values.
voltage and current are changed and the moment the overvoltage and
overcurrent protections are enabled.
represent ~ 1 second. The protection delay is the delay between the
moment the output voltage and current are changed and the moment
the overvoltage and overcurrent protections are enabled.
overcurrent level of the power supply, depending on the slide selection
position. The values are checked against the maximum acceptable values for the corresponding power supply.
overcurrent level of the power supply depending on slide selection
position.
and current values.
switch position.
not triggered).
subsequent memory value changes will affect the memory location
pointed to by the index pointer.
the specified parameter (voltage level, current level, overvoltage level,
overcurrent level, time value, next memory address value) for the
memory location pointed to by the index pointer.
of the specified parameter (voltage level, current level, overvoltage
level, overcurrent level, time value, next memory address value) for the
memory location pointed to by the index pointer.
4
ABC-VISA 092303
TABLE 1. ABC VISA DRIVER FUNCTIONS (CONTINUED)
PurposeFunction NameDescription
Save/Recall SettingsKpAbc_SaveRecSetSaves the current settings to the selected memory location or restores
UTILITY FUNCTIONS — This class of functions provides lower level functions to communicate with the instrument and to change
instrument parameters.
Identify Power SupplyKpAbc_identifyReturns the full message returned by the power supply to the *IDN?
Revision QueryKpAbc_RevisionQueryReturns the revision numbers of the instrument driver and instrument
Model QueryKpAbc_ModelQueryReturn the model number of the ABC power supply.
Serial Number QueryKpAbc_SerialnQueryReturns the serial number of the ABC power supply. The serial number
Query SCPI VersionKpAbc_GetScpiVersionReturns the power supply answer to the Query SCPI Version com-
Set/Reset Keypad LockKpAbc_setResetKeybLockLocks or unlocks keypad operation. Used to prevent changing the set-
Keypad Lock StatusKpAbc_keybLockStatReturn the status of the local keypad access: 0 if local access enabled;
Display TextKpAbc_displayConfigures the front panel display of the instrument. In normal mode
Get Display TextKpAbc_getDisplayGets the string which is displayed on the second line of the display.
Get Display ContrastKpAbc_getContrastGets the contrast value of the front panel display of the instrument
Set Display ContrastKpAbc_setContrastConfigures the contrast of front panel display of the instrument (value
Write To InstrumentKpAbc_writeInstrDataThis function writes commands and queries to the instrument to modify
Read Instrument DataKpAbc_readInstrDataThis function reads data from the instrument's output buffer and returns
ResetKpAbc_psResetResets the instrument to a known state and sends initialization com-
Self-TestKpAbc_selfTestRuns the instrument's self test routine and returns the test result(s).
Error-QueryKpAbc_errorQueryReads an error code from the instrument's error queue.
Error MessageKpAbc_errorMessageTakes the Status Code returned by the instrument driver functions,
Calibration Status On/Off KpAbc_CalStatusUsed to enter or exit the calibration state. To enter the calibration state
previously stored settings from a memory location. The memory location range is from 1 to 40.
query. This message contains four fields: manufacturer, power supply
type, serial number and firmware version.
firmware version from the *idn? query. This instrument driver's Revision
Number is "Rev 1.0, 9/95, CVI 3.1" and the ABC firmware version is
Firmware Version "1.0". This data is necessary when requesting technical support.
is extracted from the answer to the *idn? query.
mand. Checks the Standard Commands for Programmable Instruments (SCPI) language version.
tings of the power supply from the local keypad.
1 if local access is disabled.
the values measured at the output of the power supply are displayed.
In text mode a user defined string can be displayed on the second row
of the display.
(between 0.1 and 0.9).
between 0.1 and 0.9).
parameters and query device settings.
it to the specified variable in memory. Because the instrument may
return both numeric and text data in response to queries, this function
returns the data in string format. NOTE: If valid data is not available at
the instrument's output buffer when this function is called, the instrument will hang up and the function will not return until it times out. If the
time-out is disabled,` this function will hang indefinitely and it may be
necessary to reboot the computer to break out.
mands to the instrument.
interprets it and returns it as a user readable string.
a 4 digits password is required. When the instrument is shipped from
the factory the calibration password is the 4 digit model number. The
password protects the instrument against unauthorized calibrations.
ABC-VISA 092303
5
TABLE 1. ABC VISA DRIVER FUNCTIONS (CONTINUED)
PurposeFunction NameDescription
Calibration ModeKpAbc_CalMode Allows the user to select the calibration mode (either voltage or current
Calibration DigPotKpAbc_CalDigPotAllows a more accurate full scale calibration in both voltage or current
Calibration OutputKpAbc_CalOutputAllows the user to perform the power supply calibration in both voltage
Calibration ZeroKpAbc_CalZeroUsed to zero the output of the power supply before switching from volt-
Calibration SaveKpAbc_CalSaveStores the calibration results in the nonvolatile calibration memory of
Security CodeKpAbc_CalCodeAllows the user to change the password to prevent accidental or unau-
CloseKpAbc_closeThis function takes the instrument off-line.
calibration) and also allows selection of 0 (min) or full scale (max) calibration.
mode. Moving the digital potentiometer allows the user to approach the
nominal full scale value of the corresponding power supply. This is a
coarse adjustment for the full scale value which must be followed by a
fine adjustment done with the Calibration Output function.
or current mode. By moving the digital to analog converter the number
of LSB's specified in the repeat count, the user can approach the 0 or
full scale value of the corresponding power supply. This is a fine adjustment for the 0 or full scale value. The user can specify a repeat count
between 1 and 9 in order to avoid having to repeat sending the command
age calibration to current calibration (to allow a calibration resistor to be
connected between the power supply output terminals.
the instrument.
thorized calibrations of the instrument. The password is stored in nonvolatile memory, and does not change when power has been off or
after a reset. To change the password, the instrument must already be
in calibration status, ensuring that the user knows the current password. If the password is lost, call the factory for support.
2. DEMONSTRATION PROGRAM USING THE VISA DRIVER
The demonstration program is intended to illustrate the use of the VISA functions included with the ABC
power supply. The program can be used as is, or used as a starting point for a custom user-designed program. The source file (kp_appl.c) is included on the VISA driver diskette. The demonstration program is
installed under Windows by running SETUP.EXE. The program can be used to program and view the virtual front panels of up to 10
ABC Power Supplies. After the program is installed, double click on kepco-
abc.exe to run the program.
After the program is installed, double click on ABCCTRL.exe to run the program.When the GPIB Setup
window opens, enter the GPIB address of the ABC power supply to connect to the VISA interface. If the
power supply type is correct, the Continue button will open the Main Panel (Figure 2).
FIGURE 1. GPIB SETUP WINDOW
6
ABC-VISA 092303
. Once you are connected, you will see the Main Panel (Figure 2).
FIGURE 2. ABC VISA APPLICATION, VIRTUAL PANEL PLUS SPECIAL FUNCTION WINDOWS
The virtual front panel can show all power supply parameters simultaneously, without the having to execute local controls and read the corresponding display. The virtual panel is a real-time display of output values and programmed parameters. All local functions are also available from the virtual panel. The virtual
panel is shown at the upper left of Figure 2; additional windows for Protections, Limits, Program Memories
(below the panel), Edit Program Memory, Program, Display Change, and Display message (To the right of
the panel) are also illustrated.
At the top of the panel, the Mode indicators light to indicate whether the power supply is operating in either
CV (constant voltage) or CC (constant current) mode. At the top left and right are analog meters that read
actual output voltage and current; a Display window at the center provides a more precise digital readout
of actual output voltage and current. Above the display window, between the two analog meters, is the
Output button which either applies the programmed settings to the output terminals (ON) or keeps the output voltage and current at zero (OFF). Indicators on either side of the digital display window, V limit and C limit, light (red) if the programmed voltage or current limit is exceeded. The Set Voltage and Set Current
windows are adjacent to the limit indicators. Displayed settings can be changed either by clicking on the
arrows to the left of the display window, or by using the mouse to highlight the setting, then typing in the
new value.
Additional features can be accessed by twelve buttons arranged in two rows of six at the bottom of the
panel. The Beep button causes the selected power supply to beep. The Protection button opens the Pro-tection window that shows the overvoltage, overcurrent and protection delay settings, the OV/OC Protec-
ABC-VISA 092303
7
tionCLEAR button resets the overvoltage and overcurrent protection if it has tripped (voltage and current
are reset to the programmed values in effect when protection tripped). The Memory button opens the Pro-gram Memories window that allows the active values for output current and voltage, and programmed settings for overvoltage and overcurrent protection to be stored in one of the 40 available memory locations,
or be recalled from a previously stored location. The Trigger button opens the Trigger window which
allows trigger voltage and current values to be set; the Trigger button within the Trigger window causes
the power supply output to be programmed to the settings of trigger voltage and current. The Calibrate
button is used to recalibrate the unit (see Section 4 of the Technical Manual). The Reset button resets the
unit to the power on defaults: output voltage and current set to zero, overvoltage and overcurrent set to
approximately 10% above rated maximum.
The ABOUT button displays the model, serial number and firmware version number. The Limit button
opens the Limits window that reveals the Voltage and Current Limit settings. The Program button opens
two windows used to control local programming. The Edit Program Memory window is used to view or
change any of the six stored parameters for the memory location selected by the Memory window. The V >
OV and C > OC indicators light (red) if the Edit Program values for voltage or current exceed the Edit Program values for Overvoltage or Overcurrent. The Program Window is used to execute the local program
established by the Edit Program Window. The Step button executes one memory location at a time, starting at the Start Address; the Step Mode indicator lights after the first step is executed. As each step is
executed, the corresponding values for each parameter are displayed in the Edit Program Memory window. The Run button causes the program to be executed starting at the location in the Start Address display window; the Running indicator lights (green) while the program is running. The Clear button stops a
program that is running.
The Keypad button either enables (UNLOCK) or disables (LOCK) the local keypad of the selected ABC
power supply. The Display button opens the Display Change window which allows adjustment of the local
LCD contrast, and selection of Normal/Text mode for the LCD. In Normal mode, the bottom line of the local
LCD displays output voltage and current. In Text mode, the text typed in the Display Message window is
displayed on the bottom line of the LCD. The QUIT button is used to exit the sample VISA application.
WARNING:
Once the program is started, actual values of output current and voltage are displayed. If you exit the program while the power supply is still
on, the programmed settings in effect at that time are maintained after
exiting the program.
8
ABC-VISA 092303
3. EXAMPLES
The following examples show the functions needed to set voltage to 15V, current to 2 amp and output ON.
Example 1:
ViByte ps_type;
ViSession ABC_Session;
Kpabc_init ("GPIB0::6", 1, &ps_type, &ABC_Session); //init ps
Kpabc_Set_Volt_Curr (ABC_Session, 15, 2);//voltage and current
Kpabc_OutputOnOff ( ABC_Session, 1);//output on