Rockwell Automation Allen-Bradley Logix 5000 Series Programming Manual

Rockwell Automation Allen-Bradley Logix 5000 Series Programming Manual

Tasks, programs, and routines
Hide thumbs Also See for Allen-Bradley Logix 5000 Series:
Table of Contents

Advertisement

Programming Manual
Logix 5000 Controllers Tasks, Programs, and Routines
1756 ControlLogix, 1756 GuardLogix, 1769 CompactLogix, 1769 Compact GuardLogix,
1789 SoftLogix, 5069 CompactLogix, 5069 Compact GuardLogix, Studio 5000 Logix Emulate

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Allen-Bradley Logix 5000 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Rockwell Automation Allen-Bradley Logix 5000 Series

  • Page 1 Programming Manual Logix 5000 Controllers Tasks, Programs, and Routines 1756 ControlLogix, 1756 GuardLogix, 1769 CompactLogix, 1769 Compact GuardLogix, 1789 SoftLogix, 5069 CompactLogix, 5069 Compact GuardLogix, Studio 5000 Logix Emulate...
  • Page 2 If this equipment is used in a manner not specified by the manufacturer, the protection provided by the equipment may be impaired. In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
  • Page 3 The major changes are listed in the following table. Change Topic Updated the list of supported controllers. Cover Updated screen shots. Throughout Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 5: Table Of Contents

    Checklist for an Input Event Task................43 Example – Input Event Task ................... 45 Estimate Throughput ....................46 Example - Estimate Throughput ................47 Additional Considerations ..................48 Motion Group Trigger ...................... 49 Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 6 Define a Timeout Value for an Event Task ..............70 Assign a Timeout Value to an Event Task ............71 Programmatically Configure a Timeout ..............72 Programmatically determine if a timeout occurs ..........72 Index Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 7: Studio 5000 Environment

    Logix 5000™ controllers for discrete, process, batch, motion, safety, and drive-based solutions. The Studio 5000® environment is the foundation for the future of Rockwell Automation® engineering design tools and capabilities. The Studio 5000 environment is the one place for design engineers to develop all elements of their control system.
  • Page 8: Legal Notices

    Rockwell Automation distributor or sales representative. Copyright notice Legal notices Copyright © 2018 Rockwell Automation Technologies, Inc. All Rights Reserved. Printed in USA. This document and any accompanying Rockwell Software products are copyrighted by Rockwell Automation Technologies, Inc. Any reproduction and/or distribution without prior written consent from Rockwell Automation Technologies, Inc.
  • Page 9 VersaView, WINtelligent, XM, SequenceManager are trademarks of Rockwell Automation, Inc. Any Rockwell Automation logo, software or hardware product not mentioned herein is also a trademark, registered or otherwise, of Rockwell Automation, Inc. Other Trademarks CmFAS Assistant, CmDongle, CodeMeter, CodeMeter Control Center, and WIBU are trademarks of WIBU-SYSTEMS AG in the United States and/or other countries.
  • Page 10 Preface Environmental compliance Rockwell Automation maintains current product environmental information on its website at http://www.rockwellautomation.com/rockwellautomation/about- us/sustainability-ethics/product-environmental-compliance.page Contact Rockwell Automation Customer Support Telephone — 1.440.646.3434 Online Support — http://www.rockwellautomation.com/support/ Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 11: Introduction

    • The continuous task runs all the time. When the continuous task completes a full scan, it restarts immediately. • A project does not require a continuous task. If used, there can be only one continuous task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 12 In a production line, if any of the programs detect an unsafe condition the entire line must shut Event task down. The shutdown procedure is the same regardless of the unsafe condition. The number of tasks supported depends on the controller. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 13: Use Caution In The Number Of Tasks That You Use

    If a periodic or event task is triggered while another task is running, the priority of each task indicates what the controller should do. The number of priority levels depends on the controller. This Logix 5000 controller Has this many priority levels CompactLogix ControlLogix Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 14: Additional Considerations

    If you want a task to Then assign one of these priorities Interrupt or delay I/O processing 1…5 Share controller time with I/O processing Let I/O processing interrupt or delay the task 7…15 Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 15: Example

    I/O task—n/a to CompactLogix, 5 ms (fastest RPI) 1 ms 1…5 ms ControlLogix and SoftLogix controllers. See Additional Considerations page System overhead Time slice = 20% 1 ms 1…6 ms Continuous task 20 ms 48 ms Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 16: Leave Enough Time For Unscheduled Communication

    The total execution time of all tasks is significantly less than the specified period of the lowest priority task (50 ms is less than 100 ms). The following guidelines generally leave enough time for unscheduled communication. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 17: Avoid Overlaps

    If an overlap occurs, reduce the frequency at which you trigger the task. If the type of task is Then Periodic Increase the period of the task. Event Adjust the configuration of your system to trigger the task less frequently. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 18: Manually Check For Overlaps

    Chapter 1 Manage Tasks Manually Check for Overlaps Follow these steps to manually see if overlaps are occurring for a task. 1. In the Controller Organizer, right-click MainTask and choose Properties. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 19: Programmatically Check For Overlaps

    The battery/ESM is not present or needs replacement.(1) Determine if an overlap occurred for a Task Status DINT Status information about the task. Once the controller sets one of these specific task bits, you must manually clear the bit. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 20 3. If Condition_1 = 1, then clear the bits of the Status attribute for Task_2: The SSV instruction sets the Status attribute of Task_2 = Zero. Zero is a DINT tag with a value of 0. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 21: Configure Output Processing For A Task

    As an option, you can turn off this output processing for a specific task, which reduces the elapsed time of that task. Select Disable Automatic Output Processing To Reduce Task Overhead to disable the processing of outputs at the end of the task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 22 Chapter 1 Manage Tasks Choose how to configure output processing for a task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 23: Manually Configure Output Processing

    3. Configure output processing for the task. If you want to Then Enable the processing of outputs at the Clear Disable Automatic Output Processing To Reduce Task end of the task Overhead (default). Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 24: Programmatically Configure Output Processing

    1. The ONS instruction limits the true run of the SSV instruction to one scan. 2. The SSV instruction sets the DisableUpdateOutputs attribute of Task_2 = 1. This prevents the task from automatically processing outputs when it finishes its run. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 25: Inhibit A Task

    Program to Run or Test mode. Manually Inhibit or Uninhibit a Follow these steps to manually inhibit or uninhibit the running of a task. Task 1. In the Controller Organizer, right-click MainTask and choose Properties. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 26: Programmatically Inhibit Or Uninhibit A Task

    If Condition_1 = 0 then let Task_2 run. 1. The ONS instruction limits the true run of the SSV instruction to one scan. 2. The SSV instruction sets the InhibitTask attribute of Task_2 = 0. This uninhibits the task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 27: Create A Task

    2. The SSV instruction sets the InhibitTask attribute of Task_2 = 1. This inhibits the task. Follow these steps to create an event task. Create a Task 1. In the Controller Organizer, right-click the Tasks folder and choose New Task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 28 Check the box and type a time period that must elapse before a task can run. Priority Enter the task priority value. Watchdog Type the watchdog time for the task. 3. Click OK. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 29: Create A Periodic Task

    • If the controller detects that a periodic task trigger occurs for a task that is already operating, a minor fault occurs (overlap). • Priorities and run times of other tasks may also cause an overlap. 1. In the Controller Organizer, right-click the MainTask folder and choose Properties. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 30: Language Switching

    When you enable language switching, you can dynamically switch between languages as you use the software. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 31: Adjust The System-Overhead Time Slice

    Advanced tab of the Controller Properties dialog box determines the ratio of running the continuous task and service communication. The following table shows the ratio between the continuous task and service communication at various system overhead time slices. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 32: Configure The System-Overhead Time Slice

    1 ms intervals of consecutive time. Configure the System-overhead Follow these steps to configure the system-overhead time slice. Time Slice 1. On the Online toolbar, click the controller properties icon. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 33 This lets you simulate a communication load on the controller during design and programming before HMIs, controller to controller messaging, and so forth, are set up. Use this setting for testing purposes only. 5. Click OK. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 34: Adjust The System Watchdog Time

    Adjust the Watchdog Timer for Follow these steps to change the watchdog time of a task. a Task 1. In the Controller Organizer, right-click Main Task and choose Properties. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 35 Manage Tasks Chapter 1 2. On the Task Properties dialog box, click the Configuration tab. 3. Type a numeric value for the watchdog timeout for the task. 4. Click OK. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 37: Introduction

    • If the scan time of your normal logic is not fast enough to re-arm the axis for the next registration input, consider placing the MAR instruction within the event task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 38 In a production line, if any of the programs detect an unsafe condition the entire line EVENT instruction must shut down. The shutdown procedure is the same regardless of the unsafe condition. The triggers that you can use for an event task vary depending on your controller type. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 39 SoftLogix 5800 Compact GuardLogix 5370 Compact GuardLogix 5380 CompactLogix 5480 (1) Requires a 1756 I/O module or a virtual backplane. (2) A SoftLogix5800 controller produces and consumes tags only over a ControlNet network. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 40: Module Input Data State Change Trigger

    • The RPI specifies when the module multicasts the current contents of the input data buffer without scanning (updating) the channels. • The module resets the RPI timer each time an RTS transfer occurs. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 41 Over this network Controller receives the data EtherNet/IP Close to the RPI, on average ControlNet At the actual packet interval (≤ RPI) The following examples show COS and RTS configurations. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 42 If you use a digital module to trigger an event task, configure only one point on the module for COS. If you configure multiple points, a task overlap could occur. COS and RTS Configuration Examples If you want this Then configure the input module like this (Point 0 is an example) Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 43: Make Sure Your Module Can Trigger An Event Task

    Trigger an Event Task communication modules must also support event triggering. The following table lists Rockwell Automation modules that have been tested for event task triggering. Some third-party modules may also support event task triggering. Before you use a third-party module, check with the supplier to validate the operation of the module.
  • Page 44 9. IOT instruction Use an IOT instruction for each output module that you reference in the event task. The IOT instruction overrides the RPI for the module and immediately sends the data. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 45: Example - Input Event Task

    On. This lets the photoeye trigger the event task when it turns on and when it turns off. The event task uses the following logic to control the diverter. If Diverter_Photoeye = 1 (part is in the diverter position) and Divert_Part = 1 (divert this part) Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 46: Estimate Throughput

    Add steps 7...9. This is the nominal estimated throughput, where execution of the motion planner or other tasks delay or interrupt µs the event task. The following table lists nominal hardware response times for 1756 I/O modules with event tasks. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 47: Example - Estimate Throughput

    1756 I/O modules most commonly used with Event tasks. What is the backplane communication time? 13 µs If chassis size is Use this value (worst case) Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 48: Additional Considerations

    CPS and UID instructions If one of these instructions are active, the event task cannot interrupt the currently running task. (The task with the CPS or UID.) Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 49: Motion Group Trigger

    • Because the motion planner interrupts all other tasks, it runs first. If you assign the event task as the highest priority task, it runs immediately after the motion planner. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 50 The Base Update Period for the motion group triggers both the motion planner and the event task. See the online help for more information on the Motion Group Properties dialog box. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 51: Checklist For A Motion Group Task

    Let an event trigger this task. Let registration input 1…. …of this axis trigger the task. Interrupt all other tasks. When the task is done, do not update digital outputs in the local chassis. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 52: Checklist For An Axis Registration Task

    For example, normal logic always completes at least two scans between registration inputs. Not fast enough to re-arm the registration Arm the registration input within the input event task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 53: Example - Axis Registration Trigger

    …for the axis named Axis_1. This event task interrupts all other tasks. The following logic arms and re-arms the registration input. Continuous task If Arm_Registration = 1 (system is ready to look for the registration mark) then Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 54 If Task_Status.0 = 1 then clear that bit. The OTU instruction sets Task_Status.0 = 0. The SSV instruction sets the Status attribute of THIS task (Task_1) = Task_Status. This includes the cleared bit. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 55: Axis Watch Trigger

    • Once the axis reaches the watch position and triggers the event task, you have to re-arm the axis for the next watch position. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 56: Checklist For An Axis Watch Task

    At the labeling station of a bottling line, you want to check the position of the label on the bottle. • When the axis reaches the position that is defined as the watch point, check the label and perform any required adjustment. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 57 THIS means the Task object for the task that the instruction is in (that is, Task_1). If Task_Status.0 = 1 then an EVENT instruction triggered the event task. In the continuous task, the EVENT runs to set up the watch position for the first time. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 58 If Task_Status.0 = 1 then clear that bit. The OTU instruction sets Task_Status.0 = 0. The SSV instruction sets the Status attribute of THIS task (Task_1) = Task_Status. This includes the cleared bit. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 59: Consumed Tag Trigger

    A produced/consumed tag relationship can pass an event trigger along with data to a consumer controller. Typically, you use an Immediate Output (IOT) instruction to send the event trigger to the consumer controller. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 60 Within the actual packet interval (API) of the consumed network tag (connection) The following diagrams compare the receipt of data via an IOT instruction over EtherNet/IP and ControlNet networks. EtherNet/IP Network (ControlLogix controller) ControlNet Network Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 61: Maintain The Integrity Of Data

    (in the consuming controller) until the consuming controller has received all the new data. This verifies that the controller operates on a complete packet of new data. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 62: Synchronize Multiple Controllers

    Make Sure You 1. Buffer of data If you want to send a complete image of data at one instance in time, then produce a copy of the data, as shown in the following illustration. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 63: Checklist For The Consumer Controller

    Each additional task reduces the processing time that is available for other tasks. This could cause an overlap. 4. Automatic output For an event task, you can typically disable automatic output processing (default). This reduces processing the elapsed time of the task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 64: Example - Producer Controller And Consumer Controller

    Producer Controller This controller controls station 24 and produces data for the next station (station 25). To signal the transmission of new data, the controller uses the following elements: • Produced_Tag • Ladder logic Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 65: Produced Tag Properties

    The controller at station 25 uses the data produced by station 24. To determine when new data has arrived, the controller uses an event task. Event Task Properties Let an event trigger this task. Let a consumed tag trigger the task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 66: Ladder Diagram In The Event Task

    Ladder Diagram in the Event Task When the event task runs, the CPS instruction sets Destination_Tag_1 = Consumed_Tag_1 (the values from the producing controller). The remaining logic in this controller uses the values from Destination_Tag_1. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 67: Event Instruction Trigger

    The EVENT Instruction Only trigger requires that you use a Trigger Event Task (EVENT) instruction to trigger the task. You can use an EVENT instruction from multiple points in your project. Each time the instruction runs, it triggers the specified event task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 68: Programmatically Determine If Event Instruction Triggered Task

    Each additional task reduces the processing time that is available for other tasks. This could cause an overlap. 4. Automatic output For an event task, you can typically disable automatic output processing (default). processing This reduces the elapsed time of the task. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 69: Example - Event Instruction Trigger

    If Shut_Down_Line = on (conditions require a shut down) then run the Shut_Down task one time. Ladder Diagram in Program_B If Shut_Down_Line = on (conditions require a shut down) then run the Shut_Down task one time. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 70: Define A Timeout Value For An Event Task

    Timeout time stops incrementing. Event task is done. Timeout timer resets and begins incrementing. Timeout timer reaches the timeout value. Event task automatically runs. In the Status attribute of the TASK object, bit 1 turns on. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 71: Assign A Timeout Value To An Event Task

    Properties. 2. On the Task Properties dialog box, click the Configuration tab. 3. From the Type menu, choose Event. 4. Check Execute Task If No Event Occurs Within. 5. Type the timeout value. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 72: Programmatically Configure A Timeout

    Provides status information about the task. Once the controller sets a bit, you must manually clear the bit to determine if another fault of that type occurred. To determine if Examine this bit Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 73: Rockwell Automation Publication 1756-Pm005H-En-P - February

    3. If Condition_1 = 1, then clear the bits of the Status attribute for Task_2. The SSV instruction sets the Status attribute of Task_2 = Zero. Zero is a DINT tag with a value of 0. Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 75 37 synchronize controllers 61 system overhead time slice impact on execution 14 impact on executon 14 output processing 21 throughput for event task 46 I/O module choose for event task 43 Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 76 69 trigger axis registration 51 axis watch 55 choose for event task 37 consumed tag 59 EVENT instruction 65 module input data 40 motion group 49 watch point trigger event task 55 Rockwell Automation Publication 1756-PM005H-EN-P - February 2018...
  • Page 77 Automation representative. New product satisfaction return Rockwell Automation tests all of its products to ensure that they are fully operational when shipped from the manufacturing facility. However, if your product is not functioning and needs to be returned, follow these procedures.

Table of Contents