FNX – Evaluation of single-variable function
Block SymbolLicensing group: STANDARD
Function Description
The FNX block evaluates basic math functions of single variable. The table below shows the list
of supported functions with corresponding constraints. The ifn parameter determines the
active function.
List of functions:
ifn: shortcut | function | constraints on u |
1: acos | arccosine | |
2: asin | arcsine | |
3: atan | arctangent | – |
4: ceil | rounding towards the nearest higher integer | – |
5: cos | cosine | – |
6: cosh | hyperbolic cosine | – |
7: exp | exponential function | – |
8: exp10 | exponential function | – |
9: fabs | absolute value | – |
10: floor | rounding towards the nearest lower integer | – |
11: log | logarithm | |
12: log10 | decimal logarithm | |
13: random | arbitrary number (u independent) | – |
14: sin | sine | – |
15: sinh | hyperbolic sine | – |
16: sqr | square function | – |
17: sqrt | square root | |
18: srand | changes the seed for the random function to u | |
19: tan | tangent | – |
20: tanh | hyperbolic tangent | – |
Note: All trigonometric functions process data in radians.
The error output is activated () in the case when the input value u falls out of its bounds or an error occurs during evaluation of the selected function (implementation dependent), e.g. square root of negative number. The output is set to substitute value in such case ().
Input
u | Analog input of the block | Double (F64) |
Outputs
y | Result of the selected function | Double (F64) |
E | Error flag | Bool |
Parameters
ifn | Function type (see table above) 1 | Long (I32) |
yerr | Substitute value for an error case | Double (F64) |
[Previous] [Back to top] [Up] [Next]
2020 © REX Controls s.r.o., www.rexygen.com