object ICloneable.Clone()
        {
            SolderDef pro = new SolderDef();

            pro.FrontLen   = this.FrontLen;
            pro.FrontSpeed = this.FrontSpeed;
            pro.BackLen    = this.BackLen;
            pro.BackSpeed  = this.BackSpeed;

            pro.FrontLen2   = this.FrontLen2;
            pro.FrontSpeed2 = this.FrontSpeed2;
            pro.BackLen2    = this.BackLen2;
            pro.BackSpeed2  = this.BackSpeed2;

            pro.FrontLen3   = this.FrontLen3;
            pro.FrontSpeed3 = this.FrontSpeed;
            pro.BackLen3    = this.BackLen3;
            pro.BackSpeed3  = this.BackSpeed3;

            pro.SendDelay  = this.SendDelay;
            pro.SendDelay2 = this.SendDelay2;
            pro.SendDelay3 = this.SendDelay3;

            pro.mode       = this.mode;
            pro.times      = this.times;
            pro.interval   = this.interval;
            pro.height     = this.height;
            pro.speed      = this.speed;
            pro.sendlen    = this.sendlen;
            pro.sendSpeed  = this.sendSpeed;
            pro.Backmode   = this.Backmode;
            pro.BackHeight = this.BackHeight;
            pro.LiftHeight = this.LiftHeight;

            return(pro);
        }
示例#2
0
 public SolderPosdata()
 {
     pos       = new PointF4();
     solderDef = new SolderDef();
     rinse     = new bool();
 }
示例#3
0
        public bool exe(int type, float xPos, float yPos, float zPos, float rPos, float tPos, SolderDef solderDef, int Rinse)
        {
            switch (StartStep)
            {
            case 0:
                List <byte> temp = new List <byte>();
                temp.AddRange(Functions.NetworkBytes(1));
                temp.AddRange(Functions.NetworkBytes(type));
                temp.AddRange(Functions.NetworkBytes(1));

                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));

                byte[] aaa        = BytesConverter.ObjToBytes(solderDef);
                byte[] tempdata   = temp.ToArray();
                byte[] _rinsedata = BitConverter.GetBytes(Rinse);

                for (int i = 0; i < _rinsedata.Length; i++)
                {
                    if (i % 2 == 0)
                    {
                        byte rdata = _rinsedata[i];
                        _rinsedata[i]     = _rinsedata[i + 1];
                        _rinsedata[i + 1] = rdata;
                    }
                }



                byte[] ndata = new byte[tempdata.Length + aaa.Length + _rinsedata.Length];

                tempdata.CopyTo(ndata, 0);
                aaa.CopyTo(ndata, tempdata.Length);
                _rinsedata.CopyTo(ndata, tempdata.Length + aaa.Length);


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

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

            default:
                StartStep        = 0;
                CommData.Succeed = false;
                return(false);
            }
        }
 public SolderPos()
 {
     Vpos      = new PointF2();
     solderDef = new SolderDef();
     pos       = new List <SolderPosdata>();
 }