Runtime Analysis
The screen that opens when you select History > Runtime Analysis in the menu calculates the running and stop times of machines from history (log) records. The results are shown by day, week or month as an overview heatmap, a machine detail, a trend across machines and a table.
On this screen, each machine is a log definition. The machine name is the description of the log definition; if that is empty, the tag description is used, and if that is empty too, the device and tag name.
License
Run/stop analytics depends on the license. In the Standard and Professional packages, all three views (overview, machine detail and trend) are available; the Starter package does not include them (see License). In custom packages, the views can be licensed separately.
If the license includes none of these three views, the History > Runtime Analysis menu item is not shown to users.
- If the license does not include the overview, the screen shows the message Your current edition does not include run/stop analytics. and no query is run.
- If the machine detail is not licensed, the Machine Detail section says Machine drill-down is not available in this edition.
- If the trend is not licensed, the Run Hour Trend section says Trend comparison is not available in this edition.
How running and stopped states are determined
The calculation depends on the Run/Stop Data Basis setting in the log definition (see Log (Archive) Definitions). Log definitions whose Run/Stop Data Basis is None but whose log type is On Change are treated like Changed state bit.
| Run/Stop Data Basis | Calculation |
|---|---|
| Changed state bit | If the value is greater than 0, the machine is considered running; if it is 0, stopped. The state is considered valid until the next record. The state at the start of the range is taken from the last record before the range. |
| Sampled state bit | Each record is considered valid for the Interval in the log definition (or until the next record). Gaps between records longer than this time are counted as unknown time. |
| Cumulative run counter | The counter increase between two records (in hours, after the Factor / Divisor conversion) is the running time. The rest of the time in between is counted as stopped. |
| Cumulative stop counter | The counter increase between two records is the stop time. The rest of the time in between is counted as running. |
The following values are calculated for each period:
- Run Hour and Stop Hour.
- Unknown Hour: The time when the machine's state is not known. An unknown starting state, gaps between records and communication interruptions are added to this time.
- Run Ratio: The ratio of the run hours to the sum of the run, stop and unknown hours.
The part of the date range after the current time is not included; the current day is calculated up to now.
Communication interruptions
If an alarm is defined for the device's _ConnError system tag (see First Project), the periods when this alarm is active are counted as Unknown Hour; these periods do not mark the period as incomplete data. If no such alarm is defined, the No communication alarm configured column in the table shows Yes and communication interruptions cannot be told apart.
Incomplete data
A period is marked as Incomplete in the following cases:
- The period contains time with an unknown state (for example, if there is no record before the range and no record in the range, or if there is a gap between records in sampled logs),
- A value other than 0 and 1 was recorded in state bit logs,
- In counter logs, the counter decreased (Counter reset detected) or the increase between two records is greater than the elapsed time.
Periods with incomplete data are shown with a warning mark in the charts; the tooltip says Contains incomplete day data or Counter reset detected.
Tag and log selection
Tags are selected by opening a report from the report menu or with the Tag / Log Selection button on the toolbar. The report menu is the same as the report menu in Trend Analysis.
The Tag / Log Selection window has the Start date, End date, the Tags tree and the Logs list. Users with the Editor role can select tags from the process tree with the Tag Selection By Process Tree switch. The list shows only log definitions that are suitable for the run/stop calculation.
When the tag selection changes, a suitable log definition is selected automatically for each tag. If a tag has more than one suitable log definition, the order of priority is: Sampled state bit, Cumulative run counter or Cumulative stop counter; then Changed state bit; then a log with the On Change log type. You can change the selection in the list. For tags without a suitable log definition, the warning No suitable log of type On Change was found for {count} selected tag(s). appears.
Filters
The Filters section has the following fields:
- Date range: The predefined ranges and the Custom option are used as in Trend Analysis.
- Aggregation: Whether the results are aggregated Daily, Weekly or Monthly. Weeks start on Monday.
- Day Basis: Calendar Day or Shift Day.
- Shift Start: Visible only when Shift Day is selected; the default is 08:00. The time must be entered in
HH:MMformat; otherwise the warning Shift start time must be in 08:00 format. appears. - Hide Incomplete Days: Removes the periods marked as Incomplete from the results. With Weekly or Monthly aggregation, the whole week or month that contains an incomplete day is hidden.
Run the query with the Update button.
Shift day
When Shift Day is selected, the Shift Start time is taken as the day boundary. For example, if the start is 08:00, the shift day of October 15 runs from 08:00 on October 15 to 08:00 on October 16; a stop at 03:00 on October 16 is written to October 15.
If the start of the date range is 00:00, it is moved to the shift start time; if its end is 23:59:59, it is moved to just before the shift start of the next day. The information line below the filters is a reminder of this rule.
Result views
The header of the results section shows the name of the open report; if no report is open, the text Select a report and date range to analyze run/stop durations. appears.
Overview Heatmap
The rows contain the machines, and the columns the periods (day, week or month). The color of each cell shows the Run Ratio of that period: the ratio increases from red through yellow to green. The color scale is adjusted to the lowest and highest ratio in the results; the same color may correspond to different ratios in different queries. Drag the scale bar above the chart to highlight a certain ratio range.
- Cell Data: Shows the run ratio and, if there is room, the run/stop hours inside the cells. Off at the start if the results contain more than seven periods.
- When you hover over a cell, the machine, the period, Run Ratio, Run Hour, Stop Hour, Unknown Hour if any, and the incomplete data warning are shown.
- When you click a cell, that machine is selected in the Machine Detail section and added to the Run Hour Trend selection.
- If there are more than 14 periods, a scroll bar appears below the chart; the last 14 periods are shown at the start.
Machine Detail
For each period of the machine selected in the list at the top right, Run Hour, Stop Hour and Unknown Hour are shown as stacked columns. After a query, the first machine in the list is selected.
Run Hour Trend
The Run Hour of the selected machines is compared by period in a line chart. After a query, the first three machines are selected. Change the selection in the list above the chart and apply it with the confirm button in the list; at most five machines can be compared.
Table View
The Table view button on the toolbar shows the table instead of the charts. The table has the following columns: Machine, the period (Day, Week or Month), Run Hour, Stop Hour, Unknown Hour, Run Ratio, Event Count, Has Baseline, Incomplete, Counter reset detected, No communication alarm configured, Process Group, Task Center, Device and Tag.
- Event Count: The number of history records of the machine in that period; on weekly and monthly rows it is the sum of the daily counts.
- Has Baseline: Shows that there is a record before the range and that the starting state was taken from this record.
Below the table, the number of machines (Machine Count) and the totals of the hour columns are shown. Below the column headers is a filter row.
Which rows the table shows
The table shows the rows of all machines selected in the report; selecting a machine in the Machine Detail section does not narrow the table.
Toolbar and exporting
At the top right of the results section are the following buttons, from left to right:
- Table view / Chart view: Switches between the charts and the table.
- Tag / Log Selection: Opens the tag and log selection window.
- Refresh data: Runs the query again.
- Export to Excel: Downloads the table data as an Excel file. If no query has been run yet, the query is run first.
- Save as image: Downloads the Overview Heatmap chart as a PNG image. Disabled in the table view.
Query limits
Because runtime is calculated from raw records, the date range is limited by the event query limit in the server settings; the default limit is 31 days. If a longer range is selected, a warning appears and no query is run. The number of log definitions that can be selected in one query is also limited (A maximum of {maximum} variables can be selected in one query.).