Hello Guest it is March 28, 2024, 05:05:37 PM

Author Topic: Mach4 build 4517, M6 Not working  (Read 1000 times)

0 Members and 1 Guest are viewing this topic.

Mach4 build 4517, M6 Not working
« on: September 19, 2020, 10:20:58 PM »
After switching computers and installing the latest mach4  build 4517 using a ESSv260 I can no longer get my m6 command to work.  I wrote the script just like Daz instructed in his videos but my machine still skips over the manual tool change.  M01 is turned on.  anyone have a suggestion?

Offline reuelt

*
  •  520 520
    • View Profile
Re: Mach4 build 4517, M6 Not working
« Reply #1 on: September 20, 2020, 01:45:28 AM »
After switching computers and installing the latest mach4  build 4517 using a ESSv260 I can no longer get my m6 command to work.  I wrote the script just like Daz instructed in his videos but my machine still skips over the manual tool change.  M01 is turned on.  anyone have a suggestion?
Is your "tool change type" setting set correctly?
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Mach4 build 4517, M6 Not working
« Reply #2 on: September 20, 2020, 08:06:49 PM »
Yes, I've actually try both setting both nothing changes.

Here's the tool change macro
function m6()

   local inst = mc.mcGetInstance()
   local selectedTool = mc.mcToolGetSelected(inst)
   local currentTool = mc.mcToolGetCurrent(inst)
   
   if selectedTool == currentTool then
   return   
   mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
   else
   mc.mcCntlGcodeExecute(inst, "G90 G53 G0 Z0.0");--Move the Z axis all the way up
   local changetoo = mc.mcToolGetDesc (inst,selectedTool)
   wx.wxMessageBox ("Change to tool number "..selectedTool.." "..changetoo.." and press ok to continue")
   
   wx.wxMessageBox ('Toolchange finished')
   end
end
if (mc.mcInEditor() == 1) then
   m6()

Offline reuelt

*
  •  520 520
    • View Profile
Re: Mach4 build 4517, M6 Not working
« Reply #3 on: September 20, 2020, 08:53:02 PM »
The should be another  "end" after the last if statement.
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Mach4 build 4517, M6 Not working
« Reply #4 on: September 21, 2020, 12:18:12 AM »
Okay figured it out, my LUA plugin was not enabled.