MD Enable/disable motion (or Stall) detection

Command Command description Controller response Default
mode
(N/A - not available)
Service
Mode
(N/A - not available)
xMDy Enable/disable motion (or Stall) detection. 1 - enable, 0 - disable. Quadrature encoder must be connected to controller. Consider SE, MT and ET commands Sets error bit (code: Error 5) if encoder presence bit is not set by SE command. Clear Error bit by ER command. Yes Yes
 
SYNTAX  xMDy, where x - controller (axis) number.
PARAMETER y [number] 1 - enable, 0 - disable.
Range 0, 1.
DESCRIPTION: The command enables/disables motion (or Stall) detection. SE, MT and ET commands must preset the command parameters. If controller state is saved by SO command, current state becomes default. In this case no extra initialization is necessary, when controller power is on. While the controller performs one of the motion commands (MV, ST, SH), its internal counter also accumulates number of relative steps (delta micro steps). If it exceeds the threshold, which is set by the MT command, the controller reads correspondent number of relative Quadrature encoder counter steps (delta encoder steps). If the number of delta encoder steps exceeds the threshold, which is preset by ET command, the controller resets to zero both internal counters (delta micro steps and delta encoder steps) and repeats stall test circle again until stepper motor motion is being performed. If the number of delta encoder steps do not exceeds the threshold number, preset by ET command, the controller stops axis motion and generates motion error (3. Error: Stall detected). The case can be tested by x? command, which returns -1, if error code has been generated. All sequential motion commands remain disabled until error code is read by ER command.
Note: The command is disabled and generates error, if encoder presence bit is set to 0 (see SE command). Encoder presence bit can be tested (read) by xGP11 command.
RETURNS  none.
REL. COMMANDS SE, MT, ET
EXAMPLES: 5 MD 1 ||   3md 100  ||  123 mD32