Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void InitInstruments()
        {
            strMsg = "正在进行设备连接操作,请稍等 . . .";
            ShowMsg(strMsg, true);
            try
            {
                if (DP832A.Init(cfg.DP832ACom))
                {
                    DP832A.SetOutput(DP832A.CHANNEL.CH3, false);
                    Thread.Sleep(100);
                    DP832A.SetOutput(DP832A.CHANNEL.CH2, false);
                    Thread.Sleep(100);
                    DP832A.SetOutput(DP832A.CHANNEL.CH1, false);
                    Thread.Sleep(100);

                    //设置过流保护
                    DP832A.SetProtection(DP832A.OPMODE.OCP, DP832A.CHANNEL.CH1, 0.4);
                    Thread.Sleep(50);
                    DP832A.SetProtection(DP832A.OPMODE.OVP, DP832A.CHANNEL.CH1, 3.5);
                    DP832A.SetProtection(DP832A.OPMODE.OCP, DP832A.CHANNEL.CH2, 1);
                    Thread.Sleep(50);
                    DP832A.SetProtection(DP832A.OPMODE.OVP, DP832A.CHANNEL.CH2, 3.5);
                }
                MS9740A        = new MS9740A(cfg.MS9740AGPIB);
                Inst_PAM4_Bert = new Inst_PAM4_Bert(cfg.BertCom);

                Inst_PAM4_Bert.remoteControl();
                TC720.Init(cfg.TC720Com);

                kesight_N1902D.Init();
                ShowMsg("设备连接已完成", true);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message, false);
                return;
            }
        }