The purpose of this tutorial is to explain how to insert and use the STATISTICS_REAL functional block in a MasterTool X project.
Components
Equipment: 1 computer/laptop.
Software: MasterTool X
Tutorial Sections
- ARCHITECTURE
- DEVELOPMENT
1.ARCHITECTURE
A computer/laptop is required to use MasterTool X.
Figure 1. Computer running MasterTool X
2.DEVELOPMENT
The STATISTICS_REAL block is used to calculate basic statistical values of a variable over time, allowing analysis of signal behavior within the system.
It is very useful for monitoring and data analysis in industrial applications.
Prerequisite
The STATISTICS_REAL block is only available in the Util library.
Therefore, the library must be added to the project through the Library Manager.
Functionality
The STATISTICS_REAL block calculates statistical values based on the data received at the input over time.
Unlike STATISTICS_INT, the only difference is the data type analyzed, which in this case is REAL.
The block continuously performs calculations based on the values received at IN:
- Updates the minimum value (MN) when a lower value is found
- Updates the maximum value (MX) when a higher value is found
- Calculates the average (AVG) considering values over time
Inserting the block into the logic
The block does not appear directly in the toolbox, so it must be inserted manually:
- Create a new network
- Insert a generic box (EN/ENO)
- Inside the box, type:
STATISTICS_REAL
Figure 2. Adding the STATISTICS_REAL Functional Block
Input Parameters
IN (REAL)
- Input value to be analyzed
RESET (BOOL)
- Resets the statistical calculations when TRUE
Outputs
MN (REAL)
- Minimum recorded input value
MX (REAL)
- Maximum recorded input value
AVG (REAL)
- Average (arithmetic mean) of the input
Application example
Reference_Temperature :REAL; //IN
RESET_STATISTIC: BOOL; //RESET
Results:
- MN → lowest recorded temperature
- MX → highest recorded temperature
- AVG → average temperature over time
Figure 3. Parameterization of the STATISTICS_REAL block
Applications in automation
The STATISTICS_REAL block is used in:
- Monitoring of analog variables
- Process performance analysis
- Recording minimum and maximum values
- Calculating averages for supervision
- Integration with supervisory systems
Important notes
- Works with variables of type REAL
- Requires the Util library
- RESET clears the accumulated history
- Ideal for continuous signal analysis
In summary, the STATISTICS_REAL block allows performing real-time statistical analyses, being an important tool for monitoring, diagnosis, and process optimization in automation systems.
Figure 4. Operation of the STATISTICS_REAL block
Comments
0 comments
Please sign in to leave a comment.