Skip to main content

valueIsInRangeOf

Short summary

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

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

Parameters

NameTypeCommentKind
lowerLimitDTlower limit for the current valueinput
currentValueDTcurrent value to checkinput
upperLimitDTupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

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