About This File
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.