11-15-2012 01:47 PM
Hi,
I am trying to generate a digitized sine wave to feed into my 16 bit DAC. Basically, I am trying to create a sine wave that goes from 0 to 65535, with a frequency and amplitude that I can control.
Any ideas how can I do it?
Thanks!
11-15-2012 02:14 PM
Have you tried the "Basic Function Generator"?
You can find it in the palette:
Programming >> Waveform >> Analog Wfm >> Generation
Norbert
11-15-2012 04:59 PM
Thank you for your suggestion!
Attached is what I have so far. I think it works. I digitized the sine wave, but my problem is that the sine wave is not "continuous/real time". Also I cannot change my sample size (default is 1000).
Any other suggestions?
I am planning of providing a digitized sine wave to a DAC and measuring SNR at the output of the DAC with an Audio Precision. That is why I needed a continuous/real time sine wave with more sample points.
Thanks.
11-15-2012 05:13 PM
yitzoga wrote:Also I cannot change my sample size (default is 1000).
You did not connect the "sampling info" input of "sine waveform.vi".
@yitzoga wrote:
Attached is what I have so far. I think it works. I digitized the sine wave, but my problem is that the sine wave is not "continuous/real time".
What do you mean by that? How about adding a loop?
11-15-2012 06:23 PM
THANKS, I totally missed out the sampling info part.
I am trying to generate a continuous sine wave in digital code. You can think of it as generating a sine wave from a function generator (except that it is digitized from 0 to 2^16).
I need to write the digital codes to my DAC (i.e. input a 1KHz digital sine wave), and observe the output; and that is why i needed a "real-time" signal.
I'll try working on the loop for the exisitng code. Thank you for the suggestion.
11-16-2012 05:03 AM - edited 11-16-2012 05:07 AM
Hi, Ytzoga,
Have you been successful in modulating the DAC output? If so could u pls tell me how you did it.
For the last few weeks I am trying to modulate the DAC out put through digital sine wave.
But could not achieve this.
Pls kindly see a snapshot of my VI. I have added the sine wave into the digital data and input intp SPI COMM.
Also pls tell me how I can read the moculated analog voltage? Can I use a DAQ (NI-USB6009)?
Pls help
Thanks
11-16-2012 05:05 AM - edited 11-16-2012 05:08 AM
Hi, Ytzoga,
Have you been successful in modulating the DAC output? If so could u pls tell me how you did it.
For the last few weeks I am trying to modulate the DAC out put through digital sine wave.
But could not achieve this.
Pls kindly see a snapshot of my VI. I have added the sine wave into the digital data and input intp SPI COMM.
Also pls tell me how I can read the moculated analog voltage? Can I use a DAQ (NI-USB6009)?
Pls help
Thanks
11-19-2012 01:29 PM
Hi Cyclone,
Unfortunately, I haven't been successful either. I am not using a DAQ.
I am just trying to generate a digitized sine wave (0 to 2^16) continuously. I am not sure how I can help you.
I will let you know once I get something working...
11-19-2012 04:36 PM
yitzoga
Have you tried setting both amplitude and offset to 0.5? Do that after wiring a control to the Sampling Info terminal and placing your code in a While Loop, and I think you get what you're looking for.