LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA unexpected values

Solved!
Go to solution

Hello,

 

I just started to use LabVIEW FPGA and have some problems with signal acquisition. I've set up a test project where I try to output a signal using an NI-9263 and read back the signal using an NI-9215. In addition I measure a sine signal created by a signal generator. During the measurement I get unexpected values (see attatchment). I think I get in trouble with the FIFO storage. What's my failure?

 

Regards

Daniel

Download All
0 Kudos
Message 1 of 3
(3,256 Views)
Solution
Accepted by topic author kwakz

My first guess is that you're running into a situation where every once in a while, the number of elements to read from the FIFO is not a multiple of the number of outputs from Decimate 1D Array. When that happens, you'll lose some data and the first element of the next FIFO Read won't correspond to the first channel, so you'll get incorrect values on the chart. Try changing your code so that when you do the FIFO Read, it only reads multiples of the Decimate 1D Array size, keeping in mind that that number should also be less than or equal to the number of elements available to read in the FIFO (as you're already doing).

 

EDIT: also, you should make sure that the FIFO Write never times out; right now you're ignoring that value. Chances are it won't time out here, but if it does, that could also cause problems because you might write only some of the channels before it fills, which again would shift the channels.

Message 2 of 3
(3,193 Views)

Hi,

 

that seems to be the solution. Maybe NI should modify their example VIs keeping this issue in mind.

 

Regards

Daniel

0 Kudos
Message 3 of 3
(3,145 Views)