FA-91914 / PLC ladder logic scan cycles / Member archive
RES also clears the RTO enable edge memory · case 04
After a reset issued while the timer stays enabled, the next scan is not credited and completion is late.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: scenario 3 | [[false, 0], [false, 0], [false, 10], [false, 0], [false, 0], [false, 50], [false, 0], [false, 0], [false, 0]] | [[false, 0], [false, 0], [false, 10], [false, 0], [false, 40], [false, 90], [false, 0], [false, 0], [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 ↗