Skip to main content

valueIsInRangeOf

Short summary​

This assertion method checks if the current value is inside a limit

Attention: limits are included: valueIsInRangeOf(ltod#3:0:0, ltod#3:0:0, ltod#3:0:0) is a true assertion

Parameters​

NameTypeCommentKind
lowerLimitLTODlower limit for the current valueinput
currentValueLTODcurrent value to checkinput
upperLimitLTODupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

METHOD valueIsInRangeOf
VAR_INPUT
(* lower limit for the current value *)
lowerLimit :LTOD;
(* current value to check *)
currentValue :LTOD;
(* upper limit for the current value *)
upperLimit :LTOD;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR