LINE_3D (STRUCT) ¶ TYPE LINE_3D : STRUCT This structure defines a straight line in the three dimensional space by specifying two (not identical) points being part of it. InOut: Name Type Comment vP Vector3D First point on straight line vV Vector3D Second point on straight line
PLANE_H (STRUCT) ¶ TYPE PLANE_H : STRUCT This structure defines a plane in the three dimensional space according to the normal form due to Hesse: \(ax + by + cz + d = 0\) , where \(n\) represents the normed normal of the plane. InOut: Name Type Comment lrNx LREAL \(x\) component of a normal vector (corresponds to \(a\) ) lrNy LREAL \(y\) component of a normal vector (corresponds to \(b\) ) lrNz LREAL \(z\) component of a normal vector (corresponds to \(c\) ) lrN LREAL distance to origin in consideration of the orientation of the normal vector (corresponds to \(d\) )
POINT2_DINT (STRUCT) ¶ TYPE POINT2_DINT : STRUCT This structure defines a vector \(\vec{0P} = \vec{P}\) of the two dimensional space by specifying the integral values of the x- and y-component of its target point \(P\) . InOut: Name Type Comment diX DINT x-component of the target point (integer) diY DINT y-component of the target point (integer)
POINT2_LREAL (STRUCT) ¶ TYPE POINT2_LREAL : STRUCT This structure defines a vector \(\vec{0P} = \vec{P}\) of the two dimensional space by specifying the floating-point values of the x- and y-component of its target point \(P\) . InOut: Name Type Comment lrX LREAL x-component of the target point (floating point) lrY LREAL y-component of the target point (floating point)
VECTOR3D (STRUCT) ¶ TYPE VECTOR3D : STRUCT This structure defines a vector \(\vec{0P} = \vec{P}\) of the three dimensional space by specifying the floating-point values of the x-, y- and z-component of its target point \(P\) . InOut: Name Type Initial Comment dX LREAL 0 x-component of target point (floating point, initialized with 0) dY LREAL 0 y-component of target point (floating point, initialized with 0) dZ LREAL 0 z-component of target point (floating point, initialized with 0)
GetSupplierVersion (FUN) ¶ FUNCTION GetSupplierVersion : WORD This is a necessary module for each CAA library. InOut: Scope Name Type Comment Return GetSupplierVersion WORD Indicates the implementation version assigned by the manufacturer. The more significant byte contains the release version, the less significant byte the implementation version. Example: The return 522=16#020A indicates release version 2 and implementation version 10. Input xDummy BOOL For compatibility only
Library Information ¶ GetLibVersion (Function) GetLibVersionNumber (Function) IsLibReleased (Function)
GetLibVersion (FUN) ¶ FUNCTION GetLibVersion : VERSION This function has been automatically generated from the project information. InOut: Scope Name Type Return GetLibVersion VERSION
statistical functions ¶ Statistics_DINT (FunctionBlock) Statistics_LREAL (FunctionBlock) Variance (FunctionBlock)
Statistics_DINT (FB) ¶ FUNCTION_BLOCK Statistics_DINT This function block will update the values of minimum, maximum and average with respect to the integral input parameter \(x_{n}\) , which will be added to a set of integral data \(x_{n-1},\dots,x_{1}\) (stemming from previous calls). \[\left \lfloor \frac{\sum_{i=1}^{n}x_{i}+\left \lfloor \frac{n}{2} \right \rfloor}{n} \right \rfloor\] Note Pay attention, that the returned average is of type DINT . In contrast to the arithmetic mean the result will be rounded. InOut: Scope Name Type Initial Comment Input xEnable BOOL Reset diInput DINT New data \(x_{n}\) Output diMin DINT 16#7FFFFFFF Minimum of set \(x_{n},\dots,x_{1}\) diMax DINT DWORD_TO_DINT(16#80000000) Maximum of set \(x_{n},\dots,x_{1}\) diAverage DINT Rounded avarage of data \(x_{n},\dots,x_{1}\) xOverrun BOOL TRUE : In case of overflow The module will compensate this by a minor weighting of the old data leading to inaccuracy of the result