KEPCO ABC VISA INSTRUMENT DRIVER User Manual

TECHNICAL MANUAL
KEPCO INC.
An ISO 9001 Company.
ABC VISA
INSTRUMENT DRIVER
MODEL
ABC VISA
INSTRUMENT DRIVER
ORDER NO. REV. NO.
IMPORTANT NOTES:
1) This manual is valid for the following Model and associated serial numbers:
MODEL SERIAL 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 num­bers. 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 Docu­mentation Office in New York, (718) 461-7000, requesting the correct revision for your par­ticular 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.
Data subject to change without notice.
KEPCO®
©2003, KEPCO, INC P/N 243-1061
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
Purpose Function Name Description
INITIALIZE FUNCTION
Initialize KpAbc_init Initializes 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 Measure KpAbc_ApplicSetMeas Used to either set and read back, or just read back the output voltage,
Get/Set Memory Value KpAbc_GetSetListValue This 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 Maxi­mum Value
KpAbc_SetStartAddr Sets the memory start address for the program chain. The program
KpAbc_GetStartAddr Gets the memory start address for the program chain. The program
KpAbc_SetMaxLimValue Sets the temporary voltage limit or current limit of the power supply.
KpAbc_GetMinMaxValue Gets 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 selec­tion 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)
Purpose Function Name Description
Set Trigger Voltage and Current
Set Trigger Value KpAbc_SetTrigValue Sets the trigger voltage or trigger current level, depending on the switch
Get Trigger Value KpAbc_GetTrigValue Gets the trigger voltage or the trigger current level, depending on the
Set Overvoltage and Overcurrent
Set Protection Delay KpAbc_setProtDelay Sets the protection delay: the delay between the moment the output
Get Protection Delay KpAbc_getProtDelay Displays 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 Current KpAbc_Set_Volt_Curr Sets the output voltage and current at the same time.
Set Value KpAbc_SetValue Sets the output voltage, the output current, the overvoltage level, or the
Get Value KpAbc_GetValue Gets the output voltage, the output current, the overvoltage level, or the
Trigger KpAbc_Trig Triggers the instrument once. The output will go to the trigger voltage
Measure Output Value KpAbc_MeasValue Measures the value of output voltage or current depending on the
Get Source Mode KpAbc_GetSourceMode Gets the operating mode of the power supply.
Output On/Off KpAbc_OutputOnOff Sets the output on or off.
Get Output Status KpAbc_getOutputState Returns the output status (on or off).
Get Protection Status KpAbc_getProtectionStatus Gets the status of overvoltage or overcurrent protection (triggered or
Clear Protection KpAbc_clearProtection Clears the overvoltage or overcurrent protection.
Abort Measurement KpAbc_abortMeas Sends the abort command.
Beep KpAbc_beep The selected ABC power supply will emit a beep.
DATA FUNCTIONS — This class of functions transfers data to or from the instrument.
Set Memory Index KpAbc_SetIndex Sets the index pointer to one of the 40 available memory locations The
Get Memory Index KpAbc_GetIndex Gets the value of the index pointer.
Set Memory Value KpAbc_SetListValue Depending on the slide selection position, this function sets the value of
Get Memory Value KpAbc_GetListValue Depending on the slide selection position, this function gets the value
KpAbc_SetTrig_Volt_Curr Sets the trigger voltage and trigger current at the same time
position.
switch position.
KpAbc_Set_OVvolt_OVcurr Sets 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 val­ues 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)
Purpose Function Name Description
Save/Recall Settings KpAbc_SaveRecSet Saves 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 Supply KpAbc_identify Returns the full message returned by the power supply to the *IDN?
Revision Query KpAbc_RevisionQuery Returns the revision numbers of the instrument driver and instrument
Model Query KpAbc_ModelQuery Return the model number of the ABC power supply.
Serial Number Query KpAbc_SerialnQuery Returns the serial number of the ABC power supply. The serial number
Query SCPI Version KpAbc_GetScpiVersion Returns the power supply answer to the Query SCPI Version com-
Set/Reset Keypad Lock KpAbc_setResetKeybLock Locks or unlocks keypad operation. Used to prevent changing the set-
Keypad Lock Status KpAbc_keybLockStat Return the status of the local keypad access: 0 if local access enabled;
Display Text KpAbc_display Configures the front panel display of the instrument. In normal mode
Get Display Text KpAbc_getDisplay Gets the string which is displayed on the second line of the display.
Get Display Contrast KpAbc_getContrast Gets the contrast value of the front panel display of the instrument
Set Display Contrast KpAbc_setContrast Configures the contrast of front panel display of the instrument (value
Write To Instrument KpAbc_writeInstrData This function writes commands and queries to the instrument to modify
Read Instrument Data KpAbc_readInstrData This function reads data from the instrument's output buffer and returns
Reset KpAbc_psReset Resets the instrument to a known state and sends initialization com-
Self-Test KpAbc_selfTest Runs the instrument's self test routine and returns the test result(s).
Error-Query KpAbc_errorQuery Reads an error code from the instrument's error queue.
Error Message KpAbc_errorMessage Takes the Status Code returned by the instrument driver functions,
Calibration Status On/Off KpAbc_CalStatus Used to enter or exit the calibration state. To enter the calibration state
previously stored settings from a memory location. The memory loca­tion 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 techni­cal support.
is extracted from the answer to the *idn? query.
mand. Checks the Standard Commands for Programmable Instru­ments (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 instru­ment 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)
Purpose Function Name Description
Calibration Mode KpAbc_CalMode Allows the user to select the calibration mode (either voltage or current
Calibration DigPot KpAbc_CalDigPot Allows a more accurate full scale calibration in both voltage or current
Calibration Output KpAbc_CalOutput Allows the user to perform the power supply calibration in both voltage
Calibration Zero KpAbc_CalZero Used to zero the output of the power supply before switching from volt-
Calibration Save KpAbc_CalSave Stores the calibration results in the nonvolatile calibration memory of
Security Code KpAbc_CalCode Allows the user to change the password to prevent accidental or unau-
Close KpAbc_close This function takes the instrument off-line.
calibration) and also allows selection of 0 (min) or full scale (max) cali­bration.
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 adjust­ment 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 com­mand
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 non­volatile 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 pass­word. 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 pro­gram. 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 vir­tual 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 exe­cute local controls and read the corresponding display. The virtual panel is a real-time display of output val­ues 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 out­put 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
tion CLEAR 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 set­tings 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 Pro­gram 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, start­ing 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 win­dow. The Run button causes the program to be executed starting at the location in the Start Address dis­play 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 volt­age 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
Example 2:
ViByte ps_type; ViSession ABC_Session;
Kpabc_init ("GPIB0::6", 1, &ps_type, &ABC_Session); //init ps Kpabc_SetValue (ABC_Session, 0, 15); //voltage Kpabc_SetValue (ABC_Session, 1, 2); //current Kpabc_OutputOnOff ( ABC_Session, 1); //output on
ABC-VISA 092303
9/(10 Blank)
Loading...