MC_Halt

MC_Halt 1:

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

In contrast to MC_Stop, the axis is not locked against further movement commands. The axis can therefore be restarted through a further command during the deceleration ramp or after it has come to a halt.

Motion commands can be applied to coupled slave axes, if this option was explicitly activated in the axis parameters. A motion command such as MC_Halt then automatically leads to decoupling of the axis, after which the command is executed. In this case the only available BufferMode is "Aborting".

MC_Halt 2: Inputs

VAR_INPUT
    Execute      : BOOL; 
    Deceleration : LREAL; 
    Jerk         : LREAL;
    BufferMode   : MC_BufferMode; 
    Options      : ST_MoveOptions; 
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Deceleration

LREAL

Deceleration
If the value is ≤ 0, the deceleration parameterized with the last Move command is used. For safety reasons MC_Halt and MC_Stop cannot be executed with weaker dynamics than the currently active motion command. The parameterization is adjusted automatically, if necessary.

Jerk

LREAL

Jerk
If the value is ≤ 0, the jerk parameterized with the last Move command takes effect.
For safety reasons MC_Halt and MC_Stop cannot be executed with weaker dynamics than the currently active motion command. The parameterization is adjusted automatically, if necessary.

BufferMode

MC_BufferMode

Is evaluated if the axis is already executing another command. MC_Halt becomes active after the current command or aborts it. Transition conditions from the current to the next command are also determined by the BufferMode. If the command is applied to a coupled slave axis, only the BufferMode "Aborting" is possible.
Special characteristics of MC_Halt: the BufferMode "Buffered" shows no effect, because the command is executed only at standstill. The blending modes "MC_BlendingNext" and "MC_BlendingLow" do not change the last target position, although they can result in a change in dynamics (deceleration) of the stop ramp. The modes "MC_BlendingPrevious" and "MC_BlendingHigh" extend the travel to the original target position. The stop ramp is only initiated when this position is reached (defined braking point).

Options

ST_MoveOptions

Data structure containing additional, rarely used parameters. The input can normally remain open.

See also: General rules for MC function blocks

MC_Halt 3: Inputs/outputs

VAR_IN_OUT
    Axis : AXIS_REF;
END_VAR

Name

Type

Description

Axis

AXIS_REF

Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state.

MC_Halt 4: Outputs

VAR_OUTPUT
    Done           : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorID        : UDINT;
END_VAR

Name

Type

Description

Done

BOOL

TRUE if the axis has been stopped and is stationary.

Busy

BOOL

TRUE as soon as the command is started with "Execute" and as long as the function block is active. If "Busy" is FALSE, the function block is ready for a new order. At the same time one of the outputs "CommandAborted" or "Error" is set.

Active

BOOL

Indicates that the command is executed. If the command was buffered, it becomes active once a running command is completed.

CommandAborted

BOOL

TRUE if the command could not be executed completely. The axis was stopped or the current command was replaced by another Move command.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.

See also: General rules for MC function blocks

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2