04-30-2016 08:19 PM
What you just described is what a state machine does!
You can proceed through steps in a certain order. At the end of a step, you can proceed to another one, or decide through a case structure or Select function, "Hey that Brief True occurred", and go to a different state.
04-30-2016 08:19 PM
@blessedk wrote:
so I am looking for some other means that allows me to execute any section of my block diagram again and again as much as I want irrespective of data flow or the sequence of the codes
Unfortunately, the State Machine is by far the best solution for that. Anything else will be nothing but a cludge and asking for more trouble down the road. I highly recommend you just bite the bullet now and start the rewrite process.
04-30-2016 09:10 PM
04-30-2016 09:25 PM
You do know how to pass values out of your subVI, right? If not, you really should take some of the tutorials.
3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products
04-30-2016 09:27 PM - edited 04-30-2016 09:30 PM
It doesn't matter what it looks like in the subVI's. They just receive data in and send data out, both by way of the connector panel. Your Main VI stays the same. You just wire up the outputs of the subVI's to the appropriate terminals to your current Main VI front panel.
By the way, making subVI"s out of sections of code has nothing to do with state machines. You can have a state machine without subVI's. You can have subVI's, in non-state machine programs.
04-30-2016 09:31 PM
04-30-2016 09:36 PM
04-30-2016 09:36 PM
Correct. A state machine is not a separate VI. It is an architecture for how you structure your main VI.
05-01-2016 08:56 AM
05-01-2016 10:11 AM
Start LabVIEW 2015. Before opening anything, click the big Create Project button on the left. Choose Simple State Machine. Follow the prompts, then view (and study, and make sure you understand) the results. Read all of the documentation and text, examine all of the cases. Try to understand how (or if) this "maps" to your Project. Then start moving your Project into this Framework. [I recommend moving small parts of your Project in, say 2-3 States, testing it, seeing if it works, getting it to work, then adding more details, rather than trying to do "everything all at once". It makes debugging so much simpler when you are debugging something small and compact, not huge and sprawling.]
Bob Schor