LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a digitized sine waveform

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!

0 Kudos
Message 1 of 9
(3,446 Views)

Have you tried the "Basic Function Generator"?

You can find it in the palette:

Programming >> Waveform >> Analog Wfm >> Generation

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(3,443 Views)

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.

 

 

0 Kudos
Message 3 of 9
(3,430 Views)

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?

0 Kudos
Message 4 of 9
(3,426 Views)

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.

0 Kudos
Message 5 of 9
(3,419 Views)

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

 

0 Kudos
Message 6 of 9
(3,405 Views)

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

 

0 Kudos
Message 7 of 9
(3,404 Views)

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

 

 

0 Kudos
Message 8 of 9
(3,378 Views)

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.

 

0 Kudos
Message 9 of 9
(3,370 Views)