system.kanoa.event.getAssetProductionEventsSummary
Description
Returns summarized production data filtered by the given parameters.Syntax
getProductionEvents(paramsDict)- paramsDict (dict)
- - assetId (int)
- - startDate (datetime)
- - endDate (datetime)
- - modeId (int): None for all modes
- - workOrderId (int)
- - activeModeOnly (bool): Only return date for current mode
Code Example
# Example Usage:
startDate = system.date.parse("2024-09-01 00:00:00")
endDate= system.date.now()
data = system.kanoa.event.getAssetProductionEventsSummary({'assetId': 510, 'startDate': startDate, 'endDate': endDate})
data = system.kanoa.utilities.convertDatasetToJSON(data)
for k,v in data[0].items():
print k,v
> modeName Production
itemColor #a291ed
runtimeSecs 7996284
availability 0.794409289848
targetCount 133271.4
outfeedCount 140063.0
itemName Wheat Bread Dough
durationSecs 10659658.0
tgtThreshold 0.1
modeId 2
assetId 510
assetPath Kanoa Industries\Buffalo Bakery\Production\Mix Line 1
infeedCount 140063.0
wasteCount 0.0
plannedDowntimeSecs 593960
infeedRateSecs 0.0175160111872
unplannedDowntimeSecs 2069414
outfeedUnits lbs
modeTypeName Production
tgtPerformance 0.8
quality 1.0
itemId 87
modeColor #00639a
performance 1.05096067123
wasteUnits lbs
workOrderName WO-010
assetName Mix Line 1
workOrderId 43
tgtOEE 0.6
tgtAvailability 0.8
infeedUnits lbs
tgtQuality 0.8
>>>