LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow TDMS Write on cRIO 9014

Solved!
Go to solution

Hello,

 

I'm using an older cRIO 9014 to run a test stand.  I'm seeing some pretty slow TDMS file write speeds.  I'm wondering if I'm running up against the hardware limitations of the cRIO or if there is something else going on.

 

I created a Test VI to benchmark how quickly I could expect the cRIO to log data under ideal conditions.  The attached VI takes about 190 seconds to run and creates a ~3.5MB TDMS file.  (This simulates 60 seconds of data - so you can see my dilemma.)  By comparison, the same code takes about 3.5 seconds on my laptop.

 

I know the TDMS writing isn't optimized, but darn that's slow!  Is this the best the old 9014 can do?  Are newer cRIOs faster?  Will optimizing my TDMS writes give me the 20x write speed improvement I need?

 

Thanks for any help!

   -Alec

Mechanical Engineering Services
www.ahmackenziedesign.com
Download All
0 Kudos
Message 1 of 4
(2,759 Views)

Is all this being done on the host VI? What is being done in the on the cRIO 9014? We should be able to split some of these tasks up to make this a little more efficient.

 

Eric

Applications Engineer

0 Kudos
Message 2 of 4
(2,681 Views)
Solution
Accepted by topic author alchmcknzie

Hi Eric,

 

This is all being done on the cRIO.  I've made a lot of progress, but generally speaking the 9014 has been very slow.

 

The trick was to minimize TDMS Writes.  For whatever reason, there's a lot of processor overhead associated with each call.  That means writing each "Group" in one write call, feeding it a giant pre-processed 2D array of doubles (converting all time stamps and integers to the same data type).  Putting that another way, build up all your data in RAM and write it to disk all at once.  Its not ideal, but writing the data is almost instantaneous now.

 

TDMS "streaming" is a bit of a misnomer.  It implies you can dump lots of data from different sources into a file at the same time and TDMS will be speedy and optimized.  That's not really true.  Its only speedy and optimized when dumping huge amounts of data to disk all at once.

 

Maybe that will help some one else...

 

-Alec

Mechanical Engineering Services
www.ahmackenziedesign.com
Message 3 of 4
(2,676 Views)

Hi CascoSystems,

 

Currently i use a NI9014 and NI9215 to acquire continous samples, specifically 4 ch of waveforms sampling at 51.2k. As you says, the controller is too slow and the only way that i´ve found is to save the data is create continuosly small binary files with 2 seconds of waveform and store in the internal disk. To extract the data i use another script that move the data one by one to usb port, because the controller does not respond with large amount of data (>1000 files).

Finally the data is processed in the laptop.

 

Regards.

0 Kudos
Message 4 of 4
(1,832 Views)