The ARRAY_RANGE function compares a single input value
against two arrays of delimiters that specify an upper and
lower bound to determine if the input value falls within the
range specified by the delimiters. The output is an array of bits
that is set ON (1) when the input value is greater than or equal
to the lower limit and less than or equal to the upper limit. The
output is set OFF (0) when the input is outside this range or
when the range is invalid, as when the lower limit exceeds the
upper limit.
The ARRAY_RANGE function compares a single input value against two arrays of delimiters that
specify an upper and lower bound to determine if the input value falls within the range specified by
the delimiters. The output is an array of bits that is set ON (1) when the input value is greater than or
equal to the lower limit and less than or equal to the upper limit. The output is set OFF (0) when the
input is outside this range or when the range is invalid, as when the lower limit exceeds the upper
limit.
When ARRAY_RANGE receives power, it compares the value in input parameter IN against each
range specified by the array element values of LL and UL. Output Q sets a bit ON (1) for each
corresponding array element where the value of IN is greater than or equal to the value of LL and is
less than or equal to the value of UL. Output Q sets a bit OFF (0) for each corresponding array
element where the value of IN is not within this range or when the range is invalid, as when the value
of LL exceeds the value of UL. If the operation is successful, ARRAY_RANGE passes power flow to the
right.
Operands for Array Range
Notes:
â–ª For each mnemonic, use the corresponding data type for the LL, UL, and Q operands. For
example, ARRAY_RANGE_DINT requires LL, UL, and Q to be DINT variables.
â–ª Q is not aligned. It is displayed in bit format. It displays either a 1 (ON) or a 0 (OFF) for the first
array element. For BOOL references, it represents the reference displayed. For other references,
it represents the low order bit of the reference displayed.