FAILURE MAP
← Case archive

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

RES rung is applied before the RTO rung in the same scan · case 03

On a reset scan with the timer enabled, ACC ends the scan non-zero instead of cleared.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Retentive timer (RTO) on rung 1 and its reset (RES) on a later rung, evaluated per scan; scans is a list of [enable, reset, elapsed_ms]. An enabled scan whose previous scan was also enabled adds the elapsed time (clamped at preset); DN sets when ACC >= preset while enabled. A disabled rung retains ACC and DN. Because RES is a later rung, a reset in a scan clears ACC and DN after the RTO has run; the enable edge memory is not touched by RES. Return [DN, 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 4[[false, 0], [false, 20], [false, 60], [false, 90], [false, 110], [false, 0], [false, 0], [false, 40], [false, 80], [false, 80], [false, 80], [false, 80]][[false, 0], [false, 20], [false, 60], [false, 90], [false, 110], [false, 0], [false, 0], [false, 0], [false, 40], [false, 40], [false, 40], [false, 40]]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 ↗