Instruction manual

Counters
94
890USE18300 September 2003
Falling-edge Counter Block
Summary A falling-edge counter block counts up (increments) or down (decrements) each
time its count input falls from 1 to 0. The count begins at a user-specified counter
preset value and continues up or down until the block receives a reset input. A reset
sends the counter back to its preset value and starts a new counting sequence. The
block produces an unsigned analog word as its output.
Structure of a
Falling-edge
Counter Block
A block diagram for a standard falling-edge counter is shown below:
The block has four inputs:
The enable input turns the counter on or off.
The count input sends a Boolean value to the block that will generate a count
input when it transitions from 1 to 0.
The counter direction input defines whether the block will increment or decrement
on each count.
The reset will restart the counting operation at the predefined counter preset
value.
The block also has a counter preset value (See Configuring Preset Values for a
Reflex Block, p. 27)—an integer value that defines the starting point for each
counting operation. You must specify this preset.
The block produces a 16-bit word output on each count. The word holds an unsigned
integer value in the range 0 to 65 535. On each count, the output equals the counter
preset plus the incremented count or minus the decremented count.
Note: Unlike other reflex actions, a counter block is designed to act exclusively as
the first block in a nested reflex action (See Nesting Two Reflex Blocks, p. 36). The
output from a counter block is used as an analog input to an unsigned compare
block (See Unsigned Compare Reflex Blocks, p. 71). As a result, the reflex editor
lets you map the output only to a digital action module, even though the output
value is analog.
output
enable
count input
falling-edge counter
counter direction
counter preset
reset