LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pause While Loop based on Iteration

Solved!
Go to solution

I want to Pause a while loop based on a user imput and then continue if the input is changed. For example I want to have the loop run  5000 times then stop, later after it stops I change the number to 10,000, I want it to run only 5,000 more times. I want to be able to do this several times not just 2 times. I know how to get it to stop the first time but I dont know how to make it stop the second time without reseting the iteration count.

 

Thanks,

Billy

0 Kudos
Message 1 of 3
(2,379 Views)
Solution
Accepted by Billy331

You need to keep you own iteration count in shift registers.  You might also want a way to reset that count.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,372 Views)

You should consider using a state machine to implement this. It will give you better control over your application and it will be easier to expand in the in the future. Also, since you are interacting with the user you should also consider using the event structure to handle the UI. Take a look at the producer/consumer template.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 3 of 3
(2,355 Views)