save tool number in var file and load on start

More
10 years 11 months ago #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 to join the conversation.

More
10 years 11 months ago #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

Please Log in to join the conversation.

More
10 years 11 months ago #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 to join the conversation.

More
10 years 11 months ago #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 to join the conversation.

Time to create page: 0.152 seconds
Powered by Kunena Forum