planner.cpp
Marlin v 1.0.0
重要変数
//===========================================================================
//=============================public variables ============================
//===========================================================================
unsigned long minsegmenttime;
float max_feedrate[4]; // set the max speeds
float axis_steps_per_unit[4];
unsigned long max_acceleration_units_per_sq_second[4]; // Use M201 to override by software
float minimumfeedrate;
float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all
moves. M204 SXXXX
float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the
other axis M204 TXXXX
float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
float max_z_jerk;
float max_e_jerk;
float mintravelfeedrate;
unsigned long axis_steps_per_sqr_second[NUM_AXIS]; // (NUM_AXIS=4)
// The current position of the tool in absolute steps
long position[4]; //rescaled from extern when axis_steps_per_unit are changed by gcode
static float previous_speed[4]; // Speed of previous path line segment
static float previous_nominal_speed; // Nominal speed of previous path line segment
#ifdef AUTOTEMP
float autotemp_max = 250;
float autotemp_min = 210;
float autotemp_factor = 0.1;
bool autotemp_enabled = false;
#endif
block_t block_buffer[BLOCK_BUFFER_SIZE]; // A ring buffer for motion instfructions (BLOCK_BUFFER_SIZE=16)
volatile unsigned char block_buffer_head; // Index of the next block to be pushed
volatile unsigned char block_buffer_tail; // Index of the block to process now
|
ステッパー用のカウント数がlongで宣言されているが、扱える数値の範囲は実用範囲内なのかな?巨大な装置では見直しが必要だね。といっても、そんなに巨大なものは無いだろうが。
次のブロックインデックスを返す。
直前のブロックインデックスを返す。
intersection_distance()
ブロックバッファを0に初期化し、ポジション管理用メモリーを確保、各(X,Y,Z,E)スピードを0に初期化する。
処理関数 |
概要 |
コメント |
degTargetHotend0() |
|
temperature.h |
setTargetHotend0() |
|
temperature.h |
check_axes_activity()
処理関数 |
概要 |
コメント |
disable_x() |
X軸停止処理 |
Marlin.h |
disable_y() |
Y軸停止処理 |
Marlin.h |
disable_z() |
Z軸停止処理 |
Marlin.h |
disable_e0() |
E0軸停止処理 |
Marlin.h |
disable_e1() |
E1軸停止処理 |
Marlin.h |
disable_e2() |
E2軸停止処理 |
Marlin.h |
analogWrite() |
指定したピンからアナログ値(PWM波)を出力 |
Arduino |
getHighESpeed() |
|
|
実際の直線補間に採用される座標は、各ステッピングモーターの動作最小整数(マイクロステップ動作)単位に丸められる。
つまり、XYで0.01mm前後でしか動作しない。
plan_set_position()
plan_set_e_position()
movesplanned()
allow_cold_extrudes()
reset_acceleration_rates()