Digital Debounce? Is Rockwell Just Plain Wrong?

BillRobinson

Member
Join Date
Oct 2006
Location
Sydney, Nova Scotia
Posts
185
Ok,

I'm using Rockwell's PlantPax add on instructions. In the package there is a Digital-In function that has a "Debounce" option, which doesn't seem to work. Maybe I'm wrong, but I thought debouncing protected against quick false positives/negatives. Here is their code.



input B.TT A
|-----||--------|/|-----------------[TIMER]------|
| | A.TT | |
| |--------||-------| |
| |
| |
| input A.TT B |
|-----|/|-------|/|-----------------[TIMER]------|
| | B.TT | |
| |--------||-------| |
| |
| A.EN OUT |
|-----||------------------------------( )--------|



Here's my test signal/results/expected

input _____|-|_______|----------|_|---------|_________

output _____|----|____|----------|___|-------|_________

expect _________________|----------------------|_________


Which doesn't seem to be a debounced signal at all.
 
It looks like it works just fine.
Timer A extends any valid input pulse to a minimum duration on the output, while allowing for the output to still be continuous.
Timer B requires that the input be off for a set time before re-triggering.

Traditional debounce circuits are intended to prevent literal contact bounce when opening or closing, which is generally exhibited with many transitions of true/false/true/false in a micro to millisecond range.
 
To get your 'expected' result, this should work:

input A
|-----| |---------------------------[TIMER]------|
| |
| |
| |
| |
| input B |
|-----|/|---------------------------[TIMER]------|
| |
| |
| |
| A.DN B.DN OUT |
|-----| |-------|/|-------------------( )--------|
| |
| OUT |
|--| |---|

🍻

-Eric
 
Eric, that logic will not survive a mode change, or power-cycle.

The pre-scan will reset OUT, and could trigger other logic, while waiting for TIMER_A to re-establish OUT as a 1

Change the third rung to ...

XIC TIMER_A.DN OTL OUT

And add another rung

XIC TIMER_B.DN OTU OUT
 
Bill,

Based on your timing diagram, what you appear to be looking for is something similar to what I use in cooling tower tanks which tend to be very turbulent.

Level_Switch
----] [----------------+----------+-(EN)
|TON TMR_A +-(DN)
+----------+

TMR_A.DN
----] [----------------+----------+-(EN)
|TOF TMR_B +-(DN)
+----------+

TMR_B.DN Level_SW_DB
----] [-----------------------( )---



The TOF is not a commonly used instruction, so for the benefit of those unfamiliar with it, the TOF DN bit turns on as soon as the rung is true, then remains on after the rung goes false while the timer begins timing until ACC>=PRE. Whether this will work for you Bill or not depends on the application - keeping in mind that in a tank where I use this, some time factor is built in because it takes time for the average tank level to change and I'm using large presets. But hopefully it helps.
 
Last edited:
Thanks Alaric,

I built something like that before except it was a slow opening relay and a slow release relay. The only problem with this is that you must make sure that:

TMR_B.PRE > TMR_A.PRE
 
Last edited:

Similar Topics

Question to anyone with ideas about my thoughts on upgrading a very vintage timer, which is being used to switch between 2 5hp domestic water...
Replies
14
Views
425
I have a PLC type PM856 from ABB with some I/O modules and I get an error from the Digital Inputs model type DI801. The unit status shows error...
Replies
0
Views
260
I am monitoring two BMXDDO3202K digital outputs for their behaviour, they are each for opening and closing, and so the on time affects how far the...
Replies
1
Views
277
On the laser displacement sensor now connected to my PLC, the manual says 4mA=643 and 20mA=64,877. However, I checked with a Fluke, injecting...
Replies
5
Views
881
I'm new to S7/TIA. There's no devices connected to the PLC yet. I've got a laser measurement sensor (Micro-Epsilon optoNCDT 1220). From the...
Replies
18
Views
2,926
Back
Top Bottom