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

[{'answer_id': 4879, 'author': 'Fernando Baltazar', 'author_id': 4454, 'author_profile': 'https://3dprinting.stackexchange.com/users/4454', 'pm_score': 0, 'selected': False, 'text': '<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>\n\n<p>G0 X12 (move to 12mm on the X axis)  <br>\nG0 F1500 (Set the feedrate to 1500mm/minute) <br>\nG1 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>\n\n<pre><code>1. G1 F1500\n2. G1 X50 Y25.3 E22.4\n</code></pre>\n\n<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>\n\n<pre><code>1. G1 F1500\n2. G1 X50 Y25.3 E22.4 F3000\n</code></pre>\n\n<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>\n\n<p><strong><em>So, in your case if some axis is not defined the feed rate applies to all motors.</em></strong></p>\n\n<p><em>(part of this content is from reprap-wiki)</em></p>\n\n<p>You will see negative numbers if your starting point is on the center of the bed just like rectangular coordinates.</p>\n\n<pre><code>G1 X-50.318 Y8.849 E11.70313 \nG1 X-52.606 Y3.087 E12.26689 \nG1 X-53.240 Y1.297 E12.43953 \nG1 X-54.398 Y-2.097 E12.76562 \nG1 X-54.683 Y-2.995 E12.85132 \n</code></pre>\n'}, {'answer_id': 4880, 'author': 'Tom van der Zanden', 'author_id': 26, 'author_profile': 'https://3dprinting.stackexchange.com/users/26', 'pm_score': 2, 'selected': False, 'text': "<blockquote>\n  <p>G1 -2.000 F2400.000</p>\n</blockquote>\n\n<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>\n\n<p>Marlin would ignore the <code>-2.000</code> bit and simply treat the command as equivalent to</p>\n\n<pre><code>G1 F2400.000\n</code></pre>\n\n<p>which doesn't perform any movement, but sets the feedrate for any future moves to 2400mm/min.</p>\n\n<blockquote>\n  <p>x and y shouldnt have negative</p>\n</blockquote>\n\n<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>\n"}]
['https://3dprinting.stackexchange.com/questions/4877', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/8837/']