Because of the variety of uses for the products described in this
publication, those responsible for the application and use of these
products must satisfy themselves that all necessary steps have been
taken to assure that each application and use meets all performance
and safety requirements, including any applicable laws, regulations,
codes and standards. In no event will Rockwell Automation be
responsible or liable for indirect or consequential damage resulting
from the use or application of these products.
Any illustrations, charts, sample programs, and layout examples
shown in this publication are intended solely for purposes of
example. Since there are many variables and requirements associated
with any particular installation, Rockwell Automation does not assume
responsibility or liability (to include intellectual property liability) for
actual use based upon the examples shown in this publication.
Allen-Bradley publication SGI-1.1, Safety Guidelines for the
Application, Installation and Maintenance of Solid-State Control
(available from your local Rockwell Automation office), describes
some important differences between solid-state equipment and
electromechanical devices that should be taken into consideration
when applying products such as those described in this publication.
Reproduction of the contents of this copyrighted publication, in whole
or part, without written permission of Rockwell Automation, is
prohibited.
Throughout this publication, notes may be used to make you aware of
safety considerations. The following annotations and their
accompanying statements help you to identify a potential hazard,
avoid a potential hazard, and recognize the consequences of a
potential hazard:
WARNING
Identifies information about practices or
circumstances that can cause an explosion in a
hazardous environment, which may lead to personal
injury or death, property damage, or economic loss.
!
ATTENTION
Identifies information about practices or
circumstances that can lead to personal injury or
death, property damage, or economic loss.
!
IMPORTANT
Identifies information that is critical for successful
application and understanding of the product.
Allen-Bradley and SLC are trademarks of Rockwell Automation.
Module Overview
Table of Contents
Preface
Who Should Use This Manual . . . . . . . . . . . . . . . . . . . . . . P-1
The information below summarizes the changes to this manual since
the last printing.
To help you find new information and updated information in this
release of the manual, we have included change bars as shown to the
right of this paragraph.
New Information
The table below lists sections that include new information.
For this new informationSee page(s)
Note on limitations of rate value calculation at input frequencies
below 60 Hz.
Clarified operation of Module Fault (MFLT) bit2-17
Updated resistor information in single-ended wiring diagrams3-9 and 3-10
Clarified programming cycle4-2
Modifications to the COP instruction example for reading and writing
floating point data
Corrected bit identification in Output State Byte4-22
Example showing how to activate debug mode5-10
Corrected bit identification table for Program Ranges BlockC-2
2-11
4-4
1Publication 1746-UM002B-EN-P - August 2004
2 Summary of Changes
Publication 1746-UM002B-EN-P - August 2004
Preface
Read this preface to familiarize yourself with the rest of the manual.
This preface covers the following topics:
• who should use this manual
• how to use this manual
• related publications
• conventions used in this manual
• Rockwell Automation support
Who Should Use This
Manual
Purpose of This Manual
Use this manual if you are responsible for designing, installing,
programming, or troubleshooting control systems that use
Allen-Bradley small logic controllers.
You should have a basic understanding of SLC 500™ products. You
should understand programmable controllers and be able to interpret
the ladder logic instructions required to control your application. If
you do not, contact your local Rockwell Automation representative for
information on available training courses before using this product.
As much as possible, we organized this manual to explain, in
a task-by-task manner, how to install, configure, program,
operate and troubleshoot an SLC 500-based system using the
1746-HSCE2 module.
1Publication 1746-UM002B-EN-P - August 2004
2 Preface
Related Documentation
The table below provides a listing of publications that contain
important information about SLC™ products.
ForRead this documentDocument number
A reference manual containing status file data, instruction
set, and troubleshooting information
A description of how to install and use your Modular
SLC 500 programmable controller
An overview of the SLC 500™ family of productsSLC 500 Systems Selection Guide1747-SG001
In-depth information on grounding and wiring
Allen-Bradley programmable controllers
SLC 500™ Instruction Set Reference
Manual
SLC 500™ Modular Hardware Style
User Manual
Allen-Bradley Programmable Controller
Grounding and Wiring Guidelines
1747-RM001
1747-UM011
1770-4.1
A description of important differences between solid-state
programmable controller products and hard-wired
electromechanical devices
An article on wire sizes and types for grounding electrical
equipment
A glossary of industrial automation terms and
abbreviations
If you would like a manual, you can:
• view and download a free electronic version from the internet at
www.rockwellautomation.com/literature
• purchase a printed manual by contacting your local
Allen-Bradley distributor or Rockwell Automation sales office
Application Considerations for
Solid-State Controls
National Electrical CodePublished by the National Fire
Allen-Bradley Industrial Automation
Glossary
SGI-1.1
Protection Association of Boston,
MA
AG-7.1
Publication 1746-UM002B-EN-P - August 2004
Preface 3
Conventions Used In This
Manual
Your Questions or
Comments on the Manual
The following conventions are used throughout this manual:
• Bulleted lists (like this one) provide information, not procedural
steps.
• Numbered lists provide sequential steps or hierarchical
information.
• Italic type is used for emphasis.
• Text in this font indicates words or phrases you should type.
If you find a problem with this manual, please notify us. If you have
any suggestions for how this manual could be made more useful to
you, please contact us at the address below:
Rockwell Automation
Automation Control and Information Group
Technical Communication, Dept. A602V
P.O. Box 2086
Milwaukee, WI 53201-2086
The 1746-HSCE2 is an intelligent counter module with its own
microprocessor and I/O that is capable of reacting to high-speed input
signals without the intervention of the SLC processor. The module is
compatible with the SLC 500 family and can be used in a remote
chassis with the SLC Remote I/O Adapter Module (1747-ASB).
Counters
The module is able to count in either direction. A maximum of four
pulse counters are available (or 2 quadrature counters). Each counter
can count to +/- 8,388,607 as a ring or linear counter. In addition to
providing a count value, the module provides a rate value up to
+/-1 MHz, dependent on the type of input. The rate value is the input
frequency (in Hertz) 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 preset to any value between the minimum and
maximum values. The conditions that preset the count value and
generate capture values are configured by the gate/preset modes. The
four counters can have different gate/preset modes.
1Publication 1746-UM002B-EN-P - August 2004
1-2 Module Overview
Inputs
The module features six high-speed differential inputs labeled ±A1,
±B1, ±Z1, ±A2, ±B2, and ±Z2. It supports quadrature encoders with
ABZ inputs and/or up to six discrete switches. In addition, x1, x2, and
x4 counting configurations are provided to fully use the capabilities of
high resolution quadrature encoders. The inputs can be wired for
single-ended or differential use. Inputs are opto-isolated from the
backplane.
Outputs
Eight outputs are available, four real (dc sourcing) and four virtual
bits. The virtual outputs are available to the processor only. The real
outputs are protected from overloads by a self-resetting fuse. The
outputs can be controlled by any or all of the counters and/or directly
controlled by the user’s program.
Up to 16 dynamically configurable ranges are available, using rates or
counts to control outputs. The ranges, programmed with range start
and range stop values, can overlap. If the count or rate is within more
than one range, the output patterns of those ranges are combined
(logically ORed) to determine the actual status of the output. When an
output is enabled by more than one counter and/or with the user
program, its output state is determined by logically ORing the
programmed setpoints of all those counters and the user program.
Operation
Module operation is controlled by user-programmed settings in the
following six module programming blocks.
• Module Setup Block
• Counter Configuration Block
• Minimum/Maximum Count Value Block
• Minimum/Maximum Rate Value Block
• Program Ranges Block
• Counter Control Block
Publication 1746-UM002B-EN-P - August 2004
Module Overview 1-3
Most programming parameters, except those in the Module Setup and
Counter Configuration blocks, are dynamic and can be changed
without halting counter operation. The table below lists the static and
dynamic parameters by programming block.
Programming BlockParameter
Ty pe
(1)
Operating Mode
Module Setup
Range Allocation
Interrupt Enable
Static
Rate Value Format
Counter Type
Counter Configuration
Input Configuration
Static
(2)
Gate/Preset Mode
Minimum Count
Min./Max. Count Value
Maximum Count
Preset Value
Min./Max. Rate ValueMinimum Rate
Maximum Rate
(2)
Static
(2)
Static
Dynamic
Dynamic
Counter Number
Range Type
Program Range
Range Number
Start Value
Dynamic
Stop Value
Output Image
Enabled
Soft Preset Only
Internal Direction
Counter Control
Output ON Mask
Dynamic
Output OFF Mask
Count or Rate Value
Range Enable Mask
(1) STATIC = the associated counter must be disabled to set this parameter.
DYNAMIC = this parameter may be changed while the associated counter is running.
(2) Only the selected counter must be disabled.
(3) Under specific conditions, this parameter is dynamic. See page 4-15 for more information.
(3)
Publication 1746-UM002B-EN-P - August 2004
1-4 Module Overview
Operating Class
Module operation differs slightly based on the operating class. The
operating class is selected via the module ID code.
Class 1
Class 1 operation is compatible with all SLC 500 processors. In Class 1
operation, the module uses 8 input and 8 output words and has an
associated ID code of 3511. A maximum of four 16-bit counters are
available in this operating class.
Class 4
Class 4 operation is compatible with SLC 5/03 and above systems. In
Class 4 operation, the module uses 23 input and 8 output words and
has an associated ID code of 15912. A maximum of four 24-bit
counters are available in this class.
Class 1 vs. Class 4 Comparison
ClassClass 1Class 4
Counters16-bit (±32,767)24-bit (±8,388,607)
Input Words8 with limited information.23 with all information.
Backplane InterruptsNot permitted.Permitted.
Use in RIO ChassisPermitted.Not permitted.
Use in ControlNet ChassisNot permitted.Permitted.
Module ID Code351115912
Publication 1746-UM002B-EN-P - August 2004
Module Overview 1-5
Hardware Features
The module’s hardware features are illustrated below. Refer to
Chapter 3 for detailed information on installation and wiring.
Figure 1.1 Hardware Features
Input Status LEDs
Input and Output
Te rm in al s
COUNTER
OUTPUT STATUS
1023
A1 B1 Z1
A2 B2 Z2
INPUT STATUS
HSCE2
Output Status LEDs
RUN
Running Status LED
FLT
Fault Status LED
LEDs
The front panel has a total of twelve indicator LEDs, as shown in
Figure 1.1 on page 1-5.
LEDColorIndicates
0 OUTGreenON/OFF status of real output
1 OUTGreenON/OFF status of real output
2 OUTGreenON/OFF status of real output
3 OUTGreenON/OFF status of real output
RUNGreenRunning status of the module
FLTRedSteady on: Module fault
Flashing: Output overcurrent
A1YellowON/OFF status of input A1
A2YellowON/OFF status of input A2
B1YellowON/OFF status of input B1
B2YellowON/OFF status of input B2
Z1YellowON/OFF status of input Z1
Z2YellowON/OFF status of input Z2
Publication 1746-UM002B-EN-P - August 2004
1-6 Module Overview
Jumpers
Six jumpers select the input voltages for the six inputs A1, B1, Z1, A2,
B2, and Z2. The module accepts input voltages of 5V dc, 12V dc, or
24V dc. See Chapter 3 for jumper locations and settings.
Publication 1746-UM002B-EN-P - August 2004
Module Operation
The chapter contains information about:
• operating modes
• input configurations
• gate/preset modes
• counter types
• rate value
• outputs
• range types
Chapter
2
Operating Modes
The module’s operating mode determines the number of available
counters and which inputs are attached to them. The three operating
modes and their input assignments are summarized in Figure 2.1.
Figure 2.1 Operating Mode Input Assignments
A1
Counter 1
B1
Z1
A2
Counter 2
B2
Z2
Operating Mode 1
Counter 3
Counter 4
A1
Counter 1
Z1
A2
Counter 2
Z2
Operating Mode 3
A1
B1
Z1
A2
Z2
Counter 3
Counter 4
Counter 1
Counter 2
Operating Mode 2
B2
B1
Counter 3
Counter 4
B2
1Publication 1746-UM002B-EN-P - August 2004
2-2 Module Operation
Input Configurations
Input configurations determine how the A and B inputs cause the
counter to increment or decrement. The six available configurations
are:
• Pulse/External Direction
• Pulse/Internal Direction
• Up and Down Pulses
• X1 Quadrature Encoder
• X2 Quadrature Encoder
• X4 Quadrature Encoder
See the Summary of Available Counter Configurations on page 2-8 for
the input configurations available for the counters, based on operating
mode.
Pulse/External Direction
With this configuration, the B input controls the direction of the
counter, as shown below. 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.
Figure 2.2 Pulse/External Direction Configuration
Count Pulse
Encoder or Sensor
Sensor or Switch
Count Pulse
Direction Control
High = Decrement
Low = Increment
Count
12321012
Direction Control
Input A
Input B
Input Z
Publication 1746-UM002B-EN-P - August 2004
Module Operation 2-3
Pulse/Internal Direction
When the Pulse/Internal Direction configuration is selected, a bit
written from the backplane determines the direction of the counter.
The counter increments on the rising edge of the input if the bit is low
(0) and decrements on the rising edge of the input if the bit is high
(1).
Up and Down Pulses
In this configuration, the counter increments on the rising edge of
pulses applied to input A and decrements on the rising edge of pulses
applied to input B.
TIP
When both inputs transition simultaneously or near
simultaneously, the net result is no change to the
count value. Therefore, simultaneous (or near
simultaneous) pulses are ignored and no change in
the count value is reported.
Figure 2.3 Up and Down Pulse Configuration
Increment Pulse
Incrementing Encoder
or Sensor
Decrement Pulse
Decrementing Encoder or
Sensor
Increment Pulse
(Input A)
(count down)
(count up)
Input A
Input B
Input Z
Module
Decrement Pulse
(Input B)
Count
12321012
Publication 1746-UM002B-EN-P - August 2004
2-4 Module Operation
X1 Quadrature Encoder
When a quadrature encoder is attached to inputs A and B, the count
direction is determined by the phase angle between inputs A and B. If
A leads B, the counter increments. If B leads A, the counter
decrements. The counter changes value only on one edge of input A
as shown in Figure 2.4 on page 2-5.
TIP
If 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 transitions on input A are
ignored.
X2 Quadrature Encoder
Like the X1 Quadrature Encoder, the count direction is determined by
the phase angle between inputs A and B. If A leads B, the counter
increments. If B leads A, the counter decrements. However, the
counter changes value on the rising and falling edges of input A, as
shown in Figure 2.4 on page 2-5.
X4 Quadrature Encoder
Operation is similar to the X2 Quadrature Encoder configuration,
except the counter changes value on the rising and falling edges of
inputs A and B as shown in Figure 2.4.
Publication 1746-UM002B-EN-P - August 2004
Figure 2.4 Quadrature Encoder Configurations
A
B
Quadrature
Encoder
Z
Module Operation 2-5
Input A
Input B
Input Z
A
B
123102
X1 Count
X2 Count
X4 Count
IMPORTANT
Forward Rotation
654321102345
12111098765432123456789101 0
11
Reverse Rotation
The input configuration is limited by the operating
mode. In mode 1, Counters 1 and 2 can be assigned
any input configuration. In mode 2, Counter 1 can
be assigned any configuration, but Counters 2 and 3
are configured as pulse/internal direction. In mode
3, all counters have the pulse/internal direction
configuration. See the Summary of Available Counter
Configurations on page 2-8.
Input Frequency
Input frequency is determined by the input configuration as shown in
the table below.
Input ConfigurationInput Frequency
X4 Quadrature Encoder250 kHz
X2 Quadrature Encoder500 kHz
All Other Configurations1 MHz
IMPORTANT
The minimum high and low times for the pulse train
are 475 ns. Therefore, the input pulse train must fall
between a 47.5 to 52.5 percent duty cycle at 1 MHz.
Publication 1746-UM002B-EN-P - August 2004
2-6 Module Operation
Gate/Preset Modes
A counter’s gate/preset mode determines what, if any, gating is
applied to the counter and what, if any, conditions will preset the
counter to the preset value. The Z inputs are the only inputs used for
gating or presetting. The six gate/preset modes are described below.
No Preset
The counter is not preset under any conditions. The Z inputs are not
used.
Soft Preset Only
The counter is preset when the matching preset bit in the SLC 500
output image table experiences a positive transition, but not in
response to the Z input.
TIP
The soft preset bit operates in all the gate/preset
modes except No Preset.
store, continue
counting
Store/Continue
The count value is captured when the module detects an
inactive-to-active transition on the Z input of the counter. This stored
value is made available to the backplane. A stored status bit in the
input image table is set to signal the processor that a new value is
available. This bit is active until the capture value is read by the
processor. Therefore, it is on for a maximum of 10 ms in Class 1, and
a maximum of one scan or 10 ms, whichever is shorter, in Class 4. If a
second capture event occurs before the first is read, the first value is
lost. The count and rate values are not affected by a store event.
Publication 1746-UM002B-EN-P - August 2004
counter has stopped counting
stop count
store count
resume
counting
Module Operation 2-7
Store/Hold/Resume
The count value, captured when the module detects a positive
transition on the Z input, is made available to the backplane. A stored
status bit is set in the input image table to signal the processor that a
new value is available. This bit is active until the capture value is read
by the processor. Therefore, it is on for a maximum of 10 ms in Class
1, and a maximum of one scan or 10 ms, whichever is shorter, in Class
4. The count value is held as long as the Z input is active. Because the
count value is not changing, the rate value is equal to zero while the
counter is held.
Store/Preset/Hold/Resume
stop count,
store count,
store count,
preset, start
counting
counter has
stopped counting
start
counting
from preset
The counter is set to its programmed preset value when the module
detects a positive transition on the Z input of the counter. The capture
value is made available to the backplane. A stored status bit is set in
the input image table to signal the processor that a new value is
available. This bit is active until the capture value is read by the
processor. Therefore, it is on for a maximum of 10 ms in Class 1, and
a maximum of one scan or 10 ms, whichever is shorter, in Class 4. The
preset counter value is held as long as the Z input remains active.
Because the count value is not changing, the rate value equals zero
while the preset value is held.
Store/Preset/Start
The counter is set to its programmed preset value when the module
detects a positive transition on the Z input of the counter. The capture
value is made available to the backplane. A stored status bit is set in
the input image table to signal the processor that a new value is
available.This bit is active until the capture value is read by the
processor. Therefore, it is on for a maximum of 10 ms in Class 1, and
a maximum of one scan or 10 ms, whichever is shorter, in Class 4.
Publication 1746-UM002B-EN-P - August 2004
2-8 Module Operation
Gate and Preset Limitations
Because only the Z inputs are used for external gating and presetting,
the only gate/preset modes available for Counters 3 and 4 are No
Preset and Soft Preset Only. All six modes are always available for
Counters 1 and 2.
IMPORTANT
In Class 1, Operating Mode 2, Counter 2 does not
have a capture value available. In Class 1, Operating
Mode 3, no capture values are available.
Gate and Preset Considerations
Z-pulse Preset Operation
In applications where the Z pulse of the encoder is being used to
preset the position, and where the Z pulse of the encoder is aligned
with either the A or B pulses, the capture or count value may be
affected by ± 1 count. If the Z pulse is edge aligned with the A pulse,
preset operations may not be performed accurately in any of the
quadrature modes. If the Z pulse is edge aligned with the B pulse,
preset operation may not be performed accurately in the X4
quadrature mode only. A small capacitor (for example, 0.01 µF) across
the Z inputs will dis-align these inputs and should correct this
condition.
Summary of Available
Counter Configurations
Publication 1746-UM002B-EN-P - August 2004
The table below summarizes the input configurations and gate/preset
modes available for all counters, based on operating mode.
Operating
Mode
11AllAll
21AllAll
31Pulse/Internal DirectionAll
CounterInput ConfigurationGate/Preset Mode
2AllAll
2Pulse/Internal DirectionAll
3Pulse/Internal DirectionNo Preset or Soft Preset Only
2Pulse/Internal DirectionAll
3Pulse/Internal DirectionNo Preset or Soft Preset Only
4Pulse/Internal DirectionNo Preset or Soft Preset Only
Module Operation 2-9
Counter Types
Each counter can be programmed to operate as a linear or ring
counter. Both types are described below.
Linear Counter
The figure below demonstrates linear counter operation. In linear
operation, the count value must remain within the programmed
minimum/maximum values. If the count value goes above or below
these values, the counter stops counting, and an overflow/underflow
bit is set. In the overflow or underflow condition, the rate value
continues to be updated and valid.
The number of pulses accumulated in an overflow/underflow state
are ignored. The counter begins counting again when pulses are
applied in the proper direction. For example, if you exceed the
maximum by 1,000 counts, you do not need to apply 1,000 counts in
the opposite direction before the counter begins counting down. The
first pulse in the opposite direction decrements the counter.
Figure 2.5 Linear Counter Diagram
Minimum Value
Underflow
Count Up
0
Counter Value
Maximum Value
Count Down
Overflow
Publication 1746-UM002B-EN-P - August 2004
2-10 Module Operation
Ring Counter
Figure 2.6 demonstrates ring counter operation. In ring counter
operation, the count value changes between programmable minimum
and maximum values. If, when counting up, the counter reaches the
maximum value, it rolls over to the minimum value. If, when counting
down, the counter reaches the minimum value, it rolls over to the
maximum value.
Figure 2.6 Ring Counter Diagram
Rate Value
Maximum Value
Rollover
Count Down
Minimum Value
Count Up
The rate value reported to the processor is calculated in counts per
second (Hz), and is available with all input configurations. The input
configuration determines how the rate value is calculated. When the
count value is increasing, the rate value is positive. When the count
value is decreasing, the rate value is negative.
The rate value is generally calculated as follows:
When the first input pulse is received, the value of an independent,
free-running timer (Ta) is recorded. The module waits approximately
16 ms, while counting more input pulses. After 16 ms, the module
waits for the next input pulse, and the value of the independent timer
(Tb) is again recorded. The module then calculates the rate value
using the formula:
number of counts
rate value
------------------------------------------
=
Tb Ta–
Publication 1746-UM002B-EN-P - August 2004
Loading...
+ 110 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.