Skip to main content

valueIsInRangeOf

Short summary​

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

Attention: limits are included: valueIsInRangeOf(lt#3ms,lt#3ms ,lt#3ms) is a true assertion

Parameters​

NameTypeCommentKind
lowerLimitLTIMElower limit for the current valueinput
currentValueLTIMEcurrent value to checkinput
upperLimitLTIMEupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

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