manual tool change with tool length probe

More
1 year 6 months ago #327057 by pgf
Is there a write-up anywhere on how to configure LinuxCNC to do a tool length probe when doing a manual tool change?  Having to split my g-code into two parts, for the sake of different tools, is (at least sometimes) a nuisance.

I confess I've been mill-shopping, and although I'm not looking at the shapeoko products, I did end up on a video demonstrating their "BitSetter" accessory, which seems very nice.  I'd love to have something like this.  

Please Log in to join the conversation.

More
1 year 6 months ago #327058 by JohnnyCNC
I did a M6 remap that does that.  I originally did it as a .NGC remap but then did the remap in Python.  Either way the idea is the same.  See the attached document for my write-up and support files.  If you want the Python files that I modified, I can post them.



 

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
1 year 6 months ago #327063 by pgf
Is there a write-up in addition to the ngc files?

Please Log in to join the conversation.

More
1 year 6 months ago #327067 by JohnnyCNC
I had to save it as a PDF to be able to upload it.

 

Attachment not found

Please Log in to join the conversation.

More
1 year 6 months ago #327073 by pgf
Thanks! There's a fair amount there to absorb, but I think it will be worth it.

Please Log in to join the conversation.

More
4 months 2 weeks ago #347088 by Buzzcut
I have been looking to implement something like this on my machines. I downloaded the ngc files that you have posted and read your write up on it. Would it be possible for you to post the python files. I believe this would be a great option to be added to the main repo for makers like me. There are a lot of machines out there that have this feature in the controls already. Examples are Onfinity, Sienci Labs and others. It fills a huge void in semi automatic tool change area. I switch my machines to Linuxcnc do to replacement cost after controller failure and the options available with linuxcnc that other controllers don't have. Thanks for all your great work! 

Please Log in to join the conversation.

More
4 months 1 week ago #347143 by Buzzcut
I would like to implement or some version of you tool change on 2.9.8. Would it be possible to post your python file you mentioned in this post. Any help would be greatly appropriated. Thanks in advance.

Please Log in to join the conversation.

More
3 months 2 weeks ago #347665 by JohnnyCNC
Sorry, been away for a while. I will get them posted soon.

Please Log in to join the conversation.

More
3 months 2 weeks ago #347726 by JohnnyCNC
Attached are the Python files that I modified for my M6 remap with auto-tool measurement.  My changes are tagged with "JHK".
Enjoy
John 

Please Log in to join the conversation.

More
3 months 2 weeks ago #347744 by tuxcnc
When you remap M6 to ngc, you can use standard M6 in it (I don't know why, but it works).
Bellow is code I use (no python or so, pure g-code), but I give no warranty, check carrefully.
Code:
O<tool-change> SUB (file tool-change.ngc) (--- header ---) (tuxcnc 2021) (manual tool change with automatic measurement) (replaces M6 g-code) (we assume that, toolsensor is permanently mounted) (and Z parameters of TOOL_CHANGE_POSITION and TOOLSENSOR ZPOS) (are maximum upper, otherwise you may get collision) (you must have the following in your INI file) (without semicolons and you can change parameters) ;[RS274NGC] ;FEATURES = 4 ;REMAP=M6 modalgroup=6 ngc=tool-change ;[EMCIO] ;TOOL_CHANGE_QUILL_UP = 1 ;TOOL_CHANGE_POSITION = 230 0 0 ;[TOOLSENSOR] ;XPOS = 192 ;YPOS = 0 ;ZPOS = 0 ;APOS = 0 ;BPOS = 0 ;CPOS = 0 ;UPOS = 0 ;VPOS = 0 ;WPOS = 0 ;FEED1 = 500 ;FEED2 = 100 ;TRAVEL =100 ;DISTANCE = 71 (--- end of header ---) #<tool> = #<_selected_tool> #<previous_tool> = #<_current_tool> O100 if [#<_task> EQ 0]    ( only run the subroutine in milltask interpreter )         (debug, Task ist Null) O100     return [999] O100 endif o200 IF [ #<tool> EQ 0 ]    ( check if tool zero selected and end routine ) (MSG, No Tool Selected ) O200     return [999] o200 ENDIF (---  store existing parameters  ---) #<g30x> = #5181 #<g30y> = #5182 #<g30z> = #5183 #<g30a> = #5184 #<g30b> = #5185 #<g30c> = #5186 #<g30u> = #5187 #<g30v> = #5188 #<g30w> = #5189 #<absolute> = #<_absolute>  (remember in local variable if G90 was set)  #<mist> = #<_mist>         (remember in local variable if M7 was set) #<feed> = #<_feed>         (remember feed value) #<flood> = #<_flood>        (remember in local variable if M8 was set) #<tool_offset> = #<_tool_offset> G49             ( cancel tool length compensation ) M9             ( coolant off ) M6                 ( run normal M6 operation ) G91             ( incremental distance mode ) (---   prepare g30     ----) #5181 = #<_ini[TOOLSENSOR]XPOS> #5182 = #<_ini[TOOLSENSOR]YPOS> #5183 = #<_ini[TOOLSENSOR]ZPOS> #5184 = #<_ini[TOOLSENSOR]APOS> #5185 = #<_ini[TOOLSENSOR]BPOS> #5186 = #<_ini[TOOLSENSOR]CPOS> #5187 = #<_ini[TOOLSENSOR]UPOS> #5188 = #<_ini[TOOLSENSOR]VPOS>  #5189 = #<_ini[TOOLSENSOR]WPOS> (--------------------------)                         G30 ( go to toolsensor ) #<PlaneOffset> = [#5183 - #5422]  ( get the current plane Z offset )     G38.2 Z-[#<_ini[TOOLSENSOR]TRAVEL>] F[#<_ini[TOOLSENSOR]FEED1>]  ( fast touch ) G38.4 Z1 F[#<_ini[TOOLSENSOR]FEED2>] G10 L1 P#<tool> Z-[-#<PlaneOffset> - #5063 - #<_ini[TOOLSENSOR]DISTANCE>] ( store offset in tooltable ) G30 ( go to safe position ) #<previous_tool> = #<tool> (--- restore parameters ---) #5181 = #<g30x> #5182 = #<g30y> #5183 = #<g30z> #5184 = #<g30a> #5185 = #<g30b> #5186 = #<g30c> #5187 = #<g30u> #5188 = #<g30v>  #5189 = #<g30w> O<restore_abs> if [#<absolute>]     G90 (restore only if it was set on entry:) O<restore_abs> endif O<restore_mist> if [#<mist>]     M7 (restore only if it was set on entry:) O<restore_mist> endif O<restore_flood> if [#<flood>]     M8 (restore only if it was set on entry:) O<restore_flood> endif O<restore_tool_offset> if [#<tool_offset>]     G43 (restore only if it was set on entry:) O<restore_tool_offset> endif F #<feed> (restore previous feed value) (--------------------------) O<tool-change> ENDSUB M2

Please Log in to join the conversation.

Time to create page: 0.184 seconds
Powered by Kunena Forum