Variance (FB) ¶ FUNCTION_BLOCK Variance This function will update the experimental variance of the mean with respect to the new input parameter \(x_{n}\) , which will be added to a series of data \(x_{n-1},\dots,n_{1}\) (stemming from previous calls). The variance \(s\) of the data \(x_{n},\dots,x_{1}\) is calculated according to: \(s = \frac{1}{n}\sum_{i=1}^{n}\left(x_{i} - \bar{x}\right)\) , where \(\bar{x}\) is the arithmetic mean of the data. InOut: Scope Name Type Comment Input xEnable BOOL Reset lrInputValue LREAL New data \(x_{n}\) Output lrVariance LREAL Experimental variance of the mean of \(x_{n},\dots,x_{1}\)
trigonometrical functions ¶ atan2 (Function)
atan2 (FUN) ¶ FUNCTION atan2 : LREAL This function will return the angle \(\varphi\) (azimuth) necessary for changing Cartesian to polar coordinates. InOut: Scope Name Type Comment Return atan2 LREAL The angle \(\varphi \in \left(-\pi, \pi \right]\) , whose sine and cosine correspond to the input values. Input lrSinus LREAL Sine of angle \(\varphi\) lrCosinus LREAL Cosine of angle \(\varphi\)
Global Variables ¶ GlobalConstants (GVL)
GlobalConstants (GVL) ¶ InOut: Scope Name Type Initial Comment Constant PI LREAL 3.1415926535897931 The mathematical constant \(\pi\)
Structs ¶ LINE_3D (Struct) PLANE_H (Struct) POINT2_DINT (Struct) POINT2_LREAL (Struct) VECTOR3D (Struct)
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)