FA-91874 / PLC ladder logic scan cycles / Member archive
TOF output energizes at power-up with a false rung · case 04
After a restart the off-delay output is on for a full preset even though its rung was never true.
Case contract
Off-delay timer (TOF) evaluated once per scan; scans is a list of [rung_in, elapsed_ms]. At power-up the timer is expired (ACC = preset, DN false). A true rung clears ACC and sets DN. After the rung drops, ACC accumulates each later false scan's elapsed time (the true-to-false scan itself is not credited), clamped at preset, and DN clears when ACC >= preset. TT is DN and not rung_in. Return [DN, TT, ACC] per scan.
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 11 | [[true, true, 20], [true, false, 0], [true, true, 0], [true, true, 20], [true, true, 30], [true, true, 60], [true, false, 0]] | [[false, false, 100], [true, false, 0], [true, true, 0], [true, true, 20], [true, true, 30], [true, true, 60], [true, false, 0]] | 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 ↗