From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CompactRIO Data Logging to CSV file

Solved!
Go to solution

Greetings,

 

I am trying to learn how to make the FPGA in my cRIO-9040 store data to a csv. file located in a flash drive connected to the device. I already know how to store data to files, but haven't yet learned how to do so from the FPGA.

 

From what I understood from reading other threads, I have to create two separate VIs, one assigned to the FPGA for obtaining the data to be stored (e.g. from the module inputs), and a second one assigned to my cRIO outside the FPGA which writes the data to the file.

 

So my question is how do I make these two VIs share data. Do I have to use a FIFO, global variables, or something else entirely? Which blocks do I need to use in each VI in order to make this work? Is there a simpler or better method?

 

Thank you,

José

 

0 Kudos
Message 1 of 3
(2,126 Views)
Solution
Accepted by topic author JoseFelgueiras

In order to store the data on the cRIO, you'll need to (as you describe) use the RT/cRIO side to actually save the data. You can use standard VIs to do this, like Write to Text File or similar.

 

To get data from the FPGA to the RT 'Main VI', you can use a variety of methods depending on the data amount.

There's an NI tutorial here: Communication Between the FPGA, Real-Time Processor, and Distributed Systems (read the first section).

You can also get the links from the bottom row middle column of table 2 here: https://www.ni.com/en-gb/support/documentation/supplemental/16/understanding-communication-options-b...

 

In short though, if you have a lot of data, probably you'll want to use DMA FIFOs. I fairly strongly suspect this is your most appropriate choice.

For smaller volumes of data you might consider reading/writing the front panel controls or similar (using some sort of handshaking methods).

 

 


GCentral
Message 2 of 3
(2,108 Views)

Thank you very much.

 

I think I begin to understand what I have to do.

0 Kudos
Message 3 of 3
(2,087 Views)