system.mes.createSublots

Sepasoft MES Module Suite

system.mes.createSublots(materialLot, sublotCount)

When an operation produces parts or finished goods that are serialized, you may consider storing them as sub-lot objects of a single material lot. Sub-lots can be traced back throughout the process and show up as a highlight on the material lot object in the Trace Graph. Creating sub-lots is more efficient than executing a process segment for each part produced, however splitting sub-lots apart later on in the process would require new material lots to be created for each sub-lot for traceability purposes.

This script function provides a method of adding sub-lots to a material lot after the operation has ended. The sublot number is automatically generated, but this can be customized by adding script to the Sublot CreateSerialNumber event.

Sub-lots can also be created at the time of the operation by using the Response Segment addSublot function. Sub-lots are stored as Sublot objects.

Syntax

system.mes.createSublots(materialLot, sublotCount)

  • Parameters

MESMaterialLot materialLot - The MES object to create new material sublots for.

Int sublotCount - Number of new material sublots to create in the specified material lot.

  • Returns

Material lot object with newly created material sublots as children.

  • Scope

All

Python
#This code will create new material sublots for the provided material lot.
lot = system.mes.loadMESObject('Lot 1111', 'MaterialLot')
lot = system.mes.createSublots(lot, 2)
system.mes.saveMESObject(lot)
 
print lot.getChildCollection()

Output

Code
{a4f636cc-9026-44c1-818c-ab7c9c26b1b8=SN000000000005, 547c446d-2597-4878-ad38-8ede010eb2a7=SN000000000004}

Sepasoft MES Module Suite