Hello Guest it is April 28, 2024, 07:48:02 PM

Author Topic: Soft limits offset  (Read 777 times)

0 Members and 1 Guest are viewing this topic.

Offline dibor

*
  •  26 26
    • View Profile
Soft limits offset
« on: January 15, 2023, 02:17:38 PM »
Hello to all.
I see strange soft-limits behaviour.
I set, for example, soft limit to 300mm, program stop moving axis on 296, I set to 320, program stops on 316.
Why I have 4mm offset?
I do not saw anything about any offset in the manual.

Here version 4.2.0.4964

Anybody have same problem?

Maybe I do something wrong?

Best Wishes.

Re: Soft limits offset
« Reply #1 on: January 31, 2023, 04:03:23 PM »
Question. if you turn your soft limits off, when does your axis actually trip the switch. (I'm assuming you have referenced all home)
Lets say your switch trips at 316, you have your soft limit set to 300, stopping at 296 is correct. But if you set your limit to 320 it is going to stop at 316 your actual switch.

I might be way off on this but sound like trouble I was have at first.

Offline dibor

*
  •  26 26
    • View Profile
Re: Soft limits offset
« Reply #2 on: January 31, 2023, 05:00:58 PM »
Hello.
Thanks for the answer.
I have Home and Limit switches, limit switch is on 330mm.
So, if I set software limit switch to 340 - hardware limit switch will stop movement on 330.
I'd like to use software limit switches because Mach4 stops movements on software limits and not engage E-stop.
If hardware limit is reached - impossible to enable the program.
Possible only to turn on "Override limits" and move axis out of hardware switches, or move them manual , but in this case we loose right coordinates.

Re: Soft limits offset
« Reply #3 on: February 01, 2023, 01:06:12 AM »
Hi,
I have Limit and Home switches fitted to each axis but still use SoftLimits to stop just inside the Limit switches for
exactly the same reason that you do......I never trigger the Limit switch and therefore never get Estop's.

I have the Limit switch about 2mm inside the physical hard stop, the Home switch 2mm inside the Limit switch and set the
Softlimit to be 2mm inside that. I've never had the machine stop on soft limits other than that I've programmed. Nor can I imagine
any reason that it would stop short of the programmed limit.

Note that I would expect the machine, if it ever hit the SoftLimit at speed that the machine would need to decelerate in a controlled manner
and might overshoot the SoftLimit by a mm or so, but I would never expect it to stop short.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline dibor

*
  •  26 26
    • View Profile
Re: Soft limits offset
« Reply #4 on: February 01, 2023, 01:46:37 AM »
Hi Graig.
In other wolds, your machine is stops exact on programmed limits without any offset.
What version do U use?
Here 4964.

Thank you.
Re: Soft limits offset
« Reply #5 on: February 01, 2023, 02:04:16 AM »
Hi'

Quote
In other wolds, your machine is stops exact on programmed limits without any offset.

Yes, that is correct. I'm at home now and can't interrogate my machine but I think its 4162.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline dibor

*
  •  26 26
    • View Profile
Re: Soft limits offset
« Reply #6 on: February 01, 2023, 02:16:33 AM »
Thanks.
I will try to check with 4162 version.
Re: Soft limits offset
« Reply #7 on: February 01, 2023, 05:29:31 PM »
Hi dibor,
I am at work and double checked my machine, sorry the build I'm using is 4612, a slight typo on what I posted last night.

Just as a matter of interest I deliberately jogged my machine until it exceeded the X++ and Y-- SoftLimits and took a screen shot of the result
overlaid with the Homing/SoftLimits tab of Machs Control plugin tab.

Note that the X axis stopped 3um short of the programmed SoftLimit and the Y axis stopped 2um short of the programmed SoftLimit.
They appear to work as I would expect.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Soft limits offset
« Reply #8 on: February 01, 2023, 05:48:23 PM »
Hi,
I've just had a thought as to why the machine is stopping short of the programed point.

As we know if Mach detects a movement command that would go outside of the Softlimits it will refuse to enact that command.

Lets say for instance the the machine is current 3mm short of a SofttLimit. If you MDI'ed another 4mm of movement Mach would not do
it and the machine would STILL be at 3mm short. Likewise if you were jogging and Mach detects that the sequence of jog commands would
take it out of limits it will ignore them. It does not drive up to the limit and then stop, its stops wherever it is because it ignores the movement command.

Could this be what is happening to you? Say you are a few mm from the limit and then you spin the jog wheel, and the sequence of jog commands exceeds
the distance between its current location and the limit, it would just ignore them, and stay where it is, still 3mm short?.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Soft limits offset
« Reply #9 on: February 01, 2023, 08:33:26 PM »
Hi,
the more I think about it the more I'm convinced that the problem you describe is not so much a fault as the way SoftLimits work, in fact have to work.

Lets say that your machine is 50mm inside the limit and yet your Gcode calls for another 60mm of movement, which would put it outside the limit.
If Mach were to attempt that move it would issue movement instructions in 1 millisecond time slices to the buffered motion controller, this is normal and how Mach operates.
However when 50mm of movement has occurred then its on the limit, so now the machine would have to decelerate to a stop. But what about those 1ms time slices that
are still in the buffer? If you abort them (like you would with a Limit switch event or an Estop) then you lose reference, because Mach does not know how many time slices
nor how much movement those times slices represent. So even if Mach did the clever thing and decelerated to a stop it wouldn't make any difference the machine would still
lose Reference....which sort of defeats the purpose of SoftLimits.

I can only conclude that Mach would just refuse to enact (ie just ignore) the last movement instruction that would cause it to go out of bounds. In which case it would stop
and the end of the previous instruction, say 50mm still short!

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'