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.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring data from FPGA and write them to a file

Hi everybody,

 

I am quite new to labview and appreciate your insights on the following questions:

 

I need to acquire analog data from NI 9205 and digital data from NI 9401, and then write them to a friendly file for further analysis in MATLAB and also recall them for my control program

After a little exploring here and getting some suggestions, I decided to use DMA FIFO. I've attached the screenshot of the FPGA file and the PC host file here.

1- Is this a correct way of reading and writing the file?

2- Is it correct to use the "write to measurement file" inside the timed loop?

3- I saw a post on this forum (see here )where the poster used a fancy method using consumer-producer structure. Is that necessary or I can get away without using queue functions? By the way, I need to recall these data in the main VI where I need them for controlling purpose. (Position control)

So, I do not know how to recall these data.

4- Are the chosen values for "Depth" and "Timeout(ms)" fine? 24000 and 0 respectively.

 

 

Thanks,

Overwhelmed Morris

 

P.S: I am using LabVIEW 8.6.

Download All
0 Kudos
Message 1 of 6
(8,521 Views)

I am attaching the codes as well.

 

By the way, how should I decide about the number of elements(points) to read) and the FPGA period?

 

Thanks,

Morris

Download All
0 Kudos
Message 2 of 6
(8,519 Views)

Hi Moris,

 

Check out the Logging Data to Disk tutorial in the Getting Started with CompactRIO series.

 

The FPGA section walks through creating a simple logging application from scratch.

 

 

Message 3 of 6
(8,493 Views)

Hello 😃

So ima LabView noobie i got to this forum originally from the first one you started...

Hopefully im in the right place...

I went ahead and linked my design im working with and ultimately want to save and store data to:

1. an onboard memory device (there is a onboard SD im thinking would work)

2. being able to upload from the FPGA deice to a server (for testing purposes this server will be on the home network)

3. being able to access the FPGA saved files at any time from the server.

 

Like i said im a noobie and and been searching religiously for some direction...

Dont get me wrong im not looking for hand outs,  just need to be pointed in the right direction... 😃

 

i followed the link you posted on how to "create a simple logging application from scratch" but noticing the date on this thread... i think it might be a little out of date =(

 

The RIO board im working with is a sbRIO9636 and while trying to follow the steps on the tutorial... there is a large unexplained gap between step 2 and step 3: Select the Appropriate Programming Model... they want me to use a Scan Interface but im not seeing the pop up window it is showing in the tutorial nor does it explain how to manually set it =((

 

Any and all insight is welcomed, for any knowage to me right now is a step forward in the right direction...

 

Also i do not mind elaborating on my circuit if needed... just didnt want to flood this thread with a bunch of nonsence if there is a better place to be asking =P

0 Kudos
Message 4 of 6
(7,372 Views)

I am a new user to Labview and I have a question about acquiring data in FPGA mode. I have a compact CRIO 9024, 2 ni 9237 and one 9401 all configured according to the attachements. I tried a lot to take a reading using FPGA interface but I could not. I guess I do not program correctly. I just want to take very simple reading to make sure my sensor are working. As it is seen the indicator shows a zero value for every sensor I checked as if it is not working. I did not use any loop or something. This is a very simple thing. I would be grateful if somebody let me know how to write a very simple program to take my reading. I am sorry if my question looks very wierd to you in advance.

0 Kudos
Message 5 of 6
(7,111 Views)

First of all, you should have started a new thread.

 

1) You need to use a loop so that you constantly read the line.  Also be sure to put a wait in the loop to time how often you take the sample.

2) You are trying to interface with a cRIO.  When dealing with the cRIO, your FPGA has to communicate with your RealTime OS.  There should be a cRIO project template in there for you to play with.


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
Message 6 of 6
(7,106 Views)