Table Of Contents

Diagram Components of a State Machine

Last Modified: February 27, 2020

A state machine has four components on the diagram: a While Loop, a Case Structure, an Enum constant, and a shift register.

  1. While Loop—Sets the outer boundary for the state machine code and facilitates state transitions.
  2. Case Structure—Contains a subdiagram for each state in the state machine.
  3. Shift register—Passes data from a completed state to the upcoming state.
  4. Enum constant—Contains a list of every state in the state machine. The state machine uses this constant to update the current state transition value as the program executes.

Convert the Enum constant to a G Type and configure its list of values before using it in your state machine. This ensures that every Enum constant in your state machine has a consistent list of values that is easy to update.

Recently Viewed Topics