08-15-2013 10:02 AM
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
Solved! Go to Solution.
08-15-2013 10:11 AM
You need to keep you own iteration count in shift registers. You might also want a way to reset that count.
08-15-2013 10:52 AM
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.