Skip to main content

system.kanoa.event.getAssetProductionEvents

Description

Returns production data filtered by the given parameters.

Syntax

getAssetProductionEvents(paramsDict)

Parameters:
  • paramsDict (dict)

  • Returns:
  • data (pyDataset)
  • Dictionary

    ParameterTypeRequiredNotes
    assetIdint
    startDatedatetime
    endDatedatetime
    modeIdintNone for all modes
    workOrderIdint
    activeModeOnlyboolOnly return date for current mode
    strictDatesboolIf true then counts and times will be limited to the range passed in, otherwise counts and times are for the entire run that started or ended during the range

    Code Examples

    # Example Usage:
    startDate = system.date.parse("2024-09-01 00:00:00")
    endDate= system.date.now()
    data = system.kanoa.event.getAssetProductionEvents({'assetId': 510, 'startDate': startDate, 'endDate': endDate})
    print system.kanoa.utilities.convertDatasetToJSON(data)
    > [
    {
    'endDate': None,
    'modeTypeId': 5,
    'changedDate': 2024-07-26 23:05:04.69,
    'itemName': u'Wheat Bread Dough',
    'tgtThreshold': 0.1,
    'reqdQty': 176773.0,
    'changedBy': 18,
    'plannedDowntimeSecs': 593960,
    'period': u'Hour',
    'modeSourceName': u'Operator',
    'infeedRateSecs': 0.017515510954838522,
    'tgtQ': 0.8,
    'outfeedUnits': u'lbs',
    'modeTypeName': u'Production',
    'quality': 1.0,
    'itemId': 87,
    'standardRate': 60.0,
    'wasteUnits': u'lbs',
    'tgtA': 0.8,
    'modeCode': 1,
    'tgtP': 0.8,
    'workOrderId': 43,
    'iconPath': u'kanoa/production',
    'infeedUnits': u'lbs',
    'startDate': 2024-06-21 18:52:03.0,
    'modeName': u'Production',
    'itemColor': u'#a291ed',
    'modeEventId': 43480L,
    'runtimeSecs': 7996284,
    'availability': 0.7501607028069424,
    'targetCount': 133271.4,
    'rawWasteCount': 0.0,
    'outfeedCount': 140059.0,
    'scheduleRate': 60.0,
    'durationSecs': 10659428.0,
    'modeId': 2,
    'assetPath': u'Kanoa Industries\\Buffalo Bakery\\Production\\Mix Line 1',
    'assetId': 510,
    'infeedCount': 140059.0,
    'wasteCount': 0.0,
    'unplannedDowntimeSecs': 2069184,
    'userName': u'srussem',
    'userId': 35,
    'modeColor': u'#00639a',
    'createdDate': None,
    'performance': 1.0509306572903114,
    'rawOutfeedCount': 140059.0,
    'createdBy': 35,
    'workOrderName': u'WO-010',
    'rawInfeedCount': 140059.0,
    'assetName': u'Mix Line 1',
    'itemClassColor': None,
    'comment': u'changed time',
    'packageCount': 1.0,
    'tgtOEE': 0.6
    }
    ]
    >>>