Jump to content
UltiMaker Community of 3D Printing Experts

Ultimaker 3 GCode commands list


Recommended Posts

Posted · Ultimaker 3 GCode commands list

Hi everyone, 


I was wondering how I could find a list of G and M codes used in the GCode for the Ultimaker 3 (which I believe uses the Griffin flavour of GCode).



  • Link to post
    Share on other sites

    Posted · Ultimaker 3 GCode commands list

    Most of them are here.  This has gcodes for other firmwares as well so follow just the marlin ones:



    And also read this excellent guide by Daid:


    The UM3 has 2 computers - a linux board and an arduino board.  The arduino board runs Marlin and does the "low level" gcodes but some of the gcodes sent to the UM3 are interpreted by the linux computer.  Those are all detailed best in the code sitting on the UM3.  All the code on the UM3 is interpreted so you can just look at it.  It's very easy to read.  You don't need to be a programmer - you just need to be able to read english as there are lots of comments.  You can search around for know gcodes like those Daid spoke about and then there may be more in the same or similar files.  So in summary: ssh into the UM3 and look around.


    • Like 1
    • Thanks 1
    Link to post
    Share on other sites

    Posted · Ultimaker 3 GCode commands list

    @dast asked me some questions offline so here are the answers.


    griffin gcode:  This is slightly different from standard Marlin.  I'm not sure all the differences.  But keep in mind that the Marlin on the UM3 is 99% identical to other versions of Marlin.  Some differences:

    UM2 and UM3 Marlin has the ability to do E axis movement either in mm^3 or mm linear.  Most printers do mm linear but the UM2 introduced a feature where you tell the *printer* the diameter of the filament instead of the slicer.  I think this was reversed back to "normal" method on the UM3 where the slicer knows the diameter of the filament.


    G2 and G3 commands (same as G02, G03) are not implemented in Marlin.  At least I don't think so.  the link above says it is but I'm 90% sure they are not.  They certainly aren't used for 3d printing as STL format does not support arcs.  Just flat triangles which form lines when sliced.  I could be wrong - they might be supported.


    G0 and G1 are implemented identically in Marlin but in general Cura does one for move and the other for print just to make it easier to read.


    Marlin moves the 4 steppers in 4 dimensional linear space.  So if you move x,y,z,e steppers all at the same time and you move them 1,2,3,4 mm respectively then they will move 1x, 2x, 3x, 4x as fast such that we move in a straight line in 4D space.  This is important because all the different axes have different acceleration limits and velocity limits.  So if for example the X axis has double the acceleration limit of the E axis and you move them both 1mm at the same time then the E axis will set the max acceleration for that gcode move.  Because it's limit is half that of the X axis.  But if you are moving 1mm in the X axis and only 0.1mm in the E axis now the X axis sets the acceleration limit for the move.  This way the path in 4D space is linear.  If the E axis moved at max acceleration it would get to it's end point long before the X axis and you would get overextrusion at the start of the move and underextrusion at the end.


    Back to your last question:

    The E value is normally the distance to move in mm of filament so Cura needs to know the diameter of the filament and the layer height and the line width and distance to move the E axis the correct amount for a lines segment.  On the UM2 (and maybe on the UM3?  I don't know anymore) the E values are usually in cubic mm^3.  So moving from position E10 to E11 would extrude 1 cubic mm of filament (the printer needs to know in this case the diameter of the filament but cura wouldn't need to know).


    There are other details I'm leaving out.  Like if the flow value on the printer is 150% then it moves to E position multiplied by 1.5.  If cura has a flow value other than 100% then it modifies the E values in the gcode.


    The gcode that starts with F in a move sets the "feedrate" which is the speed in mm/minute so 

    G0 F600

    Sets the speed to 10mm/sec going forward.

    G0 X10 Y10 F600 E10

    does the same thing as

    G0 F600 X10 Y10 E10


    In other words it changes the printing speed *before* it does the rest of the command no matter where the F is located.


    Because the feeder almost always moves much slower than the other axes (in mm/sec) the feedrate usually determines the speed of the X or Y axis (whichever is moving farther).



    • Like 1
    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

      • 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
        • 10 replies
      • UltiMaker Cura 5.3.0-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
        • 16 replies
      • New here? Get ahead with a free onboarding course
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 14 replies
    • Create New...