Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging on FPGA target

I dont need a moving average function, but a waveform average one. Lets say I've like 200 000 points. What I want is, to store them somewhere and then after some time or maybe when a trigger comes, the next 200 000 points will get add up on that storage. Do the same procedure for lets say 100 000 times and then send the data to the host to divide every point by this number, thus averaging them. 

0 Kudos
Message 11 of 13
(633 Views)

@David-A wrote:

You can find a bram based multi record average processing block in FIDL (FlexRIO Instrument Design Library). 

https://forums.ni.com/t5/NI-Labs-Toolkits/NI-FlexRIO-Development-Tools/ta-p/3517734

The example that you'll want to take a look at it is <LabVIEW>\examples\instr\FlexRIO\FlexRIO Building Blocks\573X\Simple\Getting Started With Configuration.lvproj. That project will have a target labeled 'Simple Processing Engine' that demonstrates how to use the processing block that uses bram to implement a multi record average. 

 

If you want to do DRAM based multi record averages, which you probably do since your records are thousands of samples long, there is an unpublished VIPM example that demonstrates this. I've attached the .vipm file that will allow you to install it via VIPM. 

 



I tried this example out with the DRAM from the ni ref design lib inter recorddata, but it did not work. I dont know why, but the subVI did not send any data to the fifo.

0 Kudos
Message 12 of 13
(633 Views)

Hello, would you tell us some more about which part of program does not seem to work?  What kind of debugging did you do?  The more you elaborate your situations, the better people can help you I guess.  

 

Sometimes, it would be nice to take screenshot of what's shown on your PC display.  That way, we can better follow your situations.  One image may sometimes worth more than 100 words.  

 

Regards,

0 Kudos
Message 13 of 13
(584 Views)