Hello Guest it is April 03, 2020, 04:26:24 AM

Author Topic: home and limits question  (Read 7404 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
home and limits question
« on: May 23, 2007, 04:25:05 AM »
Hi all

When axis go home they hit the switch, decelerate then back off (as of course they should).
When an axis hits limit it stops instantly (which I think is normal) but... can Mach3 be configured so that they decelerate? (like home but obviously with no back off).

It just seems that if there's room for a decelerate after home switch hit, then why not after limit switch hit? I'm thinking it would be kinder to the machine.

Cheers

Offline Chaoticone

*
  • *
  •  5,629 5,629
  • Precision Chaos
    • View Profile
Re: home and limits question
« Reply #1 on: May 23, 2007, 07:42:43 AM »
I think what you want is softlimits which Mach has. :) In config, homing and limits. With these settings it will ramp down to a crawl until it hits a limit.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: home and limits question
« Reply #2 on: May 23, 2007, 09:07:42 AM »
hi Chaoticone

got it - thanks very much

Offline Chaoticone

*
  • *
  •  5,629 5,629
  • Precision Chaos
    • View Profile
Re: home and limits question
« Reply #3 on: May 23, 2007, 09:18:24 AM »
Your welcome, let us know if you need anything else.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline lemo

*
  •  135 135
    • View Profile
Re: home and limits question
« Reply #4 on: May 23, 2007, 09:46:42 AM »
Think about it, the limit switch is not, compared to the home switch, at a fixed location.
At least not necessarily by definition.
The limit switch is simply signaling the event that a set limit has been hit. I move my limit switches when I have my 4th axis mounted, so the machine head stock does not collide, or better said, cannot collide. So the machine can know where home is and then certainly slow down while approaching it, but in the case of a limit, it has to stop dead and does not really know when to encounter that position.
In theory it would be nice to have the machine figure out where the limit is, equal to the home exploration. And then work as it does with the soft limits.
But in practice, the limits should NEVER be hit as per definition something is at fault.
And considering that, things are not going to improve from there.
I changed my workflow to tell the machine that I have home switches, then run it very close to the limit switches, note the locations, enter them as soft limits, then unleash heck on the workpiece. I have to do that as the limit switches are often triggered by the induced stepper noise on their lines. And I am to lazy to rewire right now. That method works very well, and I cannot destroy my little mill.
Cheers
Lemo
Cut five times and still to short...

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: home and limits question
« Reply #5 on: May 23, 2007, 06:02:57 PM »
Hi lemo - understood.

My question was based around the fact that suddenly stopping an axis is generally best avoided except when you're about to lose a body part.
I'd thought that there would be a way in Mach3 to avoid this happening and indeed as Chaoticone stated, there is.
I'd expected the algorythm to be "if you hit a limit then brake hard as you can to a stop" and the op would position the limit switches appropriately. Wheras it's actually "on entering the soft limit zone, slow down to a velocity slow enough that IF you hit a limit, a sudden stop will not be too hard".

Which is the better approach? I don't know - I can see advantages/disadvantages to both approaches.

Offline lemo

*
  •  135 135
    • View Profile
Re: home and limits question
« Reply #6 on: May 23, 2007, 08:16:30 PM »
The soft stop is always the better one. But the software has to know where that is located to be able to slow down to a crawl.
The limit switch option controlled by the port and the pin ID is a mystery for the machine till it hits.
When I use the hard limit switch, then I even modify their X position during the run if I see that some obstruction is closer than I thought.
I don't think that both methods can really be compared. When you know you do not loose steps, and the code worked on is known, then I see little risk that the software would loose sync with the real world and require the hard limit switches. Soft would be fine. I just finished building my little pet, so I rely on the hard limits while adjusting and trying things. Once all looks cool, I use the soft limits for the apparent benefits.

Btw... I just connected an old USB joystick. Haha, very cool!
Lemo

Cut five times and still to short...

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: home and limits question
« Reply #7 on: May 24, 2007, 03:04:17 AM »
Hi again lemo - this could run :D

It doesn't matter that the machine doesn't know where a limit switch is. It's how it can respond, if and when it hits one that I'm discussing. The software writer (Art in Mach3's case) has basically two options.

if limit switch hit then
stop dead
end if

or

if limit switch hit then
stop in a controlled manner
end if

it's like when you're driving your car, you don't know when a child is going to run out in front of you but you have the same options if one does

if child runs out then
break so hard you're head comes off
end if

or

if child runs out then
break as hard as you can without causing your neck to snap.
end if

Another approach is to play the caution card i.e. when there's a likelyhood of children being around, drive slowly enough that if you have to do a dead stop, you can do so without your eyes flying out of your head and splatting on the windscreen. This is the Mach3 approach. It's a perfectly good approach but not the only one possible is all I'm saying.

Offline Chaoticone

*
  • *
  •  5,629 5,629
  • Precision Chaos
    • View Profile
Re: home and limits question
« Reply #8 on: May 24, 2007, 08:02:38 AM »
Stirling, If a limit is hit, it stops dead still right then no matter if soft limits are on or not. The soft limits simply put are set so that you never get to the limits. If they are not set up right, they won't work as they should. In any case, make a limit and, dead stop.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Hood

*
Re: home and limits question
« Reply #9 on: May 24, 2007, 01:14:03 PM »
Stirling, it is not really practical to  stop in a controlled manner after a limit has been hit.  You would have to position your limit a certain distance away from where your actual physical table limits were as a controlled stop would take some distance. You would find this distance very hard to judge as the speed the axis was moving would vary the stopping time and also the weight of the axis (with a vice, with a heavy workpiece etc) so in the end you would have to move it back far enough for the maximium expected "controlled stop" distance which would eat up valuable travel. A possibility would be to have a second limit before the hard stop limits so that when it was tripped the axis could slow down, but why do this when that is exactly what the softlimits do?

Hood