08-09-2011 07:30 AM
Hello everyone
I'm made a while loop which is suppose to take some numbers from some arrays, then solve them in a formular and output the data for a certain amount of time - countdown. All this works, but it is important for me that I can pause and start again from the same point in time. This is importan because I may have to pause during the operation and sometimes the countdown would be set for hours where I wouldn't like to restart the entire proces.
I tried implementing a pause function but now It won't even start. Any body have any ideas?
Thank you very much,
Theis
Solved! Go to Solution.
08-09-2011 07:57 AM
Hi Theis,
Keep your pause button inside the loop and then try.
Thanks and Regards
Himanshu Goyal
08-09-2011 08:00 AM
Something like this.
08-09-2011 08:26 AM - edited 08-09-2011 08:27 AM
Please do NOT create multiple threads on the same subject. It's very irritating to try to answer a question in one thread, only to find that you've asked the question AGAIN somewhere else and had it already answered. I went to the trouble of trying to help you, and frankly now have no desire to help you further.
Have some patience. This forum is not a place for immediate answers.
ORIGINAL THREAD: http://forums.ni.com/t5/LabVIEW/While-loop-stops-before-countdown-has-finished/m-p/1663284
08-09-2011 03:38 PM
@smercurio_fc wrote:
Please do NOT create multiple threads on the same subject. It's very irritating to try to answer a question in one thread, only to find that you've asked the question AGAIN somewhere else and had it already answered. I went to the trouble of trying to help you, and frankly now have no desire to help you further.
Have some patience. This forum is not a place for immediate answers.
ORIGINAL THREAD: http://forums.ni.com/t5/LabVIEW/While-loop-stops-before-countdown-has-finished/m-p/1663284
I am most sorry that I created a multiple thread and I do see how that is annoying. I'm new to this forum and labview and I just wasn't sure if the old thread would dissapear in the bunch - even so I should ofcourse have had closed the other thread before opening a new one.
I will not do this again and I hope you can accept my apologie. I would also like to say thank you very much for the help! You have - all of you have - been very helpful and I can hournestly say that I learned a lot from you guys.
08-09-2011 03:47 PM
@aeastet wrote:
Something like this.
Ye! This looks something like it! I played around with it and adjusted af few things, like making it stop when it gets a zero input from the array. I do, still, have a few problems:
Whenever it reaches 10 seconds it kinda stops and then suddently ticks up to 20 within 4 seconds, so it even counts to fast. I also added a lamps wich shows which process is running. I build this as an array and when it gets signal 1, it the first lamp turns on, same with 2 but at three suddently multiple lamps light up - weird! It seems like I'm inches away from reaching my goal. Any ideas?
08-09-2011 03:58 PM
@Theis Thorn wrote:
@aeastet wrote:
Something like this.
Ye! This looks something like it! I played around with it and adjusted af few things, like making it stop when it gets a zero input from the array. I do, still, have a few problems:
Whenever it reaches 10 seconds it kinda stops and then suddently ticks up to 20 within 4 seconds, so it even counts to fast. I also added a lamps wich shows which process is running. I build this as an array and when it gets signal 1, it the first lamp turns on, same with 2 but at three suddently multiple lamps light up - weird! It seems like I'm inches away from reaching my goal. Any ideas?
Well the reason you are getting multipul lamp is because the number going to your lamp array is binary 0,1,2,4,8, etc...
As far as why it hangs I am not sure I will have to see what you did. Can you save this code with the default values that you are using so that I can see what is going on.
08-09-2011 04:05 PM
You had significan digites to 1. So you were only getting every ten after ten. I fixed it.
08-09-2011 04:10 PM
@aeastet wrote:
@Theis Thorn wrote:
@aeastet wrote:
Something like this.
Ye! This looks something like it! I played around with it and adjusted af few things, like making it stop when it gets a zero input from the array. I do, still, have a few problems:
Whenever it reaches 10 seconds it kinda stops and then suddently ticks up to 20 within 4 seconds, so it even counts to fast. I also added a lamps wich shows which process is running. I build this as an array and when it gets signal 1, it the first lamp turns on, same with 2 but at three suddently multiple lamps light up - weird! It seems like I'm inches away from reaching my goal. Any ideas?
Well the reason you are getting multipul lamp is because the number going to your lamp array is binary 0,1,2,4,8, etc...
As far as why it hangs I am not sure I will have to see what you did. Can you save this code with the default values that you are using so that I can see what is going on.
Ohh! I see, that one I should be able to figure out! 😉
What do you mean by saving the code with the default values? I'm not sure if it this you mean but here are the values I just tested it with:
Time (min) 0,2 ^ 0,1 ^ 0,3 ^ 0,4
Weight (g) 4000 ^ 2000 ^ 4000 ^ 6000
again, thank you 🙂
08-09-2011 04:13 PM
Ofcourse! That was stupid.
Well, it seems like I got what I wanted the program to do!
Thank you very much you have been most helpful!