G0 Feedrate


I use also my printer 3D with the CNC mode.

Can you confirm that G0 not use by defaut the variable :


That it's necessary to write for every G0 line the feedrate Fxxxx as like :

G0 X133 F6000



  • G0 and G1 are identical and both share last set feedrate and have same speed limits.
  • Ok, this is a little  inconvenience, some post processors do not add the feedrate to the G0

    because it is considered that the speed is setting in the controller by a variable or the max value of the axis.


  • had same "problem"  so feel free to use:


    you just can pick out the G0/G1 section  if you want to

  • I only add these two files in the firmware folder?

    Is it directly functional for PRINTER_MODE_CNC or does it need to implement case 0?

         switch (com-> G) {
             case 0: // G0 -> G1
             case 1: // G1

    Thank you for your help !

  • With the help of your code, I simply modified the file 'Commands.cpp'

    In :
    void Commands::processGCode(GCode *com)

            case 0: // G0
                          // select faster axis max feed rate for g0,other axis speed is limited by maxFeedrate
                          if( Printer::maxFeedrate[X_AXIS]>=Printer::maxFeedrate[Y_AXIS])
                                  Printer::feedrate = Printer::maxFeedrate[X_AXIS];//use faster axis max Feedrate for G0
                          else Printer::feedrate = Printer::maxFeedrate[Y_AXIS];
                          PrintLine::queueCartesianMove(ALWAYS_CHECK_ENDSTOPS, true);

            case 1: // G1

    For me :
    After a G0 code, the next G1 always contains the Fxxxx, It is not necessary to temporarily store the speed of the last G1.
    A gcode G0 is always a rapid move, I have not set a condition (Printer, Laser or CNC)  ;)

    Thanks again

  • the way i wrote the code matches the standards i know , so i suggest to take the whole section for the case you change your cam software ;-)
Sign In or Register to comment.