Skip navigation

Community

Currently Being Moderated

Coke Machine State Machine

VERSION 1 
Created on: Sep 9, 2008 6:06 PM by Justin_P - Last Modified:  Sep 9, 2008 6:17 PM by Justin_P

 

The State Machine is one of the fundamental architectures LabVIEW developers frequently use to build applications quickly. State Machine architecture can be used to implement complex decision-making algorithms represented by state diagrams or flow charts.

 

State Machines are used in applications where distinguishable states exist. Each state can lead to one or multiple states, and can also end the process flow. A State Machine relies on user input or in-state calculation to determine which state to go to next. Many applications require an "initialize" state, followed by a default state where many different actions can be performed. The actions performed can depend on previous and current inputs as well as states. A "shutdown" state can then be used to perform clean up actions.

 

This vi uses State Machine architecture to perform the functions of a Coke machine.

 

You can also see a vi that performs the same function that uses produce consumer architecture at http://decibel.ni.com/content/docs/DOC-2145

 

Attachments:
Comments (0)