SetParameter()

SetParameter() 1:

A set of parameters specific to this homing procedure is set.

Syntax:

METHOD SetParameter : HRESULT
VAR_INPUT
    fSetPosition                   : LREAL;
    fDetectionVelocityLimit        : LREAL;
    tDetectionVelocityTime         : TIME;
    fTorqueTolerance               : LREAL;
    bOptionsDisableDriveAccess     : BOOL;
    bOptionsInstantLagReduction    : BOOL;
    bOptionsTorquePolarityInverted : BOOL;
END_VAR

SetParameter() 2: Return value

Name

Type

Description

SetParameter

HRESULT

Return value with feedback on the success of the execution.

SetParameter() 3: Inputs

Name

Description

fSetPosition

The position to be assigned to the homing event.

fDetectionVelocityLimit

A velocity threshold for the detection of the homing event. For details see below.

tDetectionVelocityTime

A filter time for the detection of the homing event. For details see below.

fTorqueTolerance

A torque threshold for the detection of the homing event. For details see below.

bOptionsDisableDriveAccess

A TRUE prevents the underlying motion technology from using ADS communication via the fieldbus to change parameters of the controlled device and return to normal operation.

Notice This option must be used for most non-Beckhoff servo drives.

bOptionsInstantLagReduction

A TRUE causes the lag error to be cleared (set position := actual position) when the homing event is detected.

bOptionsTorquePolarityInverted

A TRUE causes an inverted evaluation of the torque.

Notice This inversion must be used if the signs of the torque and the direction of movement do not match. This may be caused by direction-reversing mechanics (gears, etc.).

SetParameter() 4:

The homing event

A mechanical block as a homing event is detected if at the same time the torque is below the torque limit by less than fTorqueTolerance and the actual velocity has been continuously below fDetectionVelocityLimit since tDetectionVelocityTime.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.35

PC or CX (x64, x86)

Tc3_PlasticFunctions v3.12.4.26 or higher