1
Mach4 General Discussion / No way to switch soft limits from lua script?
« on: February 08, 2018, 07:01:00 AM »
Hi.
I use this script:
1. SoftLimit not worked.
2. No Output signal:
If I switch by button action, softlimits are worked and OSIG_SOFTLIMITS_ON triggered.
Possible need switch softlimits globally?
Can I switch softlimits by code?
M4 ver.4.2.0.3658
I use this script:
Code: [Select]
mc.mcSoftLimitSetState(inst, mc.Z_AXIS, MC_ON);
mc.mcSoftLimitSetState(inst, mc.Y_AXIS, MC_ON);
mc.mcSoftLimitSetState(inst, mc.X_AXIS, MC_ON);
1. SoftLimit not worked.
2. No Output signal:
Code: [Select]
[mc.OSIG_SOFTLIMITS_ON] = function (state)
mc.mcCntlSetLastError(inst,"OSIG_SOFTLIMITS_ON " .. tostring(state));
if( state == 1) then
scr.SetProperty('tbtnSoftLimits', 'Button state', '0');
else
scr.SetProperty('tbtnSoftLimits', 'Button state', '1');
end
end,
If I switch by button action, softlimits are worked and OSIG_SOFTLIMITS_ON triggered.
Possible need switch softlimits globally?
Can I switch softlimits by code?
M4 ver.4.2.0.3658