{
  "version": 2,
  "name": "Bottle Reject Tracking with BSL",
  "exported": "2026-10-14T00:00:00.000Z",
  "notes": "Generic v1.126 example (not tied to one scene). A conveyor carries bottles from an inspection sensor through eight tracked positions; the reject station is at position 6. X1 = infeed photo-eye, ON once per bottle (the shift pulse). X2 = inspection reject sensor, ON = bad bottle. X3 = Reset PB (N.O.). X4 = reject confirm photo-eye at the reject station. C1-C8 = BSL tracking register, one bit per bottle position (C1 = the bottle just inspected). C9 = unload bit: the bit leaving position 8. Y1 = reject solenoid (on while a bad-bottle bit is at position 6). Y2 = missed-reject alarm (latched when a bad-bottle bit leaves the tracked zone).",
  "program": [
    {"id": 1, "rn": 0,
     "comment": "TRACKING SHIFT — once per bottle (P X1) the register moves one position: the inspection result X2 enters C1, every bit moves up, the bit leaving C8 goes to C9",
     "elements": [
       {"id":101,"kind":"contact","type":"P","addr":"X1"},
       {"id":102,"kind":"block","type":"BSL","addr":"C1","len":8,"src":"X2","ul":"C9","pre":0}
     ]},
    {"id": 2, "rn": 1,
     "comment": "REJECT — a bad-bottle bit at position 6 (C6) fires the reject solenoid Y1",
     "elements": [
       {"id":103,"kind":"contact","type":"XIC","addr":"C6"},
       {"id":104,"kind":"output","type":"OTE","addr":"Y1"}
     ]},
    {"id": 3, "rn": 2,
     "comment": "REJECT CONFIRMED — the confirm eye X4 sees the bad bottle leave the line: clear its tracking bit",
     "elements": [
       {"id":105,"kind":"contact","type":"XIC","addr":"C6"},
       {"id":106,"kind":"contact","type":"XIC","addr":"X4"},
       {"id":107,"kind":"output","type":"OTU","addr":"C6"}
     ]},
    {"id": 4, "rn": 3,
     "comment": "MISSED REJECT — a bad-bottle bit shifted out of the register (C9) was never rejected: latch alarm Y2",
     "elements": [
       {"id":108,"kind":"contact","type":"XIC","addr":"C9"},
       {"id":109,"kind":"output","type":"OTL","addr":"Y2"}
     ]},
    {"id": 5, "rn": 4,
     "comment": "RESET — X3 clears every tracking bit, the unload bit and the alarm",
     "elements": [
       {"id":110,"kind":"contact","type":"XIC","addr":"X3"},
       {"id":111,"kind":"output","type":"OTU","addr":"C1"},
       {"id":112,"kind":"output","type":"OTU","addr":"C2"},
       {"id":113,"kind":"output","type":"OTU","addr":"C3"},
       {"id":114,"kind":"output","type":"OTU","addr":"C4"},
       {"id":115,"kind":"output","type":"OTU","addr":"C5"},
       {"id":116,"kind":"output","type":"OTU","addr":"C6"},
       {"id":117,"kind":"output","type":"OTU","addr":"C7"},
       {"id":118,"kind":"output","type":"OTU","addr":"C8"},
       {"id":119,"kind":"output","type":"OTU","addr":"C9"},
       {"id":120,"kind":"output","type":"OTU","addr":"Y2"}
     ]}
  ],
  "comments": {
    "X1": "Infeed Photo-eye (shift)",
    "X2": "Inspection Reject Sensor",
    "X3": "Reset PB",
    "X4": "Reject Confirm Eye",
    "Y1": "Reject Solenoid",
    "Y2": "Missed Reject Alarm",
    "C1": "Track Pos 1 (inspected)",
    "C2": "Track Pos 2",
    "C3": "Track Pos 3",
    "C4": "Track Pos 4",
    "C5": "Track Pos 5",
    "C6": "Track Pos 6 (reject station)",
    "C7": "Track Pos 7",
    "C8": "Track Pos 8",
    "C9": "Bit Leaving Tracking"
  },
  "dregs": {},
  "dfmt": {}
}
