06-04-2014 04:44 AM - edited 06-04-2014 04:48 AM
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
p.s. It's my first time to do thig like this.
06-04-2014 06:35 AM - edited 06-04-2014 06:36 AM
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.
06-04-2014 06:43 AM
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.
06-04-2014 06:46 AM
I just want to export the data .I don't want make it more complicate. Just export the data that I measure from node
06-04-2014 06:47 AM - edited 06-04-2014 06:47 AM
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/
06-04-2014 06:51 AM
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.
06-04-2014 07:06 AM
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.
05-14-2019 06:55 AM
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