Here are some suggestions:
- Use the Error Line! It is your Friend, and helps to serialize things that need to be serialized (more on this later).
- You "count" your loops using a Shift Register. But the loops have their own built-in counter ("i") -- use it and simplify your loops.
- Not (yet) thinking about stopping loops, you have two (not one) parallel processes running -- one with two sequential loops (that each count to 5) and another loop that just counts.
- Ordinarily, a "Count to 5" loop would be coded as a For loop, rather than a While loop (again, simpler logic). You can stop a For loop mid-count by adding a Conditional Stop terminal to it (right-click loop edge and look for Conditional Stop in the Drop-down list) -- this might be slightly better as For loops are mnemonic for "Count from 1 to N".
- Once you have these two parallel loops (one containing two serial loops) coded, you should be able to run it and see A count 1..5, then B count 1..5, then repeating, while C counts 1.. (forever). So there's only the "How To Stop" question.
- You only need one notifier, as you want all the above 4 (did you think there were only 3?) loops to stop. If you code Loop 1 with For Loops + Conditional Stop, you wire the Notifier output to the Conditional Stop. Pass the Notifier Reference and the Error Line through the For Loop (use either Shift Registers or a "Last Value" output tunnel) and bring Reference and Error Line through the surrounding While Loop. Also, bring the output of the second Notifier to the Stop terminal of the While Loop. The "Countinuous Count" While Loop simply wires the output of the Notifier to its Stop. Bring out its Error Line, as well.
- So how do you "fire" the Notifier? One more While Loop with an Event Structure, looking at a Value Change on the Stop button. Think carefully about what you want to wire to the input of the Send Notification function. Bring out its Error Line.
- Final piece of the puzzle -- when do you Release the Notifier? You don't want to get rid of it before it "does its job", which is when all three loops have stopped. Look at Merge Errors (in Dialog and User Interface Palette) and remember, Error Lines are Your Friend.
Try coding this. You should end up with something simple, intuitive (you could explain what it is doing to someone who has never seen LabVIEW), and easily maintained/extended. "I'll show you mine after you show me yours".
Bob Schor