10-02-2013 10:43 AM
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.
Solved! Go to Solution.
10-03-2013 06:17 PM
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
10-04-2013 07:33 AM
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.
10-04-2013 11:04 AM
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
10-04-2013 02:22 PM
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.
02-06-2015 06:53 AM
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
02-06-2015 07:31 AM - edited 02-06-2015 07:31 AM
Having trouble attaching files.....