Hello Guest it is April 19, 2024, 02:51:11 AM

Author Topic: Help with tool change macro's  (Read 4152 times)

0 Members and 1 Guest are viewing this topic.

Help with tool change macro's
« on: June 24, 2012, 02:49:07 PM »
Hi, I have a set of lathe tools ganged parallel to my Y axis  and need some help with my m6 start and end macro's. I have a separate screen with all the tool y offsets that i can type in. The problem I'm having is that the machine is going to the last tool called and the way  I'm getting around this by double entering the m6 t0101 m6 t0101 the first move goes the tool change position waits for cycle start then goes to the last tool called the second m6 t0101 it goes to the tool change position the after cycle start goes to the correct tool position. in general config I have it set on stop spindle,wait for cycle start. My VB skills are very limited so any information would be gratefully appreciated

Regards

Dale

M6 START

tool = GetSelectedTool()
SetCurrentTool( tool )
code "G0"
code "G53 Z" & GetOEMDRO(1202)
code "G53 X" & GetOEMDRO(1200) & " Y" & GetOEMDRO(1201)

M6 END

Option Explicit
Dim Tool As Integer

Tool = GetCurrentTool()
Code( "G0 Y" & GetUserDRO(1000+Tool) )
Re: Help with tool change macro's
« Reply #1 on: June 24, 2012, 07:13:00 PM »
Hi,

To use a toolchange macro, you should have the general config for toolchange set to auto.

Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: Help with tool change macro's
« Reply #2 on: June 25, 2012, 03:16:03 PM »
Hi, I have tried the setting in auto but it just ignores the M6 T0101 command altogether. In wait mode it does seem to be reading the code in the macro's but something is a miss as i have to enter m6 t**** twice to get it to move to the correct tool position

Dale
Re: Help with tool change macro's
« Reply #3 on: June 26, 2012, 06:16:12 PM »
Hi Dale,
like Peter said, use auto toolchange in general config.Do not use the m6 end macro in turn mode.it is ignored so far as i know.
Put everything in your M6start macro.
Alex
Re: Help with tool change macro's
« Reply #4 on: June 26, 2012, 08:13:14 PM »
Hi again,
i attached a M6start macro for 6 tools. to me it looks as it works. take care when testing it.
look into it and make it suitable for your needs.
In lathe mode it is ok to code T505 for example. You dont have to code M6 T0505.
leave M6 away.

Alex
Re: Help with tool change macro's
« Reply #5 on: June 27, 2012, 02:38:10 PM »
Hi Alex, thanks for the reply, I've download the macro but won't get a chance until the weekend now to try it.

Regards

Dale