LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

export data from FPGA

Hi!

Now I am working on NI 9222 ,NI cRIO-9024 and I want to measure EMG signal.So I already program basic blockdiagram(see picture) ,And I stuck in the way to export the whole data that I measure .I aleary try to use Write To Spreadsheet File.vi but It does not work ,The excel file is not created .Please help me  find the solution 

blockdiagram.jpg

 

p.s. It's my first time to do thig like this.

0 Kudos
Message 1 of 8
(3,376 Views)

You will want to use a FIFO. As a minumum, you need to read all the LabVIEW documentation on FPGA programming. Ideally, you would also complete at least an introductory course to LabVIEW FPGA.

0 Kudos
Message 2 of 8
(3,352 Views)

Where did you try to save the file?  Did you supply a file path?

 

Did you give it a path that is on your PC?  This won't work since the cRIO is its own computer.  It can only save to locations that it has.  So if you create a shared folder on your computer, the cRIO will be able to write to that using the network path.  Very common mistake.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(3,344 Views)

I just want to export the data .I don't want make it more complicate. Just export the data that I measure from node

0 Kudos
Message 4 of 8
(3,343 Views)

You cannot use "Write To Spreadsheet" within the FPGA target.  Since you are using a cRIO, you have two obvious options (in my mind).  Both of them involve running a VI on the Real Time which will do the datalogging for you.  (For instance, your Untitled 2 and Untitled 3 are run on the RT and not the FPGA, so you could log data here -- I.E. to a flash drive).

 

To pass data from the FPGA to the RT VIs, you can use either the front panel objects of the FPGA, or a FIFO.  A nice summary/comparison can be found here: http://zone.ni.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/pfi_data_transfer/ but I will do my best to summarize these for you myself:

 

1. ReadWrite Control - This is a more crude way to do things, but works for more basic transfers.  You can Read/Write from Controls and Indicators on the FPGA frontpanel from a Host (your RT VIs for example).  Using this, you can read from your FPGA front panel whenever the data is calculated.  Then after reading it within the Host, log it to file.  Read more about it here: http://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgahost/readwrite_control/ and http://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgaconcepts/pfi_comm/

 

2. DMA FIFO - A FIFO is a Direct Memory Access (DMA) structure that allows you to write to it (sort of like a queue) and will transfer the memory contents to another FIFO buffer in the RT target.  Basically the FPGA will write to the FIFO, and the RT application will read from the FIFO and log to disk.  More informatin can be found here: http://zone.ni.com/reference/en-XX/help/371599G-01/lvfpgaconcepts/fpga_transfer_data/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
Message 5 of 8
(3,342 Views)

dear crossrulz
Thanks you so much for your suggestion ,I am very new for Labview and I just want to make a basic programjust for measure EMG signal,So I did not deep study in it.

0 Kudos
Message 6 of 8
(3,338 Views)

The main thing to remember is that the cRIO is an embedded standalone controller.

The program on it does not, and should not, have a front panel. If you want to communicate to a cRIO and get data from it, you need to develop a PC program also. 

 

Start by going through this:

http://www.ni.com/compactriodevguide/

 

Programming on cRIO is probably not the first thing a new user to LabVIEW should do. That just add extra to the learning curve.

0 Kudos
Message 7 of 8
(3,328 Views)

I'm using Crio 904x with labview 2018. I tried to write the spreadsheet to desktop and it was not writing. 

 Where should I adjust the file path to ? Please help

0 Kudos
Message 8 of 8
(2,440 Views)