As we have learned so far in this chapter, organizational units within RSLogix and Studio 5000 provide a much-needed logical structure to our projects. They also allow us to prioritize critical tasks within our project.
In the following exercise, we will create a task that periodically monitors an important alarm condition within our application:
- In the Controller Organizer pane, right-click on the Tasks icon, and then click on New Task...:
In our project, there is no need to check for non-critical alarms by the default periodic task time of every 10 ms. We will create a new periodic task for processing alarms every 250 ms and give it low priority in order to reduce the load on our processor.
- In the New Task form that appears, enter the following values:
- Name: AlarmTask
- Description: Task for calculating alarm conditions
- Type: Periodic
- Period: 250.000 ms
- Priority: 11
- Watch Dog...