In LabVIEW software, you can create a basic state machine with a
while loop, a shift register, a case statement, and some form of
case selector (case selectors are discussed in a later section).
The while loop is the main program loop, which executes until
the conditions for exiting the program are met. The while loop’s
main responsibility is to call the case selector and then
execute the appropriate case. The shift register keeps track of
which case should execute next. Finally, each case of the case
statement contains the action for one specific use action. Often
the default case is used as the place to check the case selector
(in other words, if the user did nothing, check again to see if
he has done something yet).