1756-PM005-EN-P, Logix5000 Controllers Tasks, Programs .

2y ago
75 Views
2 Downloads
1.15 MB
70 Pages
Last View : 1m ago
Last Download : 2m ago
Upload by : Jerry Bolanos
Transcription

Logix5000 Controllers Tasks,Programs, and RoutinesProgramming ManualCatalog Numbers 1756 ControlLogix,1769 CompactLogix, 1789 SoftLogix,1794 FlexLogix, PowerFlex 700S withDriveLogix

Important User InformationSolid 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 salesoffice 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.In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use orapplication of this equipment.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 theexamples and diagrams.No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described inthis manual.Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.Throughout this manual, when necessary, we use notes to make you aware of safety considerations.WARNINGIMPORTANTATTENTIONIdentifies information about practices or circumstances that can cause an explosion in ahazardous environment, which may lead to personal injury or death, property damage, oreconomic loss.Identifies information that is critical for successful application and understanding of the product.Identifies information about practices or circumstances that can lead to personal injury or death,property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, andrecognize the consequenceSHOCK HAZARDLabels may be on or inside the equipment, for example, a drive or motor, to alert people thatdangerous voltage may be present.BURN HAZARDLabels may be on or inside the equipment, for example, a drive or motor, to alert people thatsurfaces may reach dangerous temperatures.Allen-Bradley, Rockwell Automation, and TechConnect are trademarks of Rockwell Automation, Inc.Trademarks not belonging to Rockwell Automation are property of their respective companies.

Table of ContentsPrefacePurpose of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5How to Use this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Chapter 1Managing Tasks3Publication 1756-PM005B-EN-P - July 2008Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Select Controller Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Use Caution in the Number of Tasks That You Use. . . . . . . . . . . 10Prioritize Periodic and Event Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Additional Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Leave Enough Time for Unscheduled Communication . . . . . . . . . . . 13Avoid Overlaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Manually Check for Overlaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Programmatically Check for Overlaps . . . . . . . . . . . . . . . . . . . . . . 16Configuring Output Processing for a Task . . . . . . . . . . . . . . . . . . . . . . 18Manually Configure Output Processing . . . . . . . . . . . . . . . . . . . . . 20Programmatically Configure Output Processing . . . . . . . . . . . . . . 21Inhibit a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Manually Inhibit or Uninhibit a Task . . . . . . . . . . . . . . . . . . . . . . . 22Programmatically Inhibit or Uninhibit a Task . . . . . . . . . . . . . . . . 23Choose the Trigger for an Event Task . . . . . . . . . . . . . . . . . . . . . . . . . 25Using the Module Input Data State Change Trigger . . . . . . . . . . . . . . 27How 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Using the Motion Group Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Checklist for a Motion Group Task . . . . . . . . . . . . . . . . . . . . . . . . 37Using the Axis Registration Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Checklist for an Axis Registration Task . . . . . . . . . . . . . . . . . . . . . 39Using the Axis Watch Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Checklist for an Axis Watch Task. . . . . . . . . . . . . . . . . . . . . . . . . . 43Using the Consumed Tag Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Maintain the Integrity of Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Synchronize Multiple Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . 49Checklist for the Producer Controller . . . . . . . . . . . . . . . . . . . . . . 50Checklist for the Consumer Controller . . . . . . . . . . . . . . . . . . . . . 51Producer Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Produced Tag Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Consumer Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Event Task Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Ladder Diagram in the Event Task. . . . . . . . . . . . . . . . . . . . . . . . . 53Using the EVENT Instruction Trigger. . . . . . . . . . . . . . . . . . . . . . . . . 54Programmatically Determine if an EVENT InstructionTriggered a Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

Table of ContentsChecklist for an EVENT Instruction Task . . . . . . . . . . . . . . . . . . 55Event Task Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Ladder Diagram in Program A. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Ladder Diagram in Program B. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Create a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Create an Event Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Create a Periodic Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Language Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Define 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 . . . . . . . . . . . . 62Adjust the System Overhead Time Slice . . . . . . . . . . . . . . . . . . . . . . . . 64Adjust the System Overhead Time Slice. . . . . . . . . . . . . . . . . . . . . 66Adjust the Watchdog Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Adjust the Watchdog Timer for a Task . . . . . . . . . . . . . . . . . . . . . 674Publication 1756-PM005B-EN-P - July 2008

PrefacePurpose of this ManualThis 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 ofcommon procedures manuals, see the Logix 5000 Controllers CommonProcedures Programming Manual, publication 1756-PM001.The term Logix5000 controller refers to any controller that is based on theLogix5000 operating system, such as: CompactLogix controllers ControlLogix controllers DriveLogix controllers FlexLogix controllers SoftLogix5800 controllersHow to Use this ManualSome text is formatted differently from the rest of the text.Text that isIdentifiesItalicthe actual name of an item that you Right-click User-Defined see on your screen or in an exampleRight-click the item that is namedUser-Defined.courierinformation that you must supplybased on your application (avariable)Right-clickname of program You must identify the specific program inyour application. Typically, it is a name orvariable that you have defined.Press [Enter].Press the Enter key.enclosed in brackets a keyboard key5Publication 1756-PM005B-EN-P - July 2008For exampleMeans5

PrefaceNotes:6Publication 1756-PM005B-EN-P - July 2008

Chapter1Managing TasksIntroductionThe 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.Select Controller TasksA Logix5000 controller supports multiple tasks to schedule and prioritize theexecution of your programs based on specific criteria. This balances theprocessing time of the controller. The controller executes only one task at one time. A different task can interrupt a task that is executing and take control. In any given task, only one program executes at one time.Publication 1756-PM005B-EN-P - July 200877

Managing TasksChapter 1A Logix5000 controller supports three types of tasks:If you want to execute asection of your logicThen use this typeof taskDescriptionAll of the timeContinuous TaskThe 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. The continuous task runs all the time. When the continuous taskcompletes a full scan, it restarts immediately. A project does not require a continuous task. If used, there can be onlyone continuous task. At a constant period(e.g., every 100 ms)Periodic Task Multiple times within the scanof your other logicA periodic task performs a function at a specific period. Whenever the timefor the periodic task expires, the periodic task: interrupts any lower priority tasks. executes one time. returns control to where the previous task left off.You can configure the time period from 0.1 ms to 2000 s. The default is 10 ms. The performance of a periodic task depends on the type of Logix5000controller and on the logic in the task.Immediately when an eventoccursEvent TaskAn event task performs a function only when a specific event (trigger) occurs.Whenever the trigger for the event task occurs, the event task: interrupts any lower priority tasks. executes one time. returns control to where the previous task left off.The trigger can be a: change of a digital input. new sample of analog data. certain motion operations. consumed tag. EVENT instruction.Important: Some Logix5000 controllers do not support all triggers.8Publication 1756-PM005B-EN-P - July 2008

Chapter 1Managing TasksHere are some example situations for the tasks:For this example situationUse this type of taskFill a tank to its maximum level and then open a drain valveContinuous taskCollect and process system parameters and send them to a displayContinuous taskComplete step 3 in a control sequence—reposition the bin diverterContinuous taskYour 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.Periodic taskRead the thickness of a paper roll every 20 ms.Periodic taskA packaging line glues boxes closed. When a box arrives at the gluing position, the controller mustimmediately execute the gluing routine.Event taskIn 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.Event taskIn an engine test stand, you want to capture and archive each analog data immediately after eachsample of dataEvent taskImmediately after receiving new production data, load the data into the stationEvent taskIn 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.Event taskA 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.Event taskIn a production line, if any of the programs detect an unsafe condition the entire line must shut down. Event taskThe shutdown procedure is the same regardless of the unsafe condition.The number of tasks supported depends on the controller:This controllerSupports this numberof tasksNotesControlLogix32Only one task can be xLogixPublication 1756-PM005B-EN-P - July 20089

Managing TasksChapter 1Use Caution in the Number of Tasks That You UseTypically, each task takes controller time away from the other tasks. If you havetoo many tasks, then: The continuous task may take too long to complete. Other tasks may experience overlaps. If a task is interrupted toofrequently or too long, it may not complete its execution before it istriggered again.Prioritize Periodic andEvent TasksAlthough a project can contain multiple tasks, the controller executes only onetask at a time. If a periodic or event task is triggered while another task iscurrently executing, the priority of each task tells the controller what to do.The number of priority levels depends on the controller:This Logix5000 controllerHas this many priority Logix15SoftLogix58003To assign a priority to a task, use these guidelines.If you wantThenThis task to interrupt another taskAssign a priority number that is less than(higher priority) the priority number of theother task.Another task to interrupt this taskAssign a priority number that is greater than(lower priority) the priority number of theother task.This task to share controller time withanother taskAssign the same priority number to bothtasks.10Notes A higher priority task interrupts all lowerpriority tasks. A higher priority task can interrupt alower priority task multiple times.The controller switches back and forthbetween each task and executes each onefor 1 ms.Publication 1756-PM005B-EN-P - July 2008

Chapter 1Managing TasksAdditional ConsiderationsAs you estimate the execution interrupts for a task, consider:ConsiderationDescriptionMotion plannerThe motion planner interrupts all other tasks, regardless of their priority. The number of axes and coarse update period for the motion group effect how long andhow often the motion planner executes. If the motion planner is executing when a task is triggered, the task waits until themotion planner is done. If the coarse update period occurs while a task is executing, the task pauses to let themotion planner execute.I/O taskCompactLogix, FlexLogix, and DriveLogix controllers use a dedicated periodic task toprocess I/O data. This I/O task: Does not show up in the Tasks folder of the controller. Does not count toward the task limits for the controller. Operates at priority 7. Executes at the fastest RPI you have scheduled for the system. Executes for as long as it takes to scan the configured I/O modules.As you assign priorities to your tasks, consider the I/O task:If you want a task toThen assign one of these prioritiesinterrupt or delay I/O processing1 to 6share controller time with I/O processing7let I/O processing interrupt or delay the task 8 to 15System overheadSystem overhead is the time that the controller spends on unscheduled communication. Unscheduled communication is any communication that you do not configure throughthe I/O configuration folder of the project, such as Message (MSG) instructions andcommunication with HMIs or workstations. System overhead interrupts only the continuous task. The system overhead time slice specifies the percentage of time (excluding the time forperiodic or event tasks) that the controller devotes to unscheduled communication. The controller performs unscheduled communication for up to 1 ms at a time and thenresumes the continuous task.Continuous taskPublication 1756-PM005B-EN-P - July 2008You do not assign a priority to the continuous task. It always runs at the lowest priority. Allother tasks interrupt the continuous task.11

Managing TasksEXAMPLEChapter 1This example depicts the execution of a project with three user tasks.TaskPriorityPeriodExecution timeDurationMotion plannerN/A8 ms (course update rate)1 ms1 msEvent task 11N/A1 ms1 to 2 msPeriodic task 1212 ms2 ms2 to 4 msI/O task—n/a to ControlLogix andSoftLogix controllers. See page 11.75 ms (fastest RPI)1 ms1 to 5 msSystem overheadn/atime slice 20%1 ms1 to 6 msContinuous taskn/aN/A20 ms48 msLegend:Task executes.Task is interrupted (suspended).motionplannereventtask 1periodictask 1I/O 0455506Description1Initially, the controller executes the motion planner and the I/O task (if one exists).2After executing the continuous task for 4 ms, the controller triggers the system overhead.3The period for periodic task 1 expires (12 ms), so the task interrupts the continuous task.4After executing the continuous task again for 4 ms, the controller triggers the system overhead.5The triggers occurs for event task 1.Event task 1 waits until the motion planner is done.Lower priority tasks experience longer delays.6The continuous task automatically restarts.RSLogix 5000 software includes a task monitor tool on the distribution CD.You can use this tool to analyze how tasks are executing.12Publication 1756-PM005B-EN-P - July 2008

Chapter 1Managing TasksLeave Enough Time forUnscheduledCommunicationUnscheduled communication occurs only when a periodic or event task is notrunning. If you use multiple tasks, make sure that their scan times andexecution intervals leave enough time for unscheduled communication.1. The execution time of a highest priority task is significantly less than itsupdate rate.2. The total execution time of all your tasks is significantly less than theupdate rate of the lowest priority tasks.For example, in this configuration of tasks:TaskPriorityExecution timeRate1higher20 ms80 ms2lower30 ms100 mstotal execution time: 50 ms The execution time of the highest priority task (Task 1) is significantlyless than its update rate (20 ms is less than 80 ms). The total execution time of all tasks is significantly less than the updaterate of the lowest priority task (50 ms is less than 100 ms).This generally leaves enough time for unscheduled communication. Adjust the update rates of the tasks as needed to get the best trade-offbetween executing your logic and servicing unscheduledcommunication. If your project has a continuous task, unscheduled communicationoccurs as a percentage of controller time (

Procedures Programming Manual, publication 1756-PM001. The term Logix5000 controller refers to any controller that is based on the Logix5000 operating system, such as: CompactLogix controllers ControlLogix controllers DriveLogix controllers FlexLogix controllers SoftLogix5800 controllers

Related Documents:

tc_ida161 1756-ia16 132 tc_idd321 1756-ib32/b 132 tc_idj161 1756-ib16i 132 tc_idk161 1756-ia16i 132 tc_idw161 1756-im16i 132 tc_idx081 1756-ia8d 144 tc_idx161 1756-ib16d 144 tc_ixl061 1756-it6i 152 tc_ixl062 1756-it6i2 152 tc_ixr061 1756-ir6i 152 tc_oah061 1756-of6ci 180 tc_oav061 1756-of6vi 180 tc_oav081 1756-of8 196 tc_oda161 1756-ob16i 136

Catalog Numbers 1756-L61, 1756-L62, 1756-L63, 1756-L63XT, 1756-L64, 1756-L65, 1756-L71, 1756-L72, 1756-L73, 1756-L73XT, 1756-L74, 1756-L75 User Manual. Important User Information Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety

1756-L71, 1756-L72, 1756-L73, 1756-L73XT, 1756-L74, 1756-L75 1756-L71K, 1756-L72K, 1756-L73K, 1756-L74K, 1756-L75K . For more information on how to use and calculate connections, see the ControlLogix System User Manual, publication 1756-UM001. 500 Network connections, per network module

1756-L71, 1756-L72, 1756-L73, 1756-L73XT, 1756-L74, 1756-L75 1756-L71K, 1756-L72K, 1756-L73K, 1756-L74K, 1756-L75K . For more information on how to use and calculate connections, see the ControlLogix System User Manual, publication 1756-UM001. 500 Network connections, per network module

1756 ControlLogix and GuardLogix Controllers Technical Specifications - ControlLogix 5570 Controllers Attribute 1756-L71, 1756-L71K 1756-L72, 1756-L72K 1756-L73, 1756-L73K 1756-L74, 1756-L74K 1756-L75, 1756-L75K User memory 2 MB 4 MB 8 MB 16 MB 32 MB I/O memory 0.98 MB Optional nonvolatile memory storage 1 GB (1784-SD1 ships with every controller)

1756 ControlLogix I/O Modules Specifications . connect all field-side wiring. RTBs and IFMs are not included with the I/O modules. They must be ordered separately. . AC digital 1756-IA8D 1756-IA16 1756-IA16I 1756-IA32 1756-IM16I 1756-IN16 6 9 12 15 70 73 1756-OA8 1756-OA8D 1756-OA8E 1756-OA16 1756-OA

1756-IA16 1756-IA16I 1756-IA32 1756-IM16I 1756-IN16 4 7 10 13 86 89 1756-LSC8XIB8I 1756-OA8D 1756-OA8E 1756-OA16 1756-OA16I 1756-ON8 230 128 . Use this conductor category information for planning conductor routing as described in the system-level installation manual. See the Industrial Automation Wiring and Grounding Guidelines, publication .

1756-IA16 1756-IA16I 1756-IA32 1756-IM16I 1756-IN16 3 6 9 12 85 88 1756-LSC8XIB8I 1756-OA8D 1756-OA8E 1756-OA16 1756-OA16I 1756-ON8 234 120 . Use this conductor category information for planning conductor routing as described in the system-level installation manual. See the Industrial Automation Wiring and Grounding Guidelines, publication .