Jump to content
UltiMaker Community of 3D Printing Experts

SOLVED: What is wrong with my G-Code: doesn't print


Recommended Posts

Posted (edited) · SOLVED: What is wrong with my G-Code: doesn't print

Hi and thank you for your help.

Currently using PrusaSlicer but have seen some nice tutorials from a couple of Cura users and want to give it a go.

My setup:

Ender 5 Pro

Duet WiFi 2.0 board

RepRap firmware


Form some reason my prints don't start. It runs through bed & nozzle heating, ABL & prints the line on the left. And then the nozzle goes to the back right corner and switches off the bed and hot end. My suspicion is that it has something to do with my G-Code. I copied and pasted my start & end code from PS and realised I had to change the settings bed & material temperatures.

I will appreciate your help.


Here is my current scarting code:


; start code

T0 ; select tool 1
G28 ; home all
M104 S{material_print_temperature} ; set extruder temp
M140 S{material_bed_temperature} ; set bed temp
M190 S{material_bed_temperature} ; wait for bed temp
M109 S{material_print_temperature} ; wait for extruder temp
G29 ; do abl
; G29 S1 ; use stored bed mesh
; G91
G1 E0 F10 ; feed 91mm of filament
G1 E90 F500
G1 Z5 F5000 ; lift nozzle 5mm
G1 X4 Y10 F3000
G1 Z0.28 F240
G92 E0
G1 Y190 E15 F1500 ; intro line
G1 X4 F5000
G92 E0
G1 Y10 E15 F1200 ; intro line
G92 E0


; end code

G91 ; change to relative positioning

G1 E-90 F1000 ; Retract filament 90mm

G1 Z20 F500 ; lower bed 20mm from current position

G90 ; change to absolute positioning

G1 X200 Y200 ; move tool to back right

M140 S0 ; turn off heatbed

M104 S0 ; turn off temperature

;M107 ; turn off fan

M84 X Y E ; disable motors

Edited by deonholt
  • Link to post
    Share on other sites

    • deonholt changed the title to SOLVED: What is wrong with my G-Code: doesn't print
    Posted · SOLVED: What is wrong with my G-Code: doesn't print

    I'll ignore it after I make a suggestion...

    Change the beginning of the StartUp Gcode to this:


    ; start code

    T0 ; select tool 1

    M140 S{material_bed_temperature_layer_0}

    M109 S150 ;heat the hot end to 150
    G28 ; home all
    G29 ; do abl
    M109 S{material_print_temperature_layer_0} ; set extruder temp and wait
    M190 S{material_bed_temperature_layer_0} ; wait for bed temp
    ; G29 S1 ; use stored bed mesh

    etc, etc,


    1. Setting the hot end to a temperature below the "ooze" temperature can keep the bed clean during the ABL stuff.
    2. If you decide to go to different "Print Temperature Initial Layer" or "Bed Temperature Initial Layer" then adding the "_layer_0" to the replacement words will get those "Initial Temperatures" to turn up in the gcode.

    I added "M220 S100" and "M221 S100" to my end gcode in case I tune the flow or feedrate during a print.  It will reset them to 100%.  If I roll right into another print then changes I might have made won't carry over.

    • Like 2
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.3 stable released
        In this stable release, Cura 5.3 achieves yet another huge leap forward in 3D printing thanks to material interlocking! As well as introducing an expanded recommended print settings menu and lots of print quality improvements. Not to mention, a whole bunch of new printer profiles for non-UltiMaker printers!
          • Thanks
          • Like
        • 29 replies
      • Here it is. The new UltiMaker S7
        The UltiMaker S7 is built on the success of the UltiMaker S5 and its design decisions were heavily based on feedback from customers.
        So what’s new?
        The obvious change is the S7’s height. It now includes an integrated Air Manager. This filters the exhaust air of every print and also improves build temperature stability. To further enclose the build chamber the S7 only has one magnetically latched door.
        The build stack has also been completely redesigned. A PEI-coated flexible steel build plate makes a big difference to productivity. Not only do you not need tools to pop a printed part off. But we also don’t recommend using or adhesion structures for UltiMaker materials (except PC, because...it’s PC). Along with that, 4 pins and 25 magnets make it easy to replace the flex plate perfectly – even with one hand.
        The re-engineered print head has an inductive sensor which reduces noise when probing the build plate. This effectively makes it much harder to not achieve a perfect first layer, improving overall print success. We also reversed the front fan direction (fewer plastic hairs, less maintenance), made the print core door magnets stronger, and add a sensor that helps avoid flooding.

        The UltiMaker S7 also includes quality of life improvements:
        Reliable bed tilt compensation (no more thumbscrews) 2.4 and 5 GHz Wi-Fi A 1080p camera (mounted higher for a better view) Compatibility with 280+ Marketplace materials Compatibility with S5 project files (no reslicing needed) And a whole lot more  
        Curious to see the S7 in action?
        We’re hosting a free tech demo on February 7.
        It will be live and you can ask any questions to our CTO, Miguel Calvo.
        Register here for the Webinar
          • Like
        • 18 replies
      • UltiMaker Cura Alpha 🎄 Tree Support Spotlight 🎄
        Are you a fan of tree support, but dislike the removal process and the amount of filament it uses? Then we would like to invite you to try this special release of UltiMaker Cura. Brought to you by our special community contributor @thomasrahm
        We generated a special version of Cura 5.2 called 5.3.0 Alpha + Xmas. The only changes we introduced compared to UltiMaker Cura 5.2.1 are those which are needed for the new supports. So keep in mind, this is not a sneak peek for Cura 5.3 (there are some really cool new features coming up) but a spotlight release highlighting this new version of tree supports.  
          • Like
        • 22 replies
    • Create New...