Ejemplo n.º 1
0
 public int RelArc2CA(int axis1, int axis2, double center1, double center2, double angle)
 {
     _CheckAxisEnable(axis1, "RelArc2CA");
     _CheckAxisEnable(axis2, "RelArc2CA");
     lock (ml)
     {
         int opt = HTM.ArcCa(axis1, axis2, center1, center2, angle, 1.0, HTM.MotionMode.RS);
         if (0 != opt)
         {
             return((int)ErrorDef.InvokeFailed);
         }
         return((int)ErrorDef.Success);
     }
 }
Ejemplo n.º 2
0
 public int RelArc2CA_P(int axis1, int axis2, double center1, double center2, double angle, JFMotionParam mp)
 {
     _CheckAxisEnable(axis1, "RelArc2CA_P");
     _CheckAxisEnable(axis2, "RelArc2CA_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.ArcCa(axis1, axis2, center1, center2, angle, 1.0, HTM.MotionMode.RS, ref _mp);
         if (0 != opt)
         {
             return((int)ErrorDef.InvokeFailed);
         }
         return((int)ErrorDef.Success);
     }
 }