Jump to content
Ultimaker Community of 3D Printing Experts
Sign in to follow this  
jcmjul

doubts about the Gcode generated by Cura

Recommended Posts

Hi All,

First of all thanks in advance for any help you can give me , I have some doubts about the code generated by Cura :oops: . my question is regarding the speed and acceleration (Feedrate). If I took a piece of code from a G code file I can see the following.

;TYPE:CUSTOM

M92 E600.000000

M140 S100.000000

M109 S230.000000

M190 S100.000000

;Sliced C:Users....Acoples v3 8mm y 12mm.stl at: Sun 20 Jan 2013 22:00:28

;Basic settings: Layer height: 0.35 Walls: 2 Fill: 30

;Print time: 0:49

;Filament used: 3.48m 29.72g

;Filament cost: 0.59

G21 ;metric values

G90 ;absolute positioning

M107 ;start with the fan off

G28 X0 Y0 ;move X/Y to min endstops

G28 Z0 ;move Z to min endstops

G92 X0 Y0 Z0.0 E0 ;reset software position to front/left/z=0.0

G1 Z5.0 F60

G92 E0 ;zero the extruded length

G1 F200 E3

G92 E0 ;zero the extruded length again

G1 F1800

;LAYER:0

;TYPE:SKIRT

G1 X26.75 Y92.553 Z0.63 F1800.0

G1 F2400.0

G1 E4.5

G1 F1800.0

G1 X28.774 Y98.575 Z0.63 F900.0 E5.1381

G1 X33.086 Y104.853 E5.903

G1 X37.983 Y109.749 E6.5985

G1 X42.017 Y112.775 E7.105

 

Reading the code I have the following doubts ,

:?: 1)

If we look at the line where it is written,

G1 Z5.0 F60

I understand making a move on the z axis at set speed by F60 (60mm/min), but two lines later we can see written

G1 F200 E3

Is this the same? i.e, moving on the axis E three millimeters at F200 speed.

:?: 2)

If we continue reading the code, we find the next:

G1 F1800

;LAYER:0

;TYPE:SKIRT

G1 X26.75 Y92.553 Z0.63 F1800.0

The first line sets the speed (G1 F1800) and the second defines a movement and speed, if I trust what is written in the Wiki about Gcode,

“Will set a feedrate of 1800 mm/minute, then do the move described above accelerating to a feedrate of 1800 mm/minute …”

But in this code the feedrate is the same, Does that mean there is no acceleration? then is a movement at a constant speed? Then why has added the first line?

:?: 3)

And my last question (for now)

If we continue reading the code, we find the next:

G1 F1800.0

G1 X28.774 Y98.575 Z0.63 F900.0 E5.1381

The first line sets the speed (G1 F1800), but in the second line, there is a speed command between the Z coordinate and E coordinate, How this command affects? Does this only defines the feedrate for Extruder, Is it an acceleration command for the XYZ system? Or, Is it an feedrate command for the XYZ system?

Thank in advance :rolleyes:

 

Share this post


Link to post
Share on other sites

Is this the same? i.e, moving on the axis E three millimeters at F200 speed.

 

Yes you can put it in either order. The first moves the head up, the second "primes" the nozzle.

2) The first feedrate is redundant. You can remove it. It doesn't hurt. It sets the desired speed for Marlin and has nothing to do with acceleration (acceleration is already in the Marlin firmware). From this page:

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

 

Note: not every firmware implements this, e.g. the current Marlin will use the new feedrate from the beginning of the move and not change it.

 

3) I'm pretty sure F command (feed rate) affects X,Y,Z movement but not E. It is designed for other types of machines like milling machines. Because the Z moves slower on the Ultimaker, Cura normally moves the Z separately and sets those moves separately.

Remember that Cura is designed for other machines and other firmwares. So on non-Marlin machines #3 would start out fast and then slow down.

There's great information about gcodes here:

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

and also here (scroll way down to the bottom):

https://github.com/ErikZalm/Marlin

 

Share this post


Link to post
Share on other sites

The speed given on a G1 line applies to the movement as a whole.

If it's an extrusion only move (a retraction/de-retraction) then the specified feedrate is used for the extruder (subject to limits in the firmware).

If it's a normal printing movement, then the feedrate is adjusted to ensure that the maximum speed for any axis isn't exceeded, and that all the axes move in step. Because the distance being moved by the Extruder is always a lot less than the distance being moved by the other axes, it's possible to move the other axes a lot faster without exceeding the speed limit for the extruder - in the time that the head moves a few cm, the extruder often only advances a mm or less. So the actual speed of the extruder is only a tiny fraction of the speed that the positioning axes are moving.

The bottom line is not to worry about it - Marlin takes care of it. If there are X/Y/Z movements involved in the move then the speed given sets the linear speed for the head moving in space. If it's only an E movement, then the speed given is the speed of the extruder.

Remember that the speeds are all in mm/min.

 

Share this post


Link to post
Share on other sites

Marlin doesn't do acceleration the way that was suggested in that wiki entry, but it does do acceleration - indeed it does it in a much more sophisticated way - it keeps track of the head speed, and accelerates and decelerates as needed to try to limit the instantaneous speed changes at the corners. It's not perfect, but it's a better - and more meaningful - way to do it than simply interpolating between segment speeds. The way Marlin works, you tell it the speed that you'd like to print a segment at, and Marlin takes care of getting the head up to that speed in a smooth way, based on both the speed that you just printed the last segment at, the speed you want to print the next segment at, and the sharpness of the corners between the segments.

 

Share this post


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
Sign in to follow this  

Announcements

  • Our picks

    • Architect Design Contest | Vehicles.
      We're open for entries! - Design and submit your 3D designs of architectural entourage - vehicles - for a chance to win a large filament pack. Presenting an idea, an architectural design or something as big as an urban project isn't easy. A scaled model can really help to get your idea across.
        • Like
      • 26 replies
    • What The DfAM?
      I'm Steve Cox, an experienced engineer familiar with 3D printing. I wanted to share some DfAM guidelines with this community to help and make stronger parts.
      I'm also an Autodesk Certified Instructor for Fusion 360, so many of the images in ...
        • Thanks
        • Like
      • 23 replies
×

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!