public void SetRefVoltageMode()
{
// Get VTS interface, VT7001 module, internal supply and a output channel
IVTSystem vts = VTSystem.Instance;
IVT7001 powerSupply = vts.GetModule("PowerSupply") as IVT7001;
IVT7001SupplyExternal extSupply = vts.GetChannel("ExtSupply") as IVT7001SupplyExternal;
IVT7001Channel clamp30 = vts.GetChannel("Clamp30") as IVT7001Channel;
// Set mode to one power supply only -> external power supply 1
powerSupply.InterconnectionMode.Value = InterconnectionMode.Sup1;
// Activate the reference voltage mode with constant value mode
// and a factor of 0.1
extSupply.SetRefVoltageMode(RefVoltageMode.Constant, 0.1);
// The following line sets the output voltage to 15 V,
// VControl (1.5 V) is calculated with the given factor automatically
extSupply.RefVoltage.Value = 15.0;
// Switch output on
clamp30.Active.Value = OutputMode.Active;
}