Applies to: history

History Service

The History service is used to fetch tag data from a process histortian. i.e. MOPS Historian. The history service allow fetching with aggregated value using differenbt agrregation types.

Properties

Property Name Description
Name Identity of the component
Mode Able to retain multiple tags or just the latest

Actions

Fetch Tag

Name Description
Tag Name Identifier to tag in the historian db
From Date From date for period of data to fetch
To Date To date for period of data to fetch
Resolution Aggregation period
Interpolation method The interpolation of the dataset
Aggregate type Options if interpolation method is set to aggregate
Number of values Maximum amount of values to fetch
Status Filter the result by status
Align Which period edge to align the timestamps to
Edges Which edges to include in the interpolation
Extend Whether to extend interpolated periods into the past or future if no data
Bounds Include one extra value on either side of starttime/endtime
Elements Only fetch the elements(s) specified (only for profiles)

Interpolation method

Name Description
None No interpolation
Aggregate Process the data as aggregates according to the Aggregate table below
Exacttime Interval RAW points are only returned if the timestamp is EXACTLY on the interval
Extcenter Interval values are calculated as averages. Missing periods are extrapolated from the average value forward.
Extleft Interval values are calculated as averages. Missing periods are extrapolated from the last value backwards
Extright Interval values are calculated as averages. Missing periods are extrapolated from the last value forward.
Interpolated Interval points are interpolated from the two bounding points. Interpolation is either linear or flat depending on Pointtype
Weighted Default. Data rows are calculated based on weighted averages for each period. The weighted average is calculated according to whether the Pointtype is STEP or ANALOG. Missing intervals are interpolated depending on the Pointtype.

Aggregate type

If Interpolation method is set to Aggregate this parameter is used. Some aggregate types are mutually exclusive (meaning that not all aggregate types can be combined). The aggregate types are grouped in order how to be combined and the type of value they return E.g. aggregatetype = average, count. Within the interval starttime-endtime an average and the number of values is calculated. The result is shown in the application from which you have made the request. The aggregate works within the sample interval, starttime to endtime. The sample interval could be divided into resample intervals if resolution is set. Eg Starttime=2004-08-01 06:00, Endtime=2004-08-02 06:00, Resolution=1h. The sample interval is 1 day and the resample interval is 1 hour, there are 24 resample intervals. (If resolution is not set the resample interval is 1 day.)

Group Name Description
None
Other Aggregate types in the group Other could be combined with all other aggregate types.
Count Retrieve the number of RAW values over the resample interval.
Interval Return the resample Interval length
Raw Data Aggregate types in the group Raw data could be combined within the group and with aggregate types in the group Other
Delta Retrieve the difference between the FIRST and LAST RAW value in the resample interval
First Retrieve the first (earliest) RAW value in the resample interval.
Last Retrieve the last (latest) RAW value in the resample interval.
Maximum Retrieve the maximum weighted value over the resample interval.
Minimum Retrieve the minimum weighted value over the resample interval.
Pointaverage Retrieve the average data over the resample interval. The average is a simple SUM/Numpoints for RAW data.
Pointmaximum Retrieve the maximum RAW value in the resample interval.
Pointminimum Retrieve the minimum RAW value in the resample interval.
Pointtotal SUM of all RAW points in the resample interval.
Range Retrieve the difference between the minimum and maximum RAW value over the sample interval.
Regconst Retrieve the intercept of the regression line over the resample interval of the RAW data. This is the value of the regression line at the start of the interval.
Regdev Retrieve the standard deviation of the regression line of the RAW data over the resample interval.
Regslope Retrieve the slope of the regression line over the resample interval of the RAW data
Stdev Retrieve the standard deviation of the RAW values over the resample interval.
Totalx2 Retrieve the total of the RAW value **2
Variance Retrieve the variance of the RAW data over the sample interval.
Pseudoaggregate Aggregate types in the group Pseudoaggregate could be combined within the group and with aggregate types in the group Other.
Average This is a ‘Pseudo’ Aggregate. This will translate into the correct ?AVERAGE depending on the tags Pointtype. ANALOG=TIMEAVERAGE STEP=STEPTIMEAVERAGE DISCRETE=POINTAVERAGE
Total This is a ‘Pseudo’ Aggregate. This will translate into the correct ?TOTAL depending on the tags Pointtype. ANALOG=TIMETOTAL STEP=STEPTIMETOTAL DISCRETE=POINTTOTAL
Step Aggregate types in the group Step could be combined within the group and with aggregate types in the group Other.
Steptimeaverage Retrieve the time weighted average data over the resample interval. The value is calculated assuming continuously STEP analog/digital values.
Steptimetotal Retrieve the totalized value (time integral) of the data over the resample interval. The integral is calculated assuming STEP varying analog/digital values. Integral time unit is per Hour.
Time Aggregate types in the group Time could be combined within the group and with aggregate types in the group Other.
Timeaverage Retrieve the time weighted average data over the resample interval. The average is calculated assuming continuously varying analog values.
Timetotal Retrieve the totalized value (time integral) of the data over the resample interval. The integral is calculated assuming continuously varying analog values. Integral time unit is per Hour.
Interpolative Aggregate types in the group Interpolative could NOT be combined with any other aggregate type except aggregate types in the group Other
End Interpolate the value at the end of the resample interval. The interpolation is done depending on the tags Pointtype
Start Interpolate the value at the beginning of the resample interval. The interpolation is done depending on the tags Pointtype
Actualtime Aggregate types in the group Actualtime could NOT be combined with any other aggregate type except aggregate types in the group Other
Maximumactualtime Retrieve the maximum RAW value in the resample interval and the timestamp of the maximum value if requested alone.
Minimumactualtime Retrieve the minimum RAW value in the resample interval and the timestamp of the minimum value if requested alone.

Events

Name Description Event Information
Fetched Data Loaded {“tagName”:""}

Output Data

Name Description
value The value of the input field in the text field

Value Data

Name Description
source The source of the tag
name Name of the tag
description The description of the tag
egu Engineering unit
datatype Historian data type
group Historian data group
trended TRue if tag is trended
attributes The attributs of the tag
data Data points of the tag
topic The topic used for Eventbroker