Stop While loop

This is a discussion on Stop While loop within the labview forums in Programming Languages category; Hi I have a while loop with a cycle time of 100 sec, when I stop it I have to wait 100 sec untill the while loop stops. There is any manner to stop it immediatly? Thanks    ...

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-09-2008, 08:10 AM
enzo78
Guest
 
Default Stop While loop

Hi
I have a while loop with a cycle time of 100 sec, when I stop it I have to wait 100 sec untill the while loop stops.
There is any manner to stop it immediatly?
Thanks
 
 
Reply With Quote
  #2  
Old 07-09-2008, 08:10 AM
andre.buurman@carya
Guest
 
Default Re: Stop While loop

Change the implementation, so the wait is 1 ms and the functional code is only executed every 100 ms.
Reply With Quote
  #3  
Old 07-09-2008, 08:10 AM
enzo78
Guest
 
Default Re: Stop While loop

Hi
This is not clear for me...
Can you explain better?
I send my code..


untitled6.JPG:
http://forums.ni.com/attachments/ni/.../untitled6.JPG
Reply With Quote
  #4  
Old 07-09-2008, 08:40 AM
JoeLabView
Guest
 
Default Re: Stop While loop

Why are you using a property node for a control that is not accessed within the loop?  And the conditional terminal is set to run if True. 
Your while loop doesn't make sense.. Can you post the entire code (attach your vi) and explain what you are trying to do?
R
Reply With Quote
  #5  
Old 07-09-2008, 08:40 AM
Andrey Dmitriev
Guest
 
Default Re: Stop While loop

Hi, enzo,
You can do something like this:
<img src="http://vi-lib.com/forForum/while100.PNG">
Andrey.
Reply With Quote
  #6  
Old 07-09-2008, 08:40 AM
enzo78
Guest
 
Default Re: Stop While loop

I`m using&nbsp; aproperty node because I run more than one while loop at the same time and I want to stop them whith&nbsp; only one button.
&nbsp;
&nbsp;
Reply With Quote
  #7  
Old 07-09-2008, 09:10 AM
muks
Guest
 
Default Re: Stop While loop

Is this what you are looking for?Message Edited by muks on 07-09-2008 07:46 AM


whilestop.vi:
http://forums.ni.com/attachments/ni/...1/whilestop.vi
Reply With Quote
  #8  
Old 07-09-2008, 09:10 AM
muks
Guest
 
Default Re: Stop While loop

The while can have any delay in the above vi but it will stop the vi execution immediately the stop button is pressed.
Reply With Quote
  #9  
Old 07-09-2008, 09:10 AM
enzo78
Guest
 
Default Re: Stop While loop

No I don`t want to stop all the VI but only the while loop.
Reply With Quote
  #10  
Old 07-09-2008, 09:10 AM
JoeLabView
Guest
 
Default Re: Stop While loop

Please post your code so that we may suggest an appropriate solution.
&nbsp;
If you have multiple loops running in parallel, you may need one that has an event structure.&nbsp; We'll be able to determine that after seeing your code.
&nbsp;
R
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:26 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.