FAILURE MAP
← Case archive

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

TON behaves retentively when its rung drops · case 04

A second energization completes too soon because time accumulated before an interruption is kept.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

On-delay timer (TON) evaluated once per scan. scans is a list of [rung_in, elapsed_ms since the previous scan]. The accumulator starts on the false-to-true scan without crediting that scan's elapsed time, then adds each later true scan's elapsed time, clamped at preset. A false rung resets the accumulator. DN is rung_in and acc >= preset; TT is rung_in and not DN. 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: scenario 3[[false, true, 0], [false, true, 10], [false, false, 10], [false, true, 10], [false, true, 30], [false, true, 55], [false, true, 80], [false, false, 80], [false, true, 80], [true, false, 120], [true, false, 120], [true, false, 120]][[false, true, 0], [false, true, 10], [false, false, 0], [false, true, 0], [false, true, 20], [false, true, 45], [false, true, 70], [false, false, 0], [false, true, 0], [false, true, 50], [true, false, 120], [true, false, 120]]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 ↗