171
Mach4 General Discussion / Re: Mechanical speed ranges in Mach4
« on: January 15, 2020, 07:15:49 PM »
function m42()
local inst = mc.mcGetInstance("Spindle range 2")
local rc
local currentRange
currentRange, rc = mc.mcSpindleGetCurrentRange(inst)
if (currentRange == 2) then
return -- nothing to do!
end
-- Do the machine dependent range change control.
--
-- End machine dependent range change control
-- Next, tell Mach what rage we are now in IF the above is successful.
mc.mcSpindleSetRage(inst, 2) <----Should be: mc.mcSpindleSetRange(inst, 2)
end
if (mc.mcInEditor() == 2) then (to debug it should be: if (mc.mcInEditor() == 1) then
m42()
end
local inst = mc.mcGetInstance("Spindle range 2")
local rc
local currentRange
currentRange, rc = mc.mcSpindleGetCurrentRange(inst)
if (currentRange == 2) then
return -- nothing to do!
end
-- Do the machine dependent range change control.
--
-- End machine dependent range change control
-- Next, tell Mach what rage we are now in IF the above is successful.
mc.mcSpindleSetRage(inst, 2) <----Should be: mc.mcSpindleSetRange(inst, 2)
end
if (mc.mcInEditor() == 2) then (to debug it should be: if (mc.mcInEditor() == 1) then
m42()
end