Page 2
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.
Page 3
Allen-Bradley programmable controllers. The manual helps you install, program and troubleshoot your module. Audience You must be able to program and operate an Allen-Bradley programmable controller to make efficient use of your FLEX I/O module. In particular, you must know how to program block transfers.
Page 4
P–2 Using This Manual Appendix Title Contents Specifications Specifications for the pulse counter module Conventions We use these conventions in this manual: In this manual, we show: Like this: that there is more information about a topic in another chapter in this manual that there is more information about the topic in another manual More...
Page 5
1794-5.12 1794-NM1 Mounting Kit 1794-2.13 1794-PS1 24V dc Power Supply 1794-5.35 Summary This preface gave you information on how to use this manual efficiently. The next chapter introduces you to the frequency module. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 6
P–4 Using This Manual Publication 1794-6.5.15 – December 1998...
........2–14 Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 8
Table of Contents Programming Your Chapter 3 Incremental Encoder Module What This Chapter Contains ......3–1 Enter Block Transfer Instructions .
Page 9
........A–1 Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
The module has 2 up/down counters, each individually programmable. The number of edges to be counted can be multiplied by 1, 2 or 4 (x1, x2, x4). Pulse transmitters can be complementary or noncomplementary. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
1–2 Overview of the Incremental Encoder Module Optocouplers Preset Register A– Counter Register B– Latch Register Z– Control Word G– Preset Register A– Counter Register B– Latch Register Z– Control Word G– 12–24V dc Gavanically Isolated Internal +5V dc dc/dc Converter What the Incremental The incremental encoder module performs high-speed scaling Encoder Module Does...
Each of the input channels may accept these input signals: A+ and A– B+ and B– Z+ and Z– G+ and G– Allen-Bradley Motors The pulse inputs can accept frequencies up to 100KHz. The module accepts and returns binary data. Publication 1794-6.5.15 – December 1998...
1–4 Overview of the Incremental Encoder Module How the Incremental The counter module handles up/down counting and detection of Encoder Operates selectable number of edges (X1, X2, X4) for incremental encoders with 2 pulse trains, nominal 90 out of phase. The minimum stable input condition is 2µs.The following paragraphs detail operation of the incremental encoder module.
The counter counts up on the positive edge of the pulses at input A, and counts down on the positive edge of input B. Counter Mode = 4 Counter Register Logic Up/Down Input A Input B Counter Value Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
1–6 Overview of the Incremental Encoder Module Count Pulses from Incremental Encoders Pulse Counting Mode (001, 010. 011) Up/Down Counting using pulses at the inputs of A and B If countermode = 1, 2 or 3, then 1, 2 or 4 edges of the pulse train will be counted. The count direction (up/down) is determined by the phase difference of the input signals A and B.
Calibration if G = 1 and all other conditions are fulfilled (refer to Calibrating the Module, chapter ?). Example Gate Control = 1 G = 1 Logic Counter Register Allen-Bradley Motors The counter is counting if G = 1. Publication 1794-6.5.15 – December 1998...
1–8 Overview of the Incremental Encoder Module Store Function Use the store function to copy the value in the counter register (Counter) to the latch register (StoreValue). The StoreControl parameter determines the store function. Execution occurs on either the positive or negative edge of input signals G and Z respectively (see table).
Note: If the preset register value = 0, the counter retains the value 0. Chapter Summary In this chapter, you learned about the incremental encoder module, block transfer communication, and details of how the module functions. Now you can install the module. Install the ID2 Module Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 20
1–10 Overview of the Incremental Encoder Module Publication 1794-6.5.15 – December 1998...
EN 50081-2EMC – Generic Emission Standard, Part 2 – Industrial Environment EN 50082-2EMC – Generic Immunity Standard, Part 2 – Industrial Environment Allen-Bradley Motors This product is intended for use in an industrial environment. Publication 1794-6.5.15 – December 1998...
Programmable Controllers, Part 2 – Equipment Requirements and Tests. For specific information required by EN 61131-2, see the appropriate sections in this publication, as well as the following Allen-Bradley publications: Industrial Automation Wiring and Grounding Guidelines For Noise Immunity, publication 1770-4.1 Guidelines for Handling Lithium Batteries, publication AG-5.4...
24V dc Note: All modules powered by the same power supply must be pulse, frequency or TC/RTD/mV modules for this configuration. Total current draw through any base unit must not be greater than 10A Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
2–4 How to Install Your Incremental Encoder Module Installing the Module Installation of the incremental encoder module consists of: mounting the terminal base unit installing the module into the terminal base unit installing the connecting wiring to the terminal base unit If you are installing your module into a terminal base unit that is already installed, proceed to “Mounting the incremental encoder Module on the Terminal Base”...
Page 25
DIN rail and release the locking tab to lock the 30077–M base in place. Allen-Bradley Motors Gently push the flexbus connector into the side of the adapter to complete the backplane connection. Publication 1794-6.5.15 – December 1998...
2–6 How to Install Your Incremental Encoder Module 5. Repeat the above steps to install the next terminal base. Panel/Wall Mounting Installation on a wall or panel consists of: laying out the drilling points on the wall or panel drilling the pilot holes for the mounting screws mounting the adapter mounting plate installing the terminal base units and securing them to the wall or panel...
The incremental encoder module mounts on a 1794-TB3, TB3S, -TBN or -TBNF terminal base unit. 1. Rotate the keyswitch (1) on the terminal base unit (2) clockwise to position 1 as required for the incremental encoder module. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 28
2–8 How to Install Your Incremental Encoder Module 2. Make certain the flexbus connector (3) is pushed all the way to the left to connect with the neighboring terminal base/adapter. You cannot install the module unless the connector is fully extended.
6V. 2. Connect the associated input common (3-wire devices only) to the corresponding terminal on the 16-33 row (B) for each input as indicated in the table below. (Commons are internally connected Allen-Bradley Motors together.) Publication 1794-6.5.15 – December 1998...
Page 30
2–10 How to Install Your Incremental Encoder Module 3. Terminate shields to terminals 16 or 33 on row B, or 40 through 45 on row C. 4. Connect +24V dc to terminal 34 on the 34-51 row (C). 5. Connect dc return to terminal 16 on the 16–33 row (B). ATTENTION: To reduce susceptibility to noise, power frequency modules and digital modules from separate power supplies.
2–12 How to Install Your Incremental Encoder Module Wiring connections for the 1794–ID2 incremental encoder Module Terminal Base Units Terminal Base Units 1794–TB3, –TB3S 1794–TBN, –TBNF Signal 0V dc 12/24V dc Signal Input incremental encoder Channel 0 A– B– Z– G–...
12/24V dc Example of incremental encoder with 2 pulse trains, with or without reference, and/or gate function. For connection of channel 1, refer to wiring table. Note: Dotted lines indicate signals not always used. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Module Indicators The incremental encoder module has one status indicator (PWR) that is on when power is applied to the module, and one input status indicator for each input (12 in all). Allen-Bradley 1794–ID2 2 CH INCREMENTAL ENCODER MODULE –...
The transferred words contain module status, channel status and input data from the module. Your program should monitor status bits, block transfer read and block transfer write activity. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
3–2 Programming Your Incremental Encoder Module PLC-2 Family Processor The 1794 incremental encoder module is not recommended for use with PLC-2 family programmable controllers due to the number of digits needed for high resolution. Important: The incremental encoder module functions with reduced performance in PLC-2 systems.
1747-SN scanner must be in place before executing the following programs. Chapter 4 contains information on module configuration. For more information on using the 1747-SN scanner module and block transfer programming, refer to publication 1747-6.6, “Remote More I/O Scanner User Manual.” Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 38
3–4 Programming Your Incremental Encoder Module Figure 3.1SLC Programming for the 1794-OF4I Isolated Analog Output Module Program Action BTR_CONTROL PowerUp Bit S2:1 COPY FILE 0000 #B3:100 SOURCE This rung configures the block transfer operation #M0:1.100 DEST type, length, and RIO address at power-up. Bit LENGTH B3:100/7 must be set to 1 to indicate a BTR and bit B3:110/7 must be 0 to indicate a BTW.
Page 39
When a BTW successfully completes and the done bit is detected, the BTR data is copied BTW ENABLE BIT into the N7:0 to N7:7 area. B3:110 CHECK BTW STATUS B3:15 To next page. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 40
3–6 Programming Your Incremental Encoder Module Program Action BTW ERROR BIT B3:10 MOVE 0008 #M1:1.203 When a BTW occurs, the error code is moved SOURCE to N7:17. #N7:17 DEST 0< BTW PENDING B3:15 BTW ENABLE BIT B3:110 CHECK BTW STATUS B3:15 BTR ENABLE BIT BTR DONE BIT...
Page 41
This BTW control word is moved to the M0 file BTW DONE BIT M0:1.200 for the scanner module while the BTW is in DEST ?< B3:10 progress until the enable, done and error bits are turned off. BTW ERROR BIT B3:10 0013 Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
3–8 Programming Your Incremental Encoder Module Chapter Summary In this chapter, you learned how to program your ID2 incremental encoder module using block transfer instructions and ladder logic. Now, you can configure your module. Configure the ID2 Module Publication 1794-6.5.15 – December 1998...
Addendum to configure this module. The IOCONFIG Addendum utility greatly simplifies configuration. If the IOCONFIG Addendum is not available, you must enter data directly into the data table. Use this chapter as a reference when performing this task. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
4–2 Writing Configuration to and Reading Status from Your Module with a Remote I/O Adapter During normal operation, the processor transfers from 1 to 4 words to the module when you program a BTW instruction to the module’s address. Reading Data From Your Read programming moves status and data from the frequency input Module module to the processor’s data table in one I/O scan.
Status for input A (pulse transmitter 1) – This bit, when set, indicates a signal at A. Bit 05 Status for input B (pulse transmitter 1) – This bit, when set, indicates a signal at B. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 46
4–4 Writing Configuration to and Reading Status from Your Module with a Remote I/O Adapter Read Definition Word Bit 06 Status for input Z (pulse transmitter 1) – This bit, when set, indicates a signal at Z. Bit 07 Status for input G (pulse transmitter 1) – This bit, when set, indicates a signal at G. Bit 08 (10) Cal 0 –...
Gate Control bits (11–12) 11–12 No gate function on input G Counting only if G is high (active) Counting only if G is low (inactive) The counter can be calibrated when G is high (active). Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 48
4–6 Writing Configuration to and Reading Status from Your Module with a Remote I/O Adapter Write Definition Word Write Bits 11–12 Store Control bits – These bits will trigger a Store only if the channel Store status bit (L0 or L1) is Word 0 Wor 0 (13–14)
Preset 0 – Value to load or compare with counter 0 Word 3 Bits 00–15 Preset 1 – Value to load or compare with counter 1 Chapter Summary In this chapter, you learned how to configure your module’s features and enter your data. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 50
4–8 Writing Configuration to and Reading Status from Your Module with a Remote I/O Adapter Publication 1794-6.5.15 – December 1998...
5–2 How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter Adapter Input Status Word The input status word consists of: I/O module fault bits – 1 status bit for each slot node address changed – 1 bit I/O status –...
Channel 0 Preset – value to load or compare with counter 0 0 to 7 Words Channel 1 Preset – value to load or compare with counter 1 Not used Not used Not used Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
5–4 How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter Block Transfer Read Word Assignments for the Incremental Encoder Module (1794-ID2) (Octal Bit ) Dec. Bit Word Read Not used Channel 0 – Stored counter value on channel 0 Channel 1 –...
Counter 1 Readback – Counter word readback – last value written to write word 2 Word 7 (00–17) Read Bits 00–15 Revision Read – identification of latest software version code Word 8 (00–17) Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 56
5–6 How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter Word Definition 0–15 (0–17) Control 0 – Control word for setting the function of counter 0. Write Wor 1 Word 1 Bits 00–02 Mode Selection bits Counting on positive (rising) edge of input signal A.
Page 57
Preset 0 – Value to load or compare with counter 0 Word 3 (00–17) Write Bits 00–15 Preset 1 – Value to load or compare with counter 1 Word 4 (00–17) Write Bits 00–15 Not used – set to 0. Words (00–17) 5–7 Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
5–8 How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter Defaults Each I/O module has default values associated with it. At default, each module will generate inputs/status and expect outputs/configuration. Module Defaults for: Factory Defaults Real Time Size Catalog Input Output...
Inputs Inputs Inputs Read Read Words Status Status Status ControlNet Adapter Network Outputs Outputs Outputs Write Write Words Configuration Configuration Configuration Slot 0 Slot 1 Slot 7 Data is exchanged scheduled (when mapped) or unscheduled (using CIO instructions). Allen-Bradley Motors...
6–2 Input, Output and Configuration Files for Analog Modules when used with ControlNet Scheduled Data-Transfer Scheduled data transfer: is continuous is asynchronous to the ladder-logic program scan occurs at the actual rate displayed in the Actual Packet Interval field on the programming software ControlNet I/O mapping (monitor) screen Unscheduled Data-Transfer Unscheduled operations include:...
I/O Module Fault Bits Bit: 10 through 15 Not Used I/O State Bit Created by PLC–5 controller Node Address Changed Bit The adapter input status word bit descriptions are shown in the following table. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
6–4 Input, Output and Configuration Files for Analog Modules when used with ControlNet Bit Description Explanation This bit is set (1) when an error is detected in slot position 0. This bit is set (1) when an error is detected in slot position 1. This bit is set (1) when an error is detected in slot position 2.
I/O module input data sent by the adapter upon module removal is configurable. The adapter can: reset the module output data to zero (reset) leave the module output data in the last state before module removal (hold last state) Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
6–6 Input, Output and Configuration Files for Analog Modules when used with ControlNet Incremental Encoder Module (1794-ID2) Image Table Mapping Module Image ControlNet Files C1 C0 G0 Z0 Input File Size Store 0 – Stored Counter Value on channel 0 1 to 8 Words Store 1 –...
Page 65
Channel 1 Current Counter Value– Current value in counter 1 (00–17) Bits 00–15 Word 5 Channel 0 Readback– Counter word readback) (00–17) Bits 00–15 Word 6 Channel 0 Readback– Counter word readback) (00–17) Bits 00–15 Word 7 Software identification (00–17) Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 66
6–8 Input, Output and Configuration Files for Analog Modules when used with ControlNet Output Definition Word Word 0 Channel 0 Control Word – Control word for setting the function of counter 0. Mode Selection bits Bits 00–02 Counting on positive (rising) edge of input signal A. (Up/dwn counting determined by B.) Quadrature encoder X1 Quadrature encoder X2 Quadrature encoder X4...
Page 67
Store Reset bit – A positive edge on this bit resets Preset Detected in Signals. Word 2 Bits 00–15 Preset 0 – Value to load or compare with counter 0 Word 3 Bits 00–15 Preset 1 – Value to load or compare with counter 1 Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 68
6–10 Input, Output and Configuration Files for Analog Modules when used with ControlNet Configuration Definition Word Word 0 Channel 0 Control Word – Control word for setting the function of counter 0. Mode Selection bits Bits 00–02 Counting on positive (rising) edge of input signal A. (Up/dwn counting determined by B.) Quadrature encoder X1 Quadrature encoder X2 Quadrature encoder X4...
Page 69
Store Reset bit – A positive edge on this bit resets Preset Detected in Signals. Word 2 Bits 00–15 Preset 0 – Value to load or compare with counter 0 Word 3 Bits 00–15 Preset 1 – Value to load or compare with counter 1 Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 70
6–12 Input, Output and Configuration Files for Analog Modules when used with ControlNet Publication 1794-6.5.15 – December 1998...
StoreValue if StoreControl = 0 and Stored = 0. Note that the condition for the latch function is not dependent on the direction and therefore does not automatically occur on that edge of Z which activates calibration. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
7–2 Calibrating Your Incremental Encoder Module Calibration Method 1 Calibration is enabled by the flag CalEnable, which is enabled by the control system. The preset value is copied to the counter register at a positive edge on input Z. The old counter register value is saved in the store register for evalution.
A = Status of input A B = Status of input B Z = Status of input Z G = Status of input G + = Positive count detected – = Negative count detected Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
8–2 Troubleshoot the Incremental Encoder Module Indicator Indication Explanation Yellow Input A active Input A not active Yellow Input B active Input B not active Yellow Input Z active Input Z not active Yellow Input G active Input G not active Yellow On when a positive pulse is detected;...
1 green/red power/status indicator logic side indication) 12 yellow status indicators – logic side Keyswitch Position Dimensions Inches 1.8H x 3.7W x 2.1D (Millimeters) (45.7 x 94.0 x 53.3) Specifications continued on next page. Allen-Bradley Motors Publication 1794-6.5.15 – December 1998...
Page 78
A–2 Specifications Specifications – 1794-ID2 2 Input Incremental Encoder Module Environmental Conditions Operational Temperature 0 to 55 C (32 to 131 F) Note: Do not connect maximum input voltage simultaneously to all inputs if the module ambient temperature is expected to exceed 40 Storage Temperature –25 to 70 C (–13 to 158...
Page 80
Index I–2 ladder-rung messaging, 6–2 unscheduled non-discrete I/O data transfer, 6–2 mapping wall/panel mounting, 2–6 1794-ID2, 4–2, 5–3, 6–6 example, 6–2 wiring, methods of, 2–3 explanation, 6–2 wiring connections, 2–9 Message instructions, 6–2 1794-ID2, 2–12 module fault, 5–2 word assignments block transfer read, 4–3, 5–4 module installation, 2–7 block transfer write, 4–5, 5–4...
Page 81
Sequence What is not in the right order? Other Comments Use back for more comments. Your Name Location/Phone Return to: Marketing Communications, Allen-Bradley Co., 1 Allen-Bradley Drive, Mayfield Hts., OH 44124-6118 Phone: (216)646-3176 Allen-Bradley Motors FAX: (216)646-4320 Publication ICCG-5.21-August 1995...
Page 82
PLEASE FASTEN HERE (DO NOT STAPLE) Other Comments PLEASE FOLD HERE NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES BUSINESS REPLY MAIL FIRST-CLASS MAIL PERMIT NO. 18235 CLEVELAND OH POSTAGE WILL BE PAID BY THE ADDRESSEE 1 ALLEN BRADLEY DR MAYFIELD HEIGHTS OH 44124-9705...
Page 83
Support Services At Allen-Bradley, customer service means experienced representatives at Customer Support Centers in key cities throughout the world for sales service and support. Our value-added services include: Technical Support SupportPlus programs telephone support and 24-hour emergency hotline software and documentation updates...
Page 84
Philippines Poland Portugal Puerto Rico Qatar Romania Russia–CIS Saudi Arabia Singapore Slovakia Slovenia South Africa, Republic Spain Sweden Switzerland Taiwan Thailand Turkey United Arab Emirates United Kingdom United States Uruguay Venezuela Yugoslavia Allen-Bradley Headquarters, 1201 South Second Street, Milwaukee, WI 53204 USA, Tel: (1) 414 382-2000 Fax: (1) 414 382-4444 Publication 1794-6.5.15 – December 1998 PN 955131–51A...
Need help?
Do you have a question about the FLEX I/O 1794-ID2 and is the answer not in the manual?
Questions and answers