FB_EllipticSpline - CalcFullSplineUserApex (Method)
Type: |
Method |
Available as of: |
V1.4.1.0 |
This chapter provides information on:
oTask
Calculating spline points for an elliptic spline.
Based on the inputs i_stStart, i_stTarget, i_lrAbsHeight, i_lrScalingFactor and on the value of the property udiNumberOfSplinePoints, this method calculates a position table for a spline interpolation in three-dimensional space. Traveling along these positions can be realized by using the IF_RobotMotion.MoveS motion command. A position table is calculated from the start position to the target position as well as from the target position to the start position. For this purpose, two ellipse-shaped half branches are calculated: from the start position to the apex and from the apex to the target position. The apex of the two half branches of the elliptic spline can be manipulated by the input i_lrScalingFactor.
Full spline from start position to target position: i_lrScalingFactor := -0.75
Full spline from start position to target position: i_lrScalingFactor := 0.5
Input |
Data type |
Description |
---|---|---|
i_stStart |
Start position in cartesian coordinates Value range: i_stStart.lrX / lrY <> i_stTarget.lrX / lrY |
|
i_stTarget |
Target position in cartesian coordinates Value range: i_stStart.lrX / lrY <> i_stTarget.lrX / lrY |
|
i_lrAbsHeight |
LREAL |
Absolute height of the elliptic spline apex. Value range: i_lrAbsHeight > i_stStart.lrZ AND i_lrAbsHeight > i_stTarget.lrZ |
i_lrScalingFactor |
LREAL |
A value not equal to 0.0 moves the apex of the elliptic spline either towards the start position or towards the target position, where 0 defines the center position between the start position and the target position. A positive value moves it towards the target position, a negative value towards the start position. Value range: -1.0 < i_lrScalingFactor < 1.0 |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to a 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 that gives additional information on the diagnostic state. |
q_stForward |
Calculated spline table from start to end position. |
|
q_stReverse |
Calculated spline table from end to start position. |
|
q_udiApexIndex |
UDINT |
Index of the spline point representing the apex of the elliptic spline. |
q_lrSplineLength |
LREAL |
Resulting length of linear connections between the spline points of the elliptic spline. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
163 |
The positions are identical. |
|
InputParameterInvalid |
89 |
The number of spline points is out of range. |
|
InputParameterInvalid |
162 |
The scaling factor is out of range. |
|
InputParameterInvalid |
164 |
The start position is invalid. |
|
InputParameterInvalid |
91 |
The target is invalid. |
Enumeration name: |
IdenticalPosition |
Enumeration value: |
163 |
Description: |
The positions are identical. |
Issue |
Cause |
Solution |
---|---|---|
Calculating the elliptic spline was not successful. |
The cartesian components X and Y of the start position (i_stStart) and of the target position (i_stTarget) are identical in a range of 0.001. |
Ensure that both values are not identical to each other. |
Enumeration name: |
NumberOfSplinePointsRange |
Enumeration value: |
89 |
Description: |
The number of spline points is out of range. |
Issue |
Cause |
Solution |
---|---|---|
Calculating the elliptic spline was not successful. |
The value transferred at the property udiNumberOfSplinePoints lies outside the valid range. |
Ensure that udiNumberOfSplinePoints is greater than or equal to 3. Ensure that udiNumberOfSplinePoints is less than or equal to 98. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
Calculating the elliptic spline was successful.
Enumeration name: |
ScalingFactorRange |
Enumeration value: |
162 |
Description: |
The scaling factor is out of range. |
Issue |
Cause |
Solution |
---|---|---|
Calculating the elliptic spline was not successful. |
The value transferred at the input i_lrScalingFactor lies outside the valid range. |
At the input i_lrScalingFactor, a value greater than -1.0 must be transferred. At the input i_lrScalingFactor, a value less than 1.0 must be transferred. |
Enumeration name: |
StartInvalid |
Enumeration value: |
164 |
Description: |
The start position is invalid. |
Issue |
Cause |
Solution |
---|---|---|
Calculating the elliptic spline was not successful. |
The method SetWorkingPlane was called and the working plane XY is configured. |
Ensure that the input i_stStart.lrZ is set to 0. |
The method SetWorkingPlane was called and the working plane XZ is configured. |
Ensure that the input i_stStart.lrY is set to 0. |
|
The method SetWorkingPlane was called and the working plane YZ is configured. |
Ensure that the input i_stStart.lrX is set to 0. |
|
The value of the input i_lrScalingFactor is not equal to 0.0 and the value of the input i_stStart.lrZ is greater than the value of the input i_lrAbsHeight. |
Ensure that the input i_stStart.lrZ is not greater than or equal to the input i_lrAbsHeight. |
Enumeration name: |
TargetInvalid |
Enumeration value: |
91 |
Description: |
The target is invalid. |
Issue |
Cause |
Solution |
---|---|---|
Calculating the elliptic spline was not successful. |
The method SetWorkingPlane was called and the working plane XY is configured. |
Ensure that the input i_stTarget.lrZ is set to 0. |
The method SetWorkingPlane was called and the working plane XZ is configured. |
Ensure that the input i_stTarget.lrY is set to 0. |
|
The method SetWorkingPlane was called and the working plane YZ is configured. |
Ensure that the input i_stTarget.lrX is set to 0. |
|
The value of the input i_lrScalingFactor is not equal to 0.0 and the value of the input i_stTarget.lrZ is greater than the value of the input i_lrAbsHeight. |
Ensure that the input i_stTarget.lrZ is not greater than or equal to the input i_lrAbsHeight. |