From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS multiple channels, different sample rates

Solved!
Go to solution

I'm developing a c++ application under Windows 7 that must log acquired sensor data to disk. The data consists of about 1,500 channels, sampled at rates that vary from 100 samples/sec to 1 sample/sec with data types that could include floating point, integer, fixed point and boolean. We will need to log continuously for hours at a time. In the past, my company has used LabWindows/CVI to write TDMS files for this sort of application but the number of channels was always far smaller and all the channels we're sampled at the same rate. I've been instructed to use the LabWindows/CVI/TDMS solution for this new effort but I have concerns about how well it will perform under the conditions that I described above. My questions:

 

* Does NI have any application notes that address best practices for logging of multiple data channels sampled at different rates to TDMS files using LabWindows/CVI?

 

* Are there any performance benchmarks that demonstrate the capablities and limitations of LabWindows/CVI/TDMS under conditions similar to those I describe?

 

* Does anyone here have any experience - positive or negative - with TDMS in a similar application that they can share?

 

TIA

Hugh

0 Kudos
Message 1 of 3
(5,291 Views)

A related question: What is the intended use of the "group" level of hierarchy in the TDM data model? Might it play a role in dealing with different sample rates? For instance, I could envision having a channel group for each sample rate. I've heard a rumor here at work that this might be necessary but can't find any documentation to substantiate the rumor.

0 Kudos
Message 2 of 3
(5,278 Views)
Solution
Accepted by topic author hshane

I had an off-line exchange with NI Tech Support on this topic and received the following guidance, which I consider gospel:

 

You should be able to log to TDMS in CVI for your 1500 channels at different rates with no problem provided your computer has sufficient memory.  You can configure groups, and with 1500 channels you probably should, for organization sake, but it isn't necessary to create groups to limit the number of different sample rates.  You can also generate different files for separate data, which is also advised but not necssary, based on your preference for organization rather than necessity of keeping like sample rates grouped in the same file.  TDMS supports asynchronous writing, so you should be able to log different channels at different rates to the same file without file access errors or anything like that.   One thing you may run into is slow-down from a lot of simultaneous writing.  I found this community example which shows how to write data to disk faster using the Advanced TDMS API.  Please refer to the following link: LabWindows/CVI Tip: Write Data to Disk Faster with TDMS Advanced API https://decibel.ni.com/content/docs/DOC-33401

Message 3 of 3
(5,235 Views)