{
  "version": 2,
  "name": "Conveyor Shuttle Control",
  "exported": "2026-09-16T00:00:00.000Z",
  "notes": "Conveyor scene. Press Start to travel right to X4, reverse back to X3, then stop. Stop (N.C.) drops everything. Idle = C1 and C2 both OFF.",
  "program": [
    {"id": 1, "rn": 0,
     "comment": "START ONE-SHOT — C3 ON for one scan when X1 goes true (X1 AND NOT C4)",
     "elements": [
       {"id":101,"kind":"contact","type":"XIC","addr":"X1"},
       {"id":102,"kind":"contact","type":"XIO","addr":"C4"},
       {"id":103,"kind":"output","type":"OTE","addr":"C3"}
     ]},
    {"id": 2, "rn": 1,
     "comment": "START MEMORY — C4 follows X1; must be after Rung 0 so the one-shot works",
     "elements": [
       {"id":104,"kind":"contact","type":"XIC","addr":"X1"},
       {"id":105,"kind":"output","type":"OTE","addr":"C4"}
     ]},
    {"id": 3, "rn": 2,
     "comment": "START REQUEST — Stop OK, Start pulse, and Idle (not Forward, not Reverse)",
     "elements": [
       {"id":106,"kind":"contact","type":"XIC","addr":"X2"},
       {"id":107,"kind":"contact","type":"XIC","addr":"C3"},
       {"id":108,"kind":"contact","type":"XIO","addr":"C1"},
       {"id":109,"kind":"contact","type":"XIO","addr":"C2"},
       {"id":110,"kind":"output","type":"OTE","addr":"C5"}
     ]},
    {"id": 4, "rn": 3,
     "comment": "REVERSE STATE — enter at right limit X4 from Forward or Start request; hold until left limit X3; Stop drops it",
     "elements": [
       {"id":111,"kind":"contact","type":"XIC","addr":"X2"},
       {"id":118,"kind":"parallel","type":"XIC","addr":"","branches":[
         [
           {"id":112,"kind":"contact","type":"XIC","addr":"C1"},
           {"id":113,"kind":"contact","type":"XIC","addr":"X4"}
         ],
         [
           {"id":114,"kind":"contact","type":"XIC","addr":"C5"},
           {"id":115,"kind":"contact","type":"XIC","addr":"X4"}
         ],
         [
           {"id":116,"kind":"contact","type":"XIC","addr":"C2"},
           {"id":117,"kind":"contact","type":"XIO","addr":"X3"}
         ]
       ]},
       {"id":119,"kind":"output","type":"OTE","addr":"C2"}
     ]},
    {"id": 5, "rn": 4,
     "comment": "FORWARD STATE — Start request or seal-in; drops at right limit X4, when Reverse is on, or on Stop",
     "elements": [
       {"id":120,"kind":"contact","type":"XIC","addr":"X2"},
       {"id":123,"kind":"parallel","type":"XIC","addr":"","branches":[
         [
           {"id":121,"kind":"contact","type":"XIC","addr":"C1"}
         ],
         [
           {"id":122,"kind":"contact","type":"XIC","addr":"C5"}
         ]
       ]},
       {"id":124,"kind":"contact","type":"XIO","addr":"X4"},
       {"id":125,"kind":"contact","type":"XIO","addr":"C2"},
       {"id":126,"kind":"output","type":"OTE","addr":"C1"}
     ]},
    {"id": 6, "rn": 5,
     "comment": "Y1 CONVEYOR RUN — Forward OR Reverse",
     "elements": [
       {"id":129,"kind":"parallel","type":"XIC","addr":"","branches":[
         [
           {"id":127,"kind":"contact","type":"XIC","addr":"C1"}
         ],
         [
           {"id":128,"kind":"contact","type":"XIC","addr":"C2"}
         ]
       ]},
       {"id":130,"kind":"output","type":"OTE","addr":"Y1"}
     ]},
    {"id": 7, "rn": 6,
     "comment": "Y2 REVERSE — ON only in Reverse state",
     "elements": [
       {"id":131,"kind":"contact","type":"XIC","addr":"C2"},
       {"id":132,"kind":"output","type":"OTE","addr":"Y2"}
     ]}
  ],
  "comments": {
    "X1": "Start PB",
    "X2": "Stop PB N.C.",
    "X3": "Left Sensor",
    "X4": "Right Sensor",
    "Y1": "Conveyor Run",
    "Y2": "Reverse",
    "C1": "Forward State",
    "C2": "Reverse State",
    "C3": "Start Pulse",
    "C4": "Start Last Scan",
    "C5": "Start Request"
  }
}
