Sign in to follow this  
Followers 0
cmoyer

analog smoothing

6 posts in this topic

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
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
You could also use a PID function for that. Tune to your hearts content!

Share this post


Link to post
Share on other sites
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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0