Sepasoft MES Module Suite
Material Resource Property
This object defines the material resources that may be required by a process segment. It holds resource information that control what material lots can be consumed or created by operations segments derived from the process segment. This object is stored as a complex property object of a process segment.
|
This object is not derived from the MESAbstractObject. Instead it derives from AbstractMESComplexProperty object and inherits all its functions and properties. |
When an operations segment is scheduled or executed, a Response Material Property object is created.
Object Creation
This object is primarily created when using the MES Object Editor component. The following object methods can be used to create or return this type of object.
- process segment.createComplexProperty()
Python |
def add_material_resource_prop(ps_name, supplemental_equipment_name): ps = system.mes.loadMESObject(ps_name, 'ProcessSegment') # Create Material Resource Complex Property and name it material out material_prop = ps.createComplexProperty('Material', 'Material Out') # We are using a material called MatDef1 in our operation mat_Link = system.mes.getMESObjectLinkByName('MaterialDef', 'MatDef1') material_prop.setMaterialRef(mat_Link) # The material equipment ref is where we store out created material after it is done # This can be either a piece of Supplemental Equipment, or a Storage Unit # In this example we are using a piece of supplemental equipment that already exists equip_ref = system.mes.loadMESObject(supplemental_equipment_name, 'Equipment') material_prop.setEquipmentRefUUID(equip_ref.getUUID()) material_prop.setEquipmentRefType(equip_ref.getMESObjectTypeName()) # Set remaining properties material_prop.setQuantitySource('Manual') material_prop.setUse('Out') material_prop.setOptional(False) material_prop.setLotNumberSource('Auto') material_prop.setAutoGenerateLot(True) material_prop.setRatePeriod('None') # Save off the equipment to your server system.mes.saveMESObject(ps) # Using already created Process Segment with Equipment Resource Property ps_name = 'Example Process Segment' supplemental_equipment_name = 'Supplement Equipment Example' add_material_resource_prop(ps_name, supplemental_equipment_name) ps = system.mes.loadMESObject(ps_name, 'ProcessSegment') # Get Material Use of Material Resource Property with the name of Material Out print ps.getComplexProperty('Material.Material Out.MaterialUse') # Get Material Resource Property with the name of Material Out print ps.getComplexProperty('Material.Material Out.MaterialAutoGenerateLot') |
Python |
MaterialUse=Out MaterialAutoGenerateLot=true |
Object Properties
The object properties are accessible through the MES Object Editor component and with the provided object functions, but not directly as obj.properties. The setting name is what appears in the MES Object Editor component and the script name is what is used to set or get the value using script. See AbstractMESComplexProperty for details about accessing values using script.
Property values can be accessed and changed for an object by using the getPropertyValue() and setPropertyValue() method.
Setting Name | Type | Scripting | Description |
|---|---|---|---|
Name__ | String | MaterialName | This is the name to refer to this material resource by. Many process segments have multiple material resources and this is a unique name displayed to the operator, shown in analysis and reports, and also internally used to reference this material resource. |
| Optional | boolean | MaterialOptional | If the material defined here is always required as an input or an output of this process, then leave this setting unchecked. If this material is optional, then select it. |
| Production Selectable | boolean | MaterialProductionSelectable | This box is checked by default. If this setting is unchecked then this property selection will not be visible to the operator in the MES Material Selector component. |
| Use | String | MaterialUse | Defines whether this material is an input, a consumable, by-product or an output of this process segment. Options are: In - This setting is used for material feeding from an existing material lot into a segment that will be part of the finished goods. Out - This setting is used for material feeding out of a segment that is or will be part of the finished goods. Consumable - This setting is used for material feeding into a segment that is not part of the finished goods. By-product - This is used for material feeding out of a segment that is not part of the finished goods. By-product is intended for material that is no longer going to be processed and is not available in inventory. |
| Auto Generate Lot | boolean | MaterialAutoGenerateLot | For a Material Use set to In, if this property is enabled, the incoming lot will be created and consumed by this segment. This is typically only done when receiving material lot doesn't already exists. For a Material Use set to Out, this property must be enabled. |
| Material_Reference | Python Dictionary | MaterialRef | This can be set to a Material Class or a Material Definition. If set to Material Class, the specific material definition will need to be provided when the segment runs. |
| Lot_Equipment_Reference | Python Dictionary | MaterialEquipmentRef | This is the type of equipment associated with this material resource. It can be an Equipment Class, Equipment, Line, Line Cell Group or Storage Unit and can be used to prevent this process segment from selecting lots located in other equipment. In the case where this material resource is an input to the segment, this will be the equipment where the material is coming from. This helps establish routes that exist due to physical machinery. For example if tanks 1 and 2 can only supply line 1 and tanks 3 and 4 can only supply line 2. In the case where this material resource is an output from the segment, this will be the equipment where the material is going to. And just like the case of the input, routes that exist due to physical machinery can be accommodated. |
| Enable Sublots | boolean | MaterialEnableSublots | If this setting is selected, then sublot support will be enabled for the material resource. If sublots are used, then serial numbers, or other unique identification number, can be assigned to each sublot item. For example, a Material Lot of batteries may have 25 individual batteries each with a serial number and each with their own test results. |
| Lot Number Source | String | MaterialLotNoSource | This determines the source of the lot number. Options are:
Creating Custom Lot Numbers When the Lot Number Source is set to Auto, the T&T module will internally generate a unique lot number. If a custom lot number needs to be generated or a query to obtain a lot number from another system, a custom script can be added to the CreateLotNumber event to do just that. This event is fired when Lot Number Source is set to Auto and a new material lot number is required by an operation segment. See the Generate Custom Lot Number knowledge base article for more information. |
| Lot Number Source Link | String | MaterialLotNoSourceLink | The system will use the lot number of the incoming material for this material. Use the name of the material reference complex property, i.e. if this property is set to Material In, then the system selects the lot number for the material reference Material In. |
| Quantity Source | String | MaterialQuantitySource | This setting determines the source of the quantity for this material resource. Options Available Lot Quantity - This option obtains the total quantity of the lot that is currently available. If multiple segments utilize a material lot, they each requisition a quantity leaving, potentially, some quantity remaining for use - this is the available lot quantity. The available lot quantity setting utilizes all of the available material, leaving none for other processes. Link - This option allows the quantity to come from an input or output material resource of this segment. This eliminates the need to type in the quantity multiple times if they will always be the same as another material resource. Note, you can not use a material resource multiple times with this setting. Link Combine - For segments that are combining two or more lots into one streams, as is the case of joining goods after tests are done to only a portion of a lot, this option can be used. It is used by having two or more material resources, that are segment inputs, linked to the same material resource output. When the segment is ended, the system will sum up the quantities of the linked material resources to that of the linking material resources. There isn't a need to use "," or any other delimiters while defining the quantity source link, instead a single name is used that can be put into all of the material references link names. Link Split - For segments that are splitting a lot into two or more streams, as is the case of separating good from bad product, this option can be used. It is used by having two or more material resources, that are segment outputs, linked to the same material resource. When the segment is ended, the system will ensure that the sum of the quantities of the linking material resources equal that of the linked material resources. Manual - The operator will be prompted for the quantity when using GUI components. If utilized in script, the value must be provided at run-time. The quantity must be entered before the segment is ended. MES Counter - Obtain the quantity from the automatic production counters defined for the associated equipment. The associated equipment is the equipment reference for the segment. The equipment may change if the Segment Equipment Reference is set to an Equipment Class and the specific equipment is not known until the segment is started for production. More information can be found in the MES Counters page. Sublot Count - The quantity will be automatically set based on the number of Material Sublot items belonging to the Material Lot. If sublots are used, then serial numbers, or other unique identification number, can be assigned to each sublot item. For example, a Material Lot of batteries maybe have 25 individual batteries each with a serial number and each with their own test results. The quantity of the Material Lot will match the number of Material Sublot items of the Material Lot. Or, the number of batteries in the lot. |
| Quantity Source Link | String | MaterialQuantitySourceLink | If the quantity value of an output material lot will be determined based on the quantity values of an input material lot or lots, the name provided here is used to either Link, Split or Combine the values (based on the Quantity Source setting). Example, three input materials all have Quantity Source Link set to Total Input. If Material Out has Quantity Source to Link Combine and the Quantity Source Link also set to Total Input, the output material quantity will be calculated as the sum of all input materials. |
| Quantity | Float8 | MaterialQuantity | Typically this is left blank, but it can be set to a fixed value that will be constant every time the segment is used for production. |
| Units | String | MaterialUnits | Units for the quantity. |
Rate Period | String | MaterialRatePeriod | The rate period is the unit of time used for the material rate. This rate is used by scheduling functionality to determine relevant consumption or production of material. Options Min - For setting the rate in minutes. Hour - For setting the rate in hours. Cycle - For setting the rate in cycles. |
| Rate | Float8 | MaterialRate | This setting determines rate of the material consumption or production for scheduling. The rate utilizes the rate period property to determine the unit of time for this rate.Material rate is invalid if it is set to less than zero. |
| Cycle Time | Int4 | MaterialCycleTime | The expected time to complete a material cycle in seconds. |
| Final Lot Status | String | MaterialFinalLotStatus | When a segment is started, the status of the Material Lots will be set to Active. When the segment is ended or a new lot is used for the material resource, the status will automatically be set to Complete. Optionally, the value of this setting can be used instead of the default Complete. This is useful for setting a lot to Hold, In Process or anything that can be used to filter lots or sublots. Active status while the lot is active cannot be changed. |
| Auto Lot Quantity Completion | String | MaterialAutoLotCompletion | This setting determines if all the items belonging to the lot are automatically consumed. Options are: Disabled - Select this if the items in the lot should not be used automatically, regardless of the Zero Lot Threshold setting. Enabled - Select this if the items in the lot should be used automatically (via the Zero Lot Threshold functionality in the Storage Unit, by setting the lot's Lot Availability Status property to Used). See Lot Handling Methods and Material Lot. Confirm - Set this if the lot quantity needs to be confirmed. This will check if the lot has reached its confirmation threshold or not. |
| Material Lot Depletion Warning | Int4 | MaterialLotDepletionWarning | Sets the depletion warning in seconds. |
| Material Lot Status Filter | String | MaterialLotStatusFilter | The material lot status can be set to any custom value here. This can be used to filter which material lots can be selected when this process segment is executed. The Material Lot Status Filter property accepts comma separated lot status values. By default, only lots with a lot status of Complete will be shown in the Material Selector. This can be changed to also include other lot status values such as Active by setting the Material Lot Status Filter to Complete, Active. It can also include user defined values as well. |
Accessing Properties
Python |
#Load MES object mesObject = system.mes.loadMESObject('Mix Nuts', 'ProcessSegment') matRef = mesObject.getComplexProperty('Material', 'Almonds In') #Get the value of auto lot completion property print matRef.getValue('MaterialAutoLotCompletion') |
Object Functions
- Object Creation
- Object Properties
- Accessing Properties
- getAutoGenerateLot()
- getAutoLotCompletion()
- getCycleTime()
- getEnableSublots()
- getEquipmentRef()
- getEquipmentRefProperty()
- getEquipmentRefType()
- getEquipmentRefUUID()
- getFinalLotStatus()
- getLotDepletionWarning()
- getLotNumberSource()
- getLotNumberSourceLink()
- getLotStatusFilter()
- getMaterialCycleTime()
- getMaterialRate()
- getMaterialRatePeriod()
- getMaterialRef()
- getMaterialRefProperty()
- getMaterialRefType()
- getMaterialRefUUID()
- getOptional()
- getQuantity()
- getQuantitySource()
- getQuantitySourceLink()
- getRate()
- getRatePeriod()
- getReferenceOptions(mesObjectType, searchPattern)
- getReferenceOptions(mesObjectType, searchPattern, maxLotReturnCount, lotDescriptionPattern)
- getUnits()
- getUse()
- isOutUse()
- isProductionSelectable()
- setAutoGenerateLot(autoGenerateLot)
- setAutoLotCompletion(autoLotCompletion)
- setCycleTime(cycleTime)
- setEnableSublots(enableSublots)
- setEquipmentRef(equipmentRef)
- setEquipmentRefType(equipmentRefType)
- setEquipmentRefUUID(equipmentRefUUID)
- setFinalLotStatus(finalLotStatus)
- setLotDepletionWarning(lotDepletionWarningSeconds)
- setLotNumberSource(lotNoSource)
- setLotNumberSourceLink(lotNoSourceLink)
- setLotStatusFilter(lotStatusFilter)
- setMaterialCycleTime(cycleTime)
- setMaterialRate(matRate)
- setMaterialRatePeriod(ratePeriod)
- setMaterialRef(mesObjectLink)
- setMaterialRefType(materialRefType)
- setMaterialRefUUID(materialRefUUID)
- setOptional(optional)
- setProductionSelectable(selectable)
- setQuantity(quantity)
- setQuantitySource(quantitySource)
- setQuantitySourceLink(quantityLink)
- setRate(rate)
- setRatePeriod(ratePeriod)
- setUnits(units)
- setUse(use)
|
Material and equipment references can be set in one of two ways: Material
Equipment 1. Passing an object link to the method setEquipmentRef(equipmentRef)
2. Using a uuid and type with setEquipmentRefUUID(equipmentRefUUID) and setEquipmentRefType(equipmentRefType)
|
Sepasoft MES Module Suite