LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save data from an analog input to a file using the NI 9230 FPGA module

Greetings,

I am extremely new to Labview so apologies for any misconceptions I have. 

I am currently working on a project which requires me to collect acceleration data using an accelerometer. I am feeding this data through the NI 9230 module. Given it is an FPGA module I have to program it to manipulate the data so I can save it. However since the NI 9230 Module requires start/stop to collect a sample, I cannot use acquisition methods such as the many tutorials I have found on the internet. Image1 actually displays the data in the form of a numerical value that changes over time.

If someone could help me program the FPGA to write the data to a file and to modify the sample frequency so that I can collect a sample every nth second, that would be much appreciated.

 

 

Thank you

 

0 Kudos
Message 1 of 4
(2,620 Views)

Welcome!

 

Can you please share some more info on your hardware, i.e. what the 9230 is plugged into (90xx). Maybe there's an easier way to do this.

 

If it is indeed in a cRIO 903x and lower, note that the FPGA does not write to file directly. You'd have to pass it to the real time controller, where you'd be able to write to file, e.g. with "Write delimited Spreadsheet.vi". I assume, that's what the FIFO is for. I also assume that you see some data right now, which is the interactive front panel communication and you should not use that in the finished program.

 

If you can give some more info on your setup, you'll surely find help here.



Remember Cunningham's Law
0 Kudos
Message 2 of 4
(2,587 Views)

Thank you for the quick response

 

The chassis system is an NI cRIO-9066. I attached some images of the chassis and the module.

 

Download All
0 Kudos
Message 3 of 4
(2,572 Views)

OK, thanks for the info. The reason I was asking is that newer cRIOs can do high speed acquisition on the RT System, so you wouldn't have needed to use the FPGA.

 

For your cRIO, you have to go one extra step. Basically, you need to receive the data from the FIFO in a VI on the Real Time System. I am assuming that you are already writing into the FIFO for that reason. In this video they seem to explain how to do just that: https://www.youtube.com/watch?v=KBIbQmCZuQ4

 

FPGA is designed to do very low level tasks, e.g. switching digital outputs or acquiring and processing data at a high speed. As a result, there's not much on there for high level stuff like file I/O, so that has to be done on the RT. Once you have the data in your RT VI as described above, you can save it to file, however you want. "Write delimited Spread sheet.vi" is probably the quickest way to get your data to disk.

Please remember that the data will be stored on the RT systems disk. If you need it on windows, you can get it through the web interface, FTP it or build another data transfer from RT --> Windows and do the saving there instead of on the RT.



Remember Cunningham's Law
0 Kudos
Message 4 of 4
(2,564 Views)