Two-Step Handoff Without Clear (BaggerReady / AccumFull)
HIGH
Static analysis note: Detailed routine code was available for BaggingStage (L2_BAGGER_PLC). KittingStage and CartoningStage were available as structural summaries (tag counts, routine names, AOI counts) without full rung-level code.
Finding 1 — [KittingStage → BaggingStage] No TrayAccepted ACK
FINDING TYPE: Inter-Station Missing Handshake
BaggerReady is consumed by KittingStage's TrayTransfer interlock, but BaggingStage advances its bagger cycle on a local LS_501_Infeed sensor only — no cross-station ACK from KittingStage confirms the tray was accepted before the next bag cycle starts.
AccumRequest flows from CartoningStage and AccumGate opens in response, but no AccumTaken Consumed tag returns from CartoningStage to confirm bag pickup before the gate re-evaluates on the next scan with stale slot-count state.
Finding 3 — [BaggingStage → CartoningStage] Flags published but never cleared
FINDING TYPE: Two-Step Handoff Without Clear
L2_BAG_Status.BaggerReady and AccumFull are published in the produced tag, but neither side clears these flags after the handoff — risking stale-state acceptance on the next bag cycle.
Recommended Remediation
#
Action
Owner
1
Add TrayAccepted ACK to L2_BAG_Status, set on infeed-gate confirm
BaggingStage (r_IOMap, r_ProducerTags)
2
Consume AccumTaken from CartoningStage; gate release on valid ACK
BaggingStage (r_Accumulator)
3
Clear BaggerReady / AccumFull after each confirmed handoff
BaggingStage + CartoningStage
All three gaps are inter-station and require coordinated changes on both the producing and consuming controllers. Re-run /missing-handshake line /report after applying the fixes to confirm closure before the next commissioning window.
Generated by PLCs.ai
P
Toy Bricks›Projects (6)Design PartnerComplimentary access×
AllActiveArchivedAll My Teams ▾⇅ Last accessed⚲↑ Upload Project
Project
Vendor
Team
Status
Uploaded
Last accessed
LINELine 2 Kit Assembly· 3 STATIONS
2KittingStage
Allen-Bradley
Toy Bricks team OL
Active
May 21, 2026
1 week ago
3BaggingStage
Allen-Bradley
Toy Bricks team OL
Current
May 21, 2026
Just now
v3
BaggingStage
Ohad Lev-AretzMay 28, 2026, 3:38 PM115.2 KB↓ ↻ 🗑
→ ~1 routine +1 tag ~1 UDT
v2
BaggingStage
Ohad Lev-AretzMay 28, 2026, 2:12 PM115.2 KB↓ ↻ 🗑
→ ~1 UDT
v1
BaggingStageInitial version
Ohad Lev-AretzMay 21, 2026, 2:38 PM115.2 KB↓ 🗑
1CartoningStage
Allen-Bradley
Toy Bricks team OL
Active
May 21, 2026
6 days ago
Supported platforms (upload instructions)
✓
Project saved
All changes saved as version v3.
P
Code EditorAnalysisBaggingStage✓✕↓
Project TreeSTLadderFBDSFCHMI
Showing ST routine: MainProgram → r_IOMap
Clear selection in L5X Project Tree to edit SCL code
// RULE: Only r_OutputMap writes physical outputs.
// — Valve / solenoid feedback → AOI inputs
InfeedGate.CmdOpen := SOL_501_InfeedGate;
InfeedGate.FBClosed := NOT SOL_501_InfeedGate;
DivertGate.CmdOpen := SOL_502_Divert;
AccumGate.CmdOpen := SOL_503_AccumGate;
// — PowerFlex525 inputs
VFD_501.DriveStatus := ME_501_DriveStatus;
VFD_501.MaxRPM := 1750.0;
// r_ProducerTags — build L2_BAG_Status produced tag for PLC4 and PLC6
Heartbeat := Heartbeat + 1;
L2_BAG_Status.Heartbeat := Heartbeat;
L2_BAG_Status.BaggerReady := BaggerReady;
L2_BAG_Status.AccumFull := BA_501.Full;
L2_BAG_Status.AccumSlotCount := BA_501.SlotCount;
// Consume recipe ID from kitting master
IF L2_KIT_Status.Heartbeat MOD2 = 0THEN
ActiveRecipeID := L2_KIT_Status.ActiveRecipeID;
END_IF;
// r_Accumulator — BA-501 5-slot bag accumulator control
// Accepts bags when gate open; closes when full or PackML not Execute
BA_501(EnableIn := 1);
// Gate opens when cartoning stage requests bags
IF PackML_State = 6AND NOT BA_501.Full THEN
AccumGate.CmdOpen := L2_KIT_Status.AccumRequest;
ELSE
AccumGate.CmdOpen := 0;
END_IF;
AccumGate(EnableIn := 1);
Module Review✓×
1 of 3ST • UPDATE
MainProgram/r_IOMap
‹ BackUse Accept/RevertNext ›Done
Explain
Generate
+ New
Project: BaggingStage · Line: Line 2 Kit Assembly(3 stations)
/missing-handshake line /report
Looking across 3 stations — checking handshake pairs…
Line 2 Kit Assembly — Cross-Station Handshake Audit
Full analysis of the Line 2 Kit Assembly production line (3 stations: KittingStage → BaggingStage → CartoningStage), examining every cross-station Produced/Consumed tag pair, command/ACK symmetry, and step-transition gating.