Work Orders | Accessing Information

Overview

Work Orders can be created through scripting and with the Work Order Table component. If a work order is used with OEE, the analysis can return the name of work orders against production runs, but does not return and of the work order data such as due date or quantity. The examples below show how to access the associated work order objects to extend OEE analysis with information from the work order object.

Applies To and Version Info

This feature applies to both Track & Trace and OEE 3.0 modules and is available in all versions.

Scripting Examples

Python
#Get work order qty from Operations Response
opResponseUUID = '807849d7-4cfe-42bc-840c-7cd541758e58'
opObj = system.mes.loadMESObject(opResponseUUID)
woUUID = opObj.getWorkOrderRefUUID()
woObj = system.mes.loadMESObject(woUUID)
print 'Get work order qty from Operations Response'
print 'WO Qty - ', woObj.getWorkOrderQuantity()
print 'Remaining Qty - ',woObj.getRemainingQuantity()
print 'Actual Qty - ', woObj.getActualQuantity()
print
 
#####################################################

#Get work order qty for all Work Orders
woFilter = system.mes.workorder.createMESWorkOrderFilter()
woList = system.mes.workorder.getMESWorkOrders(woFilter)
print 'Get work order qty for all Work Orders'
for woObj in woList:
print '%s WO Qty - %s' %(woObj.getName(),woObj.getWorkOrderQuantity())
print '%s WO Remaining Qty - %s' %(woObj.getName(),woObj.getRemainingQuantity())
print '%s WO Actual Qty - %s' %(woObj.getName(),woObj.getActualQuantity())
print
 
#####################################################

#Get work order qty for a specific Work Order
print 'Get work order qty for a specific Work Order'
woObj = system.mes.workorder.getMESWorkOrder('WO-0001')
print 'WO Qty - ', woObj.getWorkOrderQuantity()
print 'Remaining Qty - ',woObj.getRemainingQuantity()
print 'Actual Qty - ', woObj.getActualQuantity()
Python
>>> 
Get work order qty from Operations Response
WO Qty - 10000.0
Remaining Qty - 7666.0
Actual Qty - 2334.0
Get work order qty for all Work Orders
WO-0001 WO Qty - 10000.0
WO-0001 WO Remaining Qty - 7666.0
WO-0001 WO Actual Qty - 2334.0
WO-0005 WO Qty - 10000.0
WO-0005 WO Remaining Qty - 0.0
WO-0005 WO Actual Qty - 0.0
MarkWO_1 WO Qty - 2000.0
MarkWO_1 WO Remaining Qty - 0.0
MarkWO_1 WO Actual Qty - 0.0
Get work order qty for a specific Work Order
WO Qty - 10000.0
Remaining Qty - 7656.0
Actual Qty - 2344.0
>>>