LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Transfer between FPGA and RT using FIFOs

Solved!
Go to solution

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.

Download All
0 Kudos
Message 1 of 5
(2,790 Views)

Hi Jose,

 

LabVIEW comes with ready-to-use example projects.

Why don't you open such an example project, explaining data transfer between FPGA and RT?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,784 Views)

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):

cbutcher_0-1594131369858.png

 


GCentral
0 Kudos
Message 3 of 5
(2,755 Views)
Solution
Accepted by topic author JoseFelgueiras

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.

Download All
0 Kudos
Message 4 of 5
(2,704 Views)

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...


GCentral
0 Kudos
Message 5 of 5
(2,700 Views)