How STOP Events work
Resuming Motion after STOP Events![](../images/sa1_03.gif)
When a motion supervisor sees a STOP event (generated by anything in the domains of motion supervisor's axes), the Feedrate is changed from NormalFeedrate to PauseFeedrate (MS[n].PauseFeedrate in the firmware). To set the PauseFeedrate or NormalFeedrate , use the method mpiMotionConfigSet(...). See sample code below:
|
/* Modify normal and pause feedrate values */
void modifyFeedrate(MPIMotion motion,
float normalFeedrate,
float pauseFeedrate)
{
MPIMotionConfig motionConfig;
long returnValue;
/* Get Motion Supervisor existing configurations */
returnValue = mpiMotionConfigGet(motion,
&motionConfig,
NULL);
msgCHECK(returnValue);
/* Modify normal and pause feedrate values */
motionConfig.normalFeedrate = normalFeedrate;
motionConfig.pauseFeedrate = pauseFeedrate;
/* Set the values in Motion Supervisor Configuration */
returnValue = mpiMotionConfigSet(motion,
&motionConfig,
NULL);
msgCHECK(returnValue);
}
|
|
How quickly the NormalFeedrate changes to PauseFeedrate is determined by the value of StartStopRate (which is set by motionConfig.decelTime.stop). Normally, PauseFeedrate is 0.0, which causes the motion to stop.
![](../images/sa1_04.gif)
When the motion is re-started (using mpiMotionAction(...,MPIActionRESUME) for STOP events), the Feedrate is changed back to the NormalFeedrate at the StartStopRate rate.
How Motion is Restarted after STOP Events
If Motion was stopped by |
Then Motion resumes after |
STOP Event |
mpiMotionAction(...MPIActionRESUME) is called |
PAUSE Event |
mpiMotionAction(...MPIActionRESUME) is called |
the limit (bit) is cleared |
Note that STOP events are latched by the firmware, while PAUSE events aren't. This means that if you configure a user limit to trigger a STOP event when an input (like Xcvr) is set (= 1), the Motion will go from NormalFeedrate to PauseFeedrate when that bit is set, and the Motion will stay at the PauseFeedrate until mpiMotionAction(...,MPIActionRESUME) is called.
If a limit is configured for a PAUSE event, the Motion will resume automatically after the bit is cleared (mpiMotionAction(...,MPIActionRESUME) is not needed).
|