4 using the vxi plug&play driver, 1 example 1: setting voltage and current – KEPCO KLP Series Developers Guide, Rev 3 User Manual
Page 65

KLP-DEV 041213
5-3
5.4
USING THE VXI plug&play DRIVER
The example programs are provided to illustrate how to operate the KLP via a remote interface.
The three examples show the following functions:
• Setting Voltage and Current (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.
Calibration Restore
KpKlp_CalRestore
instrument receives calibration data in Intel hex format and replaces
the Working Calibration.
ARBITRARY WAVEFORM FUNCTIONS (Standalone configuration only)
Clear List
KpKlp_ListCl
Clears the list to prepare for adding points.
Add Volt Step Value
KpKlp_ListVolt
Add a single voltage entry to the end of a list.
Add Current Step Value
KpKlp_ListCurrent
Add a single current entry to the end of a list.
Add Step Time
KpKlp_ListDwell
Add a single time entry to the end of a list.
Add relay control step
value
KpKlp_ListControl
Add a single relay control entry to the end of a list.
Query How Many Points
KpKlp_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
KpKlp_ListCount
A list can be run from 1- 65535 times. It can also be run continuously
if the value is set to 0. The KLP defaults to 1 on a list clear.
Run/stop LIST program
KpKlp_Prog
Runs or stops LIST program.
LIST Program Run Status
KpKlp_Prog_Stat
Status of LIST program (running or stopped)
STATUS FUNCTIONS
Set SRQ Condition
KpKlp_SetSrqCond
Sets SRQ Condition Bit.
Display Status Message
KpKlp_getDisplay
Displays message in Status Display.
Initialize Status Registers
KpKlp_InitReg
Clears status Operation and Event registers
Get Questionable Event
KpKlp_StatQues
Tests and returns contents of Questionable Event register.
Wait for Operation to
Complete
KpKlp_WaitOPC~
Waits for operation to complete.
Wait for SRQ
KpKlp_WaitSrq
Waits for SRQ
TABLE 5-1. KLP VXI PLUG&PLAY DRIVER FUNCTIONS (CONTINUED)
Purpose
Function Name
Description