Hello Guest it is April 13, 2021, 09:52:52 PM

Author Topic: Setting Soft Limits On as the Default  (Read 4382 times)

0 Members and 1 Guest are viewing this topic.

Offline Stuart

*
  •  260 260
    • View Profile
Re: Setting Soft Limits On as the Default
« Reply #10 on: June 29, 2016, 01:52:21 PM »
Thanks Daz

Thought it may be so

Pity they do not save its state in the profile , but again there may be reasons I do not know about

Btw long time Mach3 user but due to the Chinese motion controller playing silly whats its I have converted the mill to mach4 and ESS with a C25

Stuart

Offline DazTheGas

*
  •  753 753
  • DazTheGas
    • View Profile
Re: Setting Soft Limits On as the Default
« Reply #11 on: June 30, 2016, 03:24:27 AM »
With a little coding you can save the state of a button, look at the ButtonEnable() function in the Screen Load Script which is using scr.SetProperty on loadup, this combined with a scr.GetProperty and mcProfileWriteInt or String before the screen is destroyed on exit will do this for you.

DazTheGas
Theres always time for a choccy biccy

Offline Stuart

*
  •  260 260
    • View Profile
Re: Setting Soft Limits On as the Default
« Reply #12 on: June 30, 2016, 03:54:04 AM »
Thanks

That will take some thinking about for my 70 year old brain cell :)

Nice topic for one of your great quick tips vidieo's  ;D please

Thanks for taking the time to reply

Stuart
Re: Setting Soft Limits On as the Default
« Reply #13 on: July 06, 2018, 10:07:22 AM »
I am not getting this button default state to work.  I select button down and it seems that it just changes it for the moment and and does set the default.  My goal is to have keyboard and softlimits enabled by default.

i change to button down, restart and the button is not active.

thank you for any info.
Re: Setting Soft Limits On as the Default
« Reply #14 on: July 13, 2018, 04:41:44 AM »
something else you can use is mc.X_AXIS, mc.Y_AXIS etc to specify which axis you want. it makes your code more legible.

function autoSoftLimitsToggle (togglevalue)
    local rc = 0
    for i=0, 11 do
        if mc.mcAxisIsEnabled (inst,i) == 1 then mc.mcSoftLimitSetState (inst,i,togglevalue) end
    end
end

autoSoftLimitsToggle(1)
« Last Edit: July 13, 2018, 04:44:36 AM by cd_edwards »