LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot Power spectral density of a signal from myDAQ.

Solved!
Go to solution

Hello, 

I need to plot the power spectrum of a signal acquired using myDAQ. I have already been able to acquire and plot the input signal. The example given in Labview for power spectrum uses a pre-defined sine wave and replacing the sine wave by the input signal does not get the work done..

Please Help...

 

Thanks

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

Why have the second loop?  Looks like you should have what you want with just the first loop.  Here's a cleaned up version of your code.  I only removed the second loop and then did some slight rearranging to make it easier to read.


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
Message 2 of 8
(3,046 Views)

This part worked fine for me as well. But the problem I was getting was that the graph for power spectrum was limited to 500Hz only, despite changing the range for the axis..

Thanks a lot for helping

0 Kudos
Message 3 of 8
(3,018 Views)
Solution
Accepted by topic author bns2804

@bns2804 wrote:

This part worked fine for me as well. But the problem I was getting was that the graph for power spectrum was limited to 500Hz only, despite changing the range for the axis..

Thanks a lot for helping


That's because you are sampling at 1kHz (1000Hz).  Remeber Nyquist (you must sample a signal at at least twice its bandwidth)?  So your FFD will only go up to 1/2 of your sampling rate.


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
Message 4 of 8
(3,016 Views)

Oh! That didn't come to my mind.

Thanks a million !

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

Hi, 

I have two question to ask you, the first is how to generate continuous power spectrum density on one graph and how to save the RMS value on Labview, am having a problem with saving due to its being a cluster and it is not compatible with any of the storage function. Any hint will be fine 

Thanks, 

0 Kudos
Message 6 of 8
(2,096 Views)

Hey Philip_97,

 

It looks like you posted your question to a thread that is over 3 years old.
This thread already has a post marked as a solution.
This question should become a new thread in the LabVIEW section.
It would also be very helpful if you could add pictures of your code and any hardware information.

 

Best regards,

 

Salil Pathare

Applications Engineer

National Instruments

866-275-6964

support@ni.com 

0 Kudos
Message 7 of 8
(2,082 Views)

Hi,

I have two question, is there a way to have all your power spectrum  sample measurements on one graph ( an example is the attachment capture example below)on LabVIEWNXG and secondly, is there a  way to save the RMS data ( which is a cluster which contains three elements) as a file , I have tried all storage function in LabVIEW NXG and none has worked with it . hope you can provide a hint.

Thanks

 

Download All
0 Kudos
Message 8 of 8
(2,075 Views)