Counter view parameters

The
Counter
view includes these parameters:
TIP:
These parameters are not available in Run mode.
Parameter
Description
Type
Choose the desired Counter configuration type. The available values are:
  • Counter (default)
    - Reads incoming pulses from a maximum of two pulse counters, pulse generators (VHSC device only), mechanical limit switches, or other similar devices and returns them to the controller processor as a binary integer number (0...16,777,215).
  • Encoder X1
    – Reads incoming quadrature pulses and returns them to the controller as a binary number (0...16,777,215). Quadrature input signals count on the leading edge or the trailing edge of channel A for a bidirectional count. The phase relationship between Channel A and Channel B determines the direction. If channel A is leading and channel B is floating, the count direction is up; if channel A is lagging and channel B is high, the count direction is down.
  • Encoder X2
    - Reads incoming quadrature pulses and returns them to the controller as a binary number (0...16,777,215). Quadrature input signals count on the leading edge and the trailing edge of channel A for a bidirectional count. Channel B determines the direction. If B is low (that is, floating), the count direction is up; if B is high, the count direction is down.
  • Encoder X4
    - Reads incoming quadrature pulses and returns them to the controller as a binary number (0...16,777,215). Quadrature input signals count on the leading edge and the trailing edge of channel A and channel B for a bidirectional count. Channel B determines the direction. If B is low (that is, floating), the count direction is up; if B is high, the count direction is down.
  • Pulse Width Modulation (PWM)
    - Generates a pulse width modulation signal that may be tied to any output. By specifying a Time Base period and Gate Interval when Pulse Width Modulation is selected for the type of input counter, a counter and its first ON/OFF window comparator are assigned and the signal is generated.
  • Period/Rate
    - Use the Period/Rate mode to determine the frequency of input pulses by counting the number of internal 5 MHz clock pulses over a user-specified number of input signal pulses. At the end of the specified number of pulses, the device returns the frequency and the total number of pulses received.
  • Continuous/Rate
    - The Continuous/Rate mode is similar to the Period/Rate mode, except that the outputs in this mode are dynamic outputs. Use this mode to determine the frequency of input pulses by counting the number of internal 5 MHz clock pulses over a number of input signal pulses you specify. Each output is turned on as soon as the turn-on count is reached, and turned off as soon as the turn-off count is reached. As the internal 5 MHz clock is counted, the outputs dynamically track the 5 MHz count. This allows you to turn an output on a certain number of 5 MHz counts after the Gate/Reset pin goes active, and turn it off a certain number of 5 MHz counts later.
  • Rate Measurement
    - Counts incoming pulses on channel A depending on the time interval specified in the Time Base and Gate Interval fields. At the end of the interval, the device returns a value representing the sampled number of pulses and a value indicating the incoming frequency. When the count and frequency are updated, any associated outputs are checked against their associated presets. The total count equals the number of pulses received during the sample period.
  • Pulse Generator
    – Generates a pulse that may be tied to an output. Pulse Generator Type is only available for the Very High Speed Counter (VHSC) device.
Store Count Mode
Choose the desired Store Count Mode.
The store count feature lets the device store the current count value of the associated counter. Store count is triggered by the state of the Gate/Reset terminal on the device. The stored count value remains until a new trigger pulse is received at the Gate/Reset terminal. When a new trigger pulse is received, the old count value is overwritten by the new value. The available values are:
  • Store Count Disabled
    - The counter storage mode is disabled.
  • Store/Continue
    - In this mode, the leading edge of a pulse input on input Z (Gate/Reset) terminal causes the current value in the counter to be read and stored. The counter will continue counting. The stored count information remains until it is overwritten by new data.
  • Store/Wait/Resume
    - In this mode, a rising edge of a pulse input on the Z Gate/Reset terminal reads and stores the current counter value and inhibits counting while the Gate/Reset terminal is high. Counting resumes on the falling edge of the pulse at the Z Gate/Reset terminal. The stored count remains until it is overwritten with new data.
  • Store-Reset/Wait/Start
    - In this mode, the rising edge of a pulse on the input Z (Gate/Reset) terminal causes the counter to stop counting, read, and store the current count value and reset the count to zero. The counter does not count while the Z input on the Gate/Reset terminal remains high. Counting resumes from zero on the falling edge of the pulse at the Z input (Gate/Reset) terminal. The stored count remains until it is overwritten with new data.
  • Store-Reset/Start
    - In this mode, on the rising edge of a pulse at the Z input (Gate/Reset) terminal causes the counter to store the accumulated count value and reset the counter to zero. The counter continues counting while the Z Gate/Reset input is high. The stored count remains until it is overwritten with new data.
Store Count Mode
is disabled when Counter Type is set to one of these values:
  • Pulse Width Modulation
  • Period/Rate
  • Continuous/Rate
  • Rate Measure
The default value for
Store Count Mode
is Store Count Disabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
The value for
Store Count Mode
is Null & Disabled when Counter Type is set to one of these values:
  • Pulse Width Modulation (PWM)
  • Period/Rate
  • Continuous/Rate
  • Rate Measurement
Rollover
Each of the two counters has one rollover value associated with it. When the rollover value is reached by the encoder/counter, it resets to 0 and begins counting again. The rollover values range from 1...16,777,216 binary. These words set the number of counts the counter will accumulate before rolling over. For example, a value of 1000 will produce a count sequence of: 998, 999, 0, 1, 2... while incrementing or 2, 1, 0, 999, 998... while decrementing. The values are ignored when the device is operating in Rate Measurement mode.
Rollover
is enabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
The default value is 16,777,215 for these counter types. The Output On/Off value in the
Windows
view must be set and the preset value must be less than or equal to the rollover value.
Rollover
is disabled when Counter Type is set to one of these values:
  • Pulse Width Modulation (PWM)
  • Period/Rate
  • Continuous/Rate
  • Rate Measurement
  • Pulse Generator (VHSC device only)
Preset
Each of the 2 counters has one preset value associated with it. In the encoder or counter modes, the preset value represents a reference (starting) point (or count) from which the device begins counting. It is set to 0 in other modes. The device counts either up or down from the preset value. Preset values range from 0...16,777,215 binary.
Preset
is enabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
  • Pulse Width Modulation (PWM)
  • Pulse Generator (VHSC device only)
The default value is 0 for these counter types. The preset value must be less than the rollover value.
Preset
is disabled when Counter Type is set to one of these values:
  • Period/Rate
  • Continuous/Rate
  • Rate Measurement
Counter Attenuator
Use the counter attenuator to modify the preset value. Counter attenuator values range from 0...255.
Counter Attenuator
is enabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
  • Pulse Width Modulation (PWM)
The default value is 1 for these counter types.
Counter Attenuator
is disabled when Counter Type is set to one of these values:
  • Period/Rate
  • Continuous/Rate
  • Rate Measurement
  • Pulse Generator (VHSC device only)
The default value is 0 for these counter types.
Frequency Precision
The Frequency Precision value multiplies the frequency by the value entered in this field. Valid values include:
  • 0.0001
  • 0.001
  • 0.01
  • 1
  • 10
  • 100
Frequency Precision
is enabled when Counter Type is set to one of these values:
  • Rate Measurement
  • Period/Rate
  • Continuous/Rate
The default value is 1 for these counter types.
When the Scaler value is 16, 32, 64, and 128, the Frequency Precision value must be less than or equal to 1.
Frequency Precision
is disabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
  • Pulse Width Modulation (PWM)
  • Pulse Generator (VHSC device only)
Filter
Choose a filter frequency for a counter input (Filter A, Filter B, or Filter Z (Gate/Reset)). The filter frequency is only applied to the inputs for the Input Counter that has filtering chosen (a value other than No Filter is selected). By default, all the filters are chosen.
Valid selections are:
  • No Filter, 50 kHz, 5 kHz, 500 Hz, and 50 Hz (default) (Non Pulse Generator mode)
  • No Filter, 12.5 kHz, 1.25 kHz, 125 Hz, and 12.5 Hz (default) (Pulse Generator mode)
Invert Input Z
Select to invert the Z input value. The default is unchecked.
Invert Input Z
is enabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
  • Period/Rate
  • Continuous/Rate
  • Pulse Generator (VHSC device only)
Invert Input Z
is disabled when Counter Type is set to one of these values:
  • Pulse Width Modulation (PWM)
  • Rate Measurement
Scaler
Scaling lets the input pulses at the Gate/Reset (Z input) to be divided by a value.
Valid values are: 1 (default), 2, 4, 8, 16, 32, 64, 128. When the Scaler value is 16, 32, 64, or 128, the Frequency Precision value must be less than or equal to 1.
Scaler
is enabled when Counter Type is set to one of these values:
  • Period/Rate
  • Continuous/Rate
  • Pulse Generator (VHSC device only)
Gate Multiplier
There are four choices for how incoming count at the Gate/Reset terminal are scaled. The counter gate interval is set using the time base setting as its time unit and is calculated in this manner:
  • 1 <= Gate Multiplier <= 200
There is one Gate/Reset input for each of the 2 counters. The Gate Multiplier, when active, functions in one of the available four counter storage modes. You have the option to scale the incoming count at the Gate/Reset terminal. For scaling, the incoming pulses at Gate/Reset are divided by a number in the range of 1, 2, 4, 8, 16, 32, 64 and 128.
The product of the Gate Multiplier value and the Time Base value must not exceed 3 seconds (3000 milliseconds).
Gate Multiplier
is enabled when Counter Type is set to one of these values:
  • Pulse Width Modulation (PWM)
  • Rate Measurement
The default value is 1 for these counter types.
Gate Multiplier
must be set to 0 when the Type is not PWM or Rate Measurement.
Gate Multiplier
is disabled when the Counter Type value is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
  • Period/Rate
  • Continuous/Rate
  • Pulse Generator (VHSC device only)
Time Base
Sets the fundamental time base for both counters. The resolution is in multiples of 10 ms, with a minimum of 10 ms intervals (10 ms = 10; 1 s = 1000).
Time base
must be entered when the Pulse Width Modulation (PWM) and rate measurement are configured. The maximum programmed value is 3000 ms (3 s).
Time Base
is enabled when Counter Type is set to one of these values:
  • Pulse Width Modulation (PWM)
  • Rate Measurement
The default value is 1000 for these counter types.
Time Base
is disabled when Counter Type is set to one of these values:
  • Counter
  • Encoder X1
  • Encoder X2
  • Encoder X4
  • Period/Rate
  • Continuous/Rate
  • Pulse Generator (VHSC device only)
Actual Gate Interval
Actual Gate Interval
is a read-only field that displays the product of the Gate Multiplier and the Time Base when the Type is set to Pulse Width Modulation (PWM) or Rate Measurement. The product of the Gate Multiplier and the Time Base must fall within the valid range of 10...3000 ms.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal