AB Quality Allen-Bradley 1771-IJ User manual

User
Manual
Encoder/Counter
Modules
(Cat. Nos. 1771ĆIJ and 1771ĆIK)
AllenĆBradley

DeviceNet, DeviceNetManager, and RediSTATION are trademarks of Allen-Bradley Company, Inc.
PLC, PLC–2, PLC–3, and PLC–5 are registered trademarks of Allen-Bradley Company, Inc.
Windows is a trademark of Microsoft.
Microsoft is a registered trademark of Microsoft
IBM is a registered trademark of International Business Machines, Incorporated.
All other brand and product names are trademarks or registered trademarks of their respective companies.

Preface
Publication 1771ĆUM006B-EN-P - June 2002
Using This Manual
Read this preface to familiarize yourself with this manual and to
learn how to use it properly and efficiently.
We assume that you have previously used an Allen-Bradley
programmable controller, that you are familiar with its features, and
that you are familiar with the terminology we use. If not, read the
user manual for your processor before reading this manual.
In this manual, we refer to:
•the individual encoder counter module as the “module.”
•the programmable controller as the “controller” or the
“processor.”
The contents of this manual are as follows:
Chapter Title What's Covered
1 Introduction General overview o the modules
2 Preliminary Adjustments Setting the switches and understanding the operation
3 Installation How to install the modules
4 Module/Processor Communication How the module communicates with the processor
5 Single Trans er Programming How to trans er in ormation with single trans er
programming
6 Block Trans er Programming How to trans er in ormation with block trans er
programming
7 Special Programming Special programs to extend the count beyond 999
Appendix
A Speci ications Module speci ications
We use these conventions in this manual:
In this manual, we show: Like this:
that there is more in ormation about a topic
in another chapter in this manual
that there is more in ormation about the
topic in another manual More
Pre ace Objectives
Audience
Vocabulary
What This Manual
Contains
Conventions

Using This ManualP–2
Publication 1771ĆUM006B-EN-P - June 2002
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
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 may 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.
Important User
In ormation

Using This Manual P–3
Publication 1771ĆUM006B-EN-P - June 2002
This preface gave you information on how to use this manual
efficiently.
Summary

Using This ManualP–4
Publication 1771ĆUM006B-EN-P - June 2002

Publication 1771-UM006B-EN-P - June 2002
Chapter 1
General 1-1...........................................
General Description 1-1...................................
Status Indicators 1-3.....................................
System Power 1-4.......................................
External Power 1-4......................................
Chapter 2
General 2-1...........................................
Block Trans er/Single Trans er 2-1...........................
Count Resolution 2-2.....................................
Encoder Counter Selection 2-2..............................
Binary/BCD Data Format 2-4...............................
1771ĆIJ 2-4............................................
1771ĆIK 2-5............................................
Setting Switch Assemblies 2-7..............................
Chapter 3
Environment and Enclosure 3-1.............................
Module Placement 3-2....................................
Recommended Cable 3-2.................................
Shielded Cable 3-4......................................
Keying 3-5............................................
Speci ications 3-5.......................................
Chapter 4
General 4-1...........................................
Outputs Words 4-2......................................
Input Status Word 4-2....................................
Chapter 5
General 5-1...........................................
Output Words Ć Single Trans er 5-1...........................
Output Control Word 5-1................................
Preset Words 5-4.....................................
Single Trans er Description 5-5..............................
Example Rungs Ć No Preset Words Used 5-7..................
Multiplexing 5-8.........................................
Scan Counter Ć PLCĆ2 Family Processors 5-9.................
Scan Counter Ć PLC Processor 5-10.........................
Example Program Ć Single Trans er 5-12........................
Table of Contents
Introduction
Preliminary Adjustments
Installation
Module/Processor
Communication
Single Trans er
Programming

Table of Contentstoc-ii
Publication 1771-UM006B-EN-P - June 2002
Chapter 6
General 6-1...........................................
Output Words - Block Trans er 6-1...........................
Output Control Word 6-1................................
Preset Words 6-4.....................................
Example Block Trans er Programs 6-5........................
PLCĆ2 Family Processors 6-5.............................
Rung Descriptions 6-6..................................
PLCĆ3 Family Processors 6-7.............................
PLCĆ5 Family Processors 6-9.............................
Chapter 7
Extending the Count Beyond 999 7-1.........................
Rung Descriptions (Figure 7.2) 7-4.......................
Appendix A
Speci ications A-1.......................................
Block Trans er Programming
Special Programming
Speci ications

Chapter 1
Publication 1771ĆUM006B-EN-P - June 2002
Introduction
This publication describes installation, adjustments and the
programming necessary for communication between the
Encoder/Counter Module (cat. no. 1771-IJ,-IK) and a programmable
controller processor. The programming techniques given here enable
the processor to direct the operation of the encoder/counter module
and to monitor its status.
The encoder/counter module can be used with any Allen-Bradley
processor that uses the 1771 I/O structure.
Depending on the intended use of the encoder/counter module, two
different programming methods can be used. These methods are:
•Single transfer programming
Use single transfer only if the module is in a local I/O chassis and
generally when not using preset words. (If using preset words
with single transfer, you must use multiplexing as described in
section titled Multiplexing in Chapter 5). If using single transfer,
disregard chapter 6 on block transfer.
•Block transfer programming
Use block transfer any time. If using block transfer, disregard
chapter 5 on single transfer.
The encoder/counter module maintains a count, independent of the
processor, of input pulses that typically originate from such devices
as quadrature type encoders, high speed optical beam counters, and
certain types of switches. The module (Figure 1.1) is capable of
making decisions based on the count total by comparing it to
previously programmed values and activating either one or both of
its outputs based on the results of the comparison. The module can
also return the accumulated count to the processor for arithmetic
computations or display.
The module also provides inputs for a marker signal from an encoder
and a voltage level signal from a limit switch to allow for home
positioning. In the count mode, the direction of the count can be
changed either from the processor or, for speed critical application, at
the module itself through an external switch. The maximum
detectable input pulse frequency of the module is 50kHz.
General
General Description

1–2 Introduction
Publication 1771ĆUM006B-EN-P - June 2002
Figure 1.1
Encoder Counter Module (cat. no. 1771ĆIJ/IK)
Slotted or I/O
Insertion Only
Protective Cover
Label Identi ies User
Output Connections
Brown
Identi ication
Label
Field Wiring Arm
Connects Here
Status
indicators
15942
The module will count in either BCD or binary numbers. In the
BCD mode, the range is 000 to 999 with carry and borrow bits
provided to cascade counters in the program. The binary mode
allows a higher count total, with a range of 0000 to 409510, but the
number appears at the processor in binary. Additionally, the module
can improve the accuracy of certain quadrature type of encoders by
adding the count at both channel A and channel B (times 2 mode), or
by counting the rising and falling of both channel inputs to give a
fourfold increase in the count (times 4 mode).
The encoder/counter module is available in two versions:
•cat. no. 1771-IJ - uses a 5V dc external power supply that allows
inputs to be TTL compatible. Outputs can either be driven from
the 5V dc supply through the module or from a separate load
supply of a different voltage.
•cat. no. 1771-IK - uses a 12-24V dc external power supply. Input
devices should be compatible with the voltage of the external
power supply. Outputs can be driven either from the external
supply through the module or from a separate load supply.

1–3Introduction
Publication 1771ĆUM006B-EN-P - June 2002
The encoder/counter module is shipped with two 12 terminal
gold-plated Field Wiring Arms (cat. no. 1771-WB).
Unless otherwise noted, this manual refers to both versions of the
module.
There are seven status indicators (Figure 1.2) on the front of the left
half of the module. The four indicators, corresponding to channel A,
channel B, marker, and switch inputs, illuminate when their
respective input signals are high. The next two indicators show the
state of the outputs. An output indicator is on when the output
circuit is activated. The bottom indicator illuminates when the
module detects a fault.
Figure 1.2
Red LED Status Indicators
Channel A
Channel B
Marker
Limit
Output 1
Output 2
Fault
15943
When system power is turned on, the module runs a self-test. During
power-up, it is normal for the fault indicator to flash on momentarily.
If the FAULT LED does not turn off, the module has detected a fault.
The self-test includes checks to make sure that all counters and
registers have been reset to zero and memory is cleared. If a
breakdown of communication occurs during block transfer, the
FAULT LED will also light. Bit 14, the diagnostic bit in the input
status word, is also set anytime the FAULT LED is on.
After power-up, the module will stay in its reset state (outputs
disabled and counter held reset) until the necessary control bits are
set in the program.
Status Indicators

1–4 Introduction
Publication 1771ĆUM006B-EN-P - June 2002
System power is supplied through the I/O chassis backplane from the
5V dc chassis power supply. The module requires a current of 1.4A.
The sum of the current requirements of all modules in the chassis
must not exceed the power supply or backplane rating.
The module requires an external power supply connected to the field
wiring arm. For the 1771-IJ, the supply must be able to deliver
140mA at 5V dc +0.25V with less than 50mV ripple, peak-to-peak.
The 1771-IK requires 110mA at 12V dc or 200mA at 24V dc, with
less than 50mV ripple, peak-to-peak. These requirements are for the
module only. The current requirements of all output devices, if they
are to be driven directly from the module, must be added to the
requirements of the module.
It is also possible to drive output devices from a separate load supply,
using the output on the module only as a switch. When the output is
on and conducting, a maximum of 0.5V dc is dropped across it. The
load supply voltage should not exceed 30V dc. Refer to Figure 1.3
for the necessary modifications to the wiring diagram.
Figure 1.3
Modi ication o Output Circuit or Application o Separate Load Power Supply
Module
+-+Load -
Load
Output Return
11
Right
External
Module
Output
15944
12
2 or 4
Common
External
Supply Power
Supply
Transistor
Module
Swing Arm
I multiple sources are used, maintain isolation between supplies.
The power for the input device can be provided by the module’s
external power supply, but, unlike the power for the output device,
this is not available through the module. If a high degree of isolation
is needed, use a separate input power supply. If a limit switch is
used, the limit switch input is configured to accept an “on” voltage
of 12 to 48V dc, requiring a maximum of 10mA at 48V dc.
System Power
External Power

Chapter 2
Publication 1771ĆUM006B-EN-P - June 2002
Preliminary Adjustments
The module has programming options (Table 2.A) that are selected
by setting the five switches on the programming option switch
assembly (SW-1). These options include the choices between
encoder and counter operation, block transfer or single transfer, BCD
or binary data formats and count resolution in the encoder mode.
Table 2.A
Programming Option Switch Assembly SWĆ1
1 2, 3 4 5
On
Single
Trans er
See Table 2.B
Multiplier or
Count
Resolution
Encoder
Mode Binary
O Block
Trans er
Counter
Mode BCD
Block transfer/single transfer (switch 1) - Use single transfer
programming only when the module is in a local I/O chassis. This
type of programming shifts a single word of data each program scan
from the processor’s data table to the module. It therefore takes
three program scans to send a new control word and the two preset
values to the module. However, once new data has been sent to the
module, it will remain active until another transfer updates it.
The input status word will always appear at the proper address
location in the input image table. To use single transfer
programming, switch 1 must be set to single transfer (on).
Block transfer moves all three data words from the processor to the
module in a single scan. Since the module has bidirectional block
transfer, the processor must also be programmed to read for block
transfer, or the data table will not display the status word. To use
block transfer, switch 1 must be set for block transfer (off).
General
Block Trans er/Single
Trans er

2–2 Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
Count resolution (switches 2 and 3) - In the encoder mode, the
accuracy of a quadrature type encoder can be improved by allowing
the module to count the pulse trains at both channel inputs. This
doubles the number of pulses counted for the same degree of rotation
at the encoder. A further improvement can be made by letting the
module count the leading and trailing edges of both pulse trains,
thereby counting four times (times 4) for the same degree of rotation.
Certain applications may need the actual count and module should be
set for times 1 (the pulse is counted on its rising edge as high true).
The count resolution setting affects the total count kept at the module
and as it is sent back in the status word. Programming manipulations
of the status word and the preset values must account for the
multipliers. The count resolution setting may also be limited by the
program scan time if the carry or borrow bits are used to cascade
counters.
Note: In the counter mode, the count resolution setting (Table 2.B)
has no effect on the count.
Table 2.B
Count Resolution Settings
Multiplier Switch 2 Switch 3
Times 1 On On
Times 2 On O
Times 4 O O
Encoder/counter selection (switch 4) - In the encoder mode, the
module counts the number of input pulses entering on channel A
from a quadrature type encoder. By comparing the phase
relationship between input pulses on channel A and pulses appearing
at channel B, it knows whether to add or subtract the incoming count
from the total (that is, whether to count up or down). The phasing
(Figure 2.1) between the channels is determined by the direction in
which the encoder is turned. To use the module in the encoder mode,
switch 4 must be set to encoder (on).
Count Resolution
Encoder Counter Selection

2–3Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
Figure 2.1
Input Pulses
Time
Encoder
Channel A
Channel B
x1
x2
x4
Up
Pulsed
to
Counter
Encoder
Channel A
Channel B
x1
x2
x4
Down
Pulsed
to
Counter
15945
In the counter mode, the module adds the incoming pulses on
channel A. The count is incremented on the rising edge of the pulse
(high true). The direction of the count can be controlled with either
the control word or an external switch wired to channel B. Channel
B must be left unconnected if the count direction is to be software
controlled. Typical input device counting might be high speed static
switches and incremental encoders. Mechanical switches are not
recommended as input counting devices used with the 1771-IJ
because the contact bounces might be counted as pulses. However,
the 1771-IK can be used with a mechanical switch, provided the
module is configured for mechanical counting (filter has been put in)
and the counting frequency does not exceed 50Hz. To use the
module in the counter mode, switch 4 must be set to counter (off).

2–4 Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
Binary/BCD data format (switch 5) - The preset values and the
accumulated total in the status word have the option of appearing in
either BCD or binary formats. If the BCD format is selected, the
processor can directly manipulate these values in comparisons or
arithmetic functions but the accumulated value is limited to a count
between 000 and 999. The binary option allows an increased range
of 0000 to 409510. With some processors, the programming must
reconstruct a BCD number from the binary value. To select binary
mode, set switch 5 on. To select BCD mode, set switch 5 off.
Because different types of input devices are compatible with
different voltage ranges, the 1771-IJ (5V dc) and 1771-IK (12-24V
dc) input channels are configured differently.
Because the 1771-IJ module is designed to work with 5V TTL type
devices, each input channel and the marker input can be set for
single ended or differential line inputs (Table 2.C). The input device
should be capable of providing 16mA of sink current. The module
detects a voltage of 2.4V dc or above at either channel as logic “1”
or true. A voltage below 0.6V dc is considered as logic “0” or false.
Table 2.C
Input Con iguration Switch Assembly 1771ĆIJ SWĆ2
1 2 3
Marker Chan. B Chan. A
On Single ended Single ended Single ended
O Di erential Di erential Di erential
The marker input registers as true when the input pulse from the
encoder is high.
The limit switch input senses a voltage of greater than 10 volts dc as
logic “1” (on), and less than 5 volts dc as logic “0” (off). The input
voltage that appears through the switch should be from a 12 to 48V
dc external supply capable of supplying 10mA of source current at
48V dc. The limit switch input has a signal delay of 16ms (+7ms)
because of the filtering needed to protect against contact bounce.
The channel B input can be used in the counter mode to select count
direction. If the channel B input terminal is not connected, the
control word in the output program selects the direction of the count.
For external hardware control, the count direction bit in the control
word must be set to count up.
Then if channel B is allowed to float high or is driven high, the
module counts up; if it is pulled low, either through a gate or a
transistor switch, it will count down.
Binary/BCD Data Format
1771ĆIJ

2–5Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
No special filtering is provided on channel B, since the filtering
necessary for a mechanical switch would defeat the purpose of a very
fast count direction change that is not dependent on the processor
scan time. Therefore, a transistor switch or gate should be used to
pull the channel B input low. The gate or switch must sink 14ma of
current to pull the channel B input low. The count changes direction
in less than 0.01ms from the time channel B input changes state.
The 1771-IK module is designed to accept several types of devices
that will operate in the 12 to 24V dc range (Figure 2.2). Since most
high voltage quadrature encoder outputs produce signals through an
open collector output, the module is configured for a pull-up on
channel B. Channel A must be set for a pull-up by setting switch 1
on and switch 2 off. Some counting devices may also use a pull-up
arrangement.
Figure 2.2
Input Con iguration or Channel A o the 1771ĆIK Showing Functions o Switch
Assembly SWĆ2
Channel A
Common
Channel A
Switch 1
Module
Switch 1 -- Pull up
Switch 2
Switch 3
Sensing
15946
External Voltage
Circuits
Switch 2 -- Pull down
Switch 3 -- Filter
Switch Assembly SW2
The settings on the input configuration switch assembly SW-2 are
not the same on the 1771-IJ as they are for 1771-IK. Refer to
Table 2.D for switch settings.
1771ĆIK

2–6 Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
Table 2.D
Input Con iguration Switch Assembly (1771ĆIK) SWĆ2
Switch 1 Switch 2 Switch 3
On PullĆup PullĆdown Filter in (50 Hz)
O Float Float Filter out (50K Hz)
Certain counting devices may need an input designed to pull current
down through the device. Switch 2 should be set on for pull-down
and switch 1 left off. The module detects a minimum of 7.2V dc at
its input channels as true for a 12V dc external supply and 14.4V dc
at 24V dc external supply. A signal with a maximum voltage of
4.8V dc is considered false for a 12V dc supply and 9.6V dc is false
for a 24V dc supply. Each input channel sinks 10mA at 12V dc and
20mA at 24V dc.
If it is necessary to debounce a contact type of device, such as a
switch, the filter can be added across the inputs by setting switch 3
on. By adding the filter to the circuit, the maximum counting
frequency the module will detect is 50Hz.
Channel B input and the marker input are for open collector encoder
drivers (the channel B input has an internal pull-up) and are not
switch selectable. The marker input reads a signal as high true.
The limit switch input senses a voltage of greater than 10 volts dc as
a logic “1” (on), and less than 5 volts dc as a logic “0” (off). The
input voltage that appears through the switch should be from a 12 to
48V dc external supply that is capable of supplying 10mA of source
current at 48V dc. The limit switch input has a signal delay of 16 ms
(+7ms) because of the filtering needed to protect against contact
bounce.
The channel B input can be used in the counter mode to select count
direction. If the channel B input terminal is not connected, the
control word in the output program selects the direction of the count.
For external hardware control, the count direction bit in the control
word must be set to count up.
Then if channel B is allowed to float high or is driven high, the
module counts up; if it is pulled low, either through a gate or a
transistor switch, it will count down. Any gate or switch should be
compatible with the external voltage supply (12 to 24V dc).

2–7Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
No special filtering is provided on channel B, since the filtering
necessary for a mechanical switch would defeat the purpose of a very
fast count direction change that is not dependent on the processor
scan time. Therefore, a transistor switch or gate should be used to
pull the channel B input low, sinking 10mA at 12V dc or 20mA at
24V dc. The count changes direction in less than 10 microseconds
from the time channel B input changes state.
Refer to the connection diagrams (Figures 3.1 and 3.2) for
interfacing different devices.
Switch assembly settings-these features are selected on two switch
assemblies that are located on the circuit board underneath the
component cover.
To select these options, proceed as follows:
1. Take off the left-side cover by removing the four slotted screws.
2. Refer to Figure 2.3. Identify the programming option switch
assembly (SW-1) and the input configuration switch assembly
(SW-2).
Figure 2.4
Location o Switch Assemblies
159 47
O
N
O
F
F
O
N
O
F
F
Input
Con iguration
Switch
Assembly SWĆ2
Programming
Options
Switch
Assembly SWĆ1
Setting Switch Assemblies

2–8 Preliminary Adjustments
Publication 1771ĆUM006B-EN-P - June 2002
3. Set the switches of SW-1 (Table 2.E) according to the desired
programming options. The settings for the count resolution
switches (times 1, 2, or 4) do not matter if the counter mode has
been selected. The tip of a ball point pen can be used to set the
rocker arm of a switch. Do not use a pencil because the point can
break off and jam the switch.
4. Set the three switches of SW-2 (Table 2.E) according to the input
configurations that have been chosen.
5. Replace the component cover and tighten the screws.
Table 2.E
Programming Option Switch Assembly SWĆ1
1 2, 3 4 5
On
Single
Trans er
See Table 2.B
Multiplier or
Count
Resolution
Encoder
Mode Binary
O Block
Trans er
Counter
Mode BCD
This manual suits for next models
1
Table of contents
Other AB Quality Media Converter manuals