LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking a signal

Solved!
Go to solution

I have two vibration signal with different time stamps. One vibration run for 6 second and the other is for 3 seconds. I want to substract the PSD of one signal from another. when I run the program it gives me an error of different time stamps.

According to my knowledge PSD is frequency representation of the signal even though time stamps are different ot should still work. If not then tell me any blick that I could use to break the data into same time stamps

0 Kudos
Message 1 of 8
(3,806 Views)

before subtraction, you probably want to re-sample them over the same x-range and the same number of points.

 

Can you show us some of your code? What is the datatype (dynamic, waveform, array ,etc.)?

0 Kudos
Message 2 of 8
(3,775 Views)

Thanks for the reply

Please find the VI and the raw data in attachment. As my data is a text file I am using delimited text to read the data. I can't change the value of dt as it is the sampling time

What might I change to read the data.

Download All
0 Kudos
Message 3 of 8
(3,746 Views)
Solution
Accepted by naseera

1.  There is a Resample Waveform function that you should use to resample original waveform to the same as your fault signal.

2.  You will need to truncate your data so that both waveforms have the same number of samples.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(3,732 Views)

You created a loop within it you are using array subset. What kind of loop is it according to picture it seems like an "in place Element structue". I have never used this loop. Whats the purpose of the loop and how to add those X and Y on the loop?

0 Kudos
Message 5 of 8
(3,699 Views)

An IPE structure is not a loop. All it does is unbundle the array data, trim to size, and re-bundle back into the waveform.

 

Note that Tim's "picture" is actually a LabVIEW snippet, so just drag it to the diagram of an new VI and it will magically turn into real LabVIEW code. Now just right-click on anything you don't understand and call up the LabVIEW help. 🙂

0 Kudos
Message 6 of 8
(3,689 Views)

Sorry I can't do that as I am using version 15 and he created the program using version 16 so I thought to create it myself. Can you do me a favour to save the program as older version

0 Kudos
Message 7 of 8
(3,674 Views)

This is a good exercise for you. All you need to do is place an in-place-element-structure, right-click ... add a waveform bundle/unbundle terminal pair and wire up as shown.

Do you have problems with any other part of the diagram?

Message 8 of 8
(3,665 Views)