LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with running one VI until it stops then running another until it stops ans so forth

Solved!
Go to solution

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.

0 Kudos
Message 1 of 5
(2,306 Views)
Solution
Accepted by papajens

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?)

0 Kudos
Message 2 of 5
(2,281 Views)

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.

0 Kudos
Message 3 of 5
(2,268 Views)

wouldn't one VI that does everything be enough???

0 Kudos
Message 4 of 5
(2,232 Views)

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

0 Kudos
Message 5 of 5
(2,223 Views)