Fixing Data Loss While Logging Data in a Real-Time Target

Updated Jun 22, 2018

Reported In

Software

  • LabVIEW Real-Time Module
  • LabVIEW

Issue Details

I am logging data coming from a global variable to a file every certain period in a Real-Time Target. However in the resulting file I am observing gaps in the data that is being written to the file. How can I fix this?

Solution

First of all, if possible, data logging in a real-time target should be reduced or eliminated altogether. 

If this logging is unavoidable for a particular application one way to fix the data loss in this case would be to implement a producer-consumer arquitecture. In the producer loop the data should be written into the queue. In the consumer loop the data will be dequeued and logged into the file. 

Additional Information

Communication between real-time target, host PC and FPGA can be achieved in a lossless manner using network streams

For more general information on data logging in an RT target refer to Best Practices for Target File IO with LabVIEW Real-Time

WAS THIS ARTICLE HELPFUL?

Not Helpful