Posted 21 Mar 2008 I am trying to do a simple moving average type smoothing of a 0-10VDC analog input on a DL05 (DirectSOFT 5 for programming). Is there an ibox that can accomplish this or do I have to do it the hard way? Thanks! cmoyer Share this post Link to post Share on other sites
Posted 22 Mar 2008 There is a FILTER IBox but that may not be what you want. A simple moving average would keep X readings and average them, addin in the newes and throwing out the oldest as data comes in. If you want this you'll have to 'roll your own'. The DL05 has the power, it's just that you'll have to think a little. A filter - especially with an IBox, while a little easier to implement, tends to weight newer data more heavily than older date. If that sound ok then try the filter. Share this post Link to post Share on other sites
Posted 24 Mar 2008 You could also use a PID function for that. Tune to your hearts content! Share this post Link to post Share on other sites
Posted 22 Sep 2008 Use a PID function to get a moving average? Wouldn't that be a little weird? I would just program an average function, , that wouldn't be too much work I suppose... Share this post Link to post Share on other sites
Posted 23 Sep 2008 Some analog devices have on board averaging for the output, might be worth checking into. Share this post Link to post Share on other sites
Posted 5 Mar 2009 I have recently done this "the hard way". I just used a counter (1-5) and 5 registers. I used the counter to sequence a write function through the 5 registers and ran an average of the 5. But my real interest is in the use of the PID the Schop suggested. How would that work? Share this post Link to post Share on other sites