Does G60 R0 + G1 S0 work during tool change?

  • I am trying to wipe nozzle to bed during tool change. I try to purge outside the bed, then store location (z) and then move small distance at z=0 to remove hanging filament. It worked otherwise ok, but G1 S0 does not go back to explicitly stored location.

    Instead tool change automatic move to earlier stored location (S2) happens so that it starts from Z=0 and causing nozzle hit to part during later layers.

    My tool change (tpost0.g and tpost1.g) code is the following:

    M116 P1             ;  Wait for set temperatures to be reached
    M564 S0             ; allow outside bed
    G1 X225             ; go to purge location (X)
    M83                 ; relative extruder mode
    G1 E50 F3500        ; undo retraction
    G1 E10 F2500        ; undo retraction
    G1 E50 F2500        ; purge
    G60 S0              ; store location - z mainly
    G1 Z0               ; wipe to bed 
    G1 X213             ; wipe to bed
    G1 R0               ; go to stored location
    M564 S1             ; limit to bed area
    G4 S2               ; wait 2 secs

    I tried with 20 seconds waiting to see the effects. It happened at Z=0 and again nozzle hit to part while moving to stored location S2.

    Any advice available?

  • Try G1 R0 Z0

    The existing command, G1 R0, moves every axis specified to the locations in memory slot 0. Since no axes are specified, no axes move.

  • @Danal Thanks! That helped.

    Which documentation defines that clearly? says only this: "4) RepRapFirmware provides an additional 'R1' parameter to tell the machine to go back to the coordinates a print was previously paused at. If this parameter is used and the code contains axis letters, an offset will be added to the pause coordinates (e.g. G1 R1 Z5)."

    In any case, now it works (it is very cool to be able to modify ongoing print...).

  • Think of a G1 command without R0. The doc for G1 says you can specify any number of axis, and axis not specified will not participate in the move. For example, G1 X10 is perfectly valid and will not move Y or Z or any other axis. In fact, G1 is perfectly valid, and will move nothing. So G1 R0 moves nothing to the coordinates in memory slot 0.

Log in to reply