public override void UninitCalib()
        {
            do_gt2_cy?.SetDo(this, false, ignoreOrWaringOrError: null);

            if (Platform1 != null)
            {
                Platform1.EnterAuto(this).Home(2);
                Platform1.EnterAuto(this).MoveAbs("Wait", checkLimit: false);

                Platform1.ExitAuto();
            }


            if (Platform2 != null)
            {
                Platform2.EnterAuto(this).Home(2);
                Platform2.EnterAuto(this).MoveAbs("Wait", checkLimit: false);

                Platform2.ExitAuto();
            }


            PlatformCarrier?.EnterAuto(this).MoveAbs("Wait");

            do_clampy_cy.SetDo(this, false);

            PlatformCarrier?.ExitAuto();
        }
Пример #2
0
        public override void InitCalib()
        {
            do_clampy_cy?.SetDo(this, true);
            do_gt2_cy?.SetDo(this, false);

            PlatformCarrier?.EnterAuto(this).MoveAbs("Work");
        }
        public override void InitCalib()
        {
            do_gt2_cy?.SetDo(this, false, ignoreOrWaringOrError: null);
            do_clampy_cy.SetDo(this, ignoreOrWaringOrError: null);

            PlatformCarrier?.EnterAuto(this).MoveAbs("Work");
        }
Пример #4
0
        public override void UninitCalib()
        {
            PlatformUp?.EnterAuto(this).Jump("Wait", PlatformUpJumpHeight);
            PlatformCarrier?.EnterAuto(this).MoveAbs("Wait");

            PlatformUp?.ExitAuto();
            PlatformCarrier?.ExitAuto();
        }
Пример #5
0
        public override void UninitCalib()
        {
            do_clampy_cy?.SetDo(this, false);
            do_gt2_cy?.SetDo(this, false);

            Platform1?.EnterAuto(this).Jump("Wait", JumpHeight1);
            Platform2?.EnterAuto(this).Jump("Wait", JumpHeight2);

            PlatformCarrier?.EnterAuto(this).MoveAbs("Wait");
        }
Пример #6
0
        public override void DoCalib()
        {
            Platform1?.EnterAuto(this).MoveAbs("Wait");


            //上工站点位数据采集
            Log($"上平台Align点位标定\n------------------------------------------------------");
            List <PosXYZ> upAlignPos = new List <PosXYZ>();
            bool          isFirst    = true;

            foreach (var pos in AlignPosUp)
            {
                if (isFirst)
                {
                    isFirst = false;
                    Platform1?.EnterAuto(this).Jump(pos, 0);
                }
                else
                {
                    Platform1?.EnterAuto(this).Jump(pos, JumpHeight1);
                }

                upAlignPos.Add(pos);
                DataList.Add(pos.ToString());
                Log($"CurPos {pos.ToString()}", LogLevel.Info);
            }
            //复位平台1
            Platform1?.EnterAuto(this).Jump("Wait", JumpHeight1);
            Log($"上平台Align点位标定 完成\n------------------------------------------------------");
            OnCalibProgress(50);



            Platform2?.EnterAuto(this).MoveAbs("Wait");
            //下工站点位 数据采集
            Log($"下平台Align点位标定\n------------------------------------------------------");
            List <PosXYZ> downAlingPos = new List <PosXYZ>();

            isFirst = true;
            foreach (var pos in AlignPosDown)
            {
                if (isFirst)
                {
                    isFirst = false;
                    Platform2?.EnterAuto(this).Jump(pos, 0);
                }
                else
                {
                    Platform2?.EnterAuto(this).Jump(pos, JumpHeight2);
                }

                downAlingPos.Add(pos);
                DataList.Add(pos.ToString());
                Log($"CurPos {pos.ToString()}", LogLevel.Info);
            }

            Log($"下平台Align点位标定 完成\n------------------------------------------------------");


            //计算下平台GT2偏移
            Log($"下平台GT1GT2偏移标定\n------------------------------------------------------");
            if (Platform2GtOffsetCalibGT1 != null && Platform2GtOffsetCalibGT2 != null)
            {
                Platform2?.EnterAuto(this).Jump(Platform2GtOffsetCalibGT1, JumpHeight1);
                Platform2?.EnterAuto(this).Jump(Platform2GtOffsetCalibGT2, JumpHeight1);

                var gt1 = Platform2GtOffsetCalibGT1 as PosXYZ;
                var gt2 = Platform2GtOffsetCalibGT2 as PosXYZ;
                OutputPlatform2GtOffset   = gt2 - gt1;
                OutputPlatform2GtOffset.Z = 0;
            }


            //复位平台2
            Platform2?.EnterAuto(this).Jump("Wait", JumpHeight2);
            Log($"下平台GT1GT2偏移标定 完成\n------------------------------------------------------");


            //复位治具
            PlatformCarrier?.EnterAuto(this).MoveAbs("Wait");
            OnCalibProgress(100);


            //计算上下平台坐标转换
            {
                var ret = XyzPlarformCalibration.CalcAffineTransform(
                    upAlignPos.Select(p => new PosXYZ(p.X, p.Y, 0)).ToList(),
                    downAlingPos.Select(p => new PosXYZ(p.X, p.Y, 0)).ToList());

                Log($"计算上下平台转换矩阵:\r\n"
                    + $"{ret.Item1[0, 0]:F6},{ret.Item1[0, 1]:F6},{ret.Item1[0, 2]:F6},{ret.Item1[0, 3]:F6}\r\n"
                    + $"{ret.Item1[1, 0]:F6},{ret.Item1[1, 1]:F6},{ret.Item1[1, 2]:F6},{ret.Item1[1, 3]:F6}\r\n"
                    + $"{ret.Item1[2, 0]:F6},{ret.Item1[2, 1]:F6},{ret.Item1[2, 2]:F6},{ret.Item1[2, 3]:F6}\r\n"
                    + $"{ret.Item1[3, 0]:F6},{ret.Item1[3, 1]:F6},{ret.Item1[3, 2]:F6},{ret.Item1[3, 3]:F6}\r\n", LogLevel.Info);

                Log($"计算上下平台转换误差:\r\n{ret.Item2:F2}\r\n", LogLevel.Info);

                OutputTransForm = new TransformParams(ret.Item1);
            }

            Log($"GT1GT2偏移:\r\n{OutputPlatform2GtOffset}\r\n", LogLevel.Info);
        }
Пример #7
0
 public override void InitCalib()
 {
     PlatformCarrier?.EnterAuto(this).MoveAbs("Work");
 }