Skip navigation

Community

Currently Being Moderated

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

VERSION 3  Click to view document history
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

 

Attachments:
Comments (4)

Bookmarked By (0)

More Like This

  • Retrieving data ...