FB_HomeTp - General Information

Overview

Type:

Function block

Available as of:

V1.0.3.0

Inherits from:

-

Implements:

-

Versions:

Current version

Task

Homing an axis to a Touchprobe signal

Description

An axis i_ifDrive is moved to the reference position. The reference position of a Touchprobe signal is detected using a sensor that is connected to the input i_ifTouchProbe.

The reference position counts as detected, if the sensor changes from the condition "not assigned" to "assigned" in the indicated direction.

Four modes (input i_etMode) are supported for the homing:

o....PosEdge...: i_ifTouchProbe.Value = TRUE equates the condition "Sensor assigned" (normally open contact)

o....NegEdge...: i_ifTouchProbe.Value = FALSE equates the condition "Sensor assigned" (normally closed contact)

When starting the reference travel, the following cases are distinguished:

oCase 1: The input i_ifTouchProbe indicates the condition "Sensor not assigned" when the reference travel is started.

The axis moves to the parameterized direction until the respective Touchprobe signal reports the condition "Sensor assigned" (reference signal). The direction and definition of the condition "assigned" is defined by the input i_etMode. Afterwards the axis stops at the following position: "Position when the reference signal is given" + i_lrOffset.

oCase 2: The input i_ifTouchProbe indicates the condition "Sensor assigned" when the reference travel is started.

Two cases are distinguished:

oIf the input i_xRotativeSystem = FALSE, then the axis moves to the opposite direction instead of the direction defined by the input i_etMode until a TouchProbe signal detects the condition "Sensor not assigned". Then, the axis moves as described in Case 1.

oIf the input i_xRotativeSystem = TRUE, then the axis moves in the direction that was defined by the input i_etMode until the next respective TouchProbe signal provides the condition "Sensor assigned" (reference signal).

oCase 3: The hardware limit switch is active in whose direction the axis is supposed to move (the direction is defined by the input i_etMode)

The axis moves to the opposite direction instead of the direction that was defined by the input i_etMode until a TouchProbe signal provides the condition "Sensor assigned". Afterwards the axis moves for i_xRotativeSystem = FALSE like described in Case 2.

oCase 4: The hardware limit switch opposite to the axis' direction of motion (defined by the input i_etMode) is enabled.

Then, the axis moves until it is free and subsequently moves as described for case 1.

If the axis meets the hardware limit switch during the reference travel, in whose direction the axis shall move (defined by the input i_etMode), then the axis will behave like described in Case 3 after reaching the hardware limit switch.

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU.

A deactivated POU does not execute any actions.

i_ifDrive

IF_Drive

Input for the axis that shall be controlled.

i_ifTouchProbe

IF_TouchProbe

Digital measure input of the PacDrive system, into which the reference signal is fed.

i_etMode

ET_HomeTpMode

Reference mode

i_lrOffset

LREAL

Offset between sensor signal and reference point.

i_lrMaxTravel

LREAL

Maximum distance for referencing:

The movements into the direction of motion are defined by the input i_etMode until the hardware limit switch is enabled.

 The maximum distance will not be considered because the following movement in the opposite direction will be allowed for the maximum defined distance. For a graphical explanation of i_lrMaxTravel.

i_lrHomePosition

LREAL

Reference position at the end of the referencing.

i_lrVel

LREAL

Velocity (change of position) in units/s.

i_lrAcc

LREAL

Acceleration (change of velocity) in units/s2.

i_lrDec

LREAL

Deceleration (change of velocity) in units/s2.

i_lrJerk

LREAL

Jerk (change of acceleration/deceleration) in units/s3.

i_xHwLimitNeg

BOOL

Negative hardware limit switch (digital input of the PacDrive system)

Make contact (normally open).

i_xHwLimitPos

BOOL

Positive hardware limit switch input (digital input of the PacDrive system).

Make contact (normally open).

i_xRotativeSystem

BOOL

Rotative (endless) system.

i_xStart

BOOL

Starts referencing.

Output

Data type

Description

q_xActive

BOOL

TRUE: The POU is active and has to be executed further.

FALSE: The POU is inactive.

q_xReady

BOOL

TRUE: The POU is ready to operate and can accept user commands.

FALSE: The POU is not ready to accept user commands.

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

Event-triggered message which gives more detailed information on the diagnostic state.

q_lrPosition

LREAL

Axis reference position.

q_xMotionInstructionActive

BOOL

TRUE: The axis is processing a motion command. The output is also set if the motion command defines that the axis is at stand still, e.g. due to a standing master.

q_xHomeOk

BOOL

Axis stops at the reference position.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

9

The POU is disabled.

OK

HomingDone

222

Homing has been performed.

OK

Initializing

4

The POU is being initialized.

OK

WaitForNegEdgeOfTouchProbe

230

Waiting for negative edge of the Touchprobe signal.

OK

WaitForStart

5

Waiting for starting command.

OK

WaitForTouchProbeSignal

167

Waiting for Touchprobe signal.

OK

WaitUntilDisabled

8

Waiting until the POU is deactivated.

OK

WaitUntilLimitSwitchFree

217

Waiting until limit switch is free.

OK

WaitUntilStopped

159

Waiting until the drive has stopped.

DriveConditionInvalid

DriveNotReady

10

The drive is not ready for motion commands.

HomingFailed

HwLimitNegStillActive

275

HwLimitNeg is still active.

HomingFailed

HwLimitPosStillActive

276

HwLimitPos is still active.

HomingFailed

TouchProbeNotFound

231

No Touchprobe was found.

InputParameterInvalid

AccRange

12

Acc is outside the valid range.

InputParameterInvalid

DecRange

13

Dec is outside the valid range.

InputParameterInvalid

DriveInvalid

3

The connected drive is invalid.

InputParameterInvalid

JerkRange

14

Jerk is outside the valid range.

InputParameterInvalid

MaxTravelRange

215

MaxTravel is outside the valid range.

InputParameterInvalid

TouchProbeInvalid

163

The connected Touchprobe is invalid.

InputParameterInvalid

TouchProbeNotActive

166

The Touchprobe is not active.

InputParameterInvalid

TouchProbeVirtual

165

The connected Touchprobe is virtual.

InputParameterInvalid

UnknownMode

111

The Mode is indeterminable.

InputParameterInvalid

VelRange

11

Vel is outside the valid range.

LimitReached

HwLimitNegReached

219

Negative limit switch has been reached.

LimitReached

HwLimitPosReached

221

Positive limit switch has been reached.

UnexpectedProgramBehavior

UnexpectedFeedback

1

An unintended detected error occurred during execution.

UnexpectedProgramBehavior

UnknownState

2

The POU is in an undefined state.

AccRange

Enumeration name:

AccRange

Enumeration value:

12

Description:

Acc is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrAcc, an invalid value has been transferred.

The following must hold: 0 < i_lrAcc < drive parameter MaxAcc

For the valid value range for i_lrAcc, see output q_sMsg

DecRange

Enumeration name:

DecRange

Enumeration value:

13

Description:

Dec is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrDec, an invalid value has been transferred.

The following must hold: 0 < i_lrDec < drive parameter MaxAcc

For the valid value range for i_lrDec, see output q_sMsg

Disabled

Enumeration name:

Disabled

Enumeration value:

9

Description:

The POU is disabled.

The function block is disabled and executes no actions whatsoever. i_xEnable and q_xActive are set to FALSE

DriveInvalid

Enumeration name:

DriveInvalid

Enumeration value:

3

Description:

The connected drive is invalid.

Issue

Cause

Solution

-

At the input i_ifDrive, no drive was applied.

At the input i_ifDrive, a valid drive must be transferred.

-

The connected drive does not support all required functionalities.

Establish which functionalities are not supported by the drive by means of output q_sMsg.

Use a drive which supports all required functionalities.

DriveNotReady

Enumeration name:

DriveNotReady

Enumeration value:

10

Description:

The drive is not ready for motion commands.

Issue

Cause

Solution

-

The axis is not in position control.

Verify the state of the axis.

-

The parameter State of the SERCOS bus is not 4.

Set the SERCOS bus parameter PhaseSet to 4.

Verify the SERCOS bus for errors.

HomingDone

Enumeration name:

HomingDone

Enumeration value:

222

Description:

Homing has been performed.

The homing sequence has been completed successfully.

HwLimitNegReached

Enumeration name:

HwLimitNegReached

Enumeration value:

219

Description:

Negative limit switch has been reached.

Issue

Cause

Solution

-

The negative hardware limit switch has been found when searching the reference signal.

Verify the reference signal sensor.

Verify the signal at the input i_xSensor.

Verify the mode i_etMode.

-

While moving away from the positive limit switch, the negative limit switch was triggered.

Verify the sensors.

Verify the signals at the inputs i_xHwLimitNeg and i_xHwLimitPos.

HwLimitNegStillActive

Enumeration name:

HwLimitNegStillActive

Enumeration value:

275

Description:

HwLimitNeg is still active.

Issue

Cause

Solution

-

The negative limit switch (i_xHwLimitNeg = TRUE) is still enabled.

However, the maximum travel distance (i_lrMaxTravel) has been reached.

Verify the signal at the input i_xHwLimitNeg.

Verify the value for the maximum travel distance at the i_lrMaxTravel input.

Ensure that the sensor of the negative limit switch is not dirty.

HwLimitPosReached

Enumeration name:

HwLimitPosReached

Enumeration value:

221

Description:

Positive limit switch has been reached.

Issue

Cause

Solution

-

The positive hardware limit switch has been found when searching the reference signal.

Verify the reference signal sensor.

Verify the signal at the input i_xSensor.

Verify the mode i_etMode.

-

While moving away from the negative limit switch, the positive limit switch was triggered.

Verify the sensors.

Verify the signals at the inputs i_xHwLimitNeg and i_xHwLimitPos.

HwLimitPosStillActive

Enumeration name:

HwLimitPosStillActive

Enumeration value:

276

Description:

HwLimitPos is still active.

Issue

Cause

Solution

-

The positive limit switch (i_xHwLimitPos = TRUE) is still enabled.

However, the maximum travel distance (i_lrMaxTravel) has been reached.

Verify the signal at the input i_xHwLimitPos.

Verify the value for the maximum travel distance at the i_lrMaxTravel input.

Ensure that the sensor of the negative limit switch is not dirty.

Initializing

Enumeration name:

Initializing

Enumeration value:

4

Description:

The POU is being initialized.

The function block is being initialized and thus is not yet ready to receive commands at its inputs.

The function block will signalize that it is ready for operation with the signal q_xReady = TRUE.

JerkRange

Enumeration name:

JerkRange

Enumeration value:

14

Description:

Jerk is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrJerk, an invalid value has been applied.

At the input i_lrJerk, a value greater than 0 and smaller than or equal to Gc_lrMaxJerk must be transferred.

MaxTravelRange

Enumeration name:

MaxTravelRange

Enumeration value:

215

Description:

MaxTravel is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrMaxTravel, an invalid value has been applied.

At the input i_lrMaxTravel, a value greater than 0 must be transferred.

TouchProbeInvalid

Enumeration name:

TouchProbeInvalid

Enumeration value:

163

Description:

The connected Touchprobe is invalid.

Issue

Cause

Solution

-

The input i_ifTouchProbe is not connected with a valid Touchprobe.

Ensure that a valid Touchprobe has been transferred at the input i_ifTouchProbe.

TouchProbeNotActive

Enumeration name:

TouchProbeNotActive

Enumeration value:

166

Description:

The Touchprobe is not active.

Issue

Cause

Solution

-

The Touchprobe functionality of the input on a Lexium62 is not enabled.

Ensure that the parameter IOx_Mode of the input group (LXM62IO_InOutTP) has been set to Touchprobe / 1.

TouchProbeNotFound

Enumeration name:

TouchProbeNotFound

Enumeration value:

231

Description:

No Touchprobe was found.

Issue

Cause

Solution

-

The incorrect Touchprobe has been transferred to the function block.

Verify the affilation of the transferred Touchprobe by means to the physical sensor.

-

The sensor does not transmit a signal.

Verify the power supply of the sensor.

Ensure that the sensor is not covered.

Ensure that the sensor can be triggered by the mechanical system.

Verify the electrical connection of the sensor and the Touchprobe input.

TouchProbeVirtual

Enumeration name:

TouchProbeVirtual

Enumeration value:

165

Description:

The connected Touchprobe is virtual.

Issue

Cause

Solution

-

The used touchprobe is not real.

Ensure that the Touchprobe does not belong to a virtual device. (e.g. virtual Lexium62)

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

1

Description:

An unintended detected error occurred during execution.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

UnknownMode

Enumeration name:

UnknownMode

Enumeration value:

111

Description:

The Mode is indeterminable.

Issue

Cause

Solution

-

At the input i_etMode, an invalid value has been applied.

At the input i_etMode, an element of the enumeration ET_HomeTpMode must be applied.

UnknownState

Enumeration name:

UnknownState

Enumeration value:

2

Description:

The POU is in an undefined state.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

VelRange

Enumeration name:

VelRange

Enumeration value:

11

Description:

Vel is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrVel, an invalid value has been applied.

Apply a value greater than 0 and smaller than the axis parameter MaxVel to i_lrVel.

WaitForNegEdgeOfTouchProbe

Enumeration name:

WaitForNegEdgeOfTouchProbe

Enumeration value:

230

Description:

Waiting for negative edge of the Touchprobe signal.

The Touchprobe input is continuously checked for a negative edge.

WaitForStart

Enumeration name:

WaitForStart

Enumeration value:

5

Description:

Waiting for starting command.

The function block has completed its initialization and is waiting for a positive edge at the input i_xStart before continuing the processing.

WaitForTouchProbeSignal

Enumeration name:

WaitForTouchProbeSignal

Enumeration value:

167

Description:

Waiting for Touchprobe signal.

The Touchprobe signal is waited for while the axis is moved.

WaitUntilDisabled

Enumeration name:

WaitUntilDisabled

Enumeration value:

8

Description:

Waiting until the POU is deactivated.

The function block is disabled. All internal states are reset and connected resources (e.g. axes) are transferred to a safe state. The function block has to be called up continuously until it reports q_xActive = FALSE.

WaitUntilLimitSwitchFree

Enumeration name:

WaitUntilLimitSwitchFree

Enumeration value:

217

Description:

Waiting until limit switch is free.

The axis is moved away from the limit switch and back into its processing range.

WaitUntilStopped

Enumeration name:

WaitUntilStopped

Enumeration value:

159

Description:

Waiting until the drive has stopped.

The axis is stopped.

Methods

Name

Description

RegisterLoggerPoint

Registering the logger points of the POU in the Application Logger