LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cyclic Storage

Hi,

 

I want to store data generated from acquisition card.

 

I have to start the acquisition when my experiment starts.

 

However, the data I need are just the last 100Mbytes before end of acquisition.

 

If I save all of the data from beginning, the file size will be too large to be stored at my PC.

 

How can I do a cyclic storage to limit the acquisition size to 100M and always store the newest 100M data?

 

0 Kudos
Message 1 of 7
(4,045 Views)

. I assume you have implemented the Streaming to disk option "for saving your data.As a simple solution you can overwrite the file everytime you acquire new chumk of data (assuming that you are aquiring 100M for every second or duration set by you)

But this is not recomended since you will be doing some unwanted file operation everytime.

 

 

So instead , when you hit "that" stop button to stop the acquistion, get the last read data (again assuming that the last chunk of 100M data are recieved once you hit the stop button) pass it out of your while loop and then store it in the file.

 

Guru

Regards
Guru (CLA)
Message 2 of 7
(4,034 Views)

100Mbytes is a lot of data. How fast is it generated? How much data to you typically write at once? How much is kept in memory at any given time?

 

You could create a 100Mbyte binary file and keep overwriting the oldest data, keeping track of the file position using quotient&remainder. When the program is finished, split at the insert point and reassemble the two parts in the correct historical order. 

Message 3 of 7
(4,012 Views)

Thank you for your reply.

 

However, I'm just a starter of LabView.

 

I can not understand how to realize the feature you described.

 

I appreciate that you can give me an example code

0 Kudos
Message 4 of 7
(3,982 Views)
Could you please answer the first three questions in my reply above. Thanks!
0 Kudos
Message 5 of 7
(3,974 Views)

How fast is it generated? 

4 bytes are generated in 38.4 MHz.

 

How much data to you typically write at once? 

I'm sure the output data rate of my acquisition card.  I guess it's the same as above.

 

How much is kept in memory at any given time?

I want to keep more than 2sec data in memory.

 

Thank you.

0 Kudos
Message 6 of 7
(3,952 Views)

如果您需要 NI 台灣工程師的協助,

 

請致電 02-2377-2222

 

ni.com/taiwan/forum

0 Kudos
Message 7 of 7
(3,915 Views)