LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to accumulate data on a file for each run?

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)?

0 Kudos
Message 1 of 4
(2,236 Views)

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...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,213 Views)

The general answer it to keep your data in a shift register which you build on each loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,189 Views)

I prefer to use the writing VI inside for loop.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 4
(2,181 Views)