Hello Guest it is March 28, 2024, 10:18:41 PM

Author Topic: Mach4 soft limits reverse axes  (Read 3672 times)

0 Members and 1 Guest are viewing this topic.

Mach4 soft limits reverse axes
« on: November 20, 2015, 06:21:00 PM »
Using 4.2.0.2803.
Whenever I enable soft limits, all my axes move in the opposite direction.
So if I press the x+ button, with soft limits off, x goes in the + direction.
Enable soft limits, press the x+ again, x goes in the - direction.
This happens on all axes.
Anyone see this happening??
Using a pmdx-410, and G540.
Talking with pmdx support now also.
Re: Mach4 soft limits reverse axes
« Reply #1 on: November 21, 2015, 12:06:00 AM »
You've been bitten by a known bug in the Mach4 soft limits code!  Look carefully at the soft limits config screen.  For the soft limit min/max settings, the first column in MAX, not min, and the second column is MIN, not max.  You entered your min values in the max column, and vice versa.  So Mach4 thinks that the max limit is less than the min limit, which is nonsensical   The Mach4 jogging motion planner misbehaves and drives the motors the wrong direction.  If you try to run GCode (either from a file or from the MDI input), the motion planner will give you an error saying you are outside the soft limits.

So swap the values in these two columns and you should be good to go.

Bob
Re: Mach4 soft limits reverse axes
« Reply #2 on: November 21, 2015, 01:56:14 PM »
That Was it! Thanks a lot Bob.

Anyone know why my Y soft limit will not allow a full inch increment??
I set it to 49", If I go back in to check, it's at 48.998.
I set to 47", go back in to check, it's at 46.998.
What's that about?? Just the Y.
Re: Mach4 soft limits reverse axes
« Reply #3 on: November 21, 2015, 11:37:49 PM »
For everyone's benefit here is a summary of my answer from the email I sent you:

This is a truncation issue in the Mach4 core.  Looking at your Machine.ini, your "steps per' is 1909.8610.  Internally Mach4 uses "steps", not inches or mm for position calculations. So 49 inches is 93583.189 steps.  I just now looked back in the INI file and found this: the soft limit is stored in the INI file as a floating point number *BUT* is it indeed truncated to an integer.  So in your INI file the soft limit is stored as 93583.0000.  If you then convert this back to inches (divide by 1909.861) you get 48.9998.

Bob

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Mach4 soft limits reverse axes
« Reply #4 on: November 22, 2015, 11:37:36 AM »
Excellent explanation Bob - thanks for posting the information.

Tweakie.
PEACE