M6 tool change macro

Post anything you want to discuss with others about the software.

M6 tool change macro

Postby bhdavis » Wed Mar 20, 2024 3:30 pm

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
bhdavis
 
Posts: 141
Joined: Tue Mar 23, 2021 7:36 pm

Re: M6 tool change macro

Postby dezsoe » Wed Mar 20, 2024 7:06 pm

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.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: M6 tool change macro

Postby bhdavis » Thu Mar 21, 2024 6:33 am

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
bhdavis
 
Posts: 141
Joined: Tue Mar 23, 2021 7:36 pm

Re: M6 tool change macro

Postby Sawmiller » Fri Apr 19, 2024 9:15 pm

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.
Sawmiller
 
Posts: 1
Joined: Tue Jul 28, 2020 1:43 am

Re: M6 tool change macro

Postby bhdavis » Mon Apr 22, 2024 10:24 am

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
bhdavis
 
Posts: 141
Joined: Tue Mar 23, 2021 7:36 pm

Re: M6 tool change macro

Postby Battwell » Tue Apr 23, 2024 9:32 am

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
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 28 guests