DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract repeating sequence from tdms

Solved!
Go to solution

Hi experts,

 

I have weeks of time series data in TDMS files that are analog logs of a repeating sequence. I need to extract each of the repeating sequences and overlay the waveforms to determine variances between sequences (sample data attached including 5 blocks attached)

 

The start of each block is defined by the pulse on channel "Bubble Detect Trigger". What I need do is time slice each TDMS between the trigger pulses and overlay all the slices on a chart to see how the other channels line up.

Is there a way of doing this in Signal express or DIADEM?

 

Help much appreciated.

0 Kudos
Message 1 of 7
(6,178 Views)

Hey Medwar19,

 

What is your end goal exactly? DIAdem is typically used for it's reporting purposes, post processing, and scripting capabilities. SignalExpress is for data acquisition and minor analysis. LabVIEW can give you more control over all the information but is not as good a straight number crunching as DIAdem would be. You could definitely extract data out of your TDMS files in DIAdem or LabVIEW, not so much SignalExpress. DIAdem could definitely calculate variance as well, it just depends on which environment you would be more comfortable with. How much experience do you have with the environments? 

 

Best Regards,

 

-KP

Kurt P
Automated Test Software R&D
0 Kudos
Message 2 of 7
(6,157 Views)

Hey Kurt, thanks for your interest.

 

I'm looking to do a simple overlay. In the attached example tdms there is a group called Timeseries Data, which was captured using SignalExpress and DAQcard. I need to find the edges of the Trigger channel, chop the TimeSeries data up and overlay the repeating sequence. I have done this manually to show the end result in the group called Overlays. By doing this Raw3 can easily be seen to be different from the other sequences.

 

The analysis is done offline and I need to automate as I have a couple Tb data to process. SignalExpress has some functionality to do edge finding and subset data so I thought that might work, and Diadem is supposed to be great for handling large amounts of data and has scripting so I thought that might work. I just dont know enough about either tool to get the results I need....

 

Thanks again for your help.

 

Mark.

0 Kudos
Message 3 of 7
(6,150 Views)
Solution
Accepted by topic author markedwards

Hi Medwar,

 

This should be close to what you're asking for.  Your trigger signal seems to go high in the middle of the event, so its rising edge may not be the optimal starting point for each event, but this should at least show you how you can copy out the time windows.

 

Dim i, Groups, Channel, Size
ReDim Groups(0)
Set Groups(0) = Data.Root.ActiveChannelGroup
L1 = Groups(0).Channels(1).Properties("Number").Value
L3 = 0
R1 = 3.0
Size = ChnLength(L1)
L2 = ChnFind("Ch(L1) > R1", L3+1)
Do
  IF L2 > 0 THEN
    i = i + 1
    L3 = ChnFind("Ch(L1) < R1", L2+1)
    L4 = ChnFind("Ch(L1) > R1", L3+1)
    IF L3 = 0 OR L4 = 0 THEN L4 = Size
    ReDim Preserve Groups(i)
    FOR Each Channel In Groups(0).Channels
      ChnLength(Channel) = L4-L2+1
    NEXT ' Channel
    Set Groups(i) = Data.Root.ChannelGroups.AddChannelGroup(Groups(0))
    Groups(i).Name = "Event " & i
    Call DataBlCopy(Groups(0).Channels, L2, L4-L2+1, Groups(i).Channels, 1)
    FOR Each Channel In Groups(0).Channels
      ChnLength(Channel) = Size
    NEXT ' Channel
    L2 = CLng(L4)
  END IF
Loop Until L4 = Size
Call ChnCharacterAll
'MsgBox UBound(Groups)

 

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 7
(6,146 Views)

Hey Brad,

 

Thanks for the script. It want I had in mind. I should be able to build on it to get everything I need.

 

Much appreciated.

 

Mark.

0 Kudos
Message 5 of 7
(6,138 Views)

I have a similar problem.

I have a test run that has a Trigger pulse. It repeats thousands of times depending on the test run.

I need to measure ( in my example) the Velocity Fdbk and compare it to the Velocity CMD signal. I would like to be able to create a channel for the results for each cycle that the pulse is active.

This is my attempt at the script, but I am having trouble with the looping.

I welcome any help ….please.

 

Thanks Spidey

0 Kudos
Message 6 of 7
(5,060 Views)

Having trouble attaching files.....

0 Kudos
Message 7 of 7
(5,051 Views)