I have a for loop that sets the value of an output according to a function node. How do I get this value to reset to 0 when I stop the program? Can I do this after the program stops running?
The easiest way I can suggest to do this is just to write the value of 0 to a local variable at the end of your program execution, just before it stops.