Solved G1 Feedrate

Looking to verify my understanding of the feed rate behaviour over a few examples...
(Examples assume; not using volumetric extrusion, axis max feed rates don't limit the motions, absolute motion on linear axis and relative on extrusion, each example is with head at (0,0,0) to start with no feed rate set  i.e. duet just powered up, instantaneous motion  i.e. infinite acceleration)
Initial power up:
G1 X10 Y10 Z10 # Unsure what feed rate is used at startup?
Is there a way to get the duet to display the currently assigned feed rates?
Feed rate set during linear motion:
G1 X10 Y10 Z10 E2 F3000 # Move to (10,10,10) with a head feed rate of 3000mm/min, # and extrude 2mm of filament at 346.41mm/min
(Calculates feed rate for E to ensure it completes in sync with the linear motion.)
Feed rate set on solo E command:
G1 E2 F60 # Extrude 2mm of filament at a rate of 60mm/min G1 X10 Y10 Z10 # Move to (10,10,10) at a head movement rate of 60mm/min?
My assumption is when an extrusion feed rate is set with a G1 command containing no linear axis motion the feed rate is applied as is to following linear motions?
Feed rate set on solo E command:
G1 E2 F60 # Extrude 2mm of filament at a rate of 60mm/min G1 X10 Y10 Z10 E2 # Extrude 2mm of filament at a rate of 60mm/min & # move to (10,10,10) at a head movement rate of 519.62mm/min. # OR # Move to (10,10,10) at a head movement rate of 60mm/min & # Extrude 2mm of filament at a rate of 6.93mm/min
If previous assumption is right, then the
firstsecond of the two possibilities would be right?Feed rate set in solo and linear motion then recalled:
G1 E2 F60 # Extrude 2mm of filament at a rate of 60mm/min G1 X10 Y10 Z10 F3000 # Move to (10,10,10) with a head feed rate of 3000mm/min G1 E2 # Extrude 2mm of filament with a feed rate of 60mm/min, # 3000mm/min or 346,41mm/min?
I expect this will use 346.41mm/min for the E axis second motion? Not too surtain what would happen here. I am guessing it will assign the rates that it would have carried out if the E command was part of the linear motion command?

Hi,
Interesting questions.
I have no idea as I leave that all to the slicers which generate the commands which involve extrusion.
As far as I know movement only commands use the specified F rate or the last specified F rate.
Frederick

@fcwilt Yeah, normally I would do the same. I'm working on an application that uses the rotational axis (where I am creating the gcode) and I realised setting the feed rate on them may behave very similarly to setting the feed rate for the extrusion axis.
...I then realised I didn't even understand that properly!

@DocTrucker said in G1 Feedrate:
Initial power up:
G1 X10 Y10 Z10 # Unsure what feed rate is used at startup?
Is there a way to get the duet to display the currently assigned feed rates?
Each input channel has its own feed rate for moves received for that channel. You can examine the feed rates for each channel in the object model at inputs[N].feedRate
For your other examples, there are two rules:

If the G1 command includes an F parameter, then that value is applied to the move. If it does not, then the previous F parameter will be used. It makes no difference whether the current and previous moves are motion only, extrusion only, or combined motion and extrusion, or any pair of those.

If a move contains both motion and extrusion, the feed rate is applied to the motion element, and the extruder speed is chosen to keep the extrusion in sync with the motion.
From this you can deduce that when switching between motion only, extrusion only, and motion+extrusion, it would be unusual not to provide an F parameter.


@DocTrucker There is a bit more about feedrate here if you haven't already read it. https://duet3d.dozuki.com/Wiki/Gcode#Section_G0_G1_Move

@dc42 Thanks for the clarification.
@dc42 said in G1 Feedrate:
Each input channel has its own feed rate for moves received for that channel. You can examine the feed rates for each channel in the object model at inputs[N].feedRate
Right, so all of X/Y/Z/U/V/W/A/B/C/D has a 'previously used' feed rate store that defaults to a value at start up?
@dc42 said in G1 Feedrate:
 If the G1 command includes an F parameter, then that value is applied to the move. If it does not, then the previous F parameter will be used. It makes no difference whether the current and previous moves are motion only, extrusion only, or combined motion and extrusion, or any pair of those.
This implies that as well as the 'previous used' for each channel there is also a F store too?
@dc42 said in G1 Feedrate:
 If a move contains both motion and extrusion, the feed rate is applied to the motion element, and the extruder speed is chosen to keep the extrusion in sync with the motion.
Applying this to the E question does this mean that when there is a motion element to a G1 command it does not change the 'previously used' store E feed rate?
@dc42 said in G1 Feedrate:
From this you can deduce that when switching between motion only, extrusion only, and motion+extrusion, it would be unusual not to provide an F parameter.
Yup, get that. Just looking to understand the application better so I can predict the systems behaviour in other situations.

@deckingman Yes thanks, gcode wiki is a first port of call for me. Alas it's a little incomplete and I don't fancy getting my head around the raw code at the moment!
Thanks for your email by the way, I will respond soon!

@DocTrucker said in G1 Feedrate:
This implies that as well as the 'previous used' for each channel there is also a F store too?
The only thing that is stored and relevant to this discussion is the most recentlyseen G1 F parameter (on each channel).

@dc42 does channel mean stepper channel number or axis label; X/Y/Z/U/V/W/A/B/C/D/E?

So the following should be correct now?
Feed rate set during linear motion:
G1 X10 Y10 Z10 E2 F3000 # Move to (10,10,10) with a head feed rate of 3000mm/min, # and extrude 2mm of filament at 346.41mm/min
(Calculates feed rate for E to ensure it completes in sync with the linear motion.)
Feed rate set on solo E command:
G1 E2 F60 # Feed rate of 60mm/min stored to F store & # Extrude 2mm of filament at a rate of 60mm/min G1 X10 Y10 Z10 # Feed rate of 60mm/min recalled from F store & # Move to (10,10,10) at a head movement rate of 60mm/min.
My assumption is when an extrusion feed rate is set with a G1 command containing no linear axis motion the feed rate is applied as is to following linear motions?
Feed rate set on solo E command:
G1 E2 F60 # Feed rate of 60mm/min stored to F store & # Extrude 2mm of filament at a rate of 60mm/min G1 X10 Y10 Z10 E2 # Feed rate of 60mm/min recalled from F store & # Move to (10,10,10) at a head movement rate of 60mm/min while # extruding 2mm of filament at a rate of 6.93mm/min
Feed rate set in solo and linear motion then recalled:
G1 E2 F60 # Feed rate of 60mm/min stored to F store & # Extrude 2mm of filament at a rate of 60mm/min G1 X10 Y10 Z10 F3000 # Feed rate of 3000mm/min stored to F store & # Move to (10,10,10) with a head feed rate of 3000mm/min G1 E2 # Feed rate of 3000mm/min recalled from F store & # Extrude 2mm of filament with a feed rate of 3000mm/min.

@DocTrucker said in G1 Feedrate:
So the following should be correct now?
Feed rate set during linear motion:Yes.
It gets more complicated when you have rotational as well as linear axes.

@dc42 cheers! I was just working on joining that up with the rotations. I think I understand what is going on now. Post to follow!

In summary for the F value from the last G1 command is always stored as the value requested in the gcode, despite this meaning one of three different things; linear rate of displacement for 3D movement of [XYZ] or [UVW], single axis displacement of E, or rate of rotation for [A] [B] [C] or [D]. As @dc42 states always wise to repeat F feed rate when changing between motions of [XYZ], [UVW], [ABCD], or E axis to prevent very strange behaviours.
As far as I under stand [XYZ] and [UVW] are two seperate coordinate systems that are largely treated as independent of each other, but whose motions will be coordinated if a G1 command includes one or more of [XYZ] and one or more of [UVW]. Both can be moved independently of each other. Distance travelled for [XYZ] or [UVW] is the square root of the sum of the square of distance travelled in each axis. E.g.: dist = (dx^2 + dy^2 + dz^2)^(1/2)
[ABCD] are rotational axis, and moves on these axes are also treated as separate to the other coordinate systems. I'm assuming the rotation rate is applied to the axis with the greatest travel?
[E] is an independent axis.
In terms of the literal value of F:
 While [XYZ] are present the F value relates to the motion of that head. All other motions [UVWABCDE] are timed to complete over the same time period as the [XYZ] motion.
 If no [XYZ] is present the F value relates to the motion of the [UVW] head. [ABCDE] are timed to complete over the same time period as the [UVW] motion.
 If no [XYZUVW] is present the F value relates to the angular motion of the [ABCD] joints. [E] is timed to complete over the same time period as the [ABCD] motion.
 If no [XYZUVWABCD] is present the F value relates to the single axis motion of the [E] extrusion axis.

@DocTrucker said in G1 Feedrate:
As far as I under stand [XYZ] and [UVW] are two seperate coordinate systems that are largely treated as independent of each other, but whose motions will be coordinated if a G1 command includes one or more of [XYZ] and one or more of [UVW]. Both can be moved independently of each other. Distance travelled for [XYZ] or [UVW] is the square root of the sum of the square of distance travelled in each axis. E.g.: dist = (dx^2 + dy^2 + dz^2)^(1/2)
[ABCD] are rotational axis, and moves on these axes are also treated as separate to the other coordinate systems. I'm assuming the rotation rate is applied to the axis with the greatest travel?It's not quite as simple as that. By default, UVW are treated as linear axes, and ABCD are treated as rotational axes. But in RRF 3.2 and later you can change that when you create them, using the M584 R parameter.
All linear axes are normally treated as belonging to the same coordinate system. So if you declare UVW as linear axes, and then send G1 X10 Y10 Z10 U10 V10 W10, that is treated as a move in 6dimensional space and the feed rate applied to the speed in 6dimensional space.
A further complication is that you can use the M584 S parameter to force all axes created in the command to be treated as linear for the purpose of feed rate calculations, or all treated as rotational in feed rate calculations. This was requested for OpenPnP.

@dc42 ok, I am getting there slowly...
In real terms if you have a head and following system and you want a feed rate of 60mm/sec on the XYZ motion you may need to fudge the F value of 3600 if you are moving the UVW axis too?
We are getting close to the questions on my other post which specifically addresses the rotational axis. In a nutshell I am looking for an explanation of what differences are between a rotational axis and linear. You could for example take the U axis and define the limits as 360:360 and set the steps per mm so that G1 U1 moved the U axis by one degree. That approach seems great for rotational heads that can turn a fixed number of turns on one direction or another.
I'm guessing a true rotational axis as far as you are concerned has no limits in motion? In other words; positive value = anti clockwise motion, negative = clockwise, and absolute values are to the modulus 360?
Other thread: https://forum.duet3d.com/topic/21816/rotationalaxisabclimitsbehaviour

@DocTrucker said in G1 Feedrate:
In real terms if you have a head and following system and you want a feed rate of 60mm/sec on the XYZ motion you may need to fudge the F value of 3600 if you are moving the UVW axis too?
Yes, if you are commanding X, Y, U and V in the GCode and you have declared them all as linear. No if you are only commanding X and Y, and using the M563 axis mapping feature to move U and V as well.
If you have no rotational axes, you could use the M584 S parameter to have UVW treated as rotational in the feed rate calculation, and hence not counted in the feed rate calculation when any of XYZ is moving.

@dc42 thanks. I'll mark this one as solved. To better get my head around the differences between rotational and linear axis I will need to do some sketches and will extend the other thread that I linked above.