MC_Power

MC_Power 1:

The function block is used to switch the software enable of an axis. Enable can be activated for both directions of travel or only one direction. At "Status" output operational readiness of the axis is indicated.

A velocity override influences the velocity of all travel commands by a specified percentage.

Depending on the drive type, "Status" also signals operational readiness of the drive. Digital drives provide feedback on operational readiness, while analog drives are unable to indicate their operational readiness. In the latter case Status only indicated operational readiness of the control side.

MC_Power 2:

In addition to software enable it may be necessary to activate a hardware enable signal in order to enable a drive. This signal is not influenced by MC_Power and must be activated separately by the PLC.

MC_Power 3: Inputs

VAR_INPUT
    Enable          : BOOL; (* B *)
    Enable_Positive : BOOL; (* E *)
    Enable_Negative : BOOL; (* E *)
    Override        : LREAL (* V *) := 100.0; (* in percent - Beckhoff proprietary input *)
    BufferMode      : MC_BufferMode; (* V *)
    Options         : ST_PowerOptions;
END_VAR

Name

Type

Description

Enable

BOOL

General software enable for the axis.

Enable_Positive

BOOL

Feed enable in positive direction. Only takes effect if Enable = TRUE.

Enable_Negative

BOOL

Feed enable in negative direction. Only takes effect if Enable = TRUE.

Override

LREAL

Velocity override in % for all movement commands. (0 ≤ Override ≤ 100.0)

BufferMode

MC_BufferMode

This is evaluated when "Enable" is reset. MC_Aborting mode leads to immediate deactivation of the axis enable. Otherwise, e.g. in "MC_Buffered" mode, the function block waits until the axis no longer executes a command.

Options

ST_PowerOptions

Not implemented.

See also: General rules for MC function blocks

MC_Power 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_Power 5: Outputs

VAR_OUTPUT
    Status  : BOOL; (* B *)
    Busy    : BOOL; (* V *)
    Active  : BOOL; (* V *)
    Error   : BOOL; (* B *)
    ErrorID : UDINT; (* E *)
END_VAR

Name

Type

Description

Status

BOOL

TRUE when the axis is ready for operation.

Busy

BOOL

TRUE, as long as the function block is called with Enable = TRUE.

Active

BOOL

Indicates that the command is executed.

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