LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to link value with its name in TDMS file output

Solved!
Go to solution

Hello,

I would like to store acquired data in a TDMS file. The complete DAQ is running through a sequence within a while loop. At the end of the sequence I now included another frame where I would like to save the acquired data. Timing information is not relevant.

When I build an array from local variables and connect it to the "Signals" of the ExpressVI I get a nice TDMS file with values at each iteration. Is there a possibility to get the signal name in the header? For now it says "Untitled".

Also my TDMS has like seven sheets although I only created an array with three variables.

Any help would be appreciated 🙂

Cheers from Germany

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

Hallo Horst,

 

es gibt da auch ein deutsches LabVIEWForum

 

- Using sequences and local variables sounds like bad program design.

- You could use simple TDMS functions, you wil find them in the file functions palette. There are also example VIs coming with LabVIEW explaining how to use them!

- How did you configure your ExpressVI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,035 Views)

Hallo Gerd,

danke für den Tipp, aber jetzt bin ich schonmal hier....

 

- OK, for that I will try to improve my design anyhow,I just read the "5 common rookie-mistakes"

- I found the TDMS functions although without example VIs. I'll try to get them to work with the help files //edit: found the examples, will look into them

- I didn't change much, just the format setting to TDMS instead LVM

If this approach is not the correct one from a "good-design" point of view please tell me what would be better

0 Kudos
Message 3 of 5
(3,020 Views)

Hi Horst,

 

Is there a possibility to get the signal name in the header? For now it says "Untitled".

Well, using simple TDMS functions you can set any signal property you like!

Using waveforms with their special attributes (as explained in the LabVIEW help) will result in proper signal names in the TDMS file too…

 

Also my TDMS has like seven sheets although I only created an array with three variables.

That's because you set to include a "header per segment". Don't do this if you don't like the result!

As said before: using simple TDMS functions gives you much more control on the file layout!

 

Regarding "good design":

check.png

So it will look when you get rid of local variables and the sequence structure! I appended the TDMS-FileViewer to check the created TDMS file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,007 Views)
Solution
Accepted by topic author elHorst

Here's a quick example that doesn't use the Express VI, but the actual TDMS API VIs.

 

You can change the group name as it is just an input to the TDMS Write.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(2,996 Views)