old bale press. slc 5/04, rslogix 500, input card 1746-ib16 in slot 3. a limit switch on the ram frame tells the sequence the ram is home, i:3 removed link about one cycle in ten the sequence runs the compact step twice because the home switch flickers when the ram bangs into the stop, you can watch the input led blink.
tried a new limit switch, same, and moved it onto the second input point on the card, same again. someone on days said put a capacitor across the input, i don't want to do that without asking.
what's the simplest way to debounce this in the ladder? not the whole card, just this one input.
Seen it on a bale press. Before the code, how loose is the switch bracket? Grab it and shake. And is it a roller arm or a plunger?
roller arm. bracket has maybe a sixteenth of play, the bolt holes are worn oval. i'll tighten what i can tonight. still want it in the ladder too so it doesn't come back when the bracket loosens again.
TON in front of it. Rung: XIC I:3/5 into TON T4:20, time base 0.01, preset 3, so 30 ms. Then use T4:20/DN everywhere you used I:3/5 for the home signal. The input has to stay on for 30 ms straight before DN comes up, a blink resets the accumulator and DN never sees it.
If it also blinks off while the ram sits home, add a TOF T4:21 fed from T4:20/DN with the same preset and use T4:21/DN, that holds the signal through the short dropouts.
A capacitor on a 24V input works until it doesn't and nobody can see it online. The timer is free and you can watch it. Don't touch the card filter on cards that have one, that slows every input in the slot.
ton in, 30ms, t4:20/dn on the home rung. 60 cycles tonight and one double. the led shows the input dropping out for a blink while the ram is sitting at home, after the timer's already done. so the on side is fixed and the off side isn't.
That's the off side. Add the TOF like I said, T4:21, same preset, use its DN.
tof t4:21 added, home signal is t4:21/dn now. new bolts in the bracket, holes drilled out and sleeved by days. 120 cycles over two nights, zero doubles.
so the switch was bouncing twice, once on impact and again while it sat there, and the ladder was acting on every edge of it. ton 30ms on the way in, tof 30ms on the way out, plus the bracket, and it stopped.
one thing i'm not sure about. if the switch ever fails open for real the tof hides it for 30ms. that's fine i think, but i'd rather know than guess. thanks stevek and carlh.
Bracket first, timer second. Both, in your case.