Data Fields |
unsigned int | id |
| Unique number to identify this block.
|
uint32_t | nb_steps |
| Total number of linear steps to take to execute this block.
|
uint32_t | nb_steps_completed |
| Number of linear steps of this block that have been executed so far.
|
steps_t | steps [NUM_AXES] |
| Total number of stepper motor steps to take for each axis.
|
void(* | collision_handler )(uint8_t) |
| Pointer to a function which will be called if one of the end stop switches is hit while executing this block.
|
fxp16u16_t | timer_ticks |
| The number of timer ticks to wait in between linear steps.
|
fxp16u16_t | plateau_timer_ticks |
| The number of timer ticks to wait in between linear steps when the block execution is at its plateau (its maximum speed).
|
fxp16u16_t | exit_timer_ticks |
| The number of timer ticks to wait in between linear steps at the end of the block execution (at the end of deceleration).
|
uint16_t | acceleration_step |
| Indicates the current position on the linear acceleration ramp which starts at speed 0 and linearly accelerates according to a constant acceleration.
|
uint16_t | acceleration_end |
| Linear step number at which to stop accelerating.
|
uint32_t | deceleration_start |
| Linear step number at which to start decelerating.
|
float | distance_mm |
| Distance in millimeters of the movement represented by this block.
|
float | mm_ticks_per_step_min |
| Average distance in millimeters traveled by each linear step, multiplied by the RTTIMER_TICKS_PER_MIN constant.
|
float | direction [NUM_AXES] |
| Four-dimensional unit direction vector (containing the direction cosines for each axis) of the movement represented by this block.
|
speed_t | plateau_speed |
| The speed in mm/min when the block execution is at its plateau (its maximum speed).
|
speed_t | entry_speed |
| Entry speed in mm/min at the start of the block execution (at the start of acceleration).
|
speed_t | max_entry_speed |
| Entry speed in mm/min at the end of the block execution (at the end of deceleration).
|
bool | plateau_speed_always_reachable |
| Flag set and used by the lookahead component, indicating whether this block is long enough to be able to reach its plateau speed for sure.
|
bool | recalculate |
| Flag set and used by the lookahead component, to indicate that the entry_speed field of this block was changed and that the timer and acceleration fields need to be updated accordingly.
|
Data structure which represents a straight line to be printed.
The planner component creates blocks based on g-code commands sent by the host. These block are placed into a queue, which is read in a different thread by the block handler component. The block handler is component that actually executes blocks.
A block's speed vs time plot is always shaped like a trapezoid:
speed ^
|
plateau speed --|---> +--------+
| / \
entry speed --|-> + \
| | + <-- exit speed = next block's
| +-------------+ entry speed
|______________________
time -->
The acceleration and deceleration segments always have the same slope magnitude, as configured by the ACCELERATION configuration value.
Definition at line 64 of file block.h.