06-08-2014 05:46 PM
i'm wondering how can i make my loop doesn't stop even if the condition is true ,until the 3rd time(when it's true) then it stops
06-08-2014 06:52 PM
06-08-2014 07:24 PM - edited 06-08-2014 07:25 PM
it's still a little complicated for me, if i get it right i have to add a for loop with a shift register!!!
06-08-2014 07:38 PM
First, clean up your wiring.
Second, you don't need to add a For Loop. You just need to use the shift register on the while loop you already have.
Third, you need to define your stop conditions more clearly. Does it mean the first time the stop is true after the loop has run 3 times? Or it must be true for 3 iterations in a row before stopping? It must have been at least 3 times, not necessarily consecutively, before stopping?
06-08-2014 07:59 PM
the loop stops in 2 cases: if i click stop or if i didn't realize the 2nd condition(in red).if i maintain a value(30) for 10 sec or more it's ok no problem.but if i maintain this value(30) for less than 10 sec the loop stops,i don't want that.what i want is if i miss to maintain for the 1st time then i had an other chance and again until the 3rd time.if i miss to maintain this value for 10 sec in the 3rd time then the loop has to stop
06-08-2014 10:23 PM
I don't completely understand what you are saying. It is a lot of "ifs" and also a lot of run-on sentences. (It would help if you capitalized your sentences and put some spaces after your periods.)
If you want the stop button to only stop the loop when someother condition as occurred as well, then calculate the logic for that other condition and AND it with the stop button before sending it to the OR function.
06-08-2014 10:24 PM
06-09-2014 05:24 AM
I want to solve it without using the state machine.
Yes maybe it's an and/or game ,how can i use feedback node with iterations in order to make that condition repeats 3 times if it's False.
06-09-2014 07:05 AM - edited 06-09-2014 07:05 AM
Something like this? BTW, I also think you should be going with the State Machine. I makes things so much easier to understand what is happening.
06-09-2014 10:41 AM
Just curious... why are you so averse to the state machine? If you don't learn this simple concept, your future in LabVIEW development is bleak. Take the time to learn this basic concept. It will serve you very well!