Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Sweep on November 18, 2012, 04:06:28 PM

Title: Correct use of M6Start& M6End
Post by: Sweep on November 18, 2012, 04:06:28 PM
After a mammouth session of trial, error, development, and ultimate sucess in building a VB macro for my Denford Triac with 6 station ATC carousel, it may seem a little odd if I now ask how to ignore the whole lot for manual changes.

First of all a massive thank-you to TP (BR549) for the assistance given on the VB & Development of Wizards board with his untiring support which finally allowed me to get the ATC macro running perfectly.

OK, the way i see it, and please correct me if i'm wrong, the 'Ignore Tool Changes' button in General Configurations does just that and will charge through any gcode with the tool fitted in the spindle.
The 'Auto Tool Changer' button runs M6Start and then M6End consecutively without pause.
The 'Stop Spindle. Wait for Cycle Start' runs M6Start and then pauses until the cycle start button is pressed to then run M6End.

If that's pretty much correct, here's my questions

1. At the end of M6End what restarts the Gcode as I can't see any prompt to restart the cycle in the stock M6End macro?
2. If I want to do a manual tool change I would need to have the 'Stop Spindle. Wait' button ticked, but this would still run 144 lines of my M6Start macro which defeats the point. My thought is to move most of the 144 lines of code, with the exception of moving clear the Z axis, to the M6End macro and then add a bail-out command to the M6Start e.g.
If GetLED (185) = 1 Then MsgBox ("Change tool and press cycle start") Exit Sub
Does that make sense?

thanks ...Sweep


Title: Re: Correct use of M6Start& M6End
Post by: BR549 on November 18, 2012, 04:24:07 PM
Well not exactly (;-) In auto tool changer mode it ONLY uses one of the macros to run the complete tool change operation. In manual tool change mode it uses BOTH macros start and end WITH the Pause/cycle start in between.

(;-) TP

Title: Re: Correct use of M6Start& M6End
Post by: ger21 on November 18, 2012, 04:25:33 PM
I believe that when you set Mach3 to "Automatic Tool Changer", it runs M6Start only
"Stop Spindle, Wait for Cycle Start" runs M6 Start, waits for you, then runs M6End, and continues with the g-code.

Realistically, if you want to alternate between ATC and manual tool changes, you probably need to run Mach3 with 2 profiles, one for each situation. Each would have their own M6 macros.
Title: Re: Correct use of M6Start& M6End
Post by: BR549 on November 18, 2012, 05:43:59 PM
No not really you just need a bit of ALTERNANT code in the M6start to alternate between the type of tool changes . BUT WHY would you want to do that ?

Just curious, (;-) TP
Title: Re: Correct use of M6Start& M6End
Post by: Sweep on November 19, 2012, 02:12:15 AM
Why do I want to do it?
1. Well I don't have anything to do with my machine when it's completed so my hobby is my machine  :-[
2. Whilst I probably wont use, or change the status of, the method of tool changing, I just want to make sure that if I do change it, possibly by accident, then the result is a safe reaction by the machine; you will recall that we have a spindle run command in the M6Start macro to align the drive dog with the carousel which is something which could be very dangerous if it is initiated during a manual tool change.
3. Due to the small size of my machine there are possible occassions when an ATC cannot be done because of physical limitations e.g. The largest diameter facemill I can use is 63mm as this just misses the Z axis column when the carousel indexes. There is also a problem with long tools as the carousel lowers towards the table to get the tool in the spindle.

...Sweep