Hello Guest it is October 21, 2021, 05:44:48 AM

Author Topic: manual tool change macro needed  (Read 9974 times)

0 Members and 1 Guest are viewing this topic.

manual tool change macro needed
« on: December 24, 2008, 08:33:49 AM »
Ok, I'm new to the CNC world let alone Mach 3 and writing macros. I have a Taig CNC mill that I would like a simple tool change macro. I would like to send it to the home position to allow plenty or room for the tool change,  make my tool change, allow me to reset the tool z height each tool change since I don't have holders and then continue on with the program. Can someone help a total newbie out?

« Last Edit: December 24, 2008, 09:54:59 AM by bjm323 »
Re: manual tool change macro needed
« Reply #1 on: December 24, 2008, 10:19:12 AM »
Look through this topic, might answer some of your questions.

Offline jimpinder

  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: manual tool change macro needed
« Reply #2 on: December 28, 2008, 06:09:32 AM »
The M6 tool change written for Mach (as it is) can do three things - see Config/General Config, top left hand corner.

It can (1) ignore the tool change, (2) stop the spindle and wait for a restart ( which allows you to change the tool etc) or (3) do a complete auto tool change program.

The first two options are programmed into Mach, but the third option can be altered.

It seems to me, however, that if you included a short instruction for the machine to move to your required position, then choose option (2) for the tool change (stop and wait for change manually etc), this would do the trick.

For this you need to write a small Macro - a visual basic program, which you can put in your GCode program, before the M6 instruction. There is a full explanation of this in the instructional videos, under "scripting"

The basic line for Vis Basic is

Code "G0 X0 Y0 Z0"
- if you write this in the Visual Basic editing window (under the operator menu) and save it as, say, M201, then every time you write M201 in your GCode program, Vis Basic will write an instruction G0 X0 Y0 Z0 to your machine. If this was followed by M6, then the spindle would stop and the machine wait for you to change the tool, and set the height.

You can also include in your Macro instructions to collect data from the DRO's before moving, and then return the machine to where it was, after Tool Change.

I think if you watch the video a few times, and do a little bit of experimenting with Vis Basic - i.e. try writing a Macro _ test it without tools in, and with the spindle off - and then come back if you are having a problem.

The difficulty is, as it says in the video, that everybody has a different requirement for a tool change.

I must admit that when I am milling, I usually use the (2) option - stop spindle an wait - jog the z axis up and change the tool, set the height again, and then carry on. It seems quicker to me than waiting for the machine to move about.

Not me driving the engine - I'm better looking.
Re: manual tool change macro needed
« Reply #3 on: December 30, 2008, 08:03:56 AM »
Hi bjm323,
I have just gone through the same process of setting up a Tiag micromill, that i purchased a few weeks ago, I can make some suggestions
1. Have a look at http://www.cnczone.com/forums/showthread.php?t=56079
and try to set up on your machine to do this, it will make life a lot easier
I have the very old tiag control and i had to add a second parallel port for this, you only need a few resistors and a soldering iron
2. I will post step by step instructions how i do it later when I get home, at the moment I am busy calibrating 3D measuring machines
That is if you are interested ;)
Do you use inch or metric, because the Machblue screen set in the link above is for inch, if  you use metric i will post my Machblue screen set
some integrated vb code that needs to be changed, or it will only search for 1mm (programed for 1 inch)
good luck
Re: manual tool change macro needed
« Reply #4 on: January 03, 2009, 01:58:47 PM »
Thanks for the replies. Sorry it has been so long but I was away on a mini vacation for the holidays. Softselect, I'm very interested on how you set yours up so if you want, post or email me step by step instructions on how you went about doing it so I can look it over. I have a second parallel port available also and I use inch, not metric.


Offline budman68

  • *
  •  2,354 2,354
    • View Profile
Re: manual tool change macro needed
« Reply #5 on: January 03, 2009, 03:55:53 PM »
I think we'd all be interested in this so please don't just email him?  ???

Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)
Re: manual tool change macro needed
« Reply #6 on: January 04, 2009, 08:22:09 AM »
Ok I will do it as soon as I get home, i am currently away from home, doing an installation of a 3D measuring machine
Thanks Friedrich
PS I would like to PM it to someone to test before I post it on then forum, any takers? ;)
Manual tool change on Tiag Micromill
« Reply #7 on: January 09, 2009, 05:51:27 AM »
Hi Everyone,
Sorry for the delay, away on Business
Attached are the instructions in "Setup procedure for Tiag Micromill Tool length setup.pdf"
The support files are in the Zip files
Hope I didn't make to many mistakes, feel free to comment and I will correct it ;)
Thanks Friedrich
Re: manual tool change macro needed
« Reply #8 on: January 11, 2009, 04:16:38 PM »
Thanks for posting this Friedrich. Looks like I have some reading to do now. If I understood what I've read so far, you made the probe connections to the second parallel port that you added?
« Last Edit: January 11, 2009, 04:21:40 PM by bjm323 »
Re: manual tool change macro needed
« Reply #9 on: January 12, 2009, 01:24:23 AM »
Hi bjm323,
I used the second port to keep thing simple and not interfere with the stepper control card, the controller I have is a very old type and not much info is available on it.
so i figured by the time I traced out what goes where i could just as well start with a new port, hence LPT2.
If you have the connection details of your controller, you can use any spare input pin, just configure it in Mach3, Config, Ports and Pins, Input Signals, Probe.
Thanks Friedrich