Hello Guest it is June 15, 2025, 08:39:25 AM

Author Topic: Change Softlimit min Value in M6  (Read 4684 times)

0 Members and 1 Guest are viewing this topic.

Change Softlimit min Value in M6
« on: November 14, 2024, 03:47:26 PM »
Hi, I try to use the mcAxisSetSoftlimitMin on the z Axis to avoid a tool crash against the machine when working with different tools. During the M6 script i update the Softlimit with a new value. The problem is, that the value is not active immediately. after I close mach4 and restart it again the value is updated and used. is there any different possibility to update soft limits during M6 ?
Re: Change Softlimit min Value in M6
« Reply #1 on: November 15, 2024, 03:58:26 AM »
I already tried to enable and disable the limits 🙂 for testing outside M6 I added a Button to the screen and tested different code....

Test1:
mc.mcAxisSetSoftlimitEnable( 0, mc.Z_AXIS, 0)
rc = mc.mcAxisSetSoftlimitMin( 0, mc.Z_AXIS, -100)
mc.mcAxisSetSoftlimitEnable( 0, mc.Z_AXIS, 1)

Test2:
mc.mcSoftLimitSetState(0, mc.Z_AXIS, 0)
rc = mc.mcAxisSetSoftlimitMin( 0, mc.Z_AXIS, -100)
mc.mcSoftLimitSetState(0, mc.Z_AXIS, 1)

Test3:
mc.mcAxisSetSoftlimitEnable( 0, mc.Z_AXIS, 0)
mc.mcSoftLimitSetState(0, mc.Z_AXIS, 0)
rc = mc.mcAxisSetSoftlimitMin( 0, mc.Z_AXIS, -100)
mc.mcSoftLimitSetState(0, mc.Z_AXIS, 1)
mc.mcAxisSetSoftlimitEnable( 0, mc.Z_AXIS, 1)

I also tried to disable and enable the axis....

mc.mcAxisEnable(0,mc.Z_AXIS,0)
mc.mcAxisSetSoftlimitEnable( 0, mc.Z_AXIS, 0)
mc.mcSoftLimitSetState(0, mc.Z_AXIS, 0)
rc = mc.mcAxisSetSoftlimitMin( 0, mc.Z_AXIS, -100)
mc.mcSoftLimitSetState(0, mc.Z_AXIS, 1)
mc.mcAxisSetSoftlimitEnable( 0, mc.Z_AXIS, 1)
mc.mcAxisEnable(0,mc.Z_AXIS,1)

the result is always the same ;-( Softlimits only updated after restart of mach4

Offline Graham Waterworth

*
  • *
  •  2,783 2,783
  • Yorkshire Dales, England
Re: Change Softlimit min Value in M6
« Reply #2 on: November 16, 2024, 07:11:00 PM »
Have you tried toggling the softlimit button on screen?
Without engineers the world stops