FC_DistanceCylinderAndSphere - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the distance between a cylinder and a sphere.
This calculates the distance between the cylinder i_stCylinder and the sphere i_stSphere.
Input |
Data type |
Description |
---|---|---|
i_stCylinder |
Cylinder |
|
i_stSphere |
Sphere |
Output |
Data type |
Description |
---|---|---|
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_lrDistance |
LREAL |
This calculates the distance between i_stCylinder and i_stSphere. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
42 |
The definition of Cylinder is not correct. |
|
InputParameterInvalid |
22 |
The radius of the sphere is outside the valid range. |
Enumeration name: |
DefinitionCylinder |
Enumeration value: |
42 |
Description: |
The definition of Cylinder is not correct. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_stCylinder.lrRadius, a value <= 0 has been transferred. |
The radius of the cylinder must be greater than zero. |
- |
At the inputs i_stCylinder.stAxisStart and i_stCylinder.stAxisEnd, the same point has been transferred. |
The distance between i_stCylinder.stAxisStart and i_stCylinder.stAxisEnd must be at least Gc_lrZeroTolerance. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The distance has been calculated successfully.
Enumeration name: |
RadiusRangeSphere |
Enumeration value: |
22 |
Description: |
The radius of the sphere is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_stSphere.lrRadius, a number <= 0 has been applied. |
The radius of the sphere must be greater than 0. |