Page 1 of 1

just trying to modify the m6 to move x to home position for toolchange

Posted: Thu Jan 13, 2022 5:01 pm
by playerofpawns1
I am having problems being able to get a tool in when the spindle is sitting right above the part and the tool is long. I wish the x would move to home after z moves to home so I could get the spindle away from the part, can anyone help me get that set up. I'm sure it's simple to get that updated. thanks for your help in advance.

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Thu Jan 13, 2022 8:21 pm
by ShawnM
Deleted - I was confused as to what he was asking.

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Fri Jan 14, 2022 12:18 am
by cncsnw
The order of power-up homing that you set in the Wizard has nothing to do with axis movement during tool changes.

Macro functions that you assign to Aux keys are not operable while a program cycle is running, and so are not useful at a tool-change prompt within a program.

You need to create a new file in the c:\cncm directory, named "mfunc6.mac". You could make it read something like this:

Code: Select all

; M6 - tool change
G91 G28 X0  ; move X axis to return point #1
G90         ; restore absolute positioning mode
M6          ; do default M6 action (prompt for tool and wait for cycle start)

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Fri Jan 14, 2022 1:26 am
by ShawnM
I see what he's asking now, he's trying to do a tool change over the part during a job after the Z axis moves up but there's no X or Y movement afterwards. My bad. Yes, just modify the M6 macro to move the spindle to your designated tool change position for easy access. Thanks for opening my eyes cncsnw.

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Fri Jan 14, 2022 9:08 am
by tblough
Your other option is to hit escape to exit the program, jog the machine where you need it for the toolchange, change your tool, and then hit F4 Run/F1 Resume.

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Fri Jan 14, 2022 10:17 am
by Gary Campbell
Set your G28 Position (or any of the 4 returns) to your desired toolchange location
Edit your mfunc6.mac and add "G28" in the line after the "M5" command

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Sat Jan 15, 2022 9:13 am
by martyscncgarage
playerofpawns1 wrote: Thu Jan 13, 2022 5:01 pm I am having problems being able to get a tool in when the spindle is sitting right above the part and the tool is long. I wish the x would move to home after z moves to home so I could get the spindle away from the part, can anyone help me get that set up. I'm sure it's simple to get that updated. thanks for your help in advance.
You've been given good advice. Let us know what you ended up doing.
The key as I see it is the part/fixture going to be different often enough that you can not automate the tool change? If so, you will have to move the machine manually during the tool change as was suggested.

Creating and customizing the mfunc6.mac would be the way to go otherwise.
Both Marc (cncsnw) and Gary suggested using G28 or one of the others to set the tool change position and add it to your Mfunc6.mac

Let us know how you make out. Post a fresh report after you have accomplished the task.
Marty

Re: just trying to modify the m6 to move x to home position for toolchange

Posted: Sat Jan 15, 2022 10:58 am
by Muzzer
I didn't see what CAM program is being used here but if you are using Fusion 360, the post processor inserts a "safe retract" ahead of a manual tool change. In the case of Centroid, the post processor dialog options for safe retract are G28, G30, G30 P3, G30 P4 or simply "clearance height".

You can define the X, Y & Z coordinates for the G30 retracts in CNC12 if desired. No need to play with mfunc6.

On my machine I simply do a G28 which is like a "tool check", as I can easily grab the toolholder without moving the table in X & Y.