High-Speed Digitizers

Showing results for 
Search instead for 
Did you mean: 

Improving File Saving Rate using High Speed Digitizer NI PCI 5114 card


To acquire data from an ultrasonic transducer with high sampling rate of 10 MHz, PCI 5114 (with on board memory of 8 MB) high speed digitizer is being used with LABVIEW 2014 version.

We are using a pulser receiver for giving pulses to ultrasonic transducer. The sync out of pulser receiver has being connected to the trigger input of PCI card and thus in the VI also the trigger source is mentioned as EXT Trigger (PFA the datasheet of pulser receiver)

We need to acquire the ultrasonic signals (reference signal & reflected signal ) with a record length of 1000; and save these signals in a text file/ lvm file, at every 1 ms. As the time taken for the reflected ultrasonic pulse to return to transducer is very critical, the saving of these signals for post processing is our prime requirement.


The VI attached is developed using Producer Consumer Architecture, where the Producer loop is acquiring the data from digitizer & the consumer loop is saving the data at the rate of 240 file/ second approx. (our requirement is to save at a rate of 1000 files/sec; 1 millisecond for saving one file).

The acquisition is happening perfectly fine, but the saving rate is not as per our current requirement. 


Please give your valuable suggestions on how to improve the code so as the saving rate of files can be improved.

Will increasing the buffer memory or on board memory on PCI card resolve the issue?



Download All
0 Kudos
Message 1 of 5
  • I don't think you need the 1ms wait in the consumer loop.
  • I'd also consider writing to a single file (or maybe group some number of writes) in your consumer loop.  If you need separate files, you can do that translation as a post processing step.
  • Another option to consider is to use the TDMS API for storing the data as it is optimized for streaming data.  Each write can be a separate 'group'.
0 Kudos
Message 2 of 5
  • The 1 ms wait in the consumer loop is for saving the file at every 1 ms, the same was suggested by the NI support also, as earlier I was using a timed while loop for consumer loop with period as 1ms.
  • Can you please elaborate on how to group some number of writes?
  • I tried using TDMS API for storing the data, but there was no significant improvement in the saving rate of data.
  • I can try again with TDMS file format if you can elaborate on the how to group writes

Thank You

0 Kudos
Message 3 of 5

With TDMS you would open one file and then write N data sets (that come from the producer loop).  Each data set could be a different 'channel' in TDMS or you could append them to the same channel if each data sets length is known.  This will save you the overhead of creating a file for every data set.  

You could also do a every N implementation where you create a new file every N cycles of the consumer loop (ex. create a file if loop iterator in consumer loop mod N == 0).

0 Kudos
Message 4 of 5

The length of the data is known i.e. 1000 data points are acquired for every iteration. while saving in tdms format I need to save the time axis also with the data as time data points is important to observe the shift in peaks of ultrasonic waves.

It would be helpful if you can share a simple VI for tdms file saving options with different channel names as suggested by you in the earlier thread.


Thank You

0 Kudos
Message 5 of 5