SPLat Logo

Finite State Machines - Make light work of complex functions

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
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.

VB.NET - Discussion

Because the VB.NET program is driven by events, the code for each state is scattered throughout the program. This means that there is little correspondence between a place in the state diagram and a place in the program code. State 0 is referenced in 5 places, state 1 in 4 places and state 2 in 3 places. That means that to change a behaviour of a state you might have to modify the code in an average of 4 places.

If you are able to actually run the code, you will notice one flaw: The temperature has to be changed before the program will repond to the temperature value. This is a result of the FSM being event triggered. No code actually runs unless there is an event. Consider it an exercise to resolve this.