LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS file handling

I am running a VI as a startup application on sbRIO 9627
 
file acquisition in the VI : number of files : 5
producer consumer loop architecture with loops have synchronization time of 100ms
1 file in producer loop at a data rate of 1000S/sec/channel (4 channels; 100 data points stored every 100ms)
4 files individually in 4 different consumer loops (single data point after calculation on 100 points is stored in the file, every 100ms)
 
recorded data in TDMS for more than 10 hours continuously in 2 minutes interval (2050 hours 18 may 2017 to 0732 hours 19 may 2017)
I got files of sizes on 2kB (file in producer loop)
Whereas I recorded data with same application for 1 hour (2 minutes interval) just for the confirmation of my problem
I got files of sizes nearly 4MB (file in producer loop)
 
I am attaching the screenshots of acquired files
ATTACHMENTS : fpga10-5.vi : fpga VI on sbRIO9627
2 geo startup.vi : host VI compiled as startup application
sdcard : I am using this card
0 Kudos
Message 1 of 6
(3,258 Views)

Do you have a question?

0 Kudos
Message 2 of 6
(3,215 Views)

My question is............................

When I run the program for longer duration, why does the size of file becomes 2kB

whereas when program is run for shorter duration I get a properly recorded file of nearly 4MB

It can be seen in the jpegs attached

Why does that happen ?

 

regards

0 Kudos
Message 3 of 6
(3,158 Views)

So you run the VI a short time, you get a lot of data in the file.  But if it runs longer, the file becomes shorter?  What does the data look like in the small file?  Is it from the beginning of the collection? The end?

 

You are not doing anything different but letting the VI run longer?

 

Can you create a separate VI that you run in parallel that continually checks the sizes of the files?  If the file size starts shrinking it will log it and let you know.  Wondering where between 1 hour and 10 hours things suddenly go wrong.  Check for an log any errors.  Put indicators on loop iteration terminals and probes in your code to make sure no parts of it are getting stuck.

 

(Be sure to run block diagram cleanup on your code.  And label all of your controls.  You have a Stop button that has no label, so the local variables just say "?").

0 Kudos
Message 4 of 6
(3,136 Views)

Yes, you got the problem correct.

Ideally at a data rate of 1000S/s/ch the file should be having 120000 data points and nearly same size

Later, i converted these files to '.lvm' format for analysis, the files of 4MB have data in them when plotted

but the 2kB files become 0kB as '.lvm' and are blank when opened with notepad.

I will implement your suggestion of a parallel VI for the file size and let you know what happens.

 

Thank you sooo much for your interest and time.

 

0 Kudos
Message 5 of 6
(3,119 Views)

Are you capturing errors in your application?

 

I suspect 2kB actually means the files are emtpy and some error is causing the data to not be written. If it starts after a certain amount of time likely culprits are:

 

* Running out of disk space

* Some sort of queue or FIFO overflow.

* Running out of memory.

 

But the best first step is to use some sort of error handling to log the errors to disk so that you can see what is going on.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 6 of 6
(3,102 Views)