public void InternalPowerSupply()
{
// Get VTS interface, VT7001 module, internal supply and two output channels
IVTSystem vts = VTSystem.Instance;
IVT7001 powerSupply = vts.GetModule("PowerSupply") as IVT7001;
IVT7001SupplyInternal intSupply = vts.GetChannel("IntSupply") as IVT7001SupplyInternal;
IVT7001Channel clamp30 = vts.GetChannel("Clamp30") as IVT7001Channel;
IVT7001Channel clamp15 = vts.GetChannel("Clamp15") as IVT7001Channel;
// Set mode to one power supply only -> external power supply 1
powerSupply.InterconnectionMode.Value = InterconnectionMode.SupInt;
// Set voltage to 12.0 V
intSupply.SetRefVoltageMode(RefVoltageMode.Constant);
intSupply.RefVoltage.Value = 12.0;
// Switch both outputs on
clamp30.Active.Value = OutputMode.Active;
clamp15.Active.Value = OutputMode.Active;
// Measure the current consumed by the ECU via clamp 15
// after 2 seconds (result is written to the Write Window)
Vector.CANoe.Threading.Execution.Wait(2000);
Vector.Tools.Output.WriteLine("ECU is consuming " + clamp30.AvgCurrent.Value + "mA");
}