LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using for loop and msec counter for sampling control.

Need control buttons (stop start) to break out of loop in case of emergency other than using the abort button.
0 Kudos
Message 1 of 3
(2,722 Views)
Well one thing is for sure you cannot use a for loop, simply because you cannot get out of it until it finishes. You will have to replace it with a while loop.then place your code inside the while loop.

Hope this helps If you need more info just let me know or be more specific as to what you actually need.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 3
(2,722 Views)
Hi,

Like Joe said, you can not exit a for loop before it finishes it's iterations without using the Abort button. If you want this functionality, I would recommend using a while loop with a stop condition that checks both the iteration number and a stop button control. Look at the attached picture for reference.

Hope this helps!

Travis H.
National Instruments
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 3 of 3
(2,722 Views)