FC_GetCoordinates2D - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the coordinates of a point in a 2-dimensional coordinate system that is spanned by two linearly independent vectors:
i_stP = q_lrC1 * i_stV1 + q_lrC2 * i_stV2
The coordinates of the point i_stP are converted to the coordinates of the coordinate system which is spanned by the vectors i_stV1 and i_stV2. The vectors i_stV1 and i_stV2 must be linearly independent, i.e. they must not be parallel.
Input |
Data type |
Description |
---|---|---|
i_stP |
Point whose coordinates are to be converted. |
|
i_stV1 |
Vector 1 which spans the new coordinate system |
|
i_stV2 |
Vector 2 which spans the new coordinate system |
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_lrC1 |
LREAL |
Coordinate of the point i_stP on the axis i_stV1 |
q_lrC2 |
LREAL |
Coordinate of the point i_stP on the axis i_stV2 |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
95 |
The definition of the coordinate system is invalid. |
Enumeration name: |
DefinitionCoordinateSystem |
Enumeration value: |
95 |
Description: |
The definition of the coordinate system is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
The vectors i_stV1 and i_stV2 are parallel, they do not span a 2-dimensional coordinate system. |
The vectors i_stV1 and i_stV2 must be linearly independent, i.e. they must not be parallel. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The coordinates have been calculated successfully.