MC_Stop
The MC_Stop FB leads to a controlled motion stop and sets the axis to the “Stopping” state. The motion stop is always jerk-limited with the constant set input "jerk” for the deceleration rate.
If the optional parameters ”Deceleration” and “Jerk” are not specified or set to <= 0, the dynamic values are taken from the corresponding axis list.
It aborts every ongoing command by other motion FBs. Contrary to the definition of the state graph in PLCopen, it has proven useful in practice to also be able to abort an axis that is in the "Stopping“ state by commanding it with another motion FB. The MC_Stop FB sets the “Done” output as soon as the axis is at standstill. However, the “Stopping” state of the axis is retained for as long as the “Execute” input is still TRUE.
Block diagram
FB parameters
VAR_IN_OUT | ||
Variable name | Data type | Description |
Axis | AXIS_REF | Axis reference |
VAR_INPUT | ||
Variable name | Data type | Description |
Execute | BOOL | Starts the command on the rising edge. |
Deceleration | LREAL | Deceleration value. This value must be always be specified positive. Value range [0.0, 2147483647.0] |
Jerk | LREAL | Jerk value. This value must be always be specified positive. Value range [0.0, 2147483647.0] |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Done | BOOL | 0 velocity was reached. Caution: The "Done“ output merely indicates that the axis is stationary. The automatic axis state indicator remains initially in the STOPPING state. Only when the "Execute” input is also FALSE does the automatic axis state indicator change to the “STANDSTILL” state. |
Error | BOOL | Is TRUE if an error occurs in the FB. |
ErrorID | WORD | Error identifier |
Behaviour of the FB:
- The command for stopping the axis is issued only when the axis is in the “Standstill or “Continuous Motion” or “Discrete Motion” or “Synchronized Motion” or “Homing” state. If this is not the case, the “Error” output is set to FALSE and “ErrorID” indicates an error value that designates the state the axis is currently in.
- The “Deceleration” and “Jerk” input variables are monitored only for their value ranges in the FB. If the values are exceeded, an error number referring to the variable is output at the “ErrorID” output and “Error” is set to TRUE. Moreover, the deceleration value is limited in the motion controller. If a deceleration greater than getriebe[0].dynamik.a_max is commanded (P-AXIS-00008) is commanded, the motion is still executed. However, the values are limited to the parameterised values and a warning is issued.
- Practical values for jerk are between the minimum jerk of deceleration/100 s and the maximum jerk of deceleration/TA. The limit transition to non-jerk-limited velocity control lies at the minimum ramp time of TA. When the value is 0, the maximum ramp time in P-AXIS-00195 to P-AXIS-00198 is used to determine jerk.
- No new command can be sent when this FB is active. It is not retriggerable and therefore sets the "Error“ error output to TRUE and indicates at output “ErrorID” P-ERR-44008 (ERR_PO_AX_STOP_RETRIGGERD).