MC_Stop (FB)¶
FUNCTION_BLOCK MC_Stop
MC_Stop places the axis in the stopping state.
As a result, currently running motions of function block
instances are aborted.
(The only exception is a running MC_Stop instance, which is not
aborted. Instead, the just started MC_Stop instance returns an error.)
As long as the axis is in the stopping state, no other instance can
execute a motion on it.
If the axis reaches the velocity value zero, the Done output is set
to TRUE. As long as the Execute input is TRUE, the axis
remains in the stopping state.
If Execute goes to FALSE and the Done output is TRUE,
the axis enters the standstill state.
Hint
In versions before CODESYS V3.5 SP4, the behavior was such that the axis went from stopping to standstill as soon as the velocity value reached zero.
Example
Use ofMC_StopThe illustration shows how theFB2instance of the typeMC_Stopis combined with theFB1instance of the type MC_MoveVelocity.
The rotary axis is ramped down by
FB2.The axis does not execute any motion commands as long as
FB2.ExecuteisTRUE.
FB1outputs an error message indicating that theFB2instance is active.![]()
- InOut:
Scope
Name
Type
Comment
Inout
AxisReference to the axis
Input
ExecuteBOOLTRUE: Starts execution on rising edge.DecelerationLREALMaximum deceleration, positive, in [u/s²]
JerkLREALMaximum jerk, positive, in [u/s³]
Output
DoneBOOLTRUE: The axis has reached the velocity 0.BusyBOOLTRUE: Function block is in operation.ErrorBOOLTRUE: An error has occurred.ErrorIDSMC_ERRORError identification