private bool InitInstrument() { dp832 = InstrumentMgr.Instance.FindInstrumentByName("DP832A[0]") as DP832A; tc720 = InstrumentMgr.Instance.FindInstrumentByName("TC720[0]") as TC720; if (dp832 != null) { dp832.SetOutput(DP832A.CHANNEL.CH3, false); Thread.Sleep(100); dp832.SetOutput(DP832A.CHANNEL.CH2, false); Thread.Sleep(100); dp832.SetOutput(DP832A.CHANNEL.CH1, false); Thread.Sleep(100); //设置过流保护 dp832.SetProtection(DP832A.OPMODE.OCP, DP832A.CHANNEL.CH1, ParaModelConfig.CMPL); Thread.Sleep(50); dp832.SetProtection(DP832A.OPMODE.OVP, DP832A.CHANNEL.CH1, 3.4); } //if (tc720 != null) //{ // tc720.WriteTemperature(Channel.CH1, ParaModelConfig.Temperature); //} return(dp832 != null && tc720 != null); }