LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State machine with login

I've recently attended a Labview Basics II training course. One of the main topics that we were learning was how to make a State Machine with login. And indeed this is what I'm now trying to encorporate into my metsman Programme. I've attached the necessary Vis which are in zip format. Basically the menu screen (as you will see) consists of firstlya Login and Modes 1-4 and a stop button. I've managed to get it so that when I press Button Mode 2 the appropriate VIs front panel pops us and that when I press stops it goes back to main menu. However, my confusion is with the connector panel, basically i've (at the moment) only got it so that there is only one output from the Metsmanmode2test.VI and this output is wired into the case struct
ure with a shift register. However, if i was to run data through the programme would I see any data appear on my graphs/indicatros. Do I need to accustomise the connector pane to accommodate for all my inputs in the MetsmanMode2test.VI?
So to summarise what terminals from the SubVi need to be connected to the case structure/shift registers and do I need any constants to be wired to the shift register as a result?
Many Thanks
Alexandra Couzens
0 Kudos
Message 1 of 3
(2,939 Views)
If you want to use that data that you outputted in another vi yes you will have to create a connector on the left of a subvi and pass the data in. I would assume that you will have another mode that will view the data just like the example in the class correct? If that is the case all you will have to do is input the data to a subvi and display it. This will allow the viewing at any time during the execution of the program. If you need to pass out any other parameters from your metsmanmode2test.vi you will have to create more shift registers or combine everything into a cluster. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 3
(2,939 Views)
Here are a few suggestions on how you might set your application ups as a state machine. I concentrated on the Metsmanmode2TestVi. But you may modify the Menu vi to use a queued state machine. Most of your sub vi's were missing so my example only is to provide some guidelines that may be useful.

As far as inputs and outputs terminals
any data that you want to pass into the vi
or receive out of the vi may require a terminal


If data passes through a loop it is usually good to
use shift registers.
If the data from the previous call is not needed
initialize the register as you see fit.

Leave extra terminals on your connector pane
to allow for growth.

Hope this is helpful
Randall
0 Kudos
Message 3 of 3
(2,939 Views)