コード例 #1
0
        object ICloneable.Clone()
        {
            PolishDef pro = new PolishDef();

            pro.mode           = this.mode;
            pro.GoBackTimes    = this.GoBackTimes;
            pro.PolishSpeed    = this.PolishSpeed;
            pro.GoBackRange    = this.GoBackRange;
            pro.PolishInterval = this.PolishInterval;
            pro.LiftHeight     = this.LiftHeight;
            return(pro);
        }
コード例 #2
0
 public PolishPosdata()
 {
     pos       = new PointF4();
     polishDef = new PolishDef();
 }
コード例 #3
0
ファイル: LogicAPI.cs プロジェクト: zrh948264/Solder-Polish
        public bool exe(int x, int y, int z, int r, int t, float xPos, float yPos, float zPos, float rPos, float tPos, PolishDef polishDef, int PolishOpen)
        {
            switch (StartStep)
            {
            case 0:
                List <byte> temp = new List <byte>();
                temp.AddRange(Functions.NetworkBytes(1));
                temp.AddRange(Functions.NetworkBytes(polishDef.mode));
                temp.AddRange(Functions.NetworkBytes(1));

                temp.AddRange(Functions.NetworkBytes(x));
                temp.AddRange(Functions.NetworkBytes(y));
                temp.AddRange(Functions.NetworkBytes(z));
                temp.AddRange(Functions.NetworkBytes(r));
                temp.AddRange(Functions.NetworkBytes(t));

                temp.AddRange(Functions.NetworkBytes(xPos));
                temp.AddRange(Functions.NetworkBytes(yPos));
                temp.AddRange(Functions.NetworkBytes(zPos));
                temp.AddRange(Functions.NetworkBytes(rPos));
                temp.AddRange(Functions.NetworkBytes(tPos));

                temp.AddRange(Functions.NetworkBytes(polishDef.GoBackTimes));
                temp.AddRange(Functions.NetworkBytes(polishDef.PolishSpeed));
                temp.AddRange(Functions.NetworkBytes(polishDef.GoBackRange));
                temp.AddRange(Functions.NetworkBytes(polishDef.PolishInterval));
                temp.AddRange(Functions.NetworkBytes(polishDef.LiftHeight));
                temp.AddRange(Functions.NetworkBytes(PolishOpen));

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

            case 1:
                if (CommData.Succeed == true)
                {
                    FormMain.RunProcess.LogicData.RunData.polishtimes++;
                    StartStep        = 0;
                    CommData.Succeed = false;
                    return(true);
                }
                if (StartOT.ElapsedMilliseconds > 10000)
                {
                    StartStep = 0;
                }
                return(false);

            default:
                StartStep        = 0;
                CommData.Succeed = false;
                return(false);
            }
        }
コード例 #4
0
 public PolishPos()
 {
     Vpos      = new PointF2();
     polishDef = new PolishDef();
     pos       = new List <PolishPosdata>();
 }