DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

concat groups of a tdms file for 1 ch into a new channel

Sorry for the long subject. I am working on a script but am hopeful it has been scripted already.
I write 30 accel channels into LV8.2 waveform tdms file by ET or >alert level until file size =100MB then create a new file. Didem10 tdms plugin loads the file. Each file will create 400 groups of the 30 channels, each group will have 1024 samples/channel which is a 1/2sec block. I want to view the data from a channel for all the file groups in a graph. I would end up with 30 new channels with 400x1024 samples per channel. Hopefully the script to loop groups and combine a single channel has been written, I can script to loop channels later.
Jim
0 Kudos
Message 1 of 3
(3,287 Views)

Hi Jim,

Do you have DIAdem 10.1 or higher?  There was a new example in DIAdem 10.1 that shows how to append identically named channels from multiple groups into new (much longer) channels in a new group.  This example is called "Merging Channels from Different Measurements".

Otherwise, you can try to use the below-attached VBScript as a starting place, which loads multiple files which each have 1 group of the same number and named channels, then appends them into one super group with long channels.  Note that you need replace "CSV" with "TDMS" in lines 17 and 18.

Why are you saving each buffer to a new group in LabVIEW?

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 3
(3,273 Views)

Hi Brad

Looks like 10.0 with an update from the website just yesterday, so no merge example, althought that sounds perfect. Guess I need to look through my product update CD's for 10.1. With some great help from phone support, I was able to script

For I = 11477 To 11859' arbitrary LV assigned group #s from LV tdms file
  For J = 1 To 30' 30 channels in each group
  Call DataBlAppend("'Untitled "&Str(I,"d")&"/3MTG-SW"&Str(J,"d")&"'",1,1024,"'Full/3MTG-SW"&Str(J,"d")&"'")' source channel name typ Untitled 11477/3MTG-SW1, target ch name Full/3MTG-SW1
  Next
Next

which works very well. Will merge 100mb file in <20sec. Why new groups in LV? Because I did not know any better and the daq vi is a direct model of one of the LV 8 express tdms streaming vi's, although I do not recall which. You are probably observing new groups are not necessary, all wave data could be appended channel by channel. Now that I have a 'super channels', I am off working on a 3D waterfall FFT. You will likely be hearing from me again.

Thanks!

0 Kudos
Message 3 of 3
(3,265 Views)