Moving in a different coordinate system ignoring tool offset



  • I am trying to work with a tool changer in the style of E3D

    To get my software under control, I intend to use G59.3 whose center is the position of the dock and have only one gcode file to describe the moves.

    But I would like my moves in this coordinate system to ignore the tool offset since I'm moving the tool holder towards the dock, not the tool tip.

    I can't find the relevant command or option in the documentation.

    in the mean time I will be looking into G60.

    edit: oh, we can set arbitrary coordinates in G60, so working coordinates are my only chance.



  • @nraynaud said in Moving in a different coordinate system ignoring tool offset:

    G59.3 whose center is the position of the dock and have only one gcode file to describe the moves.

    Are these statements true?

    • There will be a tfree0, tfree1, etc, etc for the free/pre/post files, there will be one set for each tool?

    • The G59.3 need a unique coordinate for tool0 vs tool1, etc.

    If both are true, then I'm not following what you are gaining by using G59.3 (or G60 or whatever).

    Placing the proper coordinate for the proper tool in the free/pre/post files seems much more understandable and straightforward. Here are my actual files for a Jubilee tool changer. As you can see, the files are identical, except for the X coordinate. That appears in only one place.

    ; Runs at the start of a toolchange if the current tool is tool0.
    ; Note: tool offsets are applied at this point unless we preempt commands with G53!
    ; Note: Prior to this macro, XYZ have been saved to slot 2 by the firmware as though a G60 S2 were executed. 
    
    G91                           ; Relative to move bed down
    G1 Z5 F6000                   ; Move the bed further from the nozzle prior to any tool moves.  No G53 needed because this is a relative move.  Bed will be placed back in position in the post macro. 
    G90                           ; Return to absolute
    
    G53 G0 X285      F10000       ; Rapid to the approach position with tool-0. (park_x, park_y - offset).  X first in case close to tool row. 
    G53 G0 X285 Y320 F10000       ; Rapid to the approach position with tool-0. (park_x, park_y - offset)
    G53 G1 Y358 F6000             ; Controlled move to the park position with tool-0. (park_x, park_y)
    M98 P"/macros/tool_unlock.g"  ; Unlock the tool
    G53 G1 Y350 F6000             ; Move the carraige to retract the pin until it clears the tool.
    G53 G0 Y280 F10000	      ; Rapid to a position where a future tool change won't hurt anything by returning to this position via its G60 S2
    
    ; Runs at the start of a toolchange if the current tool is tool1.
    ; Note: tool offsets are applied at this point unless we preempt commands with G53!
    ; Note: Prior to this macro, XYZ have been saved to slot 2 by the firmware as though a G60 S2 were executed. 
    
    
    G91                           ; Relative to move bed down
    G1 Z5 F6000                   ; Move the bed further from the nozzle prior to any tool moves.  No G53 needed because this is a relative move.  Bed will be placed back in position in the post macro. 
    G90                           ; Return to absolute
    
    G53 G0 X195      F10000       ; Rapid to the approach position with tool-1. (park_x, park_y - offset).  X first in case close to tool row. 
    G53 G0 X195 Y320 F10000       ; Rapid to the approach position with tool-1. (park_x, park_y - offset)
    G53 G1 Y358 F6000            ; Controlled move to the park position with tool-1. (park_x, park_y)
    M98 P"/macros/tool_unlock.g" ; Unlock the tool
    G53 G1 Y350 F6000             ; Move the carraige to retract the pin until it clears the tool.
    G53 G0 Y280 F10000	      ; Rapid to a position where a future tool change won't hurt anything by returning to this position via its G60 S2
    


  • I intended to redefine the G59.3 position before every tool operation.



  • By probing? and then setting the origin of Work Coordinate System 9?



  • the way it's set up for now is that the dock positions are in files like
    t0.g:

    G53 G0 X212.5 Y0 W1 ; open dock
    

    but in tfree0.g I have to put some code before and after:

    M98 P"t/beforefreeall.g" ; <-- lift Z, retract, increase steppers current, move Y limt, etc.
    G0 F40000
    M98 P"t0.g" ; <- go in front of the dock
    M98 P"t/freeall.g" ; <- close the dock, go to contact, move back to the safe zone
    

    if I could use a G59 ignoring tool offset, I would do something like that:
    t0.g:

    G10 L2 P9 X212.5 Y0 W1 ; open dock
    

    and tfree0.g:

    M98 P"t0.g"  ; <- define G59.3
    M98 P"t/freeall.g" ;  <-- do everything in one file, Including moving to the origin when I feel it's the right time
    

    the other interesting thing, is that I could also define the Y of the dock which could compensate for racking in the Y axis or inconsistencies in the dock manufacturing.

    and then freeall.g could become freeorgetall.g because there is little difference between get or free in my system (just the W axis position and the filament retract/extrude I think).


Log in to reply