Sepasoft MES Module Suite
Unit | Object Members
Sepasoft MES Module Suite
MES Unit
A Unit object represents a piece of equipment and its control modules within the MES Production Equipment Model for the Batch Procedure module. During batch execution, a Unit Procedure is allocated to a single Unit while that step is active.
Use this page as a scripting and object-reference guide for the Unit MES object. For UI configuration details, see Unit | Batch Procedure. For the broader hierarchy and modeling concepts, see Production Equipment Model and Batch Procedure Framework.
Object Type Name
Use this name when scripting: Unit
For background on MES object type names, see MES Object Type Name.
Object Identity
Field | Value |
|---|---|
MES Object Type Name | Unit |
Kind | Definition |
Required Module | Batch Procedure |
Java Class | MESUnit |
Units are created in the MES Equipment Manager and are typically placed under a Process Cell. A Unit is a leaf node in the production equipment hierarchy and does not contain child equipment objects.
A Unit can be assigned to a Unit Class, which defines the phase structure and parameters available to that Unit during batch execution. Units also support batch-specific settings such as shared-resource allocation, minimum and maximum capacity, transfer paths, and layout position.
Object Hierarchy
Relationship | Allowed Type(s) | Notes |
|---|---|---|
Parent | ProcessCell, EquipmentClass | In normal use, Units are created under a Process Cell |
Children | None | Units are leaf nodes |
Related Objects | BatchUnitClass | Assigned through the Unit Class link |
Obtaining a Unit in Scripts
You can work with Units either through the general MES scripting API or the Batch-specific Unit scripting module.
By name
Python |
unitLink = system.mes.batch.unit.getLink("Mixer 1") unit = unitLink.getMESObject() |
By equipment path
Python |
unitLink = system.mes.batch.unit.getLink(r"Enterprise\Site\Area\Process Cell 1\Mixer 1") unit = unitLink.getMESObject() |
By object type name
Python |
unitLink = system.mes.getMESObjectLinkByName("Unit", "Mixer 1") unit = unitLink.getMESObject() |
List Units under a Process Cell
Python |
processCellLink = system.mes.batch.unit.getProcessCellLink("Process Cell 1") unitLinks = system.mes.batch.unit.getLinks(processCellLink, 0, 2147483647, "") |
Common Inherited Members
The Unit object inherits common members from the MES object and equipment object base classes. The members below are the ones most commonly used in scripts.
Member | Return Type | Description |
|---|---|---|
getName() | String | Returns the Unit name |
setName(name) | None | Sets the Unit name |
getDescription() | String | Returns the description |
setDescription(description) | None | Sets the description |
getUUID() | String | Returns the unique object identifier |
isEnabled() | Boolean | Returns whether the object is enabled |
setEnabled(enabled) | None | Enables or disables the Unit |
isModified() | Boolean | Returns whether the Unit has unsaved changes |
asLink() | MESObjectLink | Returns a lightweight link to this Unit |
save() | None | Saves changes to the Unit |
getEquipmentPath() | String | Returns the full equipment path |
getPathFromArea() | String | Returns the path below the Area level |
isActive() | Boolean | Returns whether the Unit is active |
setActive(active) | None | Sets the Unit as active or inactive |
getEquipmentStatus() | String | Returns the configured equipment status |
setEquipmentStatus(status) | None | Sets the equipment status |
getEquipmentModeClassUUID() | String | Returns the Equipment Mode Class UUID |
setEquipmentModeClassUUID(uuid) | None | Sets the Equipment Mode Class UUID |
getEquipmentStateClassUUID() | String | Returns the Equipment State Class UUID |
setEquipmentStateClassUUID(uuid) | None | Sets the Equipment State Class UUID |
getIgnitionSchedule() | String | Returns the configured Ignition schedule string |
setIgnitionSchedule(schedule) | None | Sets the Ignition schedule |
hasIgnitionSchedule() | Boolean | Returns whether a schedule is configured |
getIgnitionScheduleNames() | List[String] | Returns configured schedule names |
getLotHandlingMode() | Enum | Returns the current lot handling mode |
setLotHandlingMode(mode) | None | Sets the lot handling mode |
getZeroLotThreshold() | Double | Returns the zero-lot threshold |
setZeroLotThreshold(value) | None | Sets the zero-lot threshold |
getZeroLotThresholdMethod() | Enum | Returns the zero-lot threshold method |
setZeroLotThresholdMethod(method) | None | Sets the zero-lot threshold method |
getDowntimeDetectionMode() | Enum | Returns the downtime detection mode |
setDowntimeDetectionMode(mode) | None | Sets the downtime detection mode |
Unit-Specific Members
The following members are specific to the Unit object or are particularly important for batch behavior.
Unit Class Assignment
Member | Return Type | Description |
|---|---|---|
hasUnitClassLink() | Boolean | Returns True if a Unit Class is assigned |
getUnitClassLink() | MESObjectLink | Returns the assigned Unit Class link |
setUnitClassLink(unitClassLink) | None | Assigns a Unit Class link directly |
Shared Resource Behavior
Member | Return Type | Description |
|---|---|---|
isSharedUnit() | Boolean | Returns whether the Unit is configured as a shared resource |
setSharedUnit(sharedUnit) | None | Sets whether the Unit is shared |
A shared Unit can be allocated by recipe logic using the Allocate and Deallocate phases. For more information, see Allocate Phase.
Remote Execution
Member | Return Type | Description |
|---|---|---|
isRemoteEnable() | Boolean | Returns whether Unit Produce is configured to run on a remote server |
setRemoteUnit(remoteUnit) | None | Enables or disables remote Unit execution |
Capacity
Member | Return Type | Description |
|---|---|---|
getMinCapacity() | Double | Returns the minimum supported batch size |
setMinCapacity(minCapacity) | None | Sets the minimum supported batch size |
getMaxCapacity() | Double | Returns the maximum supported batch size |
setMaxCapacity(maxCapacity) | None | Sets the maximum supported batch size |
Layout Position
Member | Return Type | Description |
|---|---|---|
getXPosition() | Integer | Returns the X position used in Unit layout views |
setXPosition(xPosition) | None | Sets the X position |
getYPosition() | Integer | Returns the Y position used in Unit layout views |
setYPosition(yPosition) | None | Sets the Y position |
Transfer Paths
Member | Return Type | Description |
|---|---|---|
addTransferDestination(destUnitLink) | None | Adds a transfer path from this Unit to another Unit |
removeTransferPath(destUnitLink) | None | Removes a transfer path to the destination Unit |
getTransferPathList() | List | Returns the configured transfer paths |
Transfer paths are used to represent allowed unit-to-unit transfer destinations.
Related Objects
Member | Return Type | Description |
|---|---|---|
getLinksToRelatedObjects(includeOutgoingReferences) | List[MESObjectLink] | Returns related object links, including the assigned Unit Class when present |
system.mes.batch.unit Script Functions
The Batch Procedure module exposes a Unit script module at:
system.mes.batch.unit
Functions
Function | Return Type | Description |
|---|---|---|
MESObjectLink | Returns a Process Cell link by name | |
Integer | Returns the number of Units under a Process Cell | |
List[MESObjectLink] | Returns paged Unit links | |
MESObjectList | Returns paged Unit objects | |
MESObjectLink | Returns a Unit link by name or equipment path | |
MESUnit | Assigns a Unit Class to a Unit and saves it | |
MESUnit | Removes the Unit Class assignment and saves it | |
getAllocationList(pageNumber, pageSize, searchPattern, includeAllocation, includeWaiting) | List | Returns current active and waiting allocation requests |
None | Changes the priority of a waiting allocation request |
getCount(parentLink, searchPattern)
Returns the number of Units that exist for the provided Process Cell and search pattern.
parentLink: link to the Process Cell object. If None is provided, the first Process Cell is used.
searchPattern: case-insensitive substring filter. Use "" for no filtering.
getLinks(parentLink, pageNumber, pageSize, searchPattern)
Returns Unit links under a Process Cell.
pageNumber: use 0 if paging is not needed
pageSize: use a large value such as 2147483647 if paging is not needed
getList(parentLink, pageNumber, pageSize, searchPattern)
Returns full Unit objects instead of links.
getLink(name)
Returns a Unit link from either:
the Unit name, or
the full equipment path
assignUnitClass(unitLink, unitClassLink)
Assigns a Unit Class to a Unit and saves the updated Unit.
A Unit can only have one Unit Class assignment at a time.
unassignUnitClass(unitLink)
Removes the existing Unit Class assignment and saves the Unit.
getAllocationList(...)
Returns a snapshot of allocation requests.
includeAllocation=True includes active allocations
includeWaiting=True includes waiting allocation requests
changeAllocationPriority(allocationRequest, newPriority)
Changes the priority of a waiting allocation request. A lower numeric value is higher priority, so 1 is the highest priority.
Examples
Load a Unit and read properties
Python |
unitLink = system.mes.batch.unit.getLink("Mixer 1") unit = unitLink.getMESObject() print unit.getName() print unit.getEquipmentPath() print unit.getMinCapacity() print unit.getMaxCapacity() |
Assign a Unit Class
Python |
unitLink = system.mes.batch.unit.getLink("Mixer 1") unitClassLink = system.mes.batch.unitclass.getLink("Mixer Unit Class") unit = system.mes.batch.unit.assignUnitClass(unitLink, unitClassLink) print unit.getUnitClassLink() |
Remove a Unit Class assignment
Python |
unitLink = system.mes.batch.unit.getLink("Mixer 1") unit = system.mes.batch.unit.unassignUnitClass(unitLink) |
Update shared-unit behavior
Python |
unitLink = system.mes.batch.unit.getLink("Heater 1") unit = unitLink.getMESObject() unit.setSharedUnit(True) unit.save() |
Configure transfer paths
Python |
sourceLink = system.mes.batch.unit.getLink("Tank 1") destLink = system.mes.batch.unit.getLink("Mixer 1") sourceUnit = sourceLink.getMESObject() sourceUnit.addTransferDestination(destLink) sourceUnit.save() |
List Units under a Process Cell
Python |
processCellLink = system.mes.batch.unit.getProcessCellLink("Process Cell 1") unitLinks = system.mes.batch.unit.getLinks(processCellLink, 0, 2147483647, "") for link in unitLinks: print link.getName() |
Constraints and Validation
Naming rules
Unit names must follow the production equipment naming rules. For the full list of disallowed characters and naming considerations, see Production Equipment Model.
Units must be unique among sibling objects under the same parent.
Unit Class scope
All Units assigned to the same Unit Class must belong to the same Process Cell. Attempting to assign a Unit Class that is already associated with Units under a different Process Cell will fail.
Transfer path validation
A transfer destination must be a valid Unit link. Duplicate transfer paths are not allowed.
Rename behavior
As with other production equipment objects, renaming a Unit effectively creates a new object identity for the new path. Historical data remains associated with the old object path. Plan naming conventions carefully before deployment.
Common Exceptions
Situation | Behavior |
|---|---|
getUnitClassLink() when no Unit Class is assigned | Throws an exception |
assignUnitClass() with an invalid unitLink | Throws an exception |
assignUnitClass() with an invalid unitClassLink | Throws an exception |
Assigning a Unit Class across different Process Cells | Throws an exception |
addTransferDestination() with an invalid destination link | Throws an exception |
addTransferDestination() when the path already exists | Throws an exception |
removeTransferPath() for a destination that does not exist | Throws an exception |
Notes on Batch Behavior
A Unit supports Batch Procedure behavior and is batch-enabled.
Units include batch parameter tag support for phase parameter exchange with equipment tags.
Units do not contain child equipment objects.
Units are distinct from supplemental Equipment objects used elsewhere in the MES equipment model.
Related Topics
Sepasoft MES Module Suite