Instruction manual

Unsigned Compares
82
890USE18300 September 2003
Operational
Input
An inside-the-window compare block uses one operational input. It must be a word
with an unsigned integer in the range 0 to 65 535. The input can come from:
an analog input from a module on the island
an analog output from the virtual module (See The Virtual Module, p. 28)
if the less-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
Suppose that you have two threshold values, where TH 1 = 30 000 and
TH 2 = 40 000. Then suppose that the operational input is 32 000 and =0:
Because the value of the operational input falls inside the window defined by TH 1
and TH 2, the block produces a Boolean 1 as its output.
Note: Unsigned compare blocks 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 compare. 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 produce an
input with a possible negative integer value, as the source for the operational input
to the block.
30 000 (TH 1)
1
40 000 (TH 2)
0
65 535
32 000
0