<< Click to Display Table of Contents >> Manual > Monitoring system construction guide > Construction of main functions > Daily reports > Construction of daily report function > About Summary Master |
About Summary Master
The "Client Setting Guide" provides a "Client Connection Sample" as an example of connection settings from FA-Client. A summary action named "Summary" is already registered in this sample. The summary action reads settings from various master files when executed, and performs logging and aggregation processing according to the settings.
One of the most important master files for summary actions is “Summary Master.” This master file defines the basic settings for logging and aggregation processing.
(Summary Action Basic Settings)
The summary master for the "Summary" action is stored below.
(Project folder) \server\summary\master.txt
The summary master is a text file and can be freely edited using a text editor such as Notepad.
The sample summary master has predefined aggregation processes for raw data logging (RAW), daily report aggregation (DAY), monthly report aggregation (MONTH), and annual report aggregation (YEAR), so in most cases you can use it as is.
Summary Name |
process |
Contents |
RAW |
Raw Data Logging [RAW] |
Logging of raw data (RAW data). The value of the tag to be logged is saved as time-series data according to the field settings defined in the tag field master. The cycle of the log data depends on the settings of the Scheduled event that calls the summary action. For example, if it is called at a fixed time that repeats every second, a time-series log with a cycle of 1 second will be recorded (RAW data with a cycle of 1 second is 3,600 items per hour, 86,400 items per day). |
DAY |
Daily report compilation [RAW::DAY] |
Daily reports are compiled based on the time series data of RAW (SummaryUnit=1HOUR). Daily reports are compiled based on one hour's worth of time series data, and one item of data is compiled per hour, for a total of 24 items per day. This compilation process is performed automatically at the time when the hour changes. |
MONTH |
Monthly Report [DAY::MONTH] |
Monthly report aggregation is performed based on the daily report aggregation data of DAY (SummaryUnit=1DAY). Monthly report aggregation is performed based on the daily report aggregation data for one day, and aggregates it into one item of aggregation data per day, for a maximum of 31 items per month. This aggregation process is performed automatically when the day changes. |
YEAR |
Annual Report Compilation [MONTH::YEAR] |
Based on the monthly report summary data of MONTH, the annual report is further summarized (SummaryUnit=1MONTH). The annual report is compiled based on the monthly report summary data for one month, and one summary data for one year is compiled. This aggregation process is performed automatically when the month changes. |
The diagram below shows the flow of logging and aggregation processing for summary actions.
1.First, logging stores tag values as raw time series data (RAW).
2.Next, the daily report is compiled based on the time series log of RAW data (DAY). This compilation process is performed automatically every hour when the time changes.
3.Next, the monthly report is calculated based on the daily report data of DAY (MONTH). This calculation process is performed automatically when the day changes.
4.Finally, the annual report is compiled based on the monthly report data of MONTH (YEAR). This compilation process is performed automatically when the month changes.
The key point here is that while daily report aggregations are based on RAW data, monthly and yearly report aggregations are further calculated from the parent aggregation data for each aggregation target, from DAY to MONTH and MONTH to YEAR.
Details about Summary Master are described in "Summary Master" in the Action Reference. If you want to know the specifications of the various parameters defined in Summary Master or if you need to change the settings of Summary Master, please refer to the left. |
For details about the various configuration files for summary actions, see "Summary action configuration files and folder structure". |
Summary master definition example for client connection sample
The definition of the summary master consists of three sections: "Common property section", "Root log section, and "Aggregation log section".
Below is a brief explanation based on a sample client connection definition.
■ Common property section ([COMMON])
The common properties section ([COMMON]) sets properties common to summary actions.
For example, if you define "DaysOfHoldingData=3660", the log data retention period will be 3660 days, and any older log data will be automatically deleted.
;Common property section ([COMMON]) [COMMON] DaysOfHoldingData=3660
|
■ Root log section (e.g. [RAW])
The root log section ([Summary name]) defines how to save the root log (raw data). The root log is the most basic chronological historical data for creating aggregate logs. In the sample, it is defined with the summary name "RAW".
;Root log section ([RAW], etc.) [RAW] TagFieldMaster=..\..\server\summary\fieldmaster_tag.csv TagFieldIndex=DB\index_tag.txt CalculationFieldMaster=..\..\server\summary\fieldmaster_calculation.csv CalculationFieldIndex=DB\index_calculation.txt TimeRangeType=TYPE2 CsvFileName=DB\RAW\SMR_RAW_.csv CsvFileMaxFields=1000
|
■ Aggregation log section ([Parent summary name::Summary name])
The aggregation log section ([Parent summary name::Summary name]) defines how to save the aggregation log. The parent summary name is the summary name that will be the source data for the aggregation. Not only the root log but also the aggregation log can be specified as the parent summary name. By defining three aggregation log sections in this section - [RAW::DAY] as the daily report aggregation, [DAY::MONTH] as the monthly report aggregation, and [MONTH::YEAR] as the yearly report aggregation - aggregation of Daily/Monthly/Yearly Report will be performed. By defining it in this way, the daily report will be aggregated from RAW, the monthly report will be aggregated from DAY, and the yearly report will be aggregated from MONTH.
Also, for RAW::DAY, [SummaryType1] is specified for SummaryType and [SummaryParam1] is specified for SummaryParam, but for DAY::MONTH and MONTH::YEAR, [SummaryType2] is specified for SummaryType and [SummaryParam2] is specified for SummaryParam. By defining it like this, the aggregation method defined in the [SummaryType1] and [SummaryParam1] columns of the tag field master will be used when aggregating daily reports for the tag field, and the definitions in the [SummaryType2] and [SummaryParam2] columns of the tag field master will be used when aggregating monthly and annual reports. With this setting, for example if you want to calculate the total from logging data of ring counter values such as 0-999999, when compiling the daily report, you can use "ADDINGCOUNT" to find the total value for each hour from the raw data, and when compiling the monthly and yearly reports, you can use "TOTAL" to find the total based on the total value calculated in the daily report.
Similarly, [Expression] is specified for CalculationType of RAW::DAY, but [Expression] is specified for CalculationType of DAY::MONTH and MONTH::YEAR. With this setting, calculations are performed according to the [Expression] column of the calculation field master when processing the calculation field during daily report aggregation, and aggregations are performed according to the [SummaryType1] column of the calculation field master when aggregating monthly and annual reports.
Daily report summary ([RAW::DAY])
[RAW::DAY] SummaryUnit=1HOUR SummaryType=[SummaryType1] SummaryParam=[SummaryParam1] CalculationType=[Expression] TimeRangeType=TYPE2 DecimalNum=[DecimalNum1] CsvFileName=DB\DAY\SMR_DAY_.csv CsvFileUnit=DAY ReportLayoutMaster=..\..\server\summary\layoutmaster.xls ReportLayoutMasterSheet=DAY ReportOutputSheetName=Daily report_ ReportTitleHeader=Daily report_ ReportExcelCellFormatType=formatednum2 ReportTitleDateFormat=@[%H hour]
|
Monthly report summary ([DAY::MONTH])
[DAY::MONTH] SummaryUnit=1DAY SummaryType=[SummaryType2] SummaryParam=[SummaryParam2] CalculationType=[SummaryType1] DecimalNum=[DecimalNum1] CsvFileName=DB\MONTH\SMR_MONTH_.csv CsvFileUnit=MONTH ReportLayoutMaster=..\..\server\summary\layoutmaster.xls ReportLayoutMasterSheet=MONTH ReportOutputSheetName=Monthly report_ ReportTitleHeader=Monthly report_ ReportExcelCellFormatType=formatednum2 ReportTitleDateFormat=@[%m month %d day (%a)]
|
Annual report summary ([MONTH::YEAR])
[MONTH::YEAR] SummaryUnit=1MONTH SummaryType=[SummaryType2] SummaryParam=[SummaryParam2] CalculationType=[SummaryType1] DecimalNum=[DecimalNum1] CsvFileName=DB\YEAR\SMR_YEAR_.csv CsvFileUnit=YEAR ReportLayoutMaster=..\..\server\summary\layoutmaster.xls ReportLayoutMasterSheet=YEAR ReportOutputSheetName=Annual Report_ ReportTitleHeader=Annual Report_ ReportExcelCellFormatType=formatednum2 ReportTitleDateFormat=@[%#mmonth]
|