joint 0 limit error - setting up debounce.

More
31 Jul 2011 21:56 #12062 by whampoo
:angry:

Hi All,
I have been working on my gantry router now for about 2 months and its completed except for the limit switches. I added them 2 weeks ago and have been fighting with EMC to get them to work since. I haven't work with Linux for over 8 years so I am very rusty when it comes to configuring EMC and what exactly I am supposed to be adding to the Mill files. I have 2 switches for each axis. X,y and Z. I tried some of the suggestions in the Forums with no luck. Unfortunately what I did read may as well have been written in Chinese, I didn't understand one piece of the information out there. I would suppose its fine for people who understand and work with CNC machines all day but I do not, yet. So if someone could explain in plain English what the setting actually do and the correct format and file they need to put in that would greatly appreciated. I am using the latest version of ubuntu and EMC. My x axis is on switch 1 para port 10; y axis is on sw-2 and para port 11 and z on 3 and port 12. Each time I tried to make a change EMC would fail to start claiming the port was already configured or the switch was set to something else. I have no hair left to pull out ... thanks for any help you can offer. I can't seem to get debounce to work at all, when EMC finally starts the switches are either disabled or debounce is not filtering anything

Thanks again
Joel

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

More
31 Jul 2011 22:27 #12063 by cmorley
It would help if you posted you config files.

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

More
31 Jul 2011 22:30 #12064 by Rick G
Hello,

I take it that the machine works O.K. without the limit switches.

Have you looked at

Machine

show Hal configuration

To see what pins are in use, which are inputs which are outputs and to check if they are working?

Check your wiring and see if signals are working or if they need to be inverted?

Rick G

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

More
31 Jul 2011 22:33 #12065 by Rick G
Chris typed faster than me,

But I agree with him, more info better help.

Rick G

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

More
01 Aug 2011 03:01 #12070 by whampoo
Sorry about the lack of more info we were heading out the door when I decided to send this message ....
I am attaching the my-mill2.hal , and my-mill2.ini. When I checked the switches I see the arrow when I engage the switch and no arrow when it is not engaged. I used the Hal configuration in the watch window the axis.0.positive.hard.limit and the axis.0.home.sw.in flash intermittently when no switch is being pressed. When pressing the switch the positive.lim.sw.in lights the home.sw.in lights up and pos.hard.limit lights up. Axis.0.active is constantly light. not sure if this is correct. Evidently it appears I am getting line noise ... not sure how to fix that problem at all. All the axis are the same when checked.
Yes the machine works fantastic when no switches are hooked up. I can jog all axis and make adjustments. when the switches are connected the entire screen is grayed out I cannot select anything. Every so ofter the override limits will flash as well.....

thanks
Joel

File Attachment:

File Name: my_mill2.hal
File Size:3 KB
Attachments:

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

More
01 Aug 2011 03:02 #12071 by whampoo
second file

File Attachment:

File Name: my_mill2.ini
File Size:2 KB
Attachments:

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

More
01 Aug 2011 08:12 - 01 Aug 2011 09:21 #12074 by ArcEye
Hi

A quick look at your files shows me that you appear to only have 3 'switches', as combined limit and home switches, but at no time have you mentioned they are homing switches too.

In your text you say you have 2 switches on each axis, so presumably they are chained together in axis pairs?

If you comment out the homing lines in .hal and .ini, do the limit switches work as they should?
ie.
#net max-home-x => axis.0.home-sw-in for each axis in the .hal file
and comment everything in the .ini file for each axis that starts in HOME_

If I were you, I would chain all the limits in series to one parport pin, it doesn't matter which one activates, one look at the machine will tell you what axis it was.

Then either fit 3 separate home switches or if there isn't room, don't fit any and home manually to alignment marks.

The latter is what I do on my small mill, I have a pre-set safe home position for tool changes and moving to at the end of a program, which I set at the beginning of a session by aligning marks on each axis.
Then I touch off to the actual work-piece. Simple as that.

regards
Last edit: 01 Aug 2011 09:21 by ArcEye. Reason: tidying

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

More
01 Aug 2011 11:46 #12077 by BigJohnT
I would take a look at the homing diagrams here:

www.linuxcnc.org/docview/html/config_ini...ing-sequence-diagram

to make sure your directions are correct. I suspect axis 0 is not coming off of the limit switch due to the direction of travel you have programmed and then you get an error.

I use combined limit and homing on my plasma with no problems. One input for each axis.

John

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

More
01 Aug 2011 13:21 #12083 by andypugh
whampoo wrote:

I have 2 switches for each axis. X,y and Z.
...
EMC would fail to start claiming the port was already configured


I have a similar setup, with combined limit and home switches on each axis.

If you take the metaphor of an electrical circuit, you need to cut the wires to install the debounce.

Assuming that you want to put the debounce in the custom.hal file (so that you can run stepconf again without over-writing it all)
#load the debounce. One set of three channels. 
loadrt debounce cfg=3

#add the debounce to a thread, so that it gets run
#this is running in the fast base-thread
#you could use the servo thread. I am not sure which would be best. 
addf debounce.0 base-thread

#Unlink the parport pins and limit inputs for rewiring
delsig max-home-x
delsig max-home-y
delsig max-home-z

net x-raw parport.0.pin-10-in => debounce.0.0.in
net y-raw parport.0.pin-11-in => debounce.0.1.in
net z-raw parport.0.pin-12-in => debounce.0.2.in

net x-filt debounce.0.0.out =>  axis.0.home-sw-in  axis.0.pos-lim-sw-in  axis.0.neg-lim-sw-in
net y-filt debounce.0.1.out =>  axis.1.home-sw-in  axis.1.pos-lim-sw-in  axis.2.neg-lim-sw-in
net z-filt debounce.0.2.out =>  axis.2.home-sw-in  axis.2.pos-lim-sw-in  axis.2.neg-lim-sw-in

#It's important to actually activate the debounce
#20 base-threads is about 0.4mS. The typical machine doesn't move far in that time. 
setp debounce.0.delay 20

If the loadrt line had cfg=3,3 then you would have two 3-channel debounces, called debounce.0 and debounce.1 and could use a different delay value for home and limit. the pins would be debounce.1.0 etc, and both instances need an addf command in the HAL.

Put this code in custom.hal and see if it works..

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

More
02 Aug 2011 02:24 #12118 by whampoo
Thank you everyone for you help OI added to code that Andy suggested and everything seems to be working now..... Except its homing to the max switch and not the min/home switch ....and here is where I get thoroughly confused. I would like the machine to be about center when its done homing, right now it stays .5 off the switch which is correct and then when I try to move the x and y axis it won't go past the .5 inches from the switch. The question I have is when I want the machine to be about center. The x axis travel is 28" and y axis is 26", and its set for 0.0 to 26 and 0.0 to 28.

1) should I be using -14 to +14 in the config file with home being 0.0 of the x axis and y axis -13 to 13 with 0.0 being home ?
2) or am just not understanding the whole homing business .... I have read the info and looked at the schematic/image but it doesn't help when your not machine savvy ....

thanks again.
Joel

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

Time to create page: 0.091 seconds
Powered by Kunena Forum