Hi Andy, I hope you're doing well :) Thanks for the insight. Didn't think about using an STL file to determine the bounding boxes. I was just thinking about plain HAL logic because it's not that I need to cover a very complex geometry. But it's a pretty nifty solution and a good way to improve my skills with LCNC.
Anyway, I should have explained better what I would like to do. I want this bounding box to work not only on jog motion but on automatic cycle too. Basically I want it working all the time (at least after the machine is homed) so there's no way the machine can crash with known components/surfaces. Turning off the machine is a good option and it doesn't hurt, but a motion inhibit without turning off and just displaying a warning would be perfect. From what I could grasp there's no such thing as motion inhibit that works with all the modes of operation. Program pause should be perfect for AUTO operation but for JOG mode I think *motion.enable* is the way to go at least until I figure out a better way. El dom, 16 ene 2022 a las 8:44, andy pugh (<[email protected]>) escribió: > On Sat, 15 Jan 2022 at 02:40, Leonardo Marsaglia <[email protected]> > wrote: > > > I have a little question about inhibiting jogging motion. I know I can do > > that with G CODE but I would like to know if there's an easy way to > extend > > it to JOG motion. > > That depends on the source of the jog motion. I don't think that you > can do this for keyboard jogging in Axis, for example. > > For jogwheel jogging in the HAL layer you can set the jog-enable pin > to false for the axis in question. > axis.L.jog-enable IN BIT / joint.N.jog-enable IN BIT > > For continuous HALUI jogs I think you would need to set scale and / or > increment to zero to inhibit. (which does not affect keyboard / mouse > jogs from the GUI) > halui.axis.x.increment / halui.axs,jog-speed etc > > A linked problem is deciding when to allow jogs to get away from the > limit shape. The GUIs tend to do this internally. If you are on the > positive limit then they allow negative jogs. > > For a more complicated bounding box it is altogether more complicated. > I think that my approach would be to define the limits with an STL > file. The reason being that STL is a rather simple format, but > contains facet normal information. > > Luckily jogging generally only happens in straight lines along each > axis (Not necessarily the case with analogue joypad jogging) so at the > start of motion you can pre-calculate the face that will be hit and > where. > Then, if the combination of the direction if that face normal, the > intercept point on the face, and the jog direction indicates that > motion should be allowed, then allow motion. > > I would write this as a HAL realtime component, but it would probably > work OK as a Python userspace component, and then there would be > existing libraries available. > > -- > atp > "A motorcycle is a bicycle with a pandemonium attachment and is > designed for the especial use of mechanical geniuses, daredevils and > lunatics." > — George Fitch, Atlanta Constitution Newspaper, 1912 > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
