0
$\begingroup$

Will the two following lines of code behave differently given that the path that they describe is exactly the same (two segments)?

Option 1 (describes separate segments giving the start and end point):

G92 E0
G1 F0 X14.73 Y-30.28 Z0
G1 F3000 X-27.15 Y-18.58 Z0 E2.01
G92 E0
G1 F0 X-27.15 Y-18.58 Z0
G1 F3000 X17.65 Y0.51 Z0 E2.26

Option 2 (describes end points only):

G92 E0
G1 F0 X14.73 Y-30.28 Z0
G1 F3000 X-27.15 Y-18.58 Z0 E2.01
G1 F3000 X17.65 Y0.51 Z0 E2.26
$\endgroup$
4
  • 2
    $\begingroup$ You'll never get anywhere at F0. $\endgroup$ – Davo Nov 16 '18 at 20:42
  • $\begingroup$ @Davo will the printer just ignore that line? $\endgroup$ – Arthur Mamou-Mani Nov 17 '18 at 18:11
  • $\begingroup$ Manou-Mani I don't know, but logically it should not. I'm away from my machine. I'll try it next week. $\endgroup$ – Davo Nov 18 '18 at 18:08
  • $\begingroup$ Well, the second F0 is a repetitive X,Y,Z position since on the first F3000 the printer reach that position; so the Second F0 wil be ignored. I don't know if the firts F0 form the example will be Ignored but Gcode sender 0.8 normally refuses to work with undefined feed rate, Zero value is taken as undefined. $\endgroup$ – Fernando Baltazar Nov 19 '18 at 7:41
1
$\begingroup$

You should never use a feed rate of zero to start a command with. Theoretically, the other way around would work as the feed rate specified in the command is the feed rate at the end of the operation, but that is theoretically; if you look into the Marlin Firmware sources you will find the following C-code for the G0 and G1 commands in the function void gcode_get_destination():

if (parser.linearval('F') > 0)
  feedrate_mm_s = MMM_TO_MMS(parser.value_feedrate());

From the first code line you read that the value for the feed rate is only parsed as the value is larger than 0. As there is no prior code shown or feed rate set, the command will not be executed.


Some extra information from G0 & G1: Move describing the usage of the feed rate:

Most RepRap firmwares do subtle things with feedrates.

G1 F1500           ; Set feedrate to 1500mm/m 
G1 X50 Y25.3 E22.4 ;

Move and extrude In the above example, we first set the feedrate to 1500mm/m, then move to 50mm on X and 25.3mm on Y while extruding 22.4mm of filament between the two points.

G1 F1500                 ; Feedrate 1500mm/m 
G1 X50 Y25.3 E22.4 F3000 ; Accelerate to 3000mm/m
However, in the above example, we set a feedrate of 1500 mm/m, then do the same move, but accelerating to 3000 mm/m. Everything stays synchronized, so extrusion accelerates right along with X and Y movement.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.