Пример #1
0
 public SettingDataDef()
 {
     RunData    = new RunDataDef();
     vData      = new VDataDef();
     rinseData  = new CleanDef();
     slaverData = new SlaverData();
 }
Пример #2
0
        public bool exe(CleanDef cleanDef)
        {
            switch (StartStep)
            {
            case 0:
                List <byte> temp = new List <byte>();
                temp.AddRange(Functions.NetworkBytes(1));

                temp.AddRange(Functions.NetworkBytes(cleanDef.Cleanmode));
                temp.AddRange(Functions.NetworkBytes(cleanDef.CleanPos_X));
                temp.AddRange(Functions.NetworkBytes(cleanDef.CleanPos_Z));
                temp.AddRange(Functions.NetworkBytes(cleanDef.CleanPos_R));
                temp.AddRange(Functions.NetworkBytes(cleanDef.GoBackTimes));
                temp.AddRange(Functions.NetworkBytes(cleanDef.CleanSpeed));
                temp.AddRange(Functions.NetworkBytes(cleanDef.GoBackRange));
                temp.AddRange(Functions.NetworkBytes(cleanDef.CleanInterval));

                CommData = new BaseData(Addr, temp.ToArray());
                movedriverZm.WriteRegister(CommData);
                StartOT.Restart();
                StartStep = 1;
                return(false);

            case 1:
                if (CommData.Succeed == true)
                {
                    StartStep        = 0;
                    CommData.Succeed = false;
                    return(true);
                }
                if (StartOT.ElapsedMilliseconds > 10000)
                {
                    StartStep = 0;
                }
                return(false);

            default:
                StartStep        = 0;
                CommData.Succeed = false;
                return(false);
            }
        }