Tool change
Posted:
Fri Dec 09, 2016 8:27 pm
by camivic
Hi guys,
how can i obtain with UCCNC a classic manual tool change, like described above:
- i start with tool T1;
- when finished the machine go to a x,y,z for tool change (where is positioned the tool probe);
- i change the tool with T2 which it has a different of T1;
- after changing the tool, restart the gcode, etc, etc.
Thanks to all.
Vincenzo
Re: Tool change
Posted:
Sat Dec 10, 2016 6:20 pm
by cncdrive
You can select the toolchange method on the General settings page.
If you select the 3rd option to Run the tool change macro then the M6 macro code is executed on M6 in the g-code program.
You can code your tool change routine in the M6 macro.
There is an example M6 macro in the Macros folder.
Re: Tool change
Posted:
Sat Dec 10, 2016 9:26 pm
by ger21
Re: Tool change
Posted:
Sun Dec 18, 2016 9:16 pm
by camivic
Thanks ger21.
Try to ask you a help.
I try to modify the BanduraMaker M6 macro with this code without success:
- Code: Select all
int CurrentTool= exec.Getcurrenttool();
exec.Setcurrenttool(CurrentTool);
i'm interested to change the tool number on the screenset with the tool charged in the M6 macro.
Where i'm wrong?
Re: Tool change
Posted:
Sun Dec 18, 2016 9:35 pm
by ger21
You're replacing a tool with the same tool.
To change to a tool in the g-cdoe (T2 M6), try:
- Code: Select all
int Newtool = exec.Getnewtool();
exec.Setcurrenttool(Newtool);
Re: Tool change
Posted:
Mon Dec 19, 2016 7:55 am
by camivic
Thanks, now it work fine.
Next step is to send the HOMING command, and switch on the axis LED, directly from the macro.
I've tryed with:
- Code: Select all
exec.Callbutton(113),
AS3.SetLED(true,44);
.......
but don't work.