Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save data to text file from Spartan 3e

Solved!
Go to solution

Hi All,

kindly I'd like to save data array to text file or a spreadsheet on vi employing spartan 3e fpga as an fpga target. once I added any function related to file operation, it given back error that these functions are not supported by the target device.

could you please help me with this

thanks

Rania

0 Kudos
Message 1 of 4
(5,639 Views)
Solution
Accepted by Rania_Mekky

Hi Rania,

 

Thank you for posting. Are you using LabVIEW for this? If so, what version of LabVIEW FPGA are you using? Are you using a Host VI, or just deploying code to your target to run? The File I/O VI's probably won't compile to the target because they aren't meant to be used on your host computer. The resources and file paths don't exist on the FPGA targer, but rather on the host side. I've included a link below that describes how to transfer data between the FPGA and the host. I hope this helps!

 

http://zone.ni.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/pfi_data_transfer/

Robert B
RF Product Support Engineer
National Instruments
Message 2 of 4
(5,607 Views)

Hi Robert,

Thanks very much for your reply. This is correct. I had no host vi.

Now, I made host vi for the FPGA vi.

Kindly I'd like to acquire data through the FPGA. Unfortunately, Spartan 3e does not support DMA FIFO, so I put a target–scoped FIFO. I added a FIFO write and FIFO read as shown in the attached snapshot.

I tried to save the output FIFO element as shown in the host vi. It’s running but it’s giving back zeroes.

Could you please help me with that?

Thanks very much

Best regards,

Rania

 

Download All
0 Kudos
Message 3 of 4
(5,580 Views)

Rania,

 

For organization purposes, could you please create a new thread for this question? Since this thread has already been marked as solved, you will get much less community traffic on this thread. I suggest this only to make your forum experience more productive.

 

To help you in the mean time, it looks like the problem is with your Host VI. The way you have it set up currently, you'll read a single element (from your description, this value is 0), the for loop duplicates that single value 65000 times and builds it into an array, and then you write that to a spreadsheet after some binary to numeric conversion. In this case, you'll get an array of 65000 values that are all the same. I assume what you actually want is to pull all of the elements you acquire through the element variable. You might be able to do this, by simply looping over the Element Read node, then writing that data to file. You can continue troubleshooting this on the new thread. I hope this helps.

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,565 Views)