Layer shift after pause / continue

edited July 2017 in Questions & Answers
Hello. I'm experiencing problems after pausing and continuing my print jobs. The layers after the pause are not aligned with the ones before it.

Here are my gcodes for pause and continuation


G28 Z               ; Homing
G28 X Y            ;

G1 X5 Y5 F9000    ; Schlitten auf Startposition
G1 Z0                    ; Düse an Bett heran


G91                                   ;relative positioning
G1 Z+10 E-2 F9000         ;Z + 10mm und Retract
G92 E0                             ; Extruder neue Nullposition
G90                                  ;absolute positioning


G28 X Y 
M106                    ;Lüfter an

I mainly use the pause to exchange the filament. The new homing before continuation is done to compensate a possible movement of the extruder while working on it.

What am i missing?


  • Looks even a bit rotated.
    With homing after pause, which is normally good you have 2 requirements:
    1) Homing must be repeatable and precise
    2) No G92  with X or Y as homing removes these offsets.

  • edited July 2017
    1) I use Hall-E Endstops for X and Y, I didn't have any problems with them for 1 1/2 years
    2) I don't use G92 for X or Y

    What I tried:
    - I switched to Repetier Dev. Firmware
    - Auto Bed Leveling is turned off now

    This is my connection G-Code:
    G90 ;
    G28 Z ;
    G28 X Y ;
    G1 X150 Y150 ;
    G1 Z200 ;

    Start print job G-Code:
    G28 Z             ; Homing
    G28 X Y            ;
    G1 X5 Y5 F9000    ; Schlitten auf Startposition
    G1 Z0            ; Düse an Bett heran

    Pause print:
    G91                     ;relative positioning
    G1 Z+10      F9000         ;Z + 10mm
    G90                         ;absolute positioning
    G1 X150 Y0 F9000        ;Düse nach vorne
    M84                        ;Motoren aus
    M107                    ;Lüfter aus

    Continue print:
    G28 X Y;
    G91                     ;relative positioning
    G1 Z-10 F9000             ;Z - 10mm
    G90                         ;absolute positioning
    M106                    ;Lüfter an

    And this is the result after pause/continue via touchscreen:

    Now the noozle is 10mm too high...
  • If your z probe is also z min endstop you need to disable ALWAYS_CHECK_ENDSTOPS otherwise it will not go down once it triggers and being inductive it triggers for z> 0.
  • parts from my config.h:

    #define ENDSTOP_PULLUP_Z_MIN true
    #define ENDSTOP_Z_MIN_INVERTING false
    #define MIN_HARDWARE_ENDSTOP_Z false

    #define min_software_endstop_z true

    #define Z_PROBE_PULLUP 1
    #define Z_PROBE_ON_HIGH 0

    So, you are right, I use the z-min-pin for probing. But I don't use the probe for homing.
  • It was worth the guess. So you do z max homing I guess and can move down to z=0 normally.
    What happens if you omit 
    G1 Z-10 F9000             ;Z - 10mm 

    host will go back to stored position anyway on continue.
  • that's right, I do max homing on all axis, with ZXY order. After that I can move the noozle to z0 and start printing...

    In previous versions of Repetier Server the noozle went back to the stored position. We realized a lot of mutlicolor print jobs by using this feature.

    G1 Z-10 was my attempt to fix the new situation. But this gcode line doesn't make any difference. Without it, I have the same 10mm z-offset as shown in the picture...
  • Ok being curious I added your pause/continue code and did a print. Pause twice and it always came back to the right position a sit should be.

    You could enable logging and afterwards check if it moved to right z position from server side. If it does something in firmware config like the z min endstop I thought it could be is preventing it. If code is wrong we have at least the resulting code causing the error and can dig deeper here.

  • Sounds good, I'll send some logs tomorrow.

    It's the third time I'm trying to fix a wrong movement calculation in different Repetier FW and Server combinations, without bug reports from other people. Maybe there is a hardware defect on my Arduino board?
    Could you run a test on the Due+RADDS platform?
  • That was where I just ran my test:-) Ok a derivate but same components.

    If you have no min endstop defined like your config shows, the only reason to not move down is that it goes below z=0. That also is verified by going down initially to 0 being no problem. So one likely solution is that the stored z position at pause start is wrong for your code and correct for mine. But I do not see where it should go wrong, but log should show it.

    If you do the log please mark where the pause is. No time to scan 30000 lines for a pause :-)
  • Here are some logged messages:

    ... Triggering Pause:

    10:07:19.821: N1615 G1 X103.938 Y54.455 E2.58141
    10:07:19.850: ok 1610
    10:07:19.850: N1616 G1 X106.525 Y57.042 E2.67277
    10:07:19.903: ok 1611
    10:07:19.903: N1617 G1 X106.525 Y57.487 E2.68389
    10:07:19.939: ok 1612
    10:07:19.939: ok 1613
    10:07:19.940: N1618 G1 X103.493 Y54.455 E2.79097
    10:07:19.940: N1619 M532 X8.3988 L3
    10:07:19.963: ok 1614
    10:07:19.964: N1620 G1 X103.047 Y54.455 E2.80208
    10:07:20.003: ok 1615
    10:07:20.004: N1621 G1 X106.525 Y57.933 E2.92489
    10:07:20.137: T:216.38 /200 B:62.83 /55 B@:0 @:20
    10:07:20.156: ok 1616
    10:07:20.156: N1622 G1 X106.525 Y58.378 E2.93600
    10:07:20.202: ok 1617
    10:07:20.202: N1623 G1 X102.602 Y54.455 E3.07453
    10:07:20.255: ok 1618
    10:07:20.256: N1624 G1 X102.157 Y54.455 E3.08565
    10:07:20.600: ok 1619
    10:07:20.600: ok 1620
    10:07:20.600: N1625 G1 X106.525 Y58.823 E3.23990
    10:07:20.600: N1626 M532 X8.5110 L3
    10:07:20.940: ok 1621
    10:07:20.940: N1627 G1 X106.525 Y59.268 E3.25101
    10:07:21.189: T:215.65 /200 B:62.72 /55 B@:0 @:20
    10:07:21.279: ok 1622
    10:07:21.280: N1628 G91 ;relative positioning
    10:07:21.280: N1629 G1 Z+10 F9000 ;Z + 10mm
    10:07:21.280: N1630 G90 ;absolute positioning
    10:07:21.619: ok 1623
    10:07:21.619: N1631 G1 X150 Y0 F9000;Düse nach vorne
    10:07:21.643: ok 1624
    10:07:21.643: N1632 M84;Motoren aus
    10:07:21.644: N1633 M107;Lüfter aus
    10:07:22.012: ok 1625
    10:07:22.242: T:215.07 /200 B:62.56 /55 B@:0 @:20
    10:07:22.377: ok 1626
    10:07:22.377: ok 1627
    10:07:22.741: ok 1628
    10:07:22.745: ok 1629
    10:07:23.105: ok 1630
    10:07:23.109: ok 1631
    10:07:23.131: ok 1632
    10:07:23.294: T:214.06 /200 B:62.56 /55 B@:0 @:20
    10:07:24.347: T:213.33 /200 B:62.33 /55 B@:0 @:20
    10:07:25.134: busy:processing
    10:07:25.400: T:212.61 /200 B:62.17 /55 B@:0 @:20
    10:07:26.452: T:211.88 /200 B:62.06 /55 B@:0 @:20
    10:07:27.133: busy:processing
    10:07:27.502: T:211.01 /200 B:61.96 /55 B@:0 @:20
    10:07:28.099: T:210.72 /200 B:61.92 /55 B@:0 @:20
    10:07:28.103: ok 1633
    10:07:28.103: Fanspeed:0
    10:07:28.554: T:210.14 /200 B:61.83 /55 B@:0 @:20
    10:07:29.099: wait

    ... Continue

    10:07:43.549: wait
    10:07:44.332: T:203.05 /200 B:60.63 /55 B@:0 @:20
    10:07:44.548: wait
    10:07:45.380: T:202.71 /200 B:60.58 /55 B@:0 @:20
    10:07:45.548: wait
    10:07:45.952: N1636 G90
    10:07:45.952: N1637 G28 X Y;
    10:07:45.952: N1638 G90 ;absolute positioning
    10:07:45.952: N1639 M106 ;Lüfter an
    10:07:45.952: N1640 G90
    10:07:45.952: N1641 G1 X106.525 Y59.268 F6000
    10:07:45.952: N1642 G1 Z0.620 F120
    10:07:45.952: N1643 G92 E3.2510
    10:07:45.952: N1644 G1 F1800
    10:07:45.953: N1645 G1 X101.712 Y54.455 E3.42098
    10:07:45.958: ok 1636
    10:07:45.958: ok 1637
    10:07:45.958: N1646 G1 X101.266 Y54.455 E3.43210
    10:07:46.433: T:202.37 /200 B:60.50 /55 B@:0 @:120
    10:07:47.487: T:202.20 /200 B:60.38 /55 B@:0 @:120
    10:07:47.960: busy:processing
    10:07:48.539: T:201.86 /200 B:60.38 /55 B@:0 @:20
    10:07:49.593: T:201.53 /200 B:60.29 /55 B@:0 @:120
    10:07:49.959: busy:processing
    10:07:50.644: T:201.36 /200 B:60.21 /55 B@:0 @:120
    10:07:51.693: T:201.19 /200 B:60.17 /55 B@:0 @:120
    10:07:51.958: busy:processing
    10:07:52.745: T:200.85 /200 B:60.08 /55 B@:0 @:120
    10:07:53.798: T:200.68 /200 B:60.04 /55 B@:0 @:120
    10:07:53.958: busy:processing
    10:07:54.850: T:200.51 /200 B:59.96 /55 B@:0 @:120
    10:07:55.899: T:200.51 /200 B:59.92 /55 B@:0 @:20
    10:07:55.960: busy:processing
    10:07:56.952: T:200.51 /200 B:59.83 /55 B@:0 @:20
    10:07:57.685: X:300.00 Y:300.00 Z:10.620 E:3.2464
    10:07:57.689: ok 1638
    10:07:57.689: ok 1639
    10:07:57.689: Fanspeed:255
    10:07:57.690: ok 1640
    10:07:57.690: N1647 M117 ETA 10:16:54 day 2
    10:07:57.693: ok 1641
    10:07:57.693: ok 1642
    10:07:57.693: ok 1643
    10:07:57.693: ok 1644
    10:07:57.693: ok 1645
    10:07:57.693: ok 1646
    10:07:57.694: N1648 G1 X106.525 Y59.714 E3.61779
    10:07:57.694: N1649 G1 X106.525 Y60.159 E3.62891
    10:07:57.694: N1650 G1 X100.821 Y54.455 E3.83033
    10:07:57.694: N1651 M532 X8.6232 L3
    10:07:57.694: N1652 G1 X100.376 Y54.455 E3.84145
    10:07:57.697: ok 1647

  • edited August 2017
    btw: After cancelling the print job, I can send movement commands like G91, G1 Z+20, G90 via command line or web interface slider. Repetier Server updates the position and sends it to Host. Every command gets an "ok". But the noozle don't move. It is still waiting at Z10, Repetier Server and Host think it is at Z140...
  • edited August 2017
    I tried to upload a log txt file. But it disappeared after saving my comment...
  • So far it looks good

    0:07:45.952: N1639 M106 ;Lüfter an
    10:07:45.952: N1640 G90
    now comes server added code
    10:07:45.952: N1641 G1 X106.525 Y59.268 F6000
    10:07:45.952: N1642 G1 Z0.620 F120
    10:07:45.952: N1643 G92 E3.2510
    10:07:45.952: N1644 G1 F1800

    continue print at z=0.620 
    10:07:45.953: N1645 G1 X101.712 Y54.455 E3.42098

    As you see the commands say you paused at 0.62mm height which I hope was correct and is at least lower then the 10mm you say it continues.

    First go directly over server to printer just to rule out anything between host/server. In console view in server you can also send commands manually. there try
    To see what endstop and position server then thinks it has. You could also replay the sequence where the problem happens to see exactly at what command it starts to go wrong. Start with
    G1 Z0.62 
    and then play pause and continue command by command and see at which point it stops doing the moves. From log I would say it is simply moving as I can see all the "ok" but from your comment it sounds like it stops moving completely.
  • edited August 2017
    I was able to reproduce the problem:

    It's the line "M84 ;Motoren aus".
    After turning off the stepper motors, they won't get enabled by movement commands (axis only, extruder works normal).

    I start with G28 and some G1 movements, relative and absolute. Everything works normal...

    After M84 I can send G1 commands, Server answers with ok and updates the position, but the noozle doesn't move. I can bring the stepper back by G28 for each axis.
    G28 X enables the x axis. After that it moves again, but only the axis I rehomed.

    So, after "M84 and G28 X" I can move the noozle on X axis only. M84 + G28 X Y enables X and Y movements, but not Z. After M84 + G28 all axis move again. That happens for the axis stepper only. The extruder stepper gets unpowered by M84, but it comes back after sending a extrude command.

    So, pause / continue works without M84, or I have to do a full G28 in the continue gcode at the moment.

  • oh, M119 shows correct enstop situations, high when triggered...

    M114 gave back the coordinates I tried to reach. It was updated correctly after G1 commands, but after M84 without the real movements.

  • I see. M84 sets homed to false as you could easily move position so they are not trusted any more. Now this would not be so hard if you did not also select to only move when homed. Another security feature preventing unwanted collisions. If you have z max homing you could add home Z as well, or not disable moves when not homed or not using M84. All 3 should work also M84 might also trigger after a timeout if you are too slow and have enabled this.
  • only move when homed: The printer doesn't have min-endstops... If it is possible to produce a crash by pressing the wrong button, it's a save bet that my students will press this button. I can write a sign with big letters and place it over the printer, but they will crash it sooner or later.

    Full G28 after pause: Homing Z needs a lot of time. The Z axis is really slow with just 2mm/sec to prevent the spindles from building up vibrations. After homing all axes the noozle is empty, so I need to add some gcode for noozle cleaning and a little bit extrusion...

    Not using M84 is what I do now. It's okay, but changing filament takes a longer time and is very fiddy at the moment (my extruder has a rotary knob for manual extrusion)...

    A command like "M84 E0"  for shutting down the extruder motor would be great now... :-)
Sign In or Register to comment.