Function that returns the incoming value appropriately limited within the specified range.
Syntax |
real in_range (real value, real min, real max) |
||||||||
---|---|---|---|---|---|---|---|---|---|
value |
Real unit to be examined (can be a generic real expression) |
||||||||
min |
Lower limit value (can be a generic real expression) |
||||||||
max |
Upper limit value (can be a generic real expression) |
||||||||
Result |
Returns:
|
||||||||
Validity |
Rule, Task |
||||||||
Note |
With the RC3E compiler, it is good to specify the cast of the input data type in order to avoid warnings during compilation. (e.g. in_range((real)rrParPuntiCammaLMot, (real)2.0, (real)max_punti_camma_lmot)) |
Example of use:
|