FB_HomeIn - General Information
Type: |
Function block |
Available as of: |
V1.0.3.0 |
Inherits from: |
- |
Implements: |
- |
Versions: |
Current version |
Homing an axis to a sensor signal.
An axis i_ifDrive is moved to the reference position. The reference position is recognized using a sensor that is connected to the input i_xSensor.
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_xSensor = TRUE equates the condition "Sensor assigned" (normally open contact)
o....NegEdge...: i_xSensor = FALSE equates the condition "Sensor assigned" (normally closed contact)
When starting the reference travel, the following cases are distinguished:
oCase 1: The input i_xSensor (reference signal) indicates the condition "Sensor not assigned" when the reference travel is started
The axis moves to the parameterized direction until i_xSensor 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_xSensor 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 the condition "Sensor not assigned" is detected on the input i_xSensor. 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 value of i_xSensor provides the condition "Sensor assigned" (reference signal).
oCase 3: The hardware limit switch, into whose direction the axis is supposed to move (defined by the input i_etMode), is enabled.
The axis moves in the opposite direction instead of the direction that was defined by the input i_etMode until the condition "Sensor assigned" is detected on the input i_xSensor. 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_xSensor |
BOOL |
Input for the sensor signal (digital input of the PacDrive system) |
i_etMode |
Reference mode |
|
i_lrOffset |
LREAL |
Offset between sensor signal and reference point. An offset is always added to the position that was held when the sensor signal occurred. |
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 |
TRUE: rotative system. FALSE: linear 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_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_lrPosition |
LREAL |
Position of the axis. |
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 |
216 |
Waiting for negative edge of the sensor signal. |
|
OK |
218 |
Waiting for sensor signal. |
|
OK |
5 |
Waiting for starting command. |
|
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 |
220 |
No sensor signal 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 |
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. |
|
SercosConditionInvalid |
19 |
The Sercos bus is not in phase 4. |
|
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. |
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, a sensor signal has been detected or 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. |
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, a sensor signal has been detected or 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: |
SensorNotFound |
Enumeration value: |
220 |
Description: |
No sensor signal was found. |
Issue |
Cause |
Solution |
---|---|---|
- |
The sensor signal is not transmitted to the function block. |
Ensure that the signal has been applied at the function block's input i_xSensor. |
- |
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: |
SercosNotInPhaseFour |
Enumeration value: |
19 |
Description: |
The Sercos bus is not in phase 4. |
Issue |
Cause |
Solution |
---|---|---|
- |
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: |
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_HomeInMode 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: |
WaitForNegEdgeOfSensor |
Enumeration value: |
216 |
Description: |
Waiting for negative edge of the sensor signal. |
The sensor input is continuously checked for a negative edge.
Enumeration name: |
WaitForSensorSignal |
Enumeration value: |
218 |
Description: |
Waiting for sensor signal. |
The axis is moved to the reference sensor.
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: |
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 |