MC_Home

MC_Home 1:

This function block commands the axis to perform the homing sequence. The homing sequence is added via the homing TCOM object. The calculated offset is stored in 'Active Homing Offset'. Offsets from MC_SetPosition are discarded.

Syntax

Definition:

FUNCTION_BLOCK MC_Home
VAR_IN_OUT
    Axis           : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Execute        : BOOL;
    Position       : LREAL;
END_VAR
VAR_OUTPUT
    Done           : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorId        : UDINT;
END_VAR

MC_Home 2: Inputs

Name

Type

Default

Description

Execute

BOOL

 

Trigger the command with rising edge.

Position

LREAL

#Default

Absolute position at the reference signal ([PosUnit])

MC_Home 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_Home 4: Outputs

Name

Type

Description

Done

BOOL

'Search home' sequence 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

Effects on the axis state

MC_Home 5:
Fig.2:

Notes on the migration from NC2 to MC3

In MC3, the MC_Home function block has fewer inputs than in NC2. The bCalibrationCam input, familiar from NC2, is now included as the input variable Signal in the homing object and can be linked directly there.

Version information

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