I am using this timed structure that is new for me and I am having issues on how to stop it and not losing my data.
Please help, be kind.
Remove all stuff that is not necessary,
PS: I was working over an instrument and typing was difficult.
PS2: From my desk now. What I want to do is to be able to stop the program and still have my data recorded, but the stop button does not do that. I try to place it inside the loop, and does not work or stop data. How is the basic machine state for this?
Solved! Go to Solution.
Where is your code running?
I would only use timed loops on a real-time or FPGA target.
In Windows, you are at the mercy of the operating system for the timing of anything that happens. You might as well use a regular While Loop.
That stop button is outside the inner loop.
It's value is read, then entered into the inner loop. If the control changes, the value of the wire doesn't (dataflow 101).
Put the Boolean in the inner loop, and when wire it to the outer loop. If the Stop control stops the inner loop, the value will go to the our loop and stop it.
Recreate these diagrams, and see what happens with highlighted execution...
Thank you for the kind answer. I almost sure that I had try that first, but I guess that something else was not working and was throwing off my vi.
PS: It sucks to not have a soul on your workplace to fix these errors...
I find out why I did try something different...
Because I am using a delay of 1min inside the loop, I thought that was not working... But it simply was that I was not being patient...
Thank you again,
One mistake is usually easy to find and fix. Two can be much more than twice as difficult.
Yes, it help to have peers, especially to gain a good "programmer conscience". Make everything with someone else in mind, even if that person is "future you". Not an easy task... If it feels stupid to make, it probably is.
Not quite the same, but we're here to help.