MC_ReadActualPosition

MC_ReadActualPosition 1:

The actual axis position can be read with the function block. The actual position value is the position value that is returned from the drive amplifier to the axis.

MC_ReadActualPosition 2: Inputs

VAR_INPUT
    Enable : BOOL;
END_VAR

Name

Type

Description

Enable

BOOL

Reads the parameter once or cyclically depending on the ReadMode.

MC_ReadActualPosition 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_ReadActualPosition 4: Outputs

VAR_OUTPUT
    Valid    : BOOL;
    Busy     : BOOL;
    Error    : BOOL;
    ErrorID  : UDINT;
    Position : LREAL;
END_VAR

Name

Type

Description

Valid

BOOL

TRUE if the output "Position" has a valid value.

Busy

BOOL

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

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

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

Position

LREAL

Current axis position

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2