09-15-2013 08:39 AM
I have a program which start and stop controlled by external pulses. For each time it stops, the program reads the data. The data is three separate columns, say, X, Y and Z. How I can program so that for each run, the results (Data) should be accumulated on the same file? I mean, each time the pulse stop, it should read and accumulate in the same file successively.
Eg: Let's say a program named "Read". It has 'start' and 'stop' buttons. When I click on 'stop', the program stops and gives the output X, Y and Z (three columns of data). Now, I want to replace manual 'start' and 'stop' with a pulse, from a pulse generator. So, it continuously 'start' and 'stop' many times. For each 'stop', it gives output X, Y and Z. How can I accumulate the outputs each time it stops, so that at the end I have the collective data of all the runs (all the start and stop)?
09-15-2013 12:08 PM
There are many ways of accomplishing what you want to do. My recommendation would be to go through the online tutorials, and in particular check out the producer-consumer design pattern. It might be just the structure would are looking for.
Mike...
09-16-2013 03:00 AM
The general answer it to keep your data in a shift register which you build on each loop.
/Y
09-16-2013 05:04 AM
I prefer to use the writing VI inside for loop.