SPLat Logo

Finite State Machines - Make light work of complex functions

Flow chart representation of a state

State Diagrams 2, a more elaborate wait loop

In figure 2 I have added testing of a second input, so we now have I/P1 and I/P2. The program will sit looping around the two decision boxes until one or the other input comes on.HelpTip The letters 'A' and 'B' in "point down" triangles are what we call "connectors". Normally they will connect to a similar symbol elsewhere on the page, and serve simply to reduce the number of long connecting lines.

So, this diagram is read as follows: "Sit and wait for either input 1 or input 2. If input 1 comes on first, go to 'A' and provide whatever response is programmed there. If input 2 comes on, go to 'B' and provide whatever response is programmed there."

Next I'll show you how to simplify 2, 3 or more decision diamonds into one simple symbol.

Sign up for our aperiodic newsletter for more tips, comments and generally interesting stuff related to controls.

Low propaganda index (promise!), highly digestible. Newsletter archive.