MC_SetReferenceFlag

MC_SetReferenceFlag 1:

The MC_SetReferenceFlag function block changes the current axis is homed state of an axis. This function block is required when not the MC_Home function block but any other mechanisms are used to home the axis (e.g. move to a mechanical stop). In this case the home position can be set using the MC_SetActualPosition function block.

VAR_INPUT

VAR_INPUT
    Execute       : BOOL;
    ReferenceFlag : BOOL;
END_VAR

Execute : The command is executed with rising edge.

ReferenceFlag : New referenced state of the axis. TRUE = axis is homed. FALSE = axis is not homed

VAR_OUTPUT

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

Done : Becomes TRUE, if the command was issued successfully.

Error: Becomes TRUE, as soon as an error occurs.

ErrorID : Supplies the error number when the Error output is set.

VAR_IN_OUT

VAR_IN_OUT
    Axis : NCTOPLC_AXLESTRUCT;
END_VAR

Axis : Axis structure.

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v2.8

PC (i386)

TcMC.Lib