Page 1 of 1
M6 tool change macro
Posted:
Wed Mar 20, 2024 3:30 pm
by bhdavis
I'm installing a RAPIDCHANGE ATC (
www.rapidchangeatc.com) on my UCCNC controlled router. The Rapidchange control software needs an M6 before each T# command.
For example, in UCCNC if I enter T1 nothing happens. However if I enter M6 T1 I get tool #1 picked up.
So far I haven't been able to get my Enroute post processor to include an M6 before each tool change T# line in the code. So as things stand now I will have to manually edit in an M6 before each tool change once the G-code is created.
Does anyone know if there is a way to alter the way UCCNC sees a T# command so that it runs the M6 macro file first?
Thanks,
BH
Re: M6 tool change macro
Posted:
Wed Mar 20, 2024 7:06 pm
by dezsoe
The problem is not with UCCNC but the postprocessor. T# must not start the tool change, only M6. They don't need to be in the same line. There are tool changers which preload the tool when T# is called and change it only when the M6 is executed, so the next tool can be selected even in the next line after M6. It is not a "UCCNC thing" but the g-code standard, so the postprocessor must call M6 if it supports tool change.
Re: M6 tool change macro
Posted:
Thu Mar 21, 2024 6:33 am
by bhdavis
Thank you. I suspected as much. I'll look at other post processors in Enroute to see if I can find something other than WinCNC that is compatible with UCCNC. So far I haven't found an Enroute post processor for UCCNC.
Thanks,
BH
Re: M6 tool change macro
Posted:
Fri Apr 19, 2024 9:15 pm
by Sawmiller
on a related note.
i have a rapidchange atc also.
and am expirementing with saving tools numbers on shutdown usiing the default2019 screen set.
i have it saving the current tool number fine with the deconstructor.
99999
// this is the deconstructor macro which executes once, on the application close event
// save tool number
double fieldval = AS3.Getfielddouble(897);
exec.Writekey("Tooltablevalues","CurrentTool", fieldval.ToString());
the rapidchange m6 doesnt seem to get when i restore the tool thou.
m99998
// this is the constructor macro which executes once when the application gets loaded
// load tool number
string fieldval = exec.Readkey("Tooltablevalues","CurrentTool","CurrentTool");
AS3.Setfield(int.Parse(fieldval),897);
exec.Setcurrenttool(int.Parse(fieldval));
the current tool field seems to get the right number, but im not sure about the setcurrenttool.
thsnks to ger21 for me looking at some of his code.
Re: M6 tool change macro
Posted:
Mon Apr 22, 2024 10:24 am
by bhdavis
Sawmiller,
Have you discussed this with Don Greilick or posted it on the Discord site?
As to the Enroute post processor I have solved that problem. Enroute tech added the M6 command to the WinCNC post processor and that is a good match to UCCNC. Anyone that wants it can contact me or Don Greilick at Rapidchange ATC for a copy.
BH
Re: M6 tool change macro
Posted:
Tue Apr 23, 2024 9:32 am
by Battwell
it is better to write the key as soon as the tool is changed in your m6 macro.
the destructor macro can be missed if computer freezes or is shut down before the saving is completed.
uccnc needs to be out of reset to set the tool . in versions prior to 2.114