Feedrates doubt on custom gcode

Hi

I have decided to generate my own custom g-code processor as long as i need to trasnform by command line dynamic stls and i did not get any tool working in order to do so
Additionally this would let me generate 2 toolpahs in oder to deal with different bts

My concern right now is regarding feedrates

  • Whats the difference among feedrates defined on M3 and G0&1 commands?
  • If i set feedrates based on ipm, where do i set the diameter of my bit?
  • Is there any recommended table of feedrates for each different bit on wood surfaces?

I’ve been googling this , but at least the info i find is not quite obvious for beginers
Thanks lot

This is my sample
; Comienza el bloque inicial
G17 ; Plano de trabajo XY
G21 ; Escala en milímetros
G40 ; Radius compensation off
G90 ; Coordenadas absolutas
G94 ; feedrate por distancia mm
M3 S12000 ; Sentido agujas del reloj rotación de 12000 mm por minuto
M9 ; Coolant Off
T1 M6 ; Seleccionamos broca 1
; Comienza el bloque de fresado
G0 Z20 ;Levantamos el cabezal 20 mm
G0 X150.000 Y110.000 ; Posicionamos en la coordernada 20:20
G1 Z-2.000 F228.6 ; Bajamosel cabezal 2mm
G1 X150.000 Y110.000 F762.0 ; Esquina superior derecha
G1 X50.000 Y110.000 F762.0 ; Esquina inferior derecha
G1 X50.000 Y50.000 F762.0 ; Esquina inferior izquierda
G1 X150.000 Y50.000 F762.0 ; Esquna superior izquerda
G1 X150.000 Y110.000 F762.0 ; Esquina superior derecha
; Tareas finales
M5 ; Paramos rotación
M2 ; End of Program
M30; End of program

M3 is used for spindle control (speed,direction) and has no effect on feed rate. Feed rate is set in G0,G1.
M6 is used fo signal a tool change. It only requires a tool number, bit parameters are not relevant.

Just a clarification:

M3 is spindle on clockwise

the S word is what changes spindle speed

the F word is what changes feed rate

examples:
M3 S250 F50 turn the spindle on and set the speed at 250 rpm and the feed rate to 50
G90 G1 X5 Y5 S1000 F250 move to X=5 Y=5 with a feed rate of 250 and a spindle speed of 1000

Bit diameter is not a grbl parameter. CAM programs utilize the bit diameter to generate appropriate G-code. If you are going to do your own G-code generator then you will have to make the appropriate changes in your code for bit diameter.