Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety
Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication
your local Rockwell Automation sales office or online at
http://www.rockwellautomation.com/literature/) describes some
important differences between solid-state equipment and hard-wired electromechanical devices. Because of this difference,
and also because of the wide variety of uses for solid-state equipment, all persons responsible for applying this equipment
must satisfy themselves that each intended application of this equipment is acceptable.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from
the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and
requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or
liability for actual use based on the examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or
software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation,
Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous
environment, which can lead to personal injury or death, property damage, or economic loss.
SGI-1.1 available from
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death,
property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the
consequence
SHOCK HAZARD: Labels can be on or inside the equipment, for example, a drive or motor, to alert people that
dangerous voltage can be present.
BURN HAZARD: Labels can be on or inside the equipment, for example, a drive or motor, to alert people that
surfaces can reach dangerous temperatures.
IMPORTANT
Allen-Bradley, Rockwell Software, Rockwell Automation, RS Logix, R SLogix 5000, RSLogix 500, CompactLogix, Compact I/O, ControlLogix, MicroLogix , and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Identifies information that is critical for successful application and understanding of the product.
Summary of Changes
This manual contains new and updated information. Changes throughout this
revision are marked by change bars, as shown to the right of this paragraph.
New and Updated
Information
This table contains the changes made to this revision.
TopicPages
Changes were made to differentiate between the available high speed
counters modules.
8Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Preface
Use this manual if you are responsible for designing, installing, programming, or
troubleshooting control systems that use Compact I/O and/or MicroLogix 1500
or CompactLogix controllers.
Packaged Controller
Functionality
Additional Resources
Both the 1769-L24ER-QBFC1B and 1769-L27ERM-QBFC1B packaged
controllers provide the same high-speed counter (HSC) functionality as the
1769-HSC except for the input frequency.
While many features of the 1769-HSC module are available with the embedded
high-speed counters, some of the features of the 1769-HSC module are not
available with the embedded high-speed counters of the CompactLogix packaged
controllers. Features not available on the embedded high-speed counters include
rate/timer functions and limited output range control (4 ranges instead of the 16
available with the 1769-HSC module). Specific differences between the
1769-HSC module and the packaged controller functionality are noted
throughout this manual.
The CompactLogix Packaged Controllers Quick Start and User Manual,
publication
procedures, and tag descriptions for the embedded high-speed counters.
These documents contain additional information concerning related products
from Rockwell Automation.
ResourceDescription
CompactLogix System User Manual,
publication 1769-UM007
Compact I/O 1769-ADN DeviceNet Adapter User
Manual, publication 1769-UM001
Compact I/O Selection Guide, publication
CompactLogix Packaged Controllers Quick Start and
User Manual, publication
MicroLogix 1500 Programmable Controllers User
Manual, publication
MicroLogix Programmable Controllers Family Selection
Guide, publication 1761-SG001
Industrial Automation Wiring and Grounding
Guidelines, publication
Product Certifications website,
IASIMP-QS010
1764-UM001
1770-4.1
http://www.ab.comProvides declarations of conformity,
1769-SG002Describes the 1769 Compact I/O modules.
Describes how to install, use, and program
your CompactLogix controller.
Describes how to install, and use the
1769-ADN DeviceNet adapter.
Provides a quick start and information on
how to install, use, and program your
CompactLogix packaged controller.
Describes how to install, use, and program
your MicroLogix 1500 controller.
Provides an overview of the MicroLogix
1500 system.
Provides general guidelines for installing a
Rockwell Automation industrial system.
certificates, and other certification details.
You can view or download publications at
http://www.rockwellautomation.com/
literature/. To order paper copies of technical documentation, contact your local
Allen-Bradley distributor or Rockwell Automation sales representative.
Rockwell Automation Publication 1769-UM006E-EN-P - July 20139
Preface
Notes:
10Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Chapter 1
Module Overview
The 1769-HSC module is an intelligent counter module with its own
microprocessor and I/O that is capable of reacting to high-speed input signals.
The module can interface with up to two channels of quadrature or four channels
of pulse/count inputs. The signals received at the inputs are filtered, decoded,
and counted. They are also processed to generate rate and time-between-pulses
(pulse interval) data. Count and rate values can then be used to activate outputs
based on user-defined ranges.
IMPORTANT
For the 1769-L23E-QBFC1B and 1769-L23-QBFC1B packaged controllers
HSC functionality, there is no processing to generate rate or timebetween-pulses data. Only count data is used to activate outputs based
on ranges.
The module counts pulses at up to 1 MHz (250 kHz for the packaged
controllers) from devices such as proximity switches, pulse generators, turbine
flowmeters, and quadrature encoders. The module has four on-board, high-speed
switching outputs. These outputs can be under user program or direct module
control, based on the count value or frequency.
The 1769-HSC module is compatible with MicroLogix 1500 packaged
controllers (1764-LSP/C and 1764-LRP/C modules, firmware revision 6.0 and
later), CompactLogix controllers (generic profiles required for firmware revisions
prior to 11.0), and the 1769-ADN/B DeviceNet adapter.
TopicPage
Counters12
Inputs12
Outputs12
Hardware Features13
Status Indicators14
Rockwell Automation Publication 1769-UM006E-EN-P - July 201311
Chapter 1Module Overview
Counters
Inputs
The module is capable of counting pulses in either direction (forward, reverse, up,
down). A maximum of four pulse counters (or two quadrature counters) are
available. Each 32-bit counter can count to ±2 billion as a ring or linear counter.
In addition to providing a count value, the module provides a rate value up to
±1 MHz, dependent upon the type of input (the L23 packaged controller’s HSC
module functionality does not provide rate values). The rate value (as modified
by scalar) is the input frequency to the counter. When the count value is
increasing, the rate value is positive. When the count value is decreasing, the rate
value is negative.
Counters can also be reset or preset to any value between user-defined minimum
and maximum values. Preset can be accomplished from the user program or at a
Z-input event. The Z-input can also generate a capture value and/or freeze (gate)
the counters.
The module features six, high-speed differential inputs labeled ±A0, ±B0, ±Z0,
±A1, ±B1, and ±Z1. These inputs support two quadrature encoders with ABZ
inputs and/or up to four discrete count inputs. In addition, x1, x2, and x4
encoder configurations are provided to fully use the capabilities of high
resolution quadrature encoders. The inputs can be wired for standard differential
line driver output devices, as well as single-ended devices such as limit switches,
photo eyes, and proximity sensors. Inputs are optically isolated from the bus and
from one another, and have an operational range of 2.6…30V DC.
Outputs
Sixteen outputs are available: four on-board (real) and twelve virtual bits. All
16 outputs can be individually controlled by the module or by the user control
program.
The four on-board (real) outputs are DC sourcing, powered by a user-supplied
(5…30V DC) power source. These outputs are electronically protected from
current overloads and short-circuit conditions. Overcurrent status is monitored
and fed back to the user program. Output states are determined by a combination
of output data, configuration data, ranges, and overcurrent status.
Output Control Example on page 44 for a description of how the module
See
determines output status.
12Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Module OverviewChapter 1
Hardware Features
1
5a
5
5b
The module’s hardware features are illustrated in Figure 1. Refer to Chapter 3 on
page 45 for detailed information on installation and wiring.
For information about the packaged controllers’ hardware features, see the
CompactLogix Packaged Controllers Quick Start and User Manual,
publication
Figure 1 - Hardware Features
02
13
A0 B0
IN OUT
A1 B1Z0Z1
High Speed Counter
Do Not Remove RTB Under Power
Unless Area is Non-Hazardous
Ensure Adjacent
Bus Lever is Unlatched/Latched
Before/After
Removing/Inserting Module
5Removable terminal block (RTB) with finger-safe cover
5aRTB upper-retaining screw
5bRTB lower-retaining screw
6aMovable bus connector (bus interface) with female pins
6bStationary bus connector (bus interface) with male pins
7Nameplate label
8aUpper tongue-and-groove slots
8bLower tongue-and-groove slots
9aUpper DIN-rail latch
9bLower DIN-rail latch
10Write-on label for user identification tags
45271
Rockwell Automation Publication 1769-UM006E-EN-P - July 201313
Chapter 1Module Overview
Status Indicators
02FUSE
OUT
IN
13
AOBOZO
A1B1Z1
High Speed Counter
OK
45272
The front panel of the 1769-HSC module has a total of 12 status indicators.
For information about the packaged controllers’ status indicators, see the
CompactLogix Packaged Controllers Quick Start and User Manual,
publication
Table 1 - Diagnostic Indicators
IndicatorStatusDescription
0 OUTAmberON/OFF logic status of output 0
1 OUTAmberON/OFF logic status of output 1
2 OUTAmberON/OFF logic status of output 2
3 OUTAmberON/OFF logic status of output 3
FUSERedOvercurrent
OKOffNo power is applied
A0AmberON/OFF status of input A0
A1AmberON/OFF status of input A1
B0AmberON/OFF status of input B0
B1AmberON/OFF status of input B1
Z0AmberON/OFF status of input Z0
Z1AmberON/OFF status of input Z1
ALL ONPossible causes for all status indicators to be On include the following:
IASIMP-QS010.
Red (briefly)Performing self-test
Solid greenOK, normal operating condition
Flashing greenOK, module in Program or Fault mode
Solid red or amberHardware error. Cycle power to the module. If problem persists,
Flashing redRecoverable fault. Reconfigure, reset, or perform error recovery.
• Bus error has occurred—controller hard fault. Cycle power.
• During load upgrade of controller—normal operation. Do not cycle power during the
load upgrade.
• All indicators flash on briefly during powerup—normal operation.
replace the module.
Non-critical versus Critical Module Errors on page 113. The
See
OK indicator flashes red for all of the error codes in the
Configuration Error Codes table on page 117.
14Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Chapter 2
Module Operation
This chapter details the operation of the 1769-HSC module. We strongly suggest
that you review this information before configuring your module.
TopicPage
Counter Defaults15
Module Operation Block Diagrams16
Number of Counters18
Summary of Available Counter Configurations18
Input Filtering20
Operational Mode Selection21
Input Frequency28
Counter Types28
Modifying Count Value29
Rate/Timer Functionality32
Output Control36
Counter Defaults
When the module powers up, all output array and configuration array values are
set to their default values. Refer to
Chapter 4 on page 65 or Appendix D on page
149 for default values. All input array values are cleared. None of the module data
is retentive through a power cycle.
Power cycling the module has the following effects:
• Clears stored counts and configurations
• Clears faults and flags
• Turns outputs off
Rockwell Automation Publication 1769-UM006E-EN-P - July 201315
Chapter 2Module Operation
Module Operation Block
Diagrams
To provide an overview of the module operation, the block diagrams indicate
relationships between module functions and configuration parameters.
Inputs
The following diagram illustrates how the inputs function.
Input
Filtering
Decoded
NumberOfCounters
Operational Mode
Pulse
Direction
DirInvert
DirInhibit
Discrete Input State
Count
Min/Max and Linear/Ring
Overflow (ResetOvf)
Underflow (ResetUdf)
Store
CtrnConfig.StorageMode_0
RisingEdgeZ (reset REZ)
ZInhibit
ZInvert
Enable
CtrnEn
CtrnConfig.StorageMode_1
InputStateZn ‘gating’
Direct Write
HiLimOrDirWr
LoadDirectWrite
ToThisCounter
Preset
CtrnSoftPreset
CtrnConfig.StorageMode_2 and Rising Edge Z
Automatic PresetWarning (Preset Warning)
(1) Resets.
Pulse Interval
(1)
(1)
(2) Does not apply topackaged
controller.
(1)
(1)
(2)
See page 32 to
determine howandwhen
to use to calculate rates.
(3)
Rate
Update Time
Scalar
Hysteresis
Rate Valid
Overflow
Underflow
Preset
Direct Write
(3) Does not apply to
packaged controller.
16Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Module OperationChapter 2
Outputs
The following diagram illustrates how the outputs function.
Mode
Discrete
On Mask
Off Mask
Feedback
Object Value
Current Count
Current Rate
Ranges
High Limit
Low Limit
Type
Invert
Counter
Active
Output Control
Range Enable
Run
Program
Fault
Mode (Program/Fault/Run)
Overcurrent
Overcurrent Flags
OverCurrentLatchOff
OverCurrentLatchOff
(1)
Output Real Only)
ResetBlownFuse
Readback (Real and Virtual)
Hold Last State
Program Mode
Fault Mode
User-defined Safe State
Program State
Fault State
Safe State Run
Program State Run
Fault State Run
Program to Fault Enable
(1) In the packaged controller, the Type parameter is fixed at Count because the
rate measurement is not supported.
Rockwell Automation Publication 1769-UM006E-EN-P - July 201317
Chapter 2Module Operation
Number of Counters
Summary of Available
Counter Configurations
The module has six input points: A0, B0, Z0, A1, B1, and Z1. Through these
inputs, the module can function with 1, 2, 3, or 4 counters depending upon the
number of counters and the operational mode configuration of the input points.
The table summarizes the input configurations available for all counters, based on
the number of counters.
No. of CountersCounterOperational ModeGate or Preset Functionality
1 Counter0AnyAll
1 through 3Not available
2 Counters0AnyAll
1AnyAll
2 and 3Not available
3 Counters0AnyAll
1Pulse/Internal DirectionAll
2Pulse/Internal DirectionNone
3Not available
4 Counters0Pulse/Internal DirectionAll
1Pulse/Internal DirectionAll
2Pulse/Internal DirectionNone
3Pulse/Internal DirectionNone
18Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Module OperationChapter 2
The counter options and operating modes are summarized in Figure 2.
Figure 2 - Summary of Available Counters
AO
BO
ZO
A1
Z1
AO
BO
ZO
A1
B1
Z1
Counter 0
Any Mode
Counter 1
Not Available
Counter 0
Any Mode
Counter 1
Pulse
Internal
1 Counter
3 Counters
Counter 2
Not Available
Counter 3
Not Available
(1)
Counter 2
Pulse
Internal
Counter 3
Not Available
(1)
B1
AO
ZO
A1
Z1
AO
BO
ZO
A1
B1
Z1
Counter 0
Any Mode
Counter 1
Any Mode
Counter 0
Pulse
Internal
Counter 1
Pulse
Internal
2 Counters
4 Counters
Counter 2
Not Available
Counter 3
Not Available
(1)
Counter 2
Pulse
Internal
Counter
Pulse
Internal
(1)
B1
BO
45273
(1) The number of counters is defined by the NumberOfCounters bits in word 0 of the configuration array.
Rockwell Automation Publication 1769-UM006E-EN-P - July 201319
Chapter 2Module Operation
Input Filtering
In many industrial environments, high frequency noise can be inadvertently
coupled to the sensor wires. The module can help reject some noise by means of
built-in filters. Inputs are filtered by means of user-selectable, low-pass filters
set up during module configuration.
The available nominal pulse width filters are shown in the table.
The input state bits (InputStateA0 through InputStateZ1) reflect the
filter’s inputs, but are NOT affected by the signal inhibit or invert
operations described on page 30.
Frequency
(1)
Pulse WidthEquivalent
Frequency
(1)
(1)
(1) Equivalent frequency assumes a perfect 50% duty cycle and are for reference purposes only. Hence, the no-filter setting is guaranteed to pass 4 MHz even though the
module’s maximum is 1 MHz. This lets the sensor and wiring to attenuate the pulse to 25% duty cycle while the module maintains pulse recognition.
(1) Equivalent frequency assumes a perfect 50% duty cycle and are for reference purposes only. Hence, the no-filter setting is guaranteed to pass 4 MHz even though the
module’s maximum is 1 MHz. This lets the sensor and wiring to attenuate the pulse to 25% duty cycle while the module maintains pulse recognition.
(1)
Pulse WidthEquivalent
IMPORTANT
Frequency
The built-in filters are simple, averaging, low-pass filters. They are
(1)
Pulse WidthEquivalent
Frequency
(1)
designed to block noise pulses of width equal to the values presented in
Table Filter Pulse Width and Frequency. Applying full amplitude, 50%
duty cycle signals that are of frequency above the selected filter’s
threshold frequency can result in an average value signal of sufficient
amplitude to turn the input on. A transition from no input to the full
amplitude, 50% duty cycle signal (or back to no signal) can result in
inadvertent input transitions.
(1) Low-pass filters block frequencies above the threshold frequency.
20Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Module OperationChapter 2
Operational Mode
Selection
A count channel’s operational mode configuration selection determines how the
A and B inputs cause a counter channel to increment or decrement. The six
available mode selections are the following:
• Pulse/External Direction Input
• Pulse/Internal Direction Input
• Up and Down Pulse Input
• X1 Quadrature Encoder Input
• X2 Quadrature Encoder Input
• X4 Quadrature Encoder Input
IMPORTANT
The operational mode selection is limited by the number of counters
selected.
• With two counters selected, Counters 0 and 1 can be assigned any
operational mode.
• With three counters selected, Counter 0 can be assigned any mode,
but Counters 1 and 2 can only be configured as pulse/internal
direction.
• With four counters selected, all counters must be configured for the
pulse/internal direction mode.
See
Figure 2 on page 19 for the operational modes available for the counters,
based on the number of counters configured.
Direction Inhibit and Direction Invert Output Control Bits
These bits apply to all of the counter modes.
TIP
When set, the Direction Inhibit bit disables any physical input from
affecting count direction.
When set, the Direction Invert bit changes the direction of the counter in
all operational modes.
When Direction Inhibit is set, then Direction Invert is the direction.
Rockwell Automation Publication 1769-UM006E-EN-P - July 201321
Chapter 2Module Operation
Pulse/External Direction Mode Selection
In this mode, the B input controls the direction of the counter, as shown in
Figure 3. If the B input is low (0), the counter increments on the rising edges of
input A. If the input B is high (1), the counter decrements on the rising edges of
input A.
TIP
Two Output Control bits let you modify the operation of the B input from
your control program or during configuration. The Direction Inhibit bit,
when set (1), disables the operation of the B input.
The Direction Invert bit, when set (1), reverses the operation of the
B input, but only if the Direction Inhibit bit is not set. If the Direction
Inhibit bit is set, then the Direction Invert bit controls counter direction:
• When the Direction Inhibit bit is set (1) and Direction Invert = 0, count
direction is up (forward).
• When the Direction Inhibit bit is set (1) and Direction Invert = 1, count
direction is down (reversed).
Figure 3 - Pulse/External Direction Mode (direction inhibit = 0, direction invert = 0)
Encoder or Sensor
Sensor or Switch
Count Pulse
Count Pulse
Direction Control
Input A
Input B
Input Z
Direction Control
High = Decrement
Low = Increment
22Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Count
Table 2 - Pulse External Direction Counting
Module OperationChapter 2
Direction
Inhibit Bit
000 or open1
010 or open-1
100 or open1
110 or open-1
Direction
Invert Bit
Input A (count)Input B (direction) Change in
Count Value
1-1
0, 1, Don’t care0
11
0, 1, Don’t care0
11
0, 1, Don’t care0
1-1
0, 1, Don’t care0
See Direction Inhibit and Direction Invert Output Control Bits on page 21 for
more information.
Pulse/Internal Direction Mode Selection
When the Pulse/Internal Direction mode is selected, the status of the Direction
Invert bit, as controlled by the user program, determines the direction of the
counter. The counter increments on the rising edge of the module’s A input
when the Direction Invert bit is reset (0). The counter decrements on the rising
edge of the A input when the Direction Invert bit is set (1).
Table 3 - Pulse Internal Direction Counting - Counters 0 and 1
Direction
Inhibit Bit
Don’t care0Don’t care1
Don’t care1Don’t care-1
Table 4 - Pulse Internal Direction Counting - Counters 2 and 3
Direction
Inhibit Bit
Don’t care0Don’t care1
Don’t care1Don’t care-1
Direction
Invert Bit
Direction
Invert Bit
Input A (count)Input BChange in Count
Value
0, 1, Don’t care0
0, 1, Don’t care0
Input AInput B (count)Change in Count
Value
Don’t care0, 1, 0
Don’t care0, 1, 0
Rockwell Automation Publication 1769-UM006E-EN-P - July 201323
Chapter 2Module Operation
Up and Down Pulses Mode Selection
In this mode, the counter channel increments on the rising edge of pulses applied
to input A and decrements on the rising edge of pulses applied to input B. When
set, the Direction Inhibit bit causes both A and B to increment. When set, the
Direction Invert bit causes B to increment and A to decrement. When the
Direction Invert and Direction Inhibit bits are both set, both A and B
decrement.
TIP
When both inputs transition simultaneously or near simultaneously, the
net result is no change to the count value.
24Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Table5-UpandDown Counting
Module OperationChapter 2
Direction
Inhibit Bit
000, 1, 1
010, 1, -1
100, 1, 1
110, 1, -1
Direction
Invert Bit
Input A (count)Input B (direction) Change in
Count Value
0, 1, -1
0
0, 1, 1
0
0, 1, 1
0
0, 1, -1
0
X1 Quadrature Encoder Mode Selection
In this mode, when a quadrature encoder is attached to inputs A and B, the count
direction is determined by the phase relation of inputs A and B. If A leads B, the
counter increments. If B leads A, the counter decrements. In other words, when B
is low, the count increments on the rising edge of input A and decrements on the
falling edge of input A. If B is high, all rising transitions on input A are ignored.
The counter changes value only on one edge of input A as shown in Figure 5.
TIP
When both A and B transition at the same time, instead of in the defined
90° phase separation, the quadrature signal is invalid.
For more information see
Direction Inhibit and Direction Invert Output
Control Bits on page 21 and their effect on Quadrature signals on page 27.
Rockwell Automation Publication 1769-UM006E-EN-P - July 201325
The X2 Quadrature Encoder mode operates much like the X1 Quadrature
Encoder except that the resolution is doubled as shown in Figure 5 on
page 26.
X4 Quadrature Encoder Mode Selection
The X4 Quadrature Encoder mode operates much like the X1 Quadrature
Encoder except that the resolution is quadrupled, as shown in Figure 5 on
page 26.
Figure 6 shows how Direction Inhibit and Direction Invert affect the counter.
26Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Module OperationChapter 2
Figure 6 - Operation Using Various Direction Inhibit and Direction Invert Settings
Quadrature
Encoder
Forward Rotation
A
B
DirectionInhibit = 0; DirectionInvert = 0
X1 Count Pulse
X2 Count Pulse
X4 Count Pulse
DirectionInhibit = 0; DirectionInvert = 1
A
B
Z
Input A
Input B
Input Z
Reverse Rotation
X1 Count Pulse
X2 Count Pulse
X4 Count Pulse
DirectionInhibit = 1; DirectionInvert = 0
X1 Count Pulse
X2 Count Pulse
X4 Count Pulse
DirectionInhibit = 1; DirectionInvert = 1
X1 Count Pulse
X2 Count Pulse
X4 Count Pulse
Rockwell Automation Publication 1769-UM006E-EN-P - July 201327
Chapter 2Module Operation
Input Frequency
Counter Types
Maximum input frequency is determined by the input configuration as shown in
the table.
Input ConfigurationInput Frequency
1769-HSC Module
X4 Quadrature encoder250 kHz250 kHz
X2 Quadrature encoder500 kHz250 kHz
All other configurations1 MHz250 kHz
Input Frequency
Packaged Controller
Each of the four possible counters can be configured to stop counting and set a
flag at its limits (linear counter) or to rollover and set a flag at its limits (ring
counter). A counter’s limits are programmed by the CtrnMaxCount and
CtrnMinCount words in the module’s configuration array. Both types are
described below.
Linear Counter
Figure 7 illustrates linear counter operation. In linear operation, the current count
(Ctr[n].CurrentCount) value remains between, or equal to, the
user-programmed minimum count (CtrnMinCount) and maximum count
(CtrnMaxCount) values. If the Ctr[n].CurrentCount value goes above (>) or
below (<) these values, the counter stops counting, and an overflow/underflow
bit is set. The overflow/underflow bits can be reset using the
CtrnResetCounterOverflow and CtrnResetCounterUnderflow bits.
Figure 7 - Linear Counter Diagram
Minimum Count Value
Underflow and Hold
0
Count Up
Counter Value
Count Down
Maximum Count Value
Overflow and Hold
Pulses are not accumulated in an overflow/underflow state. The counter begins
counting again when pulses are applied in the proper direction. For example, if
you exceed the maximum by 1000 counts, you do not need to apply 1000 counts
in the opposite direction before the counter begins counting down. The first
pulse in the opposite direction decrements the counter.
28Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Module OperationChapter 2
Ring Counter
Figure 8 demonstrates ring counter operation. In ring counter operation, the
current count (Ctr[n].CurrentCount) value changes between user-programmable
minimum count (CtrnMinCount) and maximum count (CtrnMaxCount)
values. If, when counting up, the counter reaches the CtrnMaxCount value, it
rolls over to the CtrnMinCount value upon receiving the next count and sets the
overflow bit. If, when counting down, the counter reaches the CtrnMinCount
value, it rolls under to the CtrnMaxCount value upon receiving the next count
and sets the underflow bit. These bits can be reset using the
CtrnResetCounterOverflow and CtrnResetCounterUnderflow bits.
Figure 8 - Ring Counter Diagram
Modifying Count Value
Maximum Count Value
Rollover
Count Down
Minimum Count Value
Count Up
The count value (Ctr[n].CurrentCount) can be stored, reset, or preset using the
Z-input, CtrReset bit in the configuration array, control bits in the output array,
or overwritten using a Direct Write command.
Table6-Available Z Functions
SettingFor function
(1)
Store
HoldWhileZ=1,hold counter at its current value
Preset/ResetOn rising edge of Z, preset the count value to the value in the preset word
(1) If both a store and preset function are configured, the stored count is captured before the preset operation
takes place.
On rising edge of Z, store count in the Stored Count input word
IMPORTANT
Rockwell Automation Publication 1769-UM006E-EN-P - July 201329
Because only the Z-inputs are used for external gating and presetting,
these functions are not available for Counters 2 and 3, which do not have
Z-inputs. All options are always available for Counters 0 and 1,
regardless of input operational mode.
Chapter 2Module Operation
Counter Enable/Disable
The counter can be enabled or disabled using the CtrnEn control bit. Be aware
that disabling the counter does not inhibit any current count loading functions
(for example, preset or direct write) or any Z function.
Z Input Functions
There are three Z input functions: store, gate, and Z preset.
Store
The Z-input can be used to capture the current count value even when the
counter is counting at full 1 MHz speed.
Gate
The Z-inputs can be used to gate (hold) the counter at its current value regardless
of incoming A or B inputs. A gating function is typically one that lets pulses reach
the counter (gate open) or not (gate closed).
Z Preset
Preset can be programmed to occur based on the actions of the Z-input signal.
Inhibit and Invert
The Z-input signals can be inverted and/or inhibited, depending on the user
configuration of the CtrnZInvert and CtrnZInhibit output control bits. If the
signal is inhibited, the invert bit is the Z signal for the actions described above.
For an explanation of those bits, see
Z Inh - Z Inhibit (CtrnZInhibit) on page 93.
and
Z Inv - Z Invert (CtrnZInvert) on page 93
Direct Write
You can arbitrarily change the current count value (Ctr[n].CurrentCount) to the
direct write control value (Range12To15[n].HiLimOrDirWr). This ability
applies to ranges 12…15. The direct write value takes effect when the Load Direct
Write bit (Range12To15[n].LoadDirectWrite) transitions from 0 to 1.
If you attempt to preset and load direct write to a counter at the same time, only
the preset (CtrnPreset) will take effect.
30Rockwell Automation Publication 1769-UM006E-EN-P - July 2013
Loading...
+ 140 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.