3.5.21 MC_WriteBoolParameter
Instruction format
| Instruction | MC_Stop(FB) | |
| Name | Axis stop instruction | |
| Graphical performance | ST performance | |
![]()
| MC_Stop( Axis: = Execute: = Deceleration: = Jerk = Done=>, Busy=>, Error=>, ErrorID=>); | |
Related variables
| Input and output variables | Name | Data type | Effective range | Initial value | Description |
| Axis | Axis | AXIS_REF_SM3 | - | - | Mapped to an axis, i.e. an instance of AXIS_REF_SM3 |
| Input variables | Name | Data type | Effective range | Initial value | Description |
| Execute | Execution condition | BOOL | [FALSE, TRUE] | FALSE | Execute at the rising edge |
| Deceleration | Deceleration | LREAL | 0 | Deceleration of function block (u/s²) | |
| Jerk | Jerk | LREAL | 0 | Specified jerk [u/s³] |
| Output variables | Name | Data type | Effective range | Initial value | Description |
| Done | Instruction execution completed | BOOL | [FALSE, TRUE] | FALSE | TRUE after execution is completed |
| Busy | The instruction is being executed. | BOOL | [FALSE, TRUE] | FALSE | TRUE when the instruction is being executed |
| Error | Error | BOOL | [FALSE, TRUE] | FALSE | When an error occurs, set to TRUE |
| ErrorID | Error ID | SMC_ERROR | See SMC_ERROR | 0 | When an error occurs, the Error ID is output. |
Function description
(1) This function block is to stop the movement of an axis under normal operation. When the axis is in the stopping status, any instruction to the axis is invalid;
(2) When the axis state is stopping, Execute is False, Done output status is True, and the axis state becomes Standstill;
(3) This function block can only run in the running state (Motion), and cannot run in other status;
(4) The start instruction is the rising edge start of Execute;
(5) When the process Busy executed by MC_Stop is valid, the MC_Stop instruction system is started again in the Errorstop state;
(6) In the Halt and Stop status, the acceleration can be adjusted by the axis variable bAvoidReversalOnHaltStop to avoid speed reversal. For specific analysis, refer to the MC_Halt instruction.
Sequence diagram
(1) The axis must be in the Motion instruction to run;
(2) Execute of the function block must have a rising edge condition;
(3) Done of the function block indicates that the instruction is executed normally;
(4) Busy of FB indicates that the current function block is being executed;
(5) CommandAborted of the function block indicates that the instruction is interrupted by other motion control instructions, at which time the flag bit is TRUE.
Example:
The corresponding flag bit changes in different timing operations when MC_MoveVelocity instruction and MC_Stop instruction are executed. The processing of CommandAborted is described as the sequence description in the figure below.


Error description
When MC_Stop has repetitive instructions running, the error flag Error is True and ErrorID is SMC_MS_AXI error.

