LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output smooth sine wave to DAQ

Hello experts,

 

I am using Labview 8.0 and trying to output a smooth sine wave to a USB 6212 DAQ. I am using the simulate signal vi wired to the DAQ assistant. The generated signal looks great on a wave chart but when I view the signal on AO-0 with an oscilloscope it is not smooth, it appears jagged and blocky. I have attached screenshots of my setup. Any help would be appreciated.

 

Thank you 

Download All
0 Kudos
Message 1 of 6
(5,224 Views)

Well it looks like you have two things contributing:

 

1) the d-a convertion in the 6212 is 16 bits and you have a 20 volt range so each bit reprents a discrete 0.305mV step (+/- conversion errors).  so you really aren't producing a pure sine wave just steps.

 

2) the larger portion of what you are observing on the o'scope is due to the o'scope.   Essentially an O'scope is meant to be read by an operator so vertical accuracy is as good as an operator need.  The standard is +/- 1/2 minor division.  With 50 minor divisions on any range an accuracy of 1% is as good as a scope really needs to be- so the typical digital scope uses an 8bit ADC.  Assume you have a 20V vertical scale this means the smallest change you can see is 78mV.  Try looking at only a portion of the signal (use a finer vertical scale) and the resolution of what remains on the screen will improve.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(5,187 Views)

Jeff thank you for your help.

 

I am not sure that the oscilloscope is the problem. When I replace the simulate signal vi with signal processing>>waveform generation>>sine waveform then the signal on the oscilloscope looks smooth but it appears to be producing the waveform one cycle at a time. The signal is smooth for one cycle then levels at zero briefly then outputs the next cycle smoothly. When I observe the signal on a wavechart it produces one cycle then pauses briefly then produces the next cycle. Is there a way I can make this produce a continuous signal? What is the best method of producing a waveform on the analog out? (simulate signal, sine waveform, etc)

0 Kudos
Message 3 of 6
(5,169 Views)

in a nutshell- don't use the express vis!

 

I usually prototype my tasks in MAX interactivly then

 

from LabVIEW drop a task constant on the BD, select my task and Right-click>Create>Code>Configuration And Example.  It seems even easier to me than using the express vis and I can even do it with simulated hardware befor the system is assembled.  


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(5,145 Views)
From a cursor standpoint, I think your problem is your sample rate versus your change rate. If you are generating a 1 hz signal at a 1 khz sample rate and you are looking at it at 1 khz, it will pick up the jaggies easily. So if you want to sample at 1 khz, the data rate from the DAC should be outpute around 10 khz.
0 Kudos
Message 5 of 6
(5,129 Views)
Just one question. I can not see any while loop in your program. Do you run it using continuous run button. Because that is not correct. It will force the DAQ system to reset for every loop.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 6
(5,128 Views)