LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time data logging

Hello all,

 

I am trying to implement an application which reads from and sends data to a test setup and logs the acquired data. The desired frequency of the task is 1kHz. An initial version of the program logged data using the TDMS file format which has lead to timing issues.

 

I am running a PXI-8196 controller with LabVIEW RT. I have run an execution trace but it unfortunately does not show the duration of the file write threads. For all the other threads, I have a cumulative runtime of max 550 micro seconds, meaning my task has approx 400 micro seconds to log 14 values of 8 bytes each in three separate TDMS files (113 kB/s which does not sound like a lot)

 

I have run the setup for 11 seconds and logged the time stamps at the start and the end to verify the program duration. Using the TDMS file type, I had a duration of 12,5 secs instead of the desired 11. Using the binary data file, the time is reduced to 11,4 secs which is better but not good enough for my application.

 

I am presently saving one set of values per iteration of the loop. Is there any way of buffering the data before writing it all at the end of my test run? My test setups run approx 3 mins max and that would mean allocating a buffer of approx 20 MB. I tried setting the NI_MinimumBufferSize of each channel to 1MB for the 11 sec test but that did not improve the time performance of the loop.

 

Can anyone suggest what I am doing wrong or overlooking here?

 

Regards,

Shailesh

0 Kudos
Message 1 of 3
(2,423 Views)

Hi SVJ,

 

suggest you use  producer /consumer  architecture with RT FIFO.

Check out the examples in Labview.

 

/Seadog

0 Kudos
Message 2 of 3
(2,397 Views)

Hello Seadog,

 

many thanks for your reply. I tried the producer/consumer architecture. However, I have to adjust the time loop durations so that I dont lose/repeat any values. Is there a solution to this??

 

Shailesh

0 Kudos
Message 3 of 3
(2,361 Views)