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.
07-26-2007 04:50 PM
07-26-2007 10:52 PM
You shouldn't use the abort button in the normal operation of a program. It and the run continously button should only be used for the sake of debugging.
You should set up a stop button and setup all of of your inner loops to stop running when that button goes true. Since there are multiple loops, you will need to use local variables and set the action of the button to switch as opposed to latch. In the last operation of the outer while loop (and you will need to use wires and dataflow to make sure it executes after the inner loops stop), write a false to a local variable of the stop button to effectively reset it and it will behave like you had it set to latched all along. All the loops will stop, the stop button resets itself, and the next iteration of the outer while loop will take over.
Of course you will still need an overall program stop button to stop the outermost loop
07-27-2007 09:42 AM
07-27-2007 09:56 AM - edited 07-27-2007 09:56 AM
I don't know of any way of stopping a For loop early.
In order to do it, you may have to convert it to a While loop so that you get the stop terminal. Then your stop conditions would be the stop button OR the iteration node +1 is >= number of elements in the array that you are indexing into the loop.
Message Edited by Ravens Fan on 07-27-2007 10:59 AM
07-27-2007 10:09 AM