How are multiple moves 'blended' together?
-
A conceptual question that I can't seem to find an answer for, probably because I don't know the term to be searching for! When Duet/RFF is controlling say a curve made up of multiple segments, how does one ensure these lines of G code are 'blended' together.
For example, when looking at the hundreds of lines of G code that might make up a single slice in a 3D print, if those lines were given to the Duet via DWC or the terminal, 1 by 1, the printer would obviously make each movement, then stop, then perform the next movement.
Clearly that's not how many motion control systems work, so presumably each line of G code is linked together using some sort of look ahead planner?
-
@jwilo said in How are multiple moves 'blended' together?:
What is the reasoning behind not queuing H2 flagged moves?
A G1 H2 move is an individual motor move. Because of this, after the move is complete RRF needs to re-calculate the Cartesian coordinates of the tool head before it can process a "normal" move. In theory, consecutive G1 H2 moves could be blended together; but as G1 H2 moves are only used in special situations (e.g. in homing files), it's not worth adding code to blend them.
-
Ah, 'command queuing' on this page appears to be what I'm looking for, and M595 to set the queue depth.
However, I noticed when running some simple G1 linear back and forth motion
G91
G1 X100 F5000
G1 X-200 F5000
G1 X100 F5000
G1 X100 F5000That on the second pass, the motion is stopped between the two subsequent X100 incremental moves.
Is the default queue depth zero?
-
@jwilo M595 documentation says that calling M595 alone will tell you the current queue length.
One possiblity for your pause is that the moves may have much segments and the queue lengths came to its limits. Which arises the question whether segments are counted as single queue elements or not. I don't know that.
Whether straight lines are segmented depends on the kinematics type and the move type. For kinematics with rotational axes *), a straight line is not straight from the view of the actuator, but nonlinear and needs to be segmented to be straight. With move type I means that e.g. in testing mode, moves are not segmented.
*) examples for nonlinear axes is delta, scara, polar (the rotary axis), 5 axis scara. Linear axes are CoreXY, Cartesian. The segementation has two default values, how many segments per time and how long a segment can be.
-
So in the example G-code I ran, this was not a true replication of what was causing the stops between G1s.
I have noticed, when using the H2 flag with a G1, that moves appear not to blend together, otherwise yes - I'm able to see many many lines of G code be queued up.
What is the reasoning behind not queuing H2 flagged moves?
-
@jwilo in the source code of the firmware is the comment in Move.cpp for the method MotorStepsToCartesian (the method calculates the cartesian coordinate from the current stepper positions):
// Convert motor coordinates to machine coordinates. Used after homing and after individual motor moves.
So this method is called after each individual move and probably interrupts the movement merging.
-
@jwilo Individual motor moves are in effect outside of the movement model so I think RRF basically just isolates them. It would probably help if you describe what it is you are trying to do and why you need to use H2 moves, it may be possible to achieve what you want in a different way.
-
@jwilo said in How are multiple moves 'blended' together?:
What is the reasoning behind not queuing H2 flagged moves?
A G1 H2 move is an individual motor move. Because of this, after the move is complete RRF needs to re-calculate the Cartesian coordinates of the tool head before it can process a "normal" move. In theory, consecutive G1 H2 moves could be blended together; but as G1 H2 moves are only used in special situations (e.g. in homing files), it's not worth adding code to blend them.
-
@gloomyandy said in How are multiple moves 'blended' together?:
It would probably help if you describe what it is you are trying to do and why you need to use H2 moves, it may be possible to achieve what you want in a different way.
I'm not actually trying to achieve anything per se with this question, I Just noticed this behaviour, realised I didn't know the answer and thought I probably should.
@dc42 said in How are multiple moves 'blended' together?:
it's not worth adding code to blend them.
Yes I can't see why you'd need to, it's certain only in homing files that I'm using them.
Thanks all.
-
-