Ian_ Posted April 10, 2015 Report Posted April 10, 2015 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
kaare_t Posted May 8, 2015 Report Posted May 8, 2015 How often do you need it to executre? How about creating a FB in ST and then trigger it every cycle?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now