FA-92145 / PLC ladder logic scan cycles / Member archive
Step time includes the scan on which the step was entered · case 05
Minimum step dwell times finish one scan early.
Case contract
Cyclic step sequence with one active step. steps is a list of [min_time_ms, transition_tag]. Each scan [dt, inputs] first adds dt to the step time unless the step became active on the previous scan, then fires the transition if step time >= min_time and the transition tag is true. At most one transition fires per scan; after the last step the sequence returns to step 0; the new step time is 0. Step 0 is active before the first scan as if just entered. Return [active_step, step_time, entered_this_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 1 | [[0, 40, false], [0, 80, false], [0, 90, false], [0, 100, false], [1, 0, true], [1, 10, false], [1, 30, false], [1, 50, false], [1, 90, false], [2, 0, true]] | [[0, 0, false], [0, 40, false], [0, 50, false], [0, 60, false], [1, 0, true], [1, 0, false], [1, 20, false], [1, 40, false], [1, 80, false], [1, 90, false]] | 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 ↗