Fault Challenge #6 answer: the AI said replace the sensor
My pick: the photo eye was never the problem. The PLC is missing the gaps between boxes.
1) What the AI missed
It never heard about the speed change. At 120 a minute with only a couple inches between boxes, the gap clears the photo eye in about the same time as one PLC scan. The scan runs 30-40 ms. When the gap opens and closes between two scans, the PLC never sees the input drop, and two boxes count as one. At 80 a minute the gap stayed open long enough that every scan caught it, so the count was dead on.
The AI couldn't have known. All it got was "short count, PNP photo eye," and with that it gave the textbook sensor answer.
2) What I'd add to the prompt
  • When it started and what changed that week: line speed went from 80 to 120 a minute
  • The count was dead on before the change
  • The gap between boxes on the belt
  • The scan time, and that the count is a plain counter in the main program
  • What you already tried, so it doesn't send you back to clean the lens
With "the shortage started the week we went from 80 to 120 a minute," it gets to the scan on the first try.
3) The fix
Get the count off the scan. Land the photo eye on a high-speed counter input (most PLCs have them on the CPU or a counter module), or move the count to a fast cyclic task or a hardware interrupt. If you can't do that, open up the gap: run the infeed belt a little faster than the one feeding it, so the boxes spread out before they reach the eye. And check that the photo eye's response time in the datasheet is fast enough for that gap.
Bonus: the debounce made it worse. A debounce timer ignores anything shorter than its preset, and at 120 a minute the gap is the short signal. Every gap shorter than the timer got filtered out, so even more boxes counted as one. Pull it out.
The lesson: on the floor, "what changed?" is the first thing you'd ask. The AI can't ask it for you, so put it in the prompt.
Challenge #7 goes up Monday.
0
0 comments
Markus Splawn
3
Fault Challenge #6 answer: the AI said replace the sensor
The Controls Floor
skool.com/the-controls-floor-6266
Use AI on real automation work: troubleshoot, read and write PLC programs on any platform. Free for techs and students.
Leaderboard (30-day)
Powered by