Skip to main content

valueIsGreaterThan

Short summary

This assertion method checks if the current value is greater than the less value

Attention: Any comparsion to NaN is FALSE that means if currentValue OR lessValue 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 | lessValue | assertion | +======================+===================+===============+ | NaN | Any value | FASLE | +----------------------+-------------------+---------------+ | Any value | NaN | FALSE | +----------------------+-------------------+---------------+ | infinity | NOT NaN | TRUE | | | NOT infinity | | +----------------------+-------------------+---------------+ | -infinity | Any value | FALSE | +----------------------+-------------------+---------------+ | Any value | infinity | FALSE | +----------------------+-------------------+---------------+ | NOT NaN | -inifinity | TRUE | | NOT -infinity | | | +----------------------+-------------------+---------------+

Parameters

NameTypeCommentKind
currentValueREALcurrent value to checkinput
lessValueREALless than lower limitinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD valueIsGreaterThan
VAR_INPUT
(* current value to check *)
currentValue :REAL;
(* less than lower limit *)
lessValue :REAL;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR