|
<< Click to Display Table of Contents >> Manual > Server Creation Guide > Action Edition > Action Reference > Summary Actions (Logging/Counting/Daily Reports) > Explanation by Function > Historical data server Function > Connection from Historical data control |
Retrieving data from Historical data control
Summary actions can be integrated with Historical data control.

By using Historical data control, you can connect to a summary action from a Panel Browser script to obtain time series data. The obtained data can be received as an array, and you can process the obtained data, feed it into Grid control for viewing, or create your own calculation functions.
The following is an example of the code. The data from 8:00 to 17:00 on October 24, 2016 (the aggregate log of the average of T000 to T002) is retrieved.
event OnInitialize()
{
this.Connect();
this.AddField("A01.AVERAGE::T000");
this.AddField("A01.AVERAGE::T001");
this.AddField("A01.AVERAGE::T002");
var vCount, vDate, vValue;
this.ReadHistoricalData("2016/10/24 8:0:0", T, "2016/10/24 17:0:0", T, 200, vCount, vDate, vValue);
}
|
You can also obtain the results of calculations between multiple fields by specifying [cal] at the beginning of the field format as shown below. This calculation process is performed dynamically when a data retrieval request is made, so there is no need to define calculated fields, etc.
this.AddField("[cal] A01.AVERAGE::T001 + A01.AVERAGE::T002");
|
|
For more information about Historical data control, please refer to "Historical data control".
|