Andy, Kirk, Chris, Kyle, Thanks for the replies and info. Combining my response into one post to avoid clutter...
The relay contacts are coming into a Mesa 7i37 board. My concern is both from glitches and contact bounce. One of the inputs is the "reset" line, which indicates the hardware is finished with the current operation. A glitch could cause it to pick up the wrong tool. If this happens once per hour or once per day, it could be a bear to troubleshoot later on so I'd like to give it my best shot now while it's all fresh in my mind. Debouncing with a capacitor might just work. I'll do some testing. I have the debounce logic written without any loops. It checks the input state every thread cycle and keeps a tally. The output changes only after the input has been at a different state for at least the debounce period. Karl On 08/12/2011 09:28 AM, Chris Radek wrote: > On Fri, Aug 12, 2011 at 12:09:12AM -0700, Karl Cunningham wrote: >> I'm designing a real-time hal component to control a Dana Summit tool >> changer, and there are a couple of hardware lines from the tool changer >> that feed signals back to the hal component. The lines come from relay >> contacts and will need to be debounced. > > Some thoughts from outside the box: > > Not sure what kind of input conditioning you have, but if you feed > these into opto22 inputs (or similar) you can choose the module to > give a certain amount of debounce. The bog standard opto22 input > modules give a couple ms of debounce which is great for mechanical > contacts. You can get much faster ones for stuff that needs to be > fast (like a probe input). There may be extra slow ones too, not > sure. > > Also consider that since the HAL model for GPIO is essentially one > that polls inputs (is not edge triggered) you need to have some fairly > mighty bounces to cause problems. > > In your situation I'd look into conditioning with appropriate hardware > and making this a non-issue, but only if testing actually shows that > it is an issue. ------------------------------------------------------------------------------ FREE DOWNLOAD - uberSVN with Social Coding for Subversion. Subversion made easy with a complete admin console. Easy to use, easy to manage, easy to install, easy to extend. Get a Free download of the new open ALM Subversion platform now. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users