1、CLXtipsTaskTask Model in ControlLogixIntroduction:Optimizing the Program Scan time can have significant effects on overall performance of the system in terms of Data Acquisition and Control. Fast I/O cards and high bandwidth deterministic networks can ring data from the field to the processor, but i
2、f the programs are not optimized, the outputs cannot be updated. ControlLogix has built in granularity in terms of program management. This lab uses a live application to drive home some of the specifics of the multi-task model of ControlLogix.Objectives1. Monitor and Understand Scan Time and the ov
3、erhead time slice parameter.2. Creating periodic task and understanding the effects of scan rate and priority and their inter-dependence.3. Creating an additional program in one of the task and understanding the effects on scan time.Tools you need for this Lab Two ControlLogix demo units connected o
4、n control net. RSLogix5000 RSLinks2.2Facts on Scan Time:Program Scan Time: Scan time of individual program within a task. This time represents the time it takes to scan the program, not including interruptions.Maximum Task Scan Time: Maximum Scan time a particular task used since the time it was sch
5、eduled.Task Model in ControlLogix Objective 1 - Understanding Scan Time and overhead time slice Your ActionsStart the Project called PVCComponding_Lab.1. Expand the main task in the organizer and notice the number of subroutines in the program. As a side note, notice some of then nuances of this act
6、ual application:a. A fairly large number of user-defined structures being used in this application.b. The various Input Output modules. Anyway, going back to the task at hand, select the main task and right click with your mouse. Go down to the properties and then click on the configuration tab.2. N
7、otice the scan Times in microseconds. The Max represents the maximum time the controller took to process the entire program till now. The last indicates the time taken by the last scan took to execute the programTask Model in ControlLogix Objective 1 - Understanding Scan Time and overhead time slice
8、3. Note down this values in the Task Model Work Sheet 1 at Sl. No.14. Reset the Max Scan and notice the updated maximum scan. Note down these values on the Task Model Work Sheet 1 at Sl. No.2Task Model Work Sheet 1SL NoActivityRecorded Time1Main Task Maximum Time in micro Seconds2Main Task Maximum T
9、ime in microseconds after re setting.5. Right click to select properties under the controller called PVC_Compounding. Now click on the Advanced tab in the folder. Notice the System Overhead time slice. Change the system Over Head time slice from 10 to 90% (after changing press apply) and monitor the
10、 effect this has on the main task scan time (after recording the effect reset the maximum time). Record your observations in the Work Sheet 2 below:Task Model in ControlLogix Objective 1 - Understanding Scan Time and overhead time sliceWork Sheet 2SL No.System Over Head Time Slice.Main Task Maximum
11、Time Micro Sec.1102203304405506607708809906. Get into a discussion within the class with the help of your instructor to validate your findings. The authors comments on this can be found at the end of this lab.FACTS:The Logix5000 allows you to allocate a percentage of the CPU time to perform the back
12、ground CPU functions (like program terminal support, Communications with HMI, Re-establish and monitor IO connections and status, ControlLogix messaging etc). By default, this time is set to 10 %. Which means that for every 10 millisecond of continuous task execution, a millisecond is assigned to th
13、e CPU overhead function.Task Model in ControlLogix Objective 1 - Understanding Scan Time and overhead time sliceAnalysisThe data recorded in work sheet 2 can be plotted as above. As we increase the over head time slice parameter the main task time goes on increasing. So the reasonable value for the
14、Over Head time slice parameter is in the range of 10 % to 35 %. There are applications where not only the controller has to handle lot of communication task but also need to execute some sections of the plant at a deterministic rate. For example we want to have an over head time slice of 45% so that
15、 the HMI data gets reported at a faster rate. This would mean we cant execute the entire program (refer the plot) faster then 4000 microseconds. But if we still need a section of the program to execute at a deterministic rate we need to put that part of the program in a periodic task.Task Model in C
16、ontrolLogix Objective 2 - Effects of scan rate and priority Your Actions7. Let us investigate what this program achieves. Note that the routine “Master” controls the nesting to the other routines that you see below.8. Double Click and open the “Master” routine. You will notice that this routine exec
17、utes the entire program in three sections: Sequencing, Mixing and Auxiliary operations.Task Model in ControlLogix Objective 2 - Effects of scan rate and priority You can right click on each of the sub routines to check the cross-reference. Task Model in ControlLogix Objective 2 - Effects of scan rat
18、e and priority We will assume that it is very important to execute the sections Mixing and Sequencing faster then 4000 microseconds.9. To achieve determinism we divide this program into two periodic tasks in the next section. Periodic Tasks Task Model in ControlLogix Objective 2 - Effects of scan ra
19、te and priority To save on time load the Application Program named PVC Compounding_Multi Program and move to point 19 10. To create Click on task and right click, Navigate to New Task. Provide a task name (Mixing Operation) and say OK. Task Model in ControlLogix Objective 2 - Effects of scan rate an
20、d priority 11. Similarly create another task called sequencing.12. Now go to the just created task called Mixing_Operation and right click and navigate to New Program. Provide a name to the program Mixer_Section1_B. Now go back to the created task called mixing operation and create another program c
21、all it Mixer_Section2_B.13. Create a program called IO_Section_1 under the periodic task Mixing_Operation.14. Now remove the assigned routine from the main program by right clicking on the main program and selecting Task Model in ControlLogix Objective 2 - Effects of scan rate and priority 15. Now d
22、rag one sub routine at a time and put them into respective programs in the periodic tasks. Once you complete this, your organizer should look like this. 16. Delete the sub routine called Master.Task Model in ControlLogix Objective 2 - Effects of scan rate and priority 17. Go to the main program and
23、right click and go to properties. Now click on the configuration tab. Asian the main routine as the Mixer1.18. Similarly on the assign the first routines to the main in all the programs. Mixing_Section1_B with Mix1_B4_Seq I_O_Section1 with A1_Seq19. Down Load the program and Go On Line.FACT:The Logi
24、x5550 provide the ability to create up to 32 tasksone Continuos and 31 PeriodicA periodic task can be configured to execute as low as 1mSec. Even though the task is triggered at 1 ms the operating system causes some delay before giving the control over.At the end of each program the operating system
25、 performs an update of IO which takes some extra processing time.Task Model in ControlLogix Objective 2 - Effects of scan rate and priority 20. Pull out the form called Task Model Work sheet 3 filed at the end of this lab.21. Now right click on the main task and navigate to properties and select the
26、 configuration Tab. Similarly open the configuration tabs of the other two periodic tasks. Arrange them on the screen. Your screen will look like this. 22. Set the priority of the mixing operation task as 1. And then change the rate to 1.5 ms.23. Monitor the effect on the other two tasks. Record you
27、r observations on Task Model Work sheet 3 (on the next page). For the various options printed in the form record your observations24. Co-relate your observations to your understanding of the task model.25. Engage a general discussion with your partners and the class with the help of your instructor
28、on the recorded results. TASK MODEL WORKSHEET 3 Main Task Sequencing Mixing OperationsLast ScanPriorityPeriodic RateMax RateLast SanPriorityPeriodic RateMax RateLast Scan11.521223.71523.71723.71523.71223.711.521.511.521.511.521.511.52521.521.5232325252521.52321.522522322Task Model in ControlLogix Ob
29、jective 2 - Effects of scan rate and priorityAnalysisUsing periodic task we can run a section of the plant or a portion of the program at a pre configured deterministic rate.This adds determinism and modularity in the program.Task Model in ControlLogix Objective 3 - Effect of additional Program on S
30、can TimeYour ActionsTo save time please load the program PVCcompoundingLab1 application program1. Now go to the created task called Mixing Operation and right click and navigate to New Program. Provide a name to the program Mixer_Section2_B. Assign the first routines to the main in all the program. Mixing_Section2_B with Mix2_B4_Seq 2. The organizer should appear as shown above.Task Model in ControlLogix Objective 3 - Effect of additional Progra
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1