Help debouncing discrete inputs

ganutenator

Lifetime Supporting Member
Join Date
May 2002
Location
kansas
Posts
1,440
I'm probably really showing my ignorance this morning...

I need to filter some proximity input sensors.

If I put a timer on & a timer off in series it seems to work but oh no.

If the tmr on is first in the logic, then an ON blip is ignored, but an off blip is seen.

If the tmr off is first in the logic, then an on blip of the input is seen.

What am I missing?

p.s. the plc is a schneider m340 & I am using the function block diagram.
 
Ok, if I run the timers individually...

If both timers are done then set the output.
If both timers are not done then reset the output.

It looks messy though using the set & reset instructions. Plus I don't like using latches on inputs.
 
Why you dont want to user sr?

You could use two TON's one with if input is true and other with if input is false, first sets bit and second resets bit.
 
I typically use two TON timers, one fed by XIC and one fed by XIO instructions on the address to be de-bounced.

I didn't write this but it is a good illustration:

debounce_001.png
 

Similar Topics

So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
20
Hi all, hope you are having a great day, I am in need of your help to create a AOI or program that does this kind of job: I have a IO Link...
Replies
8
Views
131
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
346
Hi Everyone, i was hoping for a little help with this module. i have data that needs to be read from a different plc through the Modbus plus...
Replies
11
Views
227
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
232
Back
Top Bottom