211
Mach4 General Discussion / Re: How can I smooth out motion in my LUA script
« on: February 02, 2019, 10:54:05 AM »
How about using M64 and M65 to turn the outputs on and off? I don't know if this will help with the 'smoothness' of the motion but it is a bit tidier.
So your code would end up like this..
So your code would end up like this..
Code: [Select]
local inst = mc.mcGetInstance()
local GCode = ""
GCode = GCode .. "G00 G91 Z-2.0\n"
GCode = GCode .. "M64 P0\n" --Output 0 on
GCode = GCode .. "G00 G91 Z-.25\n"
GCode = GCode .. "M65 P0\n" --Output 0 off
GCode = GCode .. "M64 P1\n" --Output 1 on
mc.mcCntlGcodeExecuteWait(inst, GCode)