LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ

I'm using a very simple program with a while loop to graph the voltages from a function generator, collected in a DAQ card, in a waveform chart. For some reason thought, I can't seem to produce a smooth sin curve in labview when I switch the the function generator to sin. The curve that is graphed on the waveform chart is very rough and doesn't really resemble a sin curve. My square curve from the function generator graphs better, but it still isn't uniform and it's still rought. It looks perfect in a Oscilloscope however. Any ideas?

0 Kudos
Message 1 of 4
(2,829 Views)

Hi,

 

two thoughts of mine (which come often for such generic questions):

1.) You don't show any VI nor block diagram image. So how should we judge your programming skills?

2.) Did you obey Nyquist-Shannon?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,824 Views)

We need to see some code. Maybe also show is a picture of the waveforms you are seeing. I don't know what "rough" means! (noisy, jumpy, quantized, etc. )

 

Even if you violate nyquest you should get a regular waveform (but maybe not what you are expecting to see) unless the sampling is irregular in time. Do you use hardware of software based timing?

 

What is the frequency of your signal?

What is you sampling rate?

What is the amplitude of the signal and what are your gain settings?

0 Kudos
Message 3 of 4
(2,807 Views)

Your symptoms point directly at your sample rate.  What is the frequency of the signal you are trying to sample?  What sample rate are you using?

 

According to Nyquist, you have to sample a signal at least twice the signal's bandwidth.  So if you are trying to measure a 1kHz signal, you have to sample at least 2kHz in order to get the frequency characteristics of your signal.  I prefer to sample at 10 times, 5 times being a good minimum.  So back to that 1kHz signal, I would try to sample at least 10kHz.


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 4
(2,786 Views)