FB_HomeTp - General Information
Type: |
Function block |
Available as of: |
V1.0.3.0 |
Inherits from: |
- |
Implements: |
- |
Versions: |
Current version |
Homing an axis to a Touchprobe signal
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.
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 |
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 |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an diagnostic message. |
|
q_etDiagExt |
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. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
9 |
The POU is disabled. |
|
OK |
222 |
Homing has been performed. |
|
OK |
4 |
The POU is being initialized. |
|
OK |
230 |
Waiting for negative edge of the Touchprobe signal. |
|
OK |
5 |
Waiting for starting command. |
|
OK |
167 |
Waiting for Touchprobe signal. |
|
OK |
8 |
Waiting until the POU is deactivated. |
|
OK |
217 |
Waiting until limit switch is free. |
|
OK |
159 |
Waiting until the drive has stopped. |
|
DriveConditionInvalid |
10 |
The drive is not ready for motion commands. |
|
HomingFailed |
275 |
HwLimitNeg is still active. |
|
HomingFailed |
276 |
HwLimitPos is still active. |
|
HomingFailed |
231 |
No Touchprobe was found. |
|
InputParameterInvalid |
12 |
Acc is outside the valid range. |
|
InputParameterInvalid |
13 |
Dec is outside the valid range. |
|
InputParameterInvalid |
3 |
The connected drive is invalid. |
|
InputParameterInvalid |
14 |
Jerk is outside the valid range. |
|
InputParameterInvalid |
215 |
MaxTravel is outside the valid range. |
|
InputParameterInvalid |
163 |
The connected Touchprobe is invalid. |
|
InputParameterInvalid |
166 |
The Touchprobe is not active. |
|
InputParameterInvalid |
165 |
The connected Touchprobe is virtual. |
|
InputParameterInvalid |
111 |
The Mode is indeterminable. |
|
InputParameterInvalid |
11 |
Vel is outside the valid range. |
|
LimitReached |
219 |
Negative limit switch has been reached. |
|
LimitReached |
221 |
Positive limit switch has been reached. |
|
UnexpectedProgramBehavior |
1 |
An unintended detected error occurred during execution. |
|
UnexpectedProgramBehavior |
2 |
The POU is in an undefined state. |
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 |
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 |
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
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. |
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. |
Enumeration name: |
HomingDone |
Enumeration value: |
222 |
Description: |
Homing has been performed. |
The homing sequence has been completed successfully.
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. |
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. |
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. |
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. |
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.
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. |
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. |
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. |
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. |
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. |
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) |
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. |
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. |
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. |
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. |
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.
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.
Enumeration name: |
WaitForTouchProbeSignal |
Enumeration value: |
167 |
Description: |
Waiting for Touchprobe signal. |
The Touchprobe signal is waited for while the axis is moved.
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.
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.
Enumeration name: |
WaitUntilStopped |
Enumeration value: |
159 |
Description: |
Waiting until the drive has stopped. |
The axis is stopped.
Name |
Description |
---|---|
Registering the logger points of the POU in the Application Logger |