From 08:00 PM CDT Friday, August 12 - 01:00 PM CDT Saturday, August 13, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Fix DDS Generated Sine Wave That Produces a Periodic Square Wave?

Hello,

 

I'm an undergraduate researcher with almost no experience dealing with FPGA semantics and other National Instruments hardware in general.  Part of my project revolves around creating a sine wave signal via the FPGA on an sbRIO-9632 that is output via the board's analog I/O pins, and I found it convenient to adapt the code provided by the National Instruments tutorials (http://zone.ni.com/devzone/cda/epd/p/id/6066) to have it run on an sbRIO FPGA.  The problem I'm encountering right now is that the actual output I'm seeing is a square wave as opposed to the smooth sine wave that was expected, and I've exhausted all my ideas on possible ways to debug this issue.  Can anyone please give me feedback if they've seen this problem before or offer other suggestions on fixing this?

 

I'm currently running LabVIEW 2009 with the appropriate real-time and FPGA modules on a 64-bit Windows 7 machine.  Again, the hardware is an sbRIO-9632 complete with analog I/O.  I appreciate it everyone!

0 Kudos
Message 1 of 5
(1,788 Views)

Hello!

 

Are you just running one of the examples from the DevZone tutorial? If so, which one? Honestly, the DDS example is probably overkill in this case.

 

You may also consider another Developer Zone tutorial, Waveform Generation with CompactRIO. There are links to several waveform generation examples you might have better luck with.

 

If that doesn't help, would you be willing to post screen shots of your project explorer, FPGA VI, and host VI?

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
0 Kudos
Message 2 of 5
(1,766 Views)

I am also having this issue and have not been able to find a solution in the forums. I am somewhat of a rookie so pardon me if I seem ignorant in any way. I am working on a graduate project where I need to produce some sine waves and I am getting more of a square wave when I output it and measure on the scope. The program I am running is quite simple at the moment to attempt to discover any errors by process of elimination. I have the sine wave generator in a while loop outputting to an AO port. I am using the cRIO 9022 with the 9269 AO module. I will attach screen shots of my code and my oscope image

Download All
0 Kudos
Message 3 of 5
(1,597 Views)

Hi apashl01,

 

Due to the age of this forum thread, I would highly recommend creating a new post on this topic. This should ensure the new post will receive more attention from the community. 

 

If you are trying to create this waveform via the FPGA, I would recommend creating the new post on the FPGA forum. 

 

Best of luck!

Robert R. | Applications Engineer | National Instruments
0 Kudos
Message 4 of 5
(1,554 Views)

Ahh woops, thanks for the tips and response Robert!

0 Kudos
Message 5 of 5
(1,550 Views)