We don’t have any diagrams created.
3 states are temporary states.
- MOVING will only remain so during a motion profile and will end after the motion profile is complete and settling criteria has been met. (Note Steaming motion and Velocity moves will keep you in MOVING indefinitely.)
- STOPPING should only last StopTime. (Triggered Modify leaves you in the MOVING state.)
- STOPPING_ERROR should only last EStopTime or for the EStopModify Deceleration period.
I recommend letting these complete before doing other actions.
Stable States - IDLE, STOPPED, ERROR
- Idle is just the default/neutral/ready state.
- STOPPED will allow you to RESUME() the motion or start new moves. I recommend ClearFaults if you don’t intend to resume. You can’t do some things like PositionSets while stopped.
- ERROR indicates you need to ClearFaults() or better yet figure out why you are in an error state with SourceGet() and respond intelligently to error.
To get from STOPPED/ERROR to MOVING, consider the following helper.
public static void ReadyAxis(Axis axis)
//Ensure Axis isn't moving.
axis.MotionDoneWait(Convert.ToInt32(axis.StopTimeGet() * 1000)); // Wait Stop Time and check again.
RSIState state = axis.StateGet();
if ((state == RSIState.RSIStateSTOPPING_ERROR) || (state == RSIState.RSIStateSTOPPING))
axis.MotionDoneWait(Convert.ToInt32(axis.StopTimeGet() * 1000));
ClearFaults(axis); // Clear Axis Faults.
if (!axis.AmpEnableGet()) // Enable Axis if needed.
This function doesn’t care what is going on. It will interrupt motion, wait for actions to complete, Abort, and Enable as appropriate. You may want to instead report states/sources to user, intelligently decide if a motion should be aborted, handle multiaxis objects, etc.