MC_ReadDriveOperationMode

MC_ReadDriveOperationMode 1:

The function block MC_ReadDriveOperationMode reads the currently active operation mode of the drive device linked to the NC axis.

MC_ReadDriveOperationMode 2: Inputs

VAR_INPUT
    Execute            : BOOL;
    Options            : ST_DriveOperationModeOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Options

ST_DriveOperationModeOptions

Not implemented.

MC_ReadDriveOperationMode 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_ReadDriveOperationMode 4: Outputs

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

Name

Type

Description

Done

BOOL

Becomes TRUE, if the command was completed successfully.

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. At the same time one of the outputs, Done, CommandAborted or Error, is set.

Error

BOOL

Becomes TRUE, as soon as an error occurs.

ErrorID

UDINT

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

DriveOperationMode

E_DriveOperationMode

Currently active operation mode of the connected drive device (E_DriveOperationMode).

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2