Announcement

Collapse
No announcement yet.

G and M codes. What are they?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • G and M codes. What are they?

    Here is a very informative link that explains the meanings of G and M codes were 3D printers as well as CNC milling machine ( actually they share the same Cartesian language as they are same in technology ) For some of us that likes to expand our knowledge on G coding.
    https://all3dp.com/2/g-codes-and-m-c...il&omhide=true
    Thinking simple is the hardest way.....

  • #2
    I must learn about this.

    Comment


    • #3
      I new that the difference between G and M was there. I considered G is more "Go/Physical Action", while M is always more "Mode/Switching".

      Wasn´t aware that the G stands for geometry, but it makes sence.

      Comment


      • #4
        And M stands for???????

        Comment


        • #5
          M-code, on the other hand, covers “miscellaneous” functions, though some also refer to them as “machining functions”. This includes, among other things, tool speed (e.g. of an extruder or spindle).

          Comment


          • #6
            I copied and pasted that from the article.

            Comment


            • #7
              thanks for the info.

              Comment


              • #8
                Well, G is for rapid or not, moves an axis from one position to another accurately. This is Geometric value. Some other Geometric values is for instance G21 that tells the controller to read and move in mm or G20 to inches, G28 Home axis instead of G29 in REPRAP, G41 or G42 is left or right compensation, G02 or G03 are arc commands for X axis, for the milling cutter. ( see also this http://gcodeanalyser.com/ ) The FANUC system has "create" the G and M ( Miscellaneous function ) codes while was time to move from NC ( numerical control ) to CNC ( computerised numerical control ) The main code starts with " this is the block, mm, rapid moves, machine coordinate system ( watchout your axis limits), turn on coolant, Start spindle in specific RPM CCW, Feed Rate, Incremental move to, start. All in G and M codes.
                Here is a link https://en.wikipedia.org/wiki/G-code to start with CNC FANUC G coding system. You'll notice that are involving all the letters of the Alphabet. Also take a look here https://reprap.org/wiki/G-code for REPRAP G coding language that is more complicated than FANUC because of the complexity of the moves ( FFF technology ).

                I hope this explanation will help you to understand the why's and the how's a lot!
                Cheers!
                Last edited by Vassili Finellis; 10-30-2020, 04:37 AM. Reason: I can't apply a link on a bolded phrase
                Thinking simple is the hardest way.....

                Comment


                • #9
                  Here is a good reference https://marlinfw.org/meta/gcode/
                  Many times you will see someones gcode - this will let you know what the command do

                  Comment

                  Working...
                  X