Allen-Bradley PLC-5 User Manual

Allen-Bradley PLC-5 User Manual

Enhanced and ethernet plc-5 programmable controllers
Hide thumbs Also See for PLC-5:
Table of Contents

Advertisement

Enhanced and
Ethernet PLC-5
Programmable
Controllers
1785-L11B, -L20B, -L30B, -L40B,
-L40L, -L60B, -L60L, -L80B, -L20E,
-L40E, -L80E, -L26B, -L46B, -L86B
User Manual

Advertisement

Table of Contents
loading

Summary of Contents for Allen-Bradley PLC-5

  • Page 1 Enhanced and Ethernet PLC-5 Programmable Controllers 1785-L11B, -L20B, -L30B, -L40B, -L40L, -L60B, -L60L, -L80B, -L20E, -L40E, -L80E, -L26B, -L46B, -L86B User Manual...
  • Page 2 Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (Publication SGI-1.1 available from your local Rockwell Automation sales office or online at http://www.ab.com/manuals/gi) describes some important differences between solid state equipment and hard-wired electromechanical devices.
  • Page 3: Summary Of Changes

    Troubleshooting and Diagnostics Additional Ethernet PLC-5 Controller Enhancement Ethernet PLC-5 controllers support use of the 1785-RC Relay Cartridge. The relay cartridge serves as an interface from the controller to a user-supplied external device such as an Allen-Bradley 700P relay. When the controller is in run mode, it monitors online ladder program edits and I/O forcing activity.
  • Page 4 Summary of Changes Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 5: Table Of Contents

    Purpose of This Manual........P-1 Related PLC-5 Documentation ......P-1 Terms Used in This Manual.
  • Page 6 Using This Chapter ........5-1 Introduction to PLC-5 Controller Scanning ....5-1 Program Scanning .
  • Page 7 Using This Chapter ........7-1 Configuring Communication to a PLC-5 Adapter Channel ..7-2 Specify an Adapter Channel’s Communication Rate,...
  • Page 8 Table of Contents Communicating with Devices on a Serial Link Communicating with Devices on an Ethernet Network Publication 1785-UM012D-EN-P - July 2005 Monitoring General Status ......9-11 Estimating DH+ Link Performance .
  • Page 9 Performance: Ethernet PLC-5 Controller to Ethernet PLC-5 Controller ........11-38 Chapter 12 Using This Chapter .
  • Page 10 Table of Contents Preparing Power-Up Routines Preparing Fault Routines Publication 1785-UM012D-EN-P - July 2005 Step 2 - Use the Programming Software to Enter or Edit the Data You Want to Force in the Extended Force Configuration Table........13-7 Step 3 - Use the Programming Software to Enter Force Values for the Specified Data Table Files .
  • Page 11 Using Main Control Programs Using Selectable Timed Interrupts Using Processor Input Interrupts System Specifications Processor Status File Chapter 16 Using This Chapter ........16-1 Selecting Main Control Programs .
  • Page 12 Table of Contents Maximizing System Performance Instruction Set Quick Reference Publication 1785-UM012D-EN-P - July 2005 Appendix C Using This Chapter ........C-1 Program Scan .
  • Page 13 PLC-5 Controller ........
  • Page 14 Table of Contents Cable Reference Index Publication 1785-UM012D-EN-P - July 2005 Appendix G Using This Chapter ........G-1 Channel 0 Pin Assignments .
  • Page 15: Purpose Of This Manual

    Documentation Using This Manual The purpose of this manual is to help you design, operate and maintain an Enhanced and Ethernet PLC-5 programmable controller system. Use this manual to: determine the features of the controllers and how you use them...
  • Page 16: Terms Used In This Manual

    I/O connected to a controller across a parallel link to achieve higher throughput, thus limiting its distance from the controller a parallel link for carrying I/O data between a PLC-5/40L or -5/60L controller and extended-local I/O adapters used to generically reference Enhanced PLC-5 and Ethernet PLC-5...
  • Page 17: Manual Overview

    Manual Overview Section: For information about: Design An overview of the PLC-5 controllers’ capabilities and keyswitch Guidelines for selecting and placing I/O modules The proper environment for your PLC-5 system Choosing addressing mode, assigning rack numbers, and understanding PLC-5 memory...
  • Page 18 Preface Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 19: Using This Chapter

    Using a controller channel as a remote I/O scanner Using a controller channel as a remote I/O adapter Using a PLC-5/40L, -5/60L programmable controller as an extended-local I/O scanner Lay out the system by determining the network configuration and the placement of components in each location.
  • Page 20: Identifying Controller Components

    Understanding Your Programmable Controller Identifying Controller Components Publication 1785-UM012D-EN-P - July 2005 For a PLC-5 controller to control I/O modules, both the controller and the I/O modules must be directly attached to the same network. I/O Location Controller in Panel A, chassis 1...
  • Page 21: Plc-5/11, -5/20, And -5/26 Controller Front Panels

    Configure these 3-pin ports for: remote I/O scanner remote I/O adapter, DH+ communication unused PLC-5/11, -5/20, and -5/26 Controller Front Panels PLC-5/11 Controller PLC-5/20 or -5/26 Controller channel 1A communication port; this 3-pin port is a dedicated DH+ port Understanding Your Programmable Controller...
  • Page 22: Controller Front Panel

    I/O adapter, DH+ communication unused Publication 1785-UM012D-EN-P - July 2005 PLC-5/30 Controller Front Panel channel 0-25-pin D-shell serial port; supports standard EIA RS-232C and RS-423 and is RS-422A compatible Use this port with ASCII or DF1 full-duplex, half-duplex master, and half-duplex slave protocols. The port's...
  • Page 23 I/O scanner, remote I/O adapter, DH+ communication unused PLC-5/40, -5/46, -5/60, -5/80, and -5/86 Controller Front Panel channel 0-25-pin D-shell serial port; supports standard EIA RS-232C and RS-423 and is RS-422A compatible Use this port with ASCII or DF1 full-duplex, half-duplex master, and half-duplex slave protocols.
  • Page 24: Plc-5/20E Controller Front Panel

    Configure this 3-pin port for: remote I/O adapter DH+ communication Publication 1785-UM012D-EN-P - July 2005 PLC-5/20E Controller Front Panel channel 1B status indicator (lights green and red) channel 1B communication port; its default configuration is remote I/O scanner PLC-5/20E...
  • Page 25: Plc-5/40E And -5/80E Controller Front Panels

    I/O scanner remote I/O adapter DH+ communication unused PLC-5/40E and -5/80E Controller Front Panels channel 2, Ethernet transmit indicator (green when the channel is communicating) channel 0-25-pin D-shell serial port; supports standard EIA RS-232C and RS-423 and is RS-422A compatible Use this port with ASCII or DF1 full-duplex, half-duplex master, and half-duplex slave protocols.
  • Page 26: Plc-5/40L And -5/60L Controller Front Panels

    I/O adapter, DH+ communication unused Publication 1785-UM012D-EN-P - July 2005 PLC-5/40L and -5/60L Controller Front Panels channel 0*25-pin D-shell serial port; supports standard EIA RS-232C and RS-423 and is RS-422A compatible Use this port with ASCII or DF1 full-duplex, half-duplex master, and half-duplex slave protocols.
  • Page 27 Use the keyswitch to change the mode in which a controller is operating. If You Want to Run your program. Outputs are enabled. (Equipment being controlled by the I/O addressed in the ladder program begins operation.) Force I/O. Save your programs to a disk drive (during operation). Enable outputs.
  • Page 28: Programming Features

    (SFCs) Structured text Main Control Programs (MCPs) Publication 1785-UM012D-EN-P - July 2005 This table highlights the programming features of a PLC-5 programmable controller. Lets You program using a language that is representative of relay logic. Choose this language if you are more familiar with ladder logic than with programming languages such as BASIC Your plant personnel may be more familiar with ladder logic;...
  • Page 29: Using A Controller Channel As A Remote I/O Scanner

    I/O adapter modules. The scanner-mode PLC-5 controller can: gather data from node adapter devices in remote I/O racks process I/O data from 8-, 16-, or 32-point I/O modules...
  • Page 30: Using A Controller Channel As A Remote I/O Adapter

    Understanding Your Programmable Controller Using a Controller Channel as a Remote I/O Adapter In this example, a PLC-5/40 controller channel is the supervisory (scanner-mode) controller of the 1771-ASB module and the PLC-5/20 controller. Connect the controllers via the remote I/O link.
  • Page 31 PLC-2/20 and PLC-2/30 controllers PLC-3 and PLC-3/10 controllers PLC-5/15 and PLC-5/25E controllers All Enhanced and Ethernet PLC-5 controllers; separate channels can be configured for a remote I/O scanner and an adapter PLC-5/V30, PLC-5/V40, PLC-5/V40L, and PLC-5/V80 controllers PLC-5/250 controllers All PLC-5 family controllers, except the PLC-5/10, can operate as remote I/O adapter modules...
  • Page 32: Using A Plc-5/40L, -5/60L Programmable Controller As An Extended-Local I/O Scanner

    I/O adapter module (1771-ALX) form an extended-local I/O link. The extended-local I/O link is a parallel link that enables a PLC-5/40L or -5/60L controller to scan a maximum of 16 extended-local I/O chassis. Due to the cabling design, you can remove an adapter module from a chassis on the extended-local I/O link without disrupting communication to other chassis on the extended-local I/O link.
  • Page 33: Chapter 2 Using This Chapter

    Selecting I/O module density Placing I/O modules in a chassis 2-3 Select I/O modules to interface your PLC-5 controller with machines or processes that you determine while analyzing your plant operation. Use the following list and table as guidelines for selecting I/O modules and operator control interface(s).
  • Page 34: Guidelines For Selecting I/O Modules

    Selecting and Placing I/O Choose this Type of For these Types of Field Devices or Operations I/O Module (examples) Discrete input module Selector switches, pushbuttons, photoelectric eyes, limit and block I/O module switches, circuit breakers, proximity switches, level switches, motor starter contacts, relay contacts, thumbwheel switches Discrete output module Alarms, control relays, fans, lights, horns, valves, motor...
  • Page 35: Placing I/O Modules In A Chassis

    Place I/O modules in a chassis depending on the electrical characteristics of the module. The placement is made left to right, with the left-most position being closest in the chassis to the PLC-5 controller or the I/O adapter module. The placement order is as follows:...
  • Page 36 Selecting and Placing I/O Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 37: Using This Chapter

    Using This Chapter Determining the Proper Environment Placing System Hardware For Information About Determining the proper environment Protecting your controller Avoiding electrostatic damage Laying out your cable raceway Laying out your backpanel spacing Grounding your system Place the controller in an environment with conditions that fall within these guidelines: Environmental Condition Acceptable Range Operating temperature...
  • Page 38 Placing System Hardware Minimum spacing requirements for a controller-resident chassis: Mount the I/O chassis horizontally. Allow 153 mm (6 in) above and below the chassis. Allow 102 mm (4 in) on the sides of each chassis. Allow 51 mm (2 in) vertically and horizontally between any chassis and the wiring duct or terminal strips.
  • Page 39: Protecting Your Controller

    Protecting Your Controller Preventing Electrostatic Discharge You provide the enclosure for your controller system. This enclosure protects your controller system from atmospheric contaminants such as oil, moisture, dust, corrosive vapors, or other harmful airborne substances. To help guard against electromagnetic interference (EMI) and radio frequency interference (RFI), we recommend a steel enclosure.
  • Page 40: Laying Out Your Cable Raceway

    Placing System Hardware Laying Out Your Cable Raceway Publication 1785-UM012D-EN-P - July 2005 The raceway layout of a system reflects where the different types of I/O modules are placed in I/O chassis. Therefore, you should determine I/O-module placement prior to any layout and routing of wires. When planning your I/O-module placement, however, segregate the modules based on the conductor categories published for each I/O module so that you can follow these guidelines.
  • Page 41: Laying Out Your Backpanel Spacing

    Laying Out Your Backpanel Spacing 1771-A1B 1771-A2B 1771-A3B1 1771-A4B 193mm (7.60") Side Power C onnector 171mm (6.75") 1771-A3B 217mm (8.54") Side Total maximum depth dimension per installation will be dependent upon module wiring and connectors. Use 6.35 mm (0.25 inch) mounting bolts to attach the I/O chassis to the enclosure backpanel.
  • Page 42: I/O Chassis And External Power Supply Dimensions

    Placing System Hardware U se .25" dia mounting bolts (4 places) External 315mm Power (12.41") Supply 91mm (3.6") Clearance depth is 204mm (8") for 8 I/O connection points per module. Grounding Your System Publication 1785-UM012D-EN-P - July 2005 I/O Chassis and External Power Supply Dimensions 591mm (23.25") 464mm...
  • Page 43 Recommended Grounding Configuration for Remote I/O Systems Enclosure Ground To Grounding Electrode System Required Grounding Configuration for Extended-Local I/O Systems Enclosure Ground Grounding Electrode System (single point only) Extended-Local I/O Cables Placing System Hardware Grounding Electrode Conductor I/O Chassis Wall Ground Star Washer...
  • Page 44 Placing System Hardware Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 45: Using This Chapter

    128 input bits and 128 output bits, or8 input words and 8 output words, or 8 I/O groups Each PLC-5 controller has a finite amount of racks it can support. For example, a PLC-5/30 can support 8 I/O racks. The controller always occupies at least one I/O rack for itself, rack 0 by default.
  • Page 46 Addressing I/O and Controller Memory rack number 01 I/O group number 4 Input Module (1771-IAD) Notice how input and output image file addresses correspond to hardware. Publication 1785-UM012D-EN-P - July 2005 The figure below shows the relationship between an I/O terminal and its location in controller memory.
  • Page 47: Choosing An Addressing Mode

    Choosing an Addressing Mode 2-slot addressing 2 I/O chassis slots = 1 I/O group = 1 input image word and 1 output image word = 16 input bits and 16 output bits. 16 bits input 16 bits output 1-slot addressing 1 I/O chassis slot = 1 I/O group = 1 input image word and 1 output image word = 16 input bits and 16 output bits.
  • Page 48 Addressing I/O and Controller Memory Input Input Terminals Termi nals Group 0 An 8-point I/O module occupies 8 bits in a word. See Input Output Terminals Terminals Group 4 Group 5 An 8-point input module in group 4 occupies the first eight bits of input word 4.
  • Page 49 32-point input module 32-point I/O modules use the entire word of their group and borrow the entire word of the next group. See Since the module is in group 0 and the inputs for group 0 and group 1 are used, you must: install an output module in group 1 or leave the slot empty...
  • Page 50 Addressing I/O and Controller Memory Input Terminals Group 0 16-point I/O modules occupy 16 bits, an entire word, in the image table. Installing as a pair a 16-point input module and a 16-point output module efficiently uses the image table. Publication 1785-UM012D-EN-P - July 2005 When planning your system design, consider the densities of the I/O modules you are using and choose an addressing mode that most efficiently uses...
  • Page 51: Addressing Block-Transfer Modules

    Addressing Block-Transfer Modules Addressing Summary Addressing Mode Guidelines 2-slot 1-slot 1/2-slot Block-transfer modules occupy 8 bits in the controller’s I/O image table. Since all block-transfer modules are bidirectional, they cannot be used to complement either input or output modules. To Address single slot modules assigned I/O rack and group number of the slot in which the module resides and 0 for the module number When using 1/2-slot addressing, use the assigned rack...
  • Page 52: Assigning Racks

    Addressing I/O and Controller Memory Assigning Racks Group together 1/4 racks and 1/2 racks Publication 1785-UM012D-EN-P - July 2005 The number of racks in a chassis depends on the chassis size and the addressing mode: If Using this 2-slot Addressing, 1-slot Addressing, Chassis Size Results In...
  • Page 53 Limit the number of remote I/O rack numbers to those that your PLC-5 controller can support. The PLC-5 controller and the 1771-ASB adapter module automatically allocate the next higher rack number(s) to the remaining I/O groups of the chassis. For example, if you select...
  • Page 54: Understanding Plc-5 Controller Memory

    4-10 Addressing I/O and Controller Memory Understanding PLC-5 Controller Memory Publication 1785-UM012D-EN-P - July 2005 Controller memory is divided into two basic areas: Storage Areas Description Data All of the data the controller examines or changes is stored in files in data storage areas of memory.
  • Page 55: Understanding Data Storage (Data-Table Files)

    File # Integer Data Table Files Integer File 7 File 999 Words Integer (Sample Data) Files 1020 File 7 7779 Integer Natural binary bit pattern for 276 File (decimal format) 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 Timer File # structure members preset .PRE...
  • Page 56 – 0-37 (octal) for PLC-5/11, -5/20, -5/20E – 0-77 (octal) for PLC-5/30 – 0-177 (octal) for PLC-5/40, -5/40L, -5/40E – 0-277 (octal) for PLC-5/60, -5/60L, -5/80, -5/80E When addressing I/O image bits, address them 00-07 or 10-17 (octal). When organizing bit data, address the bits in each word 0-15 (decimal) for binary or integer files.
  • Page 57: Addressing File Types

    The maximum size of a data table file is 32K words. The maximum size of the entire data table is 64K words Addressing File Types The following two tables show the available file types and the amount of memory used by each. Data Table File Types and Memory Usage for PLC-5 Controllers Series E/Revision D and Later PLC-5/30 PLC-5/40, PLC-5/60,...
  • Page 58 The maximum size of a data table file is 32K words. The maximum size of the entire data table is 64K words Publication 1785-UM012D-EN-P - July 2005 Data Table File Types and Memory Usage for PLC-5 Controllers Series E/Revision C and Earlier...
  • Page 59: Understanding Program-File Storage

    Also, certain instructions (JMP, LBL, FOR, and NXT) have longer execution times in higher program file numbers. Series E PLC-5 controllers support 2000 program files to allow for more SFC steps in your program. SFC step/transition program files are typically shorter in length.
  • Page 60: Addressing

    I/O address identifierI = input device O = output device I/O Rack numberPLC-5/11, -5/20, -5/20E00-03 (octal) PLC-5/3000-07 (octal) PLC-5/40, -5/40L, -5/40E00-17 (octal) PLC-5/60, -5/60L, -5/80, -5/80E00-27 (octal) I/O Group number0-7 (octal) Terminal (bit) number00-17 (octal) To Specify this Example Address...
  • Page 61: Specifying Logical Addresses

    Specifying Logical Addresses The format of a logical address corresponds directly to the location in data storage: # X F : e . s / b Where Is the File address. Omit for bit, word, and structure addresses (also indicates indexed addressing, see next page) File type:B—binaryN—integerT—timerMG—message C—counterO—outputA—ASCIIPD—PID...
  • Page 62: Specifying Indirect Addresses

    .PRE TON, TOF, RTO accumulated.ACC For information about the mnemonics for a specific instruction, see chapter 22 of the PLC-5 Programming Controller Instruction Set Reference, publication 1785-6.1. Specifying Indirect Addresses When using indirect addressing, make sure that the indirect ATTENTION address points to a valid data file or element.
  • Page 63 This is especially advisable if the PLC-5 controller has no control over the indirect address, such as the value is determined by values from an I/O module or a peer controller.
  • Page 64: Specifying Indexed Addresses

    4-20 Addressing I/O and Controller Memory MASKED MOVE Source #N7:10 Mask 00110011 Destination #N11:5 Publication 1785-UM012D-EN-P - July 2005 Specifying Indexed Addresses The controller starts operation at the base address plus the offset. Store the offset value in the offset word in the controller’s status file. You can manipulate the offset word in your ladder logic.
  • Page 65: Specifying Symbolic Addresses

    Specifying Symbolic Addresses When you specify symbolic address, follow these guidelines: Start the name with an alphabetic character (not a number). The symbol must begin with a letter and can contain as many as 10 of the following characters: – –...
  • Page 66: And Controller Memory

    Publication 1785-UM012D-EN-P - July 2005 Optimizing Instruction Execution Time and Controller Memory For the best instruction-execution performance, store your most frequently used addresses as shown below: PLC-5/30 PLC-5/40, -5/40L PLC-5/60, -5/60L -5/40E -5/80, -5/80E Physical Word # Physical Word #...
  • Page 67 The following examples illustrate these concepts: Bit address example If your data table map looks like this: An address used in an OTE instruction stored here: occupies one word in the controller's memory executes at a rate 0.48µs The same address stored here: occupies two words in the controller's memory executes at a rate 0.64µs This example uses the instruction timing and memory usage tables in Appendix D.
  • Page 68: Effectively Using I/O Memory

    By designating a PLC-5 scanner channel as complementary, you can complement racks 1-7. A channel configured for complementary I/O can’t scan racks greater than 7. Those PLC-5 controllers that can address rack numbers greater than 7 can address these racks on another scanner channel which has not been configured as complementary.
  • Page 69: Using This Chapter

    Communicating with Controller-Resident I/O For Information About Introduction to PLC-5 controller scanning Program scanning Transferring data to controller-resident I/O Configuring the system for controller-resident I/O This chapter explains how to configure the controller to communicate with resident I/O: 1.
  • Page 70: Program Scanning

    The controller continually performs a logic program scan and housekeeping. Housekeeping activities for PLC-5 controllers include: performing controller internal checks updating the input image table with: – controller-resident input module data –...
  • Page 71: Transferring Data To Controller-Resident I/O

    The controller-resident rack exchanges discrete I/O information with the I/O image table during housekeeping. A PLC-5 controller transfers discrete and block-transfer data with controller-resident I/O. Transferring Discrete Data to Controller-Resident I/O I/O Image...
  • Page 72: Transferring Block-Transfer Data To Controller-Resident I/O

    Communicating with Controller-Resident I/O Configuring the System for Controller-Resident I/O Publication 1785-UM012D-EN-P - July 2005 If your application cannot support this configuration, condition the immediate I/O instructions with the control bits of the adjacent block-transfer module. This technique helps make certain that an adjacent block-transfer module is not performing a block-transfer while an immediate I/O instruction is executing in its adjacent input module.
  • Page 73: Using This Chapter

    Using This Chapter Communicating with Remote I/O For Information About Selecting devices that you can connect Introduction to remote I/O Designing a remote I/O link Configuring a controller channel as a scanner Communicating to a remote I/O node adapter Transferring block data Block-transfers of remote I/O data Block-transfer sequence with status bits Block-transfer programming considerations...
  • Page 74: Selecting Devices That You Can Connect

    Publication 1785-UM012D-EN-P - July 2005 The following table lists some of the devices you can use on a remote I/O link: Category Product Other Controllers enhanced PLC-5 controllers (in adapter mode) Ethernet PLC-5 controllers ControlNet PLC-5 controller VMEbus PLC-5 controllers...
  • Page 75: Introduction To Remote I/O

    Ch 1B A remote I/O system lets you control I/O that is not within the controller’s chassis. A PLC-5 controller channel, in scanner mode, transfers discrete and block-transfer data with remote I/O devices. An example remote I/O system looks like this:...
  • Page 76: Designing A Remote I/O Link

    6-4 for design chapter 3 for cable routing information your controller’s installation information (For enhanced PLC-5 controllers, see publication 1785-IN062; for Ethernet PLC-5 controllers publication 1785-IN063) page 6-6 Designing a remote I/O link requires applying:...
  • Page 77 If you select the baud rate as 230.4 kbps, and you are using IMPORTANT the serial port or a PLC-5 coprocessor, use channel 2 for better overall system performance. For proper operation, terminate both ends of a remote I/O link by using the external resistors shipped with the programmable controller.
  • Page 78: Configuring A Controller Channel As A Scanner

    1771-AS 1771-ASB 1771-DCM Miscellaneous 1771-AF Use this table to help you determine the controller channels you can configure as a remote I/O scanner: Channels that Support Controller Remote I/O Scanner PLC-5/11 PLC-5/20 PLC-5/20E PLC-5/30 PLC-5/40E 1A, 1B PLC-5/40L PLC-5/60L PLC-5/80E...
  • Page 79: Define An I/O Status File

    Define an I/O Status File The I/O status file stores data for the controller’s I/O rack configuration tables. The I/O status from each remote I/O rack requires two words. These two words store the reset, present, inhibit, and fault bits for each rack. To define an I/O status file, enter an unused integer file number (9-255) in the I/O status file field (S:16) of the controller configuration screen.
  • Page 80 Communicating with Remote I/O In this Field Define Diagnostic file The file containing the channel’s status information: messages received messages sent messages received with error unable to receive sent with error rack retries Baud rate The communication rate for the remote I/O scanner mode link Publication 1785-UM012D-EN-P - July 2005 Assign a unique diagnostic file to each channel.
  • Page 81: Specify The Scan List

    Rack address 1-3 octal (PLC-5/11, -5/20, -5/20E controllers) 1-7 octal (PLC-5/30 controllers) 1-17 octal (PLC-5/40, -5/40L, -5/40E controllers) 1-27 octal (PLC-5/60, -5/60L, -5/80, -5/80E controllers) If complementary I/O is enabled, a C appears before the complemented rack address. Starting group...
  • Page 82 6-10 Communicating with Remote I/O Publication 1785-UM012D-EN-P - July 2005 If you need multiple updates to an I/O device during an I/O scan, you can enter a logical address in the scan list more than one time. Do not assign the same partial or full rack address to more than one channel in scanner mode.
  • Page 83: Communicating To A Remote I/O Node Adapter

    Communicating to a Remote I/O Node Adapter Rack 3 Rack 2 Rack 1 The remote I/O scan is the time it takes for the controller to communicate with all of the entries in its rack scan-list once. The remote I/O scan is independent of and asynchronous to the program scan.
  • Page 84: Troubleshooting Remote I/O Communication Difficulties

    6-12 Communicating with Remote I/O Publication 1785-UM012D-EN-P - July 2005 Troubleshooting Remote I/O Communication Difficulties Follow these steps to make sure the controller can communicate with devices on remote I/O links. 1. Put the controller in program mode. Go into the memory map and find two unused file numbers.
  • Page 85: Transferring Block Data

    Transferring Block Data Remote I/O Rack 7 Rack 6 Rack 5 Interrupt from STI or Fault Routine The adapter used in the remote I/O scan is the 1771-ASB. The adapter used in the extended-local I/O scan is the 1771-ALX. In addition to discrete data, the controller can also exchange block data with remote I/O.
  • Page 86 The adjacent table lists the maximum active buffers for each enhanced and Ethernet PLC-5 controller. The controller places a block-transfer request directly into the active buffer only if: a buffer is available and no block-transfers to the slot is in the queue.
  • Page 87: Block-Transfers Of Remote I/O Data

    Remote I/O Data Block-Transfer Minor Fault Bits Description There is a possibility that the PLC-5 controller might temporarily be unable to initiate multiple consecutive user-programmed block-transfers. For any block-transfer which temporarily can’t be processes, the PLC-5 controller sets minor fault bit S:17/0 and skips that block-transfer instruction. This condition is self-correcting, but bit S:17/0 remains set until you reset it.
  • Page 88 6-16 Communicating with Remote I/O Ladder Logic Processor executes a block-transfer instruction. Processor sends the block-transfer request to its I/O scanner. Scanner places module control byte (MCB) into the discrete output image table. Scanner sends MCB as part of the discrete I/O update to the adapter.
  • Page 89: Block-Transfer Sequence With Status Bits

    Block-Transfer Sequence with Status Bits Start ladder logic Detects that a rung containing a block-transfer is enabled and sets the enable .EN bit and resets the .ST, .DN, .ER, and .EW status bits. The processor sends the block-transfer request to the I/O scanner, sets the .EW bit, and resumes the program scan.
  • Page 90 6-18 Communicating with Remote I/O Did the block-transfer complete without errors? Sets the done .DN bit (13). Was the block-transfer a BTR? Copies data from the active buffer to the block-transfer file in the data table. Publication 1785-UM012D-EN-P - July 2005 Sets the error .ER bit (12).
  • Page 91: Block-Transfer Programming Considerations

    .ER bit (12). Re-initializes the request until the watchdog timer expires (4 s). For a list of block-transfer error codes, see the PLC-5 Programming Software Instruction Set Reference, publication 1785-6.1. Read this section for information about general programming considerations and considerations for controller-resident local racks.
  • Page 92: For Controller-Resident Local Racks

    0-1 seconds before setting the error (.ER) bit. A PLC-5 controller with at least one channel configured as an adapter could incur a non-recoverable fault when you switch it from run to program mode.
  • Page 93: Monitoring Remote I/O Scanner Channels

    Monitoring Remote I/O Scanner Channels Status Field Location Description Retries Tab Retry word 5 etc. word 69 Do not program IIN or IOT instructions to a module in the same physical module group as a BT module unless you know a block-transfer is not in progress.
  • Page 94 Retry Publication 1785-UM012D-EN-P - July 2005 This field indicates the rack number of the remote racks being scanned by the scanner channel: can only scan rack 3 (PLC-5/11 controller) 1-3 octal (PLC-5/20, -5/20E controller) 1-7 octal (PLC-5/30 controllers) 1-17 octal (PLC-5/40, -5/40L, 5/40E controllers)
  • Page 95 Status Field Location Description Messages Tab (Messages = SDA messages + SDN messages) Messages sent word 1 Messages sent with error word 3 Messages received word 0 Messages received with word2 error Messages unable to receive word 4 Monitoring messages Displays the number of messages sent by the channel.
  • Page 96: Addressing The I/O Status File

    Setting inhibit bits in the I/O status file does not update IMPORTANT inhibit bits in the controller status file. (Maximum for PLC-5/11, -5/20, and -5/20E) (Maximum for PLC-5/30 processors) (Maximum for PLC-5/40, -5/40L, and -5/40E processors) (Maximum for PLC-5/60, -5/60L, -5/80 and -5/80E processors)
  • Page 97 Bit Layout Diagrams for the First Word Allotted to a Remote I/O Rack or an Extended-Local I/O Rack N15:14 Present Bits Not Used This Bit Fault Bits Present Bits Communicating with Remote I/O Not Used Corresponds to first 1/4 rack starting I/O group 0 second 1/4 rack starting I/O group 2...
  • Page 98 6-26 Communicating with Remote I/O N15:15 Publication 1785-UM012D-EN-P - July 2005 Bit Layout Diagrams for the Second Word Allotted to a Remote I/O Rack or an Extended Local I/O Rack Reset Bits Not Used This Bit: Corresponds to: Inhibit Bits first 1/4 rack starting I/O group 0 second 1/4 rack...
  • Page 99: Chapter 7 Using This Chapter

    Using This Chapter Communicating with a PLC-5 Adapter Channel For Information About: Configuring communication to a PLC-5 adapter channel Programming discrete transfers Programming block-data transfers Monitoring the status of the adapter channel Monitoring the status of the supervisory controller Monitoring remote I/O adapter channels...
  • Page 100: Adapter Channel Configuring Communication To A Plc-5 Adapter Channel

    2, 4, 6, or 8 words*depending on whether the adapter-mode processor is configured as a 1/4, 1/2, 3/4, or full rack. For the Scanner Channel to Communicate with a PLC-5 Controller Adapter Channel, Do the Following 1.Define the communication rate, its address, and rack size (number of words to transfer). page 7-3 2.Define the discrete transfer configuration files, which are the files from which the...
  • Page 101: Specify An Adapter Channel's Communication Rate

    PLC-5/60 To select a channel as an adapter, use the adapter mode configuration screen in your programming software. configure the channel as a remote I/O adapter specify adapter settings Communicating with a PLC-5 Adapter Channel Publication 1785-UM012D-EN-P - July 2005...
  • Page 102 The default is rack 3. Important: The valid addresses are based on the scanner, not the PLC-5 controller you are configuring. For example, if you are configuring a PLC-5/20, you could enter a rack address between 1-27 if the scanner you will be communicating with is a...
  • Page 103: Specify The Discrete Transfer Configuration Files

    The discrete transfer configuration files (output source file and the input destination file) are the main vehicles for discrete data and block-transfer status bits exchange between a PLC-5 adapter channel and a scanner channel or a supervisory controller (see ).
  • Page 104 Publication 1785-UM012D-EN-P - July 2005 Configure the discrete transfer configuration file as an integer file. Although the PLC-5 controller allows you to use the input or output areas, reserve these for real I/O on scanner channels. In doing so, you are avoiding a possible conflict if you later attempt to add a rack that uses the same I/O image space.
  • Page 105 Buffer image table Reserved for status Output File Reserved for status Input File Communicating with a PLC-5 Adapter Channel PLC-5 Processor Channel in Adapter Mode write outputs Update I/O image read inputs Logic Scan Program Scan Adapter Channel’s Input Destination File...
  • Page 106 Communicating with a PLC-5 Adapter Channel Publication 1785-UM012D-EN-P - July 2005 If data from the supervisory controller is intended to control outputs of the adapter-mode controller channel, write ladder logic in the adapter-mode controller to move the data from its input destination file to its output image.
  • Page 107 8 discrete words in file N7 words 10-17 (upper byte of first word is for status). For more information on configuring this file, see the channel configuration documentation for your programming software. Communicating with a PLC-5 Adapter Channel Publication 1785-UM012D-EN-P - July 2005...
  • Page 108: Programming Discrete Transfers In Adapter Mode

    7-10 Communicating with a PLC-5 Adapter Channel Programming Discrete Transfers in Adapter Mode Supervisory Processor (PLC-5) 0:x7 I:x5 I:x5 N51 is the adapter-mode processor's discrete transfer configuration file. Input destination and output source entries determine input and output words. The ladder logic in the supervisory processor uses the rack number of the adapter-mode processor channel.
  • Page 109: Configure Block-Transfer Requests

    A. Specify a BT control file you defined. B. Enter the transfer length in .RLEN C. Enter the file and element numbers from which the data is to be transferred in .FILE and .ELEM respectively. Communicating with a PLC-5 Adapter Channel Publication 1785-UM012D-EN-P - July 2005 7-11...
  • Page 110 7-12 Communicating with a PLC-5 Adapter Channel Adapter Mode Configuration screen Group Module Data Monitor screen Address BT12:000 Publication 1785-UM012D-EN-P - July 2005 A block-transfer write of 10 words from file 24, element 10 EXAMPLE with BT control file for group 0, module 0 of BT12:000...
  • Page 111 See page 7-15 for more information. Adapter-mode block-transfer reads and block-transfer IMPORTANT writes in the same group/module location must have the same length. Communicating with a PLC-5 Adapter Channel Adapter Configuration RACK * Must Match STARTING GROUP SIZE...
  • Page 112: Examples Of Block-Transfer Ladder Logic

    If you do not run the BTR twice, the BTR will read old data from the adapter processor. PLC-5 adapter-mode processor channel is configured as rack 2 Publication 1785-UM012D-EN-P - July 2005 If you want to transfer controller-resident local I/O data of the adapter mode...
  • Page 113: Effects Of Programming Block-Transfers To An Adapter-Mode

    Condition the use of BTR data with a "data valid" bit. All address comments for contacts shown in the following examples represent the set (1) state of the bit in the PLC-5 processor. Example Bidirectional Repeating Block Transfer in PLC-5/250 Supervisory Controller Read data from adapter-mode processor...
  • Page 114 7-16 Communicating with a PLC-5 Adapter Channel Scanner’s Output Image Table Word d for status. Publication 1785-UM012D-EN-P - July 2005 Each group/module that is programmed as an adapter channel block transfer uses one byte in the adapter channel’s input destination file.
  • Page 115: Monitoring The Status Of The Adapter Channel

    Scanner’s Input Image Table (Octal) Word Status bits received from adapter channel Communicating with a PLC-5 Adapter Channel Adapter Channel’s Output Source File Status bits sent to scanner Adapter Channel’s Input Destination File Adapter Channel’s Output Source File Status bits sent to scanner...
  • Page 116: Monitoring The Status Of The Supervisory Controller

    7-18 Communicating with a PLC-5 Adapter Channel Scanner’s Output Image Table Word Not used by adapter channel. When this Bit(s) 10 octal (8 decimal) 11 octal (9 decimal) 13 octal (11 decimal) 1 15 octal (13 decimal) 1 Publication 1785-UM012D-EN-P - July 2005...
  • Page 117: Monitoring Remote I/O Adapter Channels

    Displays the number of times the adapter channel took longer than 2 ms to process a message packet. The turn around-time for message packet processing is 2 ms. Communicating with a PLC-5 Adapter Channel Publication 1785-UM012D-EN-P - July 2005 7-19...
  • Page 118 7-20 Communicating with a PLC-5 Adapter Channel Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 119: Chapter 8 Using This Chapter

    3. Use a unique, unused integer file. 4. Define the scan list. The only products that can form the extended-local I/O link are the PLC-5/40L and -5/60L controllers and the extended-local I/O adapter module. PLC-5/40L and -5/60L processor Extended-local I/O link...
  • Page 120: Cabling

    I/O and remote I/O racks, the total of both remote I/O and extended-local I/O racks must not exceed the maximum number of racks allowed for the controller (16 racks for a PLC-5/40L or 24 racks for a PLC-5/60L). shows a PLC-5/40L controller controlling both extended-local I/O and remote I/O...
  • Page 121 6, 7, 14, 15, 16, and 17, while extended-local I/O racks can be numbered 4, 5, 10, 11, 12, and 13. The PLC-5 controller and the 1771-ALX adapter module automatically allocate the next higher rack number(s) to the remaining I/O group(s) of the chassis.
  • Page 122: Transferring Data

    If you need to use a thermocouple module and 32-point I/O modules in the same I/O chassis, use the 1771-IXE module. The PLC-5/40L or -5/60L controller can scan controller-resident I/O, extended local I/O, and remote I/O. The following figure shows how a PLC-5/40L or -5/60L controller accomplishes I/O scanning and update.
  • Page 123: Discrete Data Transfer

    Resident Rack Remote I/O Scan The time that it takes to scan extended-local I/O chassis is added to the housekeeping time as shown in the following figure. PLC-5/40L and -5/60L Extended-Local I/O Scan Time Remote Processor Processor I/O Buffer Resident...
  • Page 124: Transferring Block Data

    Communicating with Extended-Local I/O Publication 1785-UM012D-EN-P - July 2005 The time in ms that it takes to scan extended-local I/O chassis depends on the number of 1771-ALX adapter modules and the number of extended- local I/O racks. The formula used to calculate the total time to scan extended-local I/O chassis is: extended-local I/O scan time = (0.32 ms x A)+(0.13 ms x L) where:...
  • Page 125: Calculating Block-Transfer Completion Time

    This formula assumes: block-transfer instructions are consecutively placed in the logic program block-transfer modules in the I/O chassis are ready to perform when operations are requested This formula assumes: block-transfer instructions are consecutively placed in the logic program block-transfer modules in the I/O chassis are ready to perform when operations are requested Calculating Block-Transfer Completion Time...
  • Page 126: Considerations For Extended-Local Racks

    Communicating with Extended-Local I/O PLC-5/40L Processor- Processor Resident No BT Channel 2 modules The logic scan completes in 15 ms. Housekeeping completes in approximately 6 ms (as calculated in the formula on page NO TAG). The longest block-transfer request is 20 words.
  • Page 127: Configuring The Controller As An Extended-Local I/O Scanner

    Configuring the Controller as an Extended-Local I/O Scanner This Field Specifies Diagnostic file The file containing the channel’s status information Scan list The channel I/O configuration If you are using block-transfer to a 2760-RB module located in the extended-local rack, make sure you do not set the timeout bit in the block-transfer control file.
  • Page 128 8-10 Communicating with Extended-Local I/O If You are Using this Chassis Size 4-slot 8-slot 12-slot 16-slot Remote Rack ## Starting Rack Group Size FULL FULL Publication 1785-UM012D-EN-P - July 2005 How Chassis Size and Backplane Addressing Determine the Quantity of I/O Racks And 2-Slot Or 1-Slot Addressing Addressing...
  • Page 129 For this Field A Scan List Contains Scan rack address 1-17 octal (PLC-5/40L controllers) 1-27 octal (PLC-5/60L controllers) Starting group number 0, 2, 4, or 6 Chassis size 4-slot, 8-slot, 12-slot, 16-slot Backplane addressing 1-slot, 2-slot, or 1/2-slot Range Automatically calculated based upon rack address, starting module group and chassis size.
  • Page 130: Monitoring Extended-Local I/O Status

    Important: If incorrect information is entered for an entry, the controller will not display the new configuration when you save edits. To monitor extended-local I/O of PLC-5/40L and PLC-5/60L controllers, use the extended local I/O status screen in your programming software.
  • Page 131 Status Field Location Description Channel retry word 0 Displays the number of times extended local I/O scanner tried and failed to communicate with all adapters on the channel. This value is the sum of all adapter retry counts. Retry word 10 Displays the number of retries for the corresponding rack entry (word numbers are word 20 in multiples of 10).
  • Page 132 8-14 Communicating with Extended-Local I/O Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 133: Chapter 9 Using This Chapter

    Estimating DH+ link performance Application guidelines You can use a DH+ link for data transfer to other PLC-5 controllers or higher level computers and as a link for programming multiple PLC-5 controllers. A PLC-5 controller can communicate over a DH+ link with other controllers and with a personal computer.
  • Page 134: Link Design

    Publication 1785-UM012D-EN-P - July 2005 Devices that You Can Connect Catalog Number Application 1756-DHRIO Allows communication between PLC-5 controllers over different networks, such as Data Highway Plus, ControlNet and Ethernet 1770-KF2 Connects an asynchronous (RS-232C) device to a Data Highway or DH+ network...
  • Page 135: Configuring The Channel For Dh+ Communication

    If you select the baud rate as 230.4 kbps, and you are using IMPORTANT the serial port or a PLC-5 coprocessor, use channel 2 for better overall system performance. For proper operation, terminate both ends of a DH+ link by using the external resistors shipped with the programmable controller.
  • Page 136 Communicating with Devices on a DH+ Link This Field Specifies Diagnostic file The file containing the channel’s status information Baud rate Communication rate for the current channel Node address The station address of your controller If your DH+ channel is: Link ID The local link where the channel resides...
  • Page 137: Using The Global Status Flag File

    This Field Specifies Global status flag file The file where you want to store token pass data Using the Global Status Flag File Configure by Doing the Following Cursor to the field, type an integer file number (10-999), and press [Enter] The system creates an integer file 64 words long.
  • Page 138 Octal: N10:7 You can specify any integer file in the processor to be the global status flag file; however, for simplicity, specify the same file for all your PLC-5 processors on the DH+ link. The files are updated during housekeeping.
  • Page 139: Monitoring Dh+ Communication Channels

    Monitoring DH+ Communication Channels Status Field Word(s) Sent Sent with error Received Received with error Unable to receive Use the DH+ status screen in your programming software to monitor channels that are configured to support a DH+ link. The data displayed is stored in the diagnostic file defined on the DH+ configuration screen in your programming software.
  • Page 140: Monitoring Data Sent With Acknowledgment

    Communicating with Devices on a DH+ Link Status Field Word(s) Received Received SAP off Received but full Received with error Received retransmissions Transmit failed Transmit timeout Publication 1785-UM012D-EN-P - July 2005 Monitoring Data Sent with Acknowledgment Description Number of error-free SDA messages that the station received. Number of SDA messages that the station received but could not process because its service access point (SAP) was off.
  • Page 141 Number of times the station received a NAK to a message because the destination station was full This indicates that messages are being sent to the receiving station faster than the PLC-5 controller can process them. Most likely, more than one station on the DH+ link is sending messages to the same station.
  • Page 142: Monitoring Data Sent Without Acknowledgment

    9-10 Communicating with Devices on a DH+ Link Status Field Word(s) Received Transmit failed Transmit confirm Publication 1785-UM012D-EN-P - July 2005 Monitoring Data Sent without Acknowledgment Description Number of valid SDN messages received Number of SDN messages sent by the station that were in error This error should never be seen.
  • Page 143: Monitoring General Status

    Status Field Word(s) SDA or SDN transmit retry 28 Duplicate node Claims lost Network dead Claims won Dropped token Monitoring General Status Description Total number of SDA or SDN messages that were re-transmitted. Some reasons why the station would retry a message are: the ACK was lost or corrupted on an SDA message, indicating a possible noise problem the original message was NACKed Number of times the station has detected the same station address as itself on the network.
  • Page 144: Estimating Dh+ Link Performance

    9-12 Communicating with Devices on a DH+ Link Status Field Word(s) Linear scan failed Token retry Solicit rotations Started linear scan New successor Token failed Estimating DH+ Link Performance Publication 1785-UM012D-EN-P - July 2005 Description Number of times the station solicited every station number without getting a response. See started linear scan below for more information.
  • Page 145: Nodes

    If a message exceeds the maximum packet size allotted, however, the sending station will require more than one token pass to complete the message. For example, if a PLC-5 controller wants to send a 150-word message, it will have to transmit two messages, possibly requiring multiple token rotations.
  • Page 146: Message Destination

    9-14 Communicating with Devices on a DH+ Link 1. Station 1 has the token. Only the station that has the token can send a message. Station 1 sends the message to station 4. Station 4. Station 4 can now reply to the message from station 1.
  • Page 147: Internal Processing Time

    1. In this figure, we assume that station 1 wants to send the identical message as shown in Figure but to station 2. Station 1 has the token. Station 1 sends the message to station 2 and then passes the token on to station 2. Station 3.
  • Page 148: Average Dh+ Link Response Time Test Results

    9-16 Communicating with Devices on a DH+ Link Test Setup One to 22 PLC-5 controllers were used with one personal computer online. Each PLC-5 controller executes 1K of ladder logic. Initial testing was done with one PLC-5 controller writing data to another PLC-5 controller. The response time was recorded.
  • Page 149: Application Guidelines

    10 11 12 13 14 15 16 17 18 19 20 21 22 Number of Controllers Number of PLC-5 Processors Consider the following application guidelines when configuring a DH+ link for your system. Minimize the number of DH+ nodes to achieve acceptable response times.
  • Page 150 9-18 Communicating with Devices on a DH+ Link Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 151: Using This Chapter

    Cabling Configuring channel 0 Monitoring channel 0 status If you are using PLC-5 controllers in Supervisory Control and Data Acquisition (SCADA) applications, see the SCADA System Selection Guide, publication AG-SG001. The table below summarizes some of the differences between RS-232C,...
  • Page 152: Configuring The Controller

    User Mode In user mode, all data are received and sent via a buffer. To access or send this data, use ASCII instructions in your ladder program. The ASCII data a PLC-5 controller sends contain no additional protocol characters. In user mode, only ASCII instructions can be used. If you try to use a message (MSG) instruction that references the serial port, the error (.ER) bit is set.
  • Page 153 One node is designated as the master and it controls who has access to the link. (For example, a master can be a PLC-5/250 or PLC-5/40 controller or a computer running ControlView SCADA option software. All other nodes are remote stations and must wait for permission from the master before transmitting.
  • Page 154: Master Station To Remote Station Communication Methods

    Publication 1785-UM012D-EN-P - July 2005 Master Station to Remote Station Communication Methods A PLC-5 master station can communicate with remote stations in two ways: Option Name standard communication mode message-based...
  • Page 155: Polling Inactive Priority Stations

    Through the channel configuration feature of your programming software, you can choose to poll one or all of the inactive priority stations when the PLC-5 controller is in master mode on channel 0. The default selection is to poll one inactive priority station during each polling sequence.
  • Page 156: Configuring Channel 0

    10-6 Communicating with Devices on a Serial Link Configuring Channel 0 Publication 1785-UM012D-EN-P - July 2005 Use switch assembly SW2 controllers to specify RS232-C, RS422A (compatible), or RS423 communications for channel 0. You can configure channel 0 to communicate using these protocols: If You Want to Use See Page System mode...
  • Page 157 This Field Specifies Diagnostic file The file containing the channel’s status information Enable Whether the remote mode change option is enabled Mode attention char. The attention character for the system or the user mode character for remote change System mode char. The character to be used with the mode attention character (above) User mode char.
  • Page 158 10-8 Communicating with Devices on a Serial Link This Field Specifies Stop bits Match the number of stop bits to the device with which you are communicating Control line Select the mode in which the driver operates. Option Settings Duplicate detect Whether you want the controller to detect and ignore duplicate messages ACK timeout...
  • Page 159: Configure Channel 0 As A Slave Station

    This Field Specifies: Diagnostic file The file containing the channel’s status information Enable Whether the remote mode change option is enabled Mode attention char. The attention character for the system mode or the user mode character for a remote mode change System mode char.
  • Page 160 10-10 Communicating with Devices on a Serial Link This Field Specifies: User mode char. The character for the mode attention character (above) Serial Settings Baud rate Communication rate for channel 0 Configure all devices in the system for the same communication rate Parity Parity setting for channel 0 Parity provides additional message...
  • Page 161 This Field Specifies: RTS send delay The amount of time that elapses between the assertion of the RTS signal and the beginning of the message transmission This time allows the modem to prepare to transmit the message. The CTS signal must be high for transmission to occur.
  • Page 162: Configure Channel 0 As A Master Station

    10-12 Communicating with Devices on a Serial Link This field Specifies Diagnostic file The file containing the channel’s status information Enable Whether the remote mode change option is enabled Mode attention char. The attention character for the system mode or the user mode character for a remote mode change System mode char.
  • Page 163 This field Specifies User mode char. The character for the mode attention character (above) Serial Settings Baud rate Communication rate for channel 0 Configure all devices in the system for the same communication rate Parity Parity setting for channel 0 Parity provides additional message packet error detection.
  • Page 164 10-14 Communicating with Devices on a Serial Link This field Specifies RTS off-delay The time delay between the time the end of the message transmission and the RTS is de-asserted This time delay is a buffer to make sure that the modem has transmitted the message.
  • Page 165 This Field Specifies Master message The current value of channel 0 master transmit message transmit Normal poll node file The integer file that contains the addresses of the remote stations you want in the normal poll list Normal poll group size The quantity of active stations located in the normal poll list that you want polled during a scan through the normal poll list before returning to the...
  • Page 166 10-16 Communicating with Devices on a Serial Link Publication 1785-UM012D-EN-P - July 2005 To define a polling scheme using standard mode, you must specify the following on the DF1 master configuration screen in your programming software: Configuration Parameter Definition Polling mode How you want the master to poll the station lists.
  • Page 167 Poll File Word 0 N:11 N: xx total number pointer showing the of stations station address being polled (Station 12 in word 4 is being polled.) To create station lists, place each station address in an individual word in a poll file (normal and/or priority) starting at word 2.
  • Page 168: Configure Channel 0 For User Mode (Ascii Protocol)

    10-18 Communicating with Devices on a Serial Link This Field Specifies Diagnostic file The file containing the channel’s status information Remote mode change Whether the remote mode change option is enabled Mode attention char. The attention character for the system mode or the user mode character System mode char.
  • Page 169 This Field Specifies User mode char. The character for the mode attention character (above) Serial Settings Baud rate Communication rate for channel 0 Configure all devices in the system for the same communication rate Parity Parity setting for channel 0 Parity provides additional message packet error detection.
  • Page 170 10-20 Communicating with Devices on a Serial Link This Field Specifies Delete mode Select how the controller responds to a delete character. XON/XOFF Whether or not you want XON/XOFF enabled Echo What the controller should do when it receives an ASCII delete character Termination 1 The termination characters you Termination 2...
  • Page 171: Configure Channel 0 For A Communication Mode Change

    Configure Channel 0 for a Communication Mode Change You can configure channel 0 so that it switches from one communication mode to another upon receiving a control command. You define a mode attention character and either a system or user mode character. Character Tells the Controller to Mode attention character...
  • Page 172: Monitoring Channel 0 Status

    10-22 Communicating with Devices on a Serial Link Monitoring Channel 0 Status Publication 1785-UM012D-EN-P - July 2005 The channel 0 status screens display the information stored in the diagnostic file you specified when you configured channel 0. Using the System Mode Status Display This section explains the status data displayed on system mode screens in your programming software: System Mode (DF1 Point-to Point) Status Screen...
  • Page 173 Status Field Word Bit DCD recover Messages sent Messages received EOT received on first poll Lost modem Messages retried Undelivered messages Duplicate messages received Bad packet/no ACK sent Last poll list scan last Last priority poll list scan last Max normal poll list scan Max priority poll list scan ENQs received ENQs sent...
  • Page 174: Using The User Mode (Ascii) Status Display

    10-24 Communicating with Devices on a Serial Link Status Field Word Bit Modem Lines 0: 4 0: 2 0: 1 0: 0 0: 3 Status Field Word Bit DCD recover Character received with error Lost modem Modem Lines 0: 4 0: 2 0: 1 0: 0...
  • Page 175: Using This Chapter

    Communicating with ControlLogix devices Interpreting error codes Interpreting Ethernet status data Ethernet PLC-5 performance considerations Ethernet is a local area network that provides communication between various devices at 10 Mbps. The physical communication media you use can be any standard 802.3 media, including:...
  • Page 176: Assigning Your Ip Address

    2 configuration screen of your programming software After you assign a unique IP address to your Ethernet PLC-5 controller, you must configure channel 2 so your network recognizes the controller. Configure...
  • Page 177 Communicating with Devices on an Ethernet Network You can manually configure channel 2 for Ethernet communication using your programming software over a DH+ or serial link Enter the IP address and toggle the BOOTP enable field to configuration information in the appropriate fields. See the following table on the next page.
  • Page 178 11-4 Communicating with Devices on an Ethernet Network This Field Specifies Diagnostic file The file containing the channel’s status information. Ethernet Address The controller’s Ethernet hardware address. Display only BOOTP Enable Whether BOOTP is enabled. IP Address The controller’s Internet address. Message Connect The number of milliseconds allowed Timeout...
  • Page 179: Using Bootp To Enter Configuration Information

    This Field Specifies Advanced Functions Broadcast Address The broadcast address to which the controller should respond. Subnet Mask The controller’s subnet mask. The subnet mask is used to interpret IP addresses when the network is divided into subnets. Gateway Address The IP address of the gateway that provides a connection to another IP network.
  • Page 180 11-6 Communicating with Devices on an Ethernet Network Publication 1785-UM012D-EN-P - July 2005 To enable BOOTP, use the Ethernet channel 2 configuration screen in your programming software. Specify YES for If you change this field from NO to YES, the change does IMPORTANT not take effect until you cycle power.
  • Page 181: Editing The Bootptab Configuration File

    Use this line as the configuration template for Ethernet IMPORTANT PLC-5 controllers. 1. Make one copy of the Ethernet PLC-5 controller template for every Ethernet PLC-5 controller in your system. 2. Edit each copy of the template as follows: A. Replace with the name of the Ethernet PLC-5 controller.
  • Page 182 (0-9, A-F); do not use the hyphens that separate the numbers. (You will find the hardware address on a label affixed to the printed circuit board of the Ethernet PLC-5 controller.) 3. Save, close, and make a backup copy of this file.
  • Page 183: Using Advanced Ethernet Functions

    Using Advanced Ethernet Functions Communicating with Devices on an Ethernet Network Configure the following advanced communication characteristics using the Ethernet channel 2 configuration screen: broadcast address subnet mask gateway address If You are Using See Page Broadcast addressing Subnet masks and gateways If BOOTP is enabled, you can’t change any of the IMPORTANT advanced Ethernet communications characteristics.
  • Page 184 11-10 Communicating with Devices on an Ethernet Network Publication 1785-UM012D-EN-P - July 2005 In most cases, you can leave the broadcast address at the default setting. Configure this Field By Doing the Following Broadcast Address Cursor to the field, and enter an address of the following form: a.b.c.dWhere: a, b, c, d are between 0-255 (decimal) If you change the default and need to reset it, type 0.0.0.0.
  • Page 185: Using Subnet Masks And Gateways

    Communicating with Devices on an Ethernet Network Using Subnet Masks and Gateways If your network is divided into subnetworks that use gateways or routers, you must indicate the following information when configuring channel 2: subnet mask gateway address A subnet mask is a filter that a node applies to IP addresses to determine if an address is on the local subnet or on another subnet.
  • Page 186: Manually Configuring Channel 2 For Controllers On Subnets

    11-12 Communicating with Devices on an Ethernet Network This Field Specifies Subnet Mask The controller’s subnet mask. The subnet mask is used to interpret IP addresses when the internet is divided into subnets. Gateway Address The IP address of the gateway that provides a connection to another IP network.
  • Page 187: For Controllers On Subnets

    130.151.194.1 Ethernet gateway or router" BOOTP 130.151.132.1 server 130.151.132.xxx Subnet B PLC-5/80E processor Hostname: Iota2 IP address: 130.151.132.110 Subnet Mask: 255.255.255.0 Gateway Address: 130.151.132.1 Communicating with Devices on an Ethernet Network Because BOOTP requests are seen only on the local subnet, each subnet needs its own BOOTP server and BOOTPTAB file.
  • Page 188 -- host IP address sm -- subnet mask vm -- BOOTP vendor extensions format tc -- template host #Default string for each type of Ethernet client defaults5E: ht=1:vm=rfc1048:sm=255.255.255.0 #Entries for Ethernet PLC-5 controllers: iota1:\ tc=defaults5E:\ gw=130.151.194.1:\ ha=0000BC1C1234:/ ip=130.151.194.19 Legend:...
  • Page 189: Using Domain Name Service

    IP address. For the PLC-5 controller, this conversion is a service provided by a remote host on the network. With this release of Ethernet PLC-5 controllers and release 5.20 or greater of RSLogix programming software, you may enter the symbolic form of the IP address as the IP address in the Message Block.
  • Page 190: Using The Embedded Web Server

    11-16 Communicating with Devices on an Ethernet Network Using the Embedded Web Server Publication 1785-UM012D-EN-P - July 2005 To use the embedded web server: 1. Go online at your controller IP address (for example, www.cle.ab.com). The 1785-ENET Ethernet Programmable Controllers main page appears: 2.
  • Page 191 Communicating with Devices on an Ethernet Network The TCP/IP Configuration page appears and displays TCP/IP parameters: 4. At the bottom of the TCP/IP configuration page, click on Diagnostic Information. The Diagnostic Information page appears and displays two lists of statistics pages: The first list contains Network Stack Statistics.
  • Page 192 11-18 Communicating with Devices on an Ethernet Network Publication 1785-UM012D-EN-P - July 2005 This page displays general messaging statistics: Use the information on this page when troubleshooting the network.
  • Page 193 Details of each counter on the General Ethernet Counters page are described in the following table. This Counter Totals Commands Sent number of PCCC (programmable controller communication commands) sent by the module Replies Sent number of PCCC replies sent by the module Command Received number of PCCC commands received by the module Replies Received...
  • Page 194 7. On the bottom of your current page, click on Memory Map. The Data Table Memory Map page appears and displays a table that lists the data table files and their type and size in elements of the connected PLC-5 as shown in the following example:...
  • Page 195 8. On the bottom of the Data Table Memory Map page, click on DT Monitor. The Data Table Monitor page appears and displays a table that shows the contents of the selected PLC-5 data table file: The available and default display formats depend on the data type of the file.
  • Page 196: Generating User Provided Web Pages

    You can use a text editor to generate up to 16 user provided web pages. The pages are stored in consecutive ASCII files of the PLC-5 controller. The channel configuration feature of RSLogix5 (release 5.20 or later) allows you to...
  • Page 197 Communicating with Devices on an Ethernet Network you can reference other WWW servers and display images from other sources without affecting your usage of data table memory (except for the size of the HTTP reference) Referencing Data Table Memory - reference data table memory locations by placing custom tags into your HTML source which specify the data table location and optional formatting information.
  • Page 198 Generating Custom Data Table Monitor Pages You can generate Custom Data Table Monitor pages with your text editor and then download them to the PLC-5 controller. The first element of the file must contain a special tag as follows: <!ABCDM-xx>...
  • Page 199 Communicating with Devices on an Ethernet Network Referencing Data Table Memory - the Data Table locations in the Custom Data Table Monitor are referenced by placing custom tags into the ASCII file of the controller. The format of the custom tag is: <!ABDTR-file_type{file_number}:{file_element}[,#elements][%forma t][#expand][!comment]>...
  • Page 200: Importing User Page Files To The Plc-5 Controller

    3. Use the browser to locate the user page file you want to import. 4. Double-click on the file to select it and click OK. 5. Repeat this process for each user page file. 6. When all user page files have been imported, go online with your PLC-5 controller.
  • Page 201 Communicating with Devices on an Ethernet Network 7. Click on the User Provided Pages link to view the User Provided Pages menu, as shown in the following example: 8. Click on the User Provided Page # to display that specific page.
  • Page 202 11-28 Communicating with Devices on an Ethernet Network Publication 1785-UM012D-EN-P - July 2005 10. Select the User Provided Page #4 to display the following screen: 11. Click on [+]A22 to display the following screen: You can change the radix display of N7:0 through N7:2: 1.
  • Page 203: Using Multihop Messaging

    Ethernet with ControlLogix devices or through a ControlLogix Ethernet module (1756-ENET) to other PLC-5 and SLC controllers. You need a series E, revision D or later PLC-5 controller, and if using a sidecar module, you will need a series B or later 1785-ENET interface module.
  • Page 204: Multihop Examples

    11-30 Communicating with Devices on an Ethernet Network originating PLC-5 controller with Ethernet interface module Ethernet link Publication 1785-UM012D-EN-P - July 2005 Keep in mind these considerations: RSLogix programming software on ControlNet and DH+ links cannot see the controllers on an Ethernet link.
  • Page 205 PLC-5 with Ethernet interface ControlLogix controller in chassis 1 originating PLC-5 with Ethernet interface PLC-5 (station 76) on DH+ link (link 12) Note: Both 1756-DHRIO modules need routing tables that show a path to both link 12 and the link ID that is configured for the Ethernet port of the originating PLC-5 controller.
  • Page 206: Over Ethernet

    17 seconds. To communicate through a ControlLogix 1756-ENET module, you configure the multihop feature of a MSG instruction from the Ethernet PLC-5 controller (or PLC-5 controller with 1785-ENET sidecar module) to the target device. You need RSLogix 5 programming software. For more information, see the MSG instruction in the PLC-5 Programmable Controller Instruction Set Reference Manual, publication 1785-6.1.
  • Page 207: Interpreting Error Codes

    Interpreting Error Codes Communicating with Devices on an Ethernet Network When the controller detects an error during the transfer of message data, the controller sets the .ER bit and enters an error code: Code - Hexadecimal Description (word 1 of the control block) (displayed on the data monitor screen) 0010 No IP address configured for the network...
  • Page 208: Interpreting Ethernet Status Data

    APS in the WHO Active screen Monitor the status of Ethernet PLC-5 controllers by accessing the Ethernet channel 2 status screen of your programming software. The diagnostic counter data displayed is stored in the diagnostic file defined on the Ethernet channel 2...
  • Page 209: Monitoring General Ethernet Status

    Status Field Bytes In Octets 28-31 Out Octets 32-35 In Packets 36-39 Out Packets 40-43 Excessive collisions 56-59 Excessive deferrals 60-63 Alignment errors 44-47 FCS errors 48-51 MAC receive errors 64-67 MAC transmit errors 68-71 Single collisions 72-75 Multiple collisions 76-79 Deferred transmission 80-83...
  • Page 210: Monitoring Ethernet Commands

    11-36 Communicating with Devices on an Ethernet Network Status Field Bytes Sent Received Status Field Bytes Sent 8-11 Received 12-15 Sent with error 16-19 Received with error 20-23 Timed out 24-27 Publication 1785-UM012D-EN-P - July 2005 Monitoring Ethernet commands Displays the Number of Commands sent by the channel Commands received by the channel Monitoring Ethernet replies...
  • Page 211: Ethernet Plc-5 Performance Considerations

    Ethernet PLC-5 Performance Considerations Communicating with Devices on an Ethernet Network Actual performance of an Ethernet PLC-5 controller varies according to: size of Ethernet messages frequency of Ethernet messages network loading the implementation of and performance of your controller application...
  • Page 212: Performance: Ethernet Plc-5 Controller To Ethernet

    11-38 Communicating with Devices on an Ethernet Network Publication 1785-UM012D-EN-P - July 2005 Performance: Ethernet PLC-5 Controller to Ethernet PLC-5 Controller PLC-5 Controller Typed Write - Packet Size...
  • Page 213: Using This Chapter

    For detailed information about configuring privileges, see the documentation for your programming software. If your application requires privileges beyond those provided by the enhanced or Ethernet PLC-5 controllers, see the PLC-5 Protected Controller Product Data for 1785-5/26, -5/46, and -5/86 controllers, publication 1785-2.28. Chapter...
  • Page 214: About Passwords And Privileges

    Publication 1785-UM012D-EN-P - July 2005 The passwords and privileges function supported by enhanced and Ethernet PLC-5 controllers helps you protect your programs by restricting access to controller files and functions. You can assign a privilege class to a node, channel or file. The privilege class defines the level of access (read or write) or type of function (I/O forcing, memory clearing) the PLC-5 controller allows.
  • Page 215: Defining Privilege Classes

    Defining Privilege Classes Node C has Class 3 access to channel 2A, based on the node privilege the controller has assigned it If node privileges had not been assigned in this example, IMPORTANT the node would have had the same privilege class as that assigned to its channel.
  • Page 216: Assigning A Privilege Class To A Channel Or Offline File

    12-4 Protecting Your Programs Assigning a Privilege Class to a Channel or Offline File Assigning a Privilege Class to a Node Publication 1785-UM012D-EN-P - July 2005 For example, set your privilege classes as follows on the channel privileges screen of your programming software (an X indicates that the privilege is enabled): Privileges \ Privilege Class Names Modify Privileges...
  • Page 217: Assigning Read/Write Privileges To A Program File

    Assigning Read/Write Privileges to a Program File Assigning Read/Write Privileges to a Data File You can assign read and write privileges for each program file in a controller. These privileges limit the access of users to view or change your program files. Two privileges determine whether a user can read or write to a program file: the users’...
  • Page 218 12-6 Protecting Your Programs Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 219: Programming Considerations

    Using This Chapter Forcing Programming Considerations For Information About Forcing Extended forcing Using special programming routines Priority scheduling for interrupts and MCPs Defining and programming interrupt routines 13-15 Forcing I/O lets you turn specific input and output bits on or off for testing purposes.
  • Page 220: Forcing Sfc Transitions

    I/O on a DeviceNet network. Extended forcing is also useful for forcing analog I/O. With series E, revision B and later Enhanced, Ethernet, and ControlNet PLC-5 controllers, you gain the capability to force a total of 1,024 block-transfer data words. These words can be either integer, binary, ASCII, or hexadecimal/BCD data type.
  • Page 221 The 1771 read command type of the CIO instruction operates in the same manner as the BTR instruction; the 1771 write command type of the CIO instruction operates in the same manner as the BTW instruction. For simplicity, the following descriptions and examples of extended forcing refer to the BTR instruction (for BTR and 1771 read command type of CIO instructions) and the BTW instruction (for BTW and 1771 write command type of CIO instructions).
  • Page 222: Increased Program Scan Time

    13-4 Programming Considerations Publication 1785-UM012D-EN-P - July 2005 For BTR instructions using non-configured data tables, the .DN bit indicates when data is valid in the BTR data file. When you configure files in the extended force configuration table, the .DN bit indicates that the data is in the BTR data buffer.
  • Page 223: Using Protected Controllers

    Setting Up and Using Extended Forcing Using Protected Controllers If you are using a PLC-5 protected controller, you must configure forcing online since, by their design, protected controllers cannot download forcing operations. This protects controller operation from possible force operations programmed in offline mode.
  • Page 224: Step 1 - Select Which Group Of Data You Want To Force

    13-6 Programming Considerations • Select all of data file N11 • Select N11 beginning at word 20 for 60 words (i.e., beginning at the start of BTR #2 and ending at the end of BTR #4) • Make two selections, one beginning at the start of BTR #2 with the size of BTR #2 (N11:20 for 12 words), and one beginning at the start of BTR #4 with the size of BTR #4 (N11:55 for 25 words).
  • Page 225: Step 2 - Use The Programming Software To Enter Or Edit The Data You Want To Force In The Extended Force Configuration Table

    Step 2 - Use the Programming Software to Enter or Edit the Data You Want to Force in the Extended Force Configuration Table The extended force configuration table lets you specify as many as four groups of block-transfer data words to force. Each group can contain as many as 256 words of block-transfer data.
  • Page 226: Step 3 - Use The Programming Software To Enter Force Values For The Specified Data Table Files

    13-8 Programming Considerations Publication 1785-UM012D-EN-P - July 2005 Step 3 - Use the Programming Software to Enter Force Values for the Specified Data Table Files The block-transfer forcing screens include a function that lets you change the radix among binary, octal, HEX/BCD, and ASCII. If you select the binary radix, the display is similar to the I/O forcing display.
  • Page 227 To ensure that the received BTR data table file has been properly updated before you use the data, do the following: 1. Enable the input conditions of the BTR rung. 2. Wait for the BTR done bit to be set. 3.
  • Page 228: Using Special Programming Routines

    13-10 Programming Considerations Using Special Programming Routines Publication 1785-UM012D-EN-P - July 2005 4. Ensure that data does not change in the block-transfer data table output file until the BTW is complete. BT10:1 BTW data valid BT10:1 Rack false-to-true Group transition Module Control Block BT10:1...
  • Page 229: Priority Scheduling For Interrupts And Mcps

    PII to run to completion before returning to the main logic program, use UID and UIE instructions in your PII program file. PLC-5 controllers prioritize when fault routines, interrupts, and main control programs are executed. This prioritization is called “scheduling.” The PLC-5 controller considers some scheduling tasks to be of greater importance than others.
  • Page 230: Program Execution States

    MCPs, however, are executed to completion from first user program to last. Program Execution States User programs in the PLC-5 controller are always in one of the following five states: completed, ready, executing, waiting, or faulted.
  • Page 231 Program would be executing if it were of a higher priority; all programs pass through this state; there can be several programs in this state at any given time Waiting State While block-transfer to remote rack occurs, a rescheduling operation is performed and lower-priority programs are executed (unless all other executions are prohibited by a UID/UIE...
  • Page 232: Influencing Priority Scheduling

    While the controller is executing within a UID/UIE zone, the executing program cannot be interrupted except by a fault routine. For more information on programming UID or UIE instructions, see the PLC-5 Programming Software Instruction Set Reference, publication 1785-6.1. O:013 Program can be...
  • Page 233: Defining And Programming Interrupt Routines

    Defining and Programming Interrupt Routines For information about configuring and programming these routines, see the appropriate chapter: For Information About See Chapter Power-up routines Fault routines Main control programs (MCPs) Selectable timed interrupts (STIs) 17 Controller input interrupts (PIIs) Programming Considerations 13-15 Publication 1785-UM012D-EN-P - July 2005...
  • Page 234 13-16 Programming Considerations Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 235: Preparing Power-Up Routines

    Using This Chapter Setting Power-Up Protection Preparing Power-Up Routines For Information About: Go to Page Setting power-up protection 14-1 Allowing or inhibiting startup 14-2 Defining controller power-up 14-2 procedure You can configure your controller so that if a power-loss is experienced while in run mode, the controller does not come back up in run mode.
  • Page 236: Allowing Or Inhibiting Startup

    14-2 Preparing Power-Up Routines Allowing or Inhibiting Startup Defining a Controller Power-Up Procedure Publication 1785-UM012D-EN-P - July 2005 Major fault bit S:11/5 controls whether you can power up the controller in run mode after a loss of power. Do not confuse this bit with user control bit S:26/1.
  • Page 237 If You are With Using SFCs No fault routine Not using SFCs Fault routine Using a fault file SFCs Not using a fault file Not using SFCs Each x indicates a bit that can be 0 or 1 for the status value described. To set and reset bits: 1.
  • Page 238 14-4 Preparing Power-Up Routines Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 239: Using This Chapter

    Defining a watchdog timer Programming a fault routine Monitoring faults Fault routines execute when a PLC-5 controller encounters a major fault during program execution. Use a fault routine to specify how you want the controller to respond to a major fault. If your controller experiences a fault during program execution, you can tell the controller to interrupt the current program, run your fault routine, and then continue processing the original program.
  • Page 240: Understanding Controller-Detected Major Faults

    The outputs remain in their last state or they are de-energized, based on how you set the last state switch in the I/O chassis. In the PLC-5 controller-resident chassis, outputs are reset IMPORTANT regardless of the last state switch setting when one of the...
  • Page 241: Fault In A Controller-Resident Or Extended-Local I/O Rack

    To decide how to set this switch, evaluate how the machines in your process will be affected by a fault. For example: how will the machine react to outputs remaining in their last state or to outputs being automatically de-energized? what is each output connected to? will machine motion continue? could this cause the control of your process to become unstable?
  • Page 242: Defining A Fault Routine

    PLC-5 controller detects a major fault. You can, however, change the fault routine program that is to be run through ladder logic. If you do not specify a program file number, the controller immediately enters fault mode after detecting a fault.
  • Page 243: Defining A Watchdog Timer

    Defining a Watchdog Timer To define a controller fault routine: For more information about fault codes, see the documentation for your programming software. The watchdog timer (S:28) monitors the program scan. If the scan takes longer than the watchdog timer value, a fault routine is initiated and executed. The timer is the maximum time (in ms) for the watchdog;...
  • Page 244: Avoiding Multiple Watchdog Faults

    If you continue to encounter the memory loss fault, call your local Rockwell Automation representative. To prepare your fault-routine program, first examine the major fault information recorded by the PLC-5 controller and then decide whether to do the following before the PLC-5 controller automatically goes to fault mode: set an alarm...
  • Page 245: Setting An Alarm

    Clearing a Major Fault You can clear a major fault with one of these methods: Turn the keyswitch on the PLC-5 controller from REM to PROG to RUN. Use the programming software to clear the major fault (if recoverable).
  • Page 246 15-8 Preparing Fault Routines Publication 1785-UM012D-EN-P - July 2005 6. If the controller finds a match, the FSC instruction sets the found (.FD) bit in the specified control structure. 7. Use a MOV instruction to clear the fault in S:11. In the following figure, #N10:0 is the reference file.
  • Page 247: Changing The Fault Routine From Ladder Logic

    Follow these guidelines when creating fault routines: Store initial conditions and reset other data to achieve an orderly start-up later. Monitor the shutdown of critical outputs. Use looping if needed to extend the single fault routine scan time up to the limit of the controller watchdog timer so your program can confirm that critical events took place.
  • Page 248: Using Ladder Logic To Recover From A Fault

    15-10 Preparing Fault Routines Method User-generated major fault Reset input image table Fault zone programming method Publication 1785-UM012D-EN-P - July 2005 Using Ladder Logic to Recover from a Fault If you have the appropriate fault routine and ladder logic to perform an orderly shutdown of the system, you may want to configure an I/O rack fault as a minor fault.
  • Page 249: Block-Transfers In Fault Routines

    Monitoring Faults You can Monitor Minor and major faults Fault codes Global status bits Multiple chassis status bits Block-Transfers in Fault Routines If the controller runs a fault routine that contains block-transfer instructions, the controller performs these block-transfers immediately upon completing any block-transfers currently in the active buffer, ahead of block-transfer requests waiting in the queue.
  • Page 250: Monitoring Major/Minor Faults And Fault Codes

    15-12 Preparing Fault Routines Displaying a Description of the Major Faults The status text that appears corresponds to the most significant fault when the cursor is not on the major fault status word. If the cursor is on a major fault word bit and that bit is set, the status text that appears corresponds to the bit that the cursor is on.
  • Page 251: Monitoring Status Bits

    PLC-5/11, -5/20, 5/20E PLC-5/30 PLC-5/40, -5/40L, 5/40E PLC-5/60, -5/60L, -5/80, 5/80E The multiple chassis status bits are used to monitor the racks in your I/O system. This information is stored in the I/O status file (S:16, low byte) that you specify using the controller configuration screen in your programming software.
  • Page 252 15-14 Preparing Fault Routines Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 253: Using This Chapter

    Using This Chapter Selecting Main Control Programs Using Main Control Programs For Information About Selecting main control programs Understanding how the controller interprets MCPs Configuring MCPs Monitoring MCPs You can have as many as 16 control programs active at one time. Each of these programs is called a “main control program”...
  • Page 254: Understanding How The Controller Interprets Mcps

    16-2 Using Main Control Programs Understanding How the Controller Interprets MCPs Publication 1785-UM012D-EN-P - July 2005 The MCPs are scheduled to execute in the order in which you specify on the Crocessor Configuration screen. You can configure: an I/O image update and housekeeping after each MCP is completed (default parameter), or the controller to skip the I/O scan and run the next MCP After the last MCP is completed, all MCPs are then repeated in the same order.
  • Page 255: Configuring Mcps

    Configuring MCPs If the MCP is a The Following Occurs: Ladder-logic program 1.All rungs are executed—from the first rung to the last, with all timers, counters, jumps, and subroutines active. 2.After the END instruction in the ladder program, the controller initiates an I/O update—reading local inputs, writing local outputs, reading remote buffers, and writing remote outputs to the buffer.
  • Page 256 16-4 Using Main Control Programs In this Field Program file Disable Skip I/O update Publication 1785-UM012D-EN-P - July 2005 Do the Following Specify the program file numbers for MCPs A-P and the order in which the MCPs should be run. This configuration is read before the MCP is executed; if you make a change to the configuration screen regarding an MCP, that change takes effect on the next execution of the MCP.
  • Page 257: Monitoring Mcps

    Monitoring MCPs If you plan to use SFC subcharts, make sure you define IMPORTANT something for MCP A - even an empty ladder file is sufficient. If a MCP is undefined, the controller faults on the second SFC scan with major fault code 71 SFC subchart is already executing.
  • Page 258 16-6 Using Main Control Programs Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 259: Using This Chapter

    Using This Chapter Using a Selectable Timed Interrupt Using Selectable Timed Interrupts For Information About Go to Page Using a selectable timed interrupt Defining a selectable timed interrupt Monitoring selectable timed interrupts A selectable timed interrupt (STI) tells the controller to periodically interrupt program execution (due to elapsed time) to run an STI program once to completion.
  • Page 260: Sti Application Example

    (see rungs below). Set a bit if a mismatch is found. Perform this comparison once every 800 ms. Assume that another active step retrieves status data from the PLC-5 controllers with a MSG instruction and loads it into a temporary source file (N5:10).
  • Page 261: Defining A Selectable Timed Interrupt

    Defining a Selectable Timed Interrupt The block-transfers in an STI should only be between the controller and local I/O. Remote block-transfer instructions in an STI cause the controller to resume executing the user program while waiting for the block-transfer to complete.
  • Page 262: Monitoring Selectable Timed Interrupts

    17-4 Using Selectable Timed Interrupts Monitoring Selectable Timed Interrupts Publication 1785-UM012D-EN-P - July 2005 For example, you could enter a in S:31 and a controller to execute ladder file 7 every 15 ms. You can use only one STI at any one time. However, you can enable or disable the interrupt, change to a different interrupt file, or change the time between interrupts.
  • Page 263: Using This Chapter

    Using This Chapter Using a Processor Input Interrupt Using Processor Input Interrupts For Information About Go to Page Using a processor input interrupt Defining a processor input interrupt Monitoring processor input interrupts A processor input interrupt (PII) specifies when an event-driven input causes the controller to interrupt program execution and run a PII program file once to completion.
  • Page 264: Writing Pii Ladder Logic

    18-2 Using Processor Input Interrupts Publication 1785-UM012D-EN-P - July 2005 Writing PII Ladder Logic Follow these rules when you write ladder logic for a PII. Store the PII program in a ladder file. Make sure the input condition (to cause the interrupt) doesn’t occur faster than the execution time of the PII program.
  • Page 265: Block-Transfers In Processor Input Interrupts (Piis)

    As shown in the following figure, the PII program must: count 100 tablets per group set an output at the 100th tablet reset the counter for the next group C4:0 Output The output image bit remains set until the next count. Block-Transfers in Processor Input Interrupts (PIIs) If the controller runs a PII that contains block-transfer instructions, the controller performs these block-transfers immediately on completing any...
  • Page 266: Design Considerations

    18-4 Using Processor Input Interrupts Publication 1785-UM012D-EN-P - July 2005 When the controller runs an PII with a block-transfer IMPORTANT instruction to a remote chassis, the MCP resumes processing while waiting for the block-transfer to complete unless a UIE/UID instruction pair is used. PII configuration changes are not put into effect until the controller goes from program to run or test mode.
  • Page 267: Defining A Controller Input Interrupt

    Defining a Controller Input Interrupt In this PII Configuration Field Preset File number Module group Bit mask Compare value To define a PII, use the controller configuration screen in your programming software. Do the Following Enter a preset value to determine how many conditions you want to occur before the interrupt.
  • Page 268: Monitoring Controller Input Interrupts

    18-6 Using Processor Input Interrupts Monitoring Controller Input Interrupts This PII Field Stores Events since last Displays the number of PII events (the input conditions that caused the interrupt) interrupt since the last interrupt. PII changed bits Displays the bit transitions that caused the interrupt. You can use this information to condition other rungs in your ladder program.
  • Page 269: Controller Specifications

    System Specifications Controller Specifications For all controller-related specifications, please refer to the related installation instructions: Enhanced PLC-5 Controllers Installation Instructions, publication 1785-IN062 Ethernet PLC-5 Programmable Controllers Installation Instructions, publication 1785-IN063 To get this documentation, you can either: view or download an electronic version from the internet at www.rockwellautomation.com/literature...
  • Page 270: Memory And Channel Specifications

    System Specifications Controller/ Maximum Total I/O Maximum Cat. No. User Memory (Any Mix) Words PLC-5/11 512 (any mix) or (1785-L11B) 384 in + 384 out (complementary) PLC-5/20 512 (any mix) or (1785-L20B) 512 in + 512 out PLC-5/26 (complementary) (1785-L26B)
  • Page 271 The PLC-5/60 and -5/60L controllers have a limit of 56K words per program file and 32K words per data table file. The PLC-5/80, -5/80E controllers have 64K words of total data table space with a limit of 56K words per program file and 32K words per data table file.
  • Page 272: Memory Backup Devices

    2 years 60°C 84 days 25°C 1 year You can add an EEPROM to the PLC-5 controller to provide backup memory for your program in case the controller loses power. These memory cards are available: Catalog Number For This Product...
  • Page 273 EEPROM memory cannot be loaded to a ControlNet PLC-5 controller if the EEPROM was burned on a non-ControlNet PLC-5 controller. EEPROM memory can be loaded to a PLC-5 controller if its I/O memory size is greater than or equal to the I/O memory of the PLC-5 controller from which the EEPROM was saved.
  • Page 274 System Specifications Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 275 S:0 - S:2 Processor Status File Processor status data is stored in data file 2. For more information about any of these topics, see the IMPORTANT description in this manual or the documentation for your programming software. This Word Stores Arithmetic flags •...
  • Page 276 Processor Status File Publication 1785-UM012D-EN-P - July 2005 This Word Stores S:2Switch setting information S:2/00 Channel 1A DH+ station number through S:2/05 S:2/06 Channel 1A DH+ baud rate 057.6 kbps 1230.4 kbps S:2/07 Not defined S:2/08 S:2/09 Last state 0outputs are turned off 1outputs retain last state S:2/11 I/O chassis addressing...
  • Page 277: S:3-10

    S:3-10 This Word Stores S:3 to S:6 Active Node table for channel 1A WordBitsDH+ Station # 30-1500-17 40-1520-37 50-1540-57 60-1560-77 Global status bits: (See also S:27, S:32, S:33, S:34, and S:35) • S:7/0-7 rack fault bits for racks 0-7 • S:7/8-15 unused Last program scan (in ms) Maximum program scan (in ms)
  • Page 278: S:11

    Processor Status File S:11 Publication 1785-UM012D-EN-P - July 2005 This Word Stores S:11major fault word S:11/00 Corrupted program file (codes 10-19). See major fault codes (S:12). S:11/01 Corrupted address in ladder program (codes 20-29). See major fault codes (S:12). S:11/02 Programming error (codes 30-49).
  • Page 279: S:12

    S:12 This Fault Code Indicates this Fault 00-09 Reserved for user-defined fault codes. You can use user-defined fault codes to identify different types of faults or error conditions in your program by generating your own recoverable fault. To use these fault codes, choose an input condition that decides whether to jump to a fault routine file, then use the JSR instruction as the means to jump to the fault routine file.
  • Page 280 Processor Status File This Fault Code Indicates this Fault You tried to jump to one too many nested subroutine files You did not enter enough subroutine parameters You jumped to an invalid (non-ladder) file You entered a CAR routine file that is not 68000 code You entered a negative preset or accumulated value in a timer instruction You entered a negative time variable in a PID instruction You entered an out-of-range setpoint in a PID instruction...
  • Page 281 This Fault Code Indicates this Fault The controller detected duplicate labels The controller tried to start an SFC subchart that is already running The controller tried to stop an SFC subchart that isn’t running The controller tried to start more than the allowed number of subcharts SFC file error detected The SFC has too many active functions SFC step loops back to itself.
  • Page 282 The size of the transfer requested through the sidecar module is an illegal size The offset into the raw transfer segment of the sidecar module is an illegal value Sidecar module transfer protection violation; for PLC-5/26, -5/46, and -5/86 controllers only Publication 1785-UM012D-EN-P - July 2005...
  • Page 283: S:13-S:24

    S:13-S:24 This Word: Stores S:13 Program file where fault occurred S:14 Rung number where fault occurred S:15 VME status file S:16 I/O status File S:17Minor fault (word 2) See also S:10. S:17/00 BT queue full to remote I/O S:17/01 Queue full - channel 1A; maximum remote block-transfers used S:17/02 Queue full - channel 1B;...
  • Page 284: S:26-S:35

    B-10 Processor Status File S:26-S:35 Publication 1785-UM012D-EN-P - July 2005 This Word Stores S:26User control bits S:26/00 Restart/continuous SFC: when reset, controller restarts at first step in SFC. When set, controller continues with active step after power loss or change to S:26/01 Start-up protection after power loss: when reset, no protection.
  • Page 285: S:36-S:78

    S:36-S:78 Setting inhibit bits in the processor status file (S:27, S:33, or IMPORTANT S:35) does not update inhibit bits in the I/O status file. This Word Stores S:36 - S:45 Reserved S:46 PII program file number S:47 PII module group S:48 PII bit mask S:49...
  • Page 286: S:79-S:127

    B-12 Processor Status File S:79-S:127 Publication 1785-UM012D-EN-P - July 2005 This Word Stores S:68 Installed memory card type: 0 - No memory card installed 1 - 1785-ME16 2 - 1785-ME32 3 - 1785-ME64 4 - 1785-ME100 5 - 1785-CHBM 6 - 1785-RC 7-15 - Reserved When the 1785-RC module is installed, the eight least-significant bits indicate the memory card’s status:...
  • Page 287 Using This Chapter Program Scan Maximizing System Performance For Information About Program scan Calculating throughput Input and output modules delay I/O backplane transfer Remote I/O scan time Controller time Example calculation Performance effects of online operations Inserting ladder rungs at the 56K-word limit C-13 Using program control instructions For information about the time that it takes the controller to execute a specific instruction, see Appendix D.
  • Page 288: Effects Of False Logic Versus True Logic On Logic Scan Time

    Maximizing System Performance Publication 1785-UM012D-EN-P - July 2005 Effects of False Logic versus True Logic on Logic Scan Time The rung below—which changes states from one program scan to the next— will change your scan time by about 400 s. I:000 If I:000/00 is Then the Rung is...
  • Page 289: Effects Of Different Instructions On Logic Scan Time

    If you use subroutines, program scan times can vary by the scan time of entire logic files. Effects of Different Instructions on Logic Scan Time Some instructions have a much greater effect on logic scan time than others based on the time that it takes to execute each instruction. Program scan time is also affected by the construction of your ladder rungs.
  • Page 290: Effects Of Housekeeping Time

    STIs during other scans. Effects of Housekeeping Time In PLC-5 controllers, basic housekeeping takes 3.5 ms. If it takes the controller 21.8 ms to execute a ladder program, the overall program scan time is 25.3 ms.
  • Page 291: Using Global Status Flag Files

    Putting Block-Transfer Modules in Controller-Resident Chassis Because controller-resident racks cannot be updated until after active block-transfers are completed, putting block-transfer modules in the controller-resident chassis can affect housekeeping by a worst-case time of approximately 100 s per one word of block-transfer data. Note that this estimate is based on a worst-case scenario.
  • Page 292 Maximizing System Performance Input and Output Modules Delay I/O Backplane Transfer Remote I/O Scan Time Remote I/O Scan Loop Rack 3 Remote I/O Rack 2 Buffer Rack 1 Publication 1785-UM012D-EN-P - July 2005 All input and output modules have a “delay time,” which is the time that it takes the module to transfer information to/from the I/O backplane through the I/O module to/from the field device.
  • Page 293: Communication Rate

    These three factors affect the remote I/O scan time: communication rate number of rack entries block-transfers Communication Rate The communication rate determines the time it takes for the scanner to communicate with each individual entry in its scan list. The following table lists the amount of time required to communicate to a device at each communication rate.
  • Page 294 I/O scan time. If you select the baud rate as 230.4 kbps, and you are using IMPORTANT the serial port or a PLC-5 coprocessor, use channel 2 for better overall system performance. ms/word based...
  • Page 295: Calculating Worst-Case Remote I/O Scan Time

    Calculating Worst-Case Remote I/O Scan Time Since it is impossible to predict within which remote I/O scan a block-transfer will occur, you only can calculate the worst-case remote I/O scan time. To calculate the worst case time: 1. Determine the normal I/O time (without block-transfers) 2.
  • Page 296 C-10 Maximizing System Performance Publication 1785-UM012D-EN-P - July 2005 However, if rack 2 has the most time-critical I/O, use the configurable scan list to specify: rack 1 rack 2 rack 3 rack 2 rack 4 rack 2 Using this scan list, rack 2 is scanned every other rack. The list has 6 entries, so the normal I/O scan time is 6 x 10 ms = 60 ms.
  • Page 297: Controller Time

    Controller Time In a PLC-5 system, inputs are buffered between the I/O image table and the remote I/O buffer. The movement of inputs from the remote I/O buffer to the input buffer is asynchronous to the movement of data from the input buffer to the input image table.
  • Page 298: Example Calculation

    I/O scan time I/O backplane output card delay total The performance of the PLC-5 controller is affected when you perform online operations via a DH+ link to your program files while in Run mode. Affected activities are: DH+ messages...
  • Page 299: Effect Of Inserting Ladder Rungs At The 56K-Word Limit

    The amount of time that the messaging and block-transfers can be delayed is proportional to the size (K words) of the ladder file. The following table lists the performance effects (when using any of the 6200 Series PLC-5 Programming Software releases that support the controller you are using).
  • Page 300: Using Program Control Instructions

    C-14 Maximizing System Performance Using Program Control Instructions Publication 1785-UM012D-EN-P - July 2005 Scan time can increase based on how you use JMP/LBL instructions and FOR/NXT instructions. Using JMP/LBL Instructions Keep in mind these issues when programming JMP/LBL instructions: Instruction Consideration The execution time required for a JMP instruction depends on the program file that contains the JMP instruction.
  • Page 301: Relay Instructions

    Timing and memory requirements for bit and word instructions Timing and memory requirements for file program control, and ASCII instructions For a more detailed description of each of these IMPORTANT instructions, see the PLC-5 Programming Software Instruction Set Reference, publication 1785-6.1. Appendix Go to Page D-14 D-15...
  • Page 302: Relay Instructions

    Instruction Set Quick Reference Instruction I:012 I:012 O:013 O:013 O:013 Publication 1785-UM012D-EN-P - July 2005 Relay Instructions Description Examine On Examine data table bit I:012/07, which corresponds to terminal 7 of an input module in I/O rack 1, I/O group 2. If this data table bit is set (1), the instruction is true.
  • Page 303 Timer Instructions Instruction Timer On Delay TIMER ON DELAY Timer T4:1 Status Bits: Time Base EN - Enable Preset TT - Timer Timing Accum DN - Done Timer Off Delay TIMER OFF DELAY Timer T4:1 Time Base Status Bits: Preset EN - Enable Accum TT - Timer Timing...
  • Page 304: Counter Instructions

    Instruction Set Quick Reference Instruction RETENTIVE TIMER ON Timer Time Base Preset Accum T4:1 Instruction COUNT UP Counter Preset Accum Publication 1785-UM012D-EN-P - July 2005 Description Retentive Timer On If the input conditions go true, timer T4:10 starts incrementing i 1-second intervals as long as the rung remains true.
  • Page 305: Compare Instructions

    Instruction Count Down COUNT DOWN Counter C5:1 Preset Accum Status Bits: CU-Count Up CD-Count Down DN-Count Down done OV-Overflow UN-Underflow Compare Instructions Instruction Limit Test LIMIT TEST (CIRC) Low limit N7:10 Test N7:15 High limit N7:20 Mask Compare Equal MASKED EQUAL Source D9:5 0000...
  • Page 306 Instruction Set Quick Reference Instruction COMPARE Expression N7:5 = N7:10 xxxxxxxxxxxxx Source A Source B Publication 1785-UM012D-EN-P - July 2005 Description Compare If the expression is true, this input instruction is true. The CMP instruction can perform these operations: equal (=), less than (<), less than or equal (<=), greater than (>), greater than or equal (>=), not equal (<>), and complex expressions (up to 80 characters).
  • Page 307: Compute Instructions

    Compute Instructions Instruction Compute COMPUTE Dest N7:3 Expression N7:4 - (N7:6 * N7:10) Arc cosine ARCCOSINE Source F8:19 0.7853982 Dest F8:20 0.6674572 Addition Source A N7:3 Source B N7:4 Dest N7:12 Instruction Set Quick Reference Description If the input conditions go true, evaluate the Expression N7:4 - (N7:6 * N7:10) and store the result in the Destination (N7:3).
  • Page 308 Instruction Set Quick Reference Instruction ARCSINE Source 0.7853982 Dest 0.9033391 ARCTANGENT Source 0.7853982 Dest 0.6657737 AVERAGE FILE File Dest Control Length Position Publication 1785-UM012D-EN-P - July 2005 Description Arc sine When input conditions go true, take the arc sine of the value in F8:17 and store the result in F8:18.
  • Page 309 Instruction Clear Dest D9:34 0000 Cosine COSINE Source F8:13 0.7853982 Dest F8:14 0.7071068 Instruction Division DIVIDE Source A N7:3 Source B N7:4 Dest N7:12 Instruction Set Quick Reference Description When the input conditions are true, clear decimal file 9, word 3 (set to zero).
  • Page 310 D-10 Instruction Set Quick Reference Instruction NATURAL LOG Source Dest 1.609438 LOG BASE 10 Source Dest 0.6989700 MULTIPLY Source A Source B Dest Publication 1785-UM012D-EN-P - July 2005 Description Natural log When input conditions go true, take the natural log of the va in N7:0 and store the result in F8:20.
  • Page 311 Instruction Negate NEGATE Source N7:3 Dest N7:12 Sine SINE Source F8:11 0.7853982 Dest F8:12 0.7071068 Square Root SQUARE ROOT N7:3 Source Dest N7:12 Instruction Set Quick Reference Description When the input conditions are true, take the opposite sign of the Source (N7:3) and store the result in the Destination (N7:12).
  • Page 312 D-12 Instruction Set Quick Reference Instruction SORT File Control Length Position STANDARD DEVIATION File Dest Control Length Position Publication 1785-UM012D-EN-P - July 2005 Description Sort When the input conditions go from false-to-true, the values in N7:1, N7:2, N7:3.and N7:4 are sorted into ascending order. #N7:1 Status Bits: R6:0...
  • Page 313 Instruction Subtract SUBTRACT Source A N7:3 Source B N7:4 Dest N7:12 Tangent TANGENT Source F8:15 0.7853982 Dest F8:16 1.000000 X to the power of Y X TO POWER OF Y Source A N7:4 Source B N7:5 Dest N7:6 Instruction Set Quick Reference Description When the input conditions are true, subtract the value in Sour B (N7:4) from the value in Source A (N7:3) and store the result...
  • Page 314: Logical Instructions

    D-14 Instruction Set Quick Reference Instruction BITWISE AND Source A Source B Dest Source A Dest BITWISE INCLUSIVE OR Source A Source B Dest BITWISE EXCLUSIVE OR Source A Source B Dest Status Descriptio always always sets if the result is zero; otherwise sets if the most significant bit (bit 15 for decimal or bit 17 for octal) is set (1);...
  • Page 315: Conversion Instructions

    Conversion Instructions Instruction Convert from BCD FROM BCD Source D9:3 0037 Dest N7:12 Convert to BCD TO BCD Source N7:3 Dest D9:5 0044 Convert to Degrees RADIANS TO DEGREE Source F8:7 0.7853982 Dest F8:8 Instruction Set Quick Reference Description When the input conditions are true, convert the BCD value in the Source (D9:3) to a integer value and store the result in the Destination (N7:12).
  • Page 316: Bit Modify And Move Instructions

    D-16 Instruction Set Quick Reference Instruction DEGREES TO RADIAN Source Dest 0.785398 Instruction MOVE Source Dest 20.000000 MASKED MOVE Source Mask Dest Publication 1785-UM012D-EN-P - July 2005 Description Convert to Radians When the input conditions are true, convert degrees (the value in Source A) to radians and stores the result in the Destination (Source times p/180).
  • Page 317: File Instructions

    Instruction Bit Distribute BIT FIELD DISTRIB Source N7:3 Source bit Dest N7:4 Dest bit Length File Instructions Instruction File Arithmetic and Logic FILE ARITH/LOGICAL Control R6:1 Status Bits: Length EN - Enable Position DN - Done Bit Mode ER - Error Bit Dest #N15:10 Expression...
  • Page 318 D-18 Instruction Set Quick Reference Instruction COPY FILE Source Dest Length FILL FILE Source Dest Length Publication 1785-UM012D-EN-P - July 2005 Description File Copy When the input conditions are true, the controller copies the contents of the Source file (N7) into the Destination file (N12).
  • Page 319: Diagnostic Instructions

    Diagnostic Instructions Instruction File Bit Compare FILE BIT COMPARE Source #I:031 Status Bits: Reference #B3:1 EN - Enable Result #N7:0 DN - Done Bit Cmp Control R6:4 ER - Error Bit Length IN - Inhibit Bit Position FD - Found Bit Result Control R6:5 Length...
  • Page 320: Shift Register Instructions

    D-20 Instruction Set Quick Reference Instruction BIT SHIFT LEFT File Control Bit Address Length BIT SHIFT RIGHT File Control Bit Address Length FIFO LOAD Source FIFO Control Length Position FIFO UNLOAD FIFO Dest Control Length Position Publication 1785-UM012D-EN-P - July 2005 Shift Register Instructions Description Bit Shift Left...
  • Page 321: Sequencer Instructions

    Instruction LIFO Load LIFO LOAD Source N70:1 Status Bits: LIFO #N70:3 EN - Enable R6:61 Control Load Length DN - Done Bit Position EM - Empty Bit LIFO Unload LIFO UNLOAD LIFO #N70:3 Status Bits: Dest N70:2 EU - Enable R6:61 Control Unload...
  • Page 322: Program Control Instructions

    D-22 Instruction Set Quick Reference Instruction SEQUENCER OUTPUT File #N7:1 Mask 0F0F Dest O:014 Control R6:20 Length Position Instruction Label Number Index Initial Value Terminal Value Step Size NEXT Label Number Publication 1785-UM012D-EN-P - July 2005 Description Sequencer Output When the rung goes from false-to-true, the SQO instruction increments to the next step in the sequencer File (#N7:1).
  • Page 323 Instruction Jump to Subroutine JUMP TO SUBROUTINE Program File Input par N16:23 Input par N16:24 Input par Return par N19:11 Return par N19:12 Subroutine SUBROUTINE Input par N43:0 Input par N43:1 Input par N43:2 Return RETURN ( ) Return par N43:3 Return par N43:4...
  • Page 324 D-24 Instruction Set Quick Reference Instruction SFC Reset Prog File Number Restart Step At Publication 1785-UM012D-EN-P - July 2005 Description SFC Reset The SFR instruction resets the logic in a sequential function chart. When the SFR instruction goes true, the controller performs a lastscan/postscan on all active steps and actions in the selected file, and then resets the logic in the SFC on the next program scan.
  • Page 325: Process Control, Message Instructions

    Instruction Control Block PD10:0 Proc Variable N15:13 Tieback N15:14 Control Output N20:21 SEND/RECEIVE MESSAGE Control Block Bit #Status Bits 15EN - Enable 14ST - Start Bit 13DN - Done Bit 12ER - Error Bit 11CO - Continuous 10EW - Enabled-Waiting 9NR - No Response Integer (N) control block Word...
  • Page 326 BT queue S:32 bit # full for rack bit # PLC-5/11, -5/20, and 5/20E controllers also Description Block Transfer Write If the input conditions go from false-to-true, the block transfer write is initiated for the I/O module located at rack 1, group 0, module 0.
  • Page 327: Ascii Instructions

    ASCII Instructions Status Bits: EN - EnableEM - Empty Bit DN - Done BitEU - Queue ER - Error BitFD - Found Bit Instruction ASCII Test for Line ASCII TEST FOR LINE Channel Control R6:32 Characters ASCII Characters in Buffer ASCII CHARS IN BUFFER Channel Control...
  • Page 328 D-28 Instruction Set Quick Reference Instruction STRING EXTRACT Source ST38:40 Index Number Dest ST52:75 INTEGER TO STRING CONVERSION Source ST38:42 Dest ASCII HANDSHAKE LINE Channel AND Mask 0001 OR Mask 0003 Control R6:23 Channel Status ASCII READ Channel Dest ST52:76 Control R6:32 String Length...
  • Page 329 Instruction ASCII String Search STRING SEARCH Source ST38:40 Index Search ST52:80 Result ASCII String Compare ASCII STRING COMPARE Source A ST37:42 ST38:90 Source B ASCII Write Append ASCII WRITE APPEND Channel Status Bits Source ST52:76 EN - Enable Control R6:32 DN - Done Bit String Length ER - Error Bit...
  • Page 330: Bit And Word Instructions

    D-30 Instruction Set Quick Reference Category Code Relay Branch Timer and Counter TON Use the larger number for addresses beyond 2048 words in the controller’s data table. For every bit address above the first 256 words of memory in the data table, add 0.16 s and 1 word of memory. Publication 1785-UM012D-EN-P - July 2005 Bit and Word Instructions Title...
  • Page 331 Category Code Title Arithmetic subtract multiply divides square root negate clear average file standard deviation 262+E92.5 convert to BCD convert from BCD radian degree sine cosine tangent inverse sine inverse cosine inverse tangent natural log X to the power of Y 897 sort file (5/11, -5/20) (-5/30, -5/40,...
  • Page 332: File, Program Control, And Ascii Instructions

    D-32 Instruction Set Quick Reference Category Code Title File Arithmetic and Logic File Search and Compare File copy counter, timer, and control fill counter, timer, and control Shift Register bit shift left bit shift right FIFO load FIFO unload LIFO load LIFO unload Diagnostic 0 mismatch...
  • Page 333 Calculate execution times as follows: (time) + (quantity of additional parameters)(time/parameter). For example: if you are passing 3 integer parameters in a JSR within a PLC-5/11 controller, the execution time = 16.1 + (2)(3.8) = 23.7 ms Time ( s)
  • Page 334 FOR/ for next loop break user interrupt disable (PLC-5/11, -5/20, -5/30, -5/40, -5/60, and -5/80 controllers) user interrupt enable (PLC-5/11, -5/20, -5/30, -5/40, -5/60, and -5/80 controllers) Use the larger number for addresses beyond 2048 words in the controller’s data table.
  • Page 335 Category Code Title Process Control PID PID loop control Gains Independent • PLC-5/11, -5/20, -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L -5/80, -5/80E • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L, -5/80, and -5/80E Modes Manual •...
  • Page 336 D-36 Instruction Set Quick Reference Category Code Title no. of characters in buffer • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L, -5/80, and -5/80E string to integer • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L...
  • Page 337 Category Code Title integer to string ASCII • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L, -5/80, and -5/80E read characters • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L, -5/80, and -5/80E read line •...
  • Page 338 D-38 Instruction Set Quick Reference Category Code Title write with append ASCII • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L, -5/80, and -5/80E write • PLC-5/11, -5/20, and -5/20E • PLC-5/30, -5/40, -5/40E, -5/40L -5/60, -5/60L, -5/80, and -5/80E Use the larger number for addresses beyond 2048 words in the controller’s data table.
  • Page 339 Using This Chapter Switch Setting Reference For this Switch Setting Enhanced and Ethernet PLC-5 switch 1 for defining the controller’s DH+ address Enhanced and Ethernet PLC-5 switch 2 for defining the controller’s serial port electrical interface I/O chassis containing a PLC-5 controller...
  • Page 340: Controller Switches

    Switch Setting Reference Controller Switches Side View of PLC-5/11, -5/20, -5/26, -5/20E controllers Switch Assembly SW1 1 2 3 4 5 6 7 Switch Station Number Publication 1785-UM012D-EN-P - July 2005 Switch 1 toggle pushed down toggle pushed up To Select DH+ Baud Rate for...
  • Page 341 Processor 12 3 4 5 6 7 8 9 10 Switch 2 Bottom View of PLC-5/30, -5/40, -5/46 -5/40L, -5/60, -5/60L, -5/80, -5/86, -5/40E, and -5/80E processors Switch Assembly SW2 1 2 3 4 5 6 7 8 9 10...
  • Page 342: I/O Chassis Backplane

    You cannot clear processor memory when this switch is on. Publication 1785-UM012D-EN-P - July 2005 PLC-5 Controller in the I/O Chassis Switch Last State Outputs of this I/O chassis remain in their last state when a hardware failure occurs.
  • Page 343: Extended-Local I/O Adapter

    1771-ASB Remote I/O Adapter or 1771-ALX Extended-Local I/O Adapter Switch Outputs of this I/O chassis remain in their last state when a communication fault is detected by this I/O adapter. Outputs of this I/O chassis are turned off when a communication fault is detected by this I/O adapter.
  • Page 344: I/O Chassis Configuration Plug

    Switch Setting Reference USING POWER SUPPLY MODULE IN THE CHASSIS? Set Y when you install a power supply module in the chassis. Publication 1785-UM012D-EN-P - July 2005 If you set this switch to the ON position, when a ATTENTION communication fault is detected, outputs connected to this chassis remain in their last state to allow machine motion to continue.
  • Page 345: Remote I/O Adapter Module

    Remote I/O Adapter Module S W -1 First I/O Group Number I/O Rack Number (see below) (see next page) Switch (1771-ASB Series C and D) without Complementary I/O S W -2 Communication Rate 57.6 Kbps 115.2 Kbps 230.4 Kbps Not used First I/O Group Number: Switch Setting Reference...
  • Page 346 Switch Setting Reference Rack Publication 1785-UM012D-EN-P - July 2005 (1771-ASB Series C and D) I/O Rack Number - without Complementary I/O...
  • Page 347: Extended-Local I/O Adapter Module

    Extended-Local I/O Adapter Module (1771-ALX) Switch SW1 SW-1 1 2 3 4 5 6 7 8 OPEN First I/O Group Number I/O Rack Number Rack: Switch Setting Reference SW-2 Not Used Publication 1785-UM012D-EN-P - July 2005...
  • Page 348: Alx) Configuration Plug

    E-10 Switch Setting Reference Configuration Plug Do not place a jumper on this set of pins. Publication 1785-UM012D-EN-P - July 2005 (1771-ALX) Configuration Plug 17341 If You are Using But Not 32-point I/O modules and 1771-IX or 1771-IY any address method 1771-IX and 1771-IY 32-point I/O modules modules and any...
  • Page 349: Plc-5 Controller

    Using This Chapter Troubleshooting For Information About Troubleshooting: PLC-5 controller Remote I/O system Extended-local I/O system Unexpected PLC-5 controller operation when entering run mode Appendix Go to Page: F-10 Publication 1785-UM012D-EN-P - July 2005...
  • Page 350: General Problems

    Troubleshooting PLC-5 Controller Indicator Color BATT PROC Green (steady) PROG PROC Green (blinking) FORCE COMM (blinking) Alternating Red and Green (steady) (steady) Publication 1785-UM012D-EN-P - July 2005 General Problems Description Probable Cause Recommended Action Controller is in run mode and...
  • Page 351 Indicator Color Description FORCE Amber SFC and/or I/O forces enabled (steady) Amber SFC and/or I/O forces present (blinking) but not enabled SFC and/or I/O forces not present COMM No transmission on channel 0 Green Transmission on channel 0 (blinking) Troubleshooting Probable Cause Recommended Action Normal operation No action required...
  • Page 352: Controller Communication Channel Troubleshooting

    Troubleshooting Indicator Color A or B Green (steady) Green (blinking rapidly or slowly) (steady) (blinking rapidly or slowly) Publication 1785-UM012D-EN-P - July 2005 Controller Communication Channel Troubleshooting Channel Mode Description Remote I/O Scanner Active Remote I/O link, all adapter modules are present and not faulted Remote I/O Adapter Communicating with scanner...
  • Page 353: Extended-Local I/O Troubleshooting

    Indicator Color Channel Mode green Extended local I/O (steady) Scanner green PLC-5/40L and -5/60L processors only (blinking rapidly or BATT slowly) PROG PROC FORCE COMM (steady) Extended local I/O (blinking Scanner rapidly or slowly) Indicator Color STAT Solid red BATT...
  • Page 354: Ethernet Transmit Led

    Publication 1785-UM012D-EN-P - July 2005 Ethernet Transmit LED The PLC-5 Ethernet interface contains an Ethernet Transmit LED that lights (green) briefly when the Ethernet port is transmitting a packet. It does not indicate whether or not the Ethernet port is receiving a packet.
  • Page 355 Indicators Description Active Adapter Fault Rack Blink alternately Adapter module not actively controlling I/O Adapter module in controller restart lockout mode (adapter to scanner link is normal) If a fault occurs and the Controller is in the run mode but is actually operating in the dependent mode, the chassis fault response mode is selected by the last state switch on the chassis backplane.
  • Page 356: Adapter Module (Continued)

    Troubleshooting Indicators Description Active Adapter Fault Rack I/O chassis fault. No communication on link. Blink Communication on link. Possible shorted backplane Blink Module identification line fault Module not communicating The I/O chassis is in faulted mode as selected by the last state switch on the chassis backplane. Cycling power clears block-transfer request queue.
  • Page 357: Extended-Local I/O System

    Extended-Local I/O System ACTIVE ADAPTER FAULT I/O RACK FAULT Indicators Description Active Adapter Fault Rack Normal indication; remote adapter is fully operational Local adapter fault I/O chassis fault Blinking Off Outputs are reset Blinking alternately Off Adapter module not actively controlling I/O Adapter module in controller restart lockout mode (adapter to...
  • Page 358: Unexpected Operation When Entering Run Mode

    F-10 Troubleshooting Unexpected Operation when Entering Run Mode Publication 1785-UM012D-EN-P - July 2005 If unexpected operation occurs whenever your controller enters run mode, be sure to examine the prescan operation of the instructions in this section. These instructions execute differently during prescan than they do during a normal scan.
  • Page 359: Suggested Action

    This Executes These Actions During Prescan: Instruction: Ladder instructions within the FOR/NXT loop are prescanned. If the SFC startover bit is cleared and the CO bit is cleared, then all non-user configuration bits 15, 14, 13, 12, 10, and 9 are cleared in both the INT and MG file types.
  • Page 360 F-12 Troubleshooting Notes Publication 1785-UM012D-EN-P - July 2005...
  • Page 361: Using This Chapter

    Using This Chapter Channel 0 Pin Assignments RS-232C RS-422A C.GND TXD.OUT TXD.OUT RXD.IN RXD.IN RTS.OUT RTS.OUT CTS.IN DSR.IN DSR.IN SIG.GND SIG.GND DCD.IN DCD.IN NOT USED NOT USED The shading indicates that the pin is reserved. Cable Reference For Information About Channel 0 pin assignments Serial cable pin assignments Connecting diagrams...
  • Page 362 Cable Reference Serial Cable Pin Assignments Cable #1 9-pin D-Shell 25-pin D-Shell Workstation 1770-KF2 (female) (female) RXD 2 GND 5 TXD 3 DCD 1 4 RTS DTR 4 5 CTS DSR 6 RTS 7 6 DSR CTS 8 8 DCD 20 DTR 11955-I Cable #4...
  • Page 363: Connecting Diagrams

    Terminal 9-Pin Serial Port Workstation Note: 1785-KE Series A uses 1785-CP5 cable and 1785-CP7 adapter with the Enhanced and Ethernet PLC-5 Programmable Controllers PLC-5 controller To channel 0 of the PLC-controller Requires either a gender changer or one end of cable #2 fitted with a male 25-pin plug.
  • Page 364 Cable Reference Terminal 25-Pin Serial Port Workstation Note: 1785-KE Series A uses 1785-CP5 cable and 1785-CP7 adapter with the Enhanced and Ethernet PLC-5 controller Terminal PLC-5 controller To channel 0 of the PLC-5 Requires either a gender changer or one end of cable #2 fitted with a male 25-pin plug.
  • Page 365: Programming Cable

    Refer to the following table for the exact location. Workstation 1785-KE Enhanced or Ethernet Workstation PLC-5 controller (using a 1784-KT, -KT2, -KL, or -KL/B) Workstation (using a 1784-KTK1) Workstation (using a 9-pin serial...
  • Page 366 Cable Reference 62-Pin D-Shell Workstation 9-Pin D-Shell Publication 1785-UM012D-EN-P - July 2005 Cable - 1784-CP6 Connects Workstation Using 1784-KT, -KT/2, -KL, or -KL/B to Controller Pin 1 Pin 3 Pin 6 8-Pin Mini-DIN Controller Cable and Adapter - 1784-CP7 Connects to Controller via 9-pin D-Shell of a 1784-CP, -CP5, or -PCM5 cable Pin 3 Pin 6...
  • Page 367 Cable Adapter - 1784-CP8 Connects a Workstation Using a 1784-KT, -KT2, or -KL Card to a Permanent DH+ Networ 3-position terminal connector 62-position sub-miniature connector Cable - 1784-CP10 Connects Workstation to Controller Using Serial Port 25-pin D-Shell PLC-5 Controller Male Cable Reference 3-position terminal connector Blue Shield Clear 1770-CD Twinax Cable...
  • Page 368 Cable Reference 3.2m (10 ft 25-pin D-Shell Workstation Female Controller DH+ 9-pin BLUE DRAIN SHIELD SHIELD SHELL Publication 1785-UM012D-EN-P - July 2005 Cable - 1784-CP11 Controller to Workstation Using a Serial Port 25-pin D-Shell Controller Male Cable - 1784-PCM5 Controller to Workstation (using a 1784-PCMK) 124.25 in LINE 1 CLR LINE 2 CLR...
  • Page 369: Ethernet Cable Connections

    The Ethernet port connects to either a thin-wire or thick-wire network via a 15-pin transceiver or Medium Access Unit (MAU) connection. Transceiver To connect a programming terminal to a PLC-5/20E, -5/40E, or -5/80E controller through an Ethernet network, use the following: AUI port Transceiver Cable...
  • Page 370 G-10 Cable Reference Publication 1785-UM012D-EN-P - July 2005 The controller connects to the transceiver using a standard transceiver cable, which is also known as an Access Unit Interface (AUI) cable. Allen-Bradley has two lengths of transceiver cables and four kits consisting of transceivers and cables.
  • Page 371 Numerics 4-3, E-4, E-5 1/2slot addressing 1770KF2 1771AF 8-1, E-5, F-9 1771ALX 1771AS 6-6, 6-11, E-5, F-6 1771ASB 1771CD 1771DCM 1771KRF 1771SN 1772SD, SD2 1775S4A, S4B 1775SR 1784CAK 9-2, G-6 1784CP G-2, G-5, G-7 1784CP10 G-2, G-5, G-8 1784CP11 1784CP2 1784CP3 9-2, G-5, G-6 1784CP5...
  • Page 372 Index blocktransfer BOOTP disabling example hardware address IP address using broadcast addressing cables Belden 9463 communication interfaces DH+ link Ethernet extendedlocal I/O pin assignments programming raceway layout reference remote I/O routing conductors serial calculating processor scan time remote I/O scan time throughput timing changing modes...
  • Page 373 I/O status file 16-4 main control programs 18-5 10-6 pointtopoint processorresident rack 7-2, 7-3 remote I/O adapter channel remote I/O scanner channel 10-2, 10-6 serial port 14-3 startup procedure 17-3 connections Ethernet 14-3 control bits controller documentation controller specifications 15-3 controlling outputs D-15 conversion instructions...
  • Page 374 Index DH+ link cable lengths communicating with devices configuring channels default address defining the processor address design tip diagnostic counters estimating performance global status flag file internal processing time message destination monitoring status nodes/timing planning cabling response time test results size and number of messages terminating token passing...
  • Page 375 14-2 startup 15-11 testing 15-1 using 15-5 watchdog timer 13-11 when to use faulted 13-12 program state faults 6-15 blocktransfer, minor 15-7, 15-12 clearing 15-2 detecting major 15-3 extendedlocal I/O rack 15-1, 15-12 major 15-11 major and minor 15-12 minor 15-12 monitoring 15-3...
  • Page 376 Index indicators 1771ALX 1771ASB communication Ethernet extendedlocal I/O PLC5/11,5/20 PLC5/20E PLC5/30 PLC5/40, 5/60, and 5/80 PLC5/40E and 5/80E PLC5/40L, 5/60L processor indirect address instructions ASCII bit modify blocktransfer compare compute conversion counter diagnostic file logical memory message move prescan timing program control quick reference relay...
  • Page 377 file, program control, and ASCII D-38 instructions 4-12 gapping 4-22 optimizing 4-15 program files protection B-12 memory card diagnostics memory module transfer D-25 message instruction 10-4 messagebased communication messages 9-13 DH+ link C-12 editing online 11-33 Ethernet error codes 15-12 minor faults mnemonic 4-18...
  • Page 378 Index polling schemes techniques power supplies mounting dimensions powerup routines priority scheduling privilege class assigned to channel assigned to node assigned to offline file privileges assigning class to channels assigning class to offline files assigning to data files assigning to program files defining classes guidelines for assigning types of...
  • Page 379 communication rate configuration overview 6-12 configuration steps 6-11 data transfer C-10, C-11 design 15-3 faults how blocktransfers affect scan time I/O status file introduction maximum devices number of rack entries in scan list optimizing scan time possible devices 7-10 programming blocktransfers 15-4 rack fault 6-3, 6-9...
  • Page 380 Index SFC transitions forcing SFCs shift register instructions site preparation conductor categories raceway layout routing conductors slave communication spacing chassis Specification battery Specifications specifications standard communication startup status adaptermode channel remote I/O supervisory processor status bits monitoring status file processor size status information main control program scan...
  • Page 381 file, program control, and ASCII D-38 instructions global status flags file housekeeping input states instructions 9-15 internal processing 9-13 nodes optimizing for remote I/O F-10 prescan 5-2, 5-3 program scan to extendedlocal I/O using interrupts 9-13 token passing transceivers troubleshooting communications Ethernet F-5, F-9...
  • Page 382 Index Publication 1785-UM012D-EN-P - July 2005...
  • Page 383 Pub. Title/Type Enhanced and Ethernet PLC-5 Programmable Controllers User Manual Cat. No. 1785-L11B...-L86B Pub. No. 1785-UM012D-EN-P Please complete the sections below. Where applicable, rank the feature (1=needs improvement, 2=satisfactory, and 3=outstanding). Overall Usefulness Completeness (all necessary information is provided) Technical Accuracy...
  • Page 384 Other Comments BUSINESS REPLY MAIL FIRST-CLASS MAIL PERMIT NO. 18235 CLEVELAND OH POSTAGE WILL BE PAID BY THE ADDRESSEE PLEASE FASTEN HERE (DO NOT STAPLE) PLEASE FOLD HERE 1 ALLEN-BRADLEY DR MAYFIELD HEIGHTS OH 44124-9705 NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES...
  • Page 388 Rockwell Automation Support Publication 1785-UM012D-EN-P - July 2005 Supersedes Publication 1785-6.5.12 - November 1998 Rockwell Automation provides technical information on the web to assist you in using its products. At http://support.rockwellautomation.com, you can find technical manuals, a knowledge base of FAQs, technical and application notes, sample code and links to software service packs, and a MySupport feature that you can customize to make the best use of these tools.

Table of Contents