Skip to end of metadata
Go to start of metadata

Additional Information for Starting an OEE Run based on a Schedule.

Step-by-step guide

i.e. this is a "scripted" version of MES Schedule Selector right click Begin OEE Run



  1. Script example

    #specify equipment path
    eqPath = '[global]\Enterprise\Site\Area\Line 1'
      
    #specify the start and end dates
    begin = system.date.now()
    end = system.date.addDays(system.date.now(), 5)
      
    #specify the category
    category = 'Active'
      
    #get the schedule entries
    list = system.mes.getEquipmentScheduleEntries(eqPath, begin, end, category, False)
    print list
    for item in list:
        print item.getScheduledStartDate()
        if item.hasMESOperationsScheduleLink():
            print item.getMESOperationsScheduleLink()
            print item.getMESOperationsRequestLink(), '; Operations Request'
             
            if item.hasMESOperationsResponseLink():
                print item.getMESOperationsResponseLink(), '; Operations Response'
         
            else:
                system.mes.oee.beginOEERun(item.getMESOperationsRequestLink()) ##begin OEE Run
             
        break 
  2. Items to pay particular attention to are the objects that you are working with.
    It is good practice and helpful to  "print type(obj)" to make sure of that.
    For instance, one version of system.mes.oee.beginOEERun() takes an Operations Request Link and another takes Operations Request. 


Best Practices For Starting And Stopping OEE Runs
and
system.mes.oee.beginOEERun