Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: daveliz99 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
-
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
-
What is an xml and how do I attach it?
-
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.
-
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
-
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.
-
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
-
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
-
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.
-
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
-
I'll do that. Do you know why it won't move off of the home switches? Is it really that big of a deal?
Thanks.
-
It wont move off the home switch because the E-Stop is being seen.
However if you are meaning the Home Off value you have set then it is because you are misunderstanding what that distance is for. When you set a Home Off value the home position is set to that distance but the axis will not move to it. What it is meant for is if you have your home switches at a position other than true zero you can enter a Home Off value.
To give an example, if your home switches were at 100mm inboard of the true zero position of your travel and you homed the switch position would be set as zero. However you could set a home off value of 100mm and this would mean when you homed the DRO would read 100 (in machine coordinates) and so Mach would know you still have 100mm more travel to get to your machines zero position and can use that information for soft limits.
Hood
-
I changed the Estop to port 0, pin 0. It seems to be working.
So just to check my understanding, the machine should move until it touches the home switch and stop right there. It should not physically move off of the switch. Is that correct?
Since my machine uses a limit switch as a home switch also, my home offset setting should be zero for all axes, since it will be at the extreme end of the axis when it homes. Is that correct?
What are the G28 home location cooridnates? My understanding is that G28 is a command that tells the machine to go home, but go to some other cooridinate values first. For example, it you needed to go around a clamp or something, you could use the G28 command to move around the clamp, then go home. Should all of mine be set to zero?
If I understand the soft max and soft min correctly, this is so that the table size will appear to be correct in the tool path window on the program run screen. So to get these numbers accurately, I should home the machine to zero, and then travel to the opposite end of the X and Y axes, and when it triggers the other limit switch, I should type in the number from the DRO into the soft max. Is that correct?
Thanks again,
Dave
-
I changed the Estop to port 0, pin 0. It seems to be working.
So just to check my understanding, the machine should move until it touches the home switch and stop right there. It should not physically move off of the switch. Is that correct?
It should reverse very slightly until the switch closes again then stop.
Since my machine uses a limit switch as a home switch also, my home offset setting should be zero for all axes, since it will be at the extreme end of the axis when it homes. Is that correct?
Yes, unless you home to the positive direction of the X or Y axis, if so then you should set the Home Off value as the travel you have, so that when homed it will read that distance in the machine coords DRO and if you jog fully negative the machine coords DRO would then read zero.
What are the G28 home location cooridnates? My understanding is that G28 is a command that tells the machine to go home, but go to some other cooridinate values first. For example, it you needed to go around a clamp or something, you could use the G28 command to move around the clamp, then go home. Should all of mine be set to zero?
What I understand is G28 is a location you can set up as your default home position, if you want you can enter numbers into these boxes and when you call G28 it will go there. You can also alter the RefAll buttons code to do a G28 move after the homing move if you wish.
If I understand the soft max and soft min correctly, this is so that the table size will appear to be correct in the tool path window on the program run screen. So to get these numbers accurately, I should home the machine to zero, and then travel to the opposite end of the X and Y axes, and when it triggers the other limit switch, I should type in the number from the DRO into the soft max. Is that correct?
More or less, would be best to set the distance as just before you trip the switch. The Softlimits when activated will also stop you from hitting the physical limit switches and should also show you a warning message when you press the start button if the code would take you into a limit switch.
One other thing you may want to look at is setting up the safe Z, I have mine in machine coords and just below my Z home (-2mm). When I do a GoToZero or a Run From here it will move the Z up before moving X and Y then finally move the Z back down.
Hood
-
Thanks a million man, you've really helped me a lot.