Previous Topic

Next Topic

Book Contents

Book Index

Tutorial: Multitasking (Superseded)

Special note: This tutorial and the multitasking mechanism it covers have largely been superseded by the newer MultiTrack mechanism. MultiTrack achieves everything and more, with considerably less programming effort. The only time you would use this older multitasking mechanism would be if the controller you are using is unable to handle as many tasks as you need using MultiTrack.

One of the aspects of control programming that causes the most grief and confusion is how to create a multitasking system. Multitasking is the ability of a program to seemingly do two or more things at once. For example, an industrial parts washer may need to fill up with water at the same time as it is controlling a heater, dispensing detergent and monitoring operator push buttons.

What you will gain from this tutorial (learning outcomes)

This tutorial will introduce you to simple techniques for creating multitasking programs using SPLat. It will introduce the concepts one at a time, working through and building up an example application. The example is a bit contrived, simply because it attempts to illustrate the ideas with as few lines of code as possible. Think of it, if you like, as a skeleton on which you can build you own application.

What you need to know first (Prerequisites)

You will gain the most benefit from this tutorial if you first do the online FastTrack training course. That course introduces you to the fundamental concepts of Finite State Machines, masquerading as "SPLatMaps". It also introduces you to SPLatty, our (somewhat) anthropomorphized alter-ego for the SPLat processor. You will also need to have a basic understanding of:

In summary, this tutorial is an advanced topic that assumes you have mastered the nuts and bolts of SPLat programming.

Note: Don't let the informal language in this tutorial fool you. The "information density" is very high. The concepts are introduced rapidly. Make sure you have completely taken on board and understood each idea, each example and each page before you move on. I do not repeat myself! If you do maintain focus you will be rewarded by learning a heap of advanced material very quickly.

Previous Topic

Next Topic

In This Chapter

Multitasking: Basic ideas

Multitasking: The main loop

Multitasking: A simple yielding subroutine

Multitasking: Now, where was I?

Multitasking: A first complete program

Multitasking: Properties and Data Hiding

Multitasking: A closer look at Suspend and Resume

Multitasking: Additional notes on initialization.

Multitasking: Branch and Target

Multitasking: Advanced topics