LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pause While Loop disrupts everything

Solved!
Go to solution

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,

 

Damn.png

 

 

 

Theis

0 Kudos
Message 1 of 10
(4,869 Views)

Hi Theis,

 

Keep your pause button inside the loop and then try.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 2 of 10
(4,859 Views)
Solution
Accepted by topic author Theis Thorn

Something like this.

 

PauseTEST_BD.png

Tim
GHSP
0 Kudos
Message 3 of 10
(4,857 Views)

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

0 Kudos
Message 4 of 10
(4,850 Views)

@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.

0 Kudos
Message 5 of 10
(4,825 Views)

@aeastet wrote:

Something like this.

 

PauseTEST_BD.png


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?

PauseTEST.png

 

 

0 Kudos
Message 6 of 10
(4,821 Views)

@Theis Thorn wrote:

@aeastet wrote:

Something like this.

 

PauseTEST_BD.png


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?

PauseTEST.png

 

 


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.

Tim
GHSP
0 Kudos
Message 7 of 10
(4,814 Views)

You had significan digites to 1. So you were only getting every ten after ten. I fixed it.

Tim
GHSP
Message 8 of 10
(4,808 Views)

@aeastet wrote:

@Theis Thorn wrote:

@aeastet wrote:

Something like this.

 

PauseTEST_BD.png


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?

PauseTEST.png

 

 


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 🙂

0 Kudos
Message 9 of 10
(4,805 Views)

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!

0 Kudos
Message 10 of 10
(4,802 Views)