Skip to end of metadata
Go to start of metadata

You want to show, when using OEE Run Director, what Work Order or Material (Product Code) is active for a MES Object Selector-Selected 
Equipment.. 
(if you have a LOT of Materials, this can be tedious)



Step-by-step guide

  1. Use the Code below in OEE Run Director Component Scripting for Property Change


    eqPath = event.source.parent.getComponent('MES Object Selector').equipmentItemPath
    fixList = ["Equipment Product Code", "Equipment Work Order"]
    
    lineObjLink = system.mes.getMESObjectLink(system.mes.loadMESObjectByEquipmentPath(eqPath).UUID)
    
    def returnInfo(eqPath, collectorType):
    	try:
    		lastTimeStamp = system.mes.getTagCollectorLastTimeStamp(eqPath, fix, '')
    		lastValue = system.mes.getTagCollectorLastValue(eqPath, fix, '')
    		if collectorType == 'Equipment Product Code' and lastValue != '':
    			event.source.parent.getComponent('SelectionMode').indicatorValue = 0
    			event.source.parent.getComponent('ProductCode').text = lastValue
    			event.source.parent.getComponent('WorkOrder').text = 'NOT A Work Order'
    			print "Product Code [%s] for [%s]" % (lastValue, eqPath)
    		if collectorType == 'Equipment Work Order' and lastValue != '':
    			event.source.parent.getComponent('SelectionMode').indicatorValue = 1
    			event.source.parent.getComponent('WorkOrder').text = lastValue
    			print "Work Order [%s] for [%s]" % (lastValue, eqPath)		   
    		return [eqPath, collectorType, str(lastValue), lastTimeStamp]             
    	except:
    		return [eqPath, collectorType, None, None]
    
    for fix in fixList:
    	returnInfo(eqPath, fix)



  2. Alternatively you can import this 7.9.12 Project
    Init RunDirector 7912.proj

  3. this Template has the same code with a Custom Property eqPath to bind to a MES Selector
  4. WoMPlus 7912.proj


a feature request to have this function somewhat incorporated to the OEE Run Director is been evaluated by Product Management