TABLE OF CONTENTS SECTION PAGE SECTION 1 - INTRODUCTION General Description ............................ 1-1 1.1.1 Drivers ..............................1-1 1.1.2 Communication ............................1-2 1.1.3 Programming............................1-2 Driver Overview ............................1-2 1.2.1 Initialization.............................. 1-3 1.2.2 Output Control ............................1-3 1.2.3 Measurement ............................1-3 1.2.4 Limit Models (User-defined Voltage/Current Limits)................
Page 4
TABLE OF CONTENTS SECTION PAGE Example of Setting the Output ........................4-6 4.5.1 Initialization Function ..........................4-7 4.5.2 Set the OUtput ON or OFF ........................4-9 4.5.3 Get Measurement and Status......................... 4-9 4.5.4 Close Connection ........................... 4-9 Interactive demonstration program ......................4-10 4.6.1 KepcoDCPwr Interactive Example.vi ......................
Page 8
LIST OF FIGURES FIGURE TITLE PAGE Status Reporting Structure ......................... 1-5 KLR Communication, Block Diagram ......................2-1 Example of Setting the Output and taking a measurement, written in C++..........3-6 Example of Using a List, written in C#......................3-9 Setting the Output and taking a measurement Example, written in Visual Basic........3-14 Example of Using a List, written in Visual Basic..................
Page 9
LIST OF TABLES TABLE TITLE PAGE VISA Resource String Corresponding to Interface ..................1-2 Front Panel Lockout Commands ........................2-2 RS 232 Setup ..............................2-4 KLR IVI-COM Driver Functions ........................3-3 KLR LabView G Driver Functions .......................4-2 epco onfigure oltage evel Input/Output Descriptions ............4-4 Error (or Explain Warning) Codes .......................4-4 epco easure...
New York, U.S.A. Basic operation of the front panel controls as well as analog programming of the KLR Series is covered in the KLR User Manual. (When analog programming is in use, the unit will still respond to digital queries related to status and readback.) Refer to the KLR User Manual for all other installation and operating instructions.
LabView G driver also uses VISA calls, allowing it to work on all ports of the KLR. The examples given in Programming, Section 6, PAR. 6.8, all utilize VISA calls so they are universally applied. TABLE 1-1. VISA RESOURCE STRING CORRESPONDING TO INTERFACE VISA RESOURCE STRING COMMENT INTERFACE...
1.2.1 INITIALIZATION When an instrument is first accessed, it is desirable to have it start at a standard state and to verify that the instrument is the correct one. These functions utilize standard commands which are common to all power supply class instruments such as *IDN? *CLS and *RST. In the various drivers, this functional group also includes an open and close functionality.
NOTES: 1. When programming sequential voltage levels, it is important to set the Overvoltage to accommodate the highest voltage of the sequence. Otherwise, when going from higher to lower voltage levels, the overvoltage protection will trip and shut down the unit because the overvoltage setting registers faster than the power supply can attain the lower voltage.
Page 15
For example, if an overvoltage error is detected, bit 0 of the Questionable Status Condition reg- ister is set. The 0 to 1 transition causes bit 0 to be stored as a 1 in the corresponding Event reg- ister. If bit 0 of the Questionable Status Enable register has bit 0 set, bit 3 of the Status Byte (STB) register is asserted.
When the service request is executed, the STB register bits are read: bit 3 set indicates Ques- tionable Status; bit 2 set indicates the error/event queue is not empty; bit 4 set indicates that a message is available in the output buffer. bit 5 set indicates event status; bit 7 set indicates operation status.
A bit set in the Questionable Condition register indicates that the data currently being acquired or generated is of questionable quality due to some condition affecting the parameter associ- ated with that bit. • 0 - Overvoltage Error — 1 indicates an overvoltage fault has been detected. •...
SECTION 2 - COMMUNICATION INTRODUCTION Figure 2-1 shows all paths used to communicate with the KLR. These include local control from the front panel, GPIB, LAN (Ethernet) for E-Series models only, and RS 232 for standard mod- els only. LAN (ETHERNET) ** CLASS A/B SCPI RAW UDP LXI...
Requires the instrument session and a Boolean value of 0 for off and 1 to lock the keyboard. LabView G Kepco Serial initialize with options The input defaults to lock the keyboard. IVI-COM Requires the instrument session and a Boolean value of 0 for off and 1 to lock the keyboard.
• Port 5025 - SCPI Raw. This port supports up to two connections. The SCPI-Raw port provides faster access than the VXI-11 port (1024) as it has little overhead. This port is accessed using the VISA resource string, e.g.: TCIPO::192.168.1.100::5025:SOCKET •...
Page 22
NOTE: Kepco strongly recommends the XON XOFF method for data transfer via RS 232 proto- col for all Kepco products. If this method is not selected, it is the user's responsibility to ensure completion of any response by the power supply prior to issuance of subsequent commands.
The IVI-COM (Interchangeable Virtual Instrument) driver provided with the instrument can be used with many Kepco power supplies. The KLR does not support all features found in the driver, specifically those related to the Bipolar type power supplies. It allows remote program- ming of the KLR via either the LAN (E-Series models only), GPIB (all models) or RS 232 (stan- dard models only) ports.
3.1.6 RIGHTS The IVI-COM driver was written by Kepco for use on Kepco products. It was written using Pacific Mindworks Nimbus system. It is intended for use with Kepco power supplies. Disassem- bly and/or modification of the IVI-COM driver is expressly forbidden.
Page 25
TABLE 3-1. KLR IVI-COM DRIVER FUNCTIONS Function Name Purpose Initialization KpDCPwr_init Initialize Power supply, create session handle. KpDCPwr_InitWithOptions Initialize power supply, allowing user to determine reset and identifi- cation options. KpDCPwr_close Close session handle. KpDCPwr_LockSession Prevents other instrument tasks from accessing unit. KpDCPwr_UnlockSession Allows other instrument tasks to access unit.
3.3.1 SETTING THE OUTPUT TO A VALUE AND MAKING A MEASUREMENT The filename for this example is C output example.txt, located in the ivi\drivers\kepco\examples folder (see Figure 3-1 for complete code). All programs written in C++ must open the driver and include some standard H files.
Page 27
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This program demonstrates how to set a voltage and current and measure the output voltage using the IVI-COM driver. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ #include <stdafx.h> #include <stdio.h> #include <conio.h> #include <atlbase.h> #import "IviDriverTypeLib.dll" no_namespace #import "IviDCPwrTypeLib.dll" no_namespace #import "KepcDCPwr.dll" no_namespace The driver dll’s must be loaded and initialized to operate: hr = CoInitialize(NULL);...
Page 28
The setting of voltage and current is then very simple. // set voltage hr = outputPtr->VoltageLevel(75.0); if (FAILED(hr)) exit(1); // set the current limit hr = outputPtr->CurrentLimit(10); if (FAILED(hr)) exit(1); // enable the output outputPtr->Enabled = true; Sleep(500); Note that a measurement requires accessing a function, not a variable. // measure the voltage double measVoltage;...
Page 29
// open the instrument for communication hr = driverPtr->Initialize( L"GPIB0::6::INSTR", //Visa address,(not applicable if simulation=true) VARIANT_TRUE, // ID query VARIANT_TRUE, // Reset LPCTSTR("Cache=true, InterchangeCheck=false, QueryInstrStatus=true, Simulate=false")); //IVI options if (FAILED(hr)) exit(1); // Get InstrumentFirmwareRevision property. BSTR bstrInstrFwRev; bstrInstrFwRev = driverPtr->Identity->InstrumentFirmwareRevision; wprintf(L"InstrumentFirmwareRevision: %s\n", bstrInstrFwRev);...
3.3.2 USING A LIST TO PERFORM A SERIES OF OPERATIONS The filename for this example is Clistexample.txt, located in the ivi\drivers\kepco\examples folder (see Figure 3-2 for complete code). This example is written in C# and applies to a KLR 75-32 (either standard or E-Series model).
Page 31
currList[4] = 2; currList[5] = 2; dwellTime[0] = 1; dwellTime[1] = 2; dwellTime[2] = 3; dwellTime[3] = 4; dwellTime[4] = 5; dwellTime[5] = 0.01; The following command uses the IVI-COM driver to send the lists to the KLR. Note that the arrays are passed by reference to the driver.
Page 32
// Initialize driver KLRdriver.Initialize("GPIB0::6::INSTR", true, true, "Cache=true,InterchangeCheck=false,QueryInstrStatus=true,Simu- late=false");//Optional ivi options System.Console.WriteLine("Done.\n"); // get references to the needed interfaces outputPtr = KLRdriver.Outputs.get_Item(driver.Outputs); listPtr = KLRdriver.List.get_Item(driver.Lists); //create arrays for the ListPoints method double[] voltList = new double [6]; double[] currList = new double [6]; double[] dwellTime = new double [6];...
3.3.3 SETTING LIMIT MODEL This example is a series of files found on the CD in the ivi\drivers\kepcodcpwr\example\cviVirtual directory. In CVI you just need to open the .prj file to access the entire project Note: This project file establishes a link to the kepcodcpwr.fp file by using the Edit menu -> project ->...
The following example, written in Visual Basic, sets the output to a value and then takes a mea- surement. The filename for this example is VBOutputExample.txt, located in the ivi\driv- ers\kepco\examples folder (see Figure 3-3 for complete code). Note that Visual Basic has its own methods to support the IVI-COM driver.
Page 35
Using the pointers it becomes very easy to set voltage and current. Each parameter is simply loaded with the value to be set using individual statements. ' set voltage level outputPtr.VoltageLevel 75 ' enable OV protection and set OV level protectionPtr.ConfigureOVP 15 ' set current level outputPtr.CurrentLimit 10...
Page 36
'/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' This program demonstrates how to set the output voltage and current measure the voltage ' using the IVI-COM driver. '/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Option Explicit Public driver As KepcoDCPwr Public outputPtr As IKLROutput Public protectionPtr As IKLRProtection Public measurementPtr As IKLRMeasurement Private Sub cmdExit_Click() Unload Me End Sub...
WRITTEN IN VISUAL BASIC (SHEET 2 OF 2) 3.4.2 USING A LIST TO PERFORM A SERIES OF OPERATIONS The filename for this example is VBListexample.txt, located in the ivi\drivers\kepco\examples folder (see Figure 3-6 for complete code). '/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'This program executes a 6 point current and voltage list.
The filename for this example is VBlimit model Example.txt, located in the ivi\driv- ers\kepco\examples folder (see Figure 3-5 for complete code). This example is very similar to the other examples in this section. The difference is that functions in the driver are used to per- form the operation instead of setting the value to a specific state.
'/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' This program demonstrates how to set the limit model ' using the IVI-COM driver. '/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Option Explicit Public driver As KepcoDCPwr Private Sub cmdExit_Click() Unload Me End Sub Private Sub cmdStart_Click() Set driver = New KepcoDCPwr On Error GoTo ErrorHandler ' initialize the driver - note ID device is true driver.Initialize "GPIB0::6::INSTR", _ True, _...
3.5.1 SETTING THE OUTPUT TO A VALUE Figure 3-6 illustrates the use of the IVI-COM driver with LabView to set the KLR output to a value. The first two blocks show the automation controller and kepcodriver functions. These are followed by the initialize method of the driver, Referring to Figure 3-6, the initialize method makes the connection to the KLR using the visa resource string.
FIGURE 3-7. MEASURING VOLTAGE AND CURRENT USING LABVIEW WITH IVI-COM DRIVER 3.5.3 CHANGING THE LIMIT MODEL The limit model Vi is very similar to the output setting and measurement examples; it has the identical open and close functionality. The middle three blocks set the password, then cause the voltage limit and the current limit to be applied to the KLR.
LABVIEW G INSTRUMENT DRIVER The LabView G driver is a multipurpose driver. It is capable of operating all Kepco Power sup- plies using LabView Version 8 except for multiple output units such as MST. The LabView G driver does not report model-specific errors but, using case structures, passes the function and an appropriate model- specific response to the user’s program.
Page 44
Makes Visa Connection. Creates Open handle Provides ability to issue Reset and parse IDN KepcoDCPWR initialize Makes Visa Connections, No Reset, IDN is parsed and Kepco model is properly identified. Kepco Serial initialize with options Makes Visa Connection. Creates Open handle...
TABLE 4-1. KLR LABVIEW G DRIVER FUNCTIONS (CONTINUED) Function Name Purpose KepcoDCPWR Clear All Lists Clears the list if not executing. KepcoDCPWR Configure List Loads a specific list from an array of numbers. KepcoDCPWR Configure List Count Initializes the list count variable Trigger Functions KepcoDCPWR Configure Triggered Current Level Establishes the current level upon receipt of a valid trigger...
The handle identifies a particular instrument session. Default Value: None Model In - Model In is the type of Kepco power supply. This defines the capabilities and requirements in other Kepco functions to insure proper operation of the command. This function works on All Kepco power Supplies: BOP-HP, BOP-LP, KLR, STANDARD, MULTI and MULTI_PLUS.
Page 47
FIGURE 4-2. KepcoDCPwr Configure Voltage Level.vi BLOCK DIAGRAM Figure 4-3 shows that when the error is true (not equal to zero), the function is a null function, passing the inputs (VISA session, Model, Channel and error) through the function without modi- fication.
EXAMPLE OF SETTING THE OUTPUT Figure 4-6 shows the use of the Kepco subvi's to initialize the driver and the device, set the out- put on or off, establish a voltage and current setting, get a measurement and unit status, and close the session to release the memory.
KepcoDCPWR initialize with options (not used in the example) uses KepcoDCPWR ini- tialize except that Kepco-recommended options are preset: the reset and identify flags set. All subsequent functions have at least two inputs: VISA session and Model In. VISA session is the output of viOpen.
Page 50
The third subVi is KepcoDCPWR Configure Voltage Mode. This block sets the mode to Fixed. It is recommended that the mode be set to Fixed in order to stop a list if it is running, however if the Reset Device input into the first block is true, this block is not needed since *RST also stops a list.
4.5.2 SET THE OUTPUT ON OR OFF The following three functions are all that are required to set a voltage, current and change the output state: • KepcoDCPWR Configure Voltage Level - Sets the voltage output of the power supply •...
KepcoDCPwr Interactive Example.vi is the main demonstration program. The file is located in program files\national Instruments\labview\drivers\kepco. Either double-click on the file or open the file using File > Open from within LabView. When the program is opened, the Front Panel (Figure 4-7) is displayed.
Page 53
NOTE: When accessed via TCP/IP the four buttons at the bottom of the panel (Software Ramp, Programmed List, Function Generator and Arbitrary Waveform) are not visible. Below the logo is the VISA Resource Name field. With the application stopped, click on this field to display a drop-down menu.
FIGURE 4-8. SOFTWARE RAMP PANEL, CURRENT RAMP EXAMPLE These files are located in the kepco DcPWr folder created when the Kepco LabView G driver is installed and can be executed by selecting File > Run from within LabView. When invoking either of these files directly, either a network address or a GPIB address must be set before clicking Start Ramp (this is automatic when executing Software Ramp via the Front Panel.
Page 55
The four boxes labeled Start (beginning of ramp), End (end of ramp), Voltage Increment [or Cur- rent Increment] (determines the size of steps, affecting the smoothness of the ramp) and Dwell (length of time from start to end of ramp) are used to build the ramp. As soon as these values are entered, the Current [or Voltage] Vs Time Graph shows what the settings will produce when applied to the output.
Kepco measure vi and do it again for current. A delay is initiated at the start of the function so the time it takes for the commands to execute does not affect the overall ramp operation (unless the dwell time is less than 0.01 second on an older PC or about...
4.6.4 FUNCTION GENERATOR (Supported in Standalone Configurations Only) NOTE: Complex, dynamic waveshapes typically require a power supply output that can both source and sink current, however KLR models without R Option can only source cur- rent, and depend on the load to sink current. KLR Models with R Option can sink cur- rent for brief periods.
Page 58
FIGURE 4-10. FUNCTION GENERATOR PANEL FIGURE 4-11. CONFIGURE User Sequence.vi BLOCK DIAGRAM 4-16 KLR-DEV 060713...
The driver differs from the IVI and LabView G driver in that it will only operate on a Kepco KLR product and has not support for generic opera- tion or operating other Kepco supplies.
Page 64
TABLE 5-1. KLR VXI PLUG&PLAY DRIVER FUNCTIONS (CONTINUED) Purpose Function Name Description Measure Current and Kpklr_MeasVoltCurr Measures the values of output (voltage and current). Voltage Output Values SETTING AND MONITORING OUTPUT FUNCTIONS (CONTINUED) Get Source Mode Kpklr_GetSourceMode Gets the operating mode of the power supply. Output On/Off Kpklr_OutputOnOff Sets the output on or off.
TABLE 5-1. KLR VXI PLUG&PLAY DRIVER FUNCTIONS (CONTINUED) Purpose Function Name Description Calibration Restore Kpklr_CalRestore instrument receives calibration data in Intel hex format and replaces the Working Calibration. ARBITRARY WAVEFORM FUNCTIONS (Standalone configuration only) Clear List Kpklr_ListCl Clears the list to prepare for adding points. Add Volt Step Value Kpklr_ListVolt Add a single voltage entry to the end of a list.
Page 66
#include <formatio.h> #include <visa.h> #include "kp_KLR.h" /* Order of the H files is important. visa.h uses some of the formation functions kp:KLR.h needs definitions from vias.h to compile correctly ***** end of required h files */ Void main{ /* call function to set power supply to 15 volts at 12 amperes */ Set_powersupply(15,12);...
500 milliseconds. The loop uses the set value function to only update the voltage setting during the loop. This speeds up the process and follows the Kepco’s recommended program- ming practice of only changing one variable during the loop. The current setting is set for the worst case output setting of the power supply to insure it remains in voltage mode of operation and has the cleanest and fastest rise times.
Page 68
Kpklr_Set_Volt_Curr (KLR_Session, voltage, current); //voltage and current The above function sets both the voltage and current setpoint of the power supply Kpklr_OutputOnOff ( KLR_Session, 1); // output on for (i=0;i<10;i++){ // generates the ramp ten times for (voltage-voltage_start; voltage <=voltage_end; voltage+=voltage_change){ Kpklr_SetValue (KLR_Session, voltage,0);...
5.4.3 EXAMPLE 3: USING THE POWER SUPPLY TO TAKE MEASUREMENTS Figure 5-3 is an example of using the power supply to take measurements #include <formatio.h> #include <visa.h> #include "kp_KLR.h" /* Order of the H files in important visa.h uses some of the formation functions kp:KLR.h needs definitions from visa.h to compile correctly ***** end of required h files */ /* select one of the following strings depending upon port to be used */...
Page 70
/* function Set_powersupply Sets power supply to the supplied voltage and current Also sets the output on as setting to a voltage and current Implies output being placed on ViStatus Set_powersupply (ViReal64 voltage, ViReal64 current){ ViStatus power_supply_status = VI_SUCCESS; Kpklr_Set_Volt_Curr (KLR_Session, voltage, current); //voltage and current The above function sets both the voltage and current setpoint of the power supply Kpklr_OutputOnOff ( KLR_Session, 1);...
DEMONSTRATION PROGRAM USING THE VXI PLUG&PLAY DRIVER The demonstration program is intended to illustrate the use of the VXI plug&play functions included with the KLR power supply. The demonstration program is installed under Windows by running SETUP.EXE. The program as written presents a virtual front panel for control of a single KLR power supply The following paragraphs describe the windows and the associated controls and indicators pro- vided with the demonstration program.
FIGURE 5-5. MAIN PANEL WINDOW 5.5.2 MAIN PANEL The main panel window allows remote access to many power supply parameters without having to operate the local controls and read the corresponding displays, and provides a demonstration of the programming flexibility of the KLR power supply. The main panel is a real-time display of output values and programmed parameters.
Page 73
ual, “Viewing/Changing Overvoltage or Overcurrent Protection Values,” and may affect prior output settings. FIGURE 5-6. PROTECTION WINDOW The Store/Recall button displays the Store/Recall window (Figure 5-7) which can be used to store or recall up to 40 different power supply settings. After selecting a location, the Store but- ton saves the current power supply settings for Voltage Setpoint, Current Setpoint, and Output State (On or Off) at the selected location.
Page 74
The Calibrate button opens the Calibration Window (Figure 5-9), and is used to recalibrate the unit (see Section 4 of the KLR User Manual). This button is disabled for master/slave configura- tions; units must be configured for Standalone to be calibrated. FIGURE 5-9.
Page 75
The Utilities button opens the Utilities window (Figure 5-12). Calibration Data (hex format) may be archived and restored using the Dump and Restore but- tons, respectively. When the Dump button is clicked, the program will prompt the user for a location and file name for all three calibration locations (see KLR User Manual).
5.5.3 POWER SUPPLY EVENTS A Source Power Loss error will cause the Power Supply Event Window (Figure 5-13) to open. This allows the user an opportunity to correct the error condition and continue or quit the VXI plug&play application. If this window opens when operating a master/slave configuration, power to both units must be turned off, then reapplied before pressing either of the two buttons, other- wise the VXI plug&play application will terminate incorrectly.
SECTION 6 - PROGRAMMING THE KLR USING SCPI COMMANDS SCPI PROGRAMMING SCPI (Standard Commands for Programmable Instruments) is a programming language con- forming to the protocols and standards established by IEEE 488.2 (reference document ANSI/ IEEE Std 488.2, IEEE Standard Codes, Formats, Protocols, and Common Commands). SCPI com- mands are sent to the KLR Power Supply as ASCII output strings within the selected program- ming language (PASCAL, C, BASIC, etc.) in accordance with the manufacturer’s requirements for the particular GPIB controller card used.
6.4.9 SYSTEM SUBSYSTEM This subsystem controls the RS 232 port, GPIB address, passwords, security, language, key- board lockout, and compatibility with older Kepco equipment. 6.4.10 [SOURCE:]VOLTAGE AND [SOURCE:]CURRENT SUBSYSTEMS These subsystems program the output voltage and current of the power supply. An R-Option (Rapid Output Discharge Circuit installed) unit configured for Standalone operation can gener- ate a voltage or current transient from 0.04 to 655.36 seconds in length.
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 indi- cates the end of a line (“newline”...
To identify the short form and long form in this manual, keywords are written in upper case let- ters 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).
• new line (<NL>), ASCII 10 (decimal) or 0A (hex) NOTE: Kepco power supplies require a message terminator at the end of each program mes- sage. 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>...
UNDERSTANDING THE COMMAND STRUCTURE Understanding the command structure requires an understanding of the subsystem command tree illustrated in Figure 6-2. The “root” is located at the top left corner of the diagram. The parser goes to the root if: • a message terminator is recognized by the parser •...
• Several commands may be sent as one message; a line feed terminates the message. Commands sent together are separated by a semicolon (;). The first command in a mes- sage starts at the root, therefor a colon (:) at the beginning is not mandatory. e.g., the command meas:volt?;:curr? will read output voltage and programmed cur- rent since the colon preceding curr? indicates that curr? is not part of the meas com- mand and starts at the root.
Page 85
/**************************************************************************/ /* Sample Program For KEPCO power supply, using National Instruments */ /* any interface /**************************************************************************/ #include "visa.h"// visa controls and functions #include <stdio.h> #include "decl.h" ViChar rd_str[80]; // Input buffer ViChar dat_str[80]; // Output buffer /* select one of the following strings depending upon port to be used */ ViChar id_str{}="GPIB::06::INSTR";...
SECTION 7 - IEEE 488.2 (GPIB) INTERFACE DIGITAL REMOTE MODE PROGRAMMING USING IEEE 488.2 (GPIB) INTERFACE KLR Power Supplies may be programmed over the IEEE 488 standard communication bus (General Purpose Interface Bus, GPIB) control bus using SCPI (Standard Commands for Pro- grammable Instruments).
Page 88
TABLE 7-2. IEEE 488 (GPIB) BUS INTERFACE FUNCTIONS SUBSET FUNCTION COMMENTS SYMBOL Source Handshake Complete Capability (Interface can receive multiline messages) Acceptor Handshake Complete Capability (Interface can receive multiline messages) Talker Basic talker, serial poll, unaddress if MLA (My Listen Address) (one-byte address) Listener Basic listener, unaddress if MTA (My Talk Address) (one-byte address).
TABLE 7-4. IEEE 488 (GPIB) BUS DATA MODE MESSAGES MNEMONIC MESSAGE DESCRIPTION COMMENTS Data Byte Received or Sent Received or Sent End of String Received or Sent Request Service Sent Status Byte Sent 7.2.1 CHANGING THE GPIB ADDRESS Use the SYST:COMM:GPIB:ADDR? query to read the current GPIB address. Use the SYST:COMM:GPIB:ADDR command to change it.
SECTION 8 - RS 232C INTERFACE [STANDARD MODELS ONLY] DIGITAL REMOTE MODE PROGRAMMING USING RS 232 [STANDARD MODELS ONLY] KLR standard models may be programmed over the RS 232 control bus using SCPI (Standard Commands for Programmable Instruments) (see Section 6). Refer to the KLR User Manual for RS232 input/output signal allocations.
BS removes the last character in the input buffer queue, with the exception of CR or LF/NL char- acters. Either the CR or LF (NL) acts as the line terminator, initiating parsing of the ASCII data sent to the KLR Power Supply by the command originator. When the line is parsed, the KLR sends a) the line terminator sequence CR LF to the command originator if Prompt is enabled,or b) the LF character if Echo is enabled and Prompt is off, or c) XON if both Echo and Prompt are off.
NOTE: Kepco strongly recommends the XON XOFF method for data transfer via RS 232 pro- tocol for all Kepco products. If this method is not selected, it is the user's responsibility to ensure completion of any response by the power supply prior to issuance of subse- quent commands.
If each of the above steps is completed successfully, the problem lies in the computer hard- ware and/or software. Refer to the Product Support area of the Kepco website for additional information regarding RS 232 Communications problems: www.kepcopower.com/support. KLR-DEV 060713...
SECTION 9 - LAN INTERFACE [E-Series MODELS ONLY] INTRODUCTION KLR Power Supplies may be programmed via the LAN interface using the ports illustrated in Figure 2-1. These ports are described in the following paragraphs. USING PORT 80 (WEB INTERFACE) The web interface via port 80 supports up to eight connections to the unit. For details as to how to access, operate and configure the unit using the web interface, refer to the KLR User Manual.
USING PORT 5025 (SCPI-RAW) The SCPI-Raw port provides faster access than the VXI-11 port (1024) as it has little overhead. This port is accessed using the VISA resource string, e.g.: TCIPO::192.168.1.100::5025:SOCKET This port can also be accessed via the telnet utility but the data sent is not echoed back to the user and there is no prompt string.
APPENDIX A - IEEE 488.2 COMMAND/QUERY DEFINITIONS INTRODUCTION This appendix defines the IEEE 488.2 commands and queries used with the KLR Power Supply These commands and queries are preceded by an asterisk (*) and are defined and explained in PAR. A.2 through A.17, arranged in alphabetical order. Table A-1 provides a quick reference of all IEEE 488.2 commands and queries supported in the KLR Power Supply.
*ESE? *ESE? — STANDARD EVENT STATUS ENABLE QUERY Syntax: *ESE? Return value: Integer> value per Table A-2. Description: Returns the mask stored in the Standard Event Status Enable Register. 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).
The character string for E-Series models with RODC contains the following fields: <Manufacturer>,<Model> LAN RODC,<Last Calibration Date>,<Serial Number>,<Firmware revision>- <LAN Firmware revision> where: • <Manufacturer> = KEPCO • <Model> = KLR V-C (V is E , C is I oMAX oMAX <Model_S>...
*OPT? *OPT? — OPERATION COMPLETE QUERY Syntax: *OPT? Return value: option string which is a comma separated list 250 LST,.01 TMIN,655.36 TMAX,3 RL,40 MEM,4 DSM,CCAL where: xxx LST indicates maximum number of points supported by list yyy TMIN indicates minimum list dwell time in seconds zzzzzz TMAX indicates maximum list dwell time in seconds 3 RL indicates keyboard lockout supported aa MEM indicates number (aa) of save and recall memory locations...
Returns 32 (bit 5 set), indicating command error has occurred since the last time the register was read. *IDN? Returns: “KEPCO, KLR 75-32, mm-dd-yyyy, Axxxxxx, Vx.xx" where mm- dd-yyyy indicates date of last calibration, Axxxxxx indicates unit serial number and Vx.xx indicates firmware revision.
TABLE A-3. SERVICE REQUEST ENABLE AND STATUS BYTE REGISTER BITS OPER Operation Status Summary Master Status Summary LIST Request for Service CONDITION OPER QUES Event Status Byte summary Message available QUES QUEStionable Status Summary ERR QUE 1 or more errors occurred (see VALUE PAR.
APPENDIX B - SCPI COMMAND/QUERY DEFINITIONS INTRODUCTION This appendix defines the SCPI subsystem commands and queries used with the KLR Power Supply. Subsystem commands are defined in PAR. B.3 through B.106, arranged Alphabetically in groups as they appear in the tree diagram, Figure 6-2. Table B-1 provides a quick reference of all SCPI subsystem commands and queries used in the KLR power supply.
To use these commands, refer to Kepco’s website (www.kepcopower.com/drivers) and download the LabWindows/ CVI Version 5 driver for KLR. This file provides remote calibration capability and uses the following...
NOTE: The following example assumes KLR 75-32 with limit model set for 75V, 16A and output operating in volt- age stabilization mode. See Figure B-3 for directions on programming limit model settings. OUTP ON Enables output. OUTP? Returns 1 (output enabled). STAT:PRES Disables all status event reporting.
INIT:CONT? INITiate:CONTinuous QUERY Syntax: Short Form: INIT:CONT? Long Form: INITiate:CONTinuous? Return Value: 1 or 0 (1 = on, 0 = off) Description: Determines whether continuous triggers are enabled or disabled. Power supply returns value of INIT:CONT flag: “1” = continuous triggers are enabled (INIT:CONT ON); “0” = continuous triggers dis- abled (INIT:CONT OFF).
Page 107
LIST:COUN:SKIP? B.16 [SOURce:]LIST:COUNt:SKIP? QUERY Syntax: Short Form: LIST:COUN:SKIP? Long Form: LIST:COUNt:SKIP? Return Value: <int_value> Description: Identifies how many steps will skipped the first time the list is executed. Returns value set by LIST:COUN:SKIP command. (See example, Figure B-2.) LIST:CURR B.17 [SOURce:]LIST:CURRent COMMAND Syntax: Short Form: LIST:CURR <exp_value>, <exp_value>, .
Page 108
LIST:DWEL? B.23 [SOURce:]LIST:DWELl? QUERY Syntax: Short Form: LIST:DWEL? Long Form: LIST:DWELl? Return Value: <value> Description: Identifies the dwell times entered for the list. Starting at location established by LIST:QUERy, returns comma-separated list of up to 16 values indicating the dwell time parameters entered. i.e., the contents of LIST:DWEL locations of the List Data Table.
Page 109
LIST:VOLT:POIN? B.29 [SOURce:]LIST:VOLTage:POINts? QUERY Syntax: Short Form: LIST:VOLT:POIN? Long Form: LIST:VOLTage:POINts? Return Value: <value> (0 to 250) Description: Identifies the total number of points in a list and the next location to be filled by LIST:VOLT command. The LIST:VOLT pointer is initially at 0 via *RST or LIST:CLE. For each data point entered by a LIST:VOLT command the list pointer is incremented If LIST:VOLT:POIN? returns 5, the LIST:VOLT pointer is at 5 indicating there are 5 data points comprising the list (locations 0 though 4) and location 5 is the next to be filled.
Page 110
NOTE: The following example assumes KLR 75-32 with limit model set for 36V, 32A and output operating in voltage stabilization mode. See Figure B-3 for directions on programming limit model settings. LIST:CLE Clears main channel (LIST:CURR or LIST:VOLT) and LIST:DWEL data tables and initializes the LIST processor to add entries.
Page 111
OUTP? B.35 OUTPut[:STATe]? QUERY Syntax: Short Form: OUTP[:STAT]? Long Form: OUTPut[:STATe]? Return Value: <int_value> (1 or 0) (1 = on, 0 = off) Description: Indicates whether power supply output is enabled or disabled. Returns 0 if output disabled, returns 1 if output enabled. Related Commands: OUTP. (See example, Figure B-1.) CURR B.36 [SOURce:]CURRent[:LEVel][:IMMediate][:AMPLitude] COMMAND...
Page 112
Description: Identifies active voltage mode. Returns LIST while list is being executed. TRAN (transient) is not supported at this time, contact Kepco for more information. Returns FIXED while in fixed (default) mode of operation. Related Commands: LIST commands. (See example, Figure B-2.)
Page 113
CURR:PROT B.42 [SOURce:]CURRent:PROTection[:LEVel] COMMAND Syntax: Short Form: [SOUR:]CURR:PROT[:LEV] <exp_value> Long Form: [SOURce:]CURRent:PROTection[:LEVel] <exp_value> <exp_value> = digits with decimal point and Exponent, e.g., 2.71E+1 for 27.1 Description: Sets overcurrent protection (OCP) level for power supply. Restricts valid programmable current to be no greater than 80% of this setting, overriding Limit Model current limit (CURR:LIM:HIGH) when overcurrent protection is less than 80% of than the current limit.
Page 114
CURR:PROT? B.43 [SOURce:]CURRent:PROTection[:LEVel]? QUERY Syntax: Short Form: [SOUR:]CURR:PROT[:LEV]? {MIN | MAX} Long Form: [SOURce:]CURRent:PROTection[:LEVel]? {MIN | MAX} Return Value: <exp_value> = digits with decimal point and Exponent, e.g., 2.71E+1 for 27.1 Description: Returns value representing current protection level.CURR:PROT? returns value set by CURR:PROT.
Page 115
VOLT? B.49 [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude]? QUERY Syntax: Short Form: [SOUR:]VOLT[:LEV][:IMM][:AMPL]? {MIN | MAX} Long Form: [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude]? {MIN | MAX} Description: Identifies programmed voltage, maximum allowable voltage, or minimum voltage (always 0). The VOLT? query returns the programmed value of voltage. Actual output voltage will depend on load conditions.
Page 116
Description: Identifies active voltage mode. Returns LIST while list is being executed. TRAN (transient) is not supported at this time, contact Kepco for more information. Returns FIXED while in fixed (default) mode of operation. Related Commands: LIST commands. (See example, Figure B-2.) VOLT:PROT B.54...
Page 117
VOLT:TRIG B.56 [SOURce:]VOLTage:[LEVel:]TRIGgered[:AMPLitude] COMMAND Syntax: Short Form: [SOUR:]VOLT:[LEV:]TRIG[:AMPL] <exp_value> MAX Long Form: [SOURce:]VOLTage:[LEVel:]TRIGgered[:AMPLitude] <exp_value> MAX <exp_value> = digits with decimal point and Exponent, e.g., 2.71E+1 for 27.1 Description: Programs voltage value to be transferred to output by *TRG commands. Actual output voltage will depend on load conditions.
Page 118
STAT:OPER:COND? B.58 STATus:OPERation:CONDition? QUERY Syntax: Short Form: STAT:OPER:COND? Long Form: STATus:OPERation:CONDition? Return Value: 0 to 1313 (1 + 32 + 256 + 1024). Description: Returns the value of the Operation Condition Register (see Table B-2). The Operation Condition Register contains unlatched real-time information about the operating conditions of the power supply. Bit set to 1 = function enabled (active, true);...
Page 119
NOTE: The following example assumes KLR 75-32 with limit model set for 75V, 16A and output operating in voltage stabilization mode. See Figure B-3 for directions on programming limit model settings. volt:prot:max Sets OVP limit to maximum. outp on Power supply output is on. volt 20;curr 1 Power supply output is programmed to 20V, 1A.
Page 120
TABLE B-3. QUESTIONABLE EVENT REGISTER, QUESTIONABLE CONDITION REGISTER AND QUESTIONABLE CONDITION ENABLE REGISTER BITS M/S - MASTER/SLAVE FAILURE CONDITION FAN - INTERNAL FAN FAILURE PWR - LOSS OF SOURCE POWER 15 - 7 OTP - OVERTEMPERATURE OLF - OUTPUT LEAD FAULT VALUE 32,768 - 128 OCP - OVERCURRENT...
Page 121
SYST:COMM:LAN:AUTO? B.70 SYSTem:COMMunication:LAN:AUTO? QUERY [E-SERIES MODELS ONLY] Syntax: Short Form: SYST:COMM:LAN:AUTO? Long Form: SYSTem:COMMunication:LAN:AUTO? Return Value: {ON | OFF} Description: Indicates whether AUTO IP is set to ON or OFF. SYST:COMM:LAN:DHCP B.71 SYSTem:COMMunication:LAN:DHCP COMMAND [E-SERIES MODELS ONLY] Syntax: Short Form: SYST:COMM:LAN:DHCP {ON | OFF} Long Form: SYSTem:COMMunication:LAN:DHCP {ON | OFF} Description: Specifies the DHCP MODE.
Page 122
SYST:COMM:LAN:IP B.77 SYSTem:COMMunication:LAN:IP COMMAND [E-SERIES MODELS ONLY] Syntax: Short Form: SYST:COMM:LAN:IP {w,x,y,z} Long Form: SYSTem:COMMunication:LAN:IP {w,x,y,z} where w, x, y, and z are numbers from 0 to 255 Description: Specifies the IP address when DHCP (see PAR. B.69) is set to OFF. (Note that IP address must be comma-separated.) SYST:COMM:LAN:IP? B.78...
Page 123
SYST:COMM:SER:ECHO B.84 SYSTem:COMMunication:SERial:ECHO COMMAND [STANDARD MODELS ONLY] Syntax: Short Form: SYST:COMM:SER:ECHO {1 | 0} (1 = on, enabled, 0 = off, disabled) Long Form: SYSTem:COMMunication:SERial:ECHO {1 | 0} (1 = on, enabled, 0 = off, disabled) Description: Enables (1 = ON) or disables (0 = OFF) echo mode (see PAR. 8.2.2.1). When echo mode is ON causes all subsequent characters to be echoed back.
Page 124
SYST:COMM:SER:PROM? unication B.91 SYST :COMM :SER :PROM ? QUERY [STANDARD MODELS ONLY] Syntax: Short Form: SYST:COMM:SER:PROM? Long Form: SYSTem:COMMunication:SERial:PROMpt? Return Value: <int_value> (01 = on, enabled or 00 = off, disabled) Description: Indicates whether prompt is enabled (01 = ON) or disabled (00 = OFF) (see PAR.
Page 125
Description:Determines whether unit responds to older command formats. SYST:LANG SCPI is the factory default setting. SYST:LANG COMP allows Kepco power supplies to respond to older for- mats such as LIST:TIME for compatible operation with software written for earlier firmware, however this is not applicable to KLR.
Page 126
SYST:PASS:CEN B.99 SYSTem:PASSword:CENable COMMAND Syntax: Short Form: SYST:PASS:CEN <val> Long Form: SYSTem:PASSword:CENable <val> Description: Sets the password enable state if the value matches the current password. This command allows other commands such as the CAL commands to operate. Table B-4 shows the factory default calibra- tionpasswords.
Page 127
Enables front panel controls. Disables front panel controls. L250 Number (250) of locations programmable using LIST commands. Number (40) of locations programmable using *SAV and *RCL commands. SCPI Programming Language. SYST:SET? B.105 SYSTem:SET? QUERY Syntax: Short Form: SYST:SET? Long Form: SYSTem:SET? Return Value: <comma separated string>...
Page 128
TABLE B-5. ERROR MESSAGES (CONTINUED) ESR ERROR BIT SET ERROR MESSAGE EXPLANATION (SEE PAR. A.5) -123,”Exponent too large” Command Error bit 5 Exponent E+3 or greater is invalid. Command Error bit 5 For example OUTP OFD or OUTP STOP instead of OUTP OFF. -141,”Invalid character data”...