Jump to content

doubts about the Gcode generated by Cura


jcmjul

Recommended Posts

Posted · doubts about the Gcode generated by Cura

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:

 

  • Link to post
    Share on other sites

    Posted · doubts about the Gcode generated by Cura

    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

     

  • Link to post
    Share on other sites

    Posted · doubts about the Gcode generated by Cura

    Wait - now I'm confused:

     

    G1 F200 E3

     

    Looks like it sets feedrate for extruder and extrudes 3mm. But does it really?

     

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

     

    Looks like it does *not* set feedrate for extruder. Which is it?

    Daid?

     

  • Link to post
    Share on other sites

    Posted · doubts about the Gcode generated by Cura

    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.

     

  • Link to post
    Share on other sites

    Posted · doubts about the Gcode generated by Cura

    thank you very much, I had already consulted the wiki Gcode, and there was where I read about the accelerations, but I had not read that with the Marlin does not work.

    Regards

     

  • Link to post
    Share on other sites

    Posted · doubts about the Gcode generated by Cura

    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.

     

  • 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
        • 18 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...