beautypg.com

Measurement Computing WBK17 User Manual

Page 13

background image

WBK17, Counter/Encoder Module

987996

WBK17, pg. 13

COUNTER: OPT0: This selects totalize or clear on read mode.
Totalize Mode – The counter counts up and rolls over on the 16-bit (Low Counter) boundary, or on the
32-bit (High Counter) boundary. See OPT2 in regard to choosing 16-bit or 32-bit counters.
Clear On Read Mode – In WaveView, the “Clear On Read Mode” is referred to as the “Counter” mode.
The counter is cleared at the beginning of every scan; and the final value of the counter [the value just
before it was cleared] is latched and returned to the WaveBook.

When using either an EXT CLK input, or one or both SYNC ports, the clear on read mode
is not available. In these instances, the totalize mode should be used.

COUNTER: OPT1: This determines if the counter is to rollover or “stop at the top.”
Rollover Mode - The counter continues to count upward, rolling over on the 16-bit (Counter Low)
boundary, or on the 32-bit (Counter High) boundary. See OPT2 in regard to choosing 16-bit or 32-bit
counters.
Stop at the Top Mode - The counter will stop at the top of its count. The top of the count is FFFF for the
16-bit option (Counter Low), and FFFFFFFF for the 32-bit option (Counter High).

COUNTER: OPT2: Determines whether the counter is 16-bits or 32-bits (Counter Low, or Counter
High, respectively). This only matters when the counter is using the “stop at the top” option, otherwise this
option is inconsequential.

COUNTER: OPT3: Determines which signal latches the counter outputs into the data stream back to
the WaveBook. Normally, the start of scan signal latches the counter outputs at the beginning of every
scan; but an option is to have the mapped signal latch the counter outputs. This mapped-signal option
allows a second signal to control the latching of the count data. This allows the user to know the exact
counter value when an edge is present on another channel.

COUNTER: OPT4: Allows the mapped channel to gate the counter if desired. When the mapped
channel is high, the counter is enabled. When the mapped channel is low, the counter is disabled (but holds
the count value). The mapped channel can be any other input channel, or one of the detection signals.

COUNTER: OPT5: Allows the mapped channel to decrement the counter. With this option the input
channel [for the counter] will increment the counter. The mapped channel can be used to decrement the
counter.

COUNTER: OPT6: Allows the mapped channel to increment the counter instead of the main channel.
This option allows the counter to be used with any other input channel (post-debounce), or with one of the
detection signals. If the channel’s input is used elsewhere, for example, gating another counter, the counter
for this channel does not need to go unused.

Reference Notes:
For information on implementing

Up/Down Counters

of any size, refer to Application

Example #2 on page 26 of this document module.