171
Mach4 General Discussion / Re: Set propperties from button within a function
« on: April 13, 2020, 11:45:34 AM »
Instead of 'Up' and 'Down', use '0' and '1'
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
local axisID, rc = mc.mcMotorGetAxis(inst,Spindle)
motorId, rc = mc.mcAxisGetMotorId(
number mInst,
number axis,
number childId)
if AxisZ == "2"
this should be if AxisZ == 2
function JogRatePercent(percent) --This function sets the jog rate
scr.SetProperty("droJogRate", "Value", tostring(percent))
end
wait = coroutine.create(function()
local inst = mc.mcGetInstance()
mc.mcCntlMdiExecute(inst, "g01 x100 f1000")
coroutine.yield()
wx.wxMessageBox("Move complete")
end)