beautypg.com

Counter input modes, Totalize mode, Totalize – Measurement Computing USB-CTR04 User Manual

Page 9: Mode

background image

USB-CTR04 User's Guide

Functional Details

Counter input modes

The USB-CTR04 supports the following counter input modes:

Totalize

Period measurement

Pulse-width measurement

Timing measurement

Counter input modes are programmable with software. Some modes include software-selectable max limit and

min limit register values . These values do not directly affect the current count, but set limits in some modes to

determine counter behavior.
Each mode supports additional counter operation options. Refer to the discussion of each counter mode in the

pages that follow for specific information.

Totalize mode

You can use the USB-CTR04 as a high speed pulse counter for general counting applications.
Each counter can be set to any resolution up to 64-bits based on the software-selectable max limit and min limit

register values. The counters can accept frequency inputs up to 48 MHz.
In totalize mode,

CxIN

is used as the primary counter input.

CxGT

can be used to set the count direction, to gate

the counter, to clear/reload the counter with the min limit value, or to trigger a particular counter to begin

counting.
All totalize measurement mode options are software-selectable. Each option is explained in the table below.

Totalize counter mode options

Counter option

Description

Clear on read

The counter is cleared after each read (synchronous or asynchronous). The value of the counter

before it was cleared is latched and returned. It is typically cleared to zero, but depending on

counting mode, it may be cleared to the value stored in the min limit register.

Range Limit

When the range limit option is enabled, you can set the max limit and the min limit register values to

mimic limit switches in a mechanical counter.

When counting up, the counter freezes or rolls over to the min limit count whenever the count

reaches the max limit register value.

When counting down, the counter freezes or rolls over to the max limit count whenever the count

reaches the min limit register value

Non-recycle

The counter freezes if the max limit or the min limit is reached.

When counting up, the counter stops when the max limit is reached.

When counting down, the counter stops when the min limit is reached.

Counting resumes if the direction is reversed or if the counter is reloaded with a value between the

max limit and the min limit.

CountDown

Enables count down mode. (This is overridden by the state of the gate input if the gate is

programmed for direction control.)

Output On

Enables counter output mode. Based on the output initial state of the counter (high or low), the

counter output toggles the state of the counter when it reaches the value of output register 0, and

toggles back to output initial state of the counter when the it reaches the value of output register 1.

Output Initial

State

Sets the initial state of the counter output to either high or low (default).

9

This manual is related to the following products: