# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Plot Power spectral density of a signal from myDAQ.

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..

Thanks

Message 1 of 8
(3,058 Views)

## Re: Plot Power spectral density of a signal from myDAQ.

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.

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)

## Re: Plot Power spectral density of a signal from myDAQ.

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

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

## Re: Plot Power spectral density of a signal from myDAQ.

@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.

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)

## Re: Plot Power spectral density of a signal from myDAQ.

Oh! That didn't come to my mind.

Thanks a million !

Message 5 of 8
(3,007 Views)

## Re: Plot Power spectral density of a signal from myDAQ.

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,

Message 6 of 8
(2,096 Views)

## Re: Plot Power spectral density of a signal from myDAQ.

Hey Philip_97,

It looks like you posted your question to a thread that is over 3 years old.
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

Message 7 of 8
(2,082 Views)

## Re: Plot Power spectral density of a signal from myDAQ.

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

Message 8 of 8
(2,075 Views)