MC_FinishHoming

MC_FinishHoming 1:

The MC_FinishHoming function block completes a successful homing sequence and ensures that modified parameters are reset to their original values. The axis leaves the homing state.

MC_FinishHoming 2:

To complete a homing sequence (not when using passive homing functions exclusively) it is necessary to call a finalizing FB.

MC_FinishHoming 3: Inputs

VAR_INPUT
    Execute      : BOOL;
    Distance     : LREAL;
    Velocity     : LREAL;
    Acceleration : LREAL;
    Deceleration : LREAL;
    Jerk         : LREAL;
    BufferMode   : MC_BufferMode;
    Options      : ST_Home_Options2;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Distance

LREAL

Distance by which the axis moves away from the current position.

Velocity

LREAL

Maximum travel velocity (>0).

Acceleration

LREAL

Acceleration (≥0); if the value is 0, the standard acceleration from the axis configuration for the XAE TwinCAT Engineering environment is used.

Deceleration

LREAL

Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration for the XAE TwinCAT Engineering environment is used.

Jerk

LREAL

Jerk (≥0). If the value is 0, the standard jerk from the axis configuration for the XAE TwinCAT Engineering environment is used.

BufferMode

MC_BufferMode

Currently not implemented

Options

ST_Home_Options2

DisableDriveAccess: Set to FALSE for Beckhoff drives, usually to TRUE for third-party drives (see info).

MC_FinishHoming 4:

If DisableDriveAccess = TRUE, the user is responsible for modifying and reconstructing required drive parameters. The parameters required for the intended homing sequence must be agreed with the manufacturer of the third-party drive.

MC_FinishHoming 5:/MC_FinishHoming 6: Inputs/Outputs

VAR_IN_OUT
    Axis      : AXIS_REF;
    Parameter : MC_HomingParameter;
END_VAR

Name

Type

Description

Axis

AXIS_REF

Axis data structure of the type AXIS_REF, which uniquely addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state.

Parameter

MC_HomingParameter

Data structure of the type MC_HomingParameter, which must be transferred from function block to function block over the entire homing sequence.

MC_FinishHoming 7: Outputs

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

Name

Type

Description

Done

BOOL

Becomes TRUE if the command was completed successfully.

Busy

BOOL

The Busy output becomes TRUE when the command is started with Execute and remains TRUE for as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, Done, CommandAborted, or Error, is set.

CommandAborted

BOOL

Becomes TRUE, if the command could not be fully executed.

Error

BOOL

Becomes TRUE as soon as an error occurs.

ErrorID

UDINT

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