Instruction manual
Integer Compares
62
890USE18300 September 2003
Inside-the-window Integer Compare Block
Summary An inside-the-window integer compare block performs a comparison between an
analog input value and a window 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
Inside-the-
window
Compare Block
A block diagram for an inside-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)—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. You must specify these presets.
The output is a Boolean 1 when the operational input value is inside the window
(greater than TH1 + ∆ but less than TH2 - ∆) and a Boolean 0 when the input value
is not inside the window (less than or equal to TH1 - ∆ or greater than or equal to
TH2 + ∆). The output remains unchanged when the operational input is greater than
TH1 - ∆ but less than or equal to TH1 + ∆, or when it is greater than or equal to TH2 -
∆ but less than TH2 + ∆.
output
enable
operational input
inside-the-window compare
threshold 1 +/-
∆
threshold 2 +/-
∆