Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Scenario 6: Calculate down time statistics

  • Last UpdatedMar 18, 2021
  • 2 minute read

You can use the RoundTrip retrieval feature to calculate periodic downtime, including:

  • What is the mean time between failures for my operation?

  • What is the mean time to repair (or replace) for a certain component?

What are Mean Time Between Failures and Mean Time to Repair?

Both mean time between failures (MTBF) and mean time to repair or replace (MTTR) view the total cycle of a process.

  • MTBF describes how long a process will likely run before the system goes down. To calculate this number, divide the total time processing by the number of breakdowns.

  • MTTR describes how long it will probably take for a particular part to need repair or replacement. (For example, a pump would be repaired, but a paper filter would be replaced.) To calculate this number, divide the total downtime by the number of breakdowns.

Tracking States with RoundTrip Retrieval

Some parts in your process have just two states -- on and off -- while others have more. For example, an engine might have four states -- switch on, warm up, run, switch off. RoundTrip retrieval works with integer analog tags, discrete tags, and string tags to track a variety of states. You can use this type of retrieval with History and StateWideHistory tables.

RoundTrip retrieval performs calculations on state occurrences in the within a specified cycle period. RoundTrip retrieval uses the time between consecutive leading edges of the same state for its calculations.

The RoundTrip mode returns a row for each state in any given cycle. For example, if your engine has four states in a cycle, RoundTrip retrieval will return four rows per cycle.

Points on the boundary of the end cycle are considered part of the next cycle and are not counted in the calculation.

Example: Tracking MTBF with RoundTrip Retrieval

If the tag used is "1" when the equipment is down, this returns the MTBF over the period queried:

SELECT DateTime, TagName, StateTime, OPCQuality, PercentGood

FROM History

WHERE TagName like 'PLCSim.Boolean6'

AND DateTime >= '2016-03-15 06:00'

AND DateTime < '2016-03-15 08:00'

AND wwRetrievalMode = 'RoundTrip'

AND wwTimeStampRule='start'

AND wwStateCalc='avgcontained'

AND wwCycleCount = 1

AND Value=1

The results of this query are:

DateTime

TagName

StateTime

OPCQuality

PercentGood

2016-03-15 06:00:00.0000000

PLCSim.Boolean6

12201.5602716469

192

100

Example: Tracking MTTR with RoundTrip Retrieval

This example shows how to track MTTR.

SELECT DateTime, TagName, StateTime, OPCQuality, PercentGood

FROM History

WHERE TagName like 'PLCSim.Boolean6'

AND DateTime >= '2016-03-15 06:00'

AND DateTime < '2016-03-15 08:00'AND wwRetrievalMode = 'ValueState'

AND wwTimeStampRule='start'

AND wwStateCalc='avgcontained'

AND wwCycleCount = 1

AND Value=1

The results of this query are:

DateTime

TagName

StateTime

OPCQuality

PercentGood

2016-03-15 06:00:00.0000000

PLCSim.Boolean6

6100.29661016949

192

100

In This Topic
TitleResults for “How to create a CRG?”Also Available in