FA-92137 / PLC ladder logic scan cycles / Member archive
Step sequencer cascades through several transitions in one scan · case 02
Steps whose transition is already satisfied are skipped without ever being active for a scan.
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: two zero-time steps | [[3, 0, true], [3, 0, false], [3, 10, false]] | [[1, 0, true], [2, 0, true], [2, 0, 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 ↗