LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Sine Wave Generation Discontinuity

Solved!
Go to solution

Hi all,

 

I have a question about FPGA sine waveform generation: the waveform generated has unknown non-periodic discontinuity. I want to know where it was generated and how to solve it.

 

As you can see from my FPGA code shown below, I generated reference signal- a sin wave and a cos wave using the "sine wave generation" function. Then I write the data to their corresponding FIFO and the sampling rate is controlled by "Period In(usec)" and it's set at 20us. So the sampling rate is 50KS/s.

FPGA Sin.png

 

Fig. 1. FPGA sin wave generation code

At RT level I observe the data through code shown in Fig. 2, and what I observe is Fig. 3. Three charts from top to bottem are: sine wave result, cosine wave result, sin/cos wave shown using the same chart. 

RT Sin.png

Fig.2 RT Level Code

Waveform.png

Fig.3 Sin/Cos Wave Result

 

Anybody has the same problem ever or any input on what caused this?

 

Thanks!

 

Regards,

Doris

0 Kudos
Message 1 of 3
(3,493 Views)

Hi Doris,

 

Is this the extent of your code that's running on the target? If possible would you mind attaching your FPGA and RT VI? It might help if I can try and reproduce the issue. 

 

Also what type of target are you running this on? 

Daniel Parrott
Software Product Marketing - Data Management & LabVIEW
National Instruments
0 Kudos
Message 2 of 3
(3,435 Views)
Solution
Accepted by topic author DorisZhu

Hi,

 

Thanks for responding! I believe I have solved this problem. What happened is the execution duration for the rest of my RT level code is longer than the duration for FIFO to be filled, so the FPGA code that writes data to the FIFO waits for the RT code to be finished. FIFO data is not time-continuous because of this reason.

 

Regards,

Doris

Message 3 of 3
(3,390 Views)