SMC_DetermineCuboidBearing (FB)ΒΆ
FUNCTION_BLOCK SMC_DetermineCuboidBearing
This function block will determine the position of a cuboid (corner mark, edge alignment) in the space in dependence of 6 (3/2/1) points given:
For detailed information of transformation modules see the survey on Coordinate Transformations.
- InOut:
Scope
Name
Type
Initial
Comment
Input
A1SMC_Vector3DFirst of three points that are located on the surface A of a cube and do not lie on a common line.
A2SMC_Vector3DSecond of three points that are located on the surface A of a cube and do not lie on a common line.
A3SMC_Vector3DThird of three points that are located on the surface A of a cube and do not lie on a common line.
B1SMC_Vector3DFirst of two points that are located on another cube surface B adjacent to A. The projection of this point on surface A may not coincide with the projection of B2.
B2SMC_Vector3DSecond of two points that are located on another cube surface B adjacent to A. The projection of this point on surface A may not coincide with the projection of B1.
C1SMC_Vector3DPoint on a further cube surface adjacent to A and B
Output
MSMC_Vector3DCommon corner point of cube surfaces A, B and C
vABSMC_Vector3DUnit vector on edge line between A and B with start point M
vBCSMC_Vector3DUnit vector on edge line between B and C with start point M
vCASMC_Vector3DUnit vector on edge line between A and C with start point M
bErrorBOOLSignals, that an error has occurred within the function block
nErrorWORD0
Error description:
0: No error (
bError=FALSE)1: A1,A2,A3 lie on common line
2: Projections of B1 and B2 on surface A coincide