LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SineWave creation on FPGA level

I have a problem with my program, I took this VI from one of the examples that LabView has about generating a sinusoidal. I want to send that signal to the AO of the NI9262 module, however when you want to change the amplitude it does not change in the oscilloscope, the only thing that changes is the frequency and that does change well.
Another problem is that the signal in the oscilloscope comes cut off and with a VPP of ~24Vpp when the module is +-10V, even if I change the voltage in the example program to 2vpp in the oscilloscope remains at 24.4vpp without any change.
The FIFO is configured with data type U32, Target to Host DMA, with a requested number of elements of 100000.

Download All
0 Kudos
Message 1 of 2
(164 Views)

Hi Magma,

 


@MAGMA.21 wrote:
however when you want to change the amplitude it does not change in the oscilloscope, the only thing that changes is the frequency and that does change well.
Another problem is that the signal in the oscilloscope comes cut off and with a VPP of ~24Vpp when the module is +-10V, even if I change the voltage in the example program to 2vpp in the oscilloscope remains at 24.4vpp without any change.
The FIFO is configured with data type U32, Target to Host DMA, with a requested number of elements of 100000.

There are several coercion dots in your FPGA snippet, some (critical) red ones, some (user-defined) blue ones: are you sure your sine wave scaling (for amplitude/offset) does work correctly?

Per your description that part doesn't work and I guess the scaling is set to unreasonable ranges…

 

The most prominent problem is the coercion dot at the AO IO node: you need to make sure the calculated data is using the very same FXP datatype as expected by the AO channel!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(84 Views)