Пример #1
0
 public void Init(SignalListDef _SL, DOnInsert _OnInsert)
 {
     SL         = _SL;
     OnInsert   = _OnInsert;
     sgWorkPars = new SGWorkPars();
     propertyGrid1.SelectedObject = sgWorkPars;
     timer1.Interval = Convert.ToInt32(ParAll.ST.Defect.Some.Period);
     SGSet.SaveParsToDB();
 }
Пример #2
0
 public JWorkSGSOP(SGWorkPars _tsDefSG, Bank _bank, SignalListDef _SL, DOnStatus _OnStatus = null)
 {
     tsDefSG             = _tsDefSG;
     bank                = _bank;
     SL                  = _SL;
     OnStatus            = _OnStatus;
     IsComplete          = false;
     J.Add(jAlarm        = new JAlarmList());
     sgSet               = new SGSet(_SL, pr);
     J.Add(jDemagnetizer = new JDemagnetizer(ParAll.ST.Defect.Demagnetizer, ParAll.CTS.DemagnetizerTS, false));
 }
Пример #3
0
 public JWorkSG(Bank _bank, SignalListDef _SL, ILCard502 _lcard, bool _restart, DOnStatus _OnStatus = null)
 {
     bank       = _bank;
     SL         = _SL;
     restart    = _restart;
     OnStatus   = _OnStatus;
     IsComplete = false;
     sgSet      = new SGSet(_lcard, _SL, pr);
     SGSet.SaveParsToDB();
     J.Add(jDemagnetizer = new JDemagnetizer(ParAll.ST.Defect.Demagnetizer, ParAll.CTS.DemagnetizerTS, false));
 }
Пример #4
0
        private void checkBox1_Click(object sender, EventArgs e)
        {
            if (checkBox1.Checked)
            {
                Clear();
                sgSet = new SGSet(SL, pr);
                if (checkBox2.Checked)
                {
                    jDemagnetizer.Start(0);
                }
                if (checkBox3.Checked)
                {
                    string ret = sgSet.StartGSPF();
                    if (ret != null)
                    {
                        prstat(ret);
                        Reset();
                        checkBox1.Checked = false;
                        checkBox1.Text    = checkBox1.Checked ? "Выключить" : "Включить";
                        return;
                    }
                }
                label2.Text = sgSet.CheckDTypeSize()?null:"Датчики не соответствуют типоразмеру";

                SolidGroupPars sgpars = ParAll.SG;
                L502Ch[]       MCh    = new L502Ch[6]
                {
                    sgpars.Sensor_I,
                    sgpars.Sensor_B,
                    sgpars.Sensor_U,
                    sgpars.Sensor_D0,
                    sgpars.Sensor_D1,
                    sgpars.Sensor_D2
                };
                sgSet.StartL502(MCh);
                checkBox2.Enabled = false;
                checkBox3.Enabled = false;
                timer1.Enabled    = true;
            }
            else
            {
                pr("3 " + (checkBox1.Checked ? "true" : "false"));
                timer1.Enabled = false;
                Reset();
            }
            checkBox1.Text = checkBox1.Checked ? "Выключить" : "Включить";
        }
Пример #5
0
        public void Finish()
        {
            bank.SGLastData = true;
            BankZoneData z = bank.GetNextZoneSG();

            if (z != null)
            {
                string lret;
                SGSet.SaveToDb(bank.SGData, z.size, out lret);
                if (lret != null)
                {
                    prsl(1, lret);
                }
            }
            IsComplete = true;
            foreach (IJob job in J)
            {
                job.Finish();
            }
            Dispose();
        }