beautypg.com

Examples – KEPCO ABC VISA INSTRUMENT DRIVER User Manual

Page 9

background image

ABC-VISA 092303

9/(10 Blank)

3. EXAMPLES

The following examples show the functions needed to set voltage to 15V, current to 2 amp and output ON.

Example 1:

ViByte ps_type;
ViSession ABC_Session;

Kpabc_init ("GPIB0::6", 1, &ps_type, &ABC_Session); //init ps
Kpabc_Set_Volt_Curr (ABC_Session, 15, 2);

//voltage and current

Kpabc_OutputOnOff ( ABC_Session, 1);

//output on

Example 2:

ViByte ps_type;
ViSession ABC_Session;

Kpabc_init ("GPIB0::6", 1, &ps_type, &ABC_Session); //init ps
Kpabc_SetValue (ABC_Session, 0, 15);

//voltage

Kpabc_SetValue (ABC_Session, 1, 2);

//current

Kpabc_OutputOnOff ( ABC_Session, 1);

//output on