Sign in to follow this  
Followers 0
pat.stave

[PLC Sample Code] - Lowpass filter function block

1 post in this topic

File Name: Lowpass filter function block File Submitter: pat.stave File Submitted: 21 Nov 2013 File Category: PLC Sample Code Lowpass filter for Omron PLCs. Only tested on CJ-series CPU. Use at own risk! Many thanks to Peter Nachtwey @ PLCS.net for providing the mathematical formula. Unfiltered = raw unfiltered value in INT. TC = Time constant tau, given in seconds. Filtered = Filtered value in INT. FilteredReal = Filtered value in REAL. - The FB can be duplicated. - The FB can only be used in program parts that are scanned every CPU cycle, as it relies on the "P_Scan_Time_Value" variable. According to the working principles of a lowpass filter, it will take the filtered value tau amount of seconds to reach 63% of the unfiltered value. The value will reach within 1% of the unfiltered value in approx 5x tau. Click here to download this file
1 person likes this

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