Mid Air Prints unless I Restart



  • I usually calibrate the Z-Probe using the method described HERE if my printer has been powered down then have the Auto Bed Compensation run as part of my start G-Code in my slicing software. This works great for the first print however, if I start a new job immediately after one finishes, the nozzle does not lower itself to the bed and prints in the air.

    If I restart the printer, it works fine and does not air print. But if I start a job after one finishes (without a restart), it does.

    I'm Also Using Mesh Bed Leveling Using Multiple Independent Z-Motors with a Piezo nozzle probe

    Pretty sure it's a fault of my start g-code but I'm not sure what needs to change:

    G28 ; home all axes
    G1 E-4 F1800; retract filament 4mm
    G32
    G1 X0 Y10 Z0.2 F3000; get ready to prime
    G1 X150 E20 F600 ; prime nozzle

    When I look at the G-code from a part that I sliced, this is what is created befor the print actually starts:

    G28 ; home all axes
    G1 E-4 F1800; retract filament 4mm
    G32
    G1 X0 Y10 Z0.2 F3000; get ready to prime
    G1 X150 E20 F600 ; prime nozzle
    M109 S240 ; set temperature and wait for it to be reached
    G21 ; set units to millimeters
    G90 ; use absolute coordinates
    M82 ; use absolute distances for extrusion
    G92 E0
    G1 E-2.00000 F2400.00000
    G92 E0

    My config.g file is below:

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Thu Jan 03 2019 13:44:38 GMT-0500 (Eastern Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Network
    M550 P"Makerfarm Pegasus 10" ; Set machine name
    M552 S1 ; Enable network
    M587 S"XXXXX" P"XXXXX" ; Configure access point. You can delete this line once connected
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M584 X0 Y1 Z2:4 E3 ; Two Z motors connected to driver outputs 2 and 4 (plug Jumper into ZB on Drive 2)
    M671 X343.0:-73.0 Y30.5:30.5 ; leadscrews at rear left and rear right
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E419 ; Set steps per mm
    M566 X600.00 Y600.00 Z20.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
    M208 X230 Y230 Z230 ; set axis maxima and high homing switch positions (adjust to suit your machine)
    M208 X0 Y0 Z0 S1 ; set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed)
    M203 X15000.00 Y15000.00 Z180.00 E1500.00 ; Set maximum speeds (mm/min)
    M201 X1000.00 Y1000.00 Z100.00 E500.00 ; Set accelerations (mm/s^2)
    M906 X950.00 Y950.00 Z950.00 E800.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X235 Y235 Z235 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 S1 ; Set active high endstops

    ; Z-Probe
    M574 Z1 S2 ; Set endstops controlled by probe
    M558 P8 I1 R0.4 H5 F500 T3000 ; Set Z probe type to effector and the dive height + speeds
    G31 P1000 X0 Y0 Z-0.095 ; Set Z probe trigger value, offset and trigger height
    M557 X15:215 Y15:215 S50 ; Define mesh grid

    ; Heaters
    M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    M305 P1 X501 R4700 ; Configure PT1000 for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; Fans
    M106 P0 S1 I0 F25500 H1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic power saving
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Custom settings are not configured



  • What do you have in homeall.g (G28)?
    What do you have in bed.g (G32)?
    What do you have in your slicer end gcode?



  • ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Thu Jan 03 2019 13:44:38 GMT-0500 (Eastern Standard Time)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 X-240 Y-240 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y5 F6000 ; go back a few mm
    G1 S1 X-240 Y-240 F360 ; move slowly to X and Y axis endstops once more (second pass)
    G90 ; absolute positioning
    G1 X15 Y15 F6000 ; go to first bed probe point and home Z
    G30 ; home Z by probing the bed

    ; Uncomment the following lines to lift Z after probing
    ;G91 ; relative positioning
    ;G1 S2 Z5 F100 ; lift Z relative to current position
    ;G90 ; absolute positioning


    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Thu Jan 03 2019 13:44:38 GMT-0500 (Eastern Standard Time)
    G28 ; home
    G30 P0 X20 Y20 Z-99999 ; probe near a leadscrew
    G30 P1 X115 Y115 Z-99999 ; probe near a leadscrew
    G30 P2 X210 Y210 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
    G29 S0 ; probe the bed and enable compensation
    G28 ; home


    Slicer End-Code:

    G91
    G1 Z10 E-1 F1200 ; move Z up and retract filament 1mm
    G28 X0 Y0 F1200 ; Home X and Y Axis
    M104 S0 ; turn off extruder
    M140 S0 ; turn off bed
    M84 ; disable motors



  • Does the printer not home itself when starting the new print?

    What firmware version are you using? DWC version?



  • It does home itself, and DWC is at 1.21.



  • @p40whk is the firmware at 1.21 as well?

    There was a bug around that version that would stack the z offset causing problems like you describe. I suggest you upgrade your firmwares.



  • Thanks but I misspoke, I wasn't at the computer where my printer is but I am up to date on firmware

    0_1550369483895_Firmware.png



  • I've seen at least 3 posts of this kind (one from myself) about this exact issue - Z height increment between subsequent prints. Don't think there was ever a solution but to babystep for the 1st layer (in my case for instance the Z babystepping required would be around 0.4-0.5mm) and then reset babystepping for the 2nd layer and magically 2nd layer comes back to normal layerheight. Interestingly, even though it prints in air, stopping the print and sending G1 Z0 sends the nozzle to the bed as it should be. I ended up migrating to klipper for this very reason, but reverted back as DWC/PanelDue were too much of a sacrifice 🙂

    Can't wait for a solution. Btw, if it'd help with debugging, i'm happy to post my configs.


  • administrators

    When the G32 leadscrew bed levelling runs at the start of your print, does it run correctly at the start of the second print, and what corrections does it report?


  • administrators

    @randomfactoid said in Mid Air Prints unless I Restart:

    I've seen at least 3 posts of this kind (one from myself) about this exact issue - Z height increment between subsequent prints. Don't think there was ever a solution but to babystep for the 1st layer (in my case for instance the Z babystepping required would be around 0.4-0.5mm) and then reset babystepping for the 2nd layer and magically 2nd layer comes back to normal layerheight. Interestingly, even though it prints in air, stopping the print and sending G1 Z0 sends the nozzle to the bed as it should be. I ended up migrating to klipper for this very reason, but reverted back as DWC/PanelDue were too much of a sacrifice 🙂

    Can't wait for a solution. Btw, if it'd help with debugging, i'm happy to post my configs.

    Are you able to construct a short GCode file that demonstrates this if I run it twice? Preferably without involving heating or extrusion.

    Are you also using G32 leadscrew bed levelling?



  • @dc42 will try to do that asap...maybe today.

    I am using G32 gantry leveling on Voron 2.1 using 4 z steppers with corrections of 0.0x or 0.00x on each one after 3 passes.



  • @dc42 said in Mid Air Prints unless I Restart:

    When the G32 leadscrew bed levelling runs at the start of your print, does it run correctly at the start of the second print, and what corrections does it report?

    Yes, it does run correctly at the start of the second print however, I didn't note what it reported, I'll set up a couple of jobs today and check that.



  • @dc42 thanks to your suggestion about the simple gcode, I think I found the problem.

    Apparently if you have G10 in your pause.g (or, I suppose anywhere in your Gcode) and have Z hop defined in M207, after cancelling the print (or, I'd guess, finishing it without unretracting), after starting a new print, z=0 becomes the value of the Z hop height in M207, because it zhops, the print gets cancelled or finishes and never actually zhops down to previous height.

    I tested this by uncommenting G10 from my pause.g and the problem disappeared. I also tried setting M207 Z(random number) and after starting a new print, Z=0 is at a height of (random number) and actually you can jog the nozzle into negative numbers after stopping the print...and it goes right to the negative height of M207 Z value.

    This seems like a bug in the firmware as Zhop height doesn't get cancelled after the print finishes without unretracting.



  • @randomfactoid So I just checked and don't have G10 anywhere in my code and am not using M207 yet I still have this issue. So, my problem even though related does not seem to be the same.



  • @p40whk what values does M207 return ?



  • @randomfactoid said in Mid Air Prints unless I Restart:

    @p40whk what values does M207 return ?

    I'm in the middle of a print right now, where/when would I use the M207 command?



  • Overall - at any point, but it'll probably be hard to see the output while printing. Although try that in console - it might work.
    Tbh your issue sounds exactly like mine, but, you're right, it's different if you aren't using G10 anywhere.



  • @p40whk said in Mid Air Prints unless I Restart:

    @randomfactoid said in Mid Air Prints unless I Restart:

    @p40whk what values does M207 return ?

    I'm in the middle of a print right now, where/when would I use the M207 command?

    M207 sets the parameters for firmware retraction. If you haven't set it up in the slicer to use it, it won't tell you anything. If you were using it, you'd know.



  • @phaedrux said in Mid Air Prints unless I Restart:

    @p40whk said in Mid Air Prints unless I Restart:

    @randomfactoid said in Mid Air Prints unless I Restart:

    @p40whk what values does M207 return ?

    I'm in the middle of a print right now, where/when would I use the M207 command?

    M207 sets the parameters for firmware retraction. If you haven't set it up in the slicer to use it, it won't tell you anything. If you were using it, you'd know.

    That's kind of what I thought, it's not set up in my slicing program.

    I'm waiting for the first print to be done and I'll take a video of what it does when I go to print a new print.



  • @p40whk could you check if there is a G10 command at the end of the .gcode file that you're running? (just before the end gcodes will run)


Log in to reply