FAILURE MAP
← Case archive

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

CTU overflow bit clears on the next up count · case 02

OV disappears after one more count even though no reset occurred.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Up/down counter pair sharing one 16-bit signed accumulator, evaluated per scan; scans is a list of [cu, cd, res]. CU counts on its rising edge and CD on its own rising edge (both in one scan cancel). Incrementing 32767 wraps to -32768 and latches OV; decrementing -32768 wraps to 32767 and latches UN. A later RES rung clears ACC, OV and UN but not the edge memories. DN is ACC >= preset. Return [ACC, DN, OV, UN] 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 7[[-32768, false, false, false], [-32768, false, false, false], [32767, true, false, true], [32767, true, false, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32767, false, false, true], [-32768, false, false, true], [-32768, false, false, true]][[-32768, false, false, false], [-32768, false, false, false], [32767, true, false, true], [32767, true, false, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32768, false, true, true], [-32767, false, true, true], [-32768, false, true, true], [-32768, false, true, true]]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 ↗