Example #1
0
 public int RelMove(int axis, double distance)
 {
     _CheckAxisEnable(axis, "RelMove");
     lock (ml)
     {
         HTM.MOTION_PARA mp = new HTM.MOTION_PARA()
         {
             vStart  = _motionParams[axis].vs,
             vMax    = _motionParams[axis].vm,
             vEnd    = _motionParams[axis].ve,
             acc     = _motionParams[axis].acc,
             dec     = _motionParams[axis].dec,
             sFactor = _motionParams[axis].curve,
             timeout = double.MaxValue
         };
         int opt = HTM.Move(axis, distance, 1.0, HTM.MotionMode.RS, ref mp);
         if (0 != opt)
         {
             return((int)ErrorDef.InvokeFailed);
         }
         return((int)ErrorDef.Success);
     }
 }