On Monday 27 August 2018 15:17:39 Les Newell wrote:

> Gene, you  mentioned settable soft limits in your last post. I have
> been doing some work along these lines.
>
> On my router the tool changer is on one end of the Y axis and a rogue
> g-code file could ram the spindle into it and do a lot of damage. A
> while back I messed up my tool change sequencing and it tried putting
> a tool in a pocket that already had a tool in place. The machine
> pushed the ATC out of the way with ease. The ATC is attached to the
> gantry with a bracket made of 50x50 (2" square) steel box section,
> which ended up badly twisted. It took the application of a lot of
> effort with a big bar to straighten it all up again.
>
> Anyway to try to prevent rogue code doing damage I dynamically adjust
> the Y axis limits. The limits can be changed with hal pins. For
> example I adjust the hal pin ini.y.max_limit, increasing the positive
> limit when I need to do a tool set or tool change. That way, in normal
> operation it won't let the Y axis move far enough to hit the ATC.
>
> It should be possible to hook the limit pins to motion.analog-out-NN
> pins. You can then use M67 to set the limits to whatever you want. The
> only tricky bit is that the limits are in machine coordinates so you
> have to do some clever trickery to convert work coords to machine
> coords. On my lathe I'd like to override the tool change so it can
> take the tool offsets into account when it sets the limit.
>
> Does anyone know a good way of converting work coords to machine
> coords in g-code?
>
> Les
>
>
Something I have wished for Les, on several occasions, but have not been 
able to find a way to do that math in hal. It could be there and I've 
thrown away enough calendars I don't recognize it when I see it.  One of 
the hazards of outliving ones enemies.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to