Tasks are the most configurable organizational unit and are at the core of a Logix project. They provide a means of optimizing the execution of our project. It is crucial to remember that Logix controllers are only capable of running one task at a time. However, tasks can interrupt the execution of other tasks if they are triggered and have a higher priority value. Tasks that are interrupted will start again from where they left off in the execution of their code.
It is important to keep in mind that other tasks can change the data that your routine's code is executing on. Care should be taken to buffer tags to avoid the code from entering an unpredictable state. Buffering is covered in detail in Chapter 8, Writing Ladder Logic.
The number of tasks you can support varies by controller. Most Logix controllers support up to 32 tasks; however, some CompactLogix controllers only support somewhere between 3 and 16 tasks...