Bug, moving to ghost position



  • Hi!

    At this time I convert my pinter single nozzle BLV mgn Cube to tool changer Jubilee system, I'had update RRF3.1.1.

    During my tests I had experiment an strange bug, when i click on my marco one time for go to be in line position whit tool0 parking I see printer arm go to take tool0 on old line parking position, it was been X285 Y277 in past and dont exist anymore in my marco the new one is X132 Y277, when I click in my macro second time the good sequence is play.

    Here my marco to take tool0:

    ; tpost0.g
    ; called after firmware thinks Tool0 is selected
    ; Note: tool offsets are applied at this point!
    
    M116 P0                  ; Wait for set temperatures to be reached
    
    ; Note that commands preempted with G53 will NOT apply the tool offset.
    G91
    M98 P"/macros/ToolChanger/tool_unlock.g" ; Unlock the tool
    
    G53 G0 X132 Y277 F7000  ; Rapid to the approach position without any current tool.
    
    M564 S0
    ;M302 P0                  ; Prevent Cold Extrudes, just in case temp setpoints are at 0
    ;G1 E10 F100              ; Purge the Nozzle
    ;G4 S1                    ; Slight Delay
    ;G1 E-1.0 F2000           ; Perform a retract to remove filament pressure.
    G91                      ; Set Relative Movements
    G1 Z3                    ; Pop the Z up slightly to avoid scraping carriage limit switch on pull-back for early layers.
                             ; Also clear any dangling debris on purge towers.
    G90                      ; Restore Absolute Movements
    G53 G1 Y357 F6000
    G53 G1 Y357.5 F6000
    M98 P"/macros/ToolChanger/tool_lock.g" ; Lock the tool
    M98 P"/macros/ToolChanger/tool_lock.g" ; Lock the tool
    M98 P"/macros/ToolChanger/tool_lock.g" ; Lock the tool
    M98 P"/macros/ToolChanger/tool_lock.g" ; Lock the tool
    G53 G1 Y277 F6000        ; Retract the entire tool and wipe Backwards.
    ;G53 G1 Y336 F10000       ; Wipe Forwards.
    ;G53 G1 Y296 F10000       ; Wipe Backwards.
    ;G53 G1 Y336 F10000       ; Wipe Forwards.
    ;G53 G1 Y296 F10000       ; Wipe Backwards.
    
    
    M564 S1
    G1 X0 Y0 Z0   ; Restore prior position now accounting for new tool offset
    
    M106 R2           ; restore print cooling fan speed
    

    I tried to find where come from the problem, It's when I had execute commands one by one I have locate where is the problem, at begin of my marco I have it:

    ; tpost0.g
    ; called after firmware thinks Tool0 is selected
    ; Note: tool offsets are applied at this point!
    
    M116 P0                  ; Wait for set temperatures to be reached
    
    ; Note that commands preempted with G53 will NOT apply the tool offset.
    G91
    
    M98 P"/macros/ToolChanger/tool_unlock.g" ; Unlock the tool
    
    G53 G0 X132 Y277 F7000  ; Rapid to the approach position without any current tool. 
    ...
    

    When 'G53 G0 X132 Y277 F7000' is execute at line 12 the pinter arm go to X285 Y277, if I move 'G91' from line 8 to line 13 like this all working fine it go to X132 Y277:

    ...
    M98 P"/macros/ToolChanger/tool_unlock.g"
    G53 G0 X132 Y277 F7000 
    G91
    ...
    

    I dont think is normal comportement and I think I can have some issus with that in the future. Maybe that can be an interesting bug for @dc42 .

    Thank you.



  • I tried to erase SD card en make clean install but the problem is continue, I had changed folder directory of macro and renamed it, same problem.
    That's possible the duet hardware memory my old toolchanger parking position some where?
    I seen also G10 Z offset positive value(to reduct gap between nozzel and bed) haven't effect now, only negative value work, that's big problem I can't printing and maybe both problems is linked.
    I think to erase duet but it's dangerous thing, I would like to have your help before.


  • Moderator

    @Sowlan looks like there may be extra commands in ‘tool-unlock.g’. Please post this and tool-lock.g.

    Ian


  • administrators

    @Sowlan, do you have a tpre0.g file?



  • @droftarts @dc42
    Thank you, her my both files

    tool-unlock.g

    ; Disengage the toolchanger lock
    
    G91                 ; Set relative movements
    G1 U-4 F9000 H2     ; Back off the limit switch with a small move
    G1 U-360 F9000 H1   ; Perform up to one rotation looking for the home limit switch
    G90                 ; Restore absolute movements
    

    tpre0.g

    ; tpre0.g
    ; called before tool 0 is selected
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.6 on Mon Jan 13 2020 20:14:53 GMT+0100 (heure normale d’Europe centrale)
    
    ; Runs after freeing the previous tool if the next tool is tool-0.
    ; Note: tool offsets are not applied at this point!
    
    G0 X132 Y277 F7000  ; Rapid to the approach position without any current tool.
    
    G60 S2               ; Save this position as the reference point from which to later apply new tool offsets.
    

    You need to remembre macro dont work when I click it once but work when I click on seconde time.



  • @droftarts @dc42 If you want do see that in action I send to my Mega account one video, size of it is 91,5Mo :
    https://mega.nz/file/y6JB3Q4Y#SHjvxN_g9LJGu5JN3Q662O32qZMaMwiWMbMJgRJJJMs



  • So, about offset issue I have found where is problem, in my tpost0.g I added at end M564 S1 to enable switch limit because at begin of the script I added M564 S0 to disable limit switch for catch my tool who is outside of the limits of my bed. If you have subjection to catch my tool outside of limits of my bed more properly I take it.

    I tried one more time to catch tool with G91 before G53 G0 X132 Y277 F7000 but arm continue to go to X285 Y277. My adjustment with G9 after G53 G0 X132 Y277 F7000 work well but I would like understand why it does it, If I have another issue I'll never sure it isn't linked with it, it's what is arrive with my nozzel offset juste now, but it's look like bug.


Log in to reply