02-20-2017 01:07 PM
I have an FPGA Target VI that collects some sensor data and writes the generated excitation to a FIFO for post processing on the Host VI. Frustratingly, none of the cases are set to write 0 values (decimals yes but the situation in which true 0 arises is extremely rare if not impossible), yet I check the recorded data in MATLAB and see 0's all over the place. I have the bit and word length long enough to support extremely small numbers and know I am not exceeding the upper or lower bound. Under what situations would the buffer write 0 values? I'm at a loss on debugging this issue and want to know if theres a more elegant solution other than just ignoring 0 values.
Thank you.
02-20-2017 01:54 PM - edited 02-20-2017 01:55 PM
Code? It's very hard to properly help otherwise.
02-20-2017 02:02 PM
Sorry; attached here.
02-20-2017 02:53 PM
I am guessing you are getting 0 for many of your Pertubation channel. You have a little bit of a race condition in the fact that you are checking the size of one FIFO and later checking another. And then there are more samples in the second FIFO. So when you combine the arrays, any "missing" samples from the first read will be filled in with 0. You will have the same issue with Sine Out.
Why have multiple FIFOs that you need for the same data set? Put all 3 channels into the same FIFO so that your data will always be in sync.