3.5.21 MC_WriteBoolParameter

Version 2.1 by xingzhi lin on 2025/12/04 00:57

Instruction format

InstructionMC_Stop(FB)
NameAxis stop instruction
Graphical performanceST performance
file:///C:/Users/111/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png

1764780900450-570.png

MC_Stop(

Axis: =

Execute: =

Deceleration: =

Jerk =

Done=>,

Busy=>,

Error=>,

ErrorID=>);

Related variables

Input and output variablesNameData typeEffective rangeInitial valueDescription
AxisAxisAXIS_REF_SM3--Mapped to an axis, i.e. an instance of AXIS_REF_SM3
Input variablesNameData typeEffective rangeInitial valueDescription
ExecuteExecution conditionBOOL[FALSE, TRUE]FALSEExecute at the rising edge
DecelerationDecelerationLREAL 0Deceleration of function block (u/s²)
JerkJerkLREAL 0Specified jerk [u/s³]
Output variablesNameData typeEffective rangeInitial valueDescription
DoneInstruction execution completedBOOL[FALSE, TRUE]FALSETRUE after execution is completed
BusyThe instruction is being executed.BOOL[FALSE, TRUE]FALSETRUE when the instruction is being executed
ErrorErrorBOOL[FALSE, TRUE]FALSEWhen an error occurs, set to TRUE
ErrorIDError IDSMC_ERRORSee SMC_ERROR0When 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.

1764780990184-190.png

1764780994871-846.png

Error description

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

Information

Note: Please see [3.8 Error ID description] to understand the relevant Error ID description.