Instruction manual

Unsigned Compares
890USE18300 September 2003 77
Operational
Input
A greater-than-threshold unsigned compare block uses one operational input. It
must be a word with an unsigned integer value in the range 0 to 65 535. The input
can come from:
an analog input channel on the island
an analog output from the virtual module (See The Virtual Module, p. 28)
if the greater-than-threshold compare is the second block in a nested reflex action
(See Nesting Two Reflex Blocks, p. 36), the operational input may be configured
as the output of the first reflex block
The illustration below shows the behavior of the block when is 0:
If the operational input is less than or equal to the threshold value, the output is 0. If
the operational input value is greater than the threshold value, the output is 1
Note: Unsigned compares are often nested together with counter blocks (See
Counter Reflex Blocks, p. 93). The unsigned compare is always the second block
in the nested action, and the analog output from the counter is used as its
operational input. These two action types complement each other well because the
output from a counter is always unsigned with 16-bit resolution.
Note: Do not use a word that contains a signed negative integer value as the
operational input to an unsigned integer comparison. The block will misinterpret a
value of 1 in the sign bit position (bit 15) as part of the integer value. Avoid the use
of modules such as the STB AVI 1270 analog input module, which produces an
input with a possible negative integer value, as the source for the operational input
to the block.
threshold
input value
1
0
0
65,535
output