LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Streaming in interleaved mode

I have a Signal in a 1D Array of I16 values.

 

It's structured like this:

Sample1a, Sample2a, Sample3a .... SampleNa, Sample1b, Sample2b, Sample3b .... SampleNb, Sample1c, Sample2c, Sample3c ... SampleNc.

 

The TDMS Write VI has an option to save data in interleaved mode.

The help file states:


If data layout is interleaved and you wire a string to channel name(s) in, this VI uses this string as the channel name of the first element in the 1D array and uses Untitled, Untitled1, Untitled2...as the channel names of the rest elements.

 

So If I prepare a chunk of data that has for example 30 repeats of the sequence above and wire it to the data input.

And later on wire an array of Strings that says [ "Ch1", "Ch2" , "Ch3" ... "ChN"]

 

I wanted to ask why are the channels named Untitled as opposed to being named like the array?

And should I expec the data to be sorted out like this:

 

Ch1                   Sample1a, Sample1b, Sample1c

Ch2(Untitled1)   Sample2a, Sample2b, Sample2c

Ch3(Untitled2)   Sample3a, Sample3b, Sample3c

...

ChN(UntitledN)   SampleNa, SampleNb, SampleNc

 

Secondly I'm having a problem in reading the data with the usage of TDMS File Viever.VI, that I would like to understand.

That is why I haven't been able to easily look at the data using the Viewer.

But I posted that in a different thread.

http://forums.ni.com/t5/LabVIEW/Interleaved-data-saving-and-the-TDMS-Viewer-VI/td-p/1187633


Message 1 of 3
(4,563 Views)

Hi Mac671,

 

I think it's a historical problem why you we get UntitledUntitled1Untitled2... as the channel names when using 1D array with string channel names and interleaved mode. The problem is that in previous versions of TDMS, we didn't support interleaved layout and when you wire a 1D array to TDMS Write, we supposed you are writing only one channel's data in, now since we started to support interleaved from LV 2009, it's also possible that there are multiple channels and only 1D array data wired in. Anyway, from users point of view, it seems it makes more sense we should treat the 1D string array as the channel names instead of using UntitledUntitled1Untitled2...

 

I will have a talk with my other colleagues and take your use case into consideration.

 

For the "crash" problem in your other post, as bazookazuz replied, it's actually not a crash, I also tried on my machine. It takes too much time in TDMS File Viewer since there are too many channels because of the above problem as the reason.

 

Thank you for your posts!

 

Yongqing Ye

NI R&D

Message 2 of 3
(4,529 Views)

The reply I got from bazookazuz actually explains the problem I had, and also resolves my issue with channel names.

 

He used a 2D array, and in that case it seems that the channels do get named correctly.

Since I do have a 1D array I can just use the Reshape Array VI to make it a 2D one, and try to work with this one.

I do hope that the Reshape Array does not have any negative perfomance impact. I'll give that a go.

 

Thanks!

Maciej


0 Kudos
Message 3 of 3
(4,517 Views)