Logix5000 Controllers Tasks, Programs, And Routines

Download Logix5000 Controllers Tasks, Programs, And Routines

Post on 06-Apr-2018

218 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

<ul><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 1/70</p><p>Programming Manual</p><p>Catalog Numbers 1756 ControlLogix,1769 CompactLogix, 1789 SoftLogix,</p><p>1794 FlexLogix, PowerFlex 700S withDriveLogix</p><p>Logix5000 Controllers Tasks,</p><p>Programs, and Routines</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 2/70</p><p>Important User Information</p><p>Solid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for theApplication, Installation and Maintenance of Solid State Controls (publication SGI-1.1 available from your local Rockwell Automation sales</p><p>office or online at http://literature.rockwellautomation.com) describes some important differences between solid state equipment and hardwired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid state equipment, allpersons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable.</p><p>In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or</p><p>application of this equipment.</p><p>The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirementsassociated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the</p><p>examples and diagrams.</p><p>No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described inthis manual.</p><p>Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.</p><p>Throughout this manual, when necessary, we use notes to make you aware of safety considerations.</p><p>Allen-Bradley, Rockwell Automation, and TechConnect are trademarks of Rockwell Automation, Inc.</p><p>Trademarks not belonging to Rockwell Automation are property of their respective companies.</p><p>WARNING</p><p>Identifies information about practices or circumstances that can cause an explosion in a</p><p>hazardous environment, which may lead to personal injury or death, property damage, oreconomic loss.</p><p>IMPORTANT Identifies information that is critical for successful application and understanding of the product.</p><p>ATTENTIONIdentifies information about practices or circumstances that can lead to personal injury or death,</p><p>property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and</p><p>recognize the consequence</p><p>SHOCK HAZARD Labels may be on or inside the equipment, for example, a drive or motor, to alert people that</p><p>dangerous voltage may be present.</p><p>BURN HAZARD Labels may be on or inside the equipment, for example, a drive or motor, to alert people that</p><p>surfaces may reach dangerous temperatures.</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 3/70</p><p>3Publication 1756-PM005B-EN-P - July 2008 3</p><p>Table of Contents</p><p>Preface Purpose of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5How to Use this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5</p><p>Chapter 1</p><p>Managing Tasks Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7</p><p>Select Controller Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Use Caution in the Number of Tasks That You Use. . . . . . . . . . . 10</p><p>Prioritize Periodic and Event Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Additional Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11</p><p>Leave Enough Time for Unscheduled Communication . . . . . . . . . . . 13Avoid Overlaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14</p><p>Manually Check for Overlaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Programmatically Check for Overlaps . . . . . . . . . . . . . . . . . . . . . . 16</p><p>Configuring Output Processing for a Task. . . . . . . . . . . . . . . . . . . . . . 18Manually Configure Output Processing . . . . . . . . . . . . . . . . . . . . . 20Programmatically Configure Output Processing . . . . . . . . . . . . . . 21</p><p>Inhibit a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Manually Inhibit or Uninhibit a Task . . . . . . . . . . . . . . . . . . . . . . . 22Programmatically Inhibit or Uninhibit a Task . . . . . . . . . . . . . . . . 23</p><p>Choose the Trigger for an Event Task . . . . . . . . . . . . . . . . . . . . . . . . . 25Using the Module Input Data State Change Trigger . . . . . . . . . . . . . . 27</p><p>How an I/O Module Triggers an Event Task . . . . . . . . . . . . . . . . 27Make Sure Your Module Can Trigger an Event Task . . . . . . . . . . 30Checklist for an Input Event Task . . . . . . . . . . . . . . . . . . . . . . . . . 31Estimate Throughput. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Estimate Throughput. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Additional Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36</p><p>Using the Motion Group Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Checklist for a Motion Group Task . . . . . . . . . . . . . . . . . . . . . . . . 37</p><p>Using the Axis Registration Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Checklist for an Axis Registration Task . . . . . . . . . . . . . . . . . . . . . 39</p><p>Using the Axis Watch Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Checklist for an Axis Watch Task. . . . . . . . . . . . . . . . . . . . . . . . . . 43</p><p>Using the Consumed Tag Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Maintain the Integrity of Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Synchronize Multiple Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . 49Checklist for the Producer Controller . . . . . . . . . . . . . . . . . . . . . . 50Checklist for the Consumer Controller . . . . . . . . . . . . . . . . . . . . . 51</p><p>Producer Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Produced Tag Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Consumer Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Event Task Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Ladder Diagram in the Event Task. . . . . . . . . . . . . . . . . . . . . . . . . 53</p><p>Using the EVENT Instruction Trigger. . . . . . . . . . . . . . . . . . . . . . . . . 54Programmatically Determine if an EVENT InstructionTriggered a Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 4/70</p><p>4 Publication 1756-PM005B-EN-P - July 2008</p><p>Table of Contents</p><p>Checklist for an EVENT Instruction Task . . . . . . . . . . . . . . . . . . 55Event Task Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Ladder Diagram in Program_A. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Ladder Diagram in Program_B. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56</p><p>Create a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Create an Event Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Create a Periodic Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Language Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59</p><p>Define a Timeout Value for an Event Task . . . . . . . . . . . . . . . . . . . . . 60Assign a Timeout Value to an Event Task . . . . . . . . . . . . . . . . . . . 60Programmatically Configure a Timeout . . . . . . . . . . . . . . . . . . . . . 61Programmatically Determine if a Timeout Occurs . . . . . . . . . . . . 62</p><p>Adjust the System Overhead Time Slice. . . . . . . . . . . . . . . . . . . . . . . . 64Adjust the System Overhead Time Slice. . . . . . . . . . . . . . . . . . . . . 66</p><p>Adjust the Watchdog Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67</p><p>Adjust the Watchdog Timer for a Task . . . . . . . . . . . . . . . . . . . . . 67</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 5/70</p><p>5Publication 1756-PM005B-EN-P - July 2008 5</p><p>Preface</p><p>Purpose of this Manual This manual shows how to configure and use produced and consumed tags.This manual is one of a set of related manuals that show common proceduresfor programming and operating Logix5000 controllers. For a complete list of</p><p>common procedures manuals, see the Logix 5000 Controllers CommonProcedures Programming Manual, publication 1756-PM001.</p><p>The term Logix5000 controller refers to any controller that is based on theLogix5000 operating system, such as:</p><p> CompactLogix controllers</p><p> ControlLogix controllers</p><p> DriveLogix controllers</p><p> FlexLogix controllers</p><p> SoftLogix5800 controllers</p><p>How to Use this Manual Some text is formatted differently from the rest of the text.</p><p>Text that is Identifies For example Means</p><p>Italic the actual name of an item that yousee on your screen or in an example</p><p>Right-click User-Defined Right-click the item that is namedUser-Defined.</p><p>courier information that you must supplybased on your application (avariable)</p><p>Right-clickname_of_program </p><p>You must identify the specific program inyour application. Typically, it is a name orvariable that you have defined.</p><p>enclosed in brackets a keyboard key Press [Enter]. Press the Enter key.</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 6/70</p><p>6 Publication 1756-PM005B-EN-P - July 2008</p><p>Preface</p><p>Notes:</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 7/70</p><p>Publication 1756-PM005B-EN-P - July 20087 7</p><p>Chapter 1</p><p>Managing Tasks</p><p>Introduction The default RSLogix 5000 project provides a single task for all your logic.While this is sufficient for many applications, some situations may requiremore than one task.</p><p>Select Controller Tasks A Logix5000 controller supports multiple tasks to schedule and prioritize theexecution of your programs based on specific criteria. This balances theprocessing time of the controller.</p><p> The controller executes only one task at one time.</p><p> A different task can interrupt a task that is executing and take control.</p><p> In any given task, only one program executes at one time.</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 8/70</p><p>8 Publication 1756-PM005B-EN-P - July 2008</p><p>Managing Tasks Chapter1</p><p>A Logix5000 controller supports three types of tasks:</p><p>If you want to execute asection of your logic</p><p>Then use this typeof task</p><p>Description</p><p>All of the time Continuous Task The continuous task runs in the background. Any CPU time not allocated toother operations (such as motion, communications, and periodic or eventtasks) is used to execute the programs within the continuous task.</p><p> The continuous task runs all the time. When the continuous taskcompletes a full scan, it restarts immediately.</p><p> A project does not require a continuous task. If used, there can be onlyone continuous task.</p><p> At a constant period(e.g., every 100 ms)</p><p> Multiple times within the scanof your other logic</p><p>Periodic Task A periodic task performs a function at a specific period. Whenever the timefor the periodic task expires, the periodic task:</p><p> interrupts any lower priority tasks.</p><p> executes one time.</p><p> returns control to where the previous task left off.</p><p>You can configure the time period from 0.1 ms to 2000 s.</p><p> The default is 10 ms.</p><p> The performance of a periodic task depends on the type of Logix5000controller and on the logic in the task.</p><p>Immediately when an eventoccurs</p><p>Event Task An event task performs a function only when a specific event (trigger) occurs.Whenever the trigger for the event task occurs, the event task:</p><p> interrupts any lower priority tasks.</p><p> executes one time.</p><p> returns control to where the previous task left off.</p><p>The trigger can be a:</p><p> change of a digital input.</p><p> new sample of analog data.</p><p> certain motion operations.</p><p> consumed tag.</p><p> EVENT instruction.</p><p>Important: Some Logix5000 controllers do not support all triggers.</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 9/70</p><p>Publication 1756-PM005B-EN-P - July 2008 9</p><p>Chapter 1 Managing Tasks</p><p>Here are some example situations for the tasks:</p><p>The number of tasks supported depends on the controller:</p><p>For this example situation Use this type of task</p><p>Fill a tank to its maximum level and then open a drain valve Continuous task</p><p>Collect and process system parameters and send them to a display Continuous task</p><p>Complete step 3 in a control sequencereposition the bin diverter Continuous task</p><p>Your system must check the position of a field arm each 0.1 s and calculate the average rate ofchange in its position. This is used to determine braking pressure.</p><p>Periodic task</p><p>Read the thickness of a paper roll every 20 ms. Periodic task</p><p>A packaging line glues boxes closed. When a box arrives at the gluing position, the controller mustimmediately execute the gluing routine.</p><p>Event task</p><p>In a high-speed assembly operation, an optical sensor detects a certain type of reject. When thesensor detects a reject, the machine must immediately divert the reject.</p><p>Event task</p><p>In an engine test stand, you want to capture and archive each analog data immediately after each</p><p>sample of data</p><p>Event task</p><p>Immediately after receiving new production data, load the data into the station Event task</p><p>In a line that packages candy bars, you have to make sure that the perforation occurs in the correctlocation on each bar. Each time the registration sensor detects the registration mark, check theaccuracy of an axis and perform any required adjustment.</p><p>Event task</p><p>A gluing station must adjust the amount of glue it applies to compensate for changes in the speed ofthe axis. After the motion planner executes, check the command speed of the axis and vary theamount of glue, if needed.</p><p>Event task</p><p>In a production line, if any of the programs detect an unsafe condition the entire line must shut down.The shutdown procedure is the same regardless of the unsafe condition.</p><p>Event task</p><p>This controller Supports this numberof tasks</p><p>Notes</p><p>ControlLogix 32 Only one task can be continuous.</p><p>SoftLogix5800</p><p>CompactLogix 8</p><p>DriveLogix</p><p>FlexLogix</p></li><li><p>8/3/2019 Logix5000 Controllers Tasks, Programs, And Routines</p><p> 10/70</p><p>10 Publication 1756-PM005B-EN-P - July 2008</p><p>Managing Tasks Chapter1</p><p>Use Caution in the Number of Tasks That You Use</p><p>Typically, each task takes controller time away from the other tasks. If you havetoo many tasks, then:</p><p> The continuous task may take t...</p></li></ul>

Recommended

View more >