MC_Stop

MC_Stop 1:

The function block MC_Stop stops an axis with a defined deceleration ramp and locks the axis against other motion commands. The function block is therefore suitable for stops in special situations, in which further axis movements are to be prevented.

At the same time the axis is blocked for other motion commands. The axis can only be restarted once the Execute signal has been set to FALSE after the axis has stopped. A few cycles are required to release the axis after a falling edge of Execute. During this phase the "Busy" output remains TRUE, and the function block has to be called until "Busy" becomes FALSE.

The locking of the axis is canceled with an MC_Reset.

Alternatively, the axis can be stopped with MC_Halt without locking. MC_Halt is preferable for normal movements.

MC_Stop 2: Inputs

VAR_INPUT
    Execute      : BOOL; 
    Deceleration : LREAL; 
    Options      : ST_MoveOptions; 
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge. The axis is locked during the stop. The axis can only be restarted once the Execute signal has been set to FALSE after the axis has stopped.

Deceleration

LREAL

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

Options

ST_MoveOptions

Data structure (ST_MoveOptions) containing additional, rarely used parameters. The input can normally remain unused.

MC_Stop 3:

See also: General rules for MC function blocks.

MC_Stop 4: 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_Stop 5: 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 command is processed. If "Busy" is FALSE, the function block is ready for a new order. "Busy" remains TRUE as long as the axis is locked. The axis is only unlocked and "Busy" becomes FALSE when Execute is set to FALSE.

Active

BOOL

Indicates that the function block controls the axis. Remains TRUE as long as the axis is locked. The axis is only unlocked and "Active" becomes FALSE when Execute is set to FALSE.

CommandAborted

BOOL

TRUE if the command could not be executed completely.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

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

MC_Stop 6:

See also: General rules for MC function blocks.

Requirements

Development environment

PLC libraries to include

TwinCAT 3.1.4024.11

Tc3_DriveMotionControl