Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: havery on March 02, 2010, 10:33:21 AM

Title: Axis Homing Problem
Post by: havery on March 02, 2010, 10:33:21 AM
I have a lathe I am retrofitting and I have a homing issue on the Z axis.  I have searched the posts with no luck.  The X axis homes and zeros fine.  The Z axis hits the limit switch and gives a "Limit Switch Activated " instead of homing and zeroing at that position.  I think I have the same setup on the X and Z axis with one limit switch being both the limit and home switch.  From the pics below the switches are both being seen as both a limit and homing switch by the software.  They are both setup to auto zero on home switch activation.  Any ideas why the Z axis would not home?

They were both working using version 3.042.029.  I recently installed 3.042.038 but I would guess it is something I have set wrong rather then a rev issue.  Xml is also attached.

Thanks for any help

havery
Title: Re: Axis Homing Problem
Post by: Hood on March 02, 2010, 11:24:04 AM
Seems to be working fine here in simulation, try increasing the debounce Interval and see if that helps.
Hood
Title: Re: Axis Homing Problem
Post by: havery on March 02, 2010, 12:03:15 PM
Thanks Hood, I will do that when I get home.  One question to help me understand: If the control software sees the switch closure as both a home switch and a limit switch closure, how does it decide what to do with the switch activation?  Is there a pecking order for actions or is the action determined by the command used when the switch closure is recognized?

I did change the Index Debounce level but this should have no affect on the switch closures, should it?

Haze
Title: Re: Axis Homing Problem
Post by: pointcloud on March 02, 2010, 12:22:51 PM
 I'd bet that if you use only the Zhome rather than the Z++ and ZHOME it'd work? A limit will E-stop the machine from my experiance... This would be as simple as unchecking the ++ and a test

Title: Re: Axis Homing Problem
Post by: Hood on March 02, 2010, 01:32:22 PM
When homing Mach will ignore the Limit switch until homing has completed. What I suspect may be happening is you have a slight bounce on the switch, the axis starts homing, opens the switch but as the axis starts to reverse the switch closes slightly then opens again. Mach has seen it close so says its home then sees it open again so thinks the limit has been triggered. The way to see if that is the case is look at the  machine coords for that axis when you have homed, if its zero then that is whats happened, if its not then there is something else wrong.
Hood
Title: Re: Axis Homing Problem
Post by: pointcloud on March 02, 2010, 01:53:22 PM
Hood, I know you've been at this way longer than I but it makes no sence to have a switch do two opperations? Looks to me that if it's the same port/same pin it will be confused as to what is home and what is a limit? I've never tried this on anything other than a galil and it will not work with my galil running camsoft or Mach. But of you say it'll work then I guess it'll do it...

Although I'm gonna be like pres. Regan and confirm with a machine I'm currently building, as I need home and limit in a similar setup...
Title: Re: Axis Homing Problem
Post by: Hood on March 02, 2010, 01:55:59 PM
It will work, has been like that on my Bridgeport for 5 or 6 yrs ;)
Its not ideal and not the way I do things nowadays but I have loads more I/O now and actually do the homing in my drives now.
Hood
Title: Re: Axis Homing Problem
Post by: M250cnc on March 02, 2010, 06:24:38 PM
Hood,  But of you say it'll work then I guess it'll do it...

Although I'm gonna be like pres. Regan and confirm with a machine I'm currently building, as I need home and limit in a similar setup...

Hood has made mistakes in the past, he said he was wrong, but he wasn't  ;D

Completely wrong to do it like that, i have separate home and limit switches even then it ignores limits when looking for home

Phil
Title: Re: Axis Homing Problem
Post by: Hood on March 02, 2010, 06:54:40 PM
Phil
it all goes back to the days when the PP was the only real way to get I/O to/from Mach, now there are lots of other ways so having seperate switches is easy. Some will still just use the basics and need it that way but I have asked Brian if possible in Rev4 to have at least a choice whether limits can be always active or not.
 Doesnt really bother me as I home externally and as far as Mach is concerned I dont have home switches but I still think its a good thing to have the option of .
Hood
Title: Re: Axis Homing Problem
Post by: pointcloud on March 02, 2010, 07:06:51 PM
after rereading this post I see where there could be huge problems... I mean HUGE problems.... ignor a LIMIT, that is NOT a good IDEA... That has to be in the board/drive, because my galil mach machine will not do that. as the limit kills the servo amp on the galil... where as on a board using gecko you are not faulting the drive only the software...

I do have a question, haven't you had an encoder come unplugged before? If the limit will not cut the drive then it is only a DRAG STRIP for a servo in case of an issue?

I had my galil run 96" at FULL SPEED, the floor caught it..<not so funny either>.. Now it has the limits totally working... But they kill the amps on the board. STOP...

I would say that there could be a trigger used from the limits to the common port of the drive. This would be what youd need as a true limit.

My newest machine is a c11g with g340s. I will plan on a way around the madness of a runaway.

Title: Re: Axis Homing Problem
Post by: M250cnc on March 02, 2010, 07:12:50 PM
after rereading this post I see where there could be huge problems... I mean HUGE problems.... ignor a LIMIT, that is NOT a good IDEA...


Not good BUT only while homing

Hood How is Rev4 coming along  ;D

Phil
Title: Re: Axis Homing Problem
Post by: Hood on March 02, 2010, 07:23:21 PM
I do have a question, haven't you had an encoder come unplugged before? If the limit will not cut the drive then it is only a DRAG STRIP for a servo in case of an issue?

If that question is directed to me then I dont have to worry about losing an encoder as I have AC Servos and the drive will fault within milli seconds of the encoder going down ;)
Also my Limits are not only going into Mach but they will also trip my drives so no worries there either and lastly because Mach knows nothing of my homing then my limits are always active.

As said hopefully Brian will add this as an option to always have limits enabled if the user has seperate home switches, but then again you are still replying on software for your limit switches so..........
Hood
Title: Re: Axis Homing Problem
Post by: Hood on March 02, 2010, 07:30:27 PM

Hood How is Rev4 coming along  ;D

Phil

Been doing a lot of testing tonight with Brian and Greg and its coming together well, the uprated speed of communications in Mach was causing issues witht the SS losing communications but Brian now has that sussed and tonight I have just run an 18,000 plus line  file at 20ms update and it ran great, previous to tonight I could only get a few lines  of code before things would crap out and that was at 200ms update :)

Still a  way to go before Rev4 is released but its  looking good and getting closer all the time :) Even better news is Turn should be getting worked on shortly now that the SS issues with Rev4 are sorted :)

Hood
Title: Re: Axis Homing Problem
Post by: havery on March 03, 2010, 12:15:47 AM
Hood, you were correct.  The axis zeroed out and then stopped due to limit switch activation.  I raised the debounce to 2000 with no effect.  Since there already was a 2nd limit switch installed, I set this as a seperate home switch and all is well.  I did not want do do this originally due to lack of inputs.  Hopefully I will have the ModBus up and running soon so that will not be a problem.

Thanks for the help......................again.

havery
Title: Re: Axis Homing Problem
Post by: Hood on March 03, 2010, 02:20:41 AM
Glad you got it sorted havery, just a word of caution though regards Modbus, dont put your home switches through it as the timing of home switches are critical and Modbus can be slow for something like that.
Hood