CharCurve_DINT (FB) ¶ FUNCTION_BLOCK CharCurve_DINT This function block will evaluate a piecewise linear function (the characteristic curve) at an integral point \(x \in \mathbb{Z}\) . The characteristic curve is specified by a defined number of integral sampling points \((x_{1}, y_{1}), \dots , (x_{n}, y_{n}) \in \mathbb{Z^{2}}\) InOut: Scope Name Type Comment Input diInputValue DINT interpolation point \(x \in \mathbb{Z}\) usiNoPoints USINT number \(N\) of sampling points defining the characteristic curve ( \(2 \leq N \leq 11\) ) Inout ap2diPoints ARRAY [0..10] OF POINT2_DINT array of \(N\) two dimensional sampling points \((x_{i}, y_{i})\) with \(1 \leq i \leq N\) Output diOutputValue DINT interpolated value at point \(x \in \mathbb{Z}\) xError BOOL error flag wErrorID WORD information on error 0: No error 1: error within array of sampling points (i.e. the sampling points aren’t arranged in ascending order) 2: interpolation point diInputValue is outside of area covered by sampling points ( \(x \notin [x_{1}, x_{n}]\) ) 4: invalid number of sampling points
CharCurve_LREAL (FB) ¶ FUNCTION_BLOCK CharCurve_LREAL This function block will evaluate a piecewise linear function (the characteristic curve) at an integral point \(x \in \mathbb{R}\) . The characteristic curve is specified by a defined number of integral sampling points \((x_{1}, y_{1}), \dots , (x_{n}, y_{n}) \in \mathbb{R^{2}}\) InOut: Scope Name Type Comment Input lrInputValue LREAL interpolation point \(x \in \mathbb{R}\) usiNoPoints USINT number \(N\) of sampling points defining the characteristic curve ( \(2 \leq N \leq 11\) ) Inout ap2lrPoints ARRAY [0..10] OF POINT2_LREAL array of \(N\) two dimensional sampling points \((x_{i}, y_{i})\) with \(1 \leq i \leq N\) Output lrOutputValue LREAL interpolated value at point \(x \in \mathbb{R}\) xError BOOL error flag wErrorID WORD information on error 0: No error 1: error within array of sampling points (i.e. the sampling points aren’t arranged in ascending order) 2: interpolation point diInputValue is outside of area covered by sampling points ( \(x \notin [x_{1}, x_{n}]\) ) 4: invalid number of sampling points
geometrical functions ¶ Line Functions ProjectPointOnLine (Function) Plane Functions CalcHesseRepresentation (FunctionBlock) ProjectPointOnPlane (Function) Polar coordinates CartesianToPolar (FunctionBlock) PolarToCartesian (FunctionBlock) Vector Functions AddMultiplicatedVector (Function) CrossProduct (FunctionBlock) CrossProductNormed (FunctionBlock) MakeNormed3D (Function) Norm3D (Function) ScalProd3D (Function) ScalProd3DStand (Function) SubVector (Function)
Line Functions ¶ ProjectPointOnLine (Function)
Plane Functions ¶ CalcHesseRepresentation (FunctionBlock) ProjectPointOnPlane (Function)
Polar coordinates ¶ CartesianToPolar (FunctionBlock) PolarToCartesian (FunctionBlock)
Vector Functions ¶ AddMultiplicatedVector (Function) CrossProduct (FunctionBlock) CrossProductNormed (FunctionBlock) MakeNormed3D (Function) Norm3D (Function) ScalProd3D (Function) ScalProd3DStand (Function) SubVector (Function)
signals ¶ MeasureFrequence (FunctionBlock)
MeasureFrequence (FB) ¶ FUNCTION_BLOCK MeasureFrequence This function block will measure the average frequency of an input signal over a defined number of periods. Note The function block has to be called with a frequency higher than the maximum frequency of the input signal to be able to calculate the correct result. InOut: Scope Name Type Initial Comment Input xEnable BOOL Reset xInput BOOL Input signal usiPeriods USINT (1..10) 1 Number of time periods the frequency shall be averaged in ( \(1 \leq \mbox{number} \leq 10\) ) Output lrFrequency LREAL Avareged frequency (in Hz) xValid BOOL Validity of result FALSE : If the required number of time periods has not yet been passed or if the distance in time of two raising edges exceeds \(3 \cdot \mbox{lrFrequency}\)
statistical functions ¶ Statistics_DINT (FunctionBlock) Statistics_LREAL (FunctionBlock) Variance (FunctionBlock)