FAILURE MAP
← Case archive

FA-91877 / PLC ladder logic scan cycles / Member archive

TOF keeps stale delay time when its rung returns · case 02

An off-delay that is re-energized mid-delay then expires early on the next drop.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: re-energized mid delay[[true, false, 100], [false, false, 100], [false, false, 100], [true, false, 100], [false, false, 100], [false, false, 100], [false, false, 100]][[true, false, 0], [true, true, 0], [true, true, 40], [true, false, 0], [true, true, 0], [true, true, 40], [true, true, 80]]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 ↗