A While loop would work, and is probably the most used structure in LabVIEW. But if the subVI just runs through once, then passes back to the main VI, the While loop isn't even needed. You only need a loop if you're going to be running until a certain condition is met, or if you need shift registers to store data.
If you don't need either of these, then don't even bother with a structure. If it's only going to be run once each time it's called, then you have no way of stopping mid execution except to use the Abort method. I guess you could divide your tasks up and check for a Stop command from the main VI before each task runs, then you could skip the remaining tasks using a Case structure around each one. This would require a sepa
rate loop running in you main VI to issue the Stop command because the loop that contains the subVI will be stopped while the its subVI is running and cannot send the command.
As for doing tasks in a certain sequence, that�s what dataflow is all about. Simply connecting a wire from one subVI to another will force then execute one after the other. A subVI or LabVIEW primitive cannot begin to execute until
all of its connected inputs have their data. An easy way to do this is to push your tasks into subVIs, then, if there�s no data dependency between the tasks, you can add Error In and Error Out to all the subVI and connect them in a chain and that will control the execution order.
Look at the attached image. Each chain of subVIs will execute in the same order. The top one because of the error wire connected between the VIs, and bottom one because of the Sequence structure. The advantage of the top method is that you�re not locked in the sequence, plus you have error handlin
g to aid in debugging.
Hope that helps a bit.
Ed