12

On the reprap wiki it says using Znnn it sets a new axis position. But then it says "No physical motion will occur". What would the line G92 E0 be used for?

0scar
  • 32,029
  • 10
  • 59
  • 135
Keith Bybee
  • 417
  • 1
  • 4
  • 13

2 Answers2

12

The G92 command is used to set the start position (origin) of one of more axes (including the current extruder) to any arbitrary value. The command G92 E0 is often used to perform retraction and nozzle priming. For example, the following commands are often used in start-gcode sequences (prologues) to prime the current extruder by extruding a small amount of filament:

G92 E0     ; Reset the extruder's origin
G1 F200 E3 ; Extrude 3 millimetres of filament
G92 E0     ; Reset the extruder's origin

RepRap Wiki: G92: Set Position

Mick
  • 3,002
  • 1
  • 9
  • 20
  • 1
    But what does it mean to reset the extruders origin? What would happen if you did the “G1 F200 E3” without first resetting the extruders origin? G92 makes perfect sense for x, y, and z, but can’t wrap my head around it for the extruder. – Michael Jan 02 '20 at 13:38
  • @Michael Why, it is exactly the same. Maybe you should not read it as "reset", but as "set" instead. From the top of my head I don't know what is taken when you omitted the first `G92 E0`, I assume it will start at zero anyways. But, it sets the filament extrusion to a certain length to zero, after priming it makes perfect sense to set the length to zero. Slicers (some) set the length back to zero after completion of a print layer, this prevents very large values for the filament length. – 0scar Jul 20 '20 at 08:28
  • 1
    Hi @Michael , thanks for your question, as I was thinking the same thing. However, as you're probably aware, questions (even good questions like yours) shouldn't be in comments. Could you post your question as a new question (referring back to Mick's answer - as it is the source of your query), and then Davo's answer below would make more sense there... if you see what I mean? :-) – Greenonline Aug 10 '20 at 16:59
  • @Greenonline my question would make no sense as its own question. It only makes sense in the context of this answer. – Michael Aug 10 '20 at 19:27
  • 1
    @Michael That is exactly why you should refer to this answer! The context can be found through the reference, this is not uncommon, this has happened more often. Sometimes answers spawn other questions. – 0scar Aug 10 '20 at 21:28
6

To supplement the accepted answer, and answer a question in the answer's comments (which should not be there), consider the E value as another axis - the axis of the filament.

If you executed:

G92 E0     ; Reset the extruder's origin
G1 F200 E3 ; Extrude 3 millimetres of filament at a rate of 200 units per second

and then went on to printing, the first filament move would have to take you from E3 to whatever E value the next move specified.

If the next move assumed starting at E0, you'd already be 3 mm further along, and the first move would probably be a retract, so for example, if the next printing move was:

G1 Xnnn Ynnn E0.5 ; Extrude 0.5 millimetres of filament

then instead of extruding 0.5 mm, you would actually retract 2.5 mm, to get from 3.0 to 0.5. Just like moving in a negative direction on any other axis.

Davo
  • 2,362
  • 1
  • 12
  • 26
  • I think the comment refers to the first G92, not the second. – 0scar Jul 20 '20 at 08:32
  • 1
    @0scar - Davo has made a good point about the question in comments under Mick's answer... Davo, I assume you mean [the comment from Michael](https://3dprinting.stackexchange.com/questions/4826/what-is-g92-used-for-in-g-code/13935#comment21278_4828) (who is not the OP)?. That question (in the comments) should really have been a new question, referring back to this question (I guess), to which Davo's answer would have been the answer to... if you follow me... Man, this is a bit of a muddle..! :-) – Greenonline Aug 10 '20 at 16:48
  • 1
    @Greenonline I can post that question as a stand-alone, and self-answer it, if you think that will improve the site. – Davo Aug 10 '20 at 17:28
  • Hi Davo. Yeah, that's an idea I guess... However, I have just left Michael [a comment](https://3dprinting.stackexchange.com/questions/4826/what-is-g92-used-for-in-g-code/13935?noredirect=1#comment25581_4828) to see if he wants to post his comment as a new question though. Maybe we should wait to see if he wants to? – Greenonline Aug 10 '20 at 17:31
  • Yes, absolutely. :) – Davo Aug 10 '20 at 17:32
  • 1
    Thank you so much for this great explanation. I was wondering why my initial purtge of filament always results in a massive retraction and this is exactly why. I had my start script modifyed to achieve a nice filled nozzle at start – LostKatana Nov 07 '20 at 12:25