You are going to create a measure for the Boiler Temperature under the “Steam” folder in your Flow Model. But before we can create the measure, we first need to create a Metric inside the “Steam” folder.
Drag the Metric icon from the Flow Zone onto the “Steam” folder …
By default the new Metric will take on the name of its parent folder. You should see the white disk appear on the Metric and recursively up the model tree. Like in the deployment view, this white disk indicates that there are undeployed objects in that branch.
Locate the 010-TT-001.PV Boiler Temperature tag from the Historian, drag it across to the Model View and drop it onto the “Steam” folder.
Notice what has happened …
When you dropped the tag onto the metric, Flow created a measure for you. Notice how the icon describes a few of the measures properties:
Deploy the Measure
The measure has been created, but it is not “Deployed” (i.e. it is not running). To get it to run, you need to “Deploy” it. Right-click on it and click “Deploy”.
The Engine you deployed earlier will now start processing this measure. The Engine will go and collect summary information from the Historian for every hour back to the Backfill date and time, catch up to “now”, and then continue to process every hour from now on.
If you select the “Deployment” view tab, you will notice the new Metric is allocated to the Engine for processing. If more than one engine was configured in a distributed architecture, you could deploy your metric to any of those engines.
Let’s have a look at what is happening behind the scenes. Double-click on the new measure to open its Editor …
The top section of the Measure Editor displays a few general properties for the Measure:
- Description – Measure description (in this case, the description was pulled through from the Historian tag’s description)
- Format – report format used to display the summary values (in this case, 1 decimal place)
- Unit – unit of measure (in this case, the unit of measure was pulled through from the Historian tag’s engineering unit. This is why we didn’t need to set the Default Unit of Measure.)
- Backfill – the date and time used by the Engine to go back in history and retrieve the summary information from the Historian
By default, the Context section will show a chart of the summarized information relating to the measure. In this case, the chart is displaying the last 12 hours of average Boiler Temperature in ˚C for each hour. The vertical cursor line represents the following states:
- Green - the measure is running. The cursor represents the last successful processing time.
- Red - the measure is running, but has been "Backfilled". The cursor will turn Green as soon as the Engine accepts the Backfill date.
- Black - the measure is not running (i.e. it has been undeployed).
The same information can be displayed in a grid. Select the Grid tab …
Notice the information provided in the grid:
- Period Start – the start of the time period (in this case the start of the reporting hour).
- Period End – the end of the time period.
- Value – the formatted summary value retrieved from the Historian.
- Quality – the OPC Quality of the data used to produce the summary value.
- Duration – the duration of the time period in milliseconds.
- Preferred – indicates whether this version of the value for the time period is used for reporting.
- Version – the version of the value for this time period (can be changed manually via Flow Client).
- Captured – date and time when the value was actually retrieved / calculated / edited.
- User – indicates who made changes to the value via the Flow Client.
Select the Properties tab …
The “Context” section contains configuration relating to what context the measure’s values are summarized against. In this case, you will notice the “Production” calendar has already been added to this measure’s context. Being an hourly measure, the Engine will process it against the “Production” calendar’s definition for hourly time periods. In this case, the “Production” calendar’s hourly time periods are standard hours (e.g. 06:00 to 07:00), but you could have set the calendar up for hours to start at 15 minutes past the hour (e.g. 06:15 to 07:15).
Notice that a default “Refresh Offset” of 60 seconds has been configured for this calendar context. This means that Flow will only attempt to get the current hour’s summary information, from the Historian, 60 seconds after the hour is completed. More than one “Refresh Offset” can be configured if required.
Expand the “Retrieval” section. Notice that this section contains information about the tag you dragged across from the Historian Namespace.
- Tag – the “Historian” tag for which summary data is retrieved (this was populated during the drag n’ drop action, but can be edited if required, another tag can also be dragged over this textbox).
- Aggregation – this determines how the detailed data (i.e. high-resolution data) should be summarized into an hourly value for reporting purposes. By default, Flow uses the average aggregation method.
- Scaling Factor – this is a factor that the resultant summarized value is multiplied by in the case where scaling is required (e.g. simple unit of measure scaling).
- Filter Tag – when retrieving data from the Historian, Flow can use the value of another tag (or the same tag) to filter out unwanted detailed data. This is discussed in detail in a later section.
This section displays any other objects in your Flow System that depend on this measure. Examples include:
- Other measures that may use this measure in calculations or aggregations
This section displays a change log for this specific measure, from creation to deployment. Any changes that are made to the measure’s configuration will be logged here.
To confirm the Change Log functionality, rename the “Steam” measure in the Model View to “Steam Temperature”. Refresh the Change Log and notice the new log relating to the rename action.