State-machineLabVIEW file: What is it? It is a state machine for sequential control of the position (of a bicycle). (If you do not know what a state-machine is.) The state-machine is implemented with
The state-machine controls a simulated process (bicycle position) given by the following dynamic model: d(position)/dt = speed where speed is manipulated by the state-machine. This model is implemented in a Simulation Loop which runs in parallel with the While loop. Data (variables) are exhanged between these loops with local variables. The arrow on a Vertical Pointer Slide is replaced with a picture (an emf-file) of a bicycle. The procedure to substitute any graphical part of an indicator or control on the Front panel is as follows: Right-click on the item (graphical part), e.g. the arrow of a Vertical Pointer Slide. Select Advanced / Customize in the menu that is opened. Click the Tool button in the toolbar of the new window that is opened. Right-click on the arrow on the slider, and select the picture you want. Etc. How to use it? Use this VI as a template for your own state-machine controller for any simulated dynamic system. To control a real (physical) process in stead, just substitute the simulated process with read and/or write functions for analog and/or digital I/O (input/output). Updated 12. February 2009 by Finn Haugen (finn@techteach.no) |