Skip to end of metadata
Go to start of metadata

system.mes.oee.updateEquipmentStateValue is the better way to update Equipment State because it
also sets auxiliary columns like the original Equipment State and what the original Equipment was.


If you update the State column with system.mes.updateTagCollectorValue it cannot be reverted.

Step-by-step guide

  1. before in OEE Downtime Table
  2. Code used

    equipmentPath = 'New Enterprise\\SiteOne\\Cust\\Generic'
    # these are for updateTagCollector not used with oee.updateEquipment
    collectorType = "Equipment State"
    key = ' '
    auxValueName = 'State'
    
    value = 777
    
    #event dateTime = 'Wed Sep 01 07:52:47 PDT 2021' as seen in the OEE DTT
    date = system.date.getDate(2021, 8, 01)
    dateTime = system.date.setTime(date, 7, 52, 47)
    print dateTime
    
    reasonEquipmentPath = 'New Enterprise\\SiteOne\\Cust\\Generic\\Cell2'
    newEquipmentPath = reasonEquipmentPath
    
    stateTimeStamp = dateTime
    newStateCode = value
    
    system.mes.oee.updateEquipmentStateValue(equipmentPath, reasonEquipmentPath, newEquipmentPath, stateTimeStamp, newStateCode)
  3. after in OEE Downtime Table


N/A