Line 4, biscuit packs. CompactLogix 5069-L320ER, the checkweigher gives a dry contact reject pulse into a 5069-IB16, and the reject rung sets a bit with a TON delaying it to the flipper, continuous task.
Since we took the line from 60 to 90 packs a minute we lose a reject every 30 or 40 packs, so the underweight pack carries on down the line. I scoped the contact and the pulse is about 5ms and clean.
Moved the reject rung to the top of MainRoutine first and that changed nothing, then I went back to the checkweigher people and they say the pulse is fixed at 5ms and won't be widened. It never misses in Emulate, but there the input sits on for a whole second, so that proves nothing.
Is the IB16 too slow for this or is it my program? Is there something on a 5069 that'll catch a 5ms pulse without me rewriting the reject rung, because I'm out of ideas?
Firmware and Studio version? And what's the continuous task scan, Controller Properties, Tasks tab, Max Scan Time. Also is it a plain 5069-IB16 or the IB16F.
V33, controller firmware matches. Plain IB16, RPI 5ms. Continuous task last scan 12ms, max 20ms since the speed change, the program's got bigger too. 90 ppm is a pack every 660ms so it isn't a rate problem.
It isn't the rate, it's the width. The input image gets read once per scan. Your scan is 12 to 20ms and the pulse is 5ms, so any pulse that starts and finishes between two reads is never seen at all. At 12ms you catch most of them, at 20ms you miss more. That matches one in 30 or 40. Moving the rung to the top does nothing, the read already happened.
You could put the reject rung in a periodic task at 2ms and drop the RPI on that card to 1ms, the 5069 IO goes that low if I remember right. Still polling though, so it'll narrow the window rather than close it.
Tried that. Periodic task at 2ms with the reject rung, RPI 1ms on the IB16. One miss in about 400 packs now instead of one in 40. Better, not good enough, QA log every one and its my name on the report.
You're still sampling, so there's always a window. Three ways that actually close it, any brand. Put a pulse stretching relay between the checkweigher and the input, an off delay timer relay set to 50ms, and the PLC then sees 55ms and can't miss it. Or use an input module with on board latching, the 5069-IB16F has a per point latch or event feature if I read the datasheet right, check the module help before you order. Or an event task triggered by that input, which the IB16F can do and the plain IB16 can't.
The relay is the same day fix. There's a writeup on why the scan does this here: https://plctr.com/understanding-plc-scan-time-and-cycle-time/
Off delay relay went in the panel yesterday, 50ms, wired between the checkweigher contact and point 6. Three shifts, zero misses, QA count matches the checkweigher log.
The pulse was simply shorter than the scan, so a good few of them started and finished between two reads of the input image and the program never had a chance to see them. The stretch relay is the fix for now. An IB16F is on order and once it's in I'll do it with an event task and take the relay back out.
What I still don't get is why the old line with the same checkweigher model never missed at 60ppm for six years. Maybe that program was small enough to scan in 4ms. Thanks carav9 and mikko.
Marking solved.
plctr.com team