valueIsMin
Short summary
This assertion method checks if the current value is greater than or equal to the minimum value
Attention:
Any comparsion to NaN is FALSE that means if currentValue OR minimumValue
is NaN then is the assertion false.
For details check IEEE 754_ and the truth table below.
Attention: Every number is smaller than infinity except infinity, it's equal. Every number is greater than -infinity except -infinity, it's equal. For details check IEEE 754 and the truth table below.
truth table for special values
+----------------------+----------------------+---------------+
| currentValue | minimumValue | assertion |
+======================+======================+===============+
| NaN | Any value | FASLE |
+----------------------+----------------------+---------------+
| Any value | NaN | FALSE |
+----------------------+----------------------+---------------+
| infinity | NOT NaN | TRUE |
+----------------------+----------------------+---------------+
| NOT NaN | -infinity | TRUE |
+----------------------+----------------------+---------------+
| -infinity | NOT -infinity | FALSE |
+----------------------+----------------------+---------------+
| NOT infinity | infinity | FALSE |
+----------------------+----------------------+---------------+
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| currentValue | LREAL | current value to check | input |
| minimumValue | LREAL | lower limit for the current value | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD valueIsMin
VAR_INPUT
(* current value to check *)
currentValue :LREAL;
(* lower limit for the current value *)
minimumValue :LREAL;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR