LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced TDMS, Set Channel Information

Hello,

 

I have a problem with scaling in and TDMS File. I´ll try to explain what i want to do.

 

I work on a system that streams data from 2 PXIe 5122 via peer to peer streaming to 2 NI 7962R FPGA FlexRIO cards. After that I want to stream my measurement data from the FPGA cards to an NI 8260 hdd array via the advanced TDMS API using the "TDMS Advanced Asynchronous Write (Data Ref).vi"

 

This works fine, but i have a big problem trying to scale my raw data. When using the "TDMS Set Channel Information.vi" I can decide to split my measurement data into two groups, Digitizer 1 and 2 with 2 channels each digitizer. When doing so, the API sets 2 Properties to the groups called "NI_Scale[0]_Scale_Type == AdvancedAPI" and "NI_Scaling_Status==scaled". When the API Sets these 2 properties i don´t have any chance to scale my raw data directly with the "TDMS Create Scaling Information.vi" because this vi sets the scaling information to each channel. The properties were set, but TDMS viewer and also DIADEM ignores these properties cause the group properties from the Advanced API were set.

 

When taking all 4 channels from both digitizers into one group, the group properties "NI_Scale[0]_Scale_Type == AdvancedAPI" and "NI_Scaling_Status==scaled" won´t be set to the group. But i can´t write the data directly to the TDMS file over the data reference, because i have 2 data references from each digitizer, and the API has a problem deciding what sample belongs to which channel.

 

So the only thing that worked is to create one group and set channel informations for 2 measurement channels, then get the data reference that contains these two channels and write them to TDMS, then set the other two channels informations and get the second data reference and write them to TDMS.

But the problem is, that i have to do that in a loop. When setting always the channel informations before getting the datareference and write the raw values to TDMS file this slows the performance of my system.

 

I think the right way shoul be that i can use 2 groups for each digitizer and set channel informations for each without getting these two group properties into my TDMS file. Anyone has an idea how i can solve the problem?

0 Kudos
Message 1 of 7
(3,127 Views)

Daniel@amc,

 

Attached is a simple VI to show that "TDMS Create Scaling Information" works on TDMS Advanced API with "TDMS Set Channel Information".

 

Best Regards,

Bo Xie

0 Kudos
Message 2 of 7
(3,114 Views)

Thanks for your reply,

 

i know that the scaling vi works when using one group. It also works when using 2 groups. But you put the scaling infos for the whole group. when using an digitizer you can´t do this because every channel has a little bit different scaling values. so u must set the scaling values to each channel. this is done properly, but when using 2 groups tdms viewer and diadem ignore these scaling values because the Groups have the properties as stated in my first post.

 

Here is a little screenshot of what im trying to do.

 

 

 

0 Kudos
Message 3 of 7
(3,109 Views)

Daniel@amc,

 

I understand your issue now. And I attach a VI to reproduce this issue.

 

One quick workaround is to write two tdms files: one group for one digitizer in one file.

 

Could this workaround work for you?

 

Best Regards,

Bo Xie

0 Kudos
Message 4 of 7
(3,088 Views)

Hello,

 

thanks for posting the VI that explains exactly the bug i mean.

When creating two files i think this will lead to an big performance leak when writing to the files.

At the moment i get write rates that are around 250 - 300 MB/sec and higher. I need at least 200MB per sec to get at least one digitizer channel sampled with 100MHz raw data.

 

I´ll try to create the workaround with two files and look to what writing rates i come with this. But the best way would be when anyone can fix the problem Smiley Indifferent

0 Kudos
Message 5 of 7
(3,079 Views)

Daniel@amc

 

CAR 375754 was filed to track this issue. BTW, does the workaround work for you?

 

Best Regards,

Bo Xie

0 Kudos
Message 6 of 7
(3,040 Views)

hi,

 

writing to two files works i get write rates up to 350MB/sec and also constantly 200MB/sec. But the workaround will not be accepted by our customer.

So maybe ill set some scaling properties by my self to the channels and scale them over this way until this bug is fixed...

 

Setting the scaling properties over "TDMS Create Scaling Information.vi" is the best way, because you have the scaling informations directly calculated within the raw data when reading the files in Diadem or the tdms viewer because they interpret the scaling properties correctly. i hope this bug is fixed as soon as possible.

 

So far,

 

Thanks a lot Bo_Xie

0 Kudos
Message 7 of 7
(3,031 Views)