MC_Stop
The MC_Stop FB leads to stopping of motion and takes the axis to the ‘Stopping’ state. The motion stop is always jerk limited with the constant set input ‘jerk’ for the braking rate.
It aborts every ongoing command by other motion FBs. Contrary to the definition of the state graph in the case of PLCopen, it has proven useful in practice to also be able to cancel an axis that is in the ‘Stopping’ state by commanding with another motion FB. The MC_Stop FB sets the ‘Done’ output as soon as the axis has stopped. However, the ‘Stopping’ state of the axis is retained for as long as the ‘Execute’ input is still TRUE.
Block diagram
Parameters of the FB
VAR_IN_OUT | |||
| Axis | AXIS_REF | Axis reference. |
VAR_INPUT | |||
| Execute | BOOL | Start the action at rising edge. |
| Deceleration | LREAL | Value of the deceleration (always positive). Range [1.0, 2147483647.0] |
| Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] |
VAR_OUTPUT | |||
| Done | BOOL | Zero velocity reached and execute is not True. Note: The output ‘Done’ indicates merely that the axis is stationary. The automatic axis state indicator remains initially in the state ‘Stopping’. Only in addition the input ‘Execute’ = FALSE does the automatic axis state indicator change over to the state ‘Standstill’. |
| Error | BOOL | Indicates if an error has occurred. |
| ErrorID | WORD | Error identification. |
Behavior 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.
- Within the FB, the ‘deceleration’ and ‘jerk’ input variables are monitored only for their value ranges. If they 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 within the motion controller. If a ‘deceleration’ value of more than getriebe[0].dynamik.a_max is commanded, the motion is nevertheless run, but the values are limited to the defined values and a warning is issued.
- Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the ‘jerk’. The limit transition to non-jerk-limited speed realization lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the ‘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 the ‘ErrorID’ 44008 (ERR_PO_AX_STOP_RETRIGGERD).