save tool number in var file and load on start

More
20 Nov 2015 23:03 #65590 by viski
I have automatic tool changer with 12 tools. Every switch represent one tool. What do i have to do ,to save current tool into .var file and to be loaded when emc start , to avoid tool changer indexing(ref) ?

Please Log in or Create an account to join the conversation.

More
21 Nov 2015 11:59 #65596 by ArcEye
At the end of your code run
#4999=#5400
Current tool is already in #5400 but it is volatile
If #4999 is in your var file it will be preserved

Next start up run
M61 Q#4999

regards
The following user(s) said Thank You: Shu

Please Log in or Create an account to join the conversation.

More
21 Nov 2015 21:37 #65627 by viski
I have found this about parameters:
System Parameters
#<_current_tool> - Return number of the current tool in spindle. Same as #5400.

At the end of your code run
#4999=#5400
.... can i make assigment in classicladder ?
Where to put M61 Q#4999 into ini file to auto run code?

Please Log in or Create an account to join the conversation.

More
22 Nov 2015 10:37 #65653 by ArcEye

.... can i make assigment in classicladder ?


No idea, but why would you want to, doing it in gcode is simple.

Where to put M61 Q#4999 into ini file to auto run code?


There is no provision in the ini file for that.

You could put the code in one of the ini file halui MDI strings and connect via a flipflop say to the last homed of your axes
via the haui.axis.N.ishomed, so that the tool would be set when you home all axes for the first time.

Please Log in or Create an account to join the conversation.

Time to create page: 0.132 seconds
Powered by Kunena Forum