FA-91907 / PLC ladder logic scan cycles / Member archive
RES clears the RTO accumulator but leaves DN latched · case 02
After a reset the done bit stays on while ACC reads zero.
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: reset done timer while disabled | [[false, 0], [true, 50], [true, 50], [true, 0], [true, 0]] | [[false, 0], [true, 50], [true, 50], [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 ↗