private void OnSetDecel(SMMethodCall mc, Axis.AxisBase axis, double decel)
        {
            int    axisNumber = axis.Id + 1;
            double percent    = GetPercentage(axis, "Default Decel", decel);

            SendCommand(string.Format("DECEL({0})={1:F2}", axisNumber, percent));
            string ret = WaitForCommand();

            CheckOKReplied("SetDec", ret);
            mc.End();
        }
        private void OnHome(SMMethodCall mc, Axis.AxisBase axis)
        {
            // If Incremental
            //SendCommand(string.Format("ORGORD({0})", axisNumber));

            SendCommand(string.Format("ABSRST"));
            string ret = WaitForCommand();

            CheckOKReplied("WaitHomeDone", ret);
            mc.End();
        }
        // Single Axis move commands
        /// <summary>
        /// Move single axis in Relative
        /// </summary>
        /// <param name="mc"></param>
        /// <param name="axis"></param>
        /// <param name="dPos"></param>
        /// <param name="dSpeed"></param>
        private void OnMoveSingleAxisRel(SMMethodCall mc, Axis.AxisBase axis, double dPos, double dSpeed)
        {
            int    axisNumber = axis.Id + 1;
            double percent    = GetPercentage(axis, "Default Speed", dSpeed);

            dPos = U.ConvertFromInternal(Enums.UnitTypes.mm, dPos);
            SendCommand(string.Format("DRIVEI({0},{1:F2}),S={2:F2}", axisNumber, dPos, percent));
            string ret = WaitForCommand();

            CheckOKReplied("WaitMoveDone", ret);
            mc.End();
        }
        private void OnEnableAxis(SMMethodCall mc, Axis.AxisBase axis, bool bEnable)
        {
            string ret        = string.Empty;
            int    axisNumber = axis.Id + 1;

            if (bEnable)
            {
                SendCommand(string.Format("SERVO ON({0})", axisNumber));
                ret = WaitForCommand();
                CheckOKReplied("Enable", ret);
            }
            else
            {
                SendCommand(string.Format("SERVO FREE({0})", axisNumber));
                ret = WaitForCommand();
                CheckOKReplied("Enable", ret);
            }
            axis.Enabled = bEnable;
            mc.End();
        }