AB Quality Allen-Bradley 1771-IJ User Manual

Encoder/counter modules

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading

Summary of Contents for AB Quality Allen-Bradley 1771-IJ

  • Page 1 Allen Bradley User Encoder/Counter Modules Manual (Cat. Nos. 1771 IJ and 1771 IK)
  • 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. All other brand and product names are trademarks or registered trademarks of their respective companies.
  • Page 3 Preface Using This Manual Preface Objectives Read this preface to familiarize yourself with this manual and to learn how to use it properly and efficiently. Audience 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.
  • Page 4 P–2 Using This Manual Important User Because of the variety of uses for the products described in this Information 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.
  • Page 5 Using This Manual P–3 Summary This preface gave you information on how to use this manual efficiently. Publication 1771 UM006B-EN-P - June 2002...
  • Page 6 P–4 Using This Manual Publication 1771 UM006B-EN-P - June 2002...
  • Page 7: Table Of Contents

    Table of Contents Introduction Chapter 1 General ......... . . General Description .
  • Page 8 toc-ii Table of Contents Block Transfer Programming Chapter 6 General ......... . . Output Words - Block Transfer .
  • Page 9: Introduction

    Chapter Introduction General 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.
  • Page 10 1–2 Introduction Figure 1.1 Encoder Counter Module (cat. no. 1771 IJ/IK) Slotted for I/O Insertion Only Brown Identification Label Status indicators Protective Cover Label Identifies User Output Connections Field Wiring Arm Connects Here 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.
  • Page 11 Introduction 1–3 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. Status Indicators There are seven status indicators (Figure 1.2) on the front of the left half of the module.
  • Page 12 1–4 Introduction System Power 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. External Power The module requires an external power supply connected to the field wiring arm.
  • Page 13 Chapter Preliminary Adjustments General 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.
  • Page 14 2–2 Preliminary Adjustments Count Resolution 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.
  • Page 15: Preliminary Adjustments

    Preliminary Adjustments 2–3 Figure 2.1 Input Pulses Time Channel A Encoder Channel B Pulsed Counter Channel A Encoder Channel B Down Pulsed 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).
  • Page 16 2–4 Preliminary Adjustments Binary/BCD Data Format 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.
  • Page 17 Preliminary Adjustments 2–5 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.
  • Page 18 2–6 Preliminary Adjustments Table 2.D Input Configuration Switch Assembly (1771 IK) SW 2 Switch 1 Switch 2 Switch 3 Pull up Pull down Filter in (50 Hz) Float Float Filter out (50K Hz) Certain counting devices may need an input designed to pull current down through the device.
  • Page 19 Preliminary Adjustments 2–7 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.
  • Page 20 2–8 Preliminary Adjustments 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.
  • Page 21 Chapter Installation Environment and Enclosure Environment and Enclosure ATTENTION This equipment is intended for use in a Pollution Degree 2 industrial environment, in overvoltage Category II applications (as defined in IEC publication 60664–1), at altitudes up to 2000 meters without derating. This equipment is considered Group 1, Class A industrial equipment according to IEC/CISPR Publication 11.
  • Page 22 3–2 Installation Preventing Electrostatic Discharge ATTENTION This equipment is sensitive to electrostatic discharge, which can cause internal damage and affect normal operation. Follow these guidelines when you handle this equipment: • Touch a grounded object to discharge potential static. • Wear an approved grounding wriststrap.
  • Page 23 Installation 3–3 Figure 3.1 Connection Diagram Showing Typical 1771 IJ Encoder Application Output #1 TTL Load Output Channel A Common Output Output Encoder Return Channel B Output #2 Common TTL Load Marker Out pu t Common Device Assigned (At I/O Rack Assigned Chassis) Limit...
  • Page 24: Shielded Cable

    3–4 Installation Figure 3.2 Connection Diagram Showing Typical 1771 IK Counter Applications with External Count Direction Output #1 dc Load 12-24V Channel A Counter Common Device Channel B Common Output #2 Marker dc Load 12-24V Common Assigned Assigned Limit Transistor Switch Switch Ground at...
  • Page 25: Keying

    Installation 3–5 Keying Plastic keying bands provide an easy method for keying an I/O slot to accept only one type of module. Use of keying bands is strongly recommended to prevent accidental insertion of the wrong type of module. The module is slotted in two places on its rear edge. The position of the keying bands on the backplane connector must correspond to these slots to allow insertion of the module.
  • Page 26 3–6 Installation Publication 1771 UM006B-EN-P - June 2002...
  • Page 27: General

    Chapter Module/Processor Communication General Communication between the processor and the encoder/counter module is bidirectional. This means that information is transferred to and from the module: the processor instructs the module to perform specific functions and may provide values to be compared on the module and used for output control;...
  • Page 28: Outputs Words

    4–2 Module/Processor Communication Outputs Words The program controls encoder/counter module operation through the output words. These words function as follows: • Control word – the control word, as its name implies, instructs the module on its operation and on control of its own outputs. By setting specific control word bits, you set up the module’s initial mode of operation and can subsequently alter module operation as the application requires.
  • Page 29 Module/Processor Communication 4–3 Bits 00–13 of this word show the accumulated count kept by the module. This count may be stored either in BCD form, as 000–999 (decimal) or in 12–bit binary form, as a binary value from 0000 0000 0000 to 1111 1111 1111.
  • Page 30 4–4 Module/Processor Communication Publication 1771 UM006B-EN-P - June 2002...
  • Page 31: General

    Chapter Single Transfer Programming General Single transfer programming is one method for coordinating and controlling bidirectional module/processor communication. This method can only be used when the module is in a local I/O chassis. Single transfer may be the recommended method even where block transfer capability is available.
  • Page 32 5–2 Single Transfer Programming Figure 5.1 Control Word Single Transfer Function Control Bits FUNCTION Count Reset, and hold the accumulated count at 000. Return the accumulated count to 000 and begin counting immediately. Invalid, module executes previously programmed function. Bits 10 11, Function Control (see table) Bits 14 17, Word Select Bits.
  • Page 33 Single Transfer Programming 5–3 Note that if a device is wired to channel B for external control of count direction, the up/down bit must be set to 1. Count direction can be externally controlled by using a transistor switch, as described in chapters 2 and 3.
  • Page 34: Preset Words

    5–4 Single Transfer Programming Bits 00-05 are significant only when one or both preset words are used. These bits establish the comparison conditions for module control of its outputs. As Figure 5.1 shows, bits 00-02 set up parameters for comparison with preset word #1; bits 03-05 set up parameters for comparison with preset word #2.
  • Page 35: Single Transfer Description

    Single Transfer Programming 5–5 Figure 5.3 Preset Word #2 Single Transfer Bits 14 17 = Word Select Bits, must have this pattern for Preset Word #2.. Preset Value 17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00 Most Middle Least...
  • Page 36 5–6 Single Transfer Programming Bidirectional single transfer programming, then, requires both an input image table and an output image table word. The addresses of these image table words depend on the location of the I/O module in the chassis. For example, for modules in I/O rack 1, module group 6, the corresponding output image table word is 016;...
  • Page 37: Example Rungs No Preset Words Used

    Single Transfer Programming 5–7 However, in some applications, one or both preset words must be used. Here, the complication involving the output image table word is readily apparent: it must be used to serve multiple purposes; not only will this word send the output control word, it is also needed to send one or both preset words to the module.
  • Page 38: Multiplexing

    5–8 Single Transfer Programming Rung 4 shows the input status word examined in the user program. Note that this word is automatically in the input image table when single transfer is selected. The processor automatically updates this word each I/O scan. In summary, when you are not using preset words, you need only set bits of the output image table word which corresponds to the module.
  • Page 39: Scan Counter Plc 2 Family Processors

    Single Transfer Programming 5–9 Table 5.A Scan Count Sequencing At Count: Program Executes Command To: I/O Scan: PUT Control word into output word Sends output word PUT Preset word #1 into output word Sends output word PUT Preset word #2 into output word Sends output word This count is the scan counter Accumulated value for PLC 2, PLC 2/15, PLC 2/20, and Mini PLC 2 Controllers.
  • Page 40: Scan Counter Plc Processor

    5–10 Single Transfer Programming Figure 5.6 Scan Counter PLC 2 Processors PR003 AC000 PR003 AC000 Branch End Instruction 15957 The output instruction of both rungs in Figure 5.6 is an up-counter (CTU) instruction. The first rung, since it is unconditional, is always true.
  • Page 41 Single Transfer Programming 5–11 In order to keep track of both I/O and program scans, the PLC scan counter rungs manipulate a particular type of memory bit. This must be a bit in the input image table which is not wired to a corresponding input device, so that the bit is turned off each I/O scan.
  • Page 42: Example Program Single Transfer

    5–12 Single Transfer Programming Note: In some applications, it may be feasible to designate an input location for the purpose of scan counter control. In this instance, an on-delay timer (TON) instruction can be used to multiplex output data to the encoder/counter module. A timer with 0.1-second resolution is acceptable for this purpose.
  • Page 43 Single Transfer Programming 5–13 The following assumptions are made for this sample program: • Encoder/counter module is in I/O rack 1, module group 2. • Output control word is stored in word 051. • Preset words #1 and #2 are stored in words 052 and 053, respectively.
  • Page 44 5–14 Single Transfer Programming Publication 1771 UM006B-EN-P - June 2002...
  • Page 45: General

    Chapter Block Transfer Programming General Block transfer programming is available with all Allen-Bradley processors that use the 1771 I/O structure. Block transfer is specifically intended for use with I/O modules such as the encoder/counter module, that perform more complex operations than simple on/off input sensing or output switching. For the operation of such modules, multiple words of data must be transferred to or from the processor.
  • Page 46 6–2 Block Transfer Programming Figure 6.1 Control Word Block Transfer Mode Bit 03, Up/down 1 = count up 0 = count down (Significant in counter mode only) Bits 00 01 Function Bits 05 17, Not used. Control (See Table) May have any setting 17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00 É...
  • Page 47 Block Transfer Programming 6–3 The module indicates it has reset its count to zero by setting the home bit (bit 17 in the input status word). It resets this bit when the home latch enable bit (bit 04) is reset. (Refer to Figure 4.2, Input Status Word).
  • Page 48: Preset Words

    6–4 Block Transfer Programming Preset Words In block transfer communication, preset words #1 and #2 have the format of Figure 6.2. Here bits 00-13 store the preset value. When BCD operation has been selected, these bits may represent a value from 000-999.
  • Page 49: Example Block Transfer Programs

    Block Transfer Programming 6–5 Note that there is no identifying bit pattern to distinguish preset words #1 and #2 from each other. The encoder/counter module identifies these words by their order of transmission in block transfer. As these words are stored in memory, preset word #1 is stored in the word immediately following the output control word.
  • Page 50: Rung Descriptions

    6–6 Block Transfer Programming Rung Descriptions Rungs 1 and 2 - These rungs request the block transfer write (BTW) and block transfer read (BTR) operations. Rung 3 - When the processor successfully completes a BTR operation, it sets the done (DN) bit and enables the file-to-file move (FFM) instruction.
  • Page 51: Plc 3 Family Processors

    Block Transfer Programming 6–7 PLC 3 Family Processors Use the following ladder logic with PLC-3 or PLC-3/10 processors. This program assumes that your application requires a single BTR and BTW instruction to pass data between the processor and the module. Ladder logic alternates the execution of BTR and BTW instructions.
  • Page 52 6–8 Block Transfer Programming Figure 6.6 Sample Ladder Logic for PLC 3 Block Transfer RUNG NUMBER RM1 S0003 A XOR B = R A XOR B = R A : WB001:0030 A : WB001:0020 B : WB001:0030 B : WB001:0020 R : WB001:0030 R : WB001:0020 RUNG NUMBER RM2...
  • Page 53: Plc 5 Family Processors

    Block Transfer Programming 6–9 PLC 5 Family Processors You can use the following ladder logic with PLC-5 processors. This program assumes that your application requires a single BTR and BTW to pass data between the processor and the module. Ladder logic alternates the execution of BTR and BTW instructions. The processor checks data validity before accepting read data, and sets one enable bit at a time.
  • Page 54 6–10 Block Transfer Programming Figure 6.8 Example Ladder Logic for PLC 5 Block Transfer File 2, Rung 0 N10:10 N11:10 BLOCK TRNSFR WRITE Rack Group Module Control Block N10:10 Data File N10:15 Length Continuous File 2, Rung 1 N10:10 N11:10 BLOCK TRNSFR READ Rack Group...
  • Page 55: Extending The Count Beyond

    Chapter Special Programming Extending the Count The input Status word stores a maximum count of 999 (BCD). If Beyond 999 using binary resolution, the maximum count is 1111 1111 1111 (4095 binary). To count beyond these full scale values, you may want to use either of the following ladder programs for PLC–2 or PLC–3 family processors.
  • Page 56 7–2 Special Programming Figure 7.1 Ladder Logic for Extending the Count Beyond 999 (PLC-2 Program) SUBTRACT PREVIOUS COUNT FROM CURRENT COUNT. STORE IN 0077. CURRENT PREVIOUS NEW/OLD IJ/IK SCAN COUNT COUNT COUNT DIFF. 0113 0577 0077 IF THE DIFFERENCE IS GREATER THAN A CONSTANT (COUNT PASSED THROUGH ZERO), THEN INCREMENT THE COUNT.
  • Page 57 Special Programming 7–3 Figure 7.2 Ladder Logic for Extending the Count Beyond 999 (PLC-3 Program) RUNG NUMBER RMO MOVE WITH MASK A : WB002:0200 0110000101011100 B : WB005:0000 000011111111111111 R : WB005:0001 0000000101011100 MOVE FROM A TO R A : WB005:0001 0000000101011100 R : WN005:0000 RUNG NUMBER RM1...
  • Page 58: Rung Descriptions (Figure 7.2)

    7–4 Special Programming Rung Descriptions (Figure 7.2) Rung 0 – This rung strips the upper byte of the count value and stores the value. A = BTR status B = Mask R = Temporary count storage with upper byte removed A = Temporary count storage with upper byte removed R = New count value...
  • Page 59: Specifications

    Appendix Specifications Specifications - 1771 IJ and IK Encoder Counter Modules General Input Specifications Number of Counters Counter Input Single channel (counter) (switch selectable) Dual channel (encoder) Input Pulse Rate 50KHz maximum Data Transfer Modes Single transfer mode (switch selectable) Block transfer mode 1771-IJ External supply...
  • Page 60 A–2 Specifications Specifications - 1771 IJ and IK Encoder Counter Modules Indicators 2 Channel A and B status 1 Marker 1 Limit 2 Output 1 and 2 1 Red Fault Keying 1771-IJ Left connector: Between 6 and 8; 18 and 20 Right connector: Between 4 and 6;...
  • Page 61 Specifications A–3 Specifications - 1771 IJ and IK Encoder Counter Modules Field Wiring Arm Wiring 14-22AWG (2.5-0.25mm ) solid or stranded copper wire rated at 60 C or Size greater 3/64 inch (1.2mm) maximum Insulation Category Certifications UL Listed Industrial Control Equipment (when product is marked) CSA Certified Process Control Equipment European Union 89/336/EEC EMC Directive,...
  • Page 62 A–4 Specifications Publication 1794 UM006B-EN-P - June 2002...
  • Page 63 Index Numbers 1771-IJ, description, 1-2 indicators, status, 1-3 1771-IK, description, 1-2 input configuration switch, 2-6 input status word, 4-2 bit description output word for block transfer, 6-3 keying band placement, 3-4 single transfer, 5-2 keying the I/O slot, 3-4 block transfer output words, 6-1 preset words, 6-4 block transfer programming, 6-1...
  • Page 64 Index I–2 scan counter, PLC 2, 5-9 selection cable, 3-2 encoder/counter, 2-2 setting switches, 2-7 single transfer bit description, 5-2 output words, 5-1 preset words, 5-4 status indicators, 1-3 switch data format, 2-4 input configuration, 2-6 settings, 2-7 Publication 1771-UM006B-EN-P - June 2002...
  • Page 65 Allen Bradley Publication Problem Report If you find a problem with our documentation, please complete and return this form. Encoder Counter Modules User Manual Pub. Name 1771 IJ, 1771-IK 1771 UM006B-EN-P June 2002 957678-18 Cat. No. Pub. No. Pub. Date Part No.
  • Page 66 Other Comments I–2 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 TECHNICAL COMMUNICATION 1 ALLEN BRADLEY DR MAYFIELD HEIGHTS OH 44124-9705 Publication 1771-UM006B-EN-P - June 2002...
  • Page 67 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 •...
  • Page 68 Publication 1771-UM006B-EN-P - June 2002 PN957678-18 Supersedes publication 1771-6.5.6 - May 1988 and 1771-6.5.6-RN1 - November 1995 Copyright 2002 Rockwell Automation, Inc. Printed in USA...

This manual is also suitable for:

Allen-bradley 1771-ik

Table of Contents