Material Resource Property

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.

Note 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__

StringMaterialNameThis 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.
OptionalbooleanMaterialOptional

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 SelectablebooleanMaterialProductionSelectableThis 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.
UseStringMaterialUse

Defines whether this material is an input, a consumableby-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 Lotboolean  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_ReferencePython DictionaryMaterialRefThis 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 SublotsbooleanMaterialEnableSublots

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 SourceString MaterialLotNoSource

This determines the source of the lot number.

Options are:

  • Auto: This setting automatically generates lot number. The internal lot number generator will generate a lot number and assign it automatically for the operator. This option can also be used if a different lot number format is used or lot numbers are provided by another system that is integrated with this system.
  • Manual: This setting will prompt the operator for the lot number when using GUI components.  If used in script, the lot number must be provided at run-time. This is typically used when receiving raw materials or entering a lot number generated by an outside system. 
  • In Link: Only valid for Out materials. In cases where the lot number for the output material will be the same as the lot number of the input to the process segment, this setting will tie the two together. Segments can be configured with multiple material inputs and outputs and different lot number links can be configured. Whenever this setting is used, the Lot Sequence number is incremented, so that a material lot can be tracked through a number of process segments.

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 LinkString MaterialLotNoSourceLinkThe 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 SourceString 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 LinkStringMaterialQuantitySourceLink

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 LinkSplit 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.

For the MES Counter use case, this is the name of the counter as configured on the equipment where the Operation is executed.

QuantityFloat8 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.
UnitsStringMaterialUnitsUnits 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.

RateFloat8MaterialRateThis 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 TimeInt4MaterialCycleTimeThe expected time to complete a material cycle in seconds.
Final Lot StatusStringMaterialFinalLotStatus

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 HoldIn 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 CompletionStringMaterialAutoLotCompletion

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 WarningInt4MaterialLotDepletionWarningSets the depletion warning in seconds.
Material Lot Status FilterStringMaterialLotStatusFilterThe 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


Note

Material and equipment references can be set in one of two ways:

Material

  1. Passing an object link to the method setMaterialRef(materialRef)
  2. Using a uuid and type with setMaterialRefUUID(materialRefUUID) and setMaterialRefType(materialRefType)

Equipment

1. Passing an object link to the method setEquipmentRef(equipmentRef)

Python
obj_link = system.mes.getMESObjectLinkByEquipmentPath('my/equipment/path')
equip_prop.setEquipmentRef(obj_link)

2. Using a uuid and type with setEquipmentRefUUID(equipmentRefUUID) and setEquipmentRefType(equipmentRefType)

Python
obj = system.mes.loadMESObjectByEquipmentPath('my/equipment/path')
equip_prop.setEquipmentRefUUID(obj.getUUID())
equip_prop.setEquipmentRefType(obj.getMESObjectTypeName())
 

getAutoGenerateLot()

Description

Return the boolean corresponding to the auto generate property.

Syntax

getAutoGenerateLot()


  • Parameters

 None

  • Returns

 boolean - True if the material lot is generated automatically and False otherwise.

  • Scope

All

 

getAutoLotCompletion()

Description

Return the boolean corresponding to the auto lot completion property.

Syntax

getAutoLotCompletion()


  • Parameters

 None

  • Returns

 boolean - True if the material lot is completed automatically and False otherwise.

  • Scope

All

 

getCycleTime()

Description

Get the time taken to complete a material cycle in seconds.

Syntax

getCycleTime()


  • Parameters

 None

  • Returns

 Integer - The time taken in seconds to complete a material cycle.

  • Scope

All

 

getEnableSublots()

Description

Get the boolean corresponding to enable sublots property. Returns True if sublots can be added.

Syntax

getEnableSublots()


  • Parameters

 None

  • Returns

 boolean - True if sublots are enabled.

  • Scope

All

 

getEquipmentRef()

Description

Return the reference of the equipment object.

Syntax

getEquipmentRef()


  • Parameters

 None

  • Returns

 MESObjectLink objLink - The reference link to the equipment object.

  • Scope

All

 

getEquipmentRefProperty()

Description

Get the reference property of equipment object.

Syntax

getEquipmentRefProperty()


  • Parameters

 None

  • Returns

MESEquipmentRefProperty refProperty - The reference property of the equipment object.

  • Scope

All

 

getEquipmentRefType()

Description

Get the type of equipment reference.

Syntax

getEquipmentRefType()


  • Parameters

 None

  • Returns

String refType - The type of the equipment reference.

  • Scope

All

 

getEquipmentRefUUID()

Description

 Get the uuid that corresponds to equipment reference.

Syntax

getEquipmentRefUUID()


  • Parameters

 None

  • Returns

 String equipmentRefUUID - The unique identifier that corresponds to equipment reference.

  • Scope

All

 

getFinalLotStatus()

Description

Gets the final lot status of the material.

Syntax

getFinalLotStatus()


  • Parameters

None

  • Returns

String finalLotStatus - The final status of the material lot.

  • Scope

All

 getLotDepletionWarning()

Description

Gets the warning of lot depletion in seconds.

Syntax

getLotDepletionWarning()

  • Parameters

None

  • Returns

Integer value - The depletion warning in seconds.

  • Scope

All

 

getLotNumberSource()

Description

Gets name of the lot number source.

Syntax

getLotNumberSource()

  • Parameters

None

  • Returns

String lotNoSource - The name of the lot number source.

  • Scope

All

 

getLotNumberSourceLink()

Description

Gets the name of the lot number source link.

Syntax

getLotNumberSourceLink()


  • Parameters

None

  • Returns

String lotNoSourceLink - Name of the lot number source link.

  • Scope

All

 

getLotStatusFilter()

Description

Get the custom lot status of results to return.

Syntax

getLotStatusFilter()


  • Parameters

None

  • Returns

String lotStatusFilter - The custom lot status value.

  • Scope

All

 

getMaterialCycleTime()

Description

Get the time taken to complete a material cycle in seconds.

Syntax

getMaterialCycleTime()


  • Parameters

 None

  • Returns

 Integer - The time taken in seconds to complete a material cycle.

  • Scope

All

 

getMaterialRate()

Description

Gets the rate of material for production.

Syntax

getMaterialRate()


  • Parameters

None

  • Returns

double matRate - The rate of material.

  • Scope

All

 

getMaterialRatePeriod()

Description

Gets the material rate period.

Syntax

getMaterialRatePeriod()


  • Parameters

None

  • Returns

String ratePeriod - The material rate period.

  • Scope

All

 getMaterialRef()

Description

Gets the MES object link corresponding to this material property.

Syntax

getMaterialRef()

  • Parameters

None

  • Returns

MES Object Link mesObjectLink - The link corresponding to the material.

  • Scope

All

 

getMaterialRefProperty()

Description

Gets the material reference properties for this material property.

Syntax

getMaterialRefProperty()


  • Parameters

None

  • Returns

MESMaterialRefProperty - The material reference properties. All those children properties to MES material property.

  • Scope

All

 getMaterialRefType()

Description

Gets the reference type of the material.

Syntax

getMaterialRefType()


  • Parameters

None

  • Returns

String materialRefType - The type of the material reference.

  • Scope

All

 getMaterialRefUUID()

Description

Gets the uuid for the material reference.

Syntax

getMaterialRefUUID()


  • Parameters

None

  • Returns

 String  materialRefUUID - The unique identifier for the material reference.

  • Scope

All

 

getOptional()

Description

Get the value of optional property of the material. Optional property defines whether the property is mandatory or optional.

Syntax

getOptional()


  • Parameters

 None

  • Returns

 boolean optional - The optional property of the material.

  • Scope

All

 

getQuantity()

Description

Get the quantity of equipment. This is here in compliance with ISA-95 standard.

Syntax

getQuantity()


  • Parameters

 None

  • Returns

 double quantity - The quantity of equipment.

  • Scope

All

 

getQuantitySource()

Description

Get the value for quantity source property of material.

Syntax

getQuantitySource()


  • Parameters

 None

  • Returns

 double quantitySource - The quantity source property of material.

  • Scope

All

 

getQuantitySourceLink()

Description

Get the value of quantity source link property for material.

Syntax

getQuantitySourceLink(quantityLink)


  • Parameters

None

  • Returns

 double quantityLink - The quantity source link property for material.

  • Scope

All

 

getRate()

Description

Gets the material rate.

Syntax

getRate()


  • Parameters

None

  • Returns

double rate - The material rate.

  • Scope

All

 

getRatePeriod()

Description

Gets the material rate period.

Syntax

getRatePeriod()


  • Parameters

None

  • Returns

String ratePeriod - The material rate period.

  • Scope

All

 

getReferenceOptions(mesObjectType, searchPattern)

Description

Get a list of the available options for the specified MES reference property specified by the object type and search pattern.

Syntax

getReferenceOptions(mesObjectType, searchPattern)


  • Parameters

MESObjectTypes mesObjectType - The MES object type of the links that represent the options. Can be of type: Equipment, AllEquipment, MaterialDef, or MaterialLot.

String searchPattern - The search pattern to filter the results by. It can contain the * and ? wild card characters. 

  • Returns

A list of MES Object Link objects holding the options that are appropriate for the specified property. The list is returned as a MES List object that is a collection holding MES object links that represent the options.

  • Scope

All

 getReferenceOptions(mesObjectType, searchPattern, maxLotReturnCount, lotDescriptionPattern)

Description

Get a list of the available options for the specified MES reference property specified by the parameters.

Syntax

getReferenceOptions(mesObjectType, searchPattern, maxLotReturnCount, lotDescriptionPattern)


  • Parameters

MESObjectTypes mesObjectType - The MES object type of the links that represent the options. Can be of type: Equipment, AllEquipment, MaterialDef, or MaterialLot.

String searchPattern - The search pattern to filter the results by. It can contain the * and ? wild card characters. 

int maxLotReturnCount - The maximum number of lots.

String lotDescriptionPattern - This is a pattern to filter the lot descriptions.

  • Returns

A list of MES Object Link objects holding the options that are appropriate for the specified property. The list is returned as a MES List object that is a collection holding MES object links that represent the options.

  • Scope

All

 

getUnits()

Description

Get units defined for this equipment.

Syntax

getUnits()


  • Parameters

 None

  • Returns

 String units - The units for equipment.

  • Scope

All

 getUse()

Description

Get the value of use property defined for this material.

Syntax

getUse()


  • Parameters

 None

  • Returns

 String use - The use property for material.

  • Scope

All

 isOutUse()

Description

Checks whether the value of use property is Out and returns the corresponding boolean.

Syntax

isOutUse()


  • Parameters

 None

  • Returns

 boolean use - True if the use property for material is Out and False otherwise.

  • Scope

All

 isProductionSelectable()

Description

Checks whether the value of production selectable property is True and returns the corresponding boolean.

Syntax

isProductionSelectable()


  • Parameters

 None

  • Returns

 boolean selectable - True if the production selectable property for material is set to True and False otherwise.

  • Scope

All

 setAutoGenerateLot(autoGenerateLot)

Description

Sets a boolean indicating whether this material property will automatically generate lots or not.

Syntax

setAutoGenerateLot(autoGenerateLot)


  • Parameters

boolean autoGenerateLot - True, if the autoGenerateLot property is set to true and False otherwise.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
material_property_in = process_segment.createComplexProperty('Material''Almonds In')
material_property_in.setAutoGenerateLot(True)  # Will automatically create a new lot
 

setAutoLotCompletion(autoLotCompletion)

Description

Sets the value of auto lot completion property associated with this material property.

Syntax

setAutoLotCompletion(autoLotCompletion)


  • Parameters

String autoLotCompletion - The value to set the auto lot completion property for.

  • Returns

Nothing

  • Scope

All

 setCycleTime(cycleTime)

Description

Sets the lot cycle time in seconds.

Syntax

setCycleTime(cycleTime)


  • Parameters

Sets the lot cycle time in seconds.

  • Returns

Nothing

  • Scope

All

 setEnableSublots(enableSublots)

Description

A boolean indicating whether this response material property will enable sublots or not.

Syntax

setEnableSublots(enableSublots)


  • Parameters

boolean enableSublots - True, if sublots are enabled and False otherwise.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
mat_prop_out = mat_prop_out_process_segment.createComplexProperty('Material''Bagged Almonds Out')
mat_prop_out.setEnableSublots(True# Will enable the ability to create sublots
 

setEquipmentRef(equipmentRef)

Description

 Set reference to the equipment property.

Syntax

setEquipmentRef(equipmentRef)


  • Parameters

 MESObjectLink equipmentRef - Reference to the equipment property.

  • Returns

 Nothing

  • Scope

All

Code Snippet
1
2
3
4
line_link = system.mes.getMESObjectLinkByEquipmentPath('my/line/path')
os = system.mes.loadMESObject('Mix Nuts','OperationsSegment')
material_prop = os.getComplexProperty('Material''Material Out')
material_prop.setEquipmentRef(line_link)

 setEquipmentRefType(equipmentRefType)

Description

 Set the type of equipment reference.

Syntax

setEquipmentRefType(equipmentRefType)


  • Parameters

String equipmentRefType - The type of equipment reference.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
material_prop = ps.createComplexProperty('Material''Material Out')
equip_ref = system.mes.loadMESObject(supplemental_equipment_name, 'Equipment')
material_prop.setEquipmentRefType(equip_ref.getMESObjectTypeName())

 setEquipmentRefUUID(equipmentRefUUID)

Description

 Set the uuid that corresponds to equipment reference.

Syntax

setEquipmentRefUUID(equipmentRefUUID)


  • Parameters

 String equipmentRefUUID - The unique identifier that corresponds to equipment reference.

  • Returns

 Nothing

  • Scope

All

Code Snippet
1
2
3
material_prop = ps.createComplexProperty('Material''Material Out')
equip_ref = system.mes.loadMESObject(supplemental_equipment_name, 'Equipment')
material_prop.setEquipmentRefUUID(equip_ref.getUUID())

 setFinalLotStatus(finalLotStatus)

Description

This is useful for setting a lot to Hold, In Process or anything that can be used to filter lots or sublots. 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 be set to Complete. Optionally, the value of this setting can be used instead of the default Complete. Please note, the Active status while the lot is active cannot be changed.

Syntax

setFinalLotStatus(finalLotStatus)


  • Parameters

String finalLotStatus - The status to set the lot for.

  • Returns

Nothing

  • Scope

All

 

setLotDepletionWarning(lotDepletionWarningSeconds)

Description

Sets the warning of lot depletion in seconds.

Syntax

setLotDepletionWarning(lotDepletionWarningSeconds)


  • Parameters

Integer lotDepletionWarningSeconds - The depletion warning in seconds.

  • Returns

 Nothing

  • Scope

All

 

setLotNumberSource(lotNoSource)

Description

Sets name of the lot number source.

Syntax

setLotNumberSource(lotNoSource)


  • Parameters

String lotNoSource - The name of the lot number source.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
material_prop = ps.createComplexProperty('Material''Material Out')
material_prop.setLotNumberSource('Auto')
 

setLotNumberSourceLink(lotNoSourceLink)

Description

Sets the name of the lot number source link.

Syntax

setLotNumberSourceLink(lotNoSourceLink)


  • Parameters

String lotNoSourceLink - Name of the lot number source link.

  • Returns

Nothing

  • Scope

All

 

setLotStatusFilter(lotStatusFilter)

Description

Set the custom lot status of results to return.

Syntax

setLotStatusFilter(lotStatusFilter)

Tip

If you have them defined, you can also use custom Material Lot Statuses.


  • Parameters

String lotStatusFilter - The custom lot status value.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
# Will look for lots with status of "Active" or "Complete"
material_prop = ps.createComplexProperty('Material''Material Out')
material_prop.setLotStatusFilter('Active,Complete')
 

setMaterialCycleTime(cycleTime)

Description

Sets the material lot cycle time in seconds.

Syntax

setMaterialCycleTime(cycleTime)

Deprecated Function

Function is deprecated. Use setCycleTime()

  • Parameters

Sets the material lot cycle time in seconds.

  • Returns

Nothing

  • Scope

All

 

setMaterialRate(matRate)

Description

Sets the rate of material for production.

Syntax

setMaterialRate(matRate)

Deprecated Function

Function is deprecated. Use setRate()


  • Parameters

Double matRate - The number of units produced per period

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
material_prop = ps.createComplexProperty('Material''Material Out')
material_prop.setMaterialRate(1)
 

setMaterialRatePeriod(ratePeriod)

Description

This is used to set the material rate period.

Options

Min - For setting the rate in minutes.

Hour For setting the rate in hours.

Cycle For setting the rate in cycles.

Syntax

setMaterialRatePeriod(ratePeriod)

Deprecated Function

Function is deprecated. Use setRatePeriod()


  • Parameters

String ratePeriod - The name of material rate period you want to use.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
material_prop = ps.createComplexProperty('Material''Material Out')
material_prop.setMaterialRatePeriod('Min')

 setMaterialRef(mesObjectLink)

Description

Sets an MES object link corresponding to this material property.

Syntax

setMaterialRef(mesObjectLink)


  • Parameters

MES Object Link mesObjectLink - The object link to set for the material.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
material_prop = ps.createComplexProperty('Material''Material Out')
mat_def_link = system.mes.getMESObjectLinkByName('MaterialDef''MatDef1')
material_prop.setMaterialRef(mat_def_link)
 

setMaterialRefType(materialRefType)

Description

Sets the type of material reference.

Syntax

setMaterialRefType(materialRefType)


  • Parameters

String materialRefType - The type to set for the material reference.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
material_resource_property = ps.createComplexProperty('Material''Material to Use')
mat_def_1 = system.mes.loadMESObject('MatDef1''MaterialDef')
material_resource_property.setMaterialRefType(mat_def_1.getMESObjectTypeName())
 

setMaterialRefUUID(materialRefUUID)

Description

Sets the uuid for the material reference.

Syntax

setMaterialRefUUID(materialRefUUID)


  • Parameters

String  materialRefUUID - The unique identifier to set for the material reference.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
material_property_in = process_segment.createComplexProperty('Material''Almonds In')
material_property_in_equipment_reference = system.mes.getMESObjectLinkByName("StorageUnit"'Almond Silo')
material_property_in.setEquipmentRefUUID(material_property_in_equipment_reference.getMESObjectUUID())
 

setOptional(optional)

Description

Set the value of optional property of the material. Optional property defines whether the property is mandatory or optional.

Syntax

setOptional(optional)


  • Parameters

 boolean optional - The optional property of the material.

  • Returns

 Nothing

  • Scope

All

Code Snippet
1
2
material_to_add = ps.createComplexProperty('Material''Material To Add')
material_to_add.setOptional(False)
 

setProductionSelectable(selectable)

Description

Sets the value of production selectable property.

Syntax

setProductionSelectable(selectable)


  • Parameters

 boolean selectable - Set to True to make the property production selectable and set to False otherwise.

  • Returns

 Nothing

  • Scope

All

 

setQuantity(quantity)

Description

Set the default quantity of material to use. This is here in compliance with ISA-95 standard.

Syntax

setQuantity(quantity)

  • Parameters

 double quantity - The quantity of material

  • Returns

 Nothing

  • Scope

All

Code Snippet
1
2
material_to_add = ps.createComplexProperty('Material''Material To Add')
material_to_add.setQuantity(10.0)

 setQuantitySource(quantitySource)

Description

Informs the configuration of quantity data for the material resource.  Examples include manually specifying quantity, using the available quantity of a material lot, or linking to another material resource.

Syntax

setQuantitySource(quantitySource)


  • Parameters

 String quantitySource - The quantity source property to set for material.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
4
#When defining a process segment with a quantity source of type link make sure the QuantitySourceLink for both the in and out match each other.
#This is what is telling the material resources that they are connected to each other.
material_property_in = process_segment.createComplexProperty('Material''Almonds In')
material_property_in.setQuantitySource('Manual')  # Set the quantity source

 setQuantitySourceLink(quantityLink)

Description

Set the value of quantity source link property for material.

Syntax

setQuantitySourceLink(quantityLink)


  • Parameters

 double quantityLink - The quantity source link property to set for material.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# We will connect the lot quantity from "Almonds In" to "Almonds Out"
  
# Since we set the quantity for material_property_in to manual we will define what quantity we want to create
material_property_in = process_segment.createComplexProperty('Material''Almonds In')
material_property_in.setQuantitySource('Manual')
  
# By setting the quantity source link to 'Link' we are exposing the quantity for use to other segments with
# the same link
material_property_in.setQuantitySourceLink('Link')
  
#When defining a process segment with a quantity source of type link make sure the QuantitySourceLink for both the in and out match each other.
#This is what is telling the material resources that they are connected to each other.
material_property_out = process_segment.createComplexProperty('Material''Almonds Out')
material_property_in.setQuantitySource('Link')
material_property_in.setQuantitySourceLink('Link')

 setRate(rate)

Description

Sets the rate for the response material lot.

Syntax

setRate(rate)


  • Parameters

double matRate - The number of units produced per period

  • Returns

Nothing

  • Scope

All

Code Snippet
1
material_resource_property = ps.createComplexProperty('Material''Material to Use')material_resource_property.setRate(1# 1 unit will produced every rate period

 setRatePeriod(ratePeriod)

Description

This is used to set the material rate period.

Options

Min - For setting the rate in minutes.

Hour For setting the rate in hours.

Cycle For setting the rate in cycles.

Syntax

setRatePeriod(ratePeriod)


  • Parameters

String ratePeriod - The name of material rate period you want to use.

  • Returns

Nothing

  • Scope

All

Code Snippet
1
2
material_property_in = process_segment.createComplexProperty('Material''Almonds In')
material_property_in.setRatePeriod('Min'# Every minute the period will trigger

 setUnits(units)

Description

Set units defined for this equipment.

Syntax

setUnits(units)


  • Parameters

 String units - The units for equipment.

  • Returns

 Nothing

  • Scope

All

Code Snippet
1
2
mat_prop = ps.createComplexProperty('Material''Received Nuts')
mat_prop.setUnits('lbs'#Will be recorded in pounds

 setUse(use)

Description

Set the value of use property defined for this material.

Syntax

setUse(use)


  • Parameters

 String use - The use property to set for material ('In', 'Out', 'Consumable', 'By-product'.

  • Returns

 Nothing

  • Scope

All

Code Snippet
1
2
material_property_in = process_segment.createComplexProperty('Material''Almonds In')
material_property_in.setUse('In')

Sepasoft MES Module Suite