Sequence recovery logic is the control-layer behavior that returns a material handling operation to a known, safe, and resumable state after an interruption. It sits between the PLC state machine and the WCS orchestration layer, and it becomes most visible at shift boundaries: loads are parked in conveyor zones, carriers wait at transfer points, alarms remain active, and the incoming team must decide what is safe to restart. A shift-level diagnostic playbook is not a single fault-finding runbook. It is a repeatable discipline for interpreting recovery behavior across handoffs, repeated events, and partial completions. This article describes that discipline in practical terms for warehouse operators, maintenance technicians, and controls teams. Site procedures, lockout requirements, OEM documentation, and competent engineering judgment always take priority over generic guidance.
Defining Recovery Logic at the Shift Horizon #
Recovery logic is invoked whenever a sequence cannot finish in a single continuous pass. Typical triggers include an emergency stop, a jam clearance, a photoeye that fails to confirm a load, a WCS command timeout, or a communication gap between the PLC and host. In each case, the control system must decide what is true about the material, where it physically sits, and which step in the sequence can be re-entered. That decision is not a restart; it is a state reconciliation.
At the shift level, recovery takes on an additional dimension. A shift may see multiple interruptions across different zones, and the recovery actions taken by one crew may not be visible to the next. When recovery logic behaves poorly, the symptoms rarely appear at the moment of the fault. They appear later, as a stalled transfer point, a phantom load, or a WCS that believes a carrier is occupied when the PLC sees it as empty. The playbook, therefore, begins with a clear definition of what recovery means: returning the PLC, the WCS, and the physical material to a mutually consistent condition before normal throughput resumes.
The PLC State Machine and Its Recovery States #
Most sequence recovery logic is built on a state machine within the PLC. The state machine does not just track machine motion; it tracks the permission to move. Understanding those states is the starting point for any shift-level diagnosis. The names and implementations vary by OEM, but the following states appear consistently in conveyor, sorter, and shuttle applications.
| State | Operational Meaning | Typical Recovery Trigger |
|---|---|---|
| IDLE | No active sequence; equipment is ready but not executing | Normal reset after an aborted run |
| EXECUTING | Sequence is moving material toward a defined goal | New command accepted from WCS |
| HOLDING | Sequence has paused without abandoning material position | Momentary operator pause or upstream shortage |
| RECOVERY_NEEDED | A fault has occurred and the state cannot proceed safely | Photoeye mismatch, jam, or missed confirmation |
| RECOVERY_IN_PROGRESS | PLC is actively reconciling material position and permissions | Manual confirmation or auto-diagnostic step |
| RECOVERY_COMPLETE | Material position is confirmed and sequence can resume | Successful state reconciliation |
| FAULTED | Recovery is not possible without intervention | Multiple failed reconciliation attempts |
At shift level, the important question is not only which state the PLC is in, but how long it has been there. A zone that sits in RECOVERY_NEEDED for hours, then clears by itself, points to an intermittent sensor. A zone that faults again immediately after RECOVERY_COMPLETE points to a sequence logic problem rather than a physical cause.
WCS Orchestration: Command, Acknowledgment, and Sequence Numbers #
The WCS does not typically read every photoeye or drive status. It orchestrates commands and expects the PLC to report outcomes. When recovery logic runs inside the PLC, the WCS must remain aware of the recovery. This is usually achieved through a defined message set: command issued, command acknowledged, action started, action completed, and fault reported. The recovery itself is either reported as a distinct status or folded into the fault status with a recovery flag.
Sequence numbers are the binding element. A WCS assigns a sequence number to a move command, and the PLC returns that same number in its acknowledgment and completion messages. When recovery logic clears a fault, it must decide whether the original sequence number remains valid. If the material moved during the fault, the sequence may have to be abandoned and a new one issued. A common shift-level failure occurs when the PLC completes recovery using the old sequence number while the WCS has already invalidated that sequence and moved on. The mismatch produces an orphaned load: the WCS shows the load as delivered, while the PLC still holds it in a recovery state.
Diagnostically, this means the first thing to inspect is not a hard fault but a message sequence trace. If the WCS and PLC disagree about the last completed sequence number, the recovery logic has likely recovered the machine but not the transaction. That distinction is central to the shift-level playbook.
Shift Handoff: The Most Common Recovery Failure Window #
Shift handoffs expose recovery logic failures because the knowledge of what happened begins to decay. The operator who cleared the jam may know that they pushed a load back one zone manually. The incoming operator only sees that the zone is occupied and the PLC is waiting for confirmation. If that manual adjustment was not reflected in a reset or acknowledgment, the recovery logic will use stale sensor data as truth.
A disciplined handoff must therefore include a recovery statement, not just an alarm count. Useful handoff information includes which sequence numbers were active, which zones were manually manipulated, which recovery actions were attempted, and whether the PLC was left in a state that requires operator acknowledgment. When this information is missing, the incoming team should treat every active recovery flag as unverified. Attempting a remote restart without understanding the physical position of material is a common cause of repeated jam events during the first hour of a shift.
Collecting Evidence Before Changing Logic #
There is a strong temptation to modify recovery times or bypass a step after the second repeat of a fault. A shift-level playbook resists that temptation. Evidence collection must precede any logic change, and the evidence must cover more than the last few seconds before the fault. Collect the following before deciding that recovery logic is wrong:
- PLC state transition history, showing every change in the relevant state machine for at least the last ten cycles
- Photoeye state logs at the affected zone and its immediate upstream and downstream neighbors
- WCS command and acknowledgment messages with sequence numbers and time offsets
- Operator statements describing any manual handling of material during the fault period
- Alarm timestamps aligned to a single clock source, not to the wall clock of the HMI
- Any maintenance activity in the zone, such as sensor cleaning, drive replacement, or flow-controller adjustment
When the evidence is assembled, look for the recovery logic entry condition. Did the recovery run because a photoeye was blocked at the wrong time, or because the WCS commanded a move into an occupied zone? The first suggests a sensor or positioning issue. The second suggests an orchestration or sequence number issue. Confusing these two layers is the source of many unnecessary logic rewrites.
A Shift-Level Diagnostic Table for Recovery Patterns #
The following table maps common shift-observed patterns to likely recovery logic faults. It is a decision support tool, not a substitute for reading the actual code or consulting the OEM.
| Observed Pattern | Likely Recovery Logic Fault | Evidence to Pull First | Initial Containment |
|---|---|---|---|
| Load advances through one zone, then reverses after WCS acknowledgment | Sequence number mismatch between PLC and WCS after recovery | WCS message trace and PLC sequence counter | Place zone in manual hold, confirm load position with operators |
| Recovery completes but WCS never receives a completion message | Lost or unacknowledged completion handshake | PLC outbound message queue and WCS receive log | Do not reissue the command until old sequence is validated |
| Same jam at the same transfer point after every manual clearance | Recovery flag not cleared; stale sensor state assumed correct | Photoeye state on both sides of the transfer, reset count | Check for a hidden latch bit in the zone logic |
| PLC shows IDLE while WCS shows EXECUTING for the same load | Recovery ran on the PLC but the WCS was never notified | Status message timestamps, heartbeat log | Force a WCS transaction resync per OEM procedure |
| Multiple zones enter RECOVERY_NEEDED simultaneously after a restart | Recovery logic propagated a single fault condition across zones | Common mode input such as a shared power supply or communication bus | Restart only after confirming all physical material positions |
| Recovery takes progressively longer each shift | Timeout values being tuned up without addressing root cause | Recovery duration trend across the last 14 days | Return timeout to baseline and monitor sensor performance |
Use the table as a conversation starter between operations and controls. The value is not in the exact row match; it is in separating the symptom pattern from the logic location.
Interpretation Errors That Mask Recovery Faults #
Several conditions look like recovery logic failures but are actually environmental or interface issues. A dirty photoeye that clears and blocks with vibration will produce a recovery entry, but the logic is working as designed. An Ethernet switch with a failing port will cause the WCS to miss a completion message, but the PLC recovery state may be correct. A conveyor drive with an intermittent overload will fault the zone, and the recovery logic will try to start again, only to see the overload return. In each case, the recovery logic is doing its job; the physical or network layer is the true offender.
Another common misinterpretation is treating recovery time as a tuning parameter. If a recovery step takes eight seconds and the alarm is set at ten, someone increases the alarm to twenty to stop the nuisance. That hides a growing problem. Recovery time should be measured as a performance indicator, not silenced. A rising trend in recovery duration across a shift is an early signal that a drive, a sensor, or a mechanical component is degrading. The recovery logic is effectively providing free predictive diagnostics, provided the team reads it as a trend rather than an event.
Maintenance Actions That Interact with Recovery Logic #
Maintenance work has a direct effect on sequence recovery because the PLC uses physical inputs to infer material position. When a technician replaces a photoeye, repositions a sensor, or manually rotates a conveyor roll to clear a jam, the PLC does not automatically know that the physical truth has changed. Recovery logic may be waiting for a sensor that has been disconnected, or it may be holding a state that is no longer valid because a load was removed by hand.
Maintenance procedures should therefore include a recovery reset step after any intervention that touches material or sensing. The reset step is not a bypass; it is a controlled way of telling the PLC that physical and logical states have been reconciled. Without this step, the maintenance team will leave the zone in a state that the recovery logic cannot resolve on its own. The incoming shift will then see a FAULTED state and may be forced to cycle power, which clears both the fault and the sequence history, potentially causing the WCS to lose track of material.
Escalation Boundaries for Controls Engineering #
The shift-level playbook needs clear escalation boundaries. Operators and maintenance technicians should be able to contain a symptom and collect evidence without being expected to modify recovery logic. Escalate to controls engineering when any of the following conditions appear:
- The same recovery failure recurs after sensor and mechanical issues have been ruled out
- Sequence numbers in the PLC and WCS cannot be reconciled within the same shift
- Recovery logic enters a loop, cycling through RECOVERY_IN_PROGRESS and FAULTED without operator action
- A zone or carrier is marked FAULTED even though physical material is absent
- Multiple zones are affected by a single recovery action, indicating a common logic path
Escalation is not a failure of the shift team. It is the point at which the diagnostic question changes from “what happened in the field” to “what is the intended recovery behavior in code.” Controls engineering should be given the complete evidence package from the shift team, not just a request to look at the program. The evidence package should include timestamps from the PLC and WCS, the sequence number history, and a description of any manual intervention. This prevents the engineer from repeating the diagnosis from scratch.
Closeout Evidence and the Recovery Log #
A diagnostic is not complete when the machine restarts. It is complete when the recovery event is recorded in a way that can be compared to future occurrences. A useful closeout entry contains the date and time of the original fault, the affected zone or sequence, the sequence numbers involved, the trigger that initiated recovery, the action taken to clear the fault, whether a logic change was made,