LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA FIFO release (reset and stop)

Solved!
Go to solution

I have a question regarding FIFO release.  In the VI I'm using for data collection through DMA FIFO, before the collection while loop, i use FPGA reset and after collection while loop, I use FIFO.stop.  I attached the picture.  However what I find is that the last big of data I collected and wrote to a text file of one run, shows up in the second run, after I stop vi (by stop boolean button in the vi), and then start vi again.  Seems the data stayed in some part of FIFO and was not emptied by either RESET or FIFO.STOP function.  Is there something I did wrong?  Are there some FPGA setting or vi setting I'm not aware of?

 

Thank you very much!  

0 Kudos
Message 1 of 5
(3,808 Views)

I'm not sure but it seems that you start the FPGA main VI by opening the FPGA reference.

So maybe your FPGA app writes to the FIFO before your config steps are called.

 

Uncheck the run option (Config Open FPGA Ref) and try to use the explicit FPGA start method after your FIFO setup.

 

Hope it helps

Christian

Message 2 of 5
(3,798 Views)

Thank you for the reply.  I'm afraid I don't quite understand.  I empty all the FIFO at the end of the VI run.  When I start a new VI, the FIFO dedicated to store data from Analog input channel should be already empty.  The problem I encounter now is as follows:  After I collect a 400Hz sine wave, for example, I stop vi.  Then I tune the wave function generator to 100Hz and then start vi for data collection again.  In my data for 100Hz sine wave, I see just a little bit 400Hz sine wave data too.  I can't think of other reasons but the 400Hz data left in FIFO and was read out by Host vi when it started for the second run.  Thank you very much.

 

 

0 Kudos
Message 3 of 5
(3,790 Views)

Now I tried to not run vi (I unticked run FPGA vi on reference) and then used explicit run function after FIFO stop and FPGA reset as shown in the picture attached.  However, it still doesn't solve the problem.  I still have data in the first run stored in the FIFO or it gets read from somewhere during my second run.  

0 Kudos
Message 4 of 5
(3,786 Views)
Solution
Accepted by topic author soljiang

OOPS. I solved the problem.  It has nothing to do with the FIFO.  I need to empty the array at the end of the run so that it doesn't get read and written into the file I use for data logging.  Thank you very much all the same.  

0 Kudos
Message 5 of 5
(3,782 Views)