(0)| 11/28/2023 10:16 AM | |
|
Joined: 9/23/2005 Last visit: 12/26/2025 Posts: 4434 Rating:
|
Hi As from TIA V19, it is possible to implement a new filter for analogical signals”with the Filter_Universal instruction. This filter is very versatile, and can be configured to work in several modes (High-pass filter, Low-pass filter, Bandpass filter, Bandstop filter) and with several algorithms (Bessel, Butterworth, Chebyshev Type I) TIPs: At this moment (V19), this block runs just in a S7-1500 as from FW 2.0 A general good explanation about the instruction is available in the Information System (Information System > Programming a PLC > Instructions > Instructions > Technology > PID Control > Filter_Universal > Operating principle Filter_Universal > Filter parameters), including graphics for better understanding. Due to the large number of parameters, these parameters are located in static variables (accessed from the block instance DB). An explanation about these parameters are available in the Information System (Information System > Programming a PLC > Instructions > Instructions > Technology > PID Control > Filter_Universal > Static tags Filter_Universal). Main parameters: Frequency: Cutoff frequency of low-pass and high-pass or center frequency of bandpass and bandstop in Hz Bandwidth: Bandwidth of bandpass and bandstop in Hz Filter type: 0 = Low-pass filter; 1 = High-pass filter; 2 = Bandpass filter; 3 = Bandstop filter; Filter characteristic: 0 = Bessel; 1 = Butterworth; 2 = Chebyshev with 0.5 dB ripple in the passband; Order: Filter order (at Order = 0, Output = Input) FinalValueMode: for setpoints or other signals that should converge to a determinate value with the time use Output with FinalValueMode = 1 CycleTime: should be set manually or automatically. It is assumed that the block runs in a cyclic interrupt OB CycleTime. Value: Cycle time in seconds (interval between two calls) Automatic detection of the cycle time; TRUE = Activated Take in account that the instruction must run at least 2x faster as the target operation frequency. So, it makes sense to use it from a time cyclic interrupt OB. Depending on the parameters this block can take some processing time. It should be used carefully with short OB cycle time: please see also the notes under Information System > Programming a PLC > Instructions > Instructions > Technology > PID Control > Filter_Universal > Operating principle Filter_Universal > Use in time-critical applications). For simple analogical value processing (like noise attenuation) take in consideration to use “lean alternatives” like PT1 instructions. In this sample project, the Filter_Universal instruction is used to extract the 3rd harmonic of a square signal of 1Hz. Sample project (archived from TIA Portal as .zap19 and after that compacted in .zip format to be uploaded here) AttachmentFilter_Universal.zip (339 Downloads) |
Last edited by: The Helping Hand at: 11/29/2023 09:05:40Text formatting optimized Denilson Pegaia |
|
This contribution was helpful to
|
|
Follow us on