From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-03-2006 10:01 AM - edited 04-03-2006 10:01 AM
Message Edited by GerdW on 04-03-2006 05:02 PM
04-03-2006 11:43 AM
04-05-2006 06:46 AM
04-05-2006 08:29 AM
Hi lanoob,
Thanks for your feedback, glad you’re getting on well with the code. We’re trying to teach the state machine architecture as early on as possible in LabVIEW Basics courses as it makes customers’ code much easier to debug, maintain and expand in the future.
The architecture is actually shipped as one of the templates with LabVIEW – you can get a ‘blank’ architecture either by clicking on the VI from template link on the splash screen for LabVIEW 8 – or by selecting the New option from the File Menu. This will give you a tree structure of templates available, the state machine is under the From Template-Frameworks-Design Patterns branch of the tree.
The state diagram toolkit CAN be used to setup a state machine architecture, if you wish.
The constant that controls the state transitions is known as an enumerated constant, as you’ll have seen it has each state defined by name (it can be found under the numeric palette). You can edit the states, but to make sure each constant changes when one is edited, you have to define the constant as a type definition. When you try and edit the states from the template (or my example) you need to right click on the constant and select Open Type Def. This will bring up an editor window with the constant on the front panel. If you right-click on the constant and select Edit Items, this will bring up a screen which allows you to change, add and edit the defined ‘states’. When you’ve finished, drop down the File menu, and select Apply Changes to update ALL of the constants on the main architecture. Then you need to save the control using the save options under the file menu (for this is what it is, an edited control) and keep it in the same directory as the vi.
Hope all this helps. Good Luck with the rest of your project.
Mark
04-06-2006 05:51 AM
04-06-2006 06:02 AM
04-06-2006 07:35 AM
04-06-2006 09:34 AM
04-06-2006 10:43 AM
04-06-2006 10:58 AM