chart speed labview FPGA reading signal

495 views Asked by At

Im reading a sine wave from a wave generator with a Labview FPGA code, when the frequency is around 1Hz, this is what I read (as expected) enter image description here

However when I increase the frequency, this happens.

enter image description here

I see that the ticking speed does not change, so I think it would be solved if it accelerated just as much as I needed to match my sine wave. Also, I passed the data through a FIFO and to a .txt file that I then plotted and I cant see the sine wave either, so its not only a problem of the chart display.

How can I control this?

PS. I checked my hardware and it supports 50 MS/s, so it should not be a problem to nicely read a 10 Hz sine wave. In particular, Im using the NI 5751 ADC, FPGA 7951R, PXI 1071 chassis.

This is the code enter image description here

1

There are 1 answers

1
Steve On BEST ANSWER

You are seeing Aliasing of the data being presented in your waveform.

In this case it is due to a significant under-sample rate of the data that is being passed up to your waveform. As @Kerghan mentioned, the primary issue here appears to be that your data rate for grabbing is not correctly related for the data sampling you are trying to see. I would suggest that if you are trying to see a 10 Hz waveform you should be using a minimum display rate of 20 Hz ( 50000 uS ).

As an aside, you have fallen into a traditional LabVIEW trap for developers coming from text based languages. I would recommend that you remove the Flat Sequence Structure from the code, as this is enforcing the following logic:

  • Wait X uS of time
  • THEN read data from the AI If the time taken to read the data and write to the DMA is non-zero, your timing will be off by just the slightest amount and it will be very hard to tell why.