beautypg.com

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

Page 71

background image

KLP-DEV 031113

5-9

FIGURE 5-3. EXAMPLE 2: USING THE POWER SUPPLY TO TAKE MEASUREMENTS (SHEET 2 OF 2)

/* function Set_powersupply

Sets power supply to the supplied voltage and current

Also sets the output on as setting to a voltage and current

Implies output being placed on

*/

ViStatus Set_powersupply (ViReal64 voltage, ViReal64 current){

ViStatus power_supply_status = VI_SUCCESS;

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

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"