MC_ReadActualPosition_BkPlcMc

MC_ReadActualPosition_BkPlcMc 1:
MC_ReadActualPosition_BkPlcMc 2:

Available from version 3.0

The function block determines the current position of an axis.

MC_ReadActualPosition_BkPlcMc 3: Inputs

VAR_INPUT
    Enable:     BOOL;
END_VAR

Name

Type

Description

Enable

BOOL

Updating of the position value is initiated by a rising edge at this input.

MC_ReadActualPosition_BkPlcMc 4: Inputs/outputs

VAR_IN_OUT
    Axis:       AXIS_REF_BkPlcMc;
END_VAR

Name

Type

Description

Axis

AXIS_REF_BkPlcMc

Here, the address of a variable of type AXIS_REF_BkPlcMc should be transferred.

MC_ReadActualPosition_BkPlcMc 5: Outputs

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

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

Valid

BOOL

Successful determination of the actual position is indicated here.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Position

LREAL

[mm] The actual position.

Behavior of the function block

On a rising edge at Enable the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:

The actual position is determined and Valid is reported if these checks can be carried out without problems.

A falling edge at Enable clears all the pending output signals.

MC_ReadActualPosition_BkPlcMc 6:

This function block requires no time for executing its tasks. The output Busy will never assume the value TRUE and only exists for compatibility reasons.