How should I reconcile one completion with two saved rows?

LiamBrooks0838 · 28 Jan 2025, 11:02 UTC

Closed
LI
LiamBrooks0838
I maintain an FR10 teaching bench with a PLC job interface. We unplugged the monitoring laptop after a sample check had completed. Reconnecting added another completed row to the lesson record, although nobody submitted another job. The PLC completion state stayed high throughout. Our monitor treats the first high value it reads as an event. I need a recovery rule that an instructor can explain and support without clearing evidence or submitting the check again.

15 replies

LU
LucaBarnes0526
Replying to LiamBrooks0838

Use the job reference to recognise the same result, provided that reference survives the reconnect too.

22 points
LI
LiamBrooks0838
Replying to LucaBarnes0526

The PLC retains a job counter. The monitor stores it in each row, but its duplicate check lives only in memory. Both saved rows have the same counter.

2 points
LU
LucaBarnes0526
Replying to LiamBrooks0838

Then you've got something firmer than the time column to compare; does that counter ever start again?

25 points
RO
RosaChan1075
Replying to LiamBrooks0838

We got caught by that with a test logger. A counter was unique until the equipment restarted. What did your PLC do during this particular outage: remain running, or restart as well?

4 points
LU
LucaBarnes0526
Replying to RosaChan1075

Good distinction, I was assuming only the laptop had gone away.

23 points
LI
LiamBrooks0838
Replying to RosaChan1075

Only the laptop disconnected in this test. The PLC kept running. Its counter can be reset during maintenance, though, so it is not a permanent unique identifier by itself.

17 points
LU
LucaBarnes0526
Replying to LiamBrooks0838

I'd mark this pair as one known duplicated result and leave the wider restart case explicitly unfinished.

9 points
VI
VictorChen1142
Replying to LucaBarnes0526

Please include the operator view. Two rows corrected in the database can still leave an instructor with a misleading total on screen. One explanation for both (and somebody responsible for making the correction).

19 points
TO
TobyCarter1014
Replying to LucaBarnes0526

What prevents a later legitimate job with a reused counter from being silently discarded by the proposed fix?

-1 points
LU
LucaBarnes0526
Replying to TobyCarter1014

Nothing in my first suggestion covered that, you're right; the counter needs a run identity or an equivalent documented boundary.

16 points
LI
LiamBrooks0838
Replying to LucaBarnes0526

I have added a proposed controller-run identity to the interface review. For the existing data, only the observed reconnect pair is being reconciled. Unknown matches will be flagged for review instead of discarded.

16 points
RO
RosaChan1075
Replying to LiamBrooks0838

Also try losing the connection after the row is saved but before the monitor records that it handled it. That's where our logger duplicated things even with a good job identifier.

7 points
LI
LiamBrooks0838
Replying to RosaChan1075

That reproduces the problem too. We are changing persistence so recognising an already recorded result does not depend on the monitor reaching a later in-memory step. No new work is submitted during recovery.

7 points
LI
LiamBrooks0838
Replying to VictorChen1142

The laptop reconnect cases now display one completion in our offline tests. Maintenance reset handling still needs the PLC owner's review, so I am keeping the issue open on the handover sheet.

16 points
LU
LucaBarnes0526
Replying to LiamBrooks0838

Does the instructor see the unresolved state after a counter reset, or is that still only in your log?

11 points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .