MC_SetHomingState

MC_SetHomingState 1:

This function block allows setting and resetting the IsPositionValid flag in the CDT_MCTOPLC_AXIS_STD. Optionally, it can also set the Position.

Syntax

Definition:

FUNCTION_BLOCK MC_SetHomingState
VAR_INPUT
    Axis           : Type_PtpSetHomingState;
    Execute        : BOOL;
    Position       : LREAL;
    Mode           : EHomingMode;
END_VAR
VAR_OUTPUT
    Done           : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorId        : UDINT;
END_VAR

MC_SetHomingState 2: Inputs

Name

Type

Default

Description

Axis

Type_PtpSetHomingState

 

Reference to the axis

Execute

BOOL

 

Trigger the command with rising edge.

Position

LREAL

#Invalid

New position value ([PosUnit])

Mode

EHomingMode

ForceIsHomed

Homing mode selection

MC_SetHomingState 3: Outputs

Name

Type

Description

Done

BOOL

Homing succeeded

Busy

BOOL

Function block is not finished and new output values are to be expected.

Active

BOOL

Function block has active control on the axis.

CommandAborted

BOOL

Command is aborted by another command.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Versionsinformation

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6