SPLat Logo

Finite State Machines - Make light work of complex functions

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

Program your own Finite State Machine using a SPLat Controller for only $29.00.

The EC1 "EasyOne", a 32-bit fully featured SPLat Controller with USB and true multi-tasking is a easy way to learn and a cheap way to build your project.

Translating the state diagram into program code

Thus far you have seen how to design a Finite State Machine as an abstract diagram involving states, events, state transitions and actions. Now I shall show you how this can be translated into program code.

I will be using 2 languages, VB.NET from Microsoft and my company's SPLat language with MultiTrack. These are both nominally BASIC languages, yet the differences are quite profound. The state machine I will use is the one in figure 8. HelpTip

SPLat with MultiTrack™

This is our proprietary language, developed at SPLat Controls especially for embedded realtime machine controllers. It is heavily biased towards FSMs and multitasking.

Visual Basic .NET

I selected this because:

This link may not work forever. It is current at time of writing. If it fails you please contact me via the contact page. You should be able to find the current version by googling for "free vb.net download"

Click for a discussion of various types of realtime operating system.

Finite State diagram