I went ahead and added another 'elapsed time' set to a constant time, and connected 'time has elapsed' to 'reset'. Is this a good idea?
one more quick question -
I got the save files working.I have a timed loop inside my while loop so that it records and saves data every n seconds. before entering the while loop, i have it save headings for my array.
My question is this - I have a dialog box asking for a save location, and each time it writes, it is appending the array. How can i program this in a way so that it can ask the user once where he wants to save his file (in the very start of the program), then have the file path save and continue saving data on that file path (without it prompting me with a dialog EVERY time it wants to save). The reason i want this is that I would like a new data file for each run of the program, and don't want to accidentally append to a previous run.
Thanks again albert!
When I look at the picture from your progam you already did this.
You ask for a filename in the dialog and use this name in two places.
One for the header and one for data.
The only optimalisatin would be that the header for sure is written before the first data comes in.
Now (in the picture) you may have the possibility that the header is written after the first data. Chances are small but not nil.
the best would be to use error in error out so that dataflow determines execution order but the filewrite does not have thes pins
except when you open it up and use the inside of this function.
Another way is to use a sequence frame and combine the dialog and the write to spreadsheet file.
The last I did not think of before is to use the fileoutput of the write to spreadsheet as a data dependency just like error in error out.
So use the output of the header write filename as input for the while.