![]() |
|
|
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.
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!
Please leave feedback if you have any comments or suggestions!