LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform signal

Solved!
Go to solution

Hi everyone.

 

I'm a beginner on Labview. I would like to ask about my problem described below:

 

I'm making a waveform signal and I want have another signal which has delay time as 1 min (the amplitude not change). Then I want to compare the amplitude of the two signals at the same time. Actually, I only find how to make a signal by discrete values (array) but I dont know how to find an amplitude at a defined time.

0 Kudos
Message 1 of 6
(2,552 Views)

I think what you are really wanting to do is compare the waveform's data points.  Data point 1 at t and data point 2 at t+1minute.  If you know the sampling rate, this isn't hard.  If you are going be sample rate (samples/second, we'll call it S), then you want to compare indecies t and t+S*60.  If you have dt instead (seconds/sample), then your indecies are t and t+60/dt.


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 2 of 6
(2,543 Views)

Thanks crossrulz but what I'm confused here is about labview funtions.

I did a kind of example to show my problem as attached.

I tried to make a delay funtion by extracting t0 from 1 signal then plus 60 to form a new signal which delays 1min (which can be seen on the graph). However, when I subtract them, the values are always 0 (I know the problem here is that the Y values of the 2 signals do not change while I set up a delay function like that but I cannot handle it).

P/s: I just start labview like the way I did in matlab simulink 

 

 

0 Kudos
Message 3 of 6
(2,534 Views)

Sorry I forgot to attach the file

0 Kudos
Message 4 of 6
(2,533 Views)
Solution
Accepted by topic author Leyenda

Hi

 

it is expected to see the difference as 0, since you are comparing element 'i' of channel 1 with element 'i' of channel 2.

you are not comapring them as per their time instant.

 

so, instead of calculating the difference of the two Y arrays like that, you should do the following:

 

option 1: since the dt = 1 minute, you delete the first element of channel 1 Y array and then compare it with channel 2 Y array. (do not modify channel 2 Y array). then, you would be comparing Y elements which are at the same time instant.

 

option 2: use a For loop, with shift registers and compare the current value of channel 2 with previous iteration value of channel 1.

 

 

edit: try the attached code

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 5 of 6
(2,517 Views)

Thank you so much Freelance_LV. It's really helpful for me.

Also I'd like to thank all of you for spending your time on my problem.

0 Kudos
Message 6 of 6
(2,501 Views)