LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to output a continuous analog sine wave, but it still looks very discrete

Trying to do something very simple, I create a sine wave where I can control the amplitude and frequency, where I'd like to be able to have frequencies up to 100 Hz. Then I wire the output into the DAQ express which sends out an analog signal, which I have connected to an oscilloscope right now. When I go up to higher frequencies however, the trace on the oscilloscope looks very discrete, it doesn't look like a sin wave, but rather a step function that goes up in discrete steps. My attempts to play around with the timing frequency doesn't seem to change it.

 

How can I maximize the number of samples the DAQ express outputs to get the smoothest signal? I've attached the vi so far here.

0 Kudos
Message 1 of 5
(3,278 Views)

You say nothing about what device you are using to generate the voltage.  As you probably know, when you generate a sinusoid with digital circuitry, you necessarily make step functions.  The step width is determined by the reciprocal of the update rate, while the height of the steps is (partly) determined by the number of bits of the D/A converter.  So what is your DAQ device?

 

Bob Schor

0 Kudos
Message 2 of 5
(3,251 Views)

Ah sorry, I'm just a student and pretty new to this. The DAQ I'm using is a NI PCI 6221

0 Kudos
Message 3 of 5
(3,250 Views)

Thank you -- the hardware seems to be capable, so it is probably the software.

 

Do you understand how this device works?  Have you "played" with it in MAX?  [Do you know what MAX, the Measurement and Automation eXplorer is?  It should be an Icon on your desktop.]

 

You would greatly benefit by learning more about DAQmx and not using the Dreaded DAQ Assistant.  Do a web search for "Learn 10 Functions in NI-DAQmx", read the White Paper, find its mates and read them, too.  Learn about your device, learn about outputting analog signals programmatically, learn the difference between "N Samples" and "Continuous". 

 

Bob Schor

0 Kudos
Message 4 of 5
(3,214 Views)

Check out the following document (Figure 6... 😎 for explanation of your 'problem'. This also applies to your DAQ device.

 

http://sine.ni.com/np/app/main/p/ap/mi/lang/en/pg/1/sn/n17:mi,n21:42/fmid/3006/

0 Kudos
Message 5 of 5
(3,187 Views)