26 #ifndef BLOCK_BUFFER_SIZE
27 #define BLOCK_BUFFER_SIZE 36
31 #define PLAN_EMPTY_BLOCK false
32 #define PL_COND_FLAG_RAPID_MOTION bit(0)
34 #define PL_COND_FLAG_SYSTEM_MOTION bit(1)
35 #define PL_COND_FLAG_NO_FEED_OVERRIDE bit(2)
36 #define PL_COND_FLAG_INVERSE_TIME bit(3)
37 #define PL_COND_FLAG_SPINDLE_CW bit(4)
38 #define PL_COND_FLAG_SPINDLE_CCW bit(5)
39 #define PL_COND_FLAG_COOLANT_FLOOD bit(6)
40 #define PL_COND_FLAG_COOLANT_MIST bit(7)
41 #define PL_COND_MOTION_MASK (PL_COND_FLAG_RAPID_MOTION|PL_COND_FLAG_SYSTEM_MOTION|PL_COND_FLAG_NO_FEED_OVERRIDE)
42 #define PL_COND_ACCESSORY_MASK (PL_COND_FLAG_SPINDLE_CW|PL_COND_FLAG_SPINDLE_CCW|PL_COND_FLAG_COOLANT_FLOOD|PL_COND_FLAG_COOLANT_MIST)
int32_t line_number
Block line number for real-time reporting. Copied from pl_line_data.
float programmed_rate
Programmed rate of this block (mm/min).
#define N_AXIS
Axis array index values. Must start with 0 and be continuous.
plan_block_t * plan_get_current_block()
Gets the current block. Returns NULL if buffer empty.
uint8_t plan_buffer_line(float *target, plan_line_data_t *pl_data)
Add a new linear movement to the buffer. target[N_AXIS] is the signed, absolute target position...
void plan_update_velocity_profile_parameters()
Re-calculates buffered motions profile parameters upon a motion-based override change.
void plan_get_planner_mpos(float *target)
uint8_t direction_bits
The direction bit set for this block (refers to *_DIRECTION_BIT in config.h)
Planner data prototype. Must be used when passing new motions to the planner.
float spindle_speed
Desired spindle speed through line motion.
void plan_discard_current_block()
Called when the current block is no longer needed. Discards the block and makes the memory...
float plan_get_exec_block_exit_speed_sqr()
Called by step segment buffer when computing executing block velocity profile.
uint8_t condition
Block bitflag variable defining block run conditions. Copied from pl_line_data.
float entry_speed_sqr
The current planned entry speed at block junction in (mm/min)^2.
float millimeters
The remaining distance for this block to be executed in (mm).
float plan_compute_profile_nominal_speed(plan_block_t *block)
Called by main program during planner calculations and step segment buffer during initialization...
float acceleration
Axis-limit adjusted line acceleration in (mm/min^2). Does not change.
float spindle_speed
Block spindle speed. Copied from pl_line_data.
void plan_reset()
Initialize and reset the motion plan subsystem.
plan_block_t * plan_get_system_motion_block()
Gets the planner block for the special system motion cases. (Parking/Homing)
float rapid_rate
Axis-limit adjusted maximum rate for this block direction in (mm/min)
void plan_cycle_reinitialize()
Reinitialize plan with a partially completed block.
uint8_t plan_get_block_buffer_count()
Returns the number of active blocks are in the planner buffer.
float max_entry_speed_sqr
Maximum allowable entry speed based on the minimum of junction limit and.
int32_t line_number
Desired line number to report when executing.
float max_junction_speed_sqr
NOTE: This value may be altered by stepper algorithm during execution.
uint32_t step_event_count
The maximum step axis count and number of steps required to complete this block.
uint8_t plan_get_block_buffer_available()
Returns the number of available blocks are in the planner buffer.
void plan_sync_position()
Reset the planner position vector (in steps)
uint8_t plan_next_block_index(uint8_t block_index)
Called periodically by step segment buffer. Mostly used internally by planner.
uint8_t plan_check_full_buffer()
Returns the status of the block ring buffer. True, if buffer is full.
float feed_rate
Desired feed rate for line motion. Value is ignored, if rapid motion.
void plan_reset_buffer()
Reset buffer only.
uint8_t condition
Bitflag variable to indicate planner conditions. See defines above.
This struct stores a linear movement of a g-code block motion with its critical "nominal" values...
plan_line_data_t * pl_data