LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.79k stars 1.15k forks source link

MDI of an arc that passes through the soft limit - overshoots soft limits by de-acceleration amount. #80

Open samcoinc opened 8 years ago

samcoinc commented 8 years ago

Here are the steps I follow to reproduce the issue:

Sim Axis.

  1. Move Y axis 5 inches away from positive soft limit. Zero
  2. X axis should be somewhere in the middle of travel an zeroed
  3. G0X10Y0
  4. g2x10i10f300

    This is what I expected to happen:

A linear movement checks to see of the end point is outside of the soft limits. Some similar check should happen for arcs.

This is what happened instead:

The machine moves towards the soft limit - hits the soft limit then de-accelerates. On our Matsuura - the over travel is far enough to hit the over travel limit switches in this situation. (the above example- the axsis moves past the soft limit by .393"

It worked properly before this:

This is 2.7.4 - I don't think this has ever worked.

jepler commented 8 years ago

As pointed out by @cradek this was also reported on the old bug tracker: https://sourceforge.net/p/emc/bugs/130/

We currently only check the endpoint of an arc for being inside the work volume https://github.com/LinuxCNC/linuxcnc/blob/19aaa6f752/src/emc/task/emctaskmain.cc#L502

As long as the work volume is a simple axis-aligned rectilinear solid, it might suffice to find which of 0, 90, 180, and 270 degrees (the cardinal directions) are within the arc, and then test that all those points are in the soft limits.

SebKuzminsky commented 8 years ago

... Except for G10 L2 R.

SebKuzminsky commented 8 years ago

Some hand-wavy discussion here: http://tom-itx.no-ip.biz:81/~tom-itx/irc/logs/%23linuxcnc-devel/2016-07-15.html#11:39:49