12-08-2006 03:17 AM
12-08-2006 03:33 AM
12-08-2006 04:30 PM - edited 12-08-2006 04:30 PM
Message Edited by JLS on 12-08-2006 04:33 PM
12-08-2006 04:49 PM
12-09-2006 02:18 AM - edited 12-09-2006 02:18 AM
I have done something similiar to exit a test routine part of the way through a loop. I built my while-loop into a state machine and placed the "Break" into the states where I needed to break out the loop.
This example is a While-Loop with a start, middle and end section. The middle section can be skipped if the Break button is enabled.
I hope provides one idea on how to implement what you need
David
Message Edited by David Crawford on 12-09-2006 08:19 AM
Edit: Hadn't finished post.
Message Edited by David Crawford on 12-09-2006 08:22 AM
12-09-2006 04:32 AM
Thanks for all your help. I've already solved my problem.
The main reason, I've wanted to break loop, was, because I use wait function in loop, and I want to stop it in the same time when stop condition is satisfied, and not after the time set in wait function, which can be in minutes, elapse. But it seams impossible, after I've read your answers.
Eva
12-09-2006 07:43 AM
12-09-2006 08:39 AM
@Evca wrote:
The main reason, I've wanted to break loop, was, because I use wait function in loop, and I want to stop it in the same time when stop condition is satisfied, and not after the time set in wait function, which can be in minutes, elapse. But it seams impossible, after I've read your answers.
Use an event structure timeout case to time your code, eliminating any other wait function. Now create a second event case to interrrupt the loop. It will execute immediately, even if the timeout happens only every hour. 😉
For a simple example, look at my recent post here: http://forums.ni.com/ni/board/message?board.id=170&message.id=219301#M219301
(you can see that at certain points durimg execution the timeout is set to infinite, yet the loop can easily be stopped at all times.)
02-15-2007 04:49 PM
02-15-2007 05:46 PM
Dan,
You might consider providing feedback elsewhere, for example at the following link:
http://forums.ni.com/ni/board/message?board.id=features&message.id=7&jump=true
C. 🙂