Help - Search - Members - Calendar
Full Version: analog smoothing
Forums.MrPLC.com > PLCs and Supporting Devices > Automation Direct
cmoyer
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
b_carlton
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.
BC Steve
You could also use a PID function for that. Tune to your hearts content! thumbsupsmileyanim.gif

QUOTE(b_carlton @ Mar 21 2008, 06:57 PM) [snapback]66801[/snapback]

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.

Schop
QUOTE(BC Steve @ Mar 24 2008, 03:11 PM) [snapback]66861[/snapback]

You could also use a PID function for that. Tune to your hearts content! thumbsupsmileyanim.gif

QUOTE(b_carlton @ Mar 21 2008, 06:57 PM) [snapback]66801[/snapback]

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.



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...
Ken Moore
Some analog devices have on board averaging for the output, might be worth checking into.
jhughes
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?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.