Ejemplo n.º 1
0
        public TestProcess(Form1 form)
        {
            formbase = form;

            testdoc = form.test;
            ovencfg = new IniHandler(Path.Combine(Util.basedir, "oven.ini"), "");

            trigger = new SwitchS200("S7214");
            //trigger1 = new SwitchSER("TRIGGER1");
            //trigger2 = new SwitchSER("TRIGGER2");
            //trigger3 = new SwitchSER("TRIGGER3");
            //trigger4 = new SwitchSER("TRIGGER4");
            wd1529 = new WD1529("WD1529");
            bath300A = new BathCTRJ("CTRJ-300A");
            bathN35A = new BathCTRJ("CTRJ-35A");
            if (!bath300A.bInUse && !Util.ISDEBUG)
                MessageBox.Show("连接CTRJ-300A 恒温槽失败,请检查串口设置后重试", "连接失败");
            if (!bathN35A.bInUse && !Util.ISDEBUG)
                MessageBox.Show("连接CTRJ-N35A 恒温槽失败,请检查串口设置后重试", "连接失败");

            if (!wd1529.bInUse || !trigger.bInUse)//!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse)
            {
                if (!wd1529.bInUse && !Util.ISDEBUG)
                    MessageBox.Show("连接FLUKE 1529失败,请检查串口设置后重试", "连接失败");
                //if ((!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse) && !Util.ISDEBUG)
                //    MessageBox.Show("连接开关检测模块失败,请检查串口设置后重试", "连接失败");

                if (!trigger.bInUse && !Util.ISDEBUG)
                    MessageBox.Show("连接S7-200 开关检测模块失败,请检查串口设置(9600/8/EVEN/1STOP)后重试, S7-200 地址为2,连接I0.0-I0.3)", "连接失败");
                if (!Util.ISDEBUG)
                    Process.GetCurrentProcess().Kill();
            }
        }
Ejemplo n.º 2
0
        public TestProcess(Form1 form)
        {
            formbase = form;

            testdoc = form.test;
            ovencfg = new IniHandler(Path.Combine(Util.basedir, "oven.ini"), "");

            trigger = new SwitchS200("S7214");
            //trigger1 = new SwitchSER("TRIGGER1");
            //trigger2 = new SwitchSER("TRIGGER2");
            //trigger3 = new SwitchSER("TRIGGER3");
            //trigger4 = new SwitchSER("TRIGGER4");
            wd1529   = new WD1529("WD1529");
            bath300A = new BathCTRJ("CTRJ-300A");
            bathN35A = new BathCTRJ("CTRJ-35A");
            if (!bath300A.bInUse && !Util.ISDEBUG)
            {
                MessageBox.Show("连接CTRJ-300A 恒温槽失败,请检查串口设置后重试", "连接失败");
            }
            if (!bathN35A.bInUse && !Util.ISDEBUG)
            {
                MessageBox.Show("连接CTRJ-N35A 恒温槽失败,请检查串口设置后重试", "连接失败");
            }

            if (!wd1529.bInUse || !trigger.bInUse)//!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse)
            {
                if (!wd1529.bInUse && !Util.ISDEBUG)
                {
                    MessageBox.Show("连接FLUKE 1529失败,请检查串口设置后重试", "连接失败");
                }
                //if ((!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse) && !Util.ISDEBUG)
                //    MessageBox.Show("连接开关检测模块失败,请检查串口设置后重试", "连接失败");

                if (!trigger.bInUse && !Util.ISDEBUG)
                {
                    MessageBox.Show("连接S7-200 开关检测模块失败,请检查串口设置(9600/8/EVEN/1STOP)后重试, S7-200 地址为2,连接I0.0-I0.3)", "连接失败");
                }
                if (!Util.ISDEBUG)
                {
                    Process.GetCurrentProcess().Kill();
                }
            }
        }