SEQUENCE · STATE
How to Build a Step Sequence with Internal M Bits
A machine cycle is easier to debug when each step is an explicit state.
SequenceM bitsPLS
Represent each step as a state
Splitting a cycle into internal state bits makes the sequence easier to trace than one oversized rung.
M10 = Step 1
M11 = Step 2
M12 = Step 3Transition pattern
X0 -> PLS M100
M100 -> SET M0 / SET M10
M10 AND X2 -> PLS M101
M101 -> SET M11 / RST M10
M11 -> T0 K20
T0 -> PLS M102
M102 -> SET M12 / RST M11
M12 AND X3 -> PLS M103
M103 -> RST M0 / RST M12Keep outputs separate from state transitions
M0 AND M10 -> Y0
M0 AND M11 -> Y1
M0 AND M12 -> Y2Design checks
- Prevent multiple step bits from being ON together
- Add timeout handling where a sensor may never arrive
- Define how Stop/Fault resets step state
- Define the restart step after an interruption