Sign in to follow this  
Followers 0
Ian_

Low pass filter

2 posts in this topic

Hi, I am trying to implement a low pass filter in structured text using a Q series CPU. The algorithm is an exponential weighted mean: X(k) = (1/n+1)*X(k) + (n/n+1)*X(k-1) I need to execute this periodically so the calculation happens in equal time steps. I think an interrupt would be perfect for this application. Can someone give me an example of how to use one in ST please? Kind regards, Ian

Share this post


Link to post
Share on other sites
How often do you need it to executre? How about creating a FB in ST and then trigger it every cycle?

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