Unretract on head change



  • When I change head my free gcode retracts 2mm.

    My post code unretracts 2mm.

    But my post code is called before the head is moved to P1, so I get some stringing from the head moving to P1 with material unretracted.

    Can we somehow fix that?

    When is Pre and Post scripts called, excatly?

    Also, can you explain G1 P1 and G1 P2 again, please?

    Kulitorum



  • I find https://duet3d.com/wiki/G-code#T:_Select_Tool gives a good description of when tool change scrips are run, unless some thing changed?


  • administrators

    If you put G1 R2 in your tpost script before the un-retract command, that should do what you want. But be careful, this will try to place the head wherever the previous tool was. It should be OK as long as you have set up your axis limits correctly.



  • So what is R1 ?



  • Post0.g:

    G1 R2 F5000
    M83  ; relative extruder movement
    G91  ; relative axis movement
    G1 E2 Z-2 F3600 ; unretract 2mm and lift head
    G90
    M82

    Post1.g:

    G1 R2 F5000
    M83  ; relative extruder movement
    G91  ; relative axis movement
    G1 E2 Z-2 F3600 ; unretract 2mm and lift head
    G90
    M82

    Gcode:

    G90
    M82
    M140 S60
    ;From tool 0 gcode
    G10 P0 R190 S190
    G10 P1 R190 S190
    G28
    M116 P0
    M116 P1
    G92 E0
    G1 E-3.0000 F600
    G1 Z0.680 F9000
    ; process Tool 0
    ; layer 1, Z = 0.180
    G1 z0.180
    T0
    ; tool H0.200 W0.480
    ; skirt
    G1 X109.566 Y102.382 F4500
    G1 Z0.180 F9000
    G1 E0.0000 F180
    G92 E0
    G1 X112.382 Y99.566 E0.1430 F1500
    G1 X112.999 Y99.310 E0.1670
    G1 X136.981 Y99.310 E1.0285
    G1 X137.005 Y99.320 E1.0294
    G1 X156.991 Y99.320 E1.7474
    G1 X157.608 Y99.576 E1.7714
    G1 X160.424 Y102.392 E1.9144
    G1 X160.680 Y103.009 E1.9384
    G1 X160.680 Y146.991 E3.5183
    G1 X160.424 Y147.608 E3.5423
    G1 X157.608 Y150.424 E3.6853
    G1 X156.991 Y150.680 E3.7093
    G1 X113.009 Y150.680 E5.2892
    G1 X112.392 Y150.424 E5.3132
    G1 X109.576 Y147.608 E5.4563
    G1 X109.320 Y146.991 E5.4803
    G1 X109.320 Y127.005 E6.1982
    G1 X109.310 Y126.981 E6.1991
    G1 X109.310 Y102.999 E7.0606
    G1 X109.566 Y102.382 E7.0846
    G92 E0
    G1 E0.0000 F600
    G1 Z0.680 F9000
    G1 z0.180
    T1
    ; tool H0.200 W0.480
    G1 X109.973 Y102.653 F4500
    G1 Z0.180 F9000
    G92 E0
    G1 X112.653 Y99.973 E0.1362 F1500
    G1 X113.094 Y99.790 E0.1533
    G1 X136.886 Y99.790 E1.0079
    G1 X136.910 Y99.800 E1.0089
    G1 X156.896 Y99.800 E1.7268
    G1 X157.337 Y99.983 E1.7439
    G1 X160.017 Y102.663 E1.8801
    G1 X160.200 Y103.104 E1.8973
    G1 X160.200 Y146.896 E3.4703
    G1 X160.017 Y147.337 E3.4874
    G1 X157.337 Y150.017 E3.6236
    G1 X156.896 Y150.200 E3.6407
    G1 X113.104 Y150.200 E5.2138
    G1 X112.663 Y150.017 E5.2309
    G1 X109.983 Y147.337 E5.3671
    G1 X109.800 Y146.896 E5.3842
    G1 X109.800 Y126.910 E6.1022
    G1 X109.790 Y126.886 E6.1031
    G1 X109.790 Y103.094 E6.9577
    G1 X109.973 Y102.653 E6.9748
    G92 E0
    G1 E0.0000 F600
    G1 Z0.680 F9000
    G1 z0.180
    T0 ****************************** HEAD CRASH HERE *******************************
    ; tool H0.200 W0.480
    G1 X110.380 Y102.925 F4500
    G1 Z0.180 F9000
    G1 E0.0000 F600
    G92 E0
    G1 X112.925 Y100.380 E0.1293 F1500
    G1 X113.190 Y100.270 E0.1396
    G1 X136.790 Y100.270 E0.9873
    G1 X136.814 Y100.280 E0.9883

    Video:
    https://www.youtube.com/watch?v=lI4WaEhfnH0



  • Comments on this?


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.