Esempio n. 1
0
        public void Initial()
        {
            WorkBook workBook = new  WorkBook();

            workBook.AddSheet(SheetName.Valve1Weight.ToString());
            workBook.AddSheet(SheetName.Valve2Weight.ToString());
            workBook.AddSheet(SheetName.X轴.ToString());
            workBook.AddSheet(SheetName.Y轴.ToString());
            workBook.AddSheet(SheetName.XY轴联动.ToString());
            workBook.AddSheet(SheetName.Z轴.ToString());

            ICPKable cpk;

            cpk = new Valve1WeightCPK(workBook.FindSheetByName(SheetName.Valve1Weight.ToString()), this.Prm);
            this.cpkDicAdd(typeof(Valve1WeightCPK).Name, cpk);

            cpk = new Valve2WeightCPK(workBook.FindSheetByName(SheetName.Valve2Weight.ToString()), this.Prm);
            this.cpkDicAdd(typeof(Valve2WeightCPK).Name, cpk);

            cpk = new AxisXCPK(workBook.FindSheetByName(SheetName.X轴.ToString()), this.Prm);
            this.cpkDicAdd(typeof(AxisXCPK).Name, cpk);

            cpk = new AxisYCPK(workBook.FindSheetByName(SheetName.Y轴.ToString()), this.Prm);
            this.cpkDicAdd(typeof(AxisYCPK).Name, cpk);

            cpk = new AxisXYCPK(workBook.FindSheetByName(SheetName.XY轴联动.ToString()), this.Prm);
            this.cpkDicAdd(typeof(AxisXYCPK).Name, cpk);

            cpk = new AxisZCPK(workBook.FindSheetByName(SheetName.Z轴.ToString()), this.Prm);
            this.cpkDicAdd(typeof(AxisZCPK).Name, cpk);
        }
Esempio n. 2
0
        private void btnAxisXYTeach1_Click(object sender, EventArgs e)
        {
            this.txtXYStartX.Text = Machine.Instance.Robot.PosX.ToString("F3");
            this.txtXYStartY.Text = Machine.Instance.Robot.PosY.ToString("F3");

            AxisXYCPK cpk = CPKMgr.Instance.FindByName(typeof(AxisXYCPK).Name) as AxisXYCPK;

            if (cpk != null)
            {
                cpk.Start = new PointD(double.Parse(this.txtXYStartX.Text), double.Parse(this.txtXYStartY.Text));
            }
        }
Esempio n. 3
0
        private void btnAxisXYGoTo2_Click(object sender, EventArgs e)
        {
            Result res = Result.OK;

            res = Machine.Instance.Robot.MovePosZAndReply(double.Parse(this.txtPosZ3.Text));
            if (!res.IsOk)
            {
                return;
            }
            AxisXYCPK cpk = CPKMgr.Instance.FindByName(typeof(AxisXYCPK).Name) as AxisXYCPK;

            if (cpk != null)
            {
                res = CpkMove.MoveToPosSlowly(double.Parse(this.txtXYEndX.Text), double.Parse(this.txtXYEndY.Text));
                if (!res.IsOk)
                {
                    return;
                }
            }
        }