FNX – Evaluation of single-variable function

Block SymbolLicensing group: STANDARD
Qt SVG Document Exported by REXYGEN Studio u y E FNX

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 u < 1.0, 1.0 >
2: asin arcsine u < 1.0,1.0 >
3: atan arctangent
4: ceil rounding towards the nearest higher integer
5: cos cosine
6: cosh hyperbolic cosine
7: exp exponential function eu
8: exp10 exponential function 10u
9: fabs absolute value
10: floor rounding towards the nearest lower integer
11: log logarithm u > 0
12: log10 decimal logarithm u > 0
13: random arbitrary number z < 0,1 > (u independent)
14: sin sine
15: sinh hyperbolic sine
16: sqr square function
17: sqrt square root u > 0
18: srand changes the seed for the random function to u u
19: tan tangent
20: tanh hyperbolic tangent



Note: All trigonometric functions process data in radians.

The error output is activated (E = on) 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 (y = yerr).

This block propagates the signal quality. More information can be found in the 1.4 section.

Input

u

Analog input of the block

Double (F64)

Parameter

ifn

Function type  1

Long (I32)

1 ....

acos

2 ....

asin

3 ....

atan

4 ....

ceil

5 ....

cos

6 ....

cosh

7 ....

exp

8 ....

exp10

9 ....

fabs

10 ...

floor

11 ...

log

12 ...

log10

13 ...

random

14 ...

sin

15 ...

sinh

16 ...

sqr

17 ...

sqrt

18 ...

srand

19 ...

tan

20 ...

tanh

yerr

Substitute value for an error case

Double (F64)

Output

y

Result of the selected function

Double (F64)

E

Error indicator

Bool

off ..

No error

on ...

An error occurred

2024 © REX Controls s.r.o., www.rexygen.com