beautypg.com

KEPCO KLP Series Developer's Guide, Rev 1 User Manual

Page 67

background image

KLP-DEV 031113

5-5

FIGURE 5-1. EXAMPLE 1: SETTING VOLTAGE AND CURRENT (SHEET 2 OF 2)

if (

(power_supply_status = Kpklp_init ( &id_str, 1, &ps_type, &KLP_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 KLP

************************************/

Kpklp_Set_Volt_Curr (KLP_Session, voltage, current); //voltage and current

/*

The above function sets both the voltage and current setpoint of the power supply

*/

Kpklp_OutputOnOff ( KLP_Session, 1); // output on

Kpklp_close(&KLP_Session); // free up memory and close VISA session

return (power_supply_status);

} // end of main

// if not created as a project, include the driver code at end of program

#include "Kp_klp.c"