From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-04-2021 10:47 AM
I have a program that I would like to pause at each loop iteration and restart at the next iteration using a button.. My test involves relocating a test probe for each iteration. All I see is debugging options which I'm not interested in.
08-04-2021 11:38 AM
Please, please, please attach your code.
My generic answer to your vague question will be - simply place a breakpoint within the loop, the execution will stop at the breakpoint everytime and you click on the pause exectuion button to continue.
08-04-2021 12:31 PM - edited 08-04-2021 12:34 PM
This works. How do I show the block diagram?
08-04-2021 02:13 PM - edited 08-04-2021 02:15 PM
A simple Event Structure would work here:
Pressing the button causes the indicator to blink 10 times, otherwise it sits in the Timeout case and waits
08-04-2021 02:24 PM - edited 08-04-2021 02:26 PM
This wouldn't work I have a loop with a lot of things happening in it and sometimes I want to run non-stop and sometimes step. My solution works very well. If the Step button is true then it pauses at each iteration, if false, it completes the loop.
08-04-2021 02:34 PM - edited 08-04-2021 02:36 PM
08-04-2021 06:50 PM
My bad, I misread it.
@RHutchings wrote:
sometimes I want to run non-stop and sometimes step.
This also possible with what @RTSLVU suggested. Check this VI snippet.
08-05-2021 08:03 AM - edited 08-05-2021 08:05 AM
Where's the for loop? Can you upload this so I can download it.
08-05-2021 08:20 AM
I do not recall putting in a for loop. Attached block diagram is a VI snippet, you can save it on your local hard drive and then drag it on to your block diagram and you will have actual coding populate on your block diagram.
But if that does not work. Attached is the VI file.
08-05-2021 08:29 AM