Sepasoft MES Module Suite
system.mes.executeSegmentImmediately
These script functions are used to execute the specified response segment immediately.
system.mes.executeSegmentImmediately(responseSegment, bypassInventoryCheck)
Execute the specified response segment. This is the same as execute segment but bypasses the overhead of the response segment lifetime. In all cases, a new operations response object will be created and associated to the response segment passed as a parameter to this function.
Syntax
system.mes.executeSegmentImmediately(responseSegment, bypassInventoryCheck)
- Parameters
MESResponseSegment responseSegment - The MESResponseSegment object to execute. This can be used to split lot, receive material, change lot status, etc.
Boolean bypassInventoryCheck - If true, bypass the checking of inventory levels.
- Returns
The MESResponseSegment object.
- Scope
All
Python |
#Get current operation oper=system.mes.getCurrentOperation('[global]\Enterprise\Site 1\Area\Line 1') #Create segment seg = oper.createSegment('Mix Nuts') #Set the material seg.setMaterial('Mix Peanuts', 'Salt', '[global]\Enterprise\Site 1\Area\Line 1', 'rt 57', 100) #Execute immediately system.mes.executeSegmentImmediately(seg) |
Output
Python |
ResponseSegment (0ab4a7c0-99ea-4d79-bed1-cb732388c5a2, Mix Nuts, 0 parents, 0 children, 0 custom properties, 7 complex properties) |
system.mes.executeSegmentImmediately(responseSegment)
Execute the specified response segment. This is the same as execute segment but bypasses the overhead of the response segment lifetime. In all cases, a new operations response object will be created and associated to the response segment passed as a parameter to this function.
Syntax
system.mes.executeSegmentImmediately(responseSegment)
- Parameters
MESResponseSegment responseSegment - The MESResponseSegment object to execute. This can be used to split lot, receive material, change lot status, etc.
- Returns
The MESResponseSegment object.
- Scope
All
Python |
#Get current operation oper=system.mes.getCurrentOperation('[global]\Enterprise\Site 1\Area\Line 1') #Create segment seg = oper.createSegment('Mix Nuts') #Set the material seg.setMaterial('Mix Peanuts', 'Salt', '[global]\Enterprise\Site 1\Area\Line 1', 'rt 57', 100) #Execute immediately system.mes.executeSegmentImmediately(seg) |
Output
Python |
ResponseSegment (0ab4a7c0-99ea-4d79-bed1-cb732388c5a2, Mix Nuts, 0 parents, 0 children, 0 custom properties, 7 complex properties) |
Sepasoft MES Module Suite