Skip to content

State Machine from Enum

NEVSTOP edited this page Oct 20, 2023 · 1 revision

link: QDKS - State Machine from Enum Author:Eric M.

I am kind of emo to post my first QD here. I figured this one would be of use for quite a bunch of developers.

Goal : Pretty much everyone uses state machines as this is a rather basic but efficient design pattern that can be mixed together with others DPs. Whichever the platform (RT, FPGA, Win), an application will most likely include a state machine (or more!).

First thing : create the enum that will describe the states of the machine. Yeah well, with this QDKS, that's roughly the only thing you will need to do.

How-To :

  • Copy the attached QD VI to the usual directory.
  • Configure its key (S is fine !)
  • Select an enum terminal or constant in your BD. Make sure there is some free space at the right of the enum.
  • Ctrl+Space Ctrl+Key. You've earned a state machine corresponding to the enum items.
Default Shortcut - [S]