system.kanoa.event.getAssetProductionEventsByShift
Description
Returns production data by shift filtered by the given parameters (kanoaOPS)Syntax
getAssetProductionEventsByShift(paramsDict)- paramsDict (dict)
- - assetId int - i.e. 18
- - startDate datetime
- - endDate datetime
- - modeId int - i.e. 2 ('production') or None for all modes
- - workOrderId int
data (pyDataset).
Code Example
# Example Usage:
startDate = system.date.parse("2024-09-01 00:00:00")
endDate= system.date.now()
data = system.kanoa.event.getAssetProductionEventsByShift({'assetId': 510, 'startDate': startDate, 'endDate': endDate})
data = system.kanoa.utilities.convertDatasetToJSON(data)
for k,v in data[0].items():
print k,v
>>>
endDate 2024-10-23 03:54:11.55
modeTypeId 5
ShiftId 363
wasteCounterId 132799
shiftName 3rd Shift
itemName Wheat Bread Dough
tgtThreshold 0.1
modeEnd None
plannedDowntimeSecs None
period Hour
modeSourceName Operator
infeedRateSecs None
tgtQ 0.8
modeStart 2024-06-21 18:52:03.0
outfeedUnits lbs
modeTypeName Production
quality 1.0
itemId 87
standardRate 60.0
ModeCode 1
wasteUnits lbs
tgtA 0.8
infeedCounterId 132800
tgtP 0.8
workOrderId 43
iconPath kanoa/production
infeedUnits lbs
startDate 2024-10-22 23:00:00.0
modeName Production
itemColor #a291ed
modeEventId 43480
runtimeSecs None
availability None
targetCount None
rawWasteCount None
outfeedCount 283.0
scheduleRate 60.0
durationSecs 17651.0
modeId 2
assetId 510
assetPath Kanoa Industries\Buffalo Bakery\Production\Mix Line 1
infeedCount 283.0
wasteCount 0.0
unplannedDowntimeSecs 17651
userName srussem
outfeedCounterId 132798
userId 35
modeColor #00639a
performance None
rawOutfeedCount 283.0
workOrderName WO-010
rawInfeedCount 283.0
itemClassColor None
packageCount 1.0
tgtOEE 0.6
>>>