Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Dale gribble 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) )
-
Hi,
To use a toolchange macro, you should have the general config for toolchange set to auto.
Cheers,
Peter
-
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
-
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
-
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
-
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