07-07-2020 05:57 AM
Greetings,
I am trying to learn how to make my cRIO's RT receive data from the FPGA through a FIFO.
I know how share data between VI's via read/write controls, but I've been advised to use FIFO, since I'm developing an application for data acquisition and logging.
In my project (see image files), I've configured a FIFO and created an FPGA VI that writes some numbers generated for testing purposes only.
Currently I haven't managed to understand how to make the RT have access to the FIFO's data. When I try to deploy the RT code shown in the images, I get error messages.
Solved! Go to Solution.
07-07-2020 06:28 AM
07-07-2020 09:14 AM - edited 07-07-2020 09:16 AM
I suspect you need to actually start and run the FPGA VI within the RT VI.
Something using the following VIs: Open FPGA VI Reference and Invoke Method (e.g. Run).
As Gerd said, there are existing examples that will show this (this is taken from the "Streaming Data (FIFO)" example found via searching for "dma fifo" in the Example Finder):
07-08-2020 03:32 AM
So, I tried some different things and it turned out I had to change my FIFO from "Target-scoped" to "Target-to-Host DMA".
This gave access to additional options when adding "Invoke Method" block to the RT's VI.
I then made the RT VI read the dummy data stored in the FIFO and sequentially saving it into a flash drive.
I will look into optimizing this when I start developing for my application proper.
07-08-2020 04:00 AM
Yes, that looks much better (especially the RT picture)!
Sorry for not being clearer - I didn't see that the FIFO wasn't a DMA FIFO (although hopefully the search term I gave hinted in that direction).
The png files you attached don't display a difference for Target Scoped vs DMA (at least, that I could notice) and although your RT picture seemed strange, I thought maybe it was a different (valid) way to access a FIFO. In particular, I didn't imagine a Target Scoped FIFO would be possible to drag onto a RT block diagram...