MC_Halt

MC_Halt 1:

This function block commands a motion stop. The axis is transferred to the state DiscreteMotion, until zero dynamics is reached.

Syntax

Definition:

FUNCTION_BLOCK MC_Halt
VAR_IN_OUT
    Axis           : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Execute        : BOOL;
    Deceleration   : LREAL;
    Jerk           : LREAL;
END_VAR
VAR_OUTPUT
    Done           : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorId        : UDINT;
END_VAR

MC_Halt 2: Inputs

Name

Type

Default

Description

Execute

BOOL

 

Trigger the command with rising edge.

Deceleration

LREAL

#Default

Maximum deceleration ([PosUnit]/s^2, positive)

Jerk

LREAL

#Default

Maximum jerk ([PosUnit]/s^3, positive)

MC_Halt 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_Halt 4: Outputs

Name

Type

Description

Done

BOOL

Zero dynamics has been reached, axis state is transferred to Standstill.

Busy

BOOL

Function block is not finished and new output values are to be expected.

Active

BOOL

Function block has active control on the axis.

CommandAborted

BOOL

Command is aborted by another command.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Further information

The function block MC_Halt is used to stop an axis with a defined deceleration ramp.

Unlike MC_Stop, the axis is not locked against further motion commands. This means that the MC_Halt command can be canceled either during the motion ramp or immediately afterward by another motion command.

If MC_Halt is applied to a coupled slave axis, the axis is automatically decoupled, and the halt command is then executed.

Effects on the axis state

MC_Halt 5:

Note on the migration from NC2 to MC3

Unlike the NC2 function block of the same name, the MC3 function block MC_Halt does not have an input that can be used to set the buffer mode. In MC3, any previous command is always aborted immediately by MC_Halt, which internally corresponds to the Aborting buffer mode.

In MC3, the parameterization of the dynamics is not possible with a value of 0 (implicit use of the last commanded dynamics).

Version information

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6