MC_Stop

The MC_Stop function block commands a controlled motion stop and transitions the axis to the 'Stopping' state.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference. | |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge of the Execute input, all other inputs are read and the function block becomes operational. If an input needs to be modified, the value will have to be changed and the Execute input will have to be re-triggered. | FALSE |
| E | Deceleration | LREAL | Value of the deceleration in user units/second^2 (deceleration is applicable with opposite signs of torque and velocity.) | LREAL#0.0 |
| E | Jerk | LREAL | Not supported; reserved for future use. Value of the jerk in [user units / second^3]. | LREAL#0.0 |
| VAR_OUTPUT | ||||
| B | Done | BOOL | The Done output is set to TRUE when the commanded action has completed successfully. If another function block takes control before the action is completed, the Done output will never become TRUE. This output is reset when Execute becomes FALSE. | |
| E | Busy | BOOL | For function blocks with Execute input, the Busy output is set to TRUE upon the rising edge of the Execute, and set to FALSE when Done, CommandAborted or Error outputs becomes TRUE. In the case of a function block with an Enable input, Busy indicates that the function block is operating, but may not be ready to provide valid outputs. | |
| E | CommandAborted | BOOL | The CommandAborted output is set to TRUE if the operation performed by the instance of the function block is aborted by another command. | |
| B | Error | BOOL | The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE. | |
| E | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE. | |
Notes
- For servo axes controlled by the FMK, MC_Stop command while the axis is in Torque mode and in motion (velocity > 0) will lead to jerky motion. In order to transition from torque mode to position mode, bring the velocity to 0 and then command a HoldPosition to bring to position mode.
- When 'Execute' is high, the axis remains in the ‘Stopping’ state and may not execute any other command. Other function blocks will generate the ErrorID 4370 (Motion Prohibited) if executed.
- While MC_Stop.Execute = TRUE, the axis will be in the stopping state and moves executed during this condition will be prohibited.
- After the axis has reached zero velocity, the Done output is set to TRUE.
- The axis remains in the 'Stopping' state as long as MC_Stop's 'Execute' is still TRUE or zero velocity is not yet reached. When 'Done' is TRUE and 'Execute' is FALSE, the axis goes to the 'StandStill' state.
- Please follow these recommendations to ensure proper operation:
- Do not allow Actions containing MC_Stop to discontinue execution while MC_STOP.Busy is high. If this occurs, the internal state of the function block will not be updated when the motion state changes from the stopping state. When the code (Action) runs again at a later time, motion in that Action that should legitimately run may report ErrorID 4370.
-
MC_Stop
should always be placed in actively scanned sections of code. Avoid placing
MC_Stop:
- Within an IF or other conditional statement.
- Inside a conditional Sequential Function Chart (SFC) Action, (such as N-type) which is only scanned when the step to which it is attached is active.
- Within a Jump to Label section of code on a POU.
- For VFDs
- EtherCAT and ProfiNet
-
Max of 10 Commands (Stop or Velocity) can be stored in the Command buffer at one time
-
Modbus RTU connection:
- Axis_REF: Logical axis number and driver type have to be defined
- Max of 10 Commands (Stop or Velocity) can be stored in the Command buffer at one time
Error Description
See the
Function Block ErrorID List
Example
Instance of
MC_Stop
executed while Servo Axis in motion.
The Logic Analyzer trace for the above example is shown below: