Primary goal of the planers optimizer is to build a chain of connected boks.
The secondary goal is to plan the moves speeds as close as possible to the wanted speeds, but not faster.
Here I just take a look at the planes optimizer - presuming max junction speeds are calculated correctly and chained (current blocks max-start-speed = max-exit-speed of the previous block).
Some presumptions:
a) We can't alter a running block (executed by the stepper irq (tail))
b) If there is no planned block the machine does not move.
c) A tail block is running, if we don't prevent that.
Some consequences:
d) A first block, after a stop, starts from zero speed (or minimum speed, or minimum jerk-speed - for now thats all the same) [from c)]
e) A last block (head) ends at zero speed. [from c]
f) In case we have only one block in the buffer, after a stop, it starts and ends with zero speed. [from d and e] (filling)
g) In case we have only one block in the buffer, it always ends with zero speed. [from e] (emptying)
h) A second block always starts from zero. [from f and g] (except we hindered the first block to run - then we can replan the first one)
i) We can exclude the second block from the backward run. [from h] If we are indeed waiting for the second move to join it (filling only) (however we do it) we do mark both blocks as recalculate - and 'recalculate_trapezoids()' does its job.
Primary goal of the planers optimizer is to build a chain of connected boks. The secondary goal is to plan the moves speeds as close as possible to the wanted speeds, but not faster.
Here I just take a look at the planes optimizer - presuming max junction speeds are calculated correctly and chained (current blocks max-start-speed = max-exit-speed of the previous block).
Some presumptions: a) We can't alter a running block (executed by the stepper irq (tail)) b) If there is no planned block the machine does not move. c) A tail block is running, if we don't prevent that.
Some consequences: d) A first block, after a stop, starts from zero speed (or minimum speed, or minimum jerk-speed - for now thats all the same) [from c)] e) A last block (head) ends at zero speed. [from c] f) In case we have only one block in the buffer, after a stop, it starts and ends with zero speed. [from d and e] (filling) g) In case we have only one block in the buffer, it always ends with zero speed. [from e] (emptying)
h) A second block always starts from zero. [from f and g] (except we hindered the first block to run - then we can replan the first one) i) We can exclude the second block from the backward run. [from h] If we are indeed waiting for the second move to join it (filling only) (however we do it) we do mark both blocks as recalculate - and 'recalculate_trapezoids()' does its job.