Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Soxfan963 on September 17, 2017, 10:29:48 AM

Title: Canned solutions? M6 and others....
Post by: Soxfan963 on September 17, 2017, 10:29:48 AM
Why isn't there a canned solution for something as simple as a manual tool change?  This forum is loaded with posts about Mach 4 users having to write code to do tasks that should be VERY easy. As easy as selecting a few check boxes or radio buttons. I realize there are many different machines and processes that users are trying to run, but I have to think that most of what we're all trying to accomplish is based on a handful of basic operations.

I've been searching for a M6 Macro that will:
-Recognize that a tool change is needed and pause the program.
-Raise the Z axis to the top.
-Allow a bit change.
-Allow me to touch off the new bit.
-and Resume the program.

Why is this not built into Mach 4?

Mostly what I'm finding on this forum is people who are forced to learn how to write code (like me) when all we really want to do is run our machines.  I'm willing to guess that 90% of us don't consider Lua coding a hobby or a profession.

I understand that Mach 4 is VERY customizable, and that is great, but shouldn't be necessary to perform basic tasks like changing a tool!

Sorry for the rant..
Title: Re: Canned solutions? M6 and others....
Post by: smurph on September 18, 2017, 12:43:06 AM
If it were a snake, it would have bitten you.  :)  Have a look in the LuaExamples\Toolchanger directory of your Mach 4 installation.  There you will find and assortment of tool changer M6 macros.  One of them will do exactly (or close to) what you want.  And if it doesn't, then what you are wanting to do doesn't fit the handful of basic operations.  Luckily, we gave you the ability to do anything you want with a tool changer.  But at that point, you will have to make it do your bidding with a small amount of LUA self education.  It isn't rocket science.  And the forum is here for help if you need it.  

MOST of the time when people are having to write code it is because they DO want something special.  Or they THINK they need something special and just don't know any better because the first time they thought about a CNC machine was the week before when they ordered it.  I'm speaking from experience because yeah...  I used to be that guy that didn't know any better.  Everybody starts at square one.  

95% of the time, people just buy a machine that already had Mach installed and configured.  This forum makes up the 5% that don't do that.  This group of people either retrofitted an existing machine, or built their own.  Like it or not, they are now the machine control integrator.  In both cases, each person has (knowingly or not) accepted the challenge of having to do more than the 95% did.  

If you don't have an auto changer, have you thought about not even messing with M6 codes in a program?  I write (or generate) a G code file per tool and just run them separately.  Way less hassle, IMHO.  

Steve
Title: Re: Canned solutions? M6 and others....
Post by: TIMYTHY on December 01, 2017, 07:26:41 PM
Hey so I'm actually having a similar problem. Running the out-of-the-box m6() script supplied renders the Touch Off UI inactive during tool changes.

I've been trying to find a solution that would keep it active (Taig Mill = Manual ER collet tool changes) but so far I've come up with bupkis. In order to access the Touch Off Module and zero out a new cutter, I've got to hit disable/enable, which rewinds my gcode.
Title: Re: Canned solutions? M6 and others....
Post by: TIMYTHY on December 01, 2017, 09:05:18 PM
seems like the  mc.mcCntlToolChangeManual(inst, true); disables the Touch Off UI but I don't know why.