NANINF – Block for checking NaN and Inf values
Block SymbolLicensing group: STANDARD
Function Description
The NANINF block serves to detect and correct unusual values on an analog input u.
If the input value is a standard number, it is directly forwarded to the output y
(),
and the output is is set to 0. In cases where the input value is infinity
(Inf) or
is of the type "not a number" (NaN), a replacement value defined in the respective parameter
infp, infn or nan is sent to the output y with a bad quality (BAD) label. Simultaneously, a
code indicating the type of abnormality of the input value is sent to the output
is.
Note: From the perspective of a mathematical coprocessor, Inf or NaN values are almost normal values that can be operated with in all operations. They may arise, for example, when dividing by zero or when taking the square root of a negative number. From the perspective of the control system, however, these are nonsensical values that definitely cannot be set to a physical output. The REXYGEN system understands this and such values are not generated by its blocks (e.g., the SQRT block has a replacement value for negative numbers, similarly the DIV block for division by 0). However, sometimes such non-standard values occur, and then it is necessary to have the means to deal with them, which is where this block comes into play.
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
u1 | Analog input of the block | Double (F64) |
Parameter
infp | Substitute value for +Inf | Double (F64) |
infn | Substitute value for -Inf | Double (F64) |
nan | Substitute value for NaN | Double (F64) |
Output
y | Analog output of the block | Double (F64) |
is | Status (0:OK, 1:+Inf, 2:-Inf, 3:NaN) | Long (I32) |
|
|
|
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com