Tracking Material and Operations

Sepasoft MES Module Suite

Tracking Material Operatons

The various scripting methods used for executing operations are beginSegment, endSegment, updateSegment, and executeSegment. An example is given below for each method. 

Begin Segment

Python
eqPath = 'Nuts Unlimited\Folsom\Receiving\Nut Unloading'
seg = system.mes.createSegment('Unload Nuts', eqPath, True)
seg.setMaterial('Material In', 'Almond Nuts', '[global]\Nuts Unlimited\Folsom\Receiving\Nut Storage Silos\Almond Silo', 'Lot t55', 50)
seg = seg.begin()

End Segment

Python
eqPath = 'Nuts Unlimited\Folsom\Receiving\Nut Unloading'
currSegList = system.mes.getCurrentSegments(eqPath)
if currSegList.size() >= 0:
    currSeg = currSegList.get(0).getMESObject()
    currSeg.end()

Update Segment

Python
eqPath = 'Nuts Unlimited\Folsom\Receiving\Nut Unloading'
currSegList = system.mes.getCurrentSegments(eqPath)
if currSegList.size() >= 0:
    currSeg = currSegList.get(0).getMESObject()
    currSeg.setMaterial('Material In', 'Walnut Nuts', '[global]\Nuts Unlimited\Folsom\Receiving\Nut Storage Silos\Walnut Silo', 'Lot t59', 75)
    currSeg = currSeg.update()

Execute Segment

Python
eqPath = 'Nuts Unlimited\Folsom\Receiving\Nut Unloading'
seg = system.mes.createSegment('Unload Nuts', eqPath, True)
seg.setMaterial('Material In', 'Almond Nuts', '[global]\Nuts Unlimited\Folsom\Receiving\Nut Storage Silos\Almond Silo', 'Lot t55', 50)
seg.execute()

Using MES Segment Selector and MES Material Selector

To use MES Segment Selector and Material Selector:

  • Set Equipment Path property of the MES Segment Selector to path of the corresponding segment
  • Change the Mode property of the MES Segment Selector to Definition
  • Use the MES Material Selector component to set material properties
  • Use the appropriate scripting method. Various scripting functions are beginSegment(), updateSegment(), executeSegment(), endSegment(), endAllSegments(). Example: event.source.parent.getComponent('MES Segment Selector').beginSegment() 

Using MES Operation Selector 

To use MES Operation Selector:

  • Set Equipment Path property of the MES Operation Selector to path of the corresponding segment
  • Use the appropriate scripting method. Various scripting functions are beginOperation(), endOperation(), abortOperation(). 

Example: event.source.parent.getComponent('MES Operation Selector').beginOperation() 

Sepasoft MES Module Suite