Meaning of G1 -2.000 F2400.000 I am working on g code for my homebrew 3d printer and i have found the line G1 -2.000 F2400.000. From what i understand there should be an axis before the number and x and y shouldnt have negative. I am using grbl which is for cnc milling but and i have been deleting this line with no problems but i am wondering what it does because i will be upgrading to a "real" 3d printer asap
G1 -2.000 F2400.000


Is not valid G-code. As you note, -2.000 should be prefixed with an axis (X,Y,Z or E).

Marlin would ignore the -2.000 bit and simply treat the command as equivalent to

G1 F2400.000


which doesn't perform any movement, but sets the feedrate for any future moves to 2400mm/min.


  x and y shouldnt have negative


Not necessarily. Even though normally printing is done in the positive quadrant, negative values can be valid. Not only in relative movement mode, but even in absolute mode (for instance, if you set the center of your bed as (0,0) or if you use a negative z-axis offset the bring the nozzle closer to the bed).