No announcement yet.

Labview state machines and auton/telop states

  • Filter
  • Time
  • Show
Clear All
new posts

  • Labview state machines and auton/telop states

    Jacob Rau from team 68 had some questions about basic state machines and how auton/telop states work in this chiefdelphi thread:
    Last edited by jross; 10-08-2008, 02:13 PM.
    Team 330 beta tester

  • #2
    Re: Labview state machines and auton/telop states

    Let me start by linking to the following Labview video tutorial on State Machines...

    Not very sophisticated but it shows the basic concept.

    A state machine can be created by putting a Case Structure inside a While Loop

    Since LabVIEW is inherently multi-tasking, if you drop three loops in a VI, each loop will share time and "appear" to run concurrently.

    So there is no problem having a loop with a state machine inside it that runs all the time (essentially in the background). The Case Structure inside the loop has a "frame" for each state, and each time the machine is executed, it tests the "state" input and runs the approrpiate frame. It's the responsibility of each frame to output the "next state" before it exits. This can be the same as the current state, or a new state. This new-state is shifted back to the input of the Case Structure the next time the loop executes.

    The state machine can run "flat out" and consume it's full share of your system resources, or you can pace it by including a periodic timer function in the loop.