Home

KLR Series Developer`s Guide

image

Contents

1. PIN SIGNAL NAME FUNCTION 1 DIO1 UO Line 2 DIO2 UO Line 3 DIO3 UO Line 4 DIO4 UO Line 5 EOI End or Identify 6 DAV Data Valid 7 NRFD Not Ready for Data 8 NDAC Not Data Accepted 9 IFC Interface Clear 10 SRQ Service Request 11 ATN Attention 12 SHIELD Shield 13 DIO5 UO Line 14 DIO6 UO Line 15 DIO7 I O Line 16 DI08 I O Line 17 REN Remote Enable 18 GND Ground signal common 19 GND Ground signal common 20 GND Ground signal common 21 GND Ground signal common 22 GND Ground signal common 23 GND Ground signal common 24 LOGIC GND Logic Ground IEEE 488 GPIB BUS PROTOCOL Table 7 2 defines the interface capabilities of the KLR power supply Talker Listener relative to the IEEE 488 GPIB bus reference document ANSITEEE Std 488 IEEE Standard Digital Interface for Programmable Instrumentation communicating with a Host Computer Controller Talker Lis tener Tables 7 3 and 7 4 define the messages sent to the KLR or received by the KLR via the IEEE 488 bus in IEEE 488 command mode and IEEE 488 data mode respectively These mes sages are enabled during the handshake cycle with the KLR power supply operating as either a Talker or a Listener KLR DEV 060713 7 1 TABLE 7 2 IEEE 488 GPIB BUS INTERFACE FUNCTIONS SUBSET FUNCTION SYMBOL COMMENTS Source Handshake SH1 Complete Cap
2. Description Returns the value of the Questionable Condition Register see Table B 3 The Questionable Condition Register contains unlatched real time information about questionable conditions of the power supply Bit set to 1 condition active true bit reset to 0 condition inactive false See example Figure B 6 B 65 STATus QUEStionable ENABle COMMAND STAT QUES ENAB Syntax Short Form STAT QUES ENAB lt int_value gt Long Form STATus QUESionable ENABle lt int_value gt Function Programs Questionable Condition Enable Register Description Programs Questionable Condition Enable Register see Table B 3 The Questionable Condition Enable Register determines which conditions are allowed to set the Questionable Condition Register it is a mask for enabling specific bits in the Questionable Event register that can cause the question able summary bit bit 3 of the Status Byte register to be set The questionable summary bit is the log ical OR of all the enabled bits in the Questionable Event register Bit set to 1 function enabled active true bit reset to 0 function disabled inactive false See example Figure B 6 B 66 STATus QUEStionable ENABle QUERY STAT QUES ENAB Syntax Short Form STAT QUES ENAB Long Form STATus QUEStionable ENABle Return Value lt int_value gt actual register value Description Reads Questionable Condition Enable Register see Table B 3 Power supply returns val
3. 1 Request Control Not used always zero e 2 Query Error 1 indicates a query error has occurred see Appendix B Table B 5 for details e 3 Device Dependent Error 1 indicates device dependent error has occurred see Appendix B Table B 5 for details KLR DEV 060713 e 4 Execution Error 1 indicates execution error has occurred parameter exceeded allowable range see Appendix B Table B 5 for details 5 Command Error 1 indicates a command syntax error has occurred see Appendix B Table B 5 for details 6 User Request Not used always zero s 7 Power On set once upon power up however ESE bit 7 set to 0 prevents Status Byte bit 5 from being set 1 2 7 4 OPERATION STATUS REGISTER SET The Operation Status register set is comprised of condition transition event and enable regis ters see Figure 1 2 Appendix B PAR s B 58 through B 61 provide detailed explanations of the queries commands for reading and modifying these registers as applicable the transition regis ter cannot be modified The Operation condition registers record conditions which are a part of the instrument s normal operation The definition of each of these bits condition register is as follows e 0 through 4 Not used always zero 5 Waiting for Trigger Summary 1 indicates the unit is waiting for trigger e 6 and 7 Not used always zero e 8 Constant Voltage 1 indicates the instrum
4. accessed open the instrument for communication hr driverPtr gt Initialize GPIBO 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 The driver is a linked list of pointers to properties and functions To read a property it is neces sary to locate the property The following shows how to read the firmware revision of the KLR To read this property the identification must be performed first bstrInstrFwRev driverPtr gt Identity gt InstrumentFirmwareRevision Accessing properties requires many pointer operations The examples below use pointer redi rection to make the operations a little clearer get pointers to the needed interfaces IKLROutputPtr outputPtr outputPtr driverPtr gt Outputs gt GetItem OLESTR Output IKLRMeasurementPtr measurementPtr measurementPtr driverPtr gt Measurements gt GetItem OLESTR Measurement KLR DEV 060713 3 5 3 6 The setting of voltage and current is then very simple set voltage hr outputPtr gt VoltageLevel 75 0 if FAILED hr exit 1 set the current limit hr outputPtr gt CurrentLimit 10 if FAILED hr exit 1 enable the output outputPtr gt Enabled true Sleep 500 Note that a measurement requires accessing a function
5. KLR DEV 060713 8 1 8 2 2 8 2 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 The ESC character is used for synchronization causing the KLR Power Supply to reset clear its input buffer and return a CR LF sequence The CAN character operates similarly except that both input and output buffers of the KLR Power Supply are reset cleared Note that ESC and CAN characters must be followed by LF for the port to recognize these characters Six characters 8 are not permitted in RS 232 programming strings These char acters are reserved for LAN communications and their use in other serial programming proto cols will likely result in interrupted communications DATA TRANSFER PROTOCOLS STANDARD MODELS ONLY RS 232 programming can be executed using either manual command data entry i e computer keyboard commands or electronic control e g Labview or LabWindows programming The KLR Power Supply offers data transfer protocols tailored for each method Since the RS 232 protocol does not use a parity
6. if not created as a project include the driver code at end of program tinclude Kp_KLR c FIGURE 5 2 EXAMPLE 2 USING THE POWER SUPPLY TO CREATE A VOLTAGE RAMP SHEET 2 OF 2 KLR DEV 060713 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 tinclude lt formatio h gt tinclude lt visa h gt tinclude 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 ViChar id_str GPIB 06 INSTR change 06 to the GPIB address of unit LAN addresses change 192 168 0 100 to IP address found via front panel interface ZG ViChar id_str TCIP 192 168 0 100 INSTR VXI 11 instrument via LAN port 1024 ViChar id_str TCIP i92 168 0 100 5025 SOCKET SCPI RAW port 5025 LAN instrument change 0 to actual communications port in use ViChar id_str ASRLO INSTR serial port ViByte ps_type ViSession KLR_Session Void main ViReal64 meas_volt meas_curr variables for the measurement results call function to set power supply to 15 volts at 12 amperes if Kpklr_init amp id_str 1 amp ps_type amp KLR_Session Visuccess return could not open power supply Set_powersupply 15 12 delay 100
7. B 71 SYSTem COMMunication LAN DHCP COMMAND SYST COMM LAN DHCP 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 When set to OFF the static addresses set by the user from the front panel or using SYST COMM LAN commands are used for LAN communication When set to ON the unit queries the DHCP server for a valid IP address B 72 SYSTem COMMunication LAN DHCP QUERY SYST COMM LAN DHCP E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN DHCP Long Form SYSTem COMMunication LAN DHCP Return Value ON OFF Description Indicates whether DHCP is set to ON or OFF B 73 SYSTem COMMunication LAN DNS COMMAND SYST COMM LAN DNS E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN DNS w x y z Long Form SYSTem COMMunication LAN DNS w x y z where w x y and z are numbers from 0 to 255 Description Specifies the DNS address when DHCP MODE see PAR B 69 is set to OFF Note that DNS address must be comma separated B 74 SYSTem COMMunication LAN DNS QUERY SYST COMM LAN DNS E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN DNS Long Form SYSTem COMMunication LAN DNS Return Value lt int_value gt w x y z where w X y and z are numbers from 0 to 255 Description Indicates the static DNS address comma separated For example DNS address of 4 4 4 1 returns 4 4 4 1 B 75 SYSTem COMMunication LA
8. Dim errCode As Long errCode 999 Dim errMsg As String StatusTextBox Text StatusTextBox Text amp vbCrLf While errCode lt gt 0 agDrvr Utility ErrorQuery errCode errMsg StatusTextBox Text StatusTextBox Text amp ErrorQuery Wend End Sub Wait the specified number of seconds Private Sub Delay DelayTime As Single Dim Finish As Single Finish Timer DelayTime Do Loop Until Finish lt Timer End Sub errCode errMsg amp vbCrLf FIGURE 3 4 EXAMPLE OF USING A LIST WRITTEN IN VISUAL BASIC SHEET 2 OF 2 SETTING LIMIT MODEL 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 Access to the functions is identical to the method used to access the open and close of the driver The functions used are KpDCPwr_SetAttribute ViReal64 which sets the various attributes to a specific value KpDCPwr_EnablePasswordState which sends the string to the unit to enable the ability to set the limit model KLR DEV 060713 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
9. External Calibration ANALOG REF OUTPUT ON OFF See Manual for Proper Setup Instruction 3 1 SAVE CALIBRATION FIGURE 5 9 CALIBRATION WINDOW The ABOUT button displays the model serial number firmware version number and driver ver sion number Click OK to close the window The Limit Model button opens the Limit Model window Figure 5 10 which displays the present limit model settings these limits may be changed by the user To change these limits the Cali bration Password see KLR User Manual must be entered Once either limit is altered the out put is automatically disabled and the previous settings for voltage and current are lost s LIMIT MODEL SEE Voltage Limit Must enter password to change settings Current Limit 4 20 000 P Jan 120 000 FIGURE 5 10 LIMIT MODEL WINDOW The Front Panel button allows all front panel controls to be locked during remote operation When the front panel is locked the button color changes from green to red KLR DEV 060713 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 The default file names and locations may be altered by the user In each case the user may elect not to save one or mo
10. Figure 3 7 illustrates the use of the IVI COM driver with LabView to measure the KLR output KLR DEV 060713 epcoDCPwrLib IKepcoDCPwr e D ab IKepcoDCPwr a a ee ee IdQuery 23m IS simulate false fy OptionSkrina 4 ti a rb IkepcoDCPwr a r a 1 E i cB Output am IKepcoDCPwrOutput S Measure Current d bau29 DE a rb IKepcoDCPwrOutput z 3043236 MeasureYoltage 611 23 DE 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 This is done using the Max Positive Current Limit and Max Positive Voltage Limit properties As indicated in the earlier table these are the setting nodes that are required to change the KLR limit model epcoDCPwrLib IKepcoDCPwr R 3 Dr i a r IKepcoDCPwr FC IKepcoDCPwr El POutput Limit Voltage MaxPositiveLimit Output Limit Current MaxPositiveLimit oltage Limit Pro I R rb IKepcoDCPwr Ap wen 3043461 D FIGURE 3 8 SETTING THE LIMIT MODEL USING LABVIEW WITH IVI COM DRIVER EN KLR DEV 060713 3 19 3 20 Blank 4 1 4 2 4 3 SECTION 4 LABVIEW G DRIVER INTRODUCTION The LabView G driver can be used for remote programming over all
11. MIN minimum VOLT LEV IMM 0 OUTP STAT 0 OFF In addition RST sets INIT CONT to OFF sets VOLT MODE to FIXED stops all LIST or TRAN operations See example Figure A 1 A 12 SAV SAVE COMMAND SAV Syntax SAV lt integer gt 1 to 40 Description Saves the present state of output voltage output current overvoltage protection overcurrent A 4 protection and output state on off and if RELAY mode is set to MANUAL relay state to the specified memory location This command stores the present state of the power supply to one of 40 memory locations in non volatile Memory If RELAY mode is set to MANUAL from the front panel UTIL menu relay state on or off is also saved The following parameters are stored by SAV VOLT CURR OUTP and VOLT PROT CURR PROT The stored values can be restored by the RCL com mand NOTE If a Limit Model setting is changed previously stored settings may be outside the range established by the new limit model In this case when RCL is executed the value is cleared to the default minimum OV minimum A and an out of range error message is generated KLR DEV 060713 NOTE The following example assumes KLR 75 32 with limit model set for 36V 32A and output operating in voltage stabilization mode CLS Clears data from all status registers ESE 60 Enables bits 5 command error 4 execution error 3 device dependent error and 2 query error see Table A 1 to set the
12. grammed by CURR TRIG the lower of CURR LIM HIGH and 80 of CURR PROT See example Figure B 1 B 46 SOURce FUNCtion MODE COMMAND FUNC MODE Syntax Description Short Form FUNC MODE VOLT CURR Long Form FUNCtion MODE VOLT CURR Establishes the expected operating mode of the power supply VOLT Constant Voltage mode CV CURR Constant Current mode CC Default operating mode is CV NOTE Actual operating mode is determined by programmed output limits and load impedance B 47 SOURce FUNCtion MODE QUERY FUNC MODE Syntax Description Short Form FUNC MODE Long Form SOURce FUNCtion MODE Return Value String1 String2 where string 1 is the actual operating mode VOLT Constant Voltage mode CV CURR Constant Current mode CC and string 2 is the mode that was established using FUNC MODE Identifies the operating mode and commanded operating of the power supply B 48 SOURce VOLTage LEVel IMMediate AMPLitude COMMAND VOLT Syntax Description B 12 Short Form SOUR VOLT LEV IMM AMPL lt exp_value gt Long Form SOURce VOLTage LEVel IMMediate AMPLitude lt exp_value gt lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Sets programmed voltage level at power supply output This command programs output voltage regulation point to a specific value actual output voltage will depend on load conditions If the pro grammed value exceeds the rat
13. Fan Error 1 indicates inoperative fan e 6 Master Slave Error 1 indicates communication error between master and slave units 7 15 Not used always zero ERROR EVENT QUEUE The Error Event queue is a FIFO first in first out buffer that stores errors as they occur As it is read each error is removed from the queue and the next error message is made available When all errors have been read the query returns 0 No error If more than 15 errors are accumulated it will overflow When overflow occurs the oldest errors stay in the queue but the most recent errors are discarded The last error in the queue will be 350 Too many errors Error messages are defined in Appendix B Table B 5 TRIGGER The KLR unit has the ability to utilize both a software trigger and an external hardware trigger Model 1 2 K units have an additional software trigger capability accessed via Port 5044 When a trigger event is properly enabled and received the output voltage and current are set to the pre set trigger levels The TRIG SOUR command see PAR B 107 determines whether the external hardware EXT or software INT trigger is selected If external trigger mode is selected the hardware trigger is activated by grounding the EXT_TRG line J2 pin 14 to pin 9 11 13 or 15 this creates the trigger event at which time the trigger values preset values VOLT TRIG and CURR TRIG will become the setpoint values Vset an
14. Kpklr_MeasVoltCurr KLR_session meas_volt meas_curr Kpklr_close KLR_Session free up the memory and close visa session ViStatus Get_powersupply ViReal64 voltage ViReal64 current ViStatus power_supply_status VI_SUCCESS return power_supply_status end of readback FIGURE 5 3 EXAMPLE 3 USING THE POWER SUPPLY TO TAKE MEASUREMENTS SHEET 1 OF 2 KLR DEV 060713 5 7 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 SCH 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 SE Kpklr_OutputOnoff KLR_Session 1 output on return power_supply_status end of main if not created as a project include the driver code at end of program tinclude Kp_KLR c FIGURE 5 3 EXAMPLE 2 USING THE POWER SUPPLY TO TAKE MEASUREMENTS SHEET 2 OF 2 5 8 KLR DEV 060713 5 5 5 5 1 DEMONSTRATION PROGRAM USING THE VXI PLUG amp PLAY DRIVER The demonstration program is intended to illustrate the use of the VXI plug amp play functions included with the KLR power supply The demonstration program is installed under Windows by running SETUP EXE The program as w
15. LAN E Series model ethernet enabled with LAN port conforming to LXI protocols RODC Rapid Output Discharge Circuit option installed e lt Manufacturing Data gt DDMMYYYY Axxxxxx DD day MM month and YYYY year of manu facture Axxxxxx unit serial number e lt Firmware revision gt Vn m original factory firmware or vn m updated or secondary firmware n m revision e g V1 01 or v4 00 lt LAN Firmware revision gt E Series models only Vn m original factory LAN firmware or vn m updated or secondary LAN firmware n m revision e g V1 01 or v4 00 See example Figure A 1 A 7 OPC OPERATION COMPLETE COMMAND OPC Syntax OPC Description Causes power supply to set status bit 0 Operation Complete when pending operations are complete This command sets Standard Event Status Register bit 0 see Table A 2 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 See example Figure A 1 As an example the controller sends command s then sends OPC If control ler then sends ESR the power supply responds with either a 0 if the power supply is busy execut ing the programmed commands or a 1 if the previously programmed commands are complete See example Figure A
16. The output will go to the trigger voltage and current values LIMIT MODEL FUNCTIONS Set Max Voltage Current KpkIr_SetMaxLimValue Sets limit to maximum voltage current Get Max Voltage Current KpkIr_GetMaxLimValue Gets maximum voltage current limit values Security Code Kpklr_CalCode Allows the user to change the password to prevent accidental or unauthorized 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 Calibration Dump Kpklr_CalDump Instrument sends calibration data in Intel Hex format 5 2 KLR DEV 060713 TABLE 5 1 KLR VXI PLUG amp PLAY DRIVER FUNCTIONS CONTINUED Purpose Function Name Description Calibration Restore Kpkir_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 Add Current Step Value Kpklr_ListCurrent Add a single current entry to the end of a list Add Ste
17. This driver is written in native LabView code using the VISA write and read functions see Section 4 e VXI plug amp play driver supplied with the unit This driver is written in C using VISA write and read functions It is compliant with the VXI plug amp play specification and can be used in an ANSI compatible C program such as LabWindows CVI It is also portable to Linux and Apple operating systems however verification of these environments has not been completed see Section 5 The drivers and the raw programming examples found in this manual do not communicate directly to the KLR They use the operating system or vendor specific interface drivers to handle the actual communication of the serial Ethernet or GPIB cables Vendors such as National instruments Agilent technologies and Keithley have created a VISA Virtual Instrument System Architecture library The VISA library uses consistent commands to open a connection write and read data read the interrupt status and perform standard functions such as lock unlock and device clear The VISA libraries open command creates the handle for all other functions The open com mand requires a resource string that provides the physical address of the unit and also specifies the type of interface that will be used Table 1 1 provides the resource strings for the four possi ble interfaces to the KLR All KLR Models include the GPIB interface The serial interface is included only in st
18. VXI 11 instrument via LAN port 1024 ViChar id_str TCIP i92 168 0 100 5025 SOCKET SCPI RAW port 5025 LAN instrument change 0 to actual communications port in use ViChar id_str ASRLO INSTR serial port TE yl power_supply_status Kpklr_init amp id_str 1 amp ps_type amp KLR_Session Visuccess return power_supply_status could not open power supply init the power supply operation Power supply handle is now created provided product is KLR KREKKKKKRKE KKK KKK KKK KR KKK KK KKK KKKKK KKK FIGURE 5 2 EXAMPLE 2 USING THE POWER SUPPLY TO CREATE A VOLTAGE RAMP SHEET 1 OF 2 KLR DEV 060713 5 5 5 6 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 EJ Kpklr_OutputOnoff KLR_Session 1 output on for i 0 i lt 10 i generates the ramp ten times for voltage voltage_start voltage lt voltage_end voltage voltage_change Kpklr_SetValue KLR_Session voltage 0 set the voltage level only Delay 500 delay for 500 milliseconds Kpklr_SetValue KLR_Session voltage_start 0 set the voltage level only delay 1000 wait for unit to return to zero no load end of all ramps Kpklr_OutputOnoff KLR_Session 0 output off Kpklr_close KLR_Session free up memory and close VISA session return power_supply_status end of main
19. lt value gt lt value gt to maximum of 250 values Long Form LIST DWELI lt value gt 0 010 to 655 35 lt value gt lt value gt to maximum of 250 values Description Determines how long the main channel parameters will be active Sets time value from 0 010 to 655 35 in seconds for List Dwell locations of the List Data Table The main channel either voltage or current is determined by the load If LIST DWEL is entered for only location O that time duration will apply to all steps when either VOLT MODE LIST or CURR MODE LIST is executed Related Com mands VOLT MODE LIST CURR LIST VOLT LIST DWEL See example Figure B 2 KLR DEV 060713 B 5 B 23 SOURce LIST DWELI QUERY LIST DWEL Syntax Short Form LIST DWEL Long Form LIST DWELI Return Value lt value gt 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 Related Commands LIST DWEL LIST QUERY B 24 SOURce LIST DWELI POINts QUERY LIST DWEL POIN Syntax Short Form LIST DWEL POIN Long Form LIST DWELI POINts Return Value lt value gt 0 to 250 Description Identifies the number of locations for which time values have been entered and the next loca tion to be filled by a LIST DWEL command If LIST DWEL POIN returns 6 dwell time
20. or voltage in Volts for a current waveform must be specified The of Cycles specifies how many waveforms to produce if set to 0 the waveform repeats continuously Once the Start button is clicked the commands are sequentially sent to the KLR to build the waveform by incrementally changing the output While the waveform is being generated peri odic measurements of the KLR output are made and shown in the Measured Waveform display To stop the waveform click on the Stop button which is red while the waveform is running Figure 4 13 is a block diagram that shows how the function generator was implemented using list commands in this example The KepcoDCPwr Clear All Lists vi was executed first This VI clears the previous list allowing the new list to be sent to the KLR Lists are not deleted from the KLR except when a limit model setting is changed or when the Clear All function is executed The KepcoDCPwr Configure User Sequence vi does the actual downloading of the points to the KLR unit The KepcoDCPwr Configure Voltage Mode vi causes the list to be executed The KepcoDCPwr Configure User Sequence vi is shown in Figure 4 11 This logic is specifically configured to generate a voltage list where two arrays of voltage and dwell times are supplied along with the operating current and number of cycles for the list to execute In the left most case statement there is a command to send one entry for the control and current lists of the internal a
21. 12 Ramp Function Panel Current Ramp 4 14 Function Generator Panel cionado ii ride ELSE 4 16 Configure User Sequence vi Block Diagram nc nnn cr anno rro rn 4 16 Ramp Eunction Block Diagrames a e aae dioss 5 17 Function Generator List Functionality Block Diagramm 5 19 Example 1 Setting Voltage and Cumrent non nnn nan nc nan nn rn nn nn arrancar 5 4 Example 2 Using the power supply to create a Voltage ramp conan cnn nono no nnrnncnnno nn 5 5 Example 3 Using the power supply to Take Measurement A 5 7 Instrument Setup WINdOW cocoa ii pi EES 5 9 Main Panel le VE 5 10 Protection WING OW EE 5 11 Store Recall WV ING OWS ed Eed tia 5 11 TDI MIR id 5 11 Calibration MV dw A A A A A aE 5 12 Limit Model Window iain a as 5 12 Utilities Window A A ne ee A ee 5 13 Utilities Window with Output Test Running 0 2 00 ee ee eeeeeceeenneeeeeeeeeeeeeeeaaeeeseeaeesaeeeesaeeeeeaeeeseeeeesteeseaas 5 13 Power Supply Event Window 00 c ceeeecccesseeeeeeeeeenneeeeeeeeeeaeeeesaaeeceeeaeesneeeeesaeeeseaaeeesneeeeeaeeeseaeeseeeeessnneeeeaas 5 14 Message ue 6 4 Tree Diagram of SCPI Commands Used with KLR Power Supp 6 6 Typical Example Of KLR Power Supply Program Using SCPI Commands A 6 9 RS 232 Implementation Standard Models On 8 2 GPIB Mellen EE A 5 Programminig th QUtpUE ivi Re odas B 3 Using LIST Commands and Oueres nor nnnn conan nn nnnnn rr r nn rra B 8 Programming Limit Models iia dass B 10 Programming as a Current StabiliZer 0 iee
22. 3 Programming WEE 1 2 1 2 Ree Wi a MAAS a ee hl dei ee A i A A Bee he 1 2 1 2 1 Initialization convent eeecupees puede aun o bt die 1 3 1 2 2 Output Control ds 1 3 1 2 3 Measurement dad 1 3 1 2 4 Limit Models User defined Voltage Current L mis 1 3 1 2 5 Save Recall Storage of User Programmed Active SettingS 0 00 eccceeseceeesneeeeeeeeesneeesesaeeeseeeeessaeeeeeas 1 3 1 2 6 LIST User Programmed Geouences corno nn cnnnn cnn nn 1 3 1 2 7 AM ri att da 1 4 1 2 7 1 Status Reporting Structure comino nnne iaeaea EEA ENA EACE KONT ENCE AEAEE TEAVE EEVEE NEEE 1 4 1 2 7 2 Status Byte Register Set a arer r pa aea ee aae died ada aapea iaasa ddniie 1 6 1 2 7 3 Standard EvenT Status Register Gei 1 6 1 2 7 4 Operation Status Register Set oooooccoccoccccccccoconcccccnonanoncncnnonnnnnncnncnnnnnn cnn cnn nn cnn cnn nnns nn nana ca naar cnc 1 7 1 2 7 5 QUEStionable Status Register Get 1 7 1 2 7 6 ErorEvent Gueue ce e ieee UNENEE EECHER ENER e a E a deeeENddece 1 8 1 2 8 TUI ta ss ld 1 8 SECTION 2 COMMUNICATION 2 2 Front Panel local Controleer A iet eaid a ue 2 1 2 3 Digital Control via LAN E Series Models On 2 2 2 4 Digital Control via GPIB EE 2 3 2 5 Digital Control via RS 232 Standard Models on 2 3 SECTION 3 IVI COM DRIVER 3 1 1 Specification Compliance siiis ne aa aE Eaa Ena CAE Ene Aaaa ENEA AE a aAA EEEE Aara iE Ea 3 1 3 1 2 Range Checking and Coercion cocconocccconccinonononannnonono conan nn ccoo nano nro rr rre 3
23. 4 49 RAM IR Ee Y es Of Scale Minimum fe Minimum o oo H easured Waveform 8 m 1 Scale Maximum Scale Minimum easured Waveform EJE em mg Dees D eo Exit DI JJ FIGURE 4 13 FUNCTION GE RI OCK NIAGR 5 1 5 2 5 3 SECTION 5 VXI plug amp play DRIVER INTRODUCTION The VXI plug amp play driver can be used with all KLR models for remote programming The driver can be used in a program created by a user with any C compiler to program all ports accessible via a resource string of the KLR power supply VXI PLUG amp PLAY INSTRUMENT DRIVER The VXI plug amp play instrument driver provides support for the VXI plug amp play environment This driver can be downloaded from Kepco s web site at www kepcopower com drivers The driver includes an executable demonstration program and two files which provide the source code for the driver and the functional prototypes In addition the examples found in this section are also included with the driver as separate C files VXI PLUG amp PLAY INSTRUMENT DRIVER FUNCTIONS Kepco s KLR VXI plug amp play instrument driver provides programming support for Kepco s KLR Power Supply via all remote interfaces It contains functions for opening configuring taking measurements from testing calibrating and closing the instrument To successfully use this module the instrument must be connected to the appropriate port using the proper resource string for the i
24. 87 For baud rate refer to PAR s B 82 and B 83 e For prompt refer to PAR s B 90 and B 91 e For echo refer to PAR s B 84 and B 85 e For XON XOFF refer to PAR s B 88 and B 89 The default settings are as follows Baud rate 38400 e Parity None DataBits 8 e Stop Bits 1 e Echo OFF XON ON enabled KLR DEV 060713 2 3 2 4 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 XON XOFF method allows the KLR Power Supply to control when the command originator is allowed to send data The command originator can only send data after the XON transmis sion on character 0114 has been received the command originator stops sending data after receiving the XOFF transmission off character 0134 and waits until the XON character is received before sending additional data Control characters either CR or LF are returned as XOFF CR ifecho mode is on and as XOFF if echo mode is off XOFF stops data from the command originator and the KLR returns the nor mal sequence of CR LF if echo mode is enabled Prior to use the RS 232 port must be initialized be sending either CR LF or ESC The RS 232 port of the KLR must be configured properly to work with the three drivers see Table 2 2
25. B 3 for directions on programming limit model settings LIST CLE LIST DWEL 2 LIST VOLT 28 32 18 LIST VOLT POIN LIST QUER LIST VOLT LIST VOLT 20 22 24 26 28 LIST VOLT POIN LIST QUER 3 LIST COUN 10 LIST COUN SKIP 2 LIST CURR 3 LIST CONT 0 OUTP ON VOLT 24 CURR 3 VOLT MODE LIST VOLT MODE FIX Clears main channel LIST CURR or LIST VOLT and LIST DWEL data tables and initializes the LIST processor to add entries Sets the time duration for Location O to be 2 seconds NOTE If spe cific dwell times are not entered for the rest of the locations in the list before running the list this dwell time will be assigned to all entries Starting at Location 0 fills the first three locations with the voltages shown Returns 3 indicating that 3 data points have been entered also indi cates that the next data location to be filled is Location 3 Returns 0 indicating list starting point default location set by LIST CLE Returns 2 8E1 3 2E1 1 8E1 the contents of the filled locations Adds five points to the list Locations 3 through 7 The list now has eight points Returns 8 Starts LIST queries from Location 3 Specifies that upon receipt of VOLT MODE LIST the above sequence will be executed 10 times Specifies that the first two steps of the sequence will only be exe cuted during the first cycle through the list thereafter the list shall execute Locations 2 through 7 an additional 9 times Programs out
26. COM driver Figures showing the complete code for each example are provided 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 3 4 KLR DEV 060713 This program demonstrates how to set a voltage and current and measure the output voltage using the IVI COM driver include lt stdafx h gt include lt stdio h gt include lt conio h gt include lt atlbase h gt 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 if FAILED hr exit 1 create a safe pointer for interface access IKLRPtr driverPtr NULL hr driverPtr CreateInstance __uuidof KepcoDCPwr if FAILED hr exit 1 Once initialized communication with the KLR must be established The following code shows how to open the driver at GPIB address 6 The id query is set to true Failure to id query to true will reduce the functionality of the driver to the DCPWR class capabilities preventing functions such as setting the limit model list and other advanced features of the KLR from being
27. COM driver does not support the configuring and resetting of overvoltage and overcurrent con ditions SPECIFICATION COMPLIANCE The IVI Foundation provides several specifications outlining the criteria for compliance with the IVI COM driver architecture The chief aim of these specifications is to ensure compatibility with specific IVI COM infrastructure components thereby increasing the degree of driver and instru ment interchangeability This IVI COM driver complies with the following IVI standards e e 1V1 3 1 IVI Driver Architecture Specification e VI 3 2 Inherent Capabilities Specification e e VI 3 3 Standard Cross Class Capabilities Specification e IVI 3 4 Guidelines for API Style e IVI 3 5 IVI Factory Specification e IVI 3 6 IVI Configuration Server Specification The driver is built upon the National Instruments VISA COM interface RANGE CHECKING AND COERCION The driver will predominantly rely upon the instrument to perform range checking and coercion MULTITHREADING SUPPORT Multithread safety is provided using standard operating system primitives for object locking This driver uses method level locking so that the driver can operate properly in multithreaded appli cations KLR DEV 060713 3 1 3 1 4 3 2 3 2 CONTEXT SENSITIVE HELP The driver includes both HTML 1 x and HTML 2 0 help files which document the following driver elements e Interfaces e Methods e Method parameters e Pro
28. CONT ON Related Commands lt GET gt RST TRG See example Figure B 1 NOTE If the selected trigger source is external TRIG SOUR EXT and INIT CONT is enabled the first trigger command must be preceded by INIT IMM subsequent trigger commands will be pro cessed normally B 2 KLR DEV 060713 STAT OPER ENAB 32 STAT OPER ENAB VOLT 75 CURR 5E 1 VOLT 37 7 CURR 2 5 TRG VOLT TRIG 31 5 CURR TRIG8E 1 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 Enables only bit 5 WTG Waiting for Trigger Returns 32 WTG bit enabled Programs output voltage to 75V current limit to 0 5A INIT CONT ON Enables continuous triggering INIT CONT Returns 1 continuous triggering enabled STAT QUES Returns 32 indicating WTG bit is set trigger armed Programs output voltage for 31 5V current limit for 0 8A upon receipt of trigger stimulus TRG Output voltage is set to 31 5V with 0 8A current limit STAT QUES Returns 32 again indicating WTG bit was set again continuous triggering VOLT 32 1 CURR 5 Programs output voltage to 32 1V current limit to 5A MEAS VOLT Returns actual output voltage if output voltage is 32 15V power supply returns 3 215E1 MEAS CURR Retur
29. Commande B 21 SYSTem COMMunication SERial ENABle Ouer B 21 SYSTem COMMunication SERial PACE Commande B 21 SYSTem COMMunication SERial PACE Ouer B 21 SYSTem COMMunication SERial PROMpt Commande B 21 SYSTem COMMunication SERial PROMpt Query eceeececeeceeeteeeeeceeeeceaeeeeeeceeeeeeeeeeeeceaeseeeeseeeeeaeeneneeea B 22 SYSTem ERRor NEXT QUEN 00 eeececeeccececescecnececeeseeeeeaeeeaaeesaeeeaaesaceceaeeeaaeaaeesaeseeaesaeseaeeeneeesaeeeeeeenieees B 22 SYSTem ERRor CODE NEXT QUETY rerien an inesse met ionien e etaar oee Ena EEn ETa rar nr arrancan B 22 SYSTem ERRor CODE ALL Ouer B 22 SYS Tem KEOCK ComMan siii iba B 22 AH uR o beleen B 23 SYSTem LANGUAage Command nc cnn cnica nor rre B 23 SYSTem LANGUAage Cem 00 ibi cet B 23 SYSTem PASSword CENable Commande B 24 SYSTem PASSword CDISable Commande B 24 SYSTem PASSword NEW Commande B 24 SYSTem PASSword CENable STATE Query 0 ceeceeeeeeeeeeteeeeeeeeeeeeseeeesaeseeeeceeeeeaeeeeeeseaeeneeseeeeseeeeeeee B 24 SYSTem SECurity IMMediate Commande B 24 SYS Tem SET ComMane sitio tica B 24 ACHTEN B 25 SS Tem VER Gert QUE cima da vea B 25 TRIGger SEQuence SOURCe Commande B 25 TRIGger SEQuence SOURCE Query coccccccccccconacocccconanonnnnnn no on na nnn cnn nn ran rn rra B 25 V FIGURE vi 1 1 2 1 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 4 12 4 13 5 1 5 3 5 4 5 5 5 6 5 7 5 8 5 9 5 10 5 11 5 12 5 1
30. ENAB ENAB EVEN LIST Subsystem not supported with multiple units Only supported in standalone units with R Option RODC installed SOURce subsystem SOUR VOLT LEV IMM AMPL AMPL TRIG AMPL AMPL PROT LEV PROT LEV LIM HIGH HIGH MODE MODE FIXED MODE LIST MODE TRANS MODE CURR LEV IMM AMPL AMPL TRIG AMPL AMPL PROT LEV PROT LEV LIM L_ HIGH HIGH MODE FIXED MODE LIST MODE TRANS MODE FUNC MODE FUNC MODE LIST subsystem part of SOURce LIST CLE CONT CONT COUN SKIP SKIP POIN COUN CURR POIN CURR DIR DIR DWEL DWEL POIN OUER OUER VOLT POIN VOLT SYSTem subsystem SYSTem COMM GPIB ADDR ADDR LAN AUTO AUTO DHCP DHCP DNS DNS GATE GATE IP IP MACH MASK MASK SER BAUD BAUD ECHO ECHO ENAB ENAB PACE PACE PROM PROM ERRor NEXT CODE NEXT ALL KLOC KLOC LANG LANG PASS CEN CEN STAT CDIS NEW SEC IMM SET SET VERS _ MEASure subsystem MEAS SCAL CURR DC SCAL VOLT DC STORage subsystem MEM LOC LOC SAV RCL FIGURE 6 2 TREE DIAGRAM OF SCPI COMMANDS USED WITH KLR POWER SUPPLY 6 6 KLR DEV 060713 6 6 6 7 UNDERSTANDING THE COMMAND STRUCTURE Understanding the command structure requires
31. Exception Error Console WriteLine e Message KLRdriver Close Console WriteLine Console Write Press Enter to Exit Console ReadLine FIGURE 3 2 EXAMPLE OF USING A LIST WRITTEN IN C SHEET 2 OF 2 3 10 KLR DEV 060713 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 gt project gt Function panel file To create another project this step is critical to proper operation of the driver under the CVI environment In CVI each C file in the project needs to invoke the various include files include KpDCPwr h tinclude lt ansi_c h gt tinclude lt cvirte h gt include lt visatype h gt include KpDCPwrErrorHandler h include KpDCPwrExample h The CVI environment is aware of the IVI directory structure and will automatically locate the directories containing the files without adding any path statements It is an advantage of using CVI over other C environments as it is IVI aware When the resource string is entered and the user clicks the appropriate button the driver is invoked and the password is established with the following code sprintf initOptions QueryInstrStatus 1 Simulate d simulate Initialize the driver c
32. KepcoDCPwr Software Timed Ramp Example vi for a voltage ramp or KepcoDCPwr Current Software Timed Ramp Example vi for a current ramp The computer sends the proper commands to the KLR that gen erate the ramp The checkboxes for Readback Voltage Readback Current can be altered while the ramp is being generated to allow the indicators to display either measured or commanded voltage or current The Disable Y End and Repeat checkboxes can also be altered while the ramp is being generated The actual function that creates the ramp a series of points is shown in Figure 4 12 The logic for each point is very simple send the voltage to the unit with the voltage level command mea sure the voltage using the 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 0 008 second on a higher performance computer KLR DEV 060713 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 When the Function Generator button on the Front Panel is clicked the function
33. LAN AUTO Commande B 18 SYSTem COMMunication LAN AUTO Ouer B 19 KLR DEVGD 060713 SECTION B 71 B 72 B 73 B 74 B 75 B 76 B 77 B 78 B 79 B 80 B 81 B 82 B 83 B 84 B 85 B 86 B 87 B 88 B 89 B 90 B 91 B 92 B 93 B 94 B 95 B 96 B 97 B 98 B 99 B 100 B 101 B 102 B 103 B 104 B 105 B 106 B 107 B 108 KLR DEVGD 020498 TABLE OF CONTENTS PAGE SYSTem COMMunication LAN DHCP Commande B 19 SYSTem COMMunication LAN DHCP Query cooccccoccococonoccconncconcnono co ncnnn cnn cnc nn nan nn cnn rca nn rr arcas B 19 SYSTem COMMunication LAN DNS Commande B 19 SYSTem COMMunication LAN DNS Ouer B 19 SYSTem COMMunication LAN GATE Commande B 19 SYSTem COMMunication LAN GATE Query cocooconcccocnnonnnononcnnnnno conc nc nnnnn cnn rra nano cnn rra nn arrancan B 19 SYSTem COMMunication LAN IP Commande B 20 SYSTem COMMunication LAN IP Ouenm cnn cr nora nr ar narran rana nr an na ranannnnnns B 20 SYSTem COMMunication LAN MAC Ouer B 20 SYSTem COMMunication LAN MASK Commande B 20 SYSTem COMMunication LAN MASK Query coococcccococicocccconnconcnoncconnnnnn cnn cnc nn nan nn cnn rnn naar nnr rana nc B 20 SYSTem COMMunication SERial BAUD Commanf cnn cnn rara nar ranrnrnn cnn B 20 SYSTem COMMunication SERial BAUD Query cooccocicconccnnnccconnnnoncnnnnconc non nc seers ceaeeeaeeeeeeesaeeeeeeeeneeeaeeneeee B 20 SYSTem COMMunication SERial ECHO Commande B 21 SYSTem COMMunication SERial ECHO Ouenm B 21 SYSTem COMMunication SERial ENABle
34. STANDARD MODELS ONLY Syntax Short Form SYST COMM SER BAUD Long Form SYSTem COMMunication SERial BAUD Return Value lt int_value gt 38400 19200 9600 4800 2400 Description Indicates baud rate B 20 KLR DEV 060713 B 84 SYSTem COMMunication SERial ECHO COMMAND SYST COMM SER ECHO 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 When echo mode is OFF turns off the character echo after the nest line terminator character The RST command has no effect on echo status B 85 SYSTem COMMunication SERial ECHO QUERY SYST COMM SER ECHO STANDARD MODELS ONLY Syntax Short Form SYST COMM SER ECHO Long Form SYSTem COMMunication SERial ECHO Return Value lt int_value gt 014 on enabled or 00y off disabled Description Indicates whether echo mode is on 01 or off 004 See PAR 8 2 2 1 B 86 SYSTem COMMunication SERial ENABle COMMAND SYS 1 COMM SER ENAB STANDARD MODELS ONLY Syntax Short Form SYST COMM SER ENAB 1 0 1 on enabled 0 off disabled Long Form SYSTem COMMunication SERial ENAB 1 0 1 on enabled O off disabled Description Enables 1 ON or disables 0 OFF transmission of
35. Sub cmdStart_Click Set driver New KepcoDCPwr On Error GoTo ErrorHandler initialize the driver note ID device is true driver Initialize GPIBO 6 INSTR _ True _ True _ Cache true InterchangeCheck false QueryInstrStatus true Simu late false Dim result As Boolean result driver Initialized This will now set the limit model to a 36 32 unit driver KpDCPwr_SetAttributeViReal64 KPDCPWR_ATTR_POSITIVE_VOLTAGE_RATED_LIMIT 36 driver KpDCPwr_SetAttributeViReal64 KPDCPWR_ATTR_POSITIVE_CURRENT_RATED_LIMIT 32 driver Close StatusTextBox Text StatusTextBox Text amp Driver closed amp vbCrLf StatusTextBox Refresh Exit Sub ErrorHandler MsgBox Err Description driver Close Exit Sub End Sub Wait the specified number of seconds Private Sub Delay DelayTime As Single Dim Finish As Single Finish Timer DelayTime Do Loop Until Finish lt Timer End Sub FIGURE 3 5 SETTING LIMIT MODEL WRITTEN IN VISUAL BASIC 3 5 EXAMPLES USING LABVIEW These LabView examples show the use of the IVI COM driver with LabView 8 The procedure used to create the examples is found in the KepcoDcPwr help file that was installed in the IVI portion of your Start menu Step by step instructions are detailed in e Getting Started with the IVI COM Driver Development Environments Using LabView KLR DEV 060713 3 17 3 5 1 3 5 2 SETTING THE OUTPUT TO A VALUE Figure 3 6 illustrates the use of the IVI COM driv
36. Syntax Short Form SOUR VOLT LEV TRIG AMPL MAX Long Form SOURce VOLTage LEVel TRIGgered AMPLitude MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Description Returns value representing voltage value to be programmed by TRG command established by VOLT TRIG command VOLT TRIG MAX returns maximum permissible value that can be pro grammed by VOLT TRIG the lower of VOLT LIM HIGH and 80 of VOLT PROT See example Fig ure B 1 NOTE The following example assumes KLR 75 32 with limit model set for 36V 32A and output operat ing in voltage stabilization mode See Figure B 3 for directions on programming limit model set tings VOLT 21 8 CURR 5 OUTP ON Enables output NOTE Load determines output operating mode if load resistance is greater than 21 8 0 5 output will operate as voltage stabilizer MEAS VOLT Returns measured output voltage approximately 2 18E1 21 8V assuming voltage stabilizer operation VOLT Returns 2 18E1 21 8V programmed output voltage VOLT 2 15 Programs output voltage to 2 15V VOLT Returns 2 15E0 2 15V programmed output voltage VOLT MAX Returns 3 6E1 36V the limit model voltage setting VOLT MIN Returns 0 minimum allowable program voltage VOLT PROT 6 5 VOLT PROT 25 VOLT PROT Returns 2 5E1 25V VOLT 26 Returns error message 301 Value bigger than limit ESR bit 3 1 and voltage setting remains unchange
37. VOLTage PROTection LEVel lt exp_value gt lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Sets overvoltage protection OVP level for power supply Restricts valid programmable voltage to be no greater than 80 of this setting overriding Limit Model voltage limit VOLT LIM HIGH when overvoltage protection is less than 80 of the voltage limit Valid range is 20 to 120 of rated model maximum voltage e g 15V to 90V for KLR 75 32 After executing VOLT PROT the Output is set to OFF and previously stored trigger levels are reset to zero volts and minimum current If the programmed OVP value is out of the acceptable overvoltage range for the power supply model error message 222 Data out of range is posted in the output queue If the power supply out put exceeds the voltage protection level programmed then the power supply output is disabled pro grammed to OV minimum current and the OVP bit in the Questionable Condition status register is set The value of VOLT PROT is automatically recalculated if VOLT LIM HIGH is executed See example Figure B 5 B 55 SOURce VOLTage PROTection LEVel QUERY VOLT PROT Syntax Description B 14 Short Form SOUR VOLT PROT LEV MIN MAX Long Form SOURce VOLTage PROTection LEVel MIN MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Identifies overvoltage protection setting maximum allowabl
38. While the parser follows strict SCPI protocol for outgoing data it is designed to be more forgiving of incoming data As a consequence all IEEE 488 2 commands and queries see Table A 1 are evaluated in multiple tables potentially resulting in multiple consecutive occurrences of the error code 113 undefined header in the error queue Pai SYSTem ERRor CODE NEXT QUERY SYST ERR CODE Syntax Description Short Form SYST ERR CODE NEXT Long Form SYSTem ERRor CODE NEXT Return Value nnn nnn 3 character error code Returns the three character error code without the ASCII definition string The error codes are defined in table B 5 See example Figure B 1 B 94 SYSTem ERRor CODE ALL QUERY SYST ERR CODE ALL Syntax Description Short Form SYST ERR CODE ALL Long Form SYSTem ERRor CODE ALL Return Value comma separated list of all error codes Returns a comma separated list of all error codes A maximum of 15 codes will be returned if the queue is empty the power supply returns 0 B 95 SYSTem KLOCk COMMAND SYST KLOC Syntax Description B 22 Short Form SYST KLOC 1 0 1 on locked O off unlocked Long Form SYSTem KLOCKk 1 0 1 on locked 0 off unlocked Locks ON or 1 or unlocks OFF or 0 the front panel controls When set to OFF local lockout is disabled and the power supply enters Remote mode as soon as a command or query is received Once in Remote mode with local l
39. also clears fault errors for faults not set to PROTECT mode Related Commands OUTP See example Figure B 1 B 8 KLR DEV 060713 B 35 OUTPut STATe QUERY OUTP Syntax Short Form OUTP STAT Long Form OUTPut STATe Return Value lt int_value gt 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 B 36 SOURce CURRent LEVel IMMediate AMPLitude COMMAND CURR Syntax Short Form SOUR CURR LEV IMM AMPL lt exp_value gt Long Form SOURce CURRent LEVel MMediate AMPLitude lt exp_value gt lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Description Sets programmed current level at power supply output This command programs the output cur rent regulation point to a specific value actual output current will depend on load conditions If the pro grammed value exceeds the rated model maximum for the model being programmed error message 222 Data out of range is posted in output queue If the programmed value exceeds either the Limit Model limit CURR LIM HIGH or 80 of current protection CURR PROT a value corresponding to CURR LIM HIGH or 80 of CURR PROT respectively is programmed and error message 301 Value too large is posted in output queue If a value programmed is lower than the model mini mum curre
40. also used with the TCP IP protocol Again the only command supported is the GETPORT Port 111 is the method called the Discovery process used by National Instruments and Agilent to find the resource KLR E Series Models support the discovery process implemented by Version 1 1 of the LXI Specification using this port and a VXI 11 protocol as well as the XML pro tocol proposed by Version 1 2 of the LXI specification Port 1024 VXI 11 This port supports up to two connections VXI 11 uses one stan dard port 1024 and two assigned by the instrument when connections are opened The 1024 port is open at all times to accept connection requests The VXI 11 port requires the use of a lock which prevents other VXI 11 connections from gaining access to the instrument This port is accessed using the VISA resource string ending in INST e g TCIPO 192 168 1 100 INST Port 5024 Telnet This port supports up to two connections the Telnet command pro vided with all windows operating systems can be run with the following command line use Start Run TELENET IPADDRESS PORT eg TELNET 192 168 0 100 5024 When the program is run entering commands found in Appendix A and B of this Devel oper s Guide allow the operation of the unit via the Telnet port KLR DEV 060713 2 4 2 5 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 Thi
41. 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 Click Refresh causes the LabView program to initiate a new search and provide an updated list of all devices found on the GPIB Serial ports and network connections You may enter a valid resource name directly or for demo mode enter a blank resource name The VOLTAGE and CURRENT knobs are used to set the voltage and current of the power sup ply Once the run button is clicked the VOLTAGE and CURRENT knob markings will show the limit model minimum and maximum values The corresponding DC VOLTS and DC AMPERES displays report the measured voltage and current of the power supply and are updated once every 250 milliseconds As the knob rotates the number in the counter below the knob changes if a number is entered in the counter the knob rotates to the proper position If the instrument is found the demonstration program runs in normal mode If the instrument is not found the Instrument Error box at the lower right shows instrument not found the demonstration program runs in simulation mode In simulation mode the resistance value at the bottom of the front panel is a simulated load used to measure the DC output The simulated load can be set by the user to control the DC VOLTS and DC AMPERES displays The POWER SUPPLY MODE switch is used only to select current or voltage mode ramps when using the Sof
42. are presented in Sections 3 IVI COM Driver 4 LabView G Driver and 5 VXI plug amp play Driver KLR DEV 060713 1 2 1 1 2 2 1 2 3 1 2 4 1 2 5 1 2 6 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 OUTPUT CONTROL The power supply class instrument has specific requirements to support voltage and current settings output enable and protection These functions are common to all power supplies in the power supply class MEASUREMENT The Power supply has the ability to measure the voltage and current at the output and display this information on the front panel The measurement system provides the ability to read this back from the unit LIMIT MODELS USER DEFINED VOLTAGE CURRENT LIMITS The KLR Power Supply can be programmed to user defined values that can be lower than the maximum values For example although the KLR 40 60 is factory set to 40V and 60A 2400 Watts arbitrary limits e g 40A 30V or 30A 35V can be established Once the limits are set setting values exceeding the limit values will not be accepted The limit model settings are pass word protected SAVE RECALL STORAGE OF US
43. be also used with the TCP IP protocol Again the only command sup ported is the GETPORT KLR DEV 060713 APPENDIX A IEEE 488 2 COMMAND QUERY DEFINITIONS A 1 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 TABLE A 1 IEEE 488 2 COMMAND QUERY INDEX COMMAND PAR COMMAND PAR CLS A2 RST A 13 ESE A 3 A 4 SAV A 13 ESR A5 SRE A 13 A 14 IDN A 6 STB A 15 OPC A 7 A 8 TRG A 16 OPT A 13 TST A 17 RCL A 13 WAI A 18 A 2 CLS CLEAR STATUS COMMAND C LS Syntax CLS Description Clears status data Clears the following registers without affecting the corresponding Enable Regis ters Standard Event Status Register ESR Operation Status Event Register Questionable Status Event Register and Status Byte Register STB Also clears the Error Queue Related commands OPC OPC See example Figure A 1 ESE A 3 ESE STANDARD EVENT STATUS ENABLE COMMAND Syntax ESE lt integer gt where lt integer gt positive whole number 0 to 255 per Table A 2 Default Value 0 Description This command programs the standard Event Status Enable register bits The conte
44. be received or transmitted by the KLR is 253 characters All numerical data is returned in scientific notation digits with decimal point and Exponent e g 2 71E1 for 27 1 after calibration constants have been applied Thus for example VOLT 14 VOLT may return 1 39997E1 which indicates that the unit has been calibrated to provide 13 9997V for a programmed value of 14V within the calculation accuracy of the KLR Error 120 results from syntactical errors e g the exponent exceeds 8 a letter is identified etc Error 222 is produced if the value exceeds the range of acceptable values for the parameter B 3 ABORt COMMAND ABOR Syntax Short Form ABOR Long Form ABORt Description Cancels previously armed trigger resets WTG if the trigger system is armed INIT CONT set to OFF and INIT IMM sent sending ABORt disarms the trigger system so subsequent trigger com mands have no effect If INIT CONT ON has been programmed this command has no effect Related Commands INIT TRG See example Figure B 1 BA CALibrate COMMANDS AND QUERIES CAL CAL commands and queries are used to perform calibration of the unit via the control interface These commands must be issued in a specific sequence in order to properly calibrate the unit To use these Commande 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 followi
45. bit Echo mode is the default method used to ensure reliable communications between the command originator computer and the KLR Power Supply When the KLR Power Supply is in the RS 232 echo mode it returns all data received from the host computer Echo mode is highly recommended when using the manual keyboard entry method The KLR Power Supply provides two additional options that allow handshake style communica tion the prompt method and the XON XOFF method In the standard implementation of echo mode the controller must verify that each character sent is echoed back by the KLR However as can be seen in Figure 8 1 there are times when the KLR does not echo back the character sent from the controller requiring that the controller resend the character By using the hand shake options prompt and XON XOFF the host computer can ensure that the serial data inter rupts occurring after parsing of the incoming message do not result in lost data Figure 8 1 illustrates the default echo mode the prompt method and the XON XOFF methods described in the following paragraphs FIGURE 8 1 RS 232 IMPLEMENTATION STANDARD MODELS ONLY KLR DEV 060713 8 2 2 1 8 2 2 2 8 2 2 3 While both echo and prompt modes are very useful when communicating with the instrument using manual keyboard entry these functions will create problems if implemented with elec tronic control For this reason the Kepco drivers for KLR will automatically disable these
46. 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 GPIBO 6 INSTR True True Cache true InterchangeCheck false QueryInstrStatus true Simu late false Dim result As Boolean result driver Initialized Set outputPtr driver Outputs Item driver Outputs Set protectionPtr driver Protections Item driver Protections Set measurementPtr driver Measurements Item driver Measurements set voltage level outputPtr VoltageLevel 75 enable OV protection and set OV level protectionPtr ConfigureOVP 15 set current level outputPtr CurrentLimit 10 enable the output outputPtr Enabled True Delay 10 Measure the voltage Dim measVoltage As Double measVoltage measurementPtr Measure KepcoDCPwrMeasurementVoltage FIGURE 3 3 SETTING THE OUTPUT AND TAKING A MEASUREMENT EXAMPLE WRITTEN IN VISUAL 3 14 BASIC SHEET 1 OF 2 KLR DEV 060713 display the measured voltage StatusTextBox Text StatusTextBox Text amp Measured Voltage is amp measVoltage amp nel amp channel StatusTextBox Refresh at chan ReadInstrumentError driver driver Close StatusTextBox Text StatusTextBox Text amp Driver closed amp vbCrLf StatusTextBox Refresh Exit Sub ErrorHandler MsgBox Err Description driver Close Exit Sub End Sub Wait the specified number
47. command CAL SAVE command CAL STAT command and query CAL VEXT command CAL VGA command CAL VOLT LEV command CAL VOLT DATA command CAL ZERO command PROGRAM 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 indi cates the end of a line newline character The message unit is a keyword consisting of a sin gle command or query word followed by a message terminator e g CURR lt newline gt or TRIG lt end of line gt The message unit may include a data parameter after the keyword sepa rated by a space the parameter is usually numeric e g CURR 5 lt newline gt but may also be a string eg OUTP ON lt newline gt Figure 6 1 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 com mand must use the full syntax shown in Appendix B KEYWORD Keywords are instructions recognized by a decoder within the KLR referred to as a parser Each keyword describes a command function all keywords used by the KLR are listed in Figure
48. data via the RS 232 port see PAR 8 2 2 Once RS 232 transmission has been disabled it can be enabled again by either turning the unit off then on or by sending SYST COMM SER ENAB 1 via the GPIB port B 87 SYSTem COMMunication SERial ENABle QUERY SYST COMM SER ENAB STANDARD MODELS ONLY Syntax Short Form SYST COMM SER ENAB Long Form SYSTem COMMunication SERial ENAB Return Value lt int_value gt 014 on enabled or 00y off disabled Description Indicates whether RS 232 transmission mode is enabled 014 ON or disabled 004 OFF See PAR 8 2 2 B 88 SYSTem COMMunication SERial PACE COMMAND SYST COMM SER PACE STANDARD MODELS ONLY Syntax Short Form SYST COMM SER PACE NONE XON Long Form SYSTem COMMunication SERial PACE NONE XON Description Enables XON or disables NONE data flow control via the serial interface see PAR 8 2 2 3 B 89 SYSTem COMMunication SERial PACE QUERY SYST COMM SER PACE STANDARD MODELS ONLY Syntax Short Form SYST COMM SER PACE Long Form SYSTem COMMunication SERial PACE Return Value lt int_value gt 014 on XON enabled or Ou off XON disabled or NONE Description Identifies whether data flow control via the serial interface is enabled 014 XON or disabled 004 NONE see PAR 8 2 2 3 B 90 SYSTem COMMunication SERial PROMpt COMMAND SYST COMM SER PROM STANDARD MODELS ONLY Syntax Short Form SYST COMM SER PROM 1 0 1 on enabled O off d
49. event status sum mary bit when an STB command is executed ESE Returns 60 value of mask verifying that bits 5 4 3 and 2 are enabled ES Invalid command this will set error bit 5 command error ESR 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 OPC Directs status bit O to be set once pending operations are completed OUTP ON Enables output NOTE RST and power up condition is output off VOLT 35 CURR 30 ESR Sets output voltage to 35V current limit to 30A Returns 129 indicating 128 PON bit 7 1 1 OPC bit 1 1 ESR Returns 0 event status register cleared by prior reading VOLT 41 5 CURR 21 5 Sets output voltage to 41 5V current limit to 21 5A OPC Returns 1 once command operations are completed RST Resets power supply to output off zero volts minimum current OUTP ON Enables output SRE 40 Enables bits 5 event status byte summary and 3 questionable status summary see Table A 3 to set the request for service bit SRE Returns 40 value of mask indicating bits 5 and 3 are enabled STB Returns the value of the status byte register including bit 6 master sta tus summary without clearing the register for example a response of 96 would i
50. generator panel Figure 4 10 is displayed The frequency slider determines the frequency of the generated waveform The number of points determines the limits for frequency adjustment For example if 10 points are selected the maximum frequency is 100 Hz the lowest frequency is 0 0015 Hz The number of points determines the smoothness of the waveform because it is constructed incrementally but it also limits the maximum frequency For example if the 250 maximum points are selected the frequency is 0 00001 Hz The Amplitude and Offset sliders are to the right of the Frequency slider When the requested output exceeds the capability of the KLR the output is clipped by the function generator Below these sliders is the Waveform Type dropdown selector either Sine Sawtooth Triangle or Square Below the Waveform Type dropdown is a visual display of the points that have been specified To the left of the displayed waveform is the Duty Cycle slider which affects square wave shapes only The Phase slider shifts the start point of the waveform As these sliders are changed the digital display beneath the slider shows the setting Changes to the slider settings immediately change the Commanded Waveform display to reflect the new parameters Above the Start button two additional parameters required for the execution of the waveform are displayed The value of the non changing parameter current in Amperes for a voltage waveform shown in Figure 4 13
51. nnnn cnn na rnn nc nn nr arrancan aran B 4 KLR DEVGD 020498 SECTION B 13 B 14 B 15 B 16 B 17 B 18 B 19 B 20 B 21 B 22 B 23 B 24 B 25 B 26 B 27 B 28 B 29 B 30 B 31 B 32 B 33 B 34 B 35 B 36 B 37 B 38 B 39 B 40 B 41 B 42 B 43 B 44 B 45 B 46 B 47 B 48 B 49 B 50 B 51 B 52 B 53 B 54 B 55 B 56 B 57 B 58 B 59 B 60 B 61 B 62 B 63 B 64 B 65 B 66 B 67 B 68 B 69 B 70 TABLE OF CONTENTS PAGE SOURce LIST COUNt Commande B 4 SOURCE LIST COUNT QUE Y eieiei Aaa B 4 SOURce LIST COUNt SKIP Commande B 4 SOURce LIST COUNt SKIP Query ne eshesi eraen rek ataia iNi ra eo a aie dai B 5 SOURce LIST CURRent Commande B 5 SOURce LIST CURRent Ouer B 5 SOURce LIST CURRent POINtS Ouer B 5 SOURce LIST DIRection Commande B 5 SOURce LIST DIRecti0n Query c occococconocccniccnnonanonccconnnnoncnnn coo nn cnn cnn corran crac rra ranas B 5 SOURGE LIST DWEE Command aida ai B 5 SOURce LIST DWELI Ouer B 6 SOURce LIST DWELI POINtS Query cooncccicccconccocccconiconncnoncconnannnccnnn corran cnn rra ran cnn rana ranma B 6 SOURce LIST QUERy Commande B 6 SOURceJLIST QUERY Query iria didas B 6 SOURce LIST VOLTage Command issiro iieii iie ea EEEE i ie iE i B 6 SOURce LIST VOLTage Query c coocccccccccccconccooncnnnnnonncnnnnnnnconnonnn cnn cn nn nn nnna cnn rn r anna cerrar nene nc nnna naar B 6 SOURce LIST VOLTage POINtS Query cocooocoocccocccconccooncnncncnnnannn conocio cnn cnn n
52. of seconds Private Sub Delay DelayTime As Single Dim Finish As Single Finish Timer DelayTime Do Loop Until Finish lt Timer End Sub FIGURE 3 3 SETTING THE OUTPUT AND TAKING A MEASUREMENT EXAMPLE 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 It also specifies 3 different dwell times Option Explicit Public driver As KepcoDCPwr Public outputPtr As IKepcoKLROutput Private Sub cmdExit_Click Unload Me End Sub Private Sub cmdStart_Click Set driver New KepcoDCPwr On Error GoTo errorHandler initialize the driver driver Initialize GPIBO 6 INSTR False True Cache true InterchangeCheck false QueryInstrStatus true Simulate false Dim result As Boolean result driver Initialized get references to the needed interfaces Set outputPtr driver Outputs Item driver Outputs Set listPtr driver list FIGURE 3 4 EXAMPLE OF USING A LIST WRITTEN IN VISUAL BASIC SHEET 1 OF 2 KLR DEV 060713 3 15 3 4 3 3 16 Delay 100 ReadInstrumentError driver driver Close Exit Sub errorHandler MsgBox Err Description driver Close Exit Sub End Sub Private Sub ReadInstrumentError agDrvr As IIviDriver Read instrument error queue until its empty
53. ooococccccnncccccooncnnoncncnnnnnnnnn cnn non n nc cnn nn rro nn A 2 A 6 IDN Identification QUELY TEE A 2 A 7 OPC Operation Complete Command AAA A 3 A 8 OPC Operation Complete Query EEN A 3 A 9 OPT Operation Complete Query c ocoocccccccccnnoccccnoncnnonononnnnnonnnn conan rn nr rre A 4 A 10 RE Recall Command iu a A a aaa aa A 4 A 11 RST Reset COMME A 4 A 12 SAV SAVES COMMANG TEE dildo A 4 A 13 SRE Service Request Enable Commande A 5 A 14 SRE Service Request Enable Query AAA A 6 A 15 STB Status Byte Register Query AAA A 6 A 16 ETRE Tri COMMA WEE A 6 A 17 TST Self Lest EE A 6 A 18 WAI Wait Command A A A EE dE A 6 APPENDIX B SCPI COMMAND QUERY DEFINITIONS B 1 Ta gece LU e asta tdi A can B 1 B 2 Numerical Valles ocio andate B 2 B 3 ABORT COmmMannd EE B 2 B 4 CALibrate Commands and Queries eccceceeeeceeeeeeeeeeeeeceeeeeaeeeeeesaeeeaaeseeeeseeeeeaaeeeeeecaeeseeeseeeesiaeeeeeeeneeed B 2 B 5 DISPlay Window TEXT DATA Query ccceceeeceeeeeeeteeeeeeceneeeeae seers ceaeseeeeeeeeesaeeeeeeseneessaeeeeeeseeeenaeeneeee B 2 B 6 INITiate IMMediate Commande B 2 B 7 INITiate CONTINUOUS Commande B 3 B 8 INI Mate CONTINUOUS QUELY usina ile o ias B 4 B 9 SOURCe JLIST CLE ar Commande B 4 B 10 SOURCe LIST CONTrol Commande B 4 B 11 SOURCE EIST CONTO QUERY cocoa ta tel edi biel ae Oa tee pA ee B 4 B 12 SOURce LIST CONtrol POINtS Query coooooncccoccccococonccconannncnn conc
54. protocol support LAN VXI 11 TCIP 192 168 0 100 INSTR This LAN interface requires a more complex handshake for data and is inherently slower than a socket interface It is similar to the GPIB interface where you tell the device when to take data and when it is acceptable to receive data 6 8 KLR DEV 060713 BRR RRR KK RR RR KKK KR RRR KKK KR RR KKK KK KR RR KR RRR KK KK KK KK J Sample Program For KEPCO power supply using National Instruments any interface F EEE A tinclude visa h visa controls and functions include lt stdio h gt include decl h ViChar rd_str 801 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 change 06 to the GPIB address of unit LAN addresses changed the 192 168 0 100 to IP address found via the unit front panel inter face ViChar id_str TCIP 192 168 0 100 INSTR VXI 11 instrument via LAN port 1024 ViChar id_str TCIP 192 168 0 100 5025 SOCKET SCPI RAW port 5025 LAN instrument change 0 to actual communications port in use ViChar id_str ASRLO INSTR serial port ViOpen uses the resource string to find the device and returns a session id to the user ViSession Kepco_Session main if viOpen Kepco_Session id_str VI_NULL VI_NULL VI_NULL 0 strcepy dat_str VOLT 5 CURR 1 Define a set command strcat d
55. the C and the VB NET environments it is the easiest to use More information about the various programming environments can be found in the kepcoDCPwr driver help file which is automatically installed during driver installation Initializing the driver is easy only the driver name is required using System using KepcoDCPwr Interop Create driver instance KepcoDCPwr KLRdriver KepcoDCPwr Interop Output outputPtr KepcoDCPwr Interop IList listPtr KLRdriver new KepcoDCPwrClass The connection between the host and the KLR is then established by the following code KLRdriver Initialize GPIBO 6 INSTR true true Cache true InterchangeCheck false QueryInstrStatus true Simu late false IVI options get references to the needed interfaces outputPtr KLRdriver Outputs get_Item driver Outputs listPtr KLRdriver List get_Item driver Lists The list functionality uses arrays The following code creates these arrays and then fills them with data create arrays for the ListPoints method double voltList new double 6 double currList new double 6 double dwellTime new double 6 voltList 0 10 voltList 1 20 voltList 2 30 voltList 3 40 voltList 4 50 voltList 5 60 currList 0 2 select max current for each step currList 1 2 currList 2 2 currList 3 2 KLR DEV 060713 currList 4 2 currList 5 2 dwe
56. this change CURR Returns 4E 1 0 4A CURR MAX Returns 3 333E1 33 33A the limit model current setting CURR PROT 5 For this model minimum overcurrent protection is 0 72 x 32 23 04A CURR PROT 25 CURR PROT CURR 26 CURR PROT MAX therefore power supply returns error message 222 Data out of range ESR bit 4 1 and the limit remains unchanged Programs overcurrent protection limit to 25A Returns 2 5E1 25A Returns error message 301 Value bigger than limit ESR bit 3 1 and current setting remains unchanged at 0 4A Returns 4E1 maximum allowable overcurrent protection limit for model is 40A 20 above maximum current 32A for KLR 75 32 regardless of limit model setting FIGURE B 4 KLR DEV 060713 PROGRAMMING AS A CURRENT STABILIZER B 11 B 43 SOURce CURRent PROTection LEVel QUERY CURR PROT Syntax Description Short Form SOUR CURR PROT LEV MIN MAX Long Form SOURce CURRent PROTection LEVel MIN MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Returns value representing current protection level CURR PROT returns value set by CURR PROT CURR PROT MAX returns maximum current protection value This value is deter mined at the factory and cannot be changed by the user CURR PROT MIN returns the minimum cur rent protection value See example Figure B 4 B 44 SOURce CURRent LEVel TRIGgered AMPLitude COMMAND CU
57. 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 voltList voltList voltList voltList voltList voltList S bes 20 30 40 OPWNR O currList currList currList currList currList currList select max current for each step UG GA AA O dwellTime 0 dwellTime dwellTime dwellTime dwellTime dwellTime 0 1 2 3 4 5 01 call ListPoints to set the list values and set the voltage and current modes to LIST listPtr ListPoints ref voltList ref currList ref dwellTime enable the output outputPtr Enabled true Set the number of executions listPtr count 2 initiate the list in the output system outputPtr listInitiate KLRdriver Systems WaitForOperationComplete 10000 Read instrument errors ReadInstrumentError driver Close driver if initialized if KLRdriver Initialized true KLRdriver Close Console WriteLine Console Write Press Enter to Exit Console ReadLine catch Exception e Console WriteLine Console WriteLine
58. which turns the output off sets volt age to zero and current to minimum and disables execution of a programmed list The initialization function provides three outputs e Visa Session a handle defining the connection e Model a string providing the model type for the functions Error out If the function did not fail this is a O The first block of Figure 4 6 KepcoDCPWR initialize function performs the open creating the connection between the LabView program and the power supply using the VISA dll supplied with LabView The KepcoDCPWR initialize function has two optional settings reset unit and identify unit The reset unit option sends RST to the unit which sets the output to 0 volts mini mum current turns the output off and stops list execution The identify unit option sends an IDN query to the power supply The recognize unit utility function parses the response to determine the proper model number output If the identify unit flag is not set the MODEL OUT of the initialize function reports Stan dard as the power supply type The Standard model is a unit that only supports setting voltage current and output on off and performing measurements all other functions are bypassed The function 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 sess
59. 1 A8 OPC OPERATION COMPLETE QUERY O PC Syntax OPC Return value lt 1 gt ASCII placed in output queue when power supply has completed operation Description Indicates when pending operations have been completed When all pending operations are com KLR DEV 060713 plete 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 pro gram can monitor the bus for data until it receives the 1 from the power supply Output Queue See example Figure A 1 AQ OPT OPERATION COMPLETE QUERY OPT 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 b DSM indicates number b of characters in front panel display CCAL indicates calibration can be performed without manually adjusted pots Description Lists configuration parameters in format compatible with LabView and C routines Configura tion parameters include List settings number of poi
60. 1 3 1 3 Multithreading SUP POMt sucio A bei iria 3 1 3 1 4 Context Sensitive Help io aia 3 2 3 1 5 Installer ico 3 2 3 1 6 Kiel 3 2 3 2 IVI COM Instrument Driver FUNCtIONS non nonncnnno non non nan nn rn rnnnn rr nn nn ner rnr nen rann rn 3 2 3 3 Examples Using Cirasa a ia a eege e det ee ea 3 4 3 3 1 Setting the output to a value and Making a Measurement oocoocccinccccncnoccnnoncnnononcnonn conan o nnnnno nan nrncn cnn nnnnnno 3 4 3 3 2 Using a list to Perform a Series of Operations 0ooooocccnnccccnnoncncnccnnnnonnncnnn nn nnnnn cn nnn cnn rnnn rr 3 8 3 3 3 Setting Limit Model ica aa es 3 11 3 4 Examples Using Visual BaSjC risinn e eree o A 3 12 3 4 1 Setting the Output to a Value and Taking a Measurement o oncccnccccinocccnnncccnnnnononnnnncnnnnnnnnnnn nan arncnnnnnnnnnnnn 3 12 3 4 2 Using a List to Perform a Series of Operation 3 15 3 4 3 Setting Limits Model coc ta 3 16 3 5 Examples Using Lab View omnia nea ains 3 17 3 5 1 Setting the OUtpUt tO A value eee eect eeeee eects non erida iniaa ieiet aidera eesin rre 3 18 3 5 2 Getting a voltage and current reading from the power Supp 3 18 3 5 3 Changing the limit Model O Aa 3 19 SECTION 4 LABVIEW G DRIVER 4 2 LabView G Instrument Elter citando a latas 4 1 4 3 LabView G Instrument Driver FUNCTIONS 00 0 eee cette ceeneeeeeeee i aki daaa aieiaiei riedi ias 4 1 4 4 Using the Driver FUNCIONS sariri est eer dd Caaaeueia eieae aN Madea ia nigon ia iaaii 4 3 4 4 1 KepcoDCPwr Conf
61. 12 256 64 32 2 1 PR PROGRAM RUNNING WTG WAIT FOR TRIGGER SET BY TRIG SUBSYSTEM B 59 STATus OPERation ENABle COMMAND STAT OPER ENAB Syntax Short Form STAT OPER ENAB lt int_value gt 0 to 1313 1 32 256 1024 Long Form STATus OPERation ENABle lt int_value gt 0 to 1313 1 32 256 1024 Description Sets Operation Enable Register The Operation Enable Register is a mask for enabling specific bits in the Operation Event Register which will cause the operation summary bit bit 7 of the Status Byte register to be set Bit set to 1 function enabled active true bit reset to O function disabled inac tive false The operation summary bit is the logical OR of all the enabled bits in the Operation Event register See example Figure B 6 Pen STATus OPERation ENABle QUERY STAT OPER ENAB Syntax Short Form STAT OPER ENAB Long Form STATus OPERation ENABle Return Value lt int_value gt 0 to 1313 1 32 256 1024 Description Reads Operation Enable Register see Table B 2 Returns value of Operation Enable Register bits Bit set to 1 function enabled active true bit reset to O function disabled inactive false See example Figure B 6 B 61 STATus OPERation EVENt QUERY STAT OPER Syntax Short Form STAT OPER EVEN Long Form STATus OPERation EVENt Return Value lt int_value gt 0 to 1313 1 32 256 1024 Description Indicates changes in conditions monitored by Operational
62. 3 6 2 6 3 A 1 B 1 B 2 B 3 B 4 B 5 B 6 LIST OF FIGURES TITLE PAGE Status Reporting Structure iii oie 1 5 KLR Communication Block Diagram cnn nan nst nn naar nnn nnns ntent nnnn nn 2 1 Example of Setting the Output and taking a measurement written in Cat 3 6 Example of Using a List written in CH 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 3 15 Setting Limit Model Written in Visual Basic 3 17 Setting the Output Using LabView with IVI COM Driver ooooonnnoncccnnoncncoccnonononcnano nn nnnrn corno nn rro nr nn 3 18 Measuring Voltage and Current Using LabView with IVI COM Driver 3 19 Setting the Limit Model Using LabView with IVI COM Driver 3 19 KepcoDCPwr Configure Voltage Level vi Connector Panel 4 3 KepcoDCPwr Configure Voltage Level vi Block Diagram ooonocccnnnccconoccccnncccnnncnnnnnnrncnnno non nnnn cnn nrnccnnn cnn 4 5 KepcoDCPwr Configure Voltage Level vi Error Block Diagram ooooccncccnnnncccnnncccnnonccnnnnnncnnrnnn nono nonnnnnnnnnnos 4 5 KepcoDCPwr Measure MSR vi Control Panel 4 5 KepcoDCPwr Measure MSR vi Block Diagoram nono conan nc nana nr nan na rar r nani 4 6 Setting the Output Overall Block Disgram non nnnnon nc nano cnn ronca nar r cnn nn nnrnrnnn rn 4 8 Front Panel VA ais 4 10 Software Ramp Panel Current Ramp Example cecccecsseceeeeeeeeeeeeeeeeeeeneeeeeaeeceeeeeesneeeeseaeeesneeeeeneeesaas 4
63. 6 2 Each keyword has a long form and a short form For the long form the word is spelled out com pletely 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 6 1 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 KLR DEV 060713 6 3 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 TABLE 6 1 RULES GOVERNING SHORTFORM KEYWORDS IF NUMBER OF LETTERS IN AND FOURTH LETTER THEN SHORT FORM EXAMPLES LONGFORM KEYWORD IS IS A VOWEL CONSISTS OF 4 OR FEWER DOES NOT MATTER ALL LONG FORM LETTERS MODE THE FIRST FOUR LONG FORM LETTERS MEASure OUTPut EVENt NO 5 OR MORE THE FIRST THREE LONG FORM LETTERS LEVel IMMediate ERRor YES KEYWORD DATA SEPARATOR ROOT SPECIFIER DATA MESSAGE UNIT SEPARATOR MESSAGE UNIT SEPA
64. 7 SOURce LIST CURRent COMMAND LIST CURR Syntax Short Form LIST CURR lt exp_value gt lt exp_value gt to max of 250 data points Long Form LIST CURRent lt exp_value gt lt exp_value gt to max of 250 data points lt exp_value gt digits with decimal point and Exponent e g 2 71E1 for 27 1 Description Adds the current value in Amps to list This command sequentially adds LIST CURRent values to the main channel List Data Table Starting location is indicated by LIST CURR POIN The maximum number of entries is 250 Since the input buffer of the KLR has a limit of 253 characters multiple com mands are necessary to complete the full 250 entries of the list If LIST CURR is entered for only the first location that current level will apply to all points when either VOLT MODE LIST or CURR MODE LIST is executed Related Commands LIST CURR POIN See example Figure B 2 B 18 SOURce LIST CURRent QUERY LIST CURR Syntax Short Form LIST CURR Long Form LIST CURRent Return Value lt value1 gt lt value2 gt to lt value16 gt Description Identifies the parameters main channel entered for the list Starting at location established by LIST QUERy returns comma separated list of up to 16 values indicating the main channel parameters entered e the contents of main channel List Data Table Related Commands LIST CURR LIST QUERy If LIST VOLT has any entries an error message 221 Settings con
65. 9 1 TELNET PORT 5024 AND SCPI RAW PORT 5025 CONTROL CHARACTERS HEX Name Key Function 1SOH Ctrl A Terminate connection 2STX Ctrl B Execute Trigger respond with lt TRIGGER gt 3ETX Ctrl C Execute Device clear to unit respond with lt DEVICE CLEAR gt Ctrl J or Ctrl M Line Terminator 5 ENQ Ctrl E Unit will respond with the user description of the device 12DC2 Ctrl R Lock port 14DC4 Ctrl T Unlock Port On receipt of Lock Port unit verifies other ports 5025 and 1024 are unused and grants the requesting port exclusive access to control KLR If port lock is unsuccessful unit responds with lt DENIED LOCK gt If successful unit responds with lt GRANTED LOCK gt KLR DEV 060713 9 1 9 4 9 5 9 6 9 7 9 2 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 The SCPI RAW port transfers ASCII SCPI data using the Control M or Control J characters as line terminators Table 9 1 lists the Control characters applicable to this port On receipt of Lock Port unit verifies other ports 5024 and 1024 are unused and grants the requesting port exclusive access to control KLR If port lock is unsuccessfu
66. B 2 B 14 SOURce LIST COUNt QUERY LIST COUN Syntax Short Form LIST COUNT Long Form LIST COUNt Return Value lt int_value gt Description Identifies how many times the list will be executed Returns value set by LIST COUN command See example Figure B 2 B 15 SOURce LIST COUNt SKIP COMMAND LIST COUN SKIP Syntax Short Form LIST COUN SKIP nn Long Form LIST COUNt SKIP nn nn 0 to 250 Description Allows beginning steps of list generated waveform to be run once then ignored When a list is to be repeated using LIST COUNT this command allows the user to skip the first nn steps once the full set has been executed After the first iteration which executes all steps the first nn steps are skipped The LIST COUN SKIP command allows the user to precondition a list generated waveform by setting unique conditions at the beginning that are not repeated for the rest of the repeti tions LIST CLEar sets nn to 0 Only works in LIST DIR UP mode if LIST DIR DOWN is issued this command has no effect Related Commands LIST COUN LIST COUN SKIP LIST DIR LIST CLE See example Figure B 2 B 4 KLR DEV 060713 B 16 SOURce LIST COUNt SKIP QUERY LIST COUN SKIP Syntax Short Form LIST COUN SKIP Long Form LIST COUNt SKIP Return Value lt int_value gt 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 B 1
67. COM driver is expressly forbidden IVI COM INSTRUMENT DRIVER FUNCTIONS Table 3 1 is a list of the KLR IVI COM driver functions The installed help file provides detailed information on these functions and all functions in the driver This driver is both a DCPWR class driver and a Kepco Specific driver The DCPWR class driver requires the class specific attribute to be accessed as a member in a structure The standard functions such as enabling the output setting the voltage level setting the current level are handled in this manner A setting in Table 3 1 is identified by the variable being in all caps Functions use both upper and lower case letters in the function name When a setting is to be modified then the functions KpDCPwr_SetAttributeViBoolean or KpDCPwr_SetAttributeViReal64 are used to update the variable and the functions KpDCPwr_GetAttributeViBoolean or KpDCPwr_GetAttributeViReal64 are used to get the variable When one of these class specified variables are modified its value is maintained in the driver When the get or read of the variable is called for the internal state variable is returned This behavior can be modified by making the KPDCPWR_ATTR_CACHE attribute false lt defaults to a true state as required by the IVI conventions KLR DEV 060713 TABLE 3 1 KLR IVI COM DRIVER FUNCTIONS Function Name Purpose nitialization KpDCPwr_init Initialize Power supply create session handle KpDCPwr_InitWithO
68. CPWR_ATTR_TRIGGERED_CURRENT_LEVEL Sets the current trigger level KPDCPWR_ATTR_TRIGGERED_VOLTAGE_LEVEL Sets the triggered voltage level of the power supply KPDCPWR_ATTR_TRIGGERED_CURRENT_LIMIT Sets the triggered current protect level of the KLR KPDCPWR_ATTR_TRIGGER_SOURCE Sets and views the trigger source KPDCPWR_ATTR_INIT_CONTINUOUS Enables continuous or single trigger events KpDCPwr_ConfigureTriggerSource Allows selection of the trigger source from External or software trig gers KpDCPwr_ConfigureTriggeredCurrentLimit Sends the current trigger level to the power supply KpDCPwr_ConfigureTriggeredVoltageLevel Send the voltage trigger level to the power supply KpDCPwr_Abort Sends abort to the KLR preventing a trigger event from changing the power supply output KLR DEV 060713 3 3 TABLE 3 1 KLR IVI COM DRIVER FUNCTIONS CONTINUED Function Name Purpose List supported in standalone configurations only KpDCPwr_ClearLists Empties all lists Prepares the KLR to receive a new list KpDCPwr_SetVoltageListValues Sends the new voltage point to the KLR KPDCPWR_ATTR_VOLTAGE_LIST_POINTS Provides the location of the next point to be entered into voltage list KpDCPwr_SetCurrentListValues Sends the new current point to the KLR KPDCPWR_ATTR_CURRENT_LIST_POINTS Provides the location of the next point to be entered into curre
69. DEVELOPER S GUIDE KLR SERIES POWER SUPPLY 2400 WATT PROGRAMMABLE POWER SUPPLY KEPCO INC MODEL An ISO 9001 Company KLR SERIES DEVELOPER S GUIDE ORDER NO IMPORTANT NOTES 1 This manual is valid for the following Model and associated serial numbers FIRMWARE VERSION NOTE 10 07 and higher 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 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 Data subject to change without notice 2013 KEPCO INC CHE KEPCO P N 243 1298 THE POWER SUPPLIER KEPCO INC e 131 38 SANFORD AVENUE FLUSHING NY 11355 U S A e TEL 718 461 7000 e FAX 718 767 1102 email hg kepcopower com e World Wide Web http www kepcopower com TABLE OF CONTENTS SECTION PAGE SECTION 1 INTRODUCTION 1 1 General Description dt 1 1 1 1 1 O EEE E E E EE E E E tea E E ated lint lodeaahaehteediaese 1 1 1 1 2 COMMUNICATION EEEE A T E ET E T 1 2 1 1
70. E OUTPUT ON OR OFF The following three functions are all that are required to set a voltage current and change the output state e KepcoDCPWR Configure Voltage Level Sets the voltage output of the power supply e KepcoDCPWR Configure Current Level Sets the current output of the power supply e KepcoDCPWR Configure Output State Turns the output on GET MEASUREMENT AND STATUS Three functions are needed to retrieve a measurement either voltage or current determine the output state and determine if there have been any errors e KepcoDCPWR Measure MSR Measures the output voltage in voltage mode current in current mode This function is explained in detail in paragraph 4 4 2 e KepcoDCPWR Query Output State Queries the output state and returns 1 for output on 0 for output off e KepcoDCPWR Error Query Retrieves the first error from the error queue The internal logic of this subvi changes the O no error response to a null string so no error returns nothing but if an error is detected returns an error string is returned CLOSE CONNECTION The last section is the close function KepcoDCPWR close This function is required to remove the connection to the instrument and clean up RAM usage in LabView It is very important to release the connections in E Series models as there are only four connections possible over VXI 11 Port 1024 and only two connections possible over SCPI Raw Port 5025 The Kep coDCPWR close functi
71. ER PROGRAMMED ACTIVE SETTINGS The KLR Power Supply contains 40 memory locations that can be used to store active settings Values are stored in the nonvolatile memory and are retained when the unit is turned off The stored settings can then be recalled and applied as desired See PAR A 13 for sav Save and A 13 for RCL Recall The unit has the ability to read or set the storage locations without affecting the output of the power supply These setting are cleared when a calibration is per formed Recalling a location which has never been loaded with data will cause a 221 Settings conflict error and the output is unchanged If a limit model setting PAR 1 2 4 is changed and a stored parameter is outside the range established by the new limit model when that location is recalled the parameter recalled appears at the output as the default minimum zero V or minimum A but the stored value is unchanged and no error message is issued LIST USER PROGRAMMED SEQUENCES Using the LIST functions up to 250 locations are available for programming the KLR output These locations enable the user to program the output using multiple command sequences which may be initiated by a single command see PARs B 9 through B 29 The repeatable user determined sequences are stored in volatile memory and are retained until reprogrammed the power supply is turned off a calibration is performed a LIST CLEar command is received or limit model settings
72. Event Register Returns the value of the Operation Event register The Operation Event register is a read only register which holds latches all events that occur Reading the Operation Event register clears it See example Figure B 6 B 62 STATus PRESet COMMAND STAT PRES Syntax Short Form STAT PRES Long Form STATus PRESet Description Disables reporting of all status events This command sets all bits of the Operation Condition Table B 2 and Questionable Condition Enable Registers to 0 preventing all status events from being reported See example Figure B 6 B 16 KLR DEV 060713 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 outp on volt 20 curr 1 syst err stat oper stat oper enab 1312 stat oper enab init cont on stat oper cond stat oper volt 30 stb stat ques stat ques enab 3 stat ques enab volt prot 25 stb syst err stat ques stat ques stat ques cond outp stat pres stat ques enab stat oper enab Sets OVP limit to maximum Power supply output is on Power supply output is programmed to 20V 1A Returns 0 No error message Returns 1280 indicating that power supply has entered both CV and CC modes during start up Mask enabled for CV CC and WTG bits Returns 1312 1024 256 32 indi
73. If the VOLTS display reads PASS the cable is correct Remove the jumper and reconnect the cable to the computer To exit the utilities menu press the FUNCTION switch repeatedly until the status display is blank 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 9 1 9 2 9 3 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 5024 TELNET To access the unit via Telnet port 5024 the proper command line is TELENET IP ADDRESS PORT e g TELNET 192 168 0 100 5024 NOTE Port 5025 SCPI RAW can also be accessed with the Telnet utility but the data sent is not echoed back to the user and there is no prompt string The SCPI TELNET port transfers ASCII SCPI data using the Control M or Control J characters as line terminators Table 9 1 lists the Control characters applicable to this port TABLE
74. LAN ports change 192 168 0 100 to IP address found via front panel interface K ViChar id_str TCIP 192 168 0 100 INSTR VXI 11 instrument via LAN port 1024 ViChar id_str TCIP i92 168 0 100 5025 SOCKET SCPI RAW port 5025 LAN instrument For RS 232 change 0 to actual communications port in use ViChar id_str ASRLO INSTR serial port TEn power_supply_status Kpklr_init amp id_str 1 amp ps_type amp KLR_Session Visuccess return power_supply_status could not open power supply init the power supply operation Power supply handle is now created if unit is KLR ERERRERRERERERE RE RARA RR RARE RARE RARAS 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 Se 0 OutputO0no0ff KLR_Session 1 output on Kpklr_close amp KLR_Session free up memory and close VISA session return power_supply_status end of main 1f not created as a project include the driver code at end of program tinclude Kp_klr c FIGURE 5 1 EXAMPLE 1 SETTING VOLTAGE AND CURRENT 5 4 KLR DEV 060713 5 4 2 EXAMPLE 2 USING THE POWER SUPPLY TO CREATE A VOLTAGE RAMP A ramp is created by sending a series of points to the power supply at a defined interval The example shown in Figure 5 2 initializes the power supply to the starting voltage and current and turns the out
75. MSS Master Status Summary CONDITION OPER GE ESB MAV QUES e Ge NU RQS Request for Service ESB Event Status Byte summary MAV Message available BIT 7 6 5 4 3 2 1 0 QUES QUEStionable Status Summary ERR QUE 1 or more errors occurred see VALUE 128 64 32 16 8 4 2 1 PAR B 92 LIST RUN 1 when list is running NU Not Used SRE A 14 SRE SERVICE REQUEST ENABLE QUERY H Syntax SRE Response lt integer gt value from 0 255 per Table A 3 Description Reads the Service Enable Register Used to determine which events of the Status Byte Register are A 15 Syntax programmed to cause the power supply to generate a service request 1 set function enabled 0 reset function disabled Related Commands SRE STB See example Figure A 1 STB STATUS BYTE REGISTER QUERY STB STB Response lt integer gt value from O to 255 per Table A 3 Description Reads Status Byte Register without clearing it This Query reads the Status Byte Register bit 6 A 16 Syntax 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 or more reasons for requesting service A serial poll also reads the Status Byte Register except that bit 6 RQS not MSS and RQS will be reset Related Commands SRE SRE See example Figure A 1 TRG TRIGGER COMMAND sT RG TRG Des
76. N GATE COMMAND SYST COMM LAN GATE E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN GATE w x y z Long Form SYSTem COMMunication LAN GATE w x y Z where w x y and z are numbers from 0 to 255 Description Specifies the GATE address when DHCP MODE see PAR B 69 is set to OFF Note that GATE address must be comma separated B 76 SYSTem COMMunication LAN GATE QUERY SYST COMM LAN GATE E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN GATE Long Form SYSTem COMMunication LAN GATE Return Value lt int_value gt w x y z where w x y and z are numbers from 0 to 255 Description Indicates the static GATE address comma separated For example GATE address of 0 0 0 0 returns 0 0 0 0 KLR DEV 060713 B 19 B 77 SYSTem COMMunication LAN IP COMMAND SYST COMM LAN IP 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 B 78 SYSTem COMMunication LAN IP QUERY SYST COMM LAN IP E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN IP Long Form SYSTem COMMunication LAN IP Return Value lt int_value gt w x y z where w x y and z are numbers from 0 to 255 Description Indicates the static IP address comma separated B 79 SYSTem COMMunication LAN MAC QUERY SYS
77. OMM LAN IP B 77 B 78 SOUR LIST DWEL B 22 B 23 SYST COMM LAN MAC B 79 SOUR LIST DWEL POIN B 24 SYST COMM LAN MASK B 80 B 81 SOUR LIST QUER B 25 B 26 SYST COMM SER BAUD B 82 B 83 SOUR LIST VOLT B 27 B 28 SYST COMM SER ECHO B 84 B 85 SOUR LIST VOLT POIN B 29 SYST COMM SER ENAB B 86 B 87 MEAS CURR B 30 SYST COMM SER PACE B 88 B 89 MEAS VOLT B 31 SYST COMM SER PROM B 90 B 91 MEM LOC B 32 B 33 SYST ERR B 92 OUTP STAT B 34 B 35 SYST ERR CODE B 93 SOUR CURR LEV IMM AMPL 3 B 36 B 37 SYST ERR CODE ALL B 94 SOUR CURR LIM HIGH B 38 B 39 SYST KLOCK B 95 B 96 SOUR CURR MODE B 40 B 41 SYST LANG B 97 B 98 SOUR CURR PROT LEV B 42 B 43 SYST PASS CEN B 99 SOUR CURR LEV TRIG AMPL B 44 B 45 SYST PASS CDIS B 100 SOUR FUNC MODE B 46 B 47 SYST PASS NEW B 101 SOUR VOLT LEV IMM L AMPL B 48 B 49 SYST PASS STAT B 102 SOUR VOLT LIM HIGH B 50 B 51 SYST SEC B 103 SOUR VOLT MODE B 52 B 53 SYST SET B 104 B 105 SOUR VOLT PROT LEV B 54 B 55 SYST VERS B 106 SOUR VOLT LEV TRIG AMPL B 56 B 57 TRIG SOUR B 107 B 108 KLR DEV 060713 B 1 B 2 NUMERICAL VALUES The SCPI data parser on the KLR supports a maximum of 8 digits after the decimal point and a maximum inte ger of 4x 108 Any values greater than these are not processed by the device and no error is generated The largest string that can
78. RATOR DATA DATA SEPARATOR ROOT SPECIFIER KEYWORD KEYWORD KEYWORD SEPARATOR QUERY INDICATOR KEYWORD MESSAGE TERMINATOR vy 48 CURR LEV 3 5 OUTP ON CURR lt NL gt l l MESSAGE UNIT FIGURE 6 1 MESSAGE STRUCTURE 6 5 2 KEYWORD 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 6 5 7 6 4 KLR DEV 060713 6 5 3 6 5 4 6 5 5 6 5 6 6 5 7 6 5 8 QUERY 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 DATA 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 eg VOLT LEV TRIG 14 or SOUR VOLT MAX DATA SEPARATOR Data must be separated from the last keyword by a space leg VOLT LEV TRIG 14 or SOUR VOLT MAX MESSAGE UNIT SEPARATOR When two or more message units are combined in a program message they must be separated by a semicolon teg VOLT 15 MEAS VOLT and CURR 12 CURR TRIG 12 5 ROOT SPECIFIER The root specifier is a colon that precedes the first keyword of a program message This places the parser at t
79. RIGger SEQuence SOURce Return Value Return Value lt string gt EXT or BUS or IMM Syntax Description Returns string indicating trigger source EXT indicates trigger source is J2 pin 14 BUS indicates source is either TRG or GPIB lt GET gt command IMM indicates source is VOLT TRIG or CURR TRIG command See PAR B 107 for details TABLE B 5 ERROR MESSAGES ESR ERROR BIT SET SEE PAR A 5 ERROR MESSAGE EXPLANATION 0 No error None No error 100 Command error Command Error bit 5 Command and data understood but more information included which is not recognized 102 Syntax error Command Error bit 5 First 4 characters recognized subsequent characters not recognized 103 Invalid separator Command Error bit 5 For example VOLT PROT received instead of VOLT PROT 108 Parameter Not Allowed Error Command Error bit 5 Volt12 sequence channel number is invalid 109 Missing parameter Command Error bit 5 For example VOLT instead of VOLT 21 111 Header separator error Command Error bit 5 Missing space between volt and value or missing 113 Undefined header Command Error bit 5 First 4 characters could not be identified as legal command For example command VLT instead of VOLT 120 Numeric data error Command Error bit 5 Expected number but other characters were detected 121 In
80. RR TRIG Syntax Description Short Form SOUR CURR LEV TRIGEAMPL lt exp_value gt MAX Long Form SOURce CURRent LEVel TRIGgered AMPLitude lt exp_value gt MAX lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Programs current value to be transferred to output by TRG commands Actual output current will depend on load conditions CURR TRIG MAX programs output current value to be transferred by TRG to be the lower of CURR LIM HIGH or 80 of CURR PROT If the value exceeds the maximum for the model being programmed error message 222 Data out of range is posted in output queue If value exceeds CURR LIM HIGH value a value corresponding to the current limit will be programmed This value is automatically checked after execution of CURR LIM HIGH and CURR PROT and is set to minimum current if there is a conflict NOTE A voltage trigger level must be entered at least once Related Commands CURR See example Figure B 1 B 45 SOURce CURRent LEVel TRIGgered AMPLitude QUERY CURR TRIG Syntax Description Short Form SOUR CURR LEV TRIG AMPL MAX Long Form SOURce CURRent LEVel TRIGgered AMPLitude MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Returns value representing current value to be programmed by TRG command established by CURR TRIG command CURR TRIG MAX returns maximum permissible value that can be pro
81. RY Syntax Description KLR DEV 060713 FIGURE B 6 USING STATUS COMMANDS AND QUERIES STAT QUES Short Form STAT QUES EVEN Long Form STATus QUEStionable EVENT Return Value lt int_value gt actual register value Indicates questionable events that occurred since previous STAT QUES query Returns the value of the Questionable Event register see Table B 3 The Questionable Event register is a read only register which holds latches all events Reading the Questionable Event register clears it See example Figure B 6 NOTE Removing source power from the unit e g setting POWER ON OFF circuit breaker to OFF causes the unit to generate and store the PWR bit Therefore the first query of the Questionable Event Register after the unit is turned on will always show a PWR fault this is normal TABLE B 3 QUESTIONABLE EVENT REGISTER QUESTIONABLE CONDITION REGISTER AND QUESTIONABLE CONDITION ENABLE REGISTER BITS M S MASTER SLAVE FAILURE CONDITION NU M S FAN PWR OTP OLF OCP OVP FAN INTERNAL FAN FAILURE PWR LOSS OF SOURCE POWER BIT 15 7 6 5 4 3 2 1 0 OTP OVERTEMPERATURE OLF OUTPUT LEAD FAULT VALUE 32 768 128 64 32 16 8 4 2 1 OCP OVERCURRENT OVP OVERVOLTAGE NU NOT USED B 64 STATus QUEStionable CONDition QUERY STAT QUES COND Syntax Short Form STAT QUES COND Long Form STATus QUEStionable CONDition Return Value lt int_value gt actual register value
82. Rce VOLTage LIMit HIGH Commande B 13 SOURce VOLTage LIMit HIGH Ouer B 13 SOURce VOLTage MODE Commande B 14 SOURce VOLTage MODE QUEN csse enee aea Eskia cnn erre nan name rear nana nan ea iiiaae daia B 14 SOURce VOLTage PROTection LEVel Commande B 14 SOURce VOLTage PROTection LEVel Query ooooooonccnncccoccccncnconcconnnnnn conc n rana nnnn cnn nar nn nan n crac nancnnnccnns B 14 SOURce VOLTage LEVel TRIGgered AMPLitude Commande B 15 SOURce VOLTage LEVel TRIGgered AMPLitude Quer Y oooniocicccnnninnccccccncnnnnnncconnnnonc nano connnnncnnncnna B 15 STATus OPERation COND tiON Query cooocccccococccocccconncnoncnnnncnncnnnn cnn ccoo nan nn cnn nr r aran rra rana n ran aann cnn B 16 STATus OPERation ENABle Commande B 16 STATus OPERation ENABle Query c ocooonccccccononcconccconacnncnnc nc ncnnnn cnn cnn ran cnn nr rr an anne an nana an naar anar B 16 STATus OPERation EVENt Query cooooonccciccononacocccconnnonncnnn conri nan rn cnn B 16 STATus PRES et Command iii A i eei B 16 STATus QUEStionable EVENt Ouer B 17 STATus QUEStionable CONDItION Query cece eecceececeeeeeeeeeeeeeeaeeeeeeeeaeeeaaeeeeeeceeeeeeseneetaeeeeeeseeeeiaeeeeeess B 18 STATus QUEStionable ENABle Commande B 18 STATus QUEStionable ENABle Query c ooocccoccoccccococconnnooncnoncconnnnnn cnn cnn naar cnn rra cnn narrar ran ranas B 18 SYSTem COMMunication GPIB ADDRess Commande B 18 SYSTem COMMunication GPIB ADDReSS Ouer B 18 SYSTem COMMunication
83. 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 NOTE The following examples are generic to all models assuming factory default settings SYST VERS SYST SET SYST KLOC ON SYST KLOC SYST KLOC OFF SYST PASS CEN xxxx SYST PASS STAT SYST PASS CDIS xxxx SYST PASS STAT SYST PASS NEW xxxx yyyy SYST ERR SYST ERR CODE SYST ERR CODE ALL Returns xxxx v SCPI version number Le 2003 0 Returns DCO STR KLO LFO L250 M40 SCP Locks out local front panel controls only remote control is possible Returns 1 indicating local lockout enabled Disables local lockout see PAR B 95 for instructions on reverting to local control Enables access to protected commands assuming password xxxx matches Returns 1 indicating protected access is enabled Disables access to protected commands assuming password matches Returns 0 indicating protected access is disabled Resets password to new value yyyy assuming present value xxxx matches Returns error messages from instrument error queue sequentially using the format xxx where xxx is the error code and S is the ASCII definition string see Table B 5 and PAR B 92 Returns 0 No error when queue is empty Returns error messages from instrument error queue sequ
84. SET tap either the CUR RENT or VOLTAGE controls to take the unit out of setpoint mode status display goes from SET to blank Use a thin tool e g a paper clip to press the FUNCTION switch repeatedly until the status display shows UTIL Press the DC OUTPUT switch to enter the Utilities menu Rotate either the VOLTAGE or CURRENT control until the status display shows LBT Loop Back Test At this point the VOLTS display will show With the power supply s RS 232 port open no connections press the DC OUTPUT switch once to run the test The VOLTS display should show FAIL if it reads PASS the power sup ply is defective and requires repair Install the loop back test connector P N 195 0112 at the RS 232 port located on the rear panel of the power supply If the loop back test connector is not available install a jumper from pin 2 to pin 3 of the RS 232 port connector Press the DC OUTPUT switch once to rerun the test The VOLTS display should now read PASS if it reads FAIL the power supply is defective and requires repair To test the integrity of the cable assembly connecting the power supply RS 232 port to the computer remove the loop back test connector or jumper and connect the cable in its place Install a jumper wire from pin 2 to pin 3 at the opposite end of the cable and repeat the test of step 4 above If the VOLTS display reads FAIL the cable is either the improper type not null modem or defective
85. ST VERS Long Form SYSTem VERSion Short Form SYST VERS Return Value lt int_value gt lt int_value gt YYYY V Syntax Description Identifies SCPI Version implemented Returns SCPI Version number YYYY year V Revision number for specified year See example Figure B 7 B 107 TRIGger SEQuence SOURce COMMAND TRIG SOUR Short Form TRIG SEQ SOUR EXT BUS IMM Long Form TRIGger SEQuence SOURce EXT BUS IMM Description Selects the active trigger source When TRIG SOUR BUS is set an event trigger is created by sending either TRG or GPIB lt GET gt commands When TRIG SOUR EXT is set the trigger is created by connecting the external trigger line J2 pin 4 or pin 3 of the mating connector for J2 to analog sig nal ground J2 pin 1 or J2 mating connector pin 1 The trigger must be armed by sending either INIT IMM or INIT CONT enable ON commands prior to sending the selected trigger command see PAR A 16 Receipt of the active trigger causes the power supply to program to the previously stored values of VOLT TRIG and CURR TRIG actual output voltage current is dependent upon the load Sending TRIG SOUR IMM causes the next VOLT TRIG or CURR TRIG to immediately program the output regardless of trigger arming RST sets TRIG SOUR to IMMediate Related Commands lt GET gt TRG INIT IMM INIT CONT TRIG SOUR B 108 TRIGger SEQuence SOURce QUERY Syntax Short Form TRIG SEQ SOUR Long Form T
86. 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 amp 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 amp play application will terminate incorrectly Power Supply Event OB FIGURE 5 13 POWER SUPPLY EVENT WINDOW 5 14 KLR DEV 060713 6 1 6 2 6 3 6 4 6 4 1 6 4 2 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 ANS 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 Different programming languages e g BASIC C PASCAL etc have different ways of repre senting data that is to be put on the control bus It is up to the programmer to determine how to output the character sequence required for the programming language used If the IEEE 488 2 GPIB control bus is used address in
87. Syntax Short Form MEM LOC lt int_value gt Long Form MEMory LOCation lt int_value gt int_value 1 to 40 memory cell location Description Stores power supply parameters in memory cell specified Stores voltage current overvoltage overcurrent values and output on off state as 0 off or 1 on Related Commands MEM LOC B 33 MEMory LOCation QUERY MEM LOC Syntax Short Form MEM LOC lt int_value gt Long Form MEMory LOCation lt int_value gt int_value 1 to 40 cell location Return value lt val1 gt lt val2 gt lt val3 gt lt val4 gt boolean val1 current val2 voltage val3 overcurrent val4 overvoltage boolean 0 output off or 1 output on Description Used to determine contents of 40 memory locations without applying values to KLR output Returns the contents of the memory location specified by int_value without affecting KLR output Memory locations 1 to 40 are programmed to store settings using SAV or MEM LOC The settings can also be recalled and applied to the output by RCL If a memory cell has not been programmed this command returns O CURR MIN value VOLT PROT MAX value CURR PROT MAX value 0 0 Volts minimum Amps overvoltage protection value overcurrent protection value and output off Related Commands MEM LOC SAV RCL KLR DEV 060713 B 7 NOTE The following example assumes KLR 75 32 with limit model set for 36V 32A and output operating in voltage stabilization mode See Figure
88. T COMM LAN MAC E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN MAC Long Form SYSTem COMMunication LAN MAC Return Value xx xx xx xx where xx hex character pairs Description Return the MAC address of the unit For example MAC address of 01 23 45 67 89 AB returns 01 23 45 67 89 AB B 80 SYSTem COMMunication LAN MASK COMMAND SYST COMM LAN MASK E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN MASK w x y z Long Form SYSTem COMMunication LAN MASK w x y z where w x y and z are numbers from 0 to 255 Description Specifies the MASK address when DHCP see PAR B 69 is set to OFF Note that MASK address must be comma separated B 81 SYSTem COMMunication LAN MASK QUERY SYST COMM LAN MASK E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN MASK Long Form SYSTem COMMunication LAN MASK Return Value lt int_value gt w x y z where w x y and z are numbers from 0 to 255 Description Indicates the static MASK address comma separated For example mask of 255 255 255 0 returns 255 255 255 0 B 82 SYSTem COMMunication SERial BAUD COMMAND SYST COMM SER BAUD STANDARD MODELS ONLY Syntax Short Form SYST COMM SER BAUD 38400 19200 9600 4800 2400 Long Form SYSTem COMMunication SERial BAUD 38400 19200 9600 4800 2400 Description Sets the unit to operate at the specified baud rate Factory default is 38400 B 83 SYSTem COMMunication SERial BAUD QUERY SYST COMM SER BAUD
89. The baud rate is not automatically detected and must be set correctly by the user using either the front panel LabView G VXI plug amp play or Programming environment The IVI COM driver can not modify RS 232 setup In the VXI plug amp play environment the program must use the Kepco Serial Initialize routine instead of the standard KpKLRInit routine TABLE 2 2 RS 232 SETUP Environment Method IVI COM Automatically enabled LabView Automatic uses Kepco Serial Initialize VXI plug amp play KpKLR_Serial Initialize KLR DEV 060713 3 1 SECTION 3 IVI COM DRIVER INTRODUCTION The IVI COM Interchangeable Virtual Instrument driver provided with the instrument allows remote programming of the unit via either the LAN GPIB or RS 232 ports 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 This driver supports the lviDCPwr class compliant interface and fulfills all requirements imposed by IVI 4 4 lviDCPwr Revision 2 0 The driver implements all of the class capabilities from the IviDCPwr specification for which the instrument has matching functionality The Kepco KLR IVI
90. UR CURR MODE FIX LIST TRAN n A Long Form SOURce CURRent MODE FIXed LIST TRANsient n A n lt value gt time between 0 04 to 655 36 in seconds A lt value gt Current level in Amperes Allows the user to execute or stop a list or to execute a transient The default mode is FIX the power supply executes commands normally and LIST commands can be issued to establish the parameters and sequence of a list Two milliseconds after CURR MODE LIST is issued a list is executed See LIST commands and Figure B 2 While the list is being executed LIST commands are not accepted and will produce a command error The 4 character front panel display shows dLST when a list is executing Issuing CURR MODE FIX while the list is running will stop the execution of the list and return power supply to settings in effect prior to running the list If the list runs to completion the settings of the last step of the list will be in effect CURR MODE TRAN lt n gt lt A gt R option RODC installed models only Two milliseconds after issu ing this command the KLR output current changes to the specified current level lt A gt for the period of time lt n gt specified At the end of time lt n gt the current is returned to the previously established value The status display shows dLST during the execution of the transient If any of the variables are incor rect the transient is not generated and an appropriate error message is generated s
91. URE B 1 PROGRAMMING THE OUTPUT INIT CONT B 7 INITiate CONTinuous COMMAND Syntax Short Form INIT CONT ON OFF or 1 0 1 on O off Long Form INITiate CONTinuous ON OFF or 1 0 1 on O off Default setting is OFF Description INIT CONT ON enables continuous triggers INIT CONT OFF disables continuous triggers If INIT CONT is OFF then INIT IMM arms the trigger system for a single trigger If INIT CONT is ON then the trigger system is continuously armed INIT CONT ON sets the WTG bit in the Questionable Status register to 1 after each trigger event Executing RST command sets INIT CONT to OFF See example Figure B 1 KLR DEV 060713 B 3 B 8 INITiate CONTinuous QUERY INIT CONT Syntax Short Form INIT CONT Long Form INITiate CONTinuous Return Value 1 or 0 1 on O 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 See example Figure B 1 pa SOURce LIST CLEar COMMAND LIST CLE Syntax Short Form LIST CLE Long Form LIST CLEar gt Description Clears all list entries by setting all pointers to 0 Also sets LIST DIR to UP Related Commands All LIST commands See example Figure B 2 B 10 SOURce LIST CONTrol COMMAND LIST CONT Syntax Short Form LIST CONT 1 0 1 on O off Long For
92. VOLTS and DC AMPERES indicators on the Ramp Function Panel see Figure 4 9 to show measured voltage and current unchecked causes the indicators to show the commanded val ues of voltage and current respectively When Start Ramp is clicked information from the check boxes and of Cycles is passed to the example program and used to start ramp execution see PAR 4 6 3 The Error in and Error out boxes are standard error callouts showing D for no error and an error code and associated string if there is an error KLR DEV 060713 4 13 4 6 3 4 14 SOFTWARE TIMED RAMP EXECUTION Clicking the Start Ramp button on the Software Ramp panel Figure 4 8 causes the Ramp Function Panel Figure 4 9 to be displayed as the ramp is being generated Checking the Readback Voltage or Readback Current checkboxes above the DC VOLTS or DC AMPERES indicators cause the Voltage and Current indicators to show measured voltage and current vs commanded values of voltage and current if unchecked AN ISO 9001 COMPANY KEPCO THE POWER SUPPLIER SINCE 1946 LReadback Voltage UReadback Current DC VOLTS DC AMPERES Start Volts 0 00 L Disable End End volts 9 10 C XJRepeat Voltage Increment 1 00 of Cycles 0 Dwell ms 50 Cycle Number Stop Ramp error in no error error out S E FIGURE 4 9 RAMP FUNCTION PANEL CURRENT RAMP VISA resource name The information from the Software Ramp Panel is passed to either
93. ability Interface can receive multiline messages Acceptor Handshake AH1 Complete Capability Interface can receive multiline messages Talker T6 Basic talker serial poll unaddress if MLA My Listen Address one byte address Listener L4 Basic listener unaddress if MTA My Talk Address one byte address Service Request SR1 Complete Capability The interface sets the SRQ line true if there is an enabled service request condition Complete capability Interface selects either local or remote information In local mode the KLR executes front panel commands but can be set to remote mode via IEEE 488 bus Remote Local RL1 When in Remote mode all front panel keys are disabled except LOCAL LOCAL key can be disabled using keypad lockout command see Appendix B PAR B 95 so that only the controller or a power on condition can restore Local mode Parallel Poll PPO No Capability Device Clear DC1 Complete Capability KLR accepts DCL Device Clear and SDC Selected Device Clear Device Trigger DT1 Respond to TRG and lt GET gt trigger functions Controller co No Capability TABLE 7 3 IEEE 488 GPIB BUS COMMAND MODE MESSAGES 7 2 MNEMONIC SES RAON COMMENTS DCL Device Clear Received GET Group Execute Trigger Received GTL Go To Local Received IFC Interface Clear Received LLO Local Lockout Received MLA My Listen Address Received MTA My Talk Address Received OTA Other Talk Addres
94. 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 e aroot specifier is recognized by the parser Optional keywords are enclosed in brackets for identification optional keywords can be omit ted 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 KLR Power Supply are ABORt CALibrate DISPlay LIST MEASure OUTPut SOURce STATus STORage SYSTem and TRIGger 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 lt NL gt The parser returns to the root due to the message terminator STAT OPER PRES lt NL gt 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 th
95. andard Models the LAN interface is included only in E Series Models These drivers require a helper application visa32 dll to be installed on the computer being used VISA uses resource strings see Table 1 1 to address the unit The IVI COM and VXI plug amp play drivers require that all calls to an instrument be made through the VISA library The KLR DEV 060713 1 1 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 INTERFACE VISA RESOURCE STRING COMMENT GPIB xx INSTR The GPIB address replaces xx SERIAL ASRLy INSTR The com port number replaces y LAN SCPI RAW TCIP 192 168 0 100 5025 SOCKET This is the fastest LAN interface similar to the serial port with automatic XON XOFF protocol support LAN VXI 11 TCIP 192 168 0 100 INSTR This LAN interface requires a more complex handshake for data and is inherently slower than a socket interface It is similar to the GPIB interface where you tell the device when to take data and when it is acceptable to receive data 1 2 1 2 COMMUNICATION Communication between a KLR and a computer system may be via one of three methods IEEE 488 2 RS 232 and LAN These three interfaces communicate by sending formatted strings to the KLR which are then parse
96. appropriate model specific response to the user s program LABVIEW G INSTRUMENT DRIVER FUNCTIONS Kepco s KLR LabView G instrument driver provides programming support for Kepco s KLR Power Supply It contains functions for opening configuring taking measurements from testing calibrating and closing the instrument To successfully use this module the instrument must be connected to either the LAN or the GPIB The driver supports all functions of the KLR except the instrument state commands of Store Recall and Memory Read The driver is also supplied with some simple examples and an inter active demo program Users that are modifying the driver are encouraged to copy parts of this program to maximize usage of tested functional sections Table 4 1 lists the functions that are available KLR DEV 060713 4 1 TABLE 4 1 KLR LABVIEW G DRIVER FUNCTIONS Function Name Purpose KepcoDCPWR initialize with options 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 Provides ability to issue Reset and parse IDN KepcoDCPWR close Closes the driver freeing resources Recognize Model Sends IDN And verifies KEPCO string returned KepcoDCPWR IDN parser Parse the IDN string det
97. are changed Each location defines values for the active channel either output voltage or output current a dwell time duration between 0 010 and 655 36 seconds for the programmed settings and the state of the internal relay By programming the output to change in small increments complex outputs can be generated KLR DEV 060713 1 3 1 2 7 1 2 7 1 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 2 To operate the internal relay using the LIST commands first configure the internal relay to LIST using the UTIL menu from the front panel see KLR User Manual 3 The message dLST appears in the front panel status display while a LIST program is running 4 Removing the unit from remote digital programming mode will immediately termi nate a running LIST program 5 The LIST capability is disabled for master slave configurations and all LIST com mands will generate error message 221 Configuration conflict STATUS The KLR status system consists of the standard register configuration as defined by the IEEE 488 2 and SCPI standards This configuration allows the errors to be reported and causes inter rupts to be
98. articular instrument session Default Value None Model Out The Model Out handle is obtained from the KepcoDCPwr Init or KepcoDCPwr InitWithOptions func tion The handle identifies a particular instrument Default Value None channel name out Passes the name of the channel on which to configure the OVP limit Valid Channel Names 1 27 Default Value EIER TABLE 4 3 ERROR OR EXPLAIN WARNING CODES status The boolean is either TRUE X for an error or FALSE check mark for no error or a warning The pop up option Explain Error or Explain Warning gives more information about the error displayed gives more information about the error displayed code The code input identifies the error or warning The pop up option Explain Error or Explain Warning Warning gives more information about the error displayed source The string describes the origin of the error or warning The pop up option Explain Error or Explain g g g pop up op p p 4 4 1 3 BLOCK DIAGRAM DESCRIPTION Figure 4 2 shows that the level input is converted to a string that is compatible with the power supply floating with 5 places to the right of the decimal 5f Then using the VISA write func tion the string is sent to the power supply The case statement in the middle of Figure 4 2 shows that all Kepco power supplies support this same functionality 4 4 KLR DEV 060713 154 Sess
99. at_str rin Append delimiter needed for Serial port and Socket operation viWrt Kepco_Session dat_str Send string to power supply strcpy dat_str MEAS VOLT CURR Define a measure command streat dat_str r n Append delimiter ViWrt Kepco_Session dat_str Send string to power supply strset rd_str 0 Clear input buffer ViRd Kepco_Session rd_str 64 i Read result of measure printf received s n rd_str Print voltage and current viClose Kepco_Session close the instrument FIGURE 6 3 TYPICAL EXAMPLE OF KLR POWER SUPPLY PROGRAM USING SCPI COMMANDS KLR DEV 060713 6 9 6 10 Blank 7 1 7 2 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 SCPI provides a common language conforming to IEEE 488 2 for instruments used in an automatic test system see Section 6 Refer to Table 7 1 for GPIB port input output signal allocations All power supply functions available from the front panel can be programmed via remote commands as well as some that are not available from the front panel Save Recall see PAR 1 2 5 List see PAR 1 2 6 and Relay Control see PARs B 10 and B 11 TABLE 7 1 IEEE 488 PORT CONNECTOR J4 PIN ASSIGNMENTS
100. case letters in mnemonics are mandatory short form Lower case letters may either be omitted or must be specified completely long form e g INSTrument long form has the same effect as INST short form Commands queries may be given in upper lower case long form e g SoUrCe is allowed Text shown between brackets is optional e g SOUR VOLT LEV TRIG AMPL has the same effect as VOLT TRIG 6 7 1 EXCEPTIONS TO THE RULES The volt lim high and curr lim high commands do not follow the SCPI rules for syntax parsing Always send the entire string to insure the commands execute correctly For example VOLT LIM HIGH MIN volt lim high max and VOLT LIM HIGH MIN lim high max will correctly return the min and max voltage limit levels of the power supply Sending VOLT LIM HIGH MIN high max will not work and will result in an error 6 8 PROGRAMMING EXAMPLES Figure 6 3 is a programming example that can be used over any interface to measure voltage and current Table 6 2 describes the VISA resource string corresponding to the Interface chosen for communication TABLE 6 2 VISA RESOURCE STRING CORRESPONDING TO INTERFACE INTERFACE VISA RESOURCE STRING COMMENT GPIB GPIB xx INSTR The GPIB address replaces xx SERIAL ASRLy INSTR The com port number replaces y LAN SCPI RAW TCIP 192 168 0 100 5025 SOCKET This is the fastest LAN interface similar to the serial port with automatic XON XOFF
101. cating CV CC and WTG bits are set Continuous triggers enabled Power supply returns 288 256 32 indicating power supply is in constant voltage mode and Wait For Trigger is set Returns 32 CV mode bit cleared by prior query but continuous triggering results in WTG bit always being set Output voltage programmed to 30V current remains at 1A Return 128 Operation Status Summary bit is set Returns 16 loss of source power detected This event was set at prior power down of power supply and is retained for retrieval at next power up reading the event register clears the bit Mask enabled for OVP and OCP bits 1 2 Returns 3 1 2 indicating OVP and OCP bits are enabled Overvoltage protection limit set to 25V with output programmed to 30V creating an OVP fault condition Returns 140 Operation Questionable and Error Status bits were set Returns 305 Voltage Protection Fault Returns 1 overvoltage protection error detected Returns 0 Reading prior register cleared register contents Returns 1 power supply is in overvoltage protection Returns 0 output set to off when overvoltage error detected Operation enable and Questionable enable registers reset Returns 0 Questionable Condition Enable register reset prevents any questionable events from being reported Returns 0 Operation Condition Enable register reset prevents any operational events form being reported B 63 STATus QUEStionable EVENt QUE
102. cription KLR DEV 060713 Short Form SOUR VOLT LIM HIGH MIN MAX Long Form SOURce VOLTage LIMit HIGH MIN MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Returns value representing Limit Model voltage limit VOLT LIM HIGH returns the voltage limit programmed by VOLT LIM HIGH VOLT LIM HIGH MAX returns the rated maximum programmable voltage for that model e g 75 Volts for KLR 75 32 VOLT LIM HIGH MIN returns the minimum allowable voltage that can be programmed Related Commands VOLT LIM HIGH VOLT See exam ple Figure B 5 B 13 B 52 SOURce VOLTage MODE COMMAND VOLT MODE Syntax Description Short Form SOUR VOLT MODE FIX LIST TRAN lt n gt lt V Long Form SOURce VOLTage MODE FlXed LIST TRANsient n V n lt value gt time between 0 04 to 655 36 in seconds V lt value gt Voltage level in Volts Allows the user to execute or stop a list or to execute a transient The default mode is FIX the power supply executes commands normally and LIST commands can be issued to establish the parameters and sequence of a list Two milliseconds after VOLT MODE LIST is issued a list is executed See LIST commands and Fig ure B 2 While the list is being executed LIST commands are not accepted and will produce a com mand error Issuing VOLT MODE FIX while the list is running will stop the execution of the list and return power supply to sett
103. cription Triggers the power supply to be commanded to preprogrammed values of output current and voltage When the trigger is armed checked by examining WTG bit in Status Operational Condition register and TRIG SOUR BUS is sent TRG generates a trigger signal The trigger will change the output of the power supply to the output voltage and current levels specified by VOLT TRIG and CURR TRIG commands and clear the WTG bit in the Status Operation Condition register If INIT CONT ON has been issued the trigger subsystem is immediately rearmed for subse quent triggers and the WTG bit is again set to 1 TRG or GET are both addressed com mands only devices selected as listeners will execute the command Related Commands ABOR INIT TRIG CURR TRIG VOLT TRIG See example Figure B 1 A 17 TST SELF TEST QUERY TST Syntax TST Returned value 0 or 1 0 pass test 1 fail test Description Power Supply test This query causes the power supply to do a self test and provide the controller with pass fail results A cyclic redundancy check CRC is performed on non volatile RAM A 1 is returned if there is an error A 18 WAI WAIT COMMAND WAI Syntax WAI Description Causes the power supply to wait until all previously issued commands and queries are com plete before executing subsequent commands or queries This command can be used to guaran tee sequential execution of commands and queries When all pending operatio
104. d Cset for the power supply Refer to PARs B 44 B 56 and B 94 The VOLT TRIG and CURR TRIG values are reset to the default minimum zero V or minimum A when the unit is calibrated or if a limit model setting is changed If software trigger is selected trigger events are activated by TRG see PAR A 16 or a GPIB lt GET gt command KLR DEV 060713 SECTION 2 COMMUNICATION 2 1 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 WEB PORT 80 UDP LXI 8 CONNECTIONS 2 NS TRIGGER PORT 5044 HOME PAGE Gr UNIT DESCRIPTION UDP BROADCAST TCP IP TRIGGER LAN SUNRPC PORT 5044 CONFIGURATION PORT 111 PAGE TCP IP VXI 11 TELNET PORT 1024 PORT 5024 OPERATE 4 CONNECTIONS 2 INSTRUMENT CONNECTIONS PAGE STATUS Le LAN PORT DISPLAY LOCKING nd INSTRUMENT FUNCTIONS ISS FRONT PANEL STATUS LOCAL CONTROL SCPI 488 2 LOCKING GPIB CONNECTION RS 232 STANDARD MODELS ONLY CONNECTION E SERIES MODELS ONLY REAR PANEL 3043146 FIGURE 2 1 KLR COMMUNICATION BLOCK DIAGRAM 2 2 FRONT PANEL LOCAL CONTROL Front panel control is the default upon power up see the KLR User Manual The unit automati cally enters remote mode upon receipt of a remote command The front panel can be locked and unlocked in all environments as shown i
105. d Reset functions Sending SYST SEC IMM sets LF1 DCO and ROO as if CM0 was sent Sending SYST SET CM1 sets the KLR to operate in compatible mode and have all GPIB functions compatible with software version 2 9 and lower units Sending SYST SET CMO sets the unit to be fully SCPI 1997 compliant CMO Establishes DCO LFO conditions described below SCPI 1997 Standard compliance DCO Device Clear functions per IEEE 488 2 Standard No effect on the device power supply only clears internal status registers LFO Line Feed not provided upon empty buffer condition no effect when access is via LAN interface DC1 Device Clear functions identical to RST Output set to OV voltage mode and output set to OFF except if RO1 see below is set LF1 Line Feed provided if buffer is empty and a read is performed no effect when access is via LAN interface B 24 KLR DEV 060713 KLO Enables front panel controls KL1 Disables front panel controls L250 Number 250 of locations programmable using LIST commands M40 Number 40 of locations programmable using SAV and RCL commands SCP SCPI Programming Language SYST SET B 105 SYSTem SET QUERY Short Form SYST SET Return Value lt comma separated string gt Syntax Long Form SYSTem SET Description Returns comma separated string indicating command functions in effect See PAR B 104 for com mand function definitions See Figure B 7 for example B 106 SYSTem VERSion QUERY SY
106. d at 2 15V VOLT PROT MAX Returns 9E1 Maximum allowable overvoltage protection limit for Programs output voltage for 21 8V output current for 0 5A For this model minimum overvoltage protection is 0 2 x 75 15V therefore power supply returns error message 222 Data out of range ESR bit 4 1 and the limit remains unchanged Sets overvoltage protection limit to 25V model is 90V 20 above maximum voltage 75V for KLR 75 32 FIGURE B 5 KLR DEV 060713 PROGRAMMING AS VOLTAGE STABILIZER B 58 STATus OPERation CONDition QUERY STAT OPER COND 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 bit reset to O function disabled inactive false See example Figure B 6 TABLE B 2 OPERATION CONDITION REGISTER OPERATION ENABLE REGISTER AND OPERATION EVENT REGISTER BITS CAL POWER SUPPLY IN CALIBRATION MODE CONDITION NU PR NU cc NU CV NU WTG NU CAL CC POWER SUPPLY IN CONSTANT CURRENT MODE BIT 15 14 11 13 10 9 8 7 6 5 4 1 0 CV POWER SUPPLY IN CONSTANT VOLTAGE MODE 2048 128 16 NU NOT USED VALUE 32 768 16 384 8192 1024 5
107. d to perform specific actions e IEEE 488 2 GPIB Interface see Section 7 e RS 232 Interface standard models only see Section 8 LAN interface E Series models only see Section 9 PROGRAMMING SCPI and IEEE 488 common commands queries are the building blocks used to control the KLR power supply These sections are provided to allow a user to write their own program to control the KLR power supply or to use the various interactive tools provided by Measurement Computing National Instruments Agilent Technologies and Microsoft to send strings to a device over the RS 232 GPIB or LAN interfaces SCPI commands and queries are supported by all three interfaces Description of SCPI Syntax see Section 6 EEE 488 Common commands supported see Appendix A e Listing of SCPI commands supported see Appendix B DRIVER OVERVIEW The three drivers for KLR all have common functional groups Each group contains similar func tions which work together The four different environments IVI COM LabView G VXI Plug amp Play and Programming all have common functionality The KLR power supply like most instrument power supplies has four subsystems output trig ger status and measurement In additional to these subsystems the KLR has a storage system and a list system The commands to use these subsystems have been grouped by function as detailed in the following paragraphs These functional groupings are also used in the examples that
108. e cece cece nin a e e N a iai B 11 Programming as Voltage Stabilizer AA B 15 Using Status Commands and Queries 0 0 ee eee ee eenee cere eeeneeeeeaaeeeeeeaeeseeeeeaaeeeeeeaeeeseeeseeeeseaaeeseneeeeeeeeeaas B 17 Using System Commands and Queries 0 0 eee ceceeeeeeeeene eee eeaeeceeeeee canes ran nr nn cnn rre B 23 KLR DEVGD 060713 TABLE 1 1 2 1 2 2 4 1 4 2 4 4 5 1 6 1 6 2 7 1 7 2 7 3 7 4 9 1 A 1 A 3 B 1 B 2 B 3 B 4 B 5 LIST OF TABLES TITLE PAGE VISA Resource String Corresponding to Interface A 1 2 Front Panel Lockout Commands cooicionicionn ri ti di DEA 2 2 RS 232 SUP erat alas 2 4 KER IVIECOM Driver Functions uri AA 3 3 KLR LabView G Driver FUNCtIONS cion initial tt tds 4 2 KepcoDCPwr Configure Voltage Level vi Input Output Descriptions cecccecceeeeceeeeeeeteeeeteeeeeeeaees 4 4 Error or Explain Waming COdes iii a 4 4 KepcoDCPwr Measure MSR vi Input Output Descriptions 2 0 0 eee cece cence cee eeeeceeeeeeeeeaeeseeeesieeteaeeeaees 4 6 KLR VXI plug amp play Driver Functions 5 1 Rules Governing Shortform Keywords c ccccceeeececeeeeeeeeaeeeceeeeceeaeeeeseceaaeeeeeeccaeeeeeeeseaaeaeeeeseeeeeeesenanaeess 6 4 VISA Resource String Corresponding to Interface 6 8 IEEE 488 Port Connector J4 Pin Assignments 00 0 0 eeeecee ence ceeeeeeeeeeeeeaeeeeeeaeeeeaeeeeeaaeeeeeeeeesneeeseaeeeennaees 7 1 IEEE 488 GPIB Bus Interface Functions 20 0 ec cece cence eneeeceeeeeeeeeeee
109. e command originator does not have to compare each character and repeat any characters dropped The operation of the KLR is identical for echo mode and prompt mode implementation of prompt mode is at the command originator XON XOFF METHOD STANDARD MODELS ONLY The XON XOFF method allows the KLR Power Supply to control when the command originator is allowed to send data The command originator can only send data after the XON transmis sion on character 0114 has been received the command originator stops sending data after receiving the XOFF transmission off character 0134 and waits until the XON character is received before sending additional data Control characters either CR or LF are returned as XOFF CR if echo mode is on and as XOFF if echo mode is off XOFF stops data from the command originator and the KLR returns the nor mal sequence of CR LF if echo mode is enabled 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 KLR DEV 060713 8 3 8 2 2 4 8 4 ISOLATING RS 232 COMMUNICATIONS PROBLEMS STANDARD MODELS ONLY A Loop Back test can be run from the KLR front panel to aid in isolating RS 232 communications problems 1 With the power supply in local mode if the status display shows
110. e decimal points Multiple exponents etc 224 Illegal parameter value Execution Error bit 4 For example OUTP 2 instead of OUTP 1 226 Lists not same length Execution Error bit 4 During a LIST command number of DWEL list entries was not equal to 1 and did not match number of LIST VOLT or LIST CURR entries 280 Program Error Execution Error bit 4 LIST execution error e g program already running 301 Value bigger than limit Device Error bit 3 E g requesting a voltage or current that exceeds the limit 302 Mode changed to Voltage 302 Mode changed to Current Device Error bit 3 Power supply operating in current mode changed to voltage mode Power supply operating in voltage mode changed to current mode 303 Output Lead Fault Device Error bit 3 Excessive voltage drop detected between power and sense lead 304 Current Protection Fault Device Error bit 3 Current exceeded programmed protection value 305 Voltage Protection Fault Device Error bit 3 Voltage exceeded programmed protection value 306 Over Temperature Shutdown Device Error bit 3 Internal temperature exceeded thermal protection limit 307 Power Loss Fault Device Error bit 3 Source power loss occurred 308 Fan Fault Device Error bit 3 Fan fault detected 310 System Failure Device E
111. e following message units STAT OPER and STAT PRES STAT OPER COND ENAB 16 lt NL gt After the OPER COND message unit the parser moves in one level from OPER allowing the abbreviated notation for STAT OPER ENAB PROGRAM MESSAGE SYNTAX SUMMARY e Common commands begin with an asterisk e Queries end with a question mark 7 e 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 e Ifa 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 meas vol1t curr will read output voltage and output current since both volt and curr are interpreted as subunits of the meas command KLR DEV 060713 6 7 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 vo1t 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 UPPER
112. e overvoltage protection or mini mum overvoltage protection VOLT PROT returns value set by VOLT PROT VOLT PROT MAX returns maximum voltage protection value this value is determined at the factory and cannot be changed by the user VOLT PROT MIN returns the minimum voltage protection value 0 2 x model voltage e g 1 5V for KLR 75 32 See example Figure B 5 KLR DEV 060713 VOLT TRIG B 56 SOURce VOLTage LEVel TRIGgered AMPLitude COMMAND Syntax Short Form SOUR VOLT LEV TRIGEAMPL lt exp_value gt MAX Long Form SOURce VOLTage LEVel TRIGgered AMPLitude lt exp_value gt MAX lt exp_value gt 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 VOLT TRIG MAX programs output voltage value to be transferred by TRG to be the lower of VOLT LIM HIGH or 80 of VOLT PROT If the value exceeds the maximum for the model being programmed error message 222 Data out of range is posted in output queue If value exceeds VOLT LIM HIGH value a value corresponding to the voltage limit will be programmed This value is automatically checked after execution of VOLT LIM HIGH and VOLT PROT and is set to zero volts if there is a conflict NOTE A current trigger must be entered at least once See example Figure B 1 B 57 SOURce VOLTage LEVel TRIGgered AMPLitude QUERY VOLT TRIG
113. ed model maximum for the model being programmed error message 222 Data out of range is posted in output queue If the programmed value exceeds either the Limit Model voltage limit VOLT LIM HIGH or 80 of voltage protection limit VOLT PROT a value corre sponding to VOLT LIM HIGH or VOLT PROT respectively is programmed and error message 301 Value too large is posted in output queue Related Commands VOLT LIM HIGH See example Figure B 1 KLR DEV 060713 B 49 SOURce VOLTage LEVel IMMediate AMPLitude QUERY VOLT Syntax Description Short Form SOUR VOLT LEV IMM AMPL MIN MAX Long Form SOURce VOLTage LEVel IMMediate AMPLitude MIN MAX 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 The VOLT MAX query returns the maximum voltage allowed for a particular model the lower of VOLT LIM HIGH and 80 of VOLT PROT VOLT MINReturns minimum voltage allowed for power supply always 0 Related Commands VOLT See example Figure B 5 B 50 SOURce VOLTage LIMit HIGH COMMAND VOLT LIM HIGH Syntax Description Short Form SOUR VOLT LIM HIGH lt exp_value gt MAX Long Form SOURce VOLTage LIMit HIGH lt exp_value gt MAX lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Sets Limit Model maximum
114. ee Table B 5 If CURR MODE TRAN command is issued to a non R option unit error message 113 undefined header is posted to the error queue If current value is less than model minimum the minimum value is entered and no error is generated Related Commands LIST commands See example Figure B 2 B 41 SOURce CURRent MODE QUERY CURR MODE Syntax Description B 10 Short Form SOUR CURR MODE Long Form SOURce CURRent MODE Return value FIXED or LIST or TRAN 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 KLR DEV 060713 B 42 Syntax Description SOURce CURRent PROTection LEVel COMMAND CURR PROT Short Form SOUR CURR PROT LEV lt exp_value gt Long Form SOURce CURRent PROTection LEVel lt exp_value gt lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 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 Valid range for CURR PROT setting is 72 to 120 of rated model maximum current e g 23 98 to 38 6A for KLR 75 32 After exec
115. eeaeeeseaaeeeaeeeseaeesenaaeeenaeeeneaeeeseeaees 7 2 IEEE 488 GPIB Bus Command Mode Messages coooococcccccconoccccnoccnononcccnannn non nn nono nn nc nan nn r non n rn nnr nr rnnr nana 7 2 IEEE 488 GPIB Bus Data Mode Messages ccoococcccococccconcconancnonononon ocn cono nn nr nn cnn nn untk Ent rre 7 3 Telnet Port 5024 and SCPI Raw Port 5025 Control Characters ooooonccnnnccnnnoccccnnonnnononcnnnonncnno cnn rnnn nn nnn nn 9 1 IEEE 488 2 Command query Index A 1 Standard Event Status Enable Register and Standard Event Status Register Bits 0 0 eee A 1 Service Request Enable and Status Byte Register Bits oooooooonicccnnnnicononccnoonncnanancnnnnnnnnon nn cnn cnn nono nn nnnncnnnos A 6 SCPI Subsystem Command query Index coocccicocccnnoncccnnnnnononanononn conan cnn nono conan nn nnnnn rra n nn anar rn ran r nn naar rre B 1 Operation Condition Register Operation Enable Register and Operation Event Register Bits oooooonncoccccconnoccccccccnononccononononcnnnnnnnoncnnnnnannncnnnnnannnnnnnnnnnn nn nn nannnnnnnnnnnns B 16 Questionable Event Register Questionable Condition Register and Questionable Condition Enable Register Bits ooo occonnininnocinnncccnnncnnnnoncnnnnnrnc nano nar non cnn rr nr B 18 Factory Default Calibration PaSSWOrds A B 24 Error Messages EE B 25 KLR DEVGD 020498 vii 1 1 SECTION 1 INTRODUCTION This manual contains instructions for digital programming of the KLR series of 1200W output power stabilized vo
116. ent is in constant voltage mode e 9 Not used always zero e 10 Constant Current 1 indicates the instrument is in constant current mode e 11 through 13 Not used always zero e 14 Program Running 1 indicates the program is running e 15 Not used always zero 1 2 7 5 QUESTIONABLE STATUS REGISTER SET The Questionable Status register set is comprised of condition transition event and enable reg isters see Figure 1 2 Appendix B PAR s B 63 through B 66 provide detailed explanations of the queries commands for reading and modifying these registers as applicable the transition register cannot be modified The Questionable Condition register see Figure 1 1 contains status bits representing data sig nals which give an indication of the quality of various aspects of the signal KLR DEV 060713 1 7 1 2 7 6 1 2 8 1 8 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 e 0 Overvoltage Error 1 indicates an overvoltage fault has been detected e 1 Overcurrent Error 1 indicates an overcurrent fault has been detected e 2 Power Lead Error 1 indicates that output lead connections are not complete e 3 Overtemperature Error 1 indicates a thermal error has been detected s 4 Input Power Error 1 indicates input mains error e 5
117. entially using xxx error code only no ASCII definition string Returns comma separated list of all stored error messages maximum of 15 B 98 SYSTem LANGuage QUERY Short Form SYST LANG Syntax FIGURE B 7 USING SYSTEM COMMANDS AND QUERIES SYST LANG Long Form SYSTem LANGuage Return Value lt string gt SCPI or COMP Description Identifies whether unit responds to older command formats SCPI means the unit will not respond to older formats such as LIST TIME COMP means the unit will respond to older formats such as LIST TIME for compatible operation with software written for KLR power supplies up to Revision 1 KLR DEV 060713 B 23 B 99 SYSTem PASSword CENable COMMAND SYST PASS CEN Syntax Short Form SYST PASS CEN lt val gt Long Form SYSTem PASSword CENable lt val gt 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 TABLE B 4 FACTORY DEFAULT CALIBRATION PASSWORDS MODEL PASSWORD Standard or E Series KLR 20 120 2012 KLR 40 60 3660 KLR 75 32 7533 KLR 150 16 1516 KLR 300 8 3008 B 100 SYSTem PASSword CDISable COMMAND SYST PASS CDIS Syntax Short Form SYST PASS CDIS lt val gt Long Form SYSTem PASSword CDISable lt val gt Description Clears the password enable state if the value ma
118. er 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 The driver supports a simulation mode of operation which is set false in the example The next three blocks are property nodes which are used to set the voltage current and output enable of the power supply These are the properties of the power supply which directly affect the power supply output In LabView each property must be set separately but multiple outputs of the property node are allowed The final two blocks are the close functions One block is the method to close disable the output The second block is the ActiveX close ref erence which performs the driver close breaking the connection to the KLR and the instrumen tation close which releases the memory used by the driver T E IKepcoDCPwr J dE n gt IKepcoDCPwr 2 A nn H IdQuery per OptionStrimg ES K IKepcoDCPwr Output gt Output VoltageLevel a IKepcoDCPwr laca y IKepcoDCPwr Output CurrentLevel sP Output Enabled Output CurrentLevel h Output volageLevel Suto Enabled E ES E IKepcoDCPwr H 3043235 FIGURE 3 6 SETTING THE OUTPUT USING LABVIEW WITH IVI COM DRIVER GETTING A VOLTAGE AND CURRENT READING FROM THE POWER SUPPLY
119. erCurrent 19 990 3043213 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 Whenever the same location is selected the Recall button restores the saved settings om Panel Settings Store Recall P EG d STORE 3043214 Ge SE FIGURE 5 7 STORE RECALL WINDOW The Trigger button opens the Trigger window Figure 5 8 which allows setting of trigger voltage and current values Clicking the Trigger button within the Trigger window causes the power sup ply output to be programmed to the settings stored in the Trigger Voltage and Trigger Current displays OL ager Voltage E Trigger Current xecute Trigger 3043215 E ooo Ee FIGURE 5 8 TRIGGER WINDOW KLR DEV 060713 5 11 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 Must enter password to access Calibration PASSWORD Full Scale Calibration VOLTAGE Connect DYM to Sense Terminals Zero Calibration CURRENT Connect DYM to Calibration Shunt
120. ermining model KepcoDCPWR Revision Query Uses IDN parser to determine firmware revision KepcoDCPWR Reset Sends RST to Power supply set output off volt 0 curr min over voltage and over current to max values KepcoDCPWR Reset with Defaults Supplied for compatibility purposes uses above KepcoDCPWR Self test Sends TST To unit and returns result o all okay Output Control functions KepcoDCPWR Configure Voltage Level Set voltage output setting to a specific value KepcoDCPWR Configure Current Level Sets current output setting to a specific level KepcoDCPWR Query Voltage Level Queries unit and returns voltage level setting KepcoDCPWR Query Current Level Queries unit and returns Current level setting KepcoDCPWR Configure Voltage Limit Set virtual voltage setting to a specific value KepcoDCPWR Configure Current Limit Sets virtual current setting to a specific level KepcoDCPWR Query Voltage Limit Queries unit and returns limit model voltage level setting KepcoDCPWR Query Current Limit Queries unit and returns limit model Current setting KepcoDCPWR Configure OVP Set over voltage setting to a specific value KepcoDCPWR Configure OCP Sets Over current setting to a specific level KepcoDCPWR Configure Output State Sets output on or off KepcoDCPWR Query Output State Returns Output on 1 or off 0 Measurement KepcoDCPWR Measu
121. events reported in real time by the instrument viewable at any time using the appropriate query The contents of the Ques tionable and Operation condition registers are latched in the corresponding event registers which hold records of specific event occurrences as determined by the accompanying transition register for KLR all transition register bits are configured to record low to high 0 to 1 bit states only so that a 1 in the condition register is always stored as a 1 in the event register Since the event register bits are reset when read the event register provides a record of changes in status since the last time the event register was read For all four register sets the contents of each event register is gated by an accompanying enable register The user must set the corresponding enable bit value to one high in order to include the specific event bit in the reported status KLR DEV 060713 For example if an overvoltage error is detected bit O 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 O of the Questionable Status Enable register has bit O set bit 3 of the Status Byte STB register is asserted If bit 3 of the Service Request Enable SRE register is also set to 1 then bit 6 of the STB is set to 1 true causing the power supply to assert the SRQ line to the host computer SE S G ES d a Ge K SS x A
122. flict is posted in the error queue See example Figure B 2 B 19 SOURce LIST CURRent POINts QUERY LIST CURR POIN Syntax Short Form LIST CURR POIN Long Form LIST CURRent POINts Return Value lt value gt 0 to 250 Description Identifies the total number of points in a list and the next location to be filled by LIST CURR command The LIST CURR pointer is initially at O via LIST CLE For each data point entered by a LIST CURR command the list pointer is incremented If LIST CURR POIN returns 5 the LIST CURR pointer is at 5 indicating there are 6 data points comprising the list If LIST VOLT has any entries an error message 221 Settings conflict is posted in the error queue Related Commands LIST CURR B 20 SOURce LIST DIRection COMMAND LIST DIR Syntax Short Form LIST DIR UP DOWN Long Form LIST DIRection UP DOWN Description Allows the list to be executed from beginning to end UP or from end to the beginning DOWN RST or LIST CLEar sets the list to the UP direction beginning to end Related Commands LIST DWEL B 21 SOURce LIST DIRection QUERY LIST DIR Syntax Short Form LIST DIR Long Form LIST DIRection Return Value 1 or 0 1 up 0 down Description Identifies the direction for executing the list established by LIST DIR Related Commands LIST DIR See example Figure B 2 B 22 SOURce LIST DWELI COMMAND LIST DWEL Syntax Short Form LIST DWEL lt value gt 0 010 to 655 35
123. formation GPIB address must be included before the command sequence See PAR 7 2 1 to establish the KLR Power Supply GPIB address SCPI MESSAGES There are two kinds of SCPI messages program messages from controller to power supply and response messages from the power supply to the controller Program messages consist of one or more properly formatted commands queries and instruct the power supply to perform an action the controller may send a program message at any time Response messages consist of formatted data the data can contain information regarding operating parameters power supply state status or error conditions COMMON COMMANDS QUERIES Common commands and queries are defined by the IEEE 488 2 standard to perform overall power supply functions such as identification status or synchronization unrelated to specific power supply operation such as setting voltage current Common commands and queries are preceded by an asterisk and are defined and explained in Appendix A Refer also to syntax considerations PARs 6 5 through 6 7 SCPI SUBSYSTEM COMMAND QUERY STRUCTURE Subsystem commands queries are related to specific power supply functions such as setting output voltage current limit etc Figure 6 2 is a tree diagram illustrating the structure of SCPI subsystem commands used in the KLR Power Supply with the root at the left side and specific commands forming the branches The following paragraphs introduce
124. he root top left Figure 6 2 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 A 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 key word separators INIT ON TRIG MEAS CURR VOLT The first three colons are root specifiers MESSAGE TERMINATOR The message terminator defines the end of a message One message terminator is permitted e new line lt NL gt ASCII 10 decimal or OA 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 lt NL gt regardless of the actual terminator character KLR DEV 060713 6 5 ROOT colon ABORt subsystem ABOR CALibrate subsystem CAL CEXT CGA CURR LEM DATA DATA DPOT SAVE STAT STAT VEXT VGA VOLT LEV DATA ZERO DISPlay subsystem DISP WIND TEXT DATA OUTPut subsystem OUTP STAT ESTAT TRIGger subsystem TRIG SEQ SOUR SOUR INIT IMM CONT CONT STATus subsystem STAT OPER COND ENAB ENAB EVEN PRES QUES COND
125. heckErr KpDCPwr_InitWithOptions resourceName VI_TRUE VI_TRUE initOptions amp vi Enable the password state checkErr KpDCPwr_EnablePasswordState vi 7532 The user is then provided another form When the data is entered the standard CVI logic is invoked and the variables are read from the form then sent to the KLR The setting the KLR s voltage is performed by two lines of code The first line is the standard CVI method of getting a variable from the form and the second line is the function in the IVI driver that sets an attribute to a specific value Get the desired voltage limit from the UI GetCtrlVal panelHandle PANEL VOLTAGE LIMIT amp voltageLimit Set the voltage limit checkErr KpDCPwr_SetAttributeViReal64 vi VI_NULL KPDCPWR_ATTR_POSITIVE_VOLTAGE RATED LIMIT voltageLimit The setting of a maximum current level for the limit model is performed using the same two functions but the attribute is changed on the set function Get the desired current limit from the UI GetCtrlVal panelHandle PANEL CURRENT_LIMIT amp currentLimit Set the current limit checkErr KpDCPwr_SetAttributeViReal64 vi VI_NULL KLR DEV 060713 3 11 3 4 3 4 1 The functions above used a function checkErr which is part of the project file KpDCPwrEr rorHandler c This file has cals to two functions KpDCPwr_GetError and KpDCPwr_err
126. igure Voltage Level wv 4 3 4 4 1 1 Connector Pan l ataca di REEE 4 3 4 4 1 2 Controls ANA Indicators EE 4 3 4 4 1 3 Block Diagram Description 4 4 4 4 2 KepcoDCPwr Measure MSR Vi kee 4 5 KLR DEVGD 020498 i TABLE OF CONTENTS SECTION PAGE 4 5 Example of Setting the Cutpgt coco iaa eii 4 6 4 5 1 Initialization FUNCION s t euie A adi 4 7 4 5 2 Set the OUtput ON or OFF cto is 4 9 4 5 3 Get Measurement and Status indi A DO 4 9 4 5 4 Close Connecti sr ar nored aet a aia 4 9 4 6 Interactive demonstration program cc ceeseeceeeeceeneeeeenneeeeeeeeeseeeeeeaeeeseeeeeeseaeeeeeaeeseeeeeesneeeseeaeeseeeeeesneeeeeaas 4 10 4 6 1 KepcoDCPwr Interactive Exvoample vi 4 10 4 6 2 Software timed r mp example sviscerate ne 4 12 4 6 3 Software Timed Ramp Execution ccc eeceeeeeeecenneeeceeeeeesneeeceeaeeeceeeeeesaeeeeeaaeeeseeesnsaeeeseaeesseeeenaeeeeeaees 4 14 4 6 4 FUACTION GENEL EE 4 15 SECTION 5 VXI plug amp play DRIVER 5 2 VXI plug amp play Instrument Driver 5 1 5 3 VXI plug amp play Instrument Driver FUNCTIONS ooooooccccccnncoccccononooocnncnonancnnnnnnnnn nn cnn anar cnn cnn anna 5 1 5 4 Using the VXI plug amp play driVer moiocisi ad 5 3 5 4 1 Example 1 Setting Voltage and Current oooocccnnnccnnncccnnnoncnnnccnonannnc nan nnnnnnn cnn nn 5 3 5 4 2 Example 2 Using the power supply to create a voltage ramp nn nro nano 5 5 5 4 3 Example 3 Using the power supply to Take Measurement cn cnn nnnrnnnnn 5 7 5 5 Demonst
127. ings in effect prior to running the list If the list runs to completion the settings of the last step of the list will be in effect VOLT MODE TRAN lt n gt lt V gt R option RODC installed models only Two milliseconds after issu ing this command the KLR output voltage changes to the specified voltage level lt V gt for the period of time lt n gt specified At the end of time lt n gt the voltage is returned to the previously established value The status display shows dLST during the execution of the transient If any of the variables are incor rect the transient is not generated and an appropriate error message is generated see Table B 5 If VOLT MODE TRAN command is issued to a non R option unit error message 113 undefined header is posted to the error queue Related Commands LIST commands See example Figure B 2 B 53 SOURce VOLTage MODE QUERY VOLT MODE Syntax Description Short Form SOUR VOLT MODE Long Form SOURce VOLTage MODE Return value FIXED or LIST or TRAN 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 B 54 SOURce VOLTage PROTection LEVel COMMAND VOLT PROT Syntax Description Short Form SOUR VOLT PROT LEV lt exp_value gt Long Form SOURce
128. ion Out 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 FIGURE 4 3 KepcoDCPwr Configure Voltage Level vi ERROR BLOCK DIAGRAM 4 4 2 KepcoDCPwr Measure MSR vi This VI takes a measurement of the output signal and returns the measured value see Figure 4 4 Virtual Resistance Virtual Current Virtual Voltage ISA Session Model In channel name 1 measurement type voltage 3043201 error in no error VISA Session Out Model Out channel name Out measurement error out FIGURE 4 4 KepcoDCPwr Measure MSR vi CONTROL PANEL This VI has the standard inputs of all of the functions of the LabView G Driver It also has three orange inputs at the top of the VI Virtual Resistance Virtual Current Virtual Voltage These inputs are used in simulation They do not need to be connected but provide the ability to verify the operation without using the power supply These simulation inputs are only used when error in is true indicating an error has occurred KLR DEV 060713 4 5 TABLE 4 4 KepcoDCPwr Measure MSR vi INPUT OUTPUT DESCRIPTIONS DESCRIPTION channel name 1 Passes the name of the channel on which to configure the voltage level It is not required for most su
129. ion and Model In VISA session is the output of viOpen Model In is a string for the KLR the string is KLR The second block KepcoDCPWR Query Voltage Limit is needed to verify the limit model set tings It is recommended that the response from this block be checked to insure that the power supply is configured to supply the voltage and current needed For example if the limit model for a KLR 75 32 was set to 36 Volts 32 Amperes the response will be 36 to this query indicating that the program will not respond to a command to set the output to 50 Volts KLR DEV 060713 4 7 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 Initialization Gei recognize device True ECH dia Session Name _2b lt error in no enert o SE SS id query True a reset device True ET j level 0 0 volts m ma oput enabled Er EIE aaeanoa etting Measurement And Status CS OOOO Measurement type voltage gt 4 m error code error message Cm Output state Constant Voltage Et measurement losing the session error out re Close 3043202 FIGURE 4 6 SETTING THE OUTPUT OVERALL BLOCK DIAGRAM 4 8 KLR DEV 060713 4 5 2 4 5 3 4 5 4 SET TH
130. isabled Long Form SYSTem COMMunication SERial PROMpt 1 0 1 on enabled 0 off disabled Description Enables 1 ON or disables 0 OFF prompt see PAR 8 2 2 2 When prompt is ON causes the unit to return gt character after the command is parsed KLR DEV 060713 B 21 B 91 SYSTem COMMunication SERial PROMpt QUERY SYST COMM SER PROM STANDARD MODELS ONLY Syntax Short Form SYST COMM SER PROM Long Form SYSTem COMMunication SERial PROMpt Return Value lt int_value gt 014 on enabled or 00y off disabled Description Indicates whether prompt is enabled 014 ON or disabled 004 OFF see PAR 8 2 2 2 B 92 SYSTem ERRor NEXT QUERY SYST ERR Syntax Short Form SYST ERR NEXT Long Form SYSTem ERRor NEXT Return Value lt int_value string gt Description Posts error messages to the output queue Returns the next error number followed by its corre sponding error message string from the instrument error queue The error queue is a FIFO first in first out buffer that stores errors as they occur As it is read each error is removed from the queue and the next error message is made available When all errors have been read the query returns 0 No error If more than 31 errors are accumulated it will overflow The oldest errors stay in the queue but the most recent errors are discarded The last error in the queue will be 350 Too many errors Error messages are defined in Table B 5 NOTE
131. l unit responds with lt DENIED LOCK gt If successful unit responds with lt GRANTED LOCK gt USING PORT 1024 VXI 11 VXI 11 uses one standard port 1024 and two assigned by the instrument when connections are opened The 1024 port is open at all times to accept connection requests The maximum number of open connections is two The VXI 11 port requires the use of a lock which prevents other VXI 11 connections from gaining access to the instrument This port is accessed using the VISA resource string ending in INST e g TCIPO 192 168 1 100 INST On receipt of Lock Port unit verifies other ports 5024 and 5025 are unused and grants the requesting port exclusive access to control KLR If port lock is unsuccessful unit responds with lt DENIED LOCK If successful unit responds with lt GRANTED LOCK gt USING PORT 5044 TRG COMMAND This class C interface supports both multicast trigger events and TCP IP trigger events Port 5044 does not support arbitrary names it supports only domain 1 with a name of LANO If this is sent to the KLR when it is armed and waiting for trigger the unit will trigger change the output within 2 5 milliseconds of the receipt of this request SUNRPC PORT 111 The SUNRPC port is used for discovery when sent as a UDP broadcast message The only command supported is the GETPORT The ports that can be requested are detailed in the VXI specification and repeated in the LXI specifications The SUNRPC port can
132. l1T a dwel17 dwel17 dwel17 dwel1T J H H H H H H 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 listPtr ListPoints ref voltList ref currList ref dwellTime The list is set to perform the required number of executions then started Set the number of executions listPtr count 2 initiate outputPtr listInitiate The driver should be closed at the end using the following code The conditional statement allows the close to be added to the end of the program without getting any runtime errors Close driver if initialized if KLRdriver Initialized true KLRdriver Close This program executes a 6 point current and voltage list It also specifies 6 different dwell times using System using KepcoDCPwr Interop namespace ListExample lt summary gt Summary description for Classl lt summary gt class Classl lt summary gt The main entry point for the application lt summary gt STAThread static void Main string args Create driver instance KepcoDCPwr KLRdriver KepcoDCPwr Interop IOutput outputPtr KepcoDCPwr Interop IList listPtr KLRdriver new KepcoDCPwrClass try FIGURE 3 2 EXAMPLE OF USING A LIST WRITTEN IN CF SHEET 1 OF 2 KLR DEV 060713 3 9 Initialize driver KLRdriver Initialize GPIBO 6 INSTR true
133. ltage or current d c power supplies manufactured by KEPCO Inc Flush ing 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 GENERAL DESCRIPTION The KLR is a power supply class of instrument The KLR supports all Power supply class func tionality including measurement and trigger The KLR has additional functionality beyond the class requirements including a 250 step list state storage and hyperbolic power capability The KLR Power Supply Series can be digitally programmed using SCPI commands and queries sent from a computer via one of two interfaces Standard models also referred to as 1200 models include the IEEE 488 2 GPIB and RS 232 interface E Series models formerly referred to as 1 2K models include the IEEE 488 2 GPIB and LAN interfaces DRIVERS Three instrument drivers are available which allow remote operation via virtual front panels e IVI COM driver supplied with the unit E Series Models only This is a state of the art driver which provides wrappers to allow use within Visual C Visual Basic LabView and LabWindows CVI environments to fully control the KLR power supply see Section 3 e LabView G driver supplied with the unit
134. m LIST CONTrol gt 1 0 1 on O off Description If relay control set to LIST allows user to energize 1 or on or de energize 0 or off internal relay using LIST commands A LIST CONT value 0 or 1 must be entered regardless of relay con trol setting selected Related Commands LIST CONT B 11 SOURce LIST CONTrol QUERY LIST CONT Syntax Short Form LIST CONT Long Form LIST CONTrol return value 0 off de energized or 1 on energized Description Identifies whether internal relay is energized 1 or de energized 0 Related Commands LIST CONT B 12 SOURce LIST CONTrol POINts QUERY LIST CONT POIN Syntax Short Form LIST CONT POIN Long Form LIST CONTrol POINts Return Value lt int_value gt Description Identifies number of control points in the list If this command returns 0 no control points were provided the list will not execute and error 226 Lists not same length will be returned B 13 SOURce LIST COUNt COMMAND LIST COUN Syntax Short Form LIST COUN lt int_value 0 to 65535 gt Long Form LIST COUNt gt lt int_value O to 65535 gt Description Establishes how many times the list is executed Allows user to establish how many times the list is executed The order beginning to end or end to beginning is determined by LIST DIR For LIST COUN O the unit will execute the sequence indefinitely until a VOLT MODE FIXED command is received Related Commands LIST DIR See example Figure
135. mands NOTE Password VOLT LIM HIGH Returns 7 5E1 75V limit model voltage rating VOLT LIM HIGH 70 Programs limit model voltage to 70V VOLT LIM HIGH Returns 7 0E1 70V new limit model voltage rating CURR LIM HIGH Returns 1 6E1 16A limit model current rating CURR LIM HIGH 30 Programs limit model current to 30A CURR LIM HIGH Returns 3E1 30A limit model current rating VOLT LIM HIGH 33 Programs limit model voltage to 30A Limit model settings are now ing in voltage stabilization mode shown is factory default value for KLR 75 32 values will vary for other models see Table B 4 and can be altered by user programmed to 33V and 30A FIGURE B 3 PROGRAMMING LIMIT MODELS B 39 SOURce CURRent LIMit HIGH QUERY CURR LIM HIGH Syntax Description Short Form SOUR CURR LIM HIGH MIN MAX Long Form SOURce CURRent LIMit HIGH MIN MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Returns value representing Limit Model current limit CURR LIM HIGH returns the current limit programmed by CURR LIM HIGH CURR LIM HIGH MAX returns the rated maximum programmable current for that model e g 32 Amperes for KLR 75 32 CURR LIM HIGH MIN returns the minimum allowable current that can be programmed Related Commands CURR LIM HIGH CURR See example Figure B 3 B 40 SOURce CURRent MODE COMMAND CURR MODE Syntax Description Short Form SO
136. n 6 7 6 7 1 Exceptions to Me RU eS a a E re en e a raai e aa a E adaa i aeae ea een 6 8 6 8 Programming Examples siiin eieiei a 6 8 ii KLR DEVGD 060713 TABLE OF CONTENTS SECTION PAGE SECTION 7 IEEE 488 2 GPIB INTERFACE 7 2 EEE 488 GPIB Bus Protocol r a r aaa 7 1 7 2 1 Changing the GPIB Address eocooocoocionic cn ai Io Lac 7 3 SECTION 8 RS 232C INTERFACE STANDARD MODELS ONLY 8 2 RS232 C Operation Standard Models On 8 1 8 2 1 RS 232 Implementation Standard Models Om 8 1 8 2 2 Data Transfer Protocols Standard Models On 8 2 8 2 2 1 Echo Mode Standard Models Only AA 8 3 8 2 2 2 Prompt Method Standard Models Only 8 3 8 2 2 3 XON XOFF Method Standard Models On 8 3 8 2 2 4 Isolating RS 232 Communications Problems Standard Models On 8 4 SECTION 9 LAN INTERFACE E Series MODELS ONLY 9 2 Using Port 80 WebiIhterface coinstan dica ale poranenie oante iehida ditia degeE See 9 1 9 3 Using Port 5024 Telnet a ia 9 1 9 4 Using Port 5025 SCRIERAW EE 9 2 9 5 Using Port 1024 Vii la alar 9 2 9 6 Using Port 5044 TRG command tantn untk nn nn nn nn nr rn nn nn nn rn nan n rre Enn nn nan anann nae 9 2 9 7 SUNRPG Portatil o os 9 2 APPENDIX A IEEE 488 2 COMMAND QUERY DEFINITIONS A 2 CLS Clear Status COMMAN cuco rd A 1 A 3 ESE Standard Event Status Enable Commande A 1 AA ESE Standard Event Status Enable Ouem nono conan nnnnr narran A 2 A 5 ESR Event Status Register Ouenm
137. n Table 2 1 KLR DEV 060713 2 1 TABLE 2 1 FRONT PANEL LOCKOUT COMMANDS Environment Command Description Programming SYSTem KLOCk Follow with on or off Setting on locks the front panel VXI plug amp play Kp_KLR_SetResetKeyblock Requires the instrument session and a Boolean value of O 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 O for off and 1 to lock the keyboard 2 3 DIGITAL CONTROL VIA LAN E SERIES MODELS ONLY Figure 2 1 shows all the ports available to the LAN interface These port are described in Sec tion 9 LAN INTERFACE E Series MODELS ONLY and include 2 2 Port 80 Web Interface See KLR User Manual for details on how to use the web inter face This port supports up to eight connections For details as to how to access oper ate and configure the unit using the web interface refer to the KLR User Manual In addition the web interface is compatible with LxI instrument xml and LXI instrument xsd required by Version 1 2 of the LXI specification Port 111 SUNRPC UDP Broadcast and TCP IP The SUNRPC port is used for discov ery when sent as a UDP broadcast message The only command supported is the GET PORT The ports that can be requested are detailed in the VXI specification and repeated in the LXI specifications The SUNRPC port can be
138. n r nora cnn rra nr ranrannn rra B 7 MEASure SCALar CURRent DC Query c coococconoconicononinonccconnnnoncnnnccon nan nn cnn rra cra narnia B 7 MEASure SCALar VWOLTage DC Query cccoccccnnonocinoonncnonnnononnncnnnonon cnn nnn nan nnnnnn nn nn nn nn nr rrnnn rra n nn nnn nn B 7 MEMory LOCation Commande B 7 MEMory LOCation Qe varia ooo o aos B 7 OUTPutl STATe GOmmand EE B 8 OUTPUtEST ER TE EE B 9 SOURce CURRent LEVel MMediate AMPlitude Commande B 9 SOURce CURRent LEVel MMediate AMPlitude Query ooooocncccnononnncnocccnnnnnnnccnonncnonc narco nrna nana nancnna B 9 SOURce CURRent LIMIt HIGH Commande B 9 SOURce CURRent LIMIt HIGH Ouer B 10 SOURce CURRent MODE Commande B 10 SOURce CURRent MODE Query ccccccccccccconcnooncconccconononncnnn non nnnnnn cnn nn cana n rra nr nr anna r nen r an nn nan c ran nannncnnnnnins B 10 SOURce CURRent PROTection LEVel Commande B 11 SOURce CURRent PROTection LEVel Query c oooocoooccnccconccnoccconccoonnnnnccnnnnonnn nano cnn na rnn nn nnn cra annncrnnnnans B 12 SOURce CURRent LEVel TRIGgered AMPLitude Commande B 12 SOURce CURRent LEVel TRIGgered AMPlitude Ouer B 12 SOURce FUNCtion MODE Commande B 12 SOURce FUNCtion MODE Query cccocococccccoccnconcnonncconccno nono nonnnnnnn cnn naar n cnn rra cnn rra r nn rr nanen trna nnen B 12 SOURce VOLTage LEVel MMediate AMPLitude Commande B 12 SOURce VOLTage LEVel MMediate AMPLitude Ouer B 13 SOU
139. ndicate 64 MSS bit 6 1 32 ESB bit 5 1 have been set A return of 00 indicates no bits have been set VOLT 25 Sets output voltage to 25V since output current has not been set current limit defaults to the model minimum of 0 4A TST Power supply executes self test of digital controls and responds with 0 if test is completed successfully 1 if test fails FIGURE A 1 GPIB COMMANDS A 13 SRE SERVICE REQUEST ENABLE COMMAND S RE Syntax SRE lt integer gt where lt integer gt value from 0 255 per Table A 3 except bit 6 cannot be pro grammed Description Sets the condition of the Service Request Enable register The Service Request Enable regis ter determines which events of the Status Byte Register are summed into the MSS Master Status Summary and RQS Request for Service bits RQS is the service request bit that is cleared by a serial poll while MSS is not cleared when read A 1 1 set enable 0 reset disable in any Service Request Enable register bit position enables the correspond ing Status Byte bit to set the RQS and MSS bits All the enabled Service Request Enable register bits then are logically ORed to cause Bit 6 of the Status Byte Register MSS RQS to be set Related Commands SRE STB See example Figure A 1 KLR DEV 060713 A 5 TABLE A 3 SERVICE REQUEST ENABLE AND STATUS BYTE REGISTER BITS OPER Operation Status Summary
140. ng supported commands and queries CAL CEXT command CAL CGA command CAL CURR LEV command CAL CURR DATA command CAL DATA command CAL DPOT command CAL SAVE command CAL STAT command and query CAL VEXT command CAL VGA command CAL VOLT LEV command CAL VOLT DATA command CAL ZERO command B 5 DISPlay WINDow TEXT DATA QUERY DISP TEXT Syntax Short Form DISP WIND TEXT DATA Long Form DISPlay WINDow TEXT DATA Return Value Character string displayed on front panel Status display Description Returns the text displayed on front panel Status display Returns the character string displayed on Status display B 6 _INITiate IMMediate COMMAND INIT IMM Syntax Short Form INIT IMM Long Form INITiate IMMediate Description Arms a single trigger event If INIT CONT is OFF disabled then INIT IMM arms the trigger sys tem for a single trigger event and sets the WTG bit in the Questionable Status register to 1 If INIT CONT is ON enabled then the trigger system is continuously armed Sending INIT IMM after enabling INT CONT is redundant and causes the power supply to return an E213 INIT ignored error message Sending an active trigger command TRG completes the sequence causing the power supply output to be programmed to the previously stored values of VOLT TRIG and CURR TRIG After a trigger command has been received subsequent trigger commands have no effect unless preceded by INITEIMM or INIT
141. nitialize function see Table 1 1 The initialize function opens the session and communicates with the KLR to validate it as a sup ported model and determines the voltage and current limits of the unit This driver validates the model to insure it is the proper driver for the unit 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 Table 5 1 lists the functions that are available TABLE 5 1 KLR VXI PLUG amp PLAY DRIVER FUNCTIONS Purpose Function Name Description INITIALIZE FUNCTION Initialize Unit Kpklr_Init A resource string is passed to this function and the driver is opened The handle returned is used in all other functions This function uses Kpklr_reset and also performs an IDN query to verify the unit is a Kepco KLR unit Reset Kpklr_psReset Resets the instrument to a known state and sends initialization com mands to the instrument Close Kpkir_close This function takes the instrument off line SETTING AND MONITORING OUTPUT FUNCTIONS Set Value Kpkir_SetValue Sets the output voltage the output current of the power supply depending on the slide selection position The values are checked against the maximum acceptable values for the corresponding power supply O voltage 1 current 2 voltage protection 3 current pro tecti
142. not a variable measure the voltage double measVoltage measVoltage measurement Ptr gt Measure KepcoDCPwrMeasurementVoltage This program demonstrates how to set a voltage and current measure the output voltage using the IVI COM driver include lt stdafx h gt include lt stdio h gt include lt conio h gt include lt atlbase h gt import IviDriverTypeLib dll no_namespace import IviDCPwrTypeLib d1ll no_namespace import KepcDCPwr d1l no_namespace int main int argc char argv HRESULT hr try hr CoInitialize NULL if FAILED hr exit 1 create a safe pointer for interface access IKLRPtr driverPtr NULL hr driverPtr Createlnstance __uuidof KepcoDCPwr if FAILED hr exit 1 FIGURE 3 1 EXAMPLE OF SETTING THE OUTPUT AND TAKING A MEASUREMENT WRITTEN IN C SHEET 1 OF 2 KLR DEV 060713 open the instrument for communication hr driverPtr gt Initialize L GPIBO 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 gt Identity gt InstrumentFirmwareRevision wprintf L InstrumentFirmwareRevision s n bstriInstrFwRev get pointers to the needed interfaces IKLROut
143. ns LIST CLE sets starting location to 0 Next location indi cated by LIST VOLT POIN The maximum number of entries is 250 Since the input buffer of the KLR has a limit of 253 characters multiple commands are necessary to complete the full 250 entries of the list If LIST VOLT is entered for only the first location that voltage level will apply to all steps when either VOLT MODE LIST or CURR MODE LIST is executed Related Commands LIST VOLT POIN LIST CLE RST See example Figure B 2 B 28 SOURce LIST VOLTage QUERY LIST VOLT Syntax Short Form LIST VOLT Long Form LIST VOLTage Return Value lt value1 gt lt value2 gt to lt value16 gt Description Identifies the parameters main channel entered for the list Starting at location established by LIST QUER returns comma separated list of up to 16 values indicating the main channel parameters entered i e the contents of the main channel List Data Table Related Commands LIST VOLT LIST QUER If LIST CURR has any entries an error message 221 Settings conflict is posted in the error queue See example Figure B 2 B 6 KLR DEV 060713 B 29 SOURce LIST VOLTage POINts QUERY LIST VOLT POIN Syntax Short Form LIST VOLT POIN Long Form LIST VOLTage POINts Return Value lt value gt 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 O
144. ns actual output current FUNC MODE Returns operating mode of power supply followed by programmed operating mode e g VOLT VOLT CURR TRIG Returns 5E0 current value established by CURR TRIG VOLT TRIG Returns 3 15E1 voltage value established by VOLT TRIG ABOR Changes pending trigger levels to immediate values 32 1V 5A Programs output voltage to 37 7V current limit to 2 5A Output returns to trigger values established by ABOR 32 1V 5A INIT CONT O Disables continuous triggering INIT CONT Returns 0 continuous triggering disabled INIT IMM Arms single trigger event STAT QUES Returns 32 indicating WTG bit is set trigger armed TRG Output returns to trigger values established by ABOR 32 1V 5A STAT QUES Returns 0 indicating trigger is not rearmed single trigger event VOLT 37 7 CURR 2 5 Programs output voltage to 37 7V current limit to 2 5A TRG Output remains in current state as init cont is set to 1 INIT Trigger is armed for a single event TRG Output returns to previous trigger values 32 1V 5A without rearming trigger OUTP OFF Output disabled OUTP Returns 0 output disabled MEAS VOLT Returns 0 measured output voltage VOLT Returns 3 21E1 last programmed output voltage CURR Returns 5E0 last programmed output current CURR MAX Returns 1 6E1 maximum allowable current for present limit model CURR MIN Returns 4E 1 minimum allowable programming current for model FIG
145. ns 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 NOTE WAI is a no operation for KLR KLR DEV 060713 APPENDIX B SCPI COMMAND QUERY DEFINITIONS B 1 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 TABLE B 1 SCPI SUBSYSTEM COMMAND QUERY INDEX COMMAND PAR COMMAND PAR ABOR B 3 STAT OPER COND B 58 CAL B 4 STAT OPER ENAB B 59 B 60 DISP TEXT B 5 STAT OPER EVEN B 61 INITEIMM B 6 STAT PRES B 62 INIT CONT B 7 B 8 STAT QUES EVEN B 63 SOUR LIST CLE B 9 STAT QUES COND B 64 SOUR LIST CONT 8 10 B 11 STAT QUES ENAB B 65 B 66 SOUR LIST CONT POIN B 12 SYST COMM GPIB ADDR B 67 B 68 SOUR LIST COUN 3 B 13 B 14 SYST COMM LAN AUTO B 69 B 70 SOUR LIST COUN SKIP B 15 B 16 SYST COMM LAN DHCP B 71 B 72 SOUR LIST CURR B 17 B 18 SYST COMM LAN DNS B 73 B 74 SOUR LIST CURR POIN B 19 SYST COMM LAN GATE B 75 B 76 SOUR LIST DIR B 20 B 21 SYST C
146. nt a value corresponding to the model minimum will be programmed no error message is generated Related Commands CURR LIM HIGH See example Figure B 1 B 37 SOURce CURRent LEVEL MMediate AMPLitude QUERY CURR Syntax Short Form SOUR CURR LEV IMM AMPL MIN MAX Long Form SOURce CURRent LEVel MMediate AMPLitude MIN MAX Return Value lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Description Returns either the programmed value maximum value or minimum value of current The CURR query returns the programmed value of current Actual output current will depend on load con ditions The CURR MAX query returns the maximum current allowed for a particular model CURR Returns programmed current value CURR MAX returns maximum current allowed for power supply the lower of CURR LIM HIGH and 80 of CURR PROT CURR MIN returns minimum current allowed for the power supply model Related Commands CURR See example Figure B 1 B 38 SOURce CURRent LIMit HIGH COMMAND CURR LIM HIGH Syntax Short Form SOUR CURR LIM HIGH lt exp_value gt MAX Long Form SOURce CURRent LIMit HIGH lt exp_value gt MAX lt exp_value gt digits with decimal point and Exponent e g 2 71E 1 for 27 1 Description Sets Limit Model maximum programmable limit for power supply output current KLR DEV 060713 CURR LIM HIGH lt exp_value gt sets maximum current that can be programmed CURR LIM HIGH MAX se
147. nt list KpDCPwr_SetListDwellTimes Sends the new dwell point to the KLR KPDCPWR_ATTR_LIST_DWELL_POINTS Provides the location of the next point to be entered into dwell list KpDCPwr_SetListControl Sends the new relay point to the KLR KPDCPWR_ATTR_LIST_CONTROL_POINTS Provides the location of the next point to be entered into control relay list KPDCPWR_ATTR_LIST_SKIP Provides ability to skip a number of points when a list is repeatedly executed KpDCPwr_ExecuteVoltageList Causes a list to be executed KpDCPwr_HaltVoltageList Causes a list to be stopped useful when list is executed continu ously KpDCPwr_SetListCycles Causes the list to be executed a number of times Sending 0 will make list execute forever KPDCPWR_ATTR_LIST_CYCLES Provides number of cycles for a list to be executed The clear list sets this variable to 1 Utility KpDCPwr_EnablePasswordState Enables Password controlled conditions KPDCPWR_ATTR_POSITIVE_CURRENT_RATED_LIMIT Limit model current limit KPDCPWR_ATTR_POSITIVE_VOLTAGE_RATED_LIMIT Limit model voltage limit KpDCPwr_DisablePasswordState Turn off password enable KpDCPwr_ChangePassword Allows for changing the password of the power supply 3 3 EXAMPLES USING C The examples illustrated in the following paragraphs are installed in the ivi drivers kepco exam ples folder during installation of the IVI
148. nts minimum dwell time maximum dwell time whether keyboard lockout is supported number of save and recall locations and whether calibration is performed without mechanical pots For example 250 LST 01 TMIN 655 36 TMAX 3 RL 40 MEM 4 DSM CCAL means the unit supports up to 250 points in a list minimum list dwell time is 0 01 seconds maximum list dwell time is 655 36 seconds keyboard lockout is supported 40 memory locations avail able for Save and Recall the front panel has a four character display and calibration does not require manually adjusted pots A 10 RCL RECALL COMMAND RC L Syntax RCL lt integer gt 1 to 40 Description Restores power supply to previously defined levels of output voltage output current overvolt age protection overcurrent protection output state on or off and relay state Executing RCL recalls the settings previously saved by SAV from one of 40 memory locations changing the voltage current overvoltage protection overcurrent protection and output on off state accordingly If RELAY mode was set to MANUAL when SAV was executed relay state is also restored relay state is not saved upon power off The following parameters are affected by RCL VOLT CURR VOLT PROT CURR PROT and OUTP A 11 RST RESET COMMAND RST Syntax RST Description Resets power supply to the power on default state The power supply is programmed to the power on values of the following parameters CURR LEV IMM
149. nts function as a mask to determine which events of the Event Status Register ESR are allowed to set the ESB Event Summary Bit of the Status Byte Register Enables the Standard events to be summarized in the Status Byte register 1 set enable function O reset disable function All of the enabled events of the standard Event Status Enable register are logically ORed to cause ESB bit 5 of the Sta tus Byte Register to be set 1 set enable 0 reset disable See example Figure A 1 TABLE A 2 STANDARD EVENT STATUS ENABLE REGISTER AND STANDARD EVENT STATUS REGISTER BITS PON Power On CONDITION PON NU CME EXE DDE QUE NU OPC NU Not Used CME Command Error BIT 7 6 5 4 3 2 1 0 EXE Execution Error DDE Device Dependent Error VALUE 128 64 32 16 8 4 2 1 QUE Query Error OPC Operation Complete KLR DEV 060713 AA ESE STANDARD EVENT STATUS ENABLE QUERY ES E Syntax Description ESE Return value Integer gt value per Table A 2 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 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 func
150. numbers of the instrument driver and instrument firmware version from the idn query This instrument driver s Revi sion Number is Rev 1 0 9 99 CVI 5 1 and the KLR firmware version is Firmware Version 1 0 This data is necessary when requesting technical support Model Query Kpklr_ModelQuery Return the model number of the KLR power supply Serial Number Query Kpklr_SerialnQuery Returns the serial number of the KLR power supply The serial num ber is extracted from the answer to the idn query Query SCPI Version KpkIr_GetScpiVersion Returns the power supply answer to the Query SCPI Version com mand Checks the Standard Commands for Programmable Instru ments SCPI language version Self Test Kpkir_selfTest Runs the instrument s self test routine and returns the test result s Error Query Kpklr_errorQuery Reads an error code from the instrument s error queue Error Message Kpklr_errorMessage Takes the Status Code returned by the instrument driver functions interprets it and returns it as a user readable string Get System Setting Kpkir_SYST_Set Gets System Settings Get Trigger Value Kpkir_GetTrigValue Gets the trigger voltage or the trigger current level depending on the switch position Set Trigger Value Kpklr_SetTrigValue Sets the trigger voltage or trigger current level depending on the switch position Trigger Kpkir_Trig Triggers the instrument once
151. ockout disabled the front panel controls are disabled with the exception that local mode can be restored by pressing the VOLTAGE and CURRENT adjustment knobs at the same time After sending a SYST KLOC ON local lockout enabled command all front panel controls including pressing VOLTAGE and CURRENT adjustment knobs at the same time to return to local mode are disabled The power supply is now in the local lockout state and the status display reads dRwl Local lockout can also be entered by sending the GPIB lt LLO gt code hex 11 to the power supply The power supply remains in local lockout until a SYST KLOC OFF command is received or the power supply is turned off ANALOG I O DIP switch position 5 is set to OFF and then the power supply is turned on again Related Commands SYST KLOCK See example Figure B 7 KLR DEV 060713 B 96 SYSTem KLOCk QUERY SYST KLOC Short Form SYST KLOC Long Form SYSTem KLOCk Return Value 0 or 1 1 on locked 0 off unlocked Syntax Description Identifies whether keypad is locked or unlocked 0 keypad unlocked local operation possible by pressing LOCAL key 1 keypad locked LOCAL key disabled only remote operation possible Related Commands SYST KLOCK See example Figure B 7 B 97 SYSTem LANGuage COMMAND Syntax Short Form SYST LANG COMP SCPI Long Form SYSTem LANGuage COMP SCPI Description Determines whether unit responds to older command formats SYST LANG
152. on Get Value Kpkir_GetValue Gets the output voltage the output current voltage protection or cur rent protection of the power supply depending on slide selection positionO voltage 1 current 2 voltage protection 3 current pro tection KLR DEV 060713 5 1 TABLE 5 1 KLR VXI PLUG amp PLAY DRIVER FUNCTIONS CONTINUED Purpose Function Name Description Measure Current and Voltage Output Values Kpklr_MeasVoltCurr Measures the values of output voltage and current SETTING AND MONITORING OUTPUT FUNCTIONS CO NTINUED Get Source Mode Kpklr_GetSourceMode Gets the operating mode of the power supply Output On Off Kpklr_OutputOnOff Sets the output on or off Get Output Status Kpklr_getOutputState Returns the output status on or off UTILITY FUNCTIONS Relay Mode KpkIr_GetRelayMode Gets operating mode of instrument relay O Fault factory default 1 Manual 2 List Program Get Relay Status Kpkir_GetRelayStatus Gets on off status of instrument relay Set Relay Status Kpklr_SetRelayStatus Sets relay on energized or off de energized if Relay Mode is set to Manual 1 Set reset Front Panel Lock Kpkir_SetResetKeyblock Sets or resets front panel controls lockout Front Panel Lock Status Kpklr_KeybLockStat Gets status of front panel lockout Revision Query Kpklir_RevisionQuery Returns the revision
153. on releases the connection for other programs to utilize the device When the LabView program completes it must close the driver however the output is not auto matically turned off Therefore it is recommended that the KepcoDCPWR Configure Output State function precede the KepcoDCPWR close function This is not shown in the simplified example Figure 4 6 however it is illustrated in the full block diagram showing implementation of the ramp function Figure 4 12 KLR DEV 060713 4 9 4 6 INTERACTIVE DEMONSTRATION PROGRAM The interactive demo program allows the user to operate the power supply and provides sam ples of how to implement the functions 4 6 1 KepcoDCPwr Interactive Example vi 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 gt Open from within LabView When the program is opened the Front Panel Figure 4 7 is displayed AN ISO 9007 COMPANY x 010 THE POWER SUPPLIER SINCE 1946 VISA resource name a D 0 0 75 0 POWER SUPPLY MODE 60 BD 10 0 0 12 0 gy N Ci 4 16 0 r Function Arbitrary Stee pee ene E 4 0 2 0 0 FIGURE 4 7 FRONT PANEL WINDOW 4 10 KLR DEV 060713 NOTE When accessed via TCP IP the four buttons at the bottom of the panel Software Ramp Programmed List Function Generator and Arbitrary Waveform
154. or programming details The analog meters read actual output voltage and current Two windows beneath the meters are provided to enter voltage and current setpoints The Front Panel box shows a digital read out of the voltage and current displayed on the analog meters this is identical to the readouts on the KLR front panel DC VOLTS and DC AMPERES displays as well as showing messages appearing on the front panel Status Display The operating mode CV or CC Mode indicators light to indicate whether the power supply is operating in either CV constant voltage or CC constant current mode The Output button applies the programmed settings to the output terminals when set to ON or keeps the output voltage at zero and current at minimum when set to OFF When the output is enabled the button color changes from gray to green Set Voltage and Set Current windows are used to program the output voltage and current for the unit These settings may be changed by the user see KLR User Manual Setting Voltage or Current The Protection button opens the Protection Window Figure 5 6 which displays the present overvoltage and overcurrent settings these settings may be changed by the user These entries are automatically limited by the Limit Model settings as described in the KLR User Man KLR DEV 060713 ual Viewing Changing Overvoltage or Overcurrent Protection Values and may affect prior output settings to Protection Bisi x Ov
155. or_query These two functions check for errors and provide readable text of the error messages KpDCPwr_GetError vi amp errorCode bufferSize pos Display the error from the instrument if that is the source if errorCode KPDCPWR_ERROR_INSTRUMENT_STATUS KpDCPwr_error_query vi amp errorCode buffer MessagePopup Error buffer EXAMPLES USING VISUAL BASIC The following paragraphs are example of how to use code written in Visual Basic to set the out put and take a measurement and how to use a list to perform as series of operations SETTING THE OUTPUT TO A VALUE AND TAKING A MEASUREMENT 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 ivildriv 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 Public driver As KepcoDCPwr Public outputPtr As IKLROutput Public protectionPtr As IKLRProtection Public measurementPtr As IKLRMeasurement Set driver New KepcoDCPwr Once the driver is initialized the connection between host and KLR is established using a stan dard VISA resource string It is important that the initialize function be passed as true since its second argument allows KLR specific features to be enabled however in this example no KLR specific feature such as list i
156. ows 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 The file is KepcoDCPwr Voltage Application Exam ple vi It is located in program files national Instruments labview drivers kepco The subvi s used to implement this example are described in the following paragraphs Although the LabView G driver provides a variety of functions see Table 4 1 only the ones shown in Figure 4 6 needed for this example KLR DEV 060713 4 5 1 INITIALIZATION FUNCTION The initialization function use three subvi s KepcoDCPWR initialize Initializes the driver e KepcoDCPWR Query Voltage Limit Verifies the limit model voltage setting e KepcoDCPWR Configure Voltage Mode Sets Mode to fixed thereby stopping list exe cution The initialization function uses five inputs e Recognize device T F True false input If true IDN string is parsed looking for proper model KLR If false model is automatically set to KLR for simulation mode e Resource string The VISA resource string e g GPIB 6 INSTR e ID Query T F input If true allows the unit to be identified by sending IDN query If false program enters simulation mode and no commande are actually sent to the power supply Error in Described in Table 4 2 Reset device T F input If true sends RST to unit
157. p Cee IS SO QS ed E D Ke d SR SAS Be SO 2 SY SS x gt CN lt S Cp S gt 2 NI A E AS X ne i CG x E og Q vlt RK SO SH SS g PAS vid OS ASIA ES ava Q A OK oS LR 7 KK As FIGURE 1 1 STATUS REPORTING STRUCTURE KLR DEV 060713 1 5 1 2 7 2 1 2 7 3 1 6 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 The host computer program might then issue a query to read one of the indi cated register set Reading an Event or Condition register clears all of the bits found in that register Event register contents are also cleared when the CLS command is received Condition register bits are only cleared when the corresponding condition is not present STATUS BYTE REGISTER SET The Status Byte register set is comprised of the Status Byte STB and the Service Request Enable SRE registers The STB register is read by issuing the STB query see Appendix A PAR A 15 The SRE register is read using the SRE query see Appendix A PAR A 14 and modified using the SRE command see Appendix A PAR A 13 except that bit 6 request for service of STB is not masked by SRE 0 Not Used always 0 1 LIST Running 1 indicates that a LIST sequence is pre
158. p Time Kpkir_ListDwell Add a single time entry to the end of a list Add relay control step value Kpklr_ListControl Add a single relay control entry to the end of a list Query How Many Points Kpklr_Points Determines the maximum number of points on the list Add waveform to a list Kpbop_ListData Add waveform to a list Set list execution cycles Kpkir_ListCount A list can be run from 1 65535 times It can also be run continuously if the value is set to 0 The KLR defaults to 1 on a list clear Run stop LIST program Kpklr_Prog Runs or stops LIST program LIST Program Run Status Kpklr_Prog_ Stat Status of LIST program running or stopped STATUS FUNCTIONS Set SRQ Condition Kpkir_SetSrqCond Sets SRQ Condition Bit Display Status Message Kpkir_getDisplay Displays message in Status Display Initialize Status Registers Kpkir_InitReg Clears status Operation and Event registers Get Questionable Event Kpklir_StatQues Tests and returns contents of Questionable Event register Wait for Operation to Complete Kpkir_WaitOPC Waits for operation to complete Wait for SRQ Kpklr_WaitSrq Waits for SRQ 5 4 USING THE VXI plug amp play DRIVER The example programs are provided to illustrate how to operate the KLR via a remote interface The three examples show the following functions Setting Voltage and C
159. perties INSTALLER A stand alone installer file KepcoDCPwr 0 1 0 0 msi using Microsoft MSI technology may be downloaded from the Kepco website at www kepcopower com drivers NOTE The filename of the installer either on our web site or sent via e mail will have delme added to the end of the file After downloading the file it must be renamed deleting delme The delme extension allows the driver to pass through most firewalls The msi extension indicates the file is a system update file and many networks prohibit them Once it is renamed it can be installed on the computer by double clicking the file This installer complies with all of the installer requirements of Section 6 of IVI 3 1 Driver Archi tecture Specification The installer checks to insure the IVI foundation class components of the proper revision are installed It also verifies the VISA COM driver is properly registered If these checks fail the installer provides instructions on how to repair the problem The installer will not install the Kepco driver unless the IVI foundation class is installed If VISA COM problems are detected they are reported with suggestions for repair but do not stop the driver from installing and regis tering the files 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
160. ports of the KLR Serial and GPIB ports and LAN port for E Series models only It is designed to operate in LabView 8 5 environments only NOTE The LabView5 driver available from the Kepco website is recommended to be used only with LabView 5 and supports remote programming only via the GPIB port of the KLR A LabView 6i version provides access to GPIB and LAN based KLR units All three LabView G Drivers can be downloaded from the Kepco web site at www kepcopower com drivers The older versions are found at www kepcopower com drivers drivers dl3a htm The LabView G driver uses VISA calls to communicate with the power supply Since LabView automatically installs the VISA libraries the proper version of the library should already be installed on your computer The Version 8 LabView driver is available in two formats a standalone version that includes the LabView runtime program and a version that requires that LabView be installed on the com puter NOTE The LabView G driver is modifiable by the user Once any utility or function is modified it is the user s responsibility to verify there are no unintended errors introduced 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
161. pplies and is provided for compatibility Valid Channel Names 1 Default Value 1 error in no error The error in cluster can accept error information wired from VI s previously called Use this information to decide if any functionality should be bypassed in the event of errors from other VI s The pop up option Explain Error or Explain Warning gives more information about the error displayed see Table 4 3 VISA Session The ViSession handle is obtained from the KepcoDCPwr Init or KepcoDCPwr InitWithOptions function The handle identifies a particular instrument session Default Value None Model Out The Model Out handle is obtained from the KepcoDCPwr Init or KepcoDCPwr InitWithOptions func tion The handle identifies a particular instrument Default Value None channel name out Passes the name of the channel on which to configure the OVP limit Valid Channel Names 1 Default Value ajaa EI RI 4 5 4 6 3043203 Figure 4 5 is a block diagram which shows the method used by the VI to perform the simulated current measurement The query MEAS CURR is transmitted to the power supply which replies with the current measurement VISA Session VISA Session Out measurement Virtual Current Si A e Virtual Voltage Vize 4 d Virtual Resistance 4 error out FIGURE 4 5 KepcoDCPwr Measure MSR vi BLOCK DIAGRAM EXAMPLE OF SETTING THE OUTPUT Figure 4 6 sh
162. programmable limit for power supply output voltage VOLT LIM HIGH lt exp_value gt sets maximum voltage that can be programmed VOLT LIM HIGH MAX sets maximum programmable limit of the unit to the rated maximum e g 75V for KLR 75 32 This command is password protected requiring SYST PASS CEN prior to execution After executing VOLT LIM HIGH the Output is set to OFF and overvoltage protection VOLT PROT is recalculated to be 20 above the VOLT LIM HIGH setting Previously stored trigger levels are reset to zero volts and minimum current Stored settings PAR A 13 or programmed sequences using the LIST commands may be outside the range established by the new limit model In this case prior to execution the value is cleared to the default minimum zero volts and 222 Data out of range error message is generated If the value is out of the acceptable voltage range for the power supply model error message 222 Data out of range is posted in the output queue If the user tries to set an output voltage value larger than the VOLT LIM HIGH setting a value corresponding to the VOLT LIM HIGH will be pro grammed and error message 301 Value bigger than limit is posted in the output queue Once the limit is established the unit will not allow values higher than the programmed limit Related Com mands VOLT VOLT PROT SYST PASS CEN See example Figure B 3 B 51 SOURce VOLTage LIMit HIGH QUERY VOLT LIM HIGH Syntax Des
163. ptions 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 KpDCPwr_reset Sends reset to unit setting output off KpDCPwr_revision_query Gets the revision level of the power supply KpDCPwr_AttachToExistingCOMSession Allows second usage of driver KpDCPwr_serial_query Gets the serial number of the power supply KpDCPwr_cal_date_query Gets the calibration date of the power supply Output Control Functions KPDCPWR_ATTR_OUTPUT_ENABLED Boolean is used to set the output on and off with this attribute KPDCPWR_ATTR_VOLTAGE_LEVEL Sets or reads back the output voltage of power supply KPDCPWR_ATTR_CURRENT_LIMIT Sets and read back the output current level KPDCPWR_ATTR_POSITIVE_CURRENT_LIMIT Sets the current limit level KpDCPwr_MeasureCurrent Measure current function KpDCPwr_MeasureVoltage Measure Voltage function KPDCPWR_ATTR_OUTPUT_MODE Indicates if unit is in voltage or current mode of operation read only on the KLR KPDCPWR_ATTR_POSITIVE_CURRENT_PROTECTION _LIMIT Sets the current protection level KPDCPWR_ATTR_POSITIVE_VOLTAGE_PROTECTION _LIMIT Sets the voltage protection level Output trigger KPD
164. put current to 3A for all locations NOTE All active loca tions must have complete sets of data entered or list will not run Programs relay control to de energized state NOTE This command is REQUIRED even if the relay control is not set to LIST Enables output Initializes output voltage to 24V output current to 3A Executes the list For the first cycle the voltage will step to 28V and 32V in 2 second dwell increments then begin a cycle of steps from 18V to 28V in 2V steps and 2 second dwell increments repeated ten times at the end of which time the output will remain constant at 28V and 3A Halts execution of the list and maintains the outputs at their immedi ate settings FIGURE B 2 USING LIST COMMANDS AND QUERIES OUTP B 34 OUTPut STATe COMMAND Syntax Short Form OUTP STAT ON OFF or 1 0 1 on 0 off Long Form OUTPut STATe ON OFF or 1 0 1 on O off Description Enables or disables the power supply output see KLR User manual for disabling if analog pro gramming used Upon power up the output is enabled OUTP ON When OUTP OFF is executed the digitally programmed values of voltage and current are saved then voltage and current are pro grammed to 0 analog programming is not affected When OUTP ON is executed the power supply output is restored to the previously saved programmed values The saved values of voltage and cur rent can be viewed by VOLT and CURR queries This command
165. put on The for loop provides the actual voltage changes to the power supply once every 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 tinclude lt formatio h gt tinclude lt visa h gt tinclude kp_KLR h Order of the H files is important visa h uses some of the formation functions kp KLR h needs definitions from visa h to compile correctly x end of required h files ViByte ps_type ViSession KLR_Session void main these three variables determine the ramp start voltage end voltage and rate of change ViReal64 voltage_start 0 ViReal64 voltage_end 10 ViReal64 voltage_change 5 ViReal64 voltage 0 used during the ramp startup ViReal64 current 16 current during the ramp execution Unsigned int i ViStatus power_supply_status VI SUCCESS select one of the following strings depending upon port to be used ViChar id_str GPIB 06 INSTR change 06 to the GPIB address of unit LAN addresses change 192 168 0 100 to IP address found via front panel interface ViChar id_str TCIP 192 168 0 100 INSTR
166. putPtr outputPtr outputPtr driverPtr gt Outputs gt GetItem OLESTR Output IKL1inMeasurementPtr measurementPtr measurementPtr driverPtr gt Measurements gt GetItem OLESTR Measurement set voltage hr outputPtr gt VoltageLevel 75 0 if FAILED hr exit 1 enable OV protection and set the limit hr protectionPtr gt ConfigureOVP 10 if FAILED hr exit 1 set the current limit hr outputPtr gt CurrentLimit 10 if FAILED hr exit 1 enable the output outputPtr gt Enabled true Sleep 500 measure the voltage double measVoltage measVoltage measurement Ptr gt Measure KepcoDCPwrMeasurementVoltage print out voltage measurement printf measured voltage f V n measVoltage catch _com_error err printf s err Description return 0 FIGURE 3 1 EXAMPLE OF SETTING THE OUTPUT AND TAKING A MEASUREMENT KLR DEV 060713 WRITTEN IN C SHEET 2 OF 2 i 3 7 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 Step sizes may need to be readjusted for other models This example will not work for units con figured for master slave operation Since the IVI COM driver is a native application for
167. ration Program Using the VXI plug amp play Driver 5 9 5 5 1 Instrument Set opcion aes bh cuties da inde eres EE ieee ie 5 9 5 5 2 Main Palio ii A A A E ds 5 10 5 5 3 POWErSUPDPIY EVENIS ege role leida ias da EE 5 14 SECTION 6 PROGRAMMING THE KLR USING SCPI COMMANDS 6 2 SC Messages iii ias 6 1 6 3 Common Commands Queries EE 6 1 6 4 SCPI Subsystem Command Query Structure cooooooccccnnoccccnonnnononccnnnnnnnonn ccoo nn nn nana nnrnnn nn cnn nn nr cnn nn nn rra nannnnns 6 1 6 4 1 NEISTE 6 1 6 4 2 TRIGger Subsystem coi a a aaea daa ia A adn 6 1 6 4 3 Abort Subsystem iii adi s 6 2 6 4 4 BRAES ESE ga E E E E E E an EEC tees 6 2 6 4 5 MEASUr S bsySteMi mia inienn dl dd 6 2 6 4 6 OUTPut SUDSYSteM cau 6 2 6 4 7 STATUS UDS SEM A a ads 6 2 6 4 8 Hee ie E E E pieces 6 2 6 4 9 SYSTEM SUD Std lia Meat AA 6 2 6 4 10 SOURce VOLTage and SOURce CURRent Subsystems A 6 2 6 4 11 CALibrate Gubevetem cocine a iaa 6 3 6 5 Program Message Structure cocino reee 6 3 6 5 1 Keyword aiii a ica 6 3 6 5 2 Keyword Separata aaa 6 4 6 5 3 Query Indicador arranc 6 5 6 5 4 RE WEE 6 5 6 5 5 Data Separator ici aid 6 5 6 5 6 Message Unit Separator nines eee ea it ca 6 5 6 5 7 NS EE 6 5 6 5 8 Message Terminator Ate 6 5 6 6 Understanding The Command Structure ooooooccoccconoccccnonnnononononnnnn cono cnn nono nn tnt nor nnnn nara nn anar nr rnn rra rinn rr 6 7 6 7 Program Message Syntax SUMIMALY c oococccnnociccoccconononono cnn nono conan rr narnia rinnr
168. rbitrary waveform generator The last two functions in the diagram send the dwell and then the voltage list to the KLR These functions along with the individual write of the LIST COUN command set up the arbitrary waveform generator for the selected number of rep etitions KLR DEV 060713 4 15 VISA resource name Measured Voltage Outptut Number of points jo Frequency Amplitude PtoP Offset 200 000 3 50S 1 10 000 i 3 50 0 50 0 1 000 3 a 0 100 3 0 01 0 001 Signal type 2 Sawtooth Commanded pe il Duty Cycle d channel name E Phase co o an o E So output Disable Exit Instrument Error N o o il WR source F FIGURE 4 10 FUNCTION GENERATOR PANEL VISA Session VISA Session Out m channel name out ie IST CLE error out Current 3043208 FIGURE 4 11 CONFIGURE User Sequence vi BLOCK DIAGRAM 4 16 KLR DEV 060713 ut and verify it is a valid Kepco product ausing the unit to be set output off and voltage and current levels to 0 Disable End TE A Readback Current CE RENE g DC VOLTS Readback Yoltage e name Provide AS AS min levels bet current to max Bet current to max value D Ge A nn Rapea pornn Kepo 5 B Start Volts Psn i End volts DBL voltage Increment DS a E AROS Repeat H of Cycles IG 132 Cycle Number EIGGIIDE
169. re MSR Returns the voltage read back 9 default or Current read back value from KLR List Functions supported in standalone configurations only KepcoDCPWR Configure Current Mode Sets unit to List or Fixed mode of operation Fixed operation is default KepcoDCPWR Configure Voltage Mode Sets unit to List or Fixed mode of operation Fixed operation is default KepcoDCPWR Configure User Sequence Initializes list from an array of either voltage and dwell or Cur rent and dwell to execute the list a number of times 4 2 KLR DEV 060713 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 KepcoDCPWR Configure Triggered Voltage Level Establishes the voltage level upon receipt of a valid trigger KepcoDCPWR Configure Triggered Source Establishes the source for a trigger and arms the trigger sys tem KepcoDCPWR initiate TRG Issue a software trigger to the KLR KepcoDCPWR Abort TRG Clears the trigger system Error and status reporting KepcoDCPWR Error Query Provides ent
170. re calibration locations by clicking the Cancel button 4 Utilities Ss Ed FIGURE 5 11 UTILITIES WINDOW To restore the contents of the Working location to a previously dumped set of values enter the calibration password in the box below the Restore button and then click the button If the correct password is entered the program will open a dialog box permitting the user to select from previ ously saved calibration data sets Highlight the desired replacement calibration data and click Select to replace the Working calibration click Cancel to exit without changing the Working cal ibration The Hardware Test button tests the validity of system parameters e g CRC The Output Test button verifies basic performance by first testing maximum voltage output then testing minimum voltage output Note that this test must be performed at no load open cir cuit at output power terminals When Output Test is running the button changes to Running see Figure 5 12 do not click the button while the test is running 4i Utilities Mm E Wak For DC Output LED to PASSWORD one FIGURE 5 12 UTILITIES WINDOW WITH OUTPUT TEST RUNNING The Reset button resets the unit to the power up defaults output voltage set to zero current set to minimum current and output off The QUIT button on the Main panel Figure 5 5 is used to exit the sample VXI plug amp play appli cation KLR DEV 060713 5 13 5 5 3 POWER SUPPLY EVENTS A
171. ritten 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 For additional details regarding operation of the KLR refer to the operating instructions for local and remote mode found in the KLR User Manual INSTRUMENT SETUP NOTE Please ensure that all programming connections GPIB or RS 232 as applicable are in place before switching the power supply on Before running the program verify the GPIB address and adjust if necessary For RS 232 communications the power supply must be set to 38400 baud Ethernet programming is not supported After the program is installed double clicking KLRCTRL exe starts the program and opens the Instrument Setup window see Figure 5 4 Select the appropriate communications method TYPE from the Instrument Resource list provided If GPIB is selected enter the correspond ing GPIB address in the box labeled ADDRESS If RS 232 is selected enter the number of the communications port used e g for COM1 enter 1 Click the CONNECT button to establish communication with the power supply If successful the power supply model number is dis played in the box labeled POWER SUPPLY TYPE FOUND If not the Error indicator is red and an error message is displayed in the box The most common errors are incorrect GPIB address or improper baud rate setting RS 232 If the po
172. rror bit 3 Program checksum incorrect 311 Memory Error Device Error bit 3 E g power up NV RAM error or CALibrate STORe error 313 Calibration Memory Lost Device Error bit 3 No valid calibration found 314 Save recall memory error Device Error bit 3 Using cell other than 1 40 for SAV and RCL 315 Configuration Memory Error Device Error bit 3 Configuration Memory Error 330 Self Test Failed Device Error bit 3 Self test failed 340 Calibration Failure Device Error bit 3 Unable to perform auto calibration 341 Non Volatile Mem CRC error Device Error bit 3 Power supply constants may be corrupted recalibration may be nec essary 350 Queue Overflow Device Error bit 3 More than 15 errors are in queue Error queue was full error events have been lost 410 Query interrupted Query Error bit 2 New command sent before data from previous query read Previous query data lost 430 Query Deadlocked Query Error bit 2 Over 255 characters received in single input string B 26 KLR DEV 060713
173. ry from the error queue of the power supply 4 4 USING THE DRIVER FUNCTIONS The interactive example uses various driver functions of the LabView G driver The following two paragraphs details the inputs and outputs of two of typical Vis used in the interactive example KepcoDCPwr Configure Voltage Level vi PAR 4 4 1 and KepcoDCPwr Measure MSR vi PAR 4 4 2 An overall block is provided for each function which shows inputs and outputs fol lowed by detailed descriptions of inputs and outputs A detailed block diagram with associated text is also provided to show how the function is implemented 4 4 1 KepcoDCPwr Configure Voltage Level vi This VI configures the DC voltage level the power supply is expected to generate 4 4 1 1 CONNECTOR PANEL channel name OC 3043198 error in no error VISA Session Out Model Out channel name Out error out FIGURE 4 1 KepcoDCPwr Configure Voltage Level vi CONNECTOR PANEL 4 4 1 2 See Table 4 2 KLR DEV 060713 CONTROLS AND INDICATORS 4 3 TABLE 4 2 KepcoDCPwr Configure Voltage Level vi INPUT OUTPUT DESCRIPTIONS DESCRIPTION SYMBOL channel name Passes the name of the channel on which to configure the voltage level It is not required for most supplies and is provided for compatibility Valid Channel Names 1 27 Default Value level 0 0 volts Passes the DC voltage the power supply is to generate The driver uses this value to
174. s Received Not Used RFD Ready for Data Received or Sent SDC Selected Device Clear Received SPD Serial Poll Disable Received SPE Serial Poll Enable Received SRQ Service Request Sent UNL Unlisten Received UNT Untalk Received KLR DEV 060713 TABLE 7 4 IEEE 488 GPIB BUS DATA MODE MESSAGES MNEMONIC MESSAGE DESCRIPTION COMMENTS DAB Data Byte Received or Sent END End Received or Sent EOS End of String Received or Sent RQS Request Service Sent STB 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 KLR DEV 060713 7 3 7 4 Blank 8 1 8 2 8 2 1 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 All power supply functions available from the front panel can be programmed via remote commands as well as some that are not available from the front panel Save Recall see PAR 1 2 5 List see PAR 1 2 6 and Relay Control see PARs B 10 and B 11 RS232 C OPERATION STANDARD MODELS ONLY The KLR Power Supply may be operated via an RS232 C terminal or from a PC using a termi nal em
175. s have been entered for locations O through 5 and location 6 is the next to be filled by a LIST DWEL command LIST DWEL LIST DWEL POIN B 25 SOURce LIST QUERy COMMAND LIST QUER Syntax Short Form LIST QUER lt int_value gt Long Form LIST QUERy lt int_value gt int_value 0 to 250 Description Determines first location to be queried by LIST VOLT LIST CURR LIST DWEL LIST CONT queries Related Commands LIST QUER See example Figure B 2 Sending LIST QUER 0 sup presses the 16 entry response to LIST VOLT LIST CURR LIST DWEL and LIST CONT and causes the entire list to be returned The list may be up to 2000 bytes 250 points x 10 characters B 26 SOURce LIST QUERy QUERY LIST QUER Syntax Short Form LIST QUER Long Form LIST QUERy Return Value lt int_value gt Description Identifies first location to be queried by LIST VOLT LIST CURR LIST DWEL LIST CONT queries Related Commands LIST QUER See example Figure B 2 B 27 SOURce LIST VOLTage COMMAND LIST VOLT Syntax Short Form LIST VOLT LEV lt exp_value gt lt exp_value gt to max of 250 data points Long Form LIST VOLTage LEVel lt exp_value gt lt exp_value gt to max of 250 data points lt exp_value gt digits with decimal point and Exponent e g 2 71E1 for 27 1 Description Adds the voltage value in Volts to list This command sequentially adds LIST VOLTage values to the main channel List Data Table locatio
176. s port is accessed using the VISA resource string e g TCIPO 192 168 1 100 5025 SOCKET e Port 5044 Trigger Port UDP LXI and TCP IP DIGITAL CONTROL VIA GPIB 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 Use the SYST COMM GPIB ADDR query to read the current GPIB address Use the SYST COMM GPIB ADDR command to change it Refer to Section 6 PRO GRAMMING THE KLR USING SCPI COMMANDS and Section 7 IEEE 488 2 GPIB INTER FACE for additional details on using the GPIB interface DIGITAL CONTROL VIA 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 All power supply functions avail able from the front panel can be programmed via remote commands as well as some that are not available from the front panel Save Recall see PAR 1 2 5 and List see PAR 1 2 6 Refer to Section 8 RS 232C INTERFACE STANDARD MODELS ONLY for additional details on using the RS 232 interface The KLR Power Supply may be operated via an RS232 C terminal or from a PC using a termi nal emulation program Refer to KLR User Manual for RS 232 connections All RS 232 parameters may be changed using SCPI commands see Appendix B as follows To enable RS 232 refer to PAR s B 86 and B
177. s required initialize the driver note ID device is true driver Initialize GPIBO 6 INSTR True True Cache true InterchangeCheck false Query InstrStatus true Simulate false Dim result As Boolean result driver Initialized Set outputPtr driver Outputs Item driver Outputs Set protectionPtr driver Protections Item driver Protections Set measurementPtr driver Measurements Item driver Measurements KLR DEV 060713 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 enable the output outputPtr Enabled True Measuring the output is performed by accessing a function and not a parameter Measure the voltage Dim measVoltage As Double measVoltage measurementPtr Measure Kepco Closing the driver is the last step in any program driver Close KLR DEV 060713 DCPwrMeasurementVoltage 3 13 This program demonstrates how to set the output voltage and current t measure the voltage using the IVI COM driver Public Public Public Public Explicit driver As KepcoDCPwr outputPtr As IKLROutput protectionPtr As IKLRProtection measurementPtr As IKLRMeasurement Private Sub
178. sent to the computer The drivers provide the ability to set and clear these registers but the interrupt functionality is not supported by the drivers Using interrupts requires special programming techniques that are environment specific See PAR 1 2 7 1 through 1 2 7 5 for details on the process required to implement this in a VISA environment The serial poll response of the KLR power supply provides summary bits of the status and error reporting system The simplest status report is the command valid reporting and data avail ability The successful decoding of a command string generates no error and is indicated by the bit 3 of the serial poll response being a zero The setting of bit 4 in the status byte indicates data is available to the controller in response to a command query message STATUS REPORTING STRUCTURE The status reporting of the KLR uses four status register sets illustrated in Figure 1 1 These register sets are the Questionable Operation Event Status and Status Byte register sets The Questionable and Operation registers are 16 bit registers whose inputs are unique to each instrument while the Event Status and Status Byte registers are 8 bit registers with standard inputs defined by IEEE 488 2 Each of these four register sets is comprised of event and enable registers with the Questionable and Operation sets adding condition and transition registers The Questionable and Operation condition registers hold unlatched
179. sently running Read and clear Operation Event register using STAT OPER e 2 Error Queue 1 indicates error queue is not empty Read error queue using SYST ERR e 3 Questionable Status Summary 1 indicates a Questionable Status register bit has been set see Appendix B Table B 5 for details Read and clear Questionable Event register using STAT QUES 4 Message Available 1 indicates a message is waiting in the output buffer 5 Event Status Summary 1 indicates an Event Status register bit has been set Read and clear Questionable Event register using ESR e 6 Service Request Either RQS Request for Service or MSS Master Status Sum mary see Appendix A PAR A 13 for details e 7 Operation Status Summary 1 indicates an Operation Status register bit has been set see Appendix B Table B 5 for details Read and clear Operation Event register using STAT OPER STANDARD EVENT STATUS REGISTER SET The Standard Event Status register set is comprised of the Event Status ESR and Event Sta tus Enable ESE registers The ESR register is read by issuing the ESR Query see Appen dix A PAR A 5 The ESE register is read using the ESE query see Appendix A PAR A 4 and modified using the ESE command see Appendix A PAR A 3 e 0 Operation complete 1 indicates the operation is complete and the unit is ready to accept another command or that query results are ready to be transferred
180. set the Voltage Level The level is not checked by the driver function but is checked by the KLR or power supply Default Value 0 0 volts E error in no error The error in cluster can accept error information wired from VI s previously called Use this information to decide if any functionality should be bypassed in the event of errors from other VI s The pop up option Error or Explain Warning gives more information about the error displayed see Table 4 3 VISA Session The ViSession handle is obtained from the KepcoDCPwr Init or KepcoDCPwr InitWithOptions function 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 The MULTI type power supplies require a chan nel number to operate correctly The constant is created by the Recognize Kepco model utility SIS error out The error out cluster passes error or warning information out of a VI to be used by other VI s The pop up option Explain Error or Explain Warning gives more information about the error displayed see Table 4 3 VISA Session Out The ViSession handle is obtained from the KepcoDCPwr Init or KepcoDCPwr InitWithOp tions function The handle identifies a p
181. t 1 00 Dwell ms 550 Voltage vs Time Poto Bei Ramp Direction UP Disable End Repeat of Cycles yo LJReadback Voltage LJReadback Current Start Ramp Stop error in no error error out 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 gt 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 4 12 KLR DEV 060713 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 The check boxes on the right are effective once the Start Ramp button is clicked Disable End Checked causes the output to turn off when the list is complete e of Cycles Checked to enter how many ramps will be created setting of O causes ramps to continue indefinitely Unchecked to create one ramp e Readback Voltage Readback Current Once Start Ramp is clicked checked causes the DC
182. t Manufacturer gt lt Model gt 1200 lt Last Calibration Date gt lt Serial Number gt lt Firmware revision gt The character string for two standard models in series contains the following fields lt Manufacturer gt lt Model _S gt Series lt Manufacturing Date master unit gt lt Serial Number of master unit gt lt Firmware revision gt The character string for two standard models in parallel contains the following fields lt Manufacturer gt lt Model_P gt Parallel lt Manufacturing Date master unit gt lt Serial Number of master unit gt lt Firmware revision gt The character string for standard models with R option RODC contains the following fields lt Manufacturer gt lt Model gt RODC lt Last Calibration Date gt lt Serial Number gt lt Firmware revision gt The character string for E Series models contains the following fields lt Manufacturer gt lt Model gt LAN lt Last Calibration Date gt lt Serial Number gt lt Firmware revision gt lt LAN Firmware revision gt KLR DEV 060713 The character string for E Series models with RODC contains the following fields lt Manufacturer gt lt Model gt LAN RODC lt Last Calibration Date gt lt Serial Number gt lt Firmware revision gt lt LAN Firmware revision gt where e lt Manufacturer gt KEPCO lt Model gt KLR V C V is Esmax C is lomax lt Model_S gt KLR 2V C 2V is Emax X 2 C is lomax lt Model_P gt KLR V 2C V is Esmaxo 2C is lomax 2
183. t to 1 on energized or 0 off de energized Even when the relay is not configured to run a list LIST CONT either O or 1 must be executed once otherwise the list will not execute MEASURE SUBSYSTEM This query subsystem returns the voltage and current measured at the power supply s output terminals OUTPUT SUBSYSTEM This subsystem controls the power supply s output state on or off STATUS SUBSYSTEM This subsystem programs the power supply status register The power supply has two groups of status registers Operation and Questionable Each group consists of three registers Condition Enable and Event STORAGE SUBSYSTEM The KLR has 40 memory locations where the current state of the power supply can be stored and then recalled The storage system saves five settings Voltage Current Voltage protection level Current protection level and output on off state The advantage to using these 40 locations instead of sending five commands is processing time The Saved data is binary data and requires no processing before applying it to the output thereby reducing the time needed to change from one state to another to less a millisecond The GAN command saves the five power supply setting to a location The RCL command recalls the fives settings from a location and applies them it to the power supply output The MEM LOC command allows the data to be loaded into a location without actually programming the KLR The MEM LOC query allows
184. tches the current password B 101 SYSTem PASSword NEW COMMAND SYST PASS NEW Syntax Short Form SYST PASS NEW lt old password gt lt new password gt Long Form SYSTem PASSword NEW lt old password gt lt new password gt Description Establishes new password The old current password is checked then replaced by the new pass word B 102 SYSTem PASSword CENable STATe QUERY SYST PASS STAT Syntax Short Form SYST PASS CEN STAT Long Form SYSTem PASSword CENable STATe Return Value lt int_value gt 0 or 1 1 enabled 0 disabled Description Returns a 1 if the password state is enabled or a 0 if it is disabled B 103 SYSTem SECurity IMMediate COMMAND SYST SEC IMM Syntax Short Form SYST SEC IMM Long Form SYSTem SECurity IMMediate Description Initializes all NVRAM variable to factory defaults This includes clearing all SAV RCL locations returning all relay functions to factory default settings and setting Quick Boot feature to OFF This command does not affect limit model and corresponding protection limits last setting recall register or present operating conditions NOTE System password must be enabled prior to issuing this com mand see PAR B 99 B 104 SYSTem SET COMMAND SYST SET Syntax Short Form SYSTem SET CM0 DCO DC1 LFO LF1 KLO KL1 L250 M40 SCP Long Form SYSTem SET CM0 DCO DC1 LFO LF1 KLO KL1 L250 M40 SCP Description Establishes Device Clear Line Feed an
185. the five settings to be retrieved prior to applying them to the output providing a method of verifying that the settings are correct before applying them to a unit under test SYSTEM SUBSYSTEM This subsystem controls the RS 232 port GPIB address passwords security language key board lockout and compatibility with older Kepco equipment 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 KLR DEV 060713 6 4 11 6 5 6 5 1 CALIBRATE SUBSYSTEM CAL commands and queries are used to perform calibration of the unit via the control interface These commands must be issued in a specific sequence in order to properly calibrate the unit To use these com mands refer to Kepco s website www kepcopower com drivers and download the LabWindows CVI Ver sion 5 driver for KLR This file provides remote calibration capability and uses the following supported commands and queries CAUTION The CAL commands are provide for reference only Use of these commands in any way other than in the supplied remote calibration application may result in irrecoverable corruption of the internal calibration files CAL CEXT command CAL CGA command CAL CURR LEV command CAL CURR DATA command CAL DPOT
186. the subsystems subsys tem commands are defined and explained in Appendix B DISPLAY SUBSYSTEM This subsystem returns the character string displayed in the Status display TRIGGER SUBSYSTEM This subsystem enables the trigger system When an internal trigger is enabled the triggering action will occur upon receipt of a GPIB lt GET gt TRG or TRIGger command When an external trigger is enabled the triggering action occurs when a ground is applied to J2 pin 14 If a trigger circuit is not enabled all trigger commands are ignored Abort sets the trigger subsystem to the ready to arm state KLR DEV 060713 6 1 6 4 3 6 4 4 6 4 5 6 4 6 6 4 7 6 4 8 6 4 9 6 4 10 6 2 ABORT SUBSYSTEM This subsystem cancels any pending trigger levels previously stored and resets them to the immediate value ABORt also resets the WTG bit in the Operation Condition register ABORt is executed upon initial power up of the power supply LIST SUBSYSTEM Supported in Standalone Configurations Only The LIST subsystem is represented by the 250 memory locations groups of settings which are stored in the volatile memory Each setting contains values for Current Voltage Dwell and Relay The range for the first two values is constrained by the limit model and protection limit settings The range for the dwell time is between 0 01 and 655 36 seconds If the relay is config ured to LIST using the UTIL menu on the front panel it can be se
187. tion 0 reset disable function See example Figure A 1 Ah ESR EVENT STATUS REGISTER QUERY ES R Syntax Description ESR Return value lt integer gt Value contents of Event Status register as defined in Table A 2 Causes the power supply to return the contents of the Standard Event Status register After it has been read the register is cleared The Standard Event Status register bit configuration is defined in Table A 2 1 set 0 reset The error bits listed in Table A 2 are also related to error codes produced during parsing of messages and to errors in the power supply see PAR B 92 and Table B 5 Any 1xx type error sets the Command error bit 5 Any 2xx type error sets the Execution error bit 4 Any 3xx type error sets the Device error bit 3 The Device error bit will be set when Current Error or Voltage Error is detected and the corresponding Status Questionable Enable bit is set e Any 4xx type error sets the Query error bit 2 Related Commands CLS ESE OPC See example Figure A 1 Ap IDN IDENTIFICATION QUERY ID N Syntax Description A 2 IDN Return value Character string Identifies the instrument This query requests identification The power supply returns a string which contains the manufacturer name model option s installed serial number and firmware ver sion The character string for standard models contains the following fields l
188. ts maximum programmable limit of the unit to the rated model maximum e g 32A for KLR 75 32 This command is password protected requiring SYST PASS CEN prior to execution After executing CURR LIM HIGH the Output is set to OFF and overcurrent protection CURR PROT is recalculated to be the greater of 20 above the CURR LIM HIGH setting or 72 of rated model maximum Previously stored trigger levels are reset to zero volts and minimum current Stored settings PAR A 13 or programmed sequences using the LIST commands may be outside the range established by the new limit model In this case prior to execution the value is cleared to the default minimum minimum current and error message 222 Data out of range is generated If the value is out of the acceptable current range for the power supply model error message 222 Data out of range is posted in the output queue If the user tries to set an output current value larger than the CURR LIM HIGH setting a value corresponding to the CURR LIM HIGH will be pro grammed and error message 301 Value bigger than limit is posted in the output queue Once the limit is established the unit will not allow values higher than the programmed limit Related Com mands CURR CURR PROT SYST PASS CEN See example Figure B 3 B 9 NOTE The following example assumes KLR 75 32 with limit model set for 75V 16A and output operat SYST PASS CEN 7533 Enables access to the protected com
189. tware Ramp button The indicator to the right of the switch shows whether the unit is primed to produce voltage ramps green or current ramps yellow The DC OUTPUT switch can be clicked to enable disable the output The green indicator within the switch lights when the output is enabled The Set Limits button at the top right is used to set the limit model of the KLR The four buttons at the bottom of the front panel invoke standalone functions which can be used to 1 create a computer timed software ramp Software Ramp 2 create a ramp using the list functionality Programmed List 3 create functions and files for executing complex waveforms Function Generator or 4 create an arbitrary series of points Arbitrary Waveforms KLR DEV 060713 4 11 4 6 2 SOFTWARE TIMED RAMP EXAMPLE When the Software Ramp button on the front panel is depressed the panel shown in Figure 4 8 is displayed The figure illustrates a current ramp the voltage ramp panel is similar The Power Supply Mode switch on the front panel Figure 4 7 determines whether the current ramp or volt age ramp is displayed It is also possible to run this program by selecting either KepcoDCPwr Software Timed Ramp Example vi for a voltage ramp KepcoDCPwr Current Software Timed Ramp Example vi for a current ramp AN ISO 9001 COMPANY KEPCO THE POWER SUPPLIER SINCE 1946 VISA resource name Start Volts 0 00 End volts 4 10 00 Voltage Incremen
190. two modes as part of initial instrument communications If the input mode is subsequently changed back to manual entry the Echo and Prompt modes are not automatically restored it is the user s responsibility to re enable these features as necessary By contrast SON XOFF is compatible with both manual and electronic input methods and Kepco strongly recommends that XON XOFF be enabled for all communications methods ECHO MODE STANDARD MODELS ONLY Echo mode is the default method of ensuring data is transferred without errors Each byte char acter is echoed back to the sender where it is verified as the same character that was just sent If the character is incorrect or missing the sender sends the character again until the correct character is verified as having been received All non control characters are sent via the serial port of the command originator The control character BS is echoed as BS Space BS Only the first control character is returned in response to either a CR LF or LF CR character sequence see Figure 8 1 PROMPT METHOD STANDARD MODELS ONLY The command originator sends a message line command to the KLR Power Supply and waits until the prompt sequence CR LF gt is received The KLR sends the prompt sequence CR LF gt to the command originator indicating the power supply is ready to receive the next command so that data will not be lost The prompt method is similar to the echo method described above except that th
191. ue of Questionable Condition Enable Register indicating which conditions are being monitored Bit set to 1 function enabled active true bit reset to 0 function disabled inactive false Related Com mands STAT QUES See example Figure B 6 B 67 SYSTem COMMunication GPIB ADDRess COMMAND SYST COMM GPIB ADDR Syntax Short Form SYST COMM GPIB ADDR lt int_value gt 1 to 30 Long Form SYSTem COMMunication GPIB ADDRess lt int_value gt 01 to 30 Description Sets selected power supply GPIB address Dep SYSTem COMMunication GPIB ADDRess QUERY SYST COMM GPIB ADDR Syntax Short Form SYST COMM GPIB ADDR Long Form SYSTem COMMunication GPIB ADDRess Return Value lt int_value gt GPIB address Description Returns GPIB address B 69 SYSTem COMMunication LAN AUTO COMMAND SYST COMM LAN AUTO E SERIES MODELS ONLY Syntax Short Form SYST COMM LAN AUTO ON OFF Long Form SYSTem COMMunication LAN AUTO ON OFF Description Specifies the AUTO MODE When set to OFF the static addresses set by the user from the front panel or using SYST COMM LAN commands are used for LAN communication When set to ON the unit obtains a valid IP address automatically B 18 KLR DEV 060713 B 70 SYSTem COMMunication LAN AUTO QUERY SYST COMM LAN AUTO 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
192. ulation program Refer to KLR User Manual for RS 232 connections and default port set tings All RS 232 parameters may be changed using SCPI commands see Appendix B as follows To enable RS 232 refer to PAR s B 86 and B 87 For baud rate refer to PAR s B 82 and B 83 e For prompt refer to PAR s B 90 and B 91 e For echo refer to PAR s B 84 and B 85 e For XON XOFF refer to PAR s B 88 and B 89 RS 232 IMPLEMENTATION STANDARD MODELS ONLY The following paragraphs are provided to help the user understand how the RS 232 serial inter face is implemented in the KLR Power Supply The serial interface behaves like the GPIB interface in that the command is parsed after receiv ing the appropriate control character in this case either a Line Feed or Carriage Return Upon initial application of source power to the KLR input or after restoration of source power following an interruption the power supply will return the identification string described in Appendix A PAR A 6 to the host computer indicating that the KLR is initialized and ready to accept programming commands Only five control characters characters between 00 and 1F yy are acknowledged by the power supply e Cancel CAN 184 Keyboard command CTRL X e Carriage Return CR OD Keyboard command Enter e Line Feed LF OAy Keyboard command Enter e Back Space BS 084 Keyboard command Backspace e Escape ESC 01By Keyboard command ESC
193. urrent PAR 5 4 1 Using the Power Supply to Create a Voltage Ramp PAR 5 4 2 Measurements 5 4 1 EXAMPLE 1 SETTING VOLTAGE AND CURRENT The simple routine shown in Figure 5 1 sets the power supply to a specific value then leaves it at this value It opens the driver calls the proper functions and then closes the driver Four pos sible id_str variable statements have been provided depending on the interface being used The id_str statements for the interfaces not used must be commented out otherwise errors will result KLR DEV 060713 5 3 tinclude lt formatio h gt tinclude lt visa h gt tinclude 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 x end of required h files Void main call function to set power supply to 15 volts at 12 amperes Set_powersupply 15 12 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 ViByte ps_type ViSession KLR_Session ViStatus power_supply_status VI_SUCCESS select one of the following ViChar id_str strings depending upon port to be used and comment out the rest ViChar id_str GPIB 06 INSTR change 06 to the GPIB address of unit For
194. uting CURR PROT the Output is set to OFF and previously stored trigger levels are reset to zero volts and minimum current If the programmed OCP value is out of the acceptable overcurrent range for the power supply model error message 222 Data out of range is posted in the output queue If the power supply out put exceeds the current protection level programmed then the power supply output is disabled pro grammed to OV minimum current and the OCP bit in the Questionable Condition status register is set The value of CURR PROT is automatically recalculated if CURR LIM HIGH is executed See example Figure B 4 NOTE VOLT 32 1 CURR 4 The following example assumes KLR 75 32 with limit model set for 36V 32A and output operating in current stabilization mode See Figure B 3 for directions on programming limit model settings Programs output voltage for 32 1V output current for 4A OUTP ON Enables output NOTE Load determines output operating mode if load resistance is less than 32 1V 4A 8 025 Ohms output will operate as current stabilizer MEAS CURR Returns measured output current approximately 4EO assuming cur rent stabilizer operation CURR Returns 4E0 4A programmed output current CURR 3 3E 1 Programs output current to 0 33A NOTE For this model 0 4A is the minimum load current therefore although 0 33 value is programmed load current will not be less than 0 4A No explicit indication is given regarding
195. valid character in number Command Error bit 5 Volt 1 500 comma not allowed KLR DEV 060713 B 25 TABLE B 5 ERROR MESSAGES CONTINUED ERROR MESSAGE ESR ERROR BIT SET SEE PAR A 5 EXPLANATION 123 Exponent too large Command Error bit 5 Exponent E 3 or greater is invalid 141 Invalid character data Command Error bit 5 For example OUTP OFD or OUTP STOP instead of OUTP OFF 150 String data error Command Error bit 5 Invalid characters were detected in numeric entry For example E 1 instead of E 1 or 4d3 instead of 4 3 203 Command protected Execution Error bit 4 Password must be CENabled 207 Location is empty Execution Error bit 4 Recalled location has no data stored 211 Trigger Ignored Execution Error bit 4 Trigger ignored because output is off 213 INIT ignored Execution Error bit 4 Request for measurement ignored because another measurement already in progress 221 Settings conflict Execution Error bit 4 E g Invalid password from syst pass cen command or Calibration state not enabled but CALibrate command received 222 Current Voltage or Data out of range Execution Error bit 4 Value current or voltage exceeds power supply rating or data exceeds acceptable command parameters 223 Data format error Execution Error bit 4 Multipl
196. 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 If LIST CURR has any entries an error message 221 Settings conflict is posted in the error queue Related Commands LIST VOLT See example Figure B 2 B 30 MEASure SCALar CURRent DC QUERY MEAS CURR Syntax Short Form MEAS SCAL CURR DC Long Form MEASure SCALar CURRent DC Return Value lt num_value gt digits with decimal point and Exponent Description Measures actual current This query returns the actual value of output current measured at the out put terminals as determined by the programmed value of voltage and current and load conditions NOTE Current measurement error may be as high as 0 5 for open circuit conditions See example Figure B 1 B 31 MEASure SCALar VOLTage DC QUERY MEAS VOLT Syntax Short Form MEAS SCAL VOLT DC Long Form MEASure SCALar VOLTage DC Return Value lt num_value gt digits with decimal point and Exponent Description Measures actual voltage This query returns the actual value of output voltage measured at the out put terminals as determined by the programmed value of voltage and current and load conditions See example Figure B 1 B 32 MEMory LOCation COMMAND MEM LOC
197. wer supply displayed is correct click the Con tinue button to open the main panel Figure 5 5 4 Instrument Setup A USE VISA LIBRARY NO MM Yes Eror ADDRESS T connect Power Supply Type Found AAA FIGURE 5 4 INSTRUMENT SETUP WINDOW KLR DEV 060713 5 9 5 5 2 KLR 20 120 Dutput Voltage DN Mode CC _ Dutput Current Dutput x 6 81012145 za 0 50 80 pp Fram Pare Set ge Voltage Status Current Set Current ds Protection Store Recall Trigger Calibrate Access Access Access Access Reset limit model Front Panel Utilities ABOUT x Access _ Enabled Access QUIT FIGURE 5 5 MAIN PANEL WINDOW 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 Various functions accessible via the panel e g voltage and current settings protection limits trigger settings etc may be altered either by clicking on the arrows to left of the applicable dis play or by using the mouse to highlight the setting typing in a new value and then exiting the field either by using the Tab key or by clicking the mouse button a second time Refer to the indicated paragraphs of the KLR User Manual f

Download Pdf Manuals

image

Related Search

Related Contents

Corriente CA y CD  PS150/CH150 12V Charging Regulators  Bomba binaria Agilent 1260 Infinity  CIO-DAS16/M1 User`s Manual  Mode d`emploi lave-linge W 5877 WPS Edition 111  ISTRUZIONI PER L`USO  ETC® D60™  Manual de Instruções Top 4.3  Polk Audio TC610i TC615i User's Manual  Manual do Utilizador  

Copyright © All rights reserved.
Failed to retrieve file