To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example show how to use Producer-Consumer design pattern for simulated data acquisition.
Description
TDMS files are a great way to store measurement data quickly and simply in LabVIEW. They are a type of binary file that consists of two separate files, a binary file and a binary index file. Being stored in a simple binary format allows very fast streaming to disk, and the binary index file contains information on all attributes and pointers in the binary file, allowing rapid read access. On top of this, TDMS files allow you to segment your data into specific 'groups' and 'channels' allowing the data to be organised in a logical fashion. Overall, this makes TDMS a very good candidate for applications need:
In this example, the data we acquiring is simulated with the use of a random number generator. You'll see that I have split the data into two channels; one for the simulated signal and one for a timestamp. By using queues, we can ensure that no data is lost, even if the data acquisition rate is greater than the rate at which we can process the data and save it to file.
Requirements
LabVIEW Full Development System 2012 or compatible
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.