Operation Handshake#
Control Nodes#
Track In, Track Out, and Abort use the same three-bit contract.
| Node | Owner | Meaning |
|---|---|---|
MachineOperationRequest | Machine | Requests that Connect IoT execute the MES operation |
MESOperationPerformed | Connect IoT | Indicates that MES performed the operation within the current transaction and starts the machine-confirmation phase |
MachineOperationConfirmed | Machine | Confirms that the machine consumed the MES result, allowing the MES transaction to complete |
All three bits are Boolean and are normally false while the operation is idle.
Communication Flows#
Machine-Initiated#
sequenceDiagram
autonumber
participant M as Machine / PLC
participant S as OPC UA Server
participant I as Connect IoT
participant E as Critical Manufacturing MES
M->>S: Write Material
M->>S: MachineOperationRequest = true
S->>I: Request and payload change notification
I->>I: Validate Resource, request, and Material Name
I->>E: Execute MES operation
E->>E: Validate and perform within transaction
alt MES validation and processing succeed
E-->>I: Operation performed, awaiting machine confirmation
I->>S: MESOperationPerformed = true
S-->>M: Performed signal available
M->>M: Consume result
alt Confirmation before MachineReplyTimeout
M->>S: MachineOperationConfirmed = true
S-->>I: Confirmation change notification
I-->>E: Machine confirmed
E->>E: Commit transaction
E-->>I: Operation succeeded
I->>S: MESOperationPerformed = false
M->>S: Request and confirmation = false
else MachineReplyTimeout expires
I-->>E: Machine confirmation timeout
E->>E: Roll back transaction
I->>S: MESOperationPerformed = false
I-->>I: Record failure diagnostic
end
else MES validation or processing fails
E-->>I: Failure and rollback
I-->>I: Record diagnostic, performed remains false
end Step by step:
- The machine writes the operation payload, including
Material.Namewhen available. - The machine sets
MachineOperationRequest = trueonce. - Connect IoT resolves the applicable Resource and Material.
- Connect IoT invokes the corresponding MES operation.
- MES applies its normal preconditions and performs the operation within the current transaction.
- Connect IoT sets
MESOperationPerformed = trueand starts waiting for the machine confirmation. - The machine consumes the result and sets
MachineOperationConfirmed = true. - When confirmation arrives before
MachineReplyTimeout, MES commits the transaction. - Connect IoT resets
MESOperationPerformed. - The machine resets its request and confirmation bits.
- If the confirmation does not arrive in time, the command fails and the MES transaction rolls back.
Operator-Initiated and Hybrid#
sequenceDiagram
autonumber
actor O as Operator
participant U as MES UI
participant E as Critical Manufacturing MES
participant I as Connect IoT
participant S as OPC UA Server
participant M as Machine / PLC
O->>U: Perform Track In, Track Out, or Abort
U->>E: Execute standard MES operation
E->>E: Validate and perform within transaction
E-->>I: Operation event, awaiting machine confirmation
I->>S: MESOperationPerformed = true
S-->>M: Performed signal available
M->>M: Consume MES-originated result
alt Confirmation before MachineReplyTimeout
M->>S: MachineOperationConfirmed = true
S-->>I: Confirmation change notification
I-->>E: Machine confirmed
E->>E: Commit transaction
E-->>U: Operation succeeded
U-->>O: Success
I->>S: MESOperationPerformed = false
M->>S: MachineOperationConfirmed = false
else MachineReplyTimeout expires
I-->>E: Machine confirmation timeout
E->>E: Roll back transaction
E-->>U: Operation failed
U-->>O: Failure
I->>S: MESOperationPerformed = false
end In this path:
- The operator acts through the MES UI.
- MES validates and performs the standard operation within its transaction.
MachineOperationRequestremainsfalse.- The affected Material is taken from the MES operation context, not from the OPC UA Material node.
- The machine must monitor
MESOperationPerformedeven when it did not issue a request. - MES commits the operation only after the machine confirms within
MachineReplyTimeout.
Material Resolution#
For a machine-initiated request, Connect IoT resolves the Material in this order:
- If
Operation.<Operation>.Material.Nameis non-empty, resolve that exact MES Material. - Otherwise, read
IndEqAutomationOperationAllowFIFOfrom the Resource attribute. - If FIFO is disabled, reject the request.
- If FIFO is enabled, select the first eligible Material for the operation.
| Operation | FIFO source when enabled |
|---|---|
| Track In | First eligible queued/dispatched Material for the Resource and Step |
| Track Out | First eligible in-process Material at the Resource and Step |
| Abort | First eligible in-process Material at the Resource and Step |
FIFO does not mean an arbitrary Material. The selected Material must still satisfy the normal MES operation rules.
Missing Acknowledgement and Recovery#
After setting MESOperationPerformed = true, Connect IoT waits for MachineOperationConfirmed = true for the period configured by /IndEq/Automation/OpcUaServer/MachineReplyTimeout/.
- If confirmation is received in time, the MES operation completes and its transaction commits.
- If the timeout expires first, the command fails, the MES operation is not successful, and its transaction rolls back.
- A rollback restores the MES transaction, but it cannot prove that the physical machine did not already react to the performed signal.
- Recovery must reconcile MES, handshake values, and the physical machine state before resetting or retrying.
See Automation Timeout Settings for configuration guidance.
Reset Contract#
The idle state is:
The machine must not raise a new request until the previous cycle has returned to idle. Connect IoT must not interpret a bit that remained high from the preceding cycle as a new request.