AutomationDirect Customer Forum  

Welcome to the AutomationDirect Customer Forums.
These forums are intended as a place for AutomationDirect customers to help one another, share information, and share ideas.
The forums are not routinely monitored by AutomationDirect Technical Support staff. While staff members may answer questions occasionally, for a prompt response to a problem please contact Technical Support directly at: 1(800) 633-0405 or (770) 844-4200 or e-mail Tech Support.

For product questions, start here: Online Manuals and Product Inserts


Go Back   AutomationDirect Customer Forum > General Applications

Reply
 
Bookmark and Share Thread Tools Rate Thread Display Modes
  #1  
Old 07-26-2010, 04:33 PM
rbroders rbroders is offline
Registered User
 
Join Date: Jul 2010
Posts: 5
Switch DeBounce logic for Click PLC

In my shade controller (discussed in the "How Do You Implement ELSE" thread), I discovered a problem which appears to be due to switch bounce. My PLC loop is so fast (~1ms), that sometimes (5-10%) the system behaves strangely. I finally traced it down to switch bouncing! The RC input circut should eliminate bouncing, but perhaps it is tuned for speed, and my switch has a slow bounce or something.

Anyway, the incredibly simple fix was to Enable Fixed Scan Mode with a 20ms iteration time. Works perfectly! Also, now that I know the scan time is fixed, I can calculate current shade position with a simple up/down counter, and leave timers out...

--Bob

P.S. So much for my obsession with speed.
Reply With Quote
  #2  
Old 07-28-2010, 11:34 AM
Adisharr Adisharr is offline
Registered User
 
Join Date: Mar 2006
Location: Hilton, NY USA
Posts: 441
Quote:
Originally Posted by rbroders View Post
In my shade controller (discussed in the "How Do You Implement ELSE" thread), I discovered a problem which appears to be due to switch bounce. My PLC loop is so fast (~1ms), that sometimes (5-10%) the system behaves strangely. I finally traced it down to switch bouncing! The RC input circut should eliminate bouncing, but perhaps it is tuned for speed, and my switch has a slow bounce or something.

Anyway, the incredibly simple fix was to Enable Fixed Scan Mode with a 20ms iteration time. Works perfectly! Also, now that I know the scan time is fixed, I can calculate current shade position with a simple up/down counter, and leave timers out...

--Bob

P.S. So much for my obsession with speed.
Hey that's a good way to do it - I think the Click also has input filters you can enable in the CPU set-up for de-bounce but I'm not sure (software not installed on this PC).
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:09 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.