public static void SwitchDutPower(int channel_no, PowerSupplyState PowerState) { try { if (!swConnected) { ConnectSwitch(); } if (PowerState == PowerSupplyState.PowerOn) { //close single channel sw.SetRelayWellA_byCH(channel_no, true); } else { //open single channel sw.SetRelayWellA_byCH(channel_no, false); } } catch (Exception) { throw; } }
public static void SwitchDutPower(int channel_no, PowerSupplyState PowerState) { try { if (!swConnected) { ConnectSwitch(); } if (PowerState == PowerSupplyState.PowerOn) { //close single channel sw.SetRelayWellA_byCH(channel_no, true); } else { //open single channel sw.SetRelayWellA_byCH(channel_no, false); } } catch (Exception) { Logger.PrintLog(MTKInstruments.sw, "", LogDetailLevel.LogRelevant); } }
private static double PerformVoltageTest(MultiMeter dmm, Agilent sw, int channel) { double value = -1.0; MultiMeter.volt volt_meas; sw.SetRelayWellA_byCH(channel, true); volt_meas = dmm.MeasureChannelVoltage(500, 500); value = volt_meas.average; Console.WriteLine(string.Format("Obtain the average result of PerformVoltageTest: {0} V on CH{1}", Math.Round(value, 4), channel)); return(value); }