Page 1 of 1

ATC Toolnumber after restart

PostPosted: Tue Mar 26, 2024 12:53 pm
by CNC_WW
Hi,
Unfortunately I couldn't find anything on this topic.

Is there a possibility for UCCNC to save the tool number when exiting the software?

For me, jobs always end with a tool in the spindle. Then UCCNC is ended and the PC is shut down.
When I start again, the tool number is always set to zero and I have to set the correct number using an "exec.Setcurrenttool - macro". Only then a normal ATC is possible again.

Thank you for your help.

Re: ATC Toolnumber after restart

PostPosted: Wed Mar 27, 2024 10:36 am
by ger21
Use the Constructor and Deconstructor macros to save and restore the tool #.
M99998
M99999

Re: ATC Toolnumber after restart

PostPosted: Wed Mar 27, 2024 12:36 pm
by CNC_WW
I tried to experiment with those two macros. But how to i save the Toolnumber, which variable retains its value after a restart? Or do I have to write the number in a Label-ID?

Re: ATC Toolnumber after restart

PostPosted: Wed Mar 27, 2024 2:09 pm
by ger21
Read the label and save it to the profile when closing with exec.Writekey. (M99999)
Then retrieve the tool number with exec.Readkey and use this when UCCNC starts (M99998).
Code: Select all
exec.Setcurrenttool(Newtool);