09-23-2012 11:44 AM
Hello,
I am trying to write a VI that do some operation within a while loop. I have replaced the operation with some simple math operation in the attached VI picture. For the loop in the picture, I just want to add 1 every 15sec. until it reaches 10 and stops. However, I also want to be able to force stop the while loop without waiting the whole 15sec till the next iteration. Is there a way to break the wait time for the while loop? Thanks for the help!
Solved! Go to Solution.
09-23-2012 01:15 PM
No.
If you want to stop your while loop earlier, you need to use a much shorter wait in there. Only do what you want whenever the 15 seconds has passed, perhaps by using the Elapsed Time Express VI.
09-23-2012 01:22 PM
09-23-2012 02:05 PM
Use an event structure with a 15000ms timeount and an event for the stop button. Pressing stop will immediately break the timeout.
09-23-2012 02:18 PM - edited 09-23-2012 02:19 PM
@altenbach wrote:
Use an event structure with a 15000ms timeount and an event for the stop button. Pressing stop will immediately break the timeout.
Here's what I had in mind (LV 8.5).
09-23-2012 02:51 PM
@altenbach wrote:
@altenbach wrote:
Use an event structure with a 15000ms timeount and an event for the stop button. Pressing stop will immediately break the timeout.
Here's what I had in mind (LV 8.5).
When I saw the image I didn't understand. The wire to the sandclock is hidden I have corrected. 🙂
09-23-2012 03:52 PM
Thanks, the wire must have slipped under there unnoticed when I resized things for the final save.