Library for determining statistical distributions in a S7-1200/1500 PLC
As a rule, the raw data of the measured values read in by the periphery must be pre-processed in order to make statements regarding the quality. Standard functions here are statements on statistical distribution, various mean value calculations, smoothing functions, regressions, etc. In this article you will find suitable functions for the S7-1200 and S7-1500 on the PLC as well as visualization components for WinCC RT Professional.
To be able to process measured values from processes already in the S7-PLC, you receive a library for measured value processing.
The following blocks are contained:
Calculates the statistical information of the minimum, 25% quartile, median, 75% quartile and the maximum value of a series of measured values necessary for the representation of a boxplot. In addition, the block calculates outlier statistics and a measure for the skewness of a distribution. A .NET Control for WinCC Professional is available for this block.
Represents the frequency distribution of a series of measured values in the form of a histogram according to parameterizable classes. A .NET Control for WinCC Professional is available for this block.
Performs a smoothing of the measured values by calculating the linear mean value by three points.
Carries out a smoothing of the measured values by a 3rd degree compensating polynomial.
Carries out a numerical differentiation of the equidistantly sampled measured values. This function uses a 3rd degree polynomial to smooth noisy input signals.
Calculates a linear regression with the slope and the intersection point with the Y-axis as initial parameters from a measured value data set.
WinCC-Controls "Boxplot" and "Histogram"
The two WinCC controls "Boxplot" and "Histogram" are available for visualizing the information from the blocks "LMeasure_Boxplot" and "LMeasure_Histogram".
Application example for Boxplot and Histogram Components
In order to be able to make statements about the statistical distribution of measured values from a process, more complex calculations are necessary. Extensive evaluations are usually carried out on PCs with special statistics programs. The required raw data is transferred from the S7-PLC. If you want to display the evaluations with WinCC Runtime Professional, you can create your own .Net Controls with Visual Studio.
This application example shows you how to integrate the WinCC controls "Boxplot" and "Histogram" into your project and how to supply data using the blocks "LMeasure_Boxplot" and "LMeasure_Histogram". In order to draw a Boxplot or a Histogram the data must be prepared. This function is performed by the blocks "LMeasure_Boxplot" and "LMeasure_Histogram".
WinCC-Controls Boxplot and Histogram
WinCC .Net Controls (124,6 KB)
Library of General Functions (LGF) for STEP 7 (TIA Portal) and S7-1200 / S7-1500
Creation of .NET controls for WinCC Professional