FAILURE MAP
← Case archive

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

FIFO shift duplicates the last element into the vacated slot · case 04

Stale data remains visible in the file beyond the valid position.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

FIFO load (FFL) and unload (FFU) pair on one file of the given length. ops is a list of [op, value], one triggered instruction per scan. Load stores value at the position and increments it; when full (position == length) the load is ignored. Unload moves element 0 to dest, shifts the file toward 0 and zeroes the vacated last element; unloading an empty FIFO leaves dest unchanged. DN is position >= length and EM is position == 0. Return [position, dest, DN, EM, file] 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 5[[1, 0, false, false, [53, 0, 0, 0]], [2, 0, false, false, [53, 79, 0, 0]], [3, 0, false, false, [53, 79, 69, 0]], [2, 53, false, false, [79, 69, 0, 0]], [3, 53, false, false, [79, 69, 2, 0]], [4, 53, true, false, [79, 69, 2, 76]], [3, 79, false, false, [69, 2, 76, 76]], [4, 79, true, false, [69, 2, 76, 18]], [3, 69, false, false, [2, 76, 18, 18]], [2, 2, false, false, [76, 18, 18, 18]], [1, 76, false, false, [18, 18, 18, 18]]][[1, 0, false, false, [53, 0, 0, 0]], [2, 0, false, false, [53, 79, 0, 0]], [3, 0, false, false, [53, 79, 69, 0]], [2, 53, false, false, [79, 69, 0, 0]], [3, 53, false, false, [79, 69, 2, 0]], [4, 53, true, false, [79, 69, 2, 76]], [3, 79, false, false, [69, 2, 76, 0]], [4, 79, true, false, [69, 2, 76, 18]], [3, 69, false, false, [2, 76, 18, 0]], [2, 2, false, false, [76, 18, 0, 0]], [1, 76, false, false, [18, 0, 0, 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 ↗