Skip to main content

valueIsInRangeOf

Short summary​

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

Attention: limits are included: valueIsInRangeOf(ldt#1970-01-01-0:0:0, ldt#1970-01-01-0:0:0, ldt#1970-01-01-0:0:0) is a true assertion

Parameters​

NameTypeCommentKind
lowerLimitLDTlower limit for the current valueinput
currentValueLDTcurrent value to checkinput
upperLimitLDTupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

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