The motion enable input is designed to halt motion even in the absence of firmware control. The input is directly connected to the CPU and the drive enable circuits in the ACR90x0.
The input is considered active when 5-24 VDC are across the two pins. If the input goes inactive, that inactive state is latched and the ACR9xx0 reacts by doing the following:
- Forcing the DAC outputs to zero.
- Blocking the step generation output.
The status of the motion enable input is shown in bit 5646, where active is a cleared or 0 state, and inactive is a set or 1 state.
When the enable input goes inactive, bit 5645 is set and latched until voltage is present again on the enable input and the DRIVE ON command is sent.
A typical recovery routine for this event would need to wait until the enable input is active, state 0, clear the kill all motion request bits for axes attached to the master, clear the kill all move request for master0 and re-enable all needed drives. The following is for a 2 axis recovery routine.
IF (NOT BIT 5646) THEN GOTO CLEARERROR : REM IF THE ENABLE INPUT IS ACTIVE, STATE 0 THEN GO ON
GOTO ERRORloop : REM LOOP BACK TO ERROR
CLR 8467 CLR 8499 : REM CLEAR THE KILL ALL MOTION FLAG
CLR 522 : REM CLEAR THE KILL ALL MOTION FLAG
DRIVE ON X Y : REM REENABLE THE DRIVES
If this routine is used in a non-motion program (prog8 - 15), the X and Y aliases aren't recognized outside the motion program; this could be replaced with:
DRIVE ON AXIS0 AXIS1 : REM REENABLE THE DRIVES
Pulling the motion enable input will not stop the programs from running. However, if motion is commanded when the motion enable input is opened (and the KAMR are set), the program are halted. Users can start programs again with either RUN PROG0 or from an HMI setting the Run Request Flag (bit 1032 for Prog0). To check program run status, bit 1024 is set when Prog0 is running.
Hence if a program is looping with motion, then users may rather use the HALT command (bit 1033 for Prog0) in the non-motion program to stop the program or PAUSE command (bit 1048 for Prog0).
JOG OFFSET NON-ZERO AFTER ENABLE OPEN
When you pull the enable input and any axis is in motion, the controller commands a stop via a JOG offset move at the hardware limit deceleration rate.
The deceleration ramp is in the Config Wizard's Fault screen and is the axis HLDEC setting.
After the motor stops, there would be a non-zero jog offset.
After re-enabling, to clear the jog offset, do a JOG RES on the axis.
It'll reset the jog offset to 0 and then add the difference to the interpolated position, that way you don't lose your position and have to re-home (which would also work but take the time to home).
Then, when you command it to go to a MOV (default move type is interpolated) position X50 it'll be at 50 (and the jog position will be 0).
9/22/22jh note added about jog offset