Using debounce when you have multiple HAL files

More
18 Apr 2011 20:40 #9057 by jcizek
Hi everyone, I am fairly new to EMC2 and CNC in general, but have made a lot of progress. I am stuck on this one however. I read all the docs including the integrators manual and have successfully integrated a software debounce module on my limit switches for my Solsylva Mill and it works great. I am now trying to add debounce to my Plasma table and have run into some trouble. I am using the THC300 sample configs as a starting point ( i have a CandCNC LCTHC controller and think the THC300 is close enough that I can modify it for use with the LCTHC).
The THC300 has several different hal files, the (2) I am concerned with are thc300.hal and thc300_parport.hal. I have successfully added a debounce to my External EStop switch in the thc300.hal file and it works. Now I am trying to add debounce to the limits (which are setup in the parport file).
If I simply add the loadrt, addf, and setp lines to the parport file, I get an error that debounce.ko already exists (i assume because it's already been loaded in the thc300.hal file) So I tried changing the cfg=1 to cfg=2 in the thc300.hal file and then just using a the debounce commands in the parport file as if the debounce was setup already and that did not work either.

Can someone help point me in the right direction for using debounce on several different items that are spread across multiple hal files? Many thanks in advance!!! -James

Please Log in or Create an account to join the conversation.

More
18 Apr 2011 20:53 #9059 by BigJohnT
loadrt debounce cfg=3,3 loads 6 copies of debounce and debounce.0 and debounce.1 can be set for a different time. If the time is the same for all just increase the cfg=n to a number that suits you.

www.linuxcnc.org/docview/html/man/man9/debounce.9.html

John

Please Log in or Create an account to join the conversation.

More
19 Apr 2011 00:53 #9069 by jcizek
I knew it was something simple, it always is... I had 2 problems, 1) I had the loadrt in a hal file that was being executed AFTER a hal file that was trying to use the net command and 2) on the second, third ,etc instance of the net command, i forgot to advance the debounce instance (ie, debounce.0.0 used
twice instead of debounce.0.1 and debounce0.2 etc.)

Thanks so much for the help!! I am getting closer and closer to having this work! Having an Ferror problem now that I am having trouble understanding, but I'll post that question in the appropriate place.

Thanks again for your assistance! I appreciate it greatly. -James

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum