LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Master stop and reset all boolean

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(2,720 Views)
Solution
Accepted by topic author Athakore

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.

Message 2 of 6
(2,688 Views)

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

0 Kudos
Message 3 of 6
(2,686 Views)

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.

Message 4 of 6
(2,661 Views)

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.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 6
(2,618 Views)

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.

0 Kudos
Message 6 of 6
(2,611 Views)