Learn Logix Part 3.2. In this article, we learn about tasks in a Studio 5000 Logix Designer project, the types of tasks available to use, and how to create and modify tasks in Studio 5000 Logix Designer projects.
Learn Logix is a series of articles designed to teach you everything you need to know to work with Rockwell Automation’s Studio 5000 Logix Designer and the Logix 5000 series of PLCs.
In the last part of the series, we learned how to create projects in Studio 5000 Logix Designer. In this part of the series, we’ll learn about the role of tasks in a Studio 5000 Logix Designer project.
In a Studio 5000 Logix Designer project, there are three components that are used to organize code. These components are tasks, programs, and routines.
In this article, we will learn about tasks and the types of tasks that are available to use in a Studio 5000 Logix Designer project.
When you create a Studio 5000 Logix Designer project, you can see that a MainTask is created by default.
A task is a mechanism that schedules the execution of programs. It triggers the execution of the scheduled programs inside of that task.
A Logix Designer Studio 5000 project can have up to 32 tasks but not all controllers support that many tasks. When planning your Studio 5000 Logix Designer project, you should consider how many tasks the controller you will use supports.
All tasks have a watchdog time. If the time taken to execute a task exceeds this watchdog time, then the controller will fault.
There are three types of tasks available in a Studio 5000 Logix Designer project. These are continuous tasks, event tasks, and periodic tasks.
Each type of task is symbolized with a unique icon to make the type of task recognizable at a glance in the controller organizer.
If required, you can change the type of a task in the Task Properties dialog.
Let’s look at the characteristics of each task type in detail.
A project can only have one continuous task, which is added as a default component when a new Studio 5000 Logix Designer project is created.
This task runs continuously and can be interrupted by periodic and event tasks.
Although the continuous task is added to a new Studio 5000 Logix Designer project by default, it is not mandatory. The continuous task can be deleted or modified to another task type as required by your project’s requirements.
Newer Logix 5000 controllers have a processor core that is dedicated to executing the continuous task. This is in contrast to older controllers that have a System Overhead Timeslice setting. The System Overhead Timeslice setting defines the percentage of time that a controller allocates to perform housekeeping and communication functions instead of executing the continuous task.
An event task’s execution is triggered by a specific event. When triggered, an event task may interrupt the execution of a lower priority task, such as the continuous task.
When creating an event task, you configure the task’s trigger from the options in the Trigger dropdown menu and specify the task’s priority.
Task priority is used to control the execution of tasks and a lower number indicates a higher priority. So, for example, if the continuous task has a priority of 10 and an event task with a priority of 5 is triggered, then the controller will stop executing the continuous task and execute the event task. When the event task has finished executing, the controller will resume executing the continuous task where it left off.
You use event tasks to respond to specific events, such as a hardware failure.
A periodic task is a task the executes periodically at a user-specified interval. When a periodic task finishes executing, it will wait for the specified period of time before executing again.
Like the event task, a periodic task will interrupt any lower priority tasks being executed.
You use periodic tasks to execute time-sensitive actions such as running a PID loop every 1,000 ms.
To create a new task in a Studio 5000 Logix Designer project, right-click on the Tasks folder in the Controller Organizer and click New Task.
The New Task dialog opens. In this dialog box, you can give your task a name, specify the task type, and specify the properties of the task.
In this example, we are creating a periodic task called Periodic_Task that executes every 10 ms.
When your task is configured, click OK to create the task.
A new task is called Periodic_Task is created and listed in the Controller Organizer of the project.
To modify an existing task, right-click on the task in the Controller Organizer and click Properties.
In the General tab, you can modify the task’s name and description.
In the Configuration tab, you can modify the task’s type and properties.
In the Program Schedule tab, you can modify the scheduling of the task’s programs. We'll learn more about program scheduling in the next article.
In this article, we learned about tasks and the types of tasks that are available to use in a Studio 5000 Logix Designer Project.
In the next part of the series, we will learn about programs in a Studio 5000 Logix Designer Project. If you haven’t already, be sure to subscribe to the mailing list below to be notified when the next part is available.
Update: You can find the next part of the Learn Logix series, Programs in a Studio 5000 Logix Designer Project, here. In this article, we learn about programs in a Studio 5000 Logix Designer project and how to create them.
A detailed look at how to work with the new CEM programming language available in TIA Portal and the advantages of this new high-level programming language.
C# From Scratch Part 1.1. In this part, we learn how to install .NET on your machine.