FNXY – Evaluation of two-variables function
Block SymbolLicensing group: STANDARD
Function Description
The FNXY block evaluates basic math functions of two variables. 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 u1, u2 |
1: atan2 | arctangent | – |
2: fmod | remainder after division | |
3: pow | exponentiation of the inputs | – |
The atan2 function result belongs to the interval . The signs of both inputs u1 a u2 are used to determine the appropriate quadrant.
The fmod function computes the remainder after division such that , where is an integer, the signs of the y output and the u1 input are the same and the following holds for the absolute value of the y output: .
The error output is activated () in the case when the input value u2 does not meet the constraints or an error occurs during evaluation of the selected function (implementation dependent), e.g. division by zero. The output is set to substitute value in such case ().
Inputs
u1 | First analog input of the block | Double (F64) |
u2 | Second 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 the 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