Sepasoft MES Module Suite
system.mes.getMaterialLotsAvailable(materialProperty, maxLotReturnCount, lotNamePattern, equipmentPath)
Find available material lots for given equipment in their Lot Handling Mode Order without the need to start a segment.
Syntax
system.mes.getMaterialLotsAvailable(materialProperty, maxLotReturnCount, lotNamePattern, equipmentPath)
- Parameters
MESResponseMaterialProperty materialPropery - The MES object defines the material resources that may be required by a process segment.
Integer maxLotReturnCount - The maximum number of lots.
String lotNamePattern - This is a pattern to filter the lot names according to when determining the next available lot.
String equipmentPath - The equipment path for equipment where the material lot is located. Note, an Equipment Class name or Supplemental Equipment item name can be used here.
- Returns
A MESList object representing to the next available lot. If there is no available material lot None is returned.
- Scope
All
Code Snippet
Python |
destinationEquipmentPath = 'New Enterprise\Site 1\Area 1\Furnace' obj = system.mes.loadMESObject('Load Furnace', 'OperationsSegment') seg = system.mes.createSegment(obj, destinationEquipmentPath) matprop = seg.getMaterialProperty('Material In') supplementalEquipment1 = 'Wagon 1' supplementalEquipment2 = 'Wagon 2' lots = system.mes.getMaterialLotsAvailable(matprop, 100, '', supplementalEquipment1) print 'LIFO' for lot in lots: print lot lots = system.mes.getMaterialLotsAvailable(matprop, 100, '', supplementalEquipment2) print 'FIFO' for lot in lots: print lot |
Output
Code |
>>> LIFO Ignition-2a481eac5ffd-0000000020 - Wagon 1 Ignition-2a481eac5ffd-0000000021 - Wagon 1 Ignition-2a481eac5ffd-0000000022 - Wagon 1 Ignition-2a481eac5ffd-0000000023 - Wagon 1 Ignition-2a481eac5ffd-0000000024 - Wagon 1 Ignition-2a481eac5ffd-0000000025 - Wagon 1 Ignition-2a481eac5ffd-0000000026 - Wagon 1 Ignition-2a481eac5ffd-0000000043 - Wagon 1 Ignition-2a481eac5ffd-0000000045 - Wagon 1 FIFO Ignition-2a481eac5ffd-0000000044 - Wagon 2 Ignition-2a481eac5ffd-0000000038 - Wagon 2 Ignition-2a481eac5ffd-0000000037 - Wagon 2 Ignition-2a481eac5ffd-0000000036 - Wagon 2 Ignition-2a481eac5ffd-0000000033 - Wagon 2 Ignition-2a481eac5ffd-0000000032 - Wagon 2 Ignition-2a481eac5ffd-0000000031 - Wagon 2 Ignition-2a481eac5ffd-0000000029 - Wagon 2 Ignition-2a481eac5ffd-0000000030 - Wagon 2 Ignition-2a481eac5ffd-0000000028 - Wagon 2 Ignition-2a481eac5ffd-0000000027 - Wagon 2 >>> Attachments |
Sepasoft MES Module Suite