Instruction manual

Counters
100
890USE18300 September 2003
Rising-edge Counter Block
Summary A rising-edge counter block counts up (increments) or down (decrements) each time
an count input to the action rises from 0 to 1. The count begins at a user-specified
preset value and continues counting 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
Rising-edge
Counter Block
A block diagram for a standard rising-edge counter is shown below:
The counter 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
when it transitions from 0 to 1.
The counter direction input defines whether the action 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
allows you to map the output only to a digital action module, even though the output
value is analog.
output
enable
count input
rising-edge counter
counter direction
counter preset
reset