PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga waveform averaging

I have a NI 5761 going to a 7965R for my FPGA, ona chasis with a PXIe-8108 controller.  I am trying to figure out how to collect say 20 waveforms and average them. Would this be something I can do on the FPGA or should this be done on the host PC?   I tried on the FPGA by creating a subVI that uses a for loop (n=# averages) and shift registers to get a running average by incrimenting the iterations.  However there was a data type conflict error even though my input arrays were I16. 

 

So I am curious how something like this would be done on FPGA or if it should be done on the Host.

 

Thanks

Ryan

0 Kudos
Message 1 of 3
(4,779 Views)

You should be able to accomplish this on the FPGA. Can you post a snippet of your code?

0 Kudos
Message 2 of 3
(4,761 Views)

This is in the early stages.  For this portion of the project I am measure the voltage from a photodiode.  The AI2 is the PDP.txt file and the AI3 is the PDR.txt file data that will be seen (previous collected via scope).  The PDP data is the first peak of the PDR file and the PDP (AI2) is used to trigger my data collection and counting the number of sweeps to average.  The delay now is some arbritratry value and will have meaning  later when the rest of the system is put together.  The LED output is to simuate a digital signal that will be sent to trigger a laser.  

 

The part I am unsure to do is the average the waveforms that would be read by AI3.  I need to set up a time loop to time how long I would like to record for, otherwise this will keep recording and not reiterate my for loop.

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