10-26-2019 12:04 PM
I am relatively new at LabView 2018. I am trying to figure out how to run one VI until it stops then proceed to a new VI until it stops and so on. It sounds like a simple process but I am self-teaching myself and I am stuck.
Solved! Go to Solution.
10-26-2019 12:59 PM
State machine?
(Please be more descriptive and maybe attach a simple VI. What do the subVIs do? Are they interactive or running in the background. What makes them stop (all done? user interaction? etc.). What happens when the last one completes? Do the subVIs need to share data or depend on each other?)
10-26-2019 01:19 PM
I have three VI's for now.
I am charging a battery, then trickle charging, then turning it off. During the first two instances, I am reading and writing data from myDAC which I can do successfully. I can run them all individually just fine with no errors and get my desired results. But the problem is trying to run them one after the other without having to do it manually, the charge cycle can take a few hours. For the first case, the VI stops after the desired voltage, the second case the trickle charge stops after the desired time, and the last case the just stops the battery from charging.
10-26-2019 05:12 PM
wouldn't one VI that does everything be enough???
10-26-2019 06:41 PM
Encapsulate your VIs into a single controller program. That will allow you to use dataflow to control operation. Until data (error handler if nothing else) is available from VIa, VIb, if wired to the error handler or other output, will not execute until VIa has completed execution, assuming the error handler is properly wired.
Now, I am speaking from experience from much older versions of LabVIEW, but unless dataflow was somehow removed from LabVIEW, this will work for you.
Try looking at my programming guidelines, they might help:
http://disperser.info/documents/LabVIEWRulesToProgramBy(Incomplete)(Wolf2001).pdf