MC_WriteDriveOperationMode

MC_WriteDriveOperationMode 1:

The function block MC_WriteDriveOperationMode initiates the change to the parameterized operation mode for a drive device linked to the NC axis.

MC_WriteDriveOperationMode 2: Inputs

VAR_INPUT
    Execute            : BOOL;
    DriveOperationMode : E_DriveOperationMode;
    Options            : ST_DriveOperationModeOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

DriveOperationMode

E_DriveOperationMode

Operation mode which is to be activated for the connected drive device.

Options

ST_DriveOperationModeOptions

Not implemented.

MC_WriteDriveOperationMode 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_WriteDriveOperationMode 4: Outputs

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

Name

Type

Description

Done

BOOL

TRUE if the command was executed without errors.

Busy

BOOL

The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order.

Error

BOOL

Becomes TRUE, as soon as an error occurs.

ErrorID

UDINT

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

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2