FA-92035 / PLC ladder logic scan cycles / Member archive
Power cycle clears latched OTL bits · case 05
A latched mode or fault memory is lost after a controller power cycle.
Case contract
Latch (OTL), unlatch (OTU) and non-retentive output (OTE) rungs executed in program order each scan. rungs is a list of [instr, bit, condition_tag]; the rung is true when the condition input is true, or, for condition S:FS, on the first scan after power-up. A scan item {"power_cycle": true} models a power cycle: prescan clears only OTE destination bits, OTL/OTU bits are retentive, and the next scan is a first scan; it also reports the post-prescan state. OTL sets and OTU clears its bit only when its rung is true; the later rung wins. Return the sorted true bits after each item.
Why this case matters
Ladder programs are executed as repeated scans; each defect here changes what a rung, timer, counter or data-table instruction reports on a particular scan, which is how commissioning and field faults are actually observed.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: scenario 3 | [[], ["B:2"], [], [], [], ["B:1", "B:2"], ["B:1", "B:2"], ["B:1", "B:2"], ["B:1", "B:2"], ["B:1", "B:2"]] | [[], ["B:2"], ["B:2"], ["B:2"], ["B:2"], ["B:1", "B:2"], ["B:1", "B:2"], ["B:1", "B:2"], ["B:1", "B:2"], ["B:1", "B:2"]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗