--- description: Execute automatic and operator-initiated Material Track In through the OPC UA Standard. alias: userguide-equipment-integration-opcua-standard-track-in --- # Track In ## Overview **Track In** records that a Material has started processing at the MES Resource. It can be initiated by the machine or by an operator at a hybrid station. MES remains responsible for validating the Material, Step, Resource, capacity, hold, dispatch, and other configured **Track In** requirements. See [Track In Material](https://help.criticalmanufacturing.com/userguide/business-data/material/track_in_material/) for the product transaction behavior. ## Nodes | Relative node | OPC UA type | Direction | Purpose | | --------------------------------------------- | ----------- | ------------- | ---------------------------------------------------------------- | | `Operation.TrackIn.Material.Name` | `String` | Machine → MES | Exact MES Material name. May be empty only when FIFO is enabled | | `Operation.TrackIn.MachineOperationRequest` | `Boolean` | Machine → MES | Starts a machine-initiated **Track In** | | `Operation.TrackIn.MESOperationPerformed` | `Boolean` | MES → Machine | Indicates that MES performed **Track In** and is waiting for machine confirmation | | `Operation.TrackIn.MachineOperationConfirmed` | `Boolean` | Machine → MES | Acknowledges the performed signal and any downloaded recipe | ## Preconditions - Resource `EnableAutomationScenarios` is `true`. - The Material is eligible for the normal MES **Track In** operation. - The Resource and Step are correct for the Material. - A Material name is supplied, or `IndEqAutomationOperationAllowFIFO` is enabled. - All **Track In** nodes have the required access rights. - If recipe download is enabled, recipe context, parameter nodes, and data types are valid. ## Communication Flow ```mermaid --8<-- "docs/userguide/equipmentintegration/opcua-standard/_includes/mermaid-sequence-theme.txt" sequenceDiagram autonumber actor O as Operator participant M as Machine / PLC participant S as OPC UA Server participant I as Connect IoT participant E as Critical Manufacturing MES alt Machine initiated M->>S: Write Material.Name M->>S: MachineOperationRequest = true S->>I: Request and payload change notification I->>E: Track In resolved Material else Operator initiated O->>E: Track In selected Material in MES UI end E->>E: Validate and perform Track In within transaction opt Recipe management enabled E-->>I: Resolved recipe and parameters I->>S: Write Recipe nodes S-->>M: Recipe values available end E-->>I: Track In performed, awaiting machine confirmation I->>S: MESOperationPerformed = true S-->>M: Performed signal available alt Confirmation before MachineReplyTimeout M->>S: MachineOperationConfirmed = true S-->>I: Confirmation change notification I-->>E: Machine confirmed E->>E: Commit Track In I->>S: MESOperationPerformed = false M->>S: Machine-owned bits = false else MachineReplyTimeout expires I-->>E: Machine confirmation timeout E->>E: Roll back Track In I->>S: MESOperationPerformed = false end ``` ## Step-by-Step Process ### Machine-Initiated 1. The PLC writes `Material.Name`. 2. The PLC sets `MachineOperationRequest = true`, which raises the machine request through Connect IoT. 3. Connect IoT requests **Track In** in MES and provides the explicit Material name when available. 4. MES resolves the explicit Material or, when FIFO is enabled, the first eligible Material for the Resource and Step. 5. MES validates and performs **Track In** within the current transaction. 6. If recipe management is enabled, MES resolves the recipe and Connect IoT writes its parameters. 7. Connect IoT sets `MESOperationPerformed = true` and waits for `MachineOperationConfirmed = true`. 8. When confirmation arrives before `MachineReplyTimeout`, MES commits **Track In**. 9. Both sides return their control bits to `false`. 10. If confirmation does not arrive in time, **Track In** fails and the transaction rolls back. ### Operator-Initiated 1. The operator selects the Material and performs **Track In** in the MES UI; `MachineOperationRequest` is not required. 2. MES validates and performs **Track In** within the current transaction. 3. If required, recipe parameters are resolved and written to the machine. 4. Connect IoT sets `MESOperationPerformed = true` and waits for the machine confirmation. 5. When confirmation arrives before `MachineReplyTimeout`, MES commits **Track In**. 6. The result and confirmation bits are reset. 7. If confirmation does not arrive in time, the operator receives a failure and the transaction rolls back. ## Failure Behavior - In MES automation controller type must be `IndEqController` - In MES resource `EnableAutomationScenarios` must be set to `true` - If Material resolution fails or MES rejects **Track In**, Connect IoT does not set `MESOperationPerformed`. - If the Recipe cannot be resolved or written, the complete transaction rolls back and the Material remains ready to be started. - If the machine does not set `MachineOperationConfirmed = true` before `MachineReplyTimeout` expires, **Track In** is not successful and its transaction rolls back. - After a timeout, reconcile the MES Material state, machine state, and handshake values before retrying. ## Validation and Assumptions - [ ] Explicit Material **Track In** selects the correct Material. - [ ] Empty Material is rejected when FIFO is disabled. - [ ] FIFO selects only the first eligible Material when enabled. - [ ] Operator-initiated **Track In** notifies the machine without a machine request when `EnableAutomationScenarios = true`. - [ ] Recipe values are available before the PLC accepts the performed signal. - [ ] Failure and missing-acknowledgement paths never create duplicate **Track In** operations. - [ ] Resource is set as `EnableAutomationScenarios = true` - [ ] MES automation controller type is `IndEqController`