Hello Guest it is March 28, 2024, 09:17:22 AM

Author Topic: Homing and limits don't work right  (Read 7788 times)

0 Members and 1 Guest are viewing this topic.

Homing and limits don't work right
« on: February 27, 2009, 07:47:14 PM »
Hello,

I have my limit switches and home switches wired into one pin per axis, so that one limit switch will share duty as a home switch as described in the mach 3 install and config pdf.  I only have X,Y, and Z axes.  When I do a ref all, my axis will move in the right direction, but when it hits the switch, it stops and the estop flashes as if it has hit the limit switch.  It will not back off the switch, the DRO does not go to zero, and it doesn't appear to be recognizing the limit switch is also a home switch, even though I did the auto set up of inputs and it has both the limits and the home on the same pin in the config/port and pins/input signals.  Does anybody know what I'm doing wrong?  Also, should it home all 3 axes at the same time?  Mine only does the Z first, and then I have this problem, so I don't really know if the others are working right or not.

Thanks,
Dave

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Homing and limits don't work right
« Reply #1 on: February 27, 2009, 07:50:36 PM »
Please attach your xml.
Z will home first then Y then X, you can change the order if you wish by editing the VB in the RefAll button.
Hood
Re: Homing and limits don't work right
« Reply #2 on: February 27, 2009, 10:49:45 PM »
What is an xml and how do I attach it?

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Homing and limits don't work right
« Reply #3 on: February 28, 2009, 05:00:30 AM »
While Hood looks at you XML file, try a bit of trouble shooting.

Go to Config/Ports and Pins/Inputs and disable all the switches. Try then activating the limits one at once and test them all, either by running you table against them, or by manual activation and check that they all work correctly, by looking on the diagnostics page, and watching for the appropriate signal.

If all you limit switches are fine,  make sure these a de-activated and then activate a "home" switch. Now test this by manuall switching it, and make sure it is recognised in the diagnostics page - if it is, fine, if it isn't, your config might be wrong (active low/high) , Once it is working correctly, set it up for auto zero, then run your "RefAllHome". The axis that are deactivated should just go to zero, the one you are testing should move, hit the switch, and as you know, back off.

If this works correctly, then switch on the same limit switch, so both functions are now active, and see if it works correctly now. You may find that it still fires up the "estop". This is because the switches you are using have electical "bounce". All switches have, some more than others. Go into Config/General Config, top right hand corner, and add some "de-bounce". Start with, say, 200, and try that. If this cures the problem, work down from the 200 figure until the problem re-appears, then move up again until is goes away.

This shold cure the problem.

Repeat for the other axis.



Not me driving the engine - I'm better looking.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Homing and limits don't work right
« Reply #4 on: February 28, 2009, 06:43:54 AM »
The xml stores all of your settings, it will be in your C:\Mach3 folder, there will be several of them but the one you want is the one named after the profile you are using, for example if its the standard Mach3Mill profile you use it will be called Mach3Mill.xml. You will need to copy it to your desktop and rename it before the forum will accept it as an attachment, suggest you rename it to Daveliz99.xml

Hood
Re: Homing and limits don't work right
« Reply #5 on: February 28, 2009, 08:45:02 PM »
I keep getting errors when I try to post.  The first one said I timed out, so I tried again.  The second time it said there was already a file posted with the same name as mine, I needed to rename it, so I did and retyped the message again.  The third time it said that I had already posted that message but I can't find it in the thread.  I have no idea what's going on.  I'll try again.

Here is the xml finally.  Thanks for taking a look.

I followed all of the directions from jimpinder, and all of the lights came on in the diagnostics screen.  The Y axis however would still trigger the estop when the limits were deactivated and the home was activated.  This maybe the bounce he was talking about.  The Z is the only one that will move during ref all, even with the limits deactivated.  It moves to the top and hits the switch, and stops.  It won't come off the switch.  Sometimes it moves in the wrong direction, even though I have pulled it off the switch to try again.  I understand that it will move in the opposite direction if the switch is already open or whatever, but the router is nowhere near the switch.  I have to go back to the settings to make it work right again, and I'm sure I'm not accidentally changing these settings, not even by accident.  I have tried entering different numbers into the home offset and home position fields trying to make it come off the switch, but it still stops right on it, and none of the others move.  If I activate the home and the limits again, the estop is triggered when z gets to the top. 

I don't know what's wrong.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Homing and limits don't work right
« Reply #6 on: March 01, 2009, 03:36:55 AM »
Your problem is you have Pin10 set to both Y switches and also the E-Stop.
Also disable the limit override as you do not have any poins asigned so I asume you do not have an external switch connected, same for Output 1, you have it enabled but no pin asigned so I presume you are not needing it, if you are meant to be using it for the spindle as I see you have t set to OutPut1 then you need to asign a pin.
Hood
Re: Homing and limits don't work right
« Reply #7 on: March 02, 2009, 01:41:01 AM »
Hood,
Thanks again for your help.

I made the changes you suggested.  However, the estop will not stay turned off.  I tried this many, many times.  When I changed it in the ports and pins, click ok, and reset, I can immediately open ports and pins/inputs again and the estop will be turned back on.  No joke.  Also, anytime I go to ports and pins, the home neg function in homing/limits will change its state as well.  As long as I stay out of ports and pins, the home neg remains consistent, but this is also very predictable.  I can go from homing/limits, click ok, and go immediately back to ports and pins, click ok, and the home neg has changed state, every time.  Again, it seems that if I stay out of ports/pins, home neg remains consistent.

Also, I added the debounce that jpinder suggested, and now when I ref all the machine doesn’t behave as if a limit has been tripped.  The Z will home, then Y, then X.  However, none of them will offset at all, regardless of what number I type into the home offset.  I have typed different numbers into the home position fields, and the machine coord. System will display these numbers when it reaches the switch, which is correct I assume.  I have tried making the numbers match in the home off and home pos, I have also tried making them different and making them negative and positive numbers.  No luck.  I suppose I can live with it the way it is, unless there’s a big reason it should offset from the switch.  Does it have to offset, or can I just call each axis zeroed when it touches the switch and leave it there.  I have included a copy of the xml file again, don’t know if anyone needs it or not.

Thanks a lot man, I need some help.
Dave
Re: Homing and limits don't work right
« Reply #8 on: March 02, 2009, 01:51:52 AM »
I forgot to mention in the post a minute ago that the home neg only changes for the Z axis.  X and Y always remain consistent.  This is what I was talking about in the post above when I said,

 "Sometimes it moves in the wrong direction, even though I have pulled it off the switch to try again.  I understand that it will move in the opposite direction if the switch is already open or whatever, but the router is nowhere near the switch.  I have to go back to the settings to make it work right again, and I'm sure I'm not accidentally changing these settings"

I just figured out tonight that this is what is causing the Z to move backwards sometimes.  I don't know if that helps you find the problem or not.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Homing and limits don't work right
« Reply #9 on: March 02, 2009, 02:43:32 AM »
Dave you cant disable the E-Stop, you can however set it to for instance Port 0 Pin 0 and change the active state accordingly. You can also set it up to a spare pin if you have one and use the E-Stop function which is preferable but if you dont have a physical  E-Stop button  then you can just change the active state to suit. If however like in your XML you have it set to the same pin as a limit or home switch then as soon as the switch becomes active Mach will think there has been an E-Stop.
Hood