beautypg.com

1 frequency, 2 totalize, 3 pulse width measurement – Horner APG XL7 OCS User Manual

Page 45

background image

XL7 User Manual

11.3 High Speed Counter (HSC) Functions

The XL7 supports two very high speed, configurable counters. There are four dedicated inputs that can

be configures to a number of different options. Each of the two counters can run in one of five modes.

Those modes are Totalizer, Frequency Counter, Pulse Width Measurement, Period Measurement and

Quadrature measurement. For some modes, more than one HSC input may be consumed. The

measurement values are provided to ladder in a %AI register (see page 49).

11.3.1 Frequency

In frequency mode, the frequency of the input signal is written to the accumulator in terms of Hertz

(cycles/second). When using frequency mode, four update selections are provided which specify the

width of the sample window. Note that selecting a shorter sample window provides a quicker

measurement (faster response) but lowers the frequency accuracy (resolution) and increases the

minimum frequency measurement limit. In this mode the Disable and Latch special functions are

allowed. Please see section 11.2 for a description of these functions.

11.3.2 Totalize

In totalize mode, the accumulator is simply incremented or decremented each time the input transitions

in a specific direction.

The totalizer supports the following modes:

Internal

This mode ties the input to the counter to an internal 10MHz or 1MHz clock.

The special functions can be used to accurately time events.

Count Up

This increments the accumulator when the input is enabled. Note that two

inputs can be assigned. Either input can cause the counter to increment.

The second input can also be disabled.

Count Down

This decrements the accumulator when the input is enabled. Note that two

inputs can be assigned. Either input can cause the counter to decrement.

The second input can also be disabled.

Up/Down

(Input 1 Up/Input 2 Down)

In this mode, input 1 (assigned to any of the four inputs) increments the

counter, while input 2 (also assigned to any of the 4 inputs) decrements the

counter.

Clk/Dir

(Input 1 Clk, Input 2 Dir)

This mode uses input 1 as a clock signal to increment or decrement the

counter and then uses input 2 to decide the direction. Input 2 disabled

increments the counter, while input 2 enabled decrements the counter.

NOTE: the totalize mode enables the Disable, Latch, Preload, and Clear special functions. Please see

section 11.2 for details.

11.3.3 Pulse Width Measurement

In pulse width measurement mode, the high-speed input can measure the width of a pulse stream in

one of two modes and provides a continuous indication of the last sampled value. In this mode the

Disable and Latch special functions are allowed. Please see section 11.2 for a description of these

functions.

Page 45 of 110