I've added a macro for M8/M9 to switch my dust collector.
This one is controllerd by http, so I have the following code for M8:
function m8()
inst=mc.mcGetInstance()
mc.mcCntlSetLastError(inst, 'Dust Col on')
local http=require("socket.http");
http.request("http://shop.local/api.php?port=99&action=on&hash=hash_here")
end
if (mc.mcInEditor() == 1) then
m8()
end
In the editor this works fine,but when called through g-code the http.request is not working.
I know the code is working since the 'mcCntlSetLastError' is triggered
Anyone any suggestion ?