SMC_TeachCoordinateSystem (FB)
FUNCTION_BLOCK SMC_TeachCoordinateSystem
This function block will help the user in calculating the vectors of a new coordinate system to be taught. As input data the origin of the new coordinate system and an arbitrary point each of the x- and y- axis are entered. The outputs of the module are the translation vector and the unit vectors of the new coordinate system. Additionally the quality of the input parameters is evaluated (angle between x- and y-axis should be 90°).
For detailed information of transformation modules see the survey on Coordinate Transformations.
InOut:
Scope |
Name |
Type |
Comment |
Input |
vOrigin |
SMC_Vector3D |
Origin of the new coordinate system |
vPointOnX |
SMC_Vector3D |
Position of point on the x-axis |
|
vPointOnY |
SMC_Vector3D |
Position of point on the y-axis |
|
Output |
vX |
SMC_Vector3d |
x-Coordinate of unit vector of new coordinate system |
vY |
SMC_Vector3d |
y-Coordinate of unit vector of new coordinate system |
|
vZ |
SMC_Vector3d |
z-Coordinate of unit vector of new coordinate system |
|
vTranslation |
SMC_Vector3d |
Translation vector for origin = origin of new coordinate system in old coordinates |
|
fQuality |
LREAL |
Quality of input data ranging from 0 (vX, vY invalid) to 1(vX, vY orthogonal) |