--- description: Model the MES Resource hierarchy, contexts, and state model required before implementing the OPC UA Standard. alias: userguide-equipment-integration-opcua-standard-mes-modeling --- # MES Modeling ## Purpose The machine interface depends on the MES model. Complete the following modeling decisions before fixing NodeIds, parameter names, or workflow settings. This page defines **where the physical equipment is represented in MES** and which MES objects support its production process. [OPC UA Address Space](opcua-address-space.md) explains how that approved hierarchy becomes the OPC UA Resource base NodeId, while [Configure MES and the Resource](../configuration/mes-resource-configuration.md) explains how the generated Resource attribute is verified during setup. ## Resource and Equipment Hierarchy Create one MES Resource for each independently operated physical equipment unit. Position it in the equipment hierarchy at the level that reflects its real production responsibility. ```mermaid flowchart TB E("Enterprise") --> S("Site") --> F("Facility") --> A("Area") A --> R1("Resource") A -.-> X("Optional SubArea
or Production Line") X --> R2("Resource") classDef hierarchy fill:#FFFFFF,stroke:#64748B,color:#334155,stroke-width:1.5px; classDef optional fill:#FFFFFF,stroke:#CBD5E1,color:#64748B,stroke-width:1.5px,stroke-dasharray:4 4; classDef resource fill:#075C00,stroke:#075C00,color:#FFFFFF,stroke-width:2px,font-weight:bold; class E,S,F,A hierarchy; class X optional; class R1,R2 resource; linkStyle default stroke:#94A3B8,stroke-width:1.5px; ``` `SubArea` and `Production Line` are alternative names for the same optional level in this interface model. They are not consecutive levels and will be included only when the Resource is actually modelled below it. ## Required MES Model | Object | Why it is needed | Main decision | | --- | --- | --- | | Resource | Represents the physical machine | Name, hierarchy, type, automation scenarios, attributes | | Resource state model | Receives machine state changes | Valid states and transitions | | Material flow | Defines eligible **Track In**, **Track Out**, and **Abort** actions | Product, flow, step, Resource eligibility | | Recipe and Recipe Context | Resolves values downloaded to the machine | Resolution dimensions and parameter names | | Data Collection Definition and Context | Defines values stored from the machine | Parameters, readings, limits, sample behavior | | Smart Table `IndEqResourceStateResolution` | Maps machine states when direct name matching fails | Resource-specific main/substate mappings | ## Modeling Procedure 1. Identify the physical equipment boundary and create or select its MES Resource. 2. Confirm whether the Resource belongs directly to an Area or to an optional SubArea/Production Line. 3. Configure the Resource automation scenarios and recipe support according to the actual machine capabilities. 4. Assign the Resource state model and initial main state. 5. Model the products, flows, steps, and Resource relationships that make Materials eligible. 6. For recipe-enabled equipment, model the recipe hierarchy and exact parameter names. 7. For data collection, model the Data Collection Definition, readings, parameters, and context. 8. Define machine-to-MES state mappings only where direct state-name matching is not possible. 9. Approve the model with MES, automation, and machine-supplier owners before implementing the OPC UA address space. ## Naming Contract **Recipe** and **Data Collection** parameter Tag Names are dynamic but not arbitrary at runtime. They must equal their corresponding **MES Parameter** names. **Sub-recipe** folder names must equal MES sub-recipe display names. Renaming these objects after commissioning changes the machine contract and requires revalidation. ## Validation - [ ] One Resource maps to one intended equipment boundary. - [ ] The hierarchy is resolved and can be mapped in the OPC UA node structure. - [ ] The Resource can execute the required Material operations. - [ ] A state model and valid transitions are assigned. - [ ] Recipe/Data Collection contexts resolve for representative Materials. - [ ] Parameter names are approved by both MES and machine teams.