Jump to content
dast

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

 

Thanks!

Share this post


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

Share this post


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

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Our picks

    • Ultimaker Cura 4.0 | Stable available!
      Ultimaker Cura 4.0 is mainly focused on the improved user interface and cloud integration.
      As always, we want to collect your user feedback for this release. If there are any improvements you can think of, feel free to mention it here and help us to shape the next release.
      • 86 replies
×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!