From 8a6d962bd4c9b2ecf9c8ad3d48435d475c313c68 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Wed, 12 Jan 2022 15:33:15 +0100 Subject: [PATCH] Separate load/unload speeds + faster Slower loading speed is necessary for precise detection of filament sensor trigger and starting rotation of the E-motor. Experimentally it turned out speeds above 80mm/s tend to cause timing issues (sometimes one can hear a crack as MMU' or the printer's drive gears slip while pushing the filament). Such a timing issue then causes blobs in purge towers. On the other hand - 80mm/s for the fast part of filament load seems not only absolutely reliable, but also very quiet. 120mm/s for unload is much louder (we may slow it down later) --- src/config/config.h | 10 +++++++--- src/logic/cut_filament.cpp | 4 ++-- src/logic/feed_to_bondtech.cpp | 2 +- src/logic/retract_from_finda.cpp | 2 +- src/logic/unload_to_finda.cpp | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/config/config.h b/src/config/config.h index 2d1bbf5..1e0b139 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -111,7 +111,11 @@ static constexpr PulleyLimits pulleyLimits = { .jerk = 4.0_mm_s, .accel = 800.0_mm_s2, }; -static constexpr U_mm_s pulleyFeedrate = 40._mm_s; + +static constexpr U_mm_s pulleyUnloadFeedrate = 120._mm_s; +/// 120mm_s is too much, the printer cannot send the status of fsensor that fast +/// and false fsensor_not_triggered errors start to occur +static constexpr U_mm_s pulleyLoadFeedrate = 80._mm_s; static constexpr U_mm_s pulleySlowFeedrate = 20._mm_s; /// End: Pulley axis configuration @@ -160,7 +164,7 @@ static constexpr U_mm selectorSlotPositions[toolCount + 1] = { // SelectorOffsetFromMin - 1.0_mm - 5 * SelectorSlotDistance ///75.5_mm - 1.0_mm - 5 * 14.0_mm = 4.5_mm }; -static constexpr U_mm_s selectorFeedrate = 30._mm_s; +static constexpr U_mm_s selectorFeedrate = 45._mm_s; /// End: Selector configuration /// Begin: Idler configuration @@ -198,7 +202,7 @@ static constexpr U_deg idlerSlotPositions[toolCount + 1] = { static constexpr U_deg idlerParkPositionDelta = -IdlerSlotDistance + 5.0_deg / 2; ///@TODO verify -static constexpr U_deg_s idlerFeedrate = 200._deg_s; +static constexpr U_deg_s idlerFeedrate = 300._deg_s; /// End: Idler configuration // TMC2130 setup diff --git a/src/logic/cut_filament.cpp b/src/logic/cut_filament.cpp index f790d52..dbaae44 100644 --- a/src/logic/cut_filament.cpp +++ b/src/logic/cut_filament.cpp @@ -60,7 +60,7 @@ bool CutFilament::StepInner() { } else { // unload back to the pulley state = ProgressCode::UnloadingToPulley; - mm::motion.PlanMove(-config::cutLength, config::pulleyFeedrate); + mm::motion.PlanMove(-config::cutLength, config::pulleyUnloadFeedrate); } } break; @@ -74,7 +74,7 @@ bool CutFilament::StepInner() { case ProgressCode::PreparingBlade: if (ms::selector.Slot() == cutSlot + 1) { state = ProgressCode::PushingFilament; - mm::motion.PlanMove(config::cutLength, config::pulleyFeedrate); // + mm::motion.PlanMove(config::cutLength, config::pulleyUnloadFeedrate); // } break; case ProgressCode::PushingFilament: diff --git a/src/logic/feed_to_bondtech.cpp b/src/logic/feed_to_bondtech.cpp index 130883b..d1890b8 100644 --- a/src/logic/feed_to_bondtech.cpp +++ b/src/logic/feed_to_bondtech.cpp @@ -35,7 +35,7 @@ bool FeedToBondtech::Step() { dbg_logic_fP(PSTR("Pulley start steps %u"), mm::motion.CurPosition(mm::Pulley)); state = PushingFilamentToFSensor; mm::motion.InitAxis(mm::Pulley); - mm::motion.PlanMove(config::defaultBowdenLength, config::pulleyFeedrate, config::pulleySlowFeedrate); + mm::motion.PlanMove(config::defaultBowdenLength, config::pulleyLoadFeedrate, config::pulleySlowFeedrate); } return false; case PushingFilamentToFSensor: diff --git a/src/logic/retract_from_finda.cpp b/src/logic/retract_from_finda.cpp index 5d321ca..651d334 100644 --- a/src/logic/retract_from_finda.cpp +++ b/src/logic/retract_from_finda.cpp @@ -22,7 +22,7 @@ bool RetractFromFinda::Step() { if (mi::idler.Engaged()) { dbg_logic_fP(PSTR("Pulley start steps %u"), mm::motion.CurPosition(mm::Pulley)); state = UnloadBackToPTFE; - mm::motion.PlanMove(-(config::cuttingEdgeToFindaMidpoint + config::cuttingEdgeRetract), config::pulleyFeedrate); + mm::motion.PlanMove(-(config::cuttingEdgeToFindaMidpoint + config::cuttingEdgeRetract), config::pulleyUnloadFeedrate); } return false; case UnloadBackToPTFE: diff --git a/src/logic/unload_to_finda.cpp b/src/logic/unload_to_finda.cpp index a25a509..c969326 100644 --- a/src/logic/unload_to_finda.cpp +++ b/src/logic/unload_to_finda.cpp @@ -36,7 +36,7 @@ bool UnloadToFinda::Step() { if (mi::idler.Engaged()) { state = WaitingForFINDA; mg::globals.SetFilamentLoaded(mg::globals.ActiveSlot(), mg::FilamentLoadState::InSelector); - mm::motion.PlanMove(-config::defaultBowdenLength - config::feedToFinda - config::filamentMinLoadedToMMU, config::pulleyFeedrate); + mm::motion.PlanMove(-config::defaultBowdenLength - config::feedToFinda - config::filamentMinLoadedToMMU, config::pulleyUnloadFeedrate); } return false; case WaitingForFINDA: