08-22-2017 03:06 PM
Hi everyone I am new to labview and I have a program in which I have 3 loops. I am able to stop each one with a stop button but I am unable to create a master stop that will stop all three loops. I also wanted it so that once I press the stop not only does it stop the loops but also reset the Booleans that are associated with each loop. I have attached my vi so that it can be easy to see. thank you
Solved! Go to Solution.
08-22-2017 03:34 PM
You have way too much duplicate code. Your loops only differ in the cluster array inputs and LED outputs, so you should combine all into one Big outer FOR loop and your problems will disappear, because you only have one stop button left.
08-22-2017 03:36 PM
oh the reason I have duplicate code is because this code will be expanded to have each loop correspond to a set of instruments so I need them to be separate and not turn on all at the same time. since I was going to be connecting each loop to a daq assistant
08-22-2017 04:04 PM
Why would they all turn on at the same time? You can easily address a different instrument based on e.g. [i] of the outermost loop.
Are the loops supposed to run in parallel? Then why do you have a data dependency? And wyy are you autoindexing on the error wire? That seems very dangerous.
Here's what I had in mind, just to give you some ideas.
08-23-2017 05:52 AM
Not able yo view code due to version compatibility,hope Dynamic event can solve your issue. Generate Event for stopn in the main loop which will triggered in other loops.
08-23-2017 07:08 AM
oh ok thanks you that makes more sense now. but im still unclear as to how I would address a different instrument for each row of the Boolean array. This whole code was to run a cleaning cycle with each row addressing two stations so would I address the instruments by having them communicate with the outermost array? sorry I am still trying to learn more about how the instrument communication works.