<blockquote>
  <p>G1 -2.000 F2400.000</p>
</blockquote>

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

<p>Marlin would ignore the <code>-2.000</code> bit and simply treat the command as equivalent to</p>

<pre><code>G1 F2400.000
</code></pre>

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

<blockquote>
  <p>x and y shouldnt have negative</p>
</blockquote>

<p>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).</p>

CC BY-SA 3.0
2017-11-04T09:44:29.457Z
2017-11-04T09:44:29.457Z
Tom van der Zanden
<p>G1 indicates a movement and -2.000 the distance, F2400.000 the feed rate mm/min, normally the <strong>(-)</strong> values are for retraction on extrusion <strong>E</strong>, for example:</p>

<p>G0 X12 (move to 12mm on the X axis)  <br>
G0 F1500 (Set the feedrate to 1500mm/minute) <br>
G1 X90.6 Y13.8 E22.4 (Move to 90.6mm on the X axis and 13.8mm on the Y axis while extruding 22.4mm of material) </p>

<pre><code>1. G1 F1500
2. G1 X50 Y25.3 E22.4
</code></pre>

<p>In the above example, we set the feedrate to 1500mm/minute on line 1, then move to 50mm on the X axis and 25.3mm on the Y axis while extruding 22.4mm of filament between the two points. </p>

<pre><code>1. G1 F1500
2. G1 X50 Y25.3 E22.4 F3000
</code></pre>

<p>However, in the above example, we set a <strong>feedrate of 1500 mm/minute</strong> on <strong>line 1</strong>, then do the move described above <strong><em>accelerating to a feedrate of 3000 mm/minute</em></strong> as it does so. The extrusion will accelerate along with the X and Y movement, so everything stays synchronized. </p>

<p><strong><em>So, in your case if some axis is not defined the feed rate applies to all motors.</em></strong></p>

<p><em>(part of this content is from reprap-wiki)</em></p>

<p>You will see negative numbers if your starting point is on the center of the bed just like rectangular coordinates.</p>

<pre><code>G1 X-50.318 Y8.849 E11.70313 
G1 X-52.606 Y3.087 E12.26689 
G1 X-53.240 Y1.297 E12.43953 
G1 X-54.398 Y-2.097 E12.76562 
G1 X-54.683 Y-2.995 E12.85132 
</code></pre>

CC BY-SA 3.0
2017-11-05T08:33:49.220Z
`So, in your case if some axis is not defined the feed rate applies to all motors.`. This is misleading. The feedrate always applies to all motors.
Tom van der Zanden
CC BY-SA 3.0
2017-11-05T08:37:23.837Z
It would be good to clearly delineate the text you took from the RepRap wiki by including it in a blockquote section. You can do this by prefixing the relevant lines by `> `. E.g., you might write "[...], RepRap wiki explains this in the following way:", followed by a quoted section.
Tom van der Zanden
CC BY-SA 3.0
2017-11-04T06:06:51.917Z
2017-11-04T20:56:58.743Z
2017-11-04T20:56:58.743Z
Fernando Baltazar
<p>I am working on g code for my homebrew 3d printer and i have found the line <code>G1 -2.000 F2400.000</code>. 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</p>

<diy-3d-printer><g-code>
Meaning of G1 -2.000 F2400.000
Keith Bybee
# Meaning of G1 -2.000 F2400.000

(Asked by: username_0 on 2017-11-04)

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

**Tags:** diy-3d-printer, g-code

---

## 2 answers

### Answer by username_1 on 2017-11-04. Score: 2

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).


---

### Answer by username_2 on 2017-11-04. Score: 0

G1 indicates a movement and -2.000 the distance, F2400.000 the feed rate mm/min, normally the (-) values are for retraction on extrusion E, for example:
G0 X12 (move to 12mm on the X axis)  
G0 F1500 (Set the feedrate to 1500mm/minute) 
G1 X90.6 Y13.8 E22.4 (Move to 90.6mm on the X axis and 13.8mm on the Y axis while extruding 22.4mm of material) 
1. G1 F1500
2. G1 X50 Y25.3 E22.4

In the above example, we set the feedrate to 1500mm/minute on line 1, then move to 50mm on the X axis and 25.3mm on the Y axis while extruding 22.4mm of filament between the two points. 
1. G1 F1500
2. G1 X50 Y25.3 E22.4 F3000

However, in the above example, we set a feedrate of 1500 mm/minute on line 1, then do the move described above accelerating to a feedrate of 3000 mm/minute as it does so. The extrusion will accelerate along with the X and Y movement, so everything stays synchronized. 
So, in your case if some axis is not defined the feed rate applies to all motors.
(part of this content is from reprap-wiki)
You will see negative numbers if your starting point is on the center of the bed just like rectangular coordinates.
G1 X-50.318 Y8.849 E11.70313 
G1 X-52.606 Y3.087 E12.26689 
G1 X-53.240 Y1.297 E12.43953 
G1 X-54.398 Y-2.097 E12.76562 
G1 X-54.683 Y-2.995 E12.85132

> **Comments:**
> **username_1**: `So, in your case if some axis is not defined the feed rate applies to all motors.`. This is misleading. The feedrate always applies to all motors.  
> **username_1**: It would be good to clearly delineate the text you took from the RepRap wiki by including it in a blockquote section. You can do this by prefixing the relevant lines by `> `. E.g., you might write "[...], RepRap wiki explains this in the following way:", followed by a quoted section.  

---

