system.mes.endSegmentWait

Sepasoft MES Module Suite

system.mes.endSegmentWait(responseSegment)

End the specified response segment. Will not return control to the calling script until the response segment has ended (if segment doesn't end within 15 seconds, an exception will be returned).

Syntax

system.mes.endSegmentWait(responseSegment)

  • Parameters

MESResponseSegment   responseSegment - The MES object to end. All final property values must be set prior to ending.

  • Returns

Nothing

  • Scope

All

Code Example

Python
defSeg = system.mes.loadMESObject('Receive Material', 'OperationsSegment')
eqPath = 'My Enterprise\California\Receiving\Unload Station 1'
respSeg = system.mes.createSegment(defSeg, eqPath)
#Ends the segment (will not return until the response segment has ended)
system.mes.endSegmentWait(respSeg)

Python
#USE THIS METHOD IF THE SEGMENT'S (END OPERATION WHEN COMPLETE) SETTING IS TRUE. 
seg = system.mes.getActiveSegment('Dressings Inc\California\Raw Materials\Unload Station 1', 'Unload Balsamic Vinegar')
seg.end()

Python
#USE THIS METHOD IF THE SEGMENT'S (END OPERATION WHEN COMPLETE) SETTING IS FALSE. 
oper = system.mes.getCurrentOperation('Dressings Inc\California\Raw Materials\Unload Station 1')
seg = oper.getActiveSegment('Unload Balsamic Vinegar')
seg.end()
oper.end()

Sepasoft MES Module Suite