LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop two loops with one stop button

Hello,

 

i need to stop for and while loop in a same time with single stop button.

I tried with local variable, but it doesn't work. Push button is set to SWITCH WHEN PRESSED.

Channel wires i cannot find anywhere.

In att.

 

Has someone sugestions?

 

Thanks a lot.

Milan

0 Kudos
Message 1 of 5
(2,551 Views)

Tag channel wire doesn't work. Please check VI in att.

Also i am not able to find Reinint to default in Property node.

Please advise...

 

Thanks.

0 Kudos
Message 3 of 5
(2,525 Views)

The loop will not stop until everything in that iteration of the loop has completed execution. You're top loop could take several seconds to run depending on the number of turns. If you need more precise timing then do not take so much data in a single acquisition. Try changing your code to take, for instance, 0.5 seconds of data. Then the loops will stop within 0.5 seconds of each other.

0 Kudos
Message 4 of 5
(2,509 Views)

Hi Milan,

 

Both of them (channel wire and local variable) work, when you take care of timing of your loops mentioned you before. You cannot stops the loop right away, when it's still executing. 

 

DAQmx Timing and Sample Rates

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

 

Hope this helps.

Regards,

Patrik
CTA, CLA
Helping (sharing) is caring!

If the post was helpful - Kudo it.
If the post answered your question - Mark it as Solution.
0 Kudos
Message 5 of 5
(2,440 Views)