This article is part of a guided learning series on building and analyzing User-Defined Function Blocks (UDFBs).
Canonical Article: Building a User-Defined Function Block (UDFB) Using Siemens TIA Portal
Learning Companion (Q&A): Explore All Questions
You are reading: Question 1
What is a state machine?
Type: Explicit
Recommended for: Technicians,
Students
Answer
A state machine is a classic method of program organization where the machine’s behavior is encoded as a series of discrete steps. An example is an industrial machine designed to drill material. The machine’s behavior could be described using a series of action words such as idle, feed, clamp, drill, eject, and fault.
Internally, the program is composed of seven unique steps. A variety of timers and sensors are used to advance the machine to the next state.
Note that the state machine predates the PLC. An example of the old technology is this mechanical cam sequencer shown in the following picture as described in this article. The pictured device could be configured (soldered) to operate with up to 24 states.
Figure 2: Picture of an antique 10-pole 24-position mechanical sequencer from the author’s collection.
Article by Aaron Dahlen, LCDR USCG (Ret.), Application Engineer at DigiKey