NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Passing, Converting, and Graphing Analog Data Through a U32 FPGA FIFO

VERSION 3

Created on: Apr 9, 2009 5:41 PM by Robbob - Last Modified:  Apr 13, 2009 8:55 AM by Robbob

Functional Description

In earlier versions of LabVIEW, the FPGA FIFO is fixed at a U32 Datatype.  LabVIEW 8.6.1 allows any type to be used, including Fixed Point.  When using the U32 FIFO, it can be confusing when your I16 AI data gets coerced to a U32 and then Read as a U32 on the Host, which requires some careful data conversions.  This example shows a way to pack I16 Analog Data into a U32 and then to Unpack and Continuously Graph the Data on a Chart that gives a Start Time and timestamps on the data.

 

This example was built for a PXI-7831R, but can be applied to many different FPGA targets.

 

 

Caveats and Additional Notes

The data is continuously passed through a shift register, if you run this code for a long time, the shift register will eventually overflow. If that is the case, seek out an alternate method for your data.

 

You can modify the chart history length by Right Clicking on the Chart.

 

Be sure to change the Period Constant to be representative of the rate you are reading on the FPGA. For this example, I was reading at 100Hz on my fpga, so I put a period of .01 seconds into my waveform properties.

 

FPGA Conversion.jpg

Host BD.jpg

Host FP.jpg

 

Downloads:
Average User Rating
(1 rating)




Robbob Robbob  says:

Please leave feedback if you have any comments or suggestions!

Hueter Hueter  says:

add the version numner into the file name

Robbob Robbob  says in response to Hueter:

Good call. Original files were for LV 8.6, but this example helps 8.5 users more. I'll convert the files and upload them later today!

soljiang soljiang  says in response to Robbob:

Thanks Robbob.  I do need the 8.5 version because I cannot open these file.  Looking forward to the new files.

 

Best,

soljiang

More Like This

  • Retrieving data ...