Skip to main content

system.kanoa.cmms.getMaintenanceMTBFSummary(paramsDict)

Returns MTBF summary for the given period. When assetId is an area/site, includes every descendant asset's failure events rather than requiring a specific leaf asset.


Parameters

paramsDict Dictionary

- assetIdIntegerNot required restricts to this asset and its descendants
- endDateDateTimeEnd date
- startDateDateTimeStart date

Returns

mtbfSummary pyDataset


Example

# Populate a plant-wide MTBF summary KPI tile for the current quarter
paramsDict = {
'startDate': system.date.addDays(system.date.now(), -90),
'endDate': system.date.now()
}
data = system.kanoa.utilities.convertDatasetToJSON(system.kanoa.cmms.getMaintenanceMTBFSummary(paramsDict))

for i, row in enumerate(data):
print 'Row %i'%i
for k,v in row.items():
print k,v

break #Just limiting to returning the columns from the first record for display purposes
>>>
Row 0
MTBF_Days 14.0
MTBF_Minutes 20242.0
intervalCount 1
assetCount 1
failureCount 1
>>>