Example #1
0
 public int AbsArc2CE(int axis1, int axis2, double center1, double center2, double pos1, double pos2, bool isPositive)
 {
     _CheckAxisEnable(axis1, "AbsArc2CE");
     _CheckAxisEnable(axis2, "AbsArc2CE");
     lock (ml)
     {
         int opt = HTM.ArcCe(axis1, axis2, center1, center2, pos1, pos2, isPositive ? 1 : 0, 1.0, HTM.MotionMode.AS);
         if (0 != opt)
         {
             return((int)ErrorDef.InvokeFailed);
         }
         return((int)ErrorDef.Success);
     }
 }
Example #2
0
 public int AbsArc2CE_P(int axis1, int axis2, double center1, double center2, double pos1, double pos2, bool isPositive, JFMotionParam mp)
 {
     _CheckAxisEnable(axis1, "AbsArc2CE_P");
     _CheckAxisEnable(axis2, "AbsArc2CE_P");
     lock (ml)
     {
         HTM.MOTION_PARA _mp = new HTM.MOTION_PARA()
         {
             vStart  = mp.vs,
             vMax    = mp.vm,
             vEnd    = mp.ve,
             acc     = mp.acc,
             dec     = mp.dec,
             sFactor = mp.curve,
             timeout = double.MaxValue
         };
         int opt = HTM.ArcCe(axis1, axis2, center1, center2, pos1, pos2, isPositive ? 1 : 0, 1.0, HTM.MotionMode.AS, ref _mp);
         if (0 != opt)
         {
             return((int)ErrorDef.InvokeFailed);
         }
         return((int)ErrorDef.Success);
     }
 }