LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tdms string attribute

Hello,
 
I would like to save waveform with attributes in TDMS file. One of the attributes I want to save is an array. Since TDMS does not allow array attributes and returns an error, I tried the following: flatten array into string, add string attribute to the waveform and save it in TDMS file. But when I read the waveform back. the particular waveform attribute is an empty string. I believe it is due to special characters present in the output string of "Flatten to string" vi. Is it a bug or working as intended?
 
Here's an example of the problem. I use TDMS Set/Get property instead of waveform attributes here for simplicity with the same result (LabView v. 8.20): 
0 Kudos
Message 1 of 4
(3,231 Views)
TDMS strings (properties and values) must be alphanumeric ("human-readable"). The reason is that TDMS files are used for data exchange between software like DIAdem, CVI, Excel or SignalExpress. That's why data types for properties and values are currently limited to a set of types that all of these applications can handle.

Channels are the only intended way of storing arrays in TDMS.

Herbert
0 Kudos
Message 2 of 4
(3,221 Views)
Herbert,
 
Thanks for quick reply. I just came up with a work around and use "Array to spreadsheet string" instead of "Flatten to string" and it seems to work. Are multi-line spreadsheet strings officially supported as TDMS attributes, so I can rely on it in the future?
 
Fedor.
0 Kudos
Message 3 of 4
(3,218 Views)
Fedor,

as long as you stick with commonly used separators like comma, tab or line feed, there's nothing wrong with that.

Herbert
0 Kudos
Message 4 of 4
(3,208 Views)