Instruction manual
Integer Compares
66
890USE18300 September 2003
Outside-the-window Integer Compare Block
Summary An outside-the-window integer compare block performs a comparison between an
analog input value and a window of values bounded by two thresholds. The input
value is represented as an integer in the range -32 768 to +32 767. The software
lets you assign values to the two thresholds (TH 1 and TH 2) along with a delta (∆)
value, which acts as an hysteresis around TH 1 and TH 2. The block produces a
Boolean result as its output.
Structure of an
Outside-the-
window
Compare Block
A block diagram for an outside-the-window integer compare is shown below:
The block has two inputs—an enable input and one operational input. The enable
input turns the block on or off. The operational input sends a word value to the block
that will be compared against the thresholds.
The block also has three preset values (See Configuring Preset Values for a Reflex
Block, p. 27), which you must specify—TH 1, TH 2 and a ∆ for hysteresis around the
TH 1 and TH 2 values. The range of values between TH 1 - ∆ and TH 2 + ∆
comprises the window against which the operational input value will be compared.
The output is a Boolean 1 when the operational input value is outside the window
(less than TH 1 - ∆ or greater than TH 2 + ∆) and a Boolean 0 when the input value
is not outside the window (greater than or equal to TH 1 + ∆ but less than or equal
to TH 2 - ∆). The output remains unchanged when the operational input is greater
than or equal to TH 1 - ∆ but less than TH 1 + ∆, or when it is greater than TH 2 - ∆
but less than or equal to TH 2 + ∆.
output
enable
operational input
outside-the-window compare
threshold 1 +/-
∆
threshold 2 +/-
∆