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

I've adjusted the IP of the Panelview Plus as well as the DNS servers; the screen does not show up in the search when I go to the transfer utility...
Replies
3
Views
80
Hi Everyone, I own a GE Versamax controller that I purchased for a class at Long Beach City College a couple of years ago. I lost the use of my...
Replies
1
Views
46
I was wondering if anyone could help i am trying to use a SLC 500 with a 5/05 processor to set up an incremental encoder to a HSCE2 card? The card...
Replies
1
Views
94
Hello, I am working with cimplicity workbench, I have made changes to the current project from this machine I am using in the past. However when...
Replies
0
Views
45
Hello, doing switch from FBD to ST. First task is converting my old work. How do you sum variables? For example, Interlock1, interlocl2 and...
Replies
5
Views
186
Back
Top Bottom