12-22-2008 08:57 PM
Hi
I'm trying to make a VI that generates a textfile which saves some data each second and give it some timeframe so that it can maintain only the data that has been generated last 10 seconds or so
First I have made 2 different files, one is for saving some data each second into a text file, and the other one is for removing the data
but when i combined those two it doesn't seem to work.
Could anyone have a look at the file and comment on that?
thanks
12-22-2008 09:30 PM
A couple comments on what you are trying to do. First, doing this with a text file is going to be inherently difficult as you are going to be doing a lot of rewriting of the file. Second, having two VIs (1 to write the data and 1 to remove the old data) is a bad approach - why not design the algorithm so the file is only written to one time for each update cycle? Stop trying to make a poor design work and spend a little time thinking outside the box.
Hint: think about how you calculate a running average in LV, and what if the indicator out wasn't just an indicator but a file write?
Mike...