Exemple #1
0
        public void Circular_interpolation(ushort AxisNum, ushort[] AxisList, double[] target_pos, double[] Mid_pos, ushort posi_mode, double minV, double maxV, double Tacc, double Tdec, double stop)
        {
            int cricle = -1;//设置空间圆弧,圆弧圈数为0

            LTDMC.dmc_set_vector_profile_unit(CarNum, crd, minV, maxV, Tacc, Tdec, stop);

            LTDMC.dmc_arc_move_3points_unit(CarNum, crd, AxisNum, AxisList, target_pos, Mid_pos, cricle, posi_mode);
        }
Exemple #2
0
        private static void Arc(object a)    //public static void XY_move(double x_p,double y_p,double z_p, double Vel,double AccDec)
        {
            short Arc_co = 0;
            int   i      = 0;

            Global.Cdefault data = a as Global.Cdefault;


            double[] mid     = { data.Aposition[0] * Global.X.dEquiv, data.Aposition[1] * Global.Y.dEquiv, data.Aposition[2] * Global.Z.dEquiv };
            double[] target  = { data.Bposition[0] * Global.X.dEquiv, data.Bposition[1] * Global.Y.dEquiv, data.Bposition[2] * Global.Y.dEquiv };;
            ushort   AxisNum = 3;
            int      cricle  = -1;  //圈数:

            #region
            //    负数:表示此时执行的为空间圆弧插补
            //    该值的绝对减 1表示空间圆弧的圈数。如, 表示空间圆弧的圈数。如, -1即表示 0圈 空间圆弧, -2即表示 1圈空间圆弧…
            //    自然数:表示此时执行的为圆柱螺旋线插补
            //    该值表示螺旋线的圈数。如, 0即表示 0圈螺旋线插补, 1即表示 1圈螺旋线插补…
            //    posi_mode 运动模式, 0:
            //相对坐标模式, 1:
            #endregion
            while (LTDMC.dmc_check_done_multicoor(Global.Ccard1.CarNum, 0) == 0)
            {
                i++;
                Application.DoEvents();
            }
            //卡号                  轴数         轴号                              目标位置,  圈数     模式0:相对 1:绝对
            Arc_co = LTDMC.dmc_arc_move_3points_unit(Global.Ccard1.CarNum, 0, AxisNum, new ushort[] { Global.X.axis, Global.Y.axis, Global.Z.axis }, target, mid, cricle, 1);
            i      = 0;
            Thread.Sleep(1);
            while (LTDMC.dmc_check_done_multicoor(Global.Ccard1.CarNum, 0) == 0)
            {
                i++;
                Application.DoEvents();
            }
        }
Exemple #3
0
 public short dmc_arc_move_3points_unit(ushort AxisNum, double[] target, double[] mid)
 {
     return(LTDMC.dmc_arc_move_3points_unit(CarNum, 0, AxisNum, new ushort[] { Global.X.axis, Global.Y.axis, Global.Z.axis }, target, mid, 1, 1));
 }