11-12-2015 11:25 AM
Hello,
I have a big problem when generating a sinusoidal signal. I am using FPGA core with one Express VI to generate sine wave and set frequency is not the same output when I measure with an oscilloscope. For example, to 100Hz is output 119Hz; to 1000Hz is output 1200Hz and to 5000Hz is output 5800Hz.
Please I need some help as soon as possible for my graduate work.
Solved! Go to Solution.
11-12-2015 02:09 PM
zip and post your project. we cant help with just the description you provided. if you can produce a minimal project that demonstrates the problem, that is even better.
11-14-2015 07:19 PM
Hi,
See the attachment. Could you help me how i can use simulated target, because compile is too long time; when I change to the simulated also gives me an error.
11-15-2015 09:31 AM
the input to the sine generator takes a +32,0. your code was not providing the full 32 bits and the result was course frequency steps.
i have attached an updated version. this one should work much better. as i noted in the VI, I don't typically put the calculation of the generation increment in the FPGA code. this calculation is typically done in floating point in the RT code. but if you need it in FPGA, then, this is one way to do it.
11-19-2015 10:21 AM
Hello
I tested it with your changes and got a satisfactory result, but now I'm having a problem signal amplitude. If I put the output sine generator of direct in the analog output, the signal is distorted, almost square. The frequency is good, but the signal is distorted. I tried to find a sine generator amplitude relation with the level of analog output of Myrio and could not. Can you help me? I also noticed that the signal is very serrated and increasing the number of points also distorts the signal.
11-19-2015 10:40 AM
are you saying that the Teste Senoide.vi is doing that? it should have produced a full amplitude wave. (i did just notice that the stop condition was not correct)
11-19-2015 10:55 AM
The stop condition "Stop if true" works fine. Why do you sugest change to "Continue if true"?
11-19-2015 12:21 PM
probably my mistake. maybe i changed it inadvertantly here.