Hello Guest it is May 09, 2021, 06:16:38 PM

Author Topic: MACH 4 M6 NOT WORKING, i have tried 5 scripts an 2 weeks fighting this  (Read 2359 times)

0 Members and 1 Guest are viewing this topic.

Hi,
instead of venting try posting your M6 code and that section of your Gcode file that misapplies the
length offset.

Craig
will do
this code is working except for 2nd tool change it is changing the offset to the 2nd tool but not stopping to let me change tool to the 2nd tool
i need a stop in there for second tool an it to change the tool selected to that tool



(1001)
(T12  D=0.45 CR=0.225 - ZMIN=-0.1803 - BALL END MILL)
(T14  D=0.5 CR=0. - ZMIN=-0.2 - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G20
G28 G91 Z0.
G90










(2D CONTOUR1)
M5
M9
T14 M6
G54
M8
G0 X2.9 Y-0.4
G43 Z0.5906 H14
Z0.1969
G1 Z0.0394 F13.1
Z-0.15
G19 G3 Y-0.35 Z-0.2 J0.05 K0.
G1 Y-0.3 F39.4
G17 G3 X2.85 Y-0.25 I-0.05 J0.
G1 X2.5628
X0.15
G2 X-0.25 Y0.15 I0. J0.4
G1 Y1.85
G2 X0.15 Y2.25 I0.4 J0.
G1 X2.28
X2.85
G2 X3.25 Y1.85 I0. J-0.4
G1 Y0.15
G2 X2.85 Y-0.25 I-0.4 J0.
G3 X2.8 Y-0.3 I0. J-0.05
G1 Y-0.35
G19 G2 Y-0.4 Z-0.15 J0. K0.05
G0 Z0.5906
G17
G28 G91 Z0.
G90

(2D POCKET1)
M5
M9
M1
T12 M6
G54
M8
G0 X3.152 Y2.1806
G43 Z0.5906 H12
Z0.1969
G1 Z0.0056 F39.4
G19 G2 Y2.1356 Z-0.0394 J-0.045 K0.
G1 Y2.0646
Y-0.0648
Y-0.0666


im using
factory m6 at moment

function m6()

   local inst = mc.mcGetInstance()
   local selectedtool = mc.mcToolGetSelected(inst)
   local currenttool = mc.mcToolGetCurrent(inst)
   
   if selectedtool == currenttool then
      mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
   else
      --Remove this line if you would not like the Z axis to move
      mc.mcCntlGcodeExecute(inst, "G90 G53 G0 Z0.0");--Move the Z axis all the way up
      mc.mcCntlToolChangeManual(inst, true);
      mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedtool) .. "   Previous Tool == " .. tostring(currenttool))
      mc.mcToolSetCurrent(inst, selectedtool)
   end
end

if (mc.mcInEditor() == 1) then
 m6()
end
« Last Edit: June 04, 2018, 08:22:32 PM by jbraddock »
Hi,
one thing to confirm...there are two different interpretations that Mach applies to the tool number:

1) The tool number is the tool to fit at this M6
2) The tool number is the tool to fit at the next M6

2) is particularly useful for highspeed production machines, it means that the tool is already selected and waiting
meaning a quick tool change.

If memory serves this setting is in the Control (Mach) plugin. Double check that the interpretation Mach applies
is consistent with the toolchange logic.

Craig
My wife left with my best friend...
     and I miss him!
guess what! you my hero! it needed to change the setting in there to use m6 as tool selected not next tool, presto alakazoo wham bam thankya mam it works!
Hi,
that little wrinkle has caught a few out!

Craig
My wife left with my best friend...
     and I miss him!
Hi,
that little wrinkle has caught a few out!

Craig
it almost made me throw in the towel, 2weeks 2 frign weeeeeeeks  it has set me back but il sleep tonight, Thank you so much !!!!    an sorry for my rant an rave, ive been so irritated  that it should be working, ive spent 40+ hrs doing the wrong stuff to try an fix it, now on to another problem, every time i fix one another takes its place so hopefully one doesn't because that one almost killed my spirits
Hi,
Mach4 like ANY new software solution takes time to master. Mach4 seem to have a little
more 'frustration factor' than others but is still 'just another software solution'.

Keep plugging away and use the forum, the documentation is patchy.

Craig
My wife left with my best friend...
     and I miss him!
if anyone else has this problem go into
configure,

1 mach/control,
2 tools,
   THEN IN TOOLS
3 tool change type
  uncheck box  T on M6 line is next tool

4  (...CHECK THE BOX  T on M6 LINE IS TOOL TO USE...)


FIXED MY ISSUE.... THANKS TO JOEAVERAGE.....

Offline dude1

*
  •  1,253 1,253
    • View Profile
disregard
« Last Edit: June 04, 2018, 10:50:21 PM by dude1 »

Offline Stuart

*
  •  264 264
    • View Profile
to OP

how have you got the setting in mach for tool. for manual tool change it should be set to " T on M6 line is tool in use "   then your tool change will work