Jump to content

Ultimaker 3 GCode commands list


dast

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).

 

Thanks!

  • 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:

    https://reprap.org/wiki/G-code

     

    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

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 16 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...