PLC Archive:Analog Input Smoothing
Analog Input Smoothing
contributed by: Simone Stefani
Link to File
This function provides smoothing of an analog input. The function calculates the smoothing value by adding S/16 of previous value with (16-S)/16 of actual value.
The formula used is:
Out = ([Smooth_factor]/16)[Prev_value]+((16-[Smooth_factor])/16)[Input_value]
S = smoothing factor X1 = initial value/previous output X2 = new input from I/O table
|If you want to...||then enter...|
|Prevent the smoothing||0|
|Provide minimal smoothing||1|
|Provide maximum smoothing||15|
For all material in the PLC Archive, our site disclaimer applies. You take full responsibility for the application of any code appearing on this site, as we have made no engineering evaluation of the code nor are we, or the author, familiar with the details and risks inherent in your application.