10-07-2008 12:33 PM
I've searched through VIs, I can't seem to find anything that will automatically boxcar average numbers fed into it. I am trying to create a feature of my software that will allow dynamic configuration of boxcar averaging certain inputs. I would like to avoid hardcoding arrays that are filled/rotated etc etc. Any help is appreciated
Thanks
Solved! Go to Solution.
10-07-2008 12:47 PM
10-07-2008
06:09 PM
- last edited on
06-25-2024
10:13 AM
by
Content Cleaner
If you are using a Functional Global to store the values and call that VI in from two different VIs, you will be accessing the same data. You could use two shift registers in the Functional Global and use a selector to place / extract data to / from the appropriate shift register. Only one VI call access a common VI at a time, so one of the calling VIs will be 'blocked' until the first caller is done. This usually doesn't work well in high speed DAQ applications.
You could consider using named queues instead of the functional global. You might be interested in this thread on the LAVA forums that discusses Boxcar implimentations. You would create a queue for each data stream, and can perform functions like 'preview' queue to get all the elements without actually removing them from the queue. If you are using LabVIEW 8.6, there is a new feature called Lossy Queues. You set an upper limit to the size of the queue and use 'lossy enqueue' to add items to the end of the queue. If the queue fills, then the oldest data item will be lost.
08-28-2009 12:12 PM
After the LAVA site rebuild, the thread is now located at this URL:
http://lavag.org/topic/5002-boxcar-running-average-for-1d-array/