MKFirmware / MK4duo

MK4duo Firmware Printers 3D for Arduino and Arduino due
http://www.marlinkimbra.it
GNU General Public License v3.0
206 stars 117 forks source link

Linear Advance Error only on T1 (Second extruder) #755

Open c3D-Dan opened 4 years ago

c3D-Dan commented 4 years ago

Using 4.3.9

Linear advance works fine on T0, but when I switch to T1, I get a bunch of errors : 20:38:48.293 : Acceleration limited. 20:38:48.293 : More than 2 steps per eISR loop executed.

This results on the printer ignoring all print acceleration moves. When I switch back to T0, the problem disappears.

Before printing i run M502 and M500

Im setting the E Jerk and Linear advance with this. M205 E30 M900 K2.5

Both extruders have exactly the same E-Jerk, Steps_per_mm, Max Acceleraton etc.

Basically, the extruders are configured identically. Why is the Acceleration Limited message only occurring on T1 and not on T0?

I have a funny feeling T1 is not seeing the M205 command and or #define DEFAULT_EJERK {30,30,30,30,30,30}

c3D-Dan commented 4 years ago

So did some digging and found that EJERK is zero when Lin_advance is used AND the selected extruder is anything other than T0. As a temporary work around, I changed the DEFAULT_EJERK definition to a an floating number instead of an array and changed planner.cpp to use this figure in the calculation. It seems that Lin advance and M205 hasn’t been updated to reflect the use of an array in the DEFAULT_EJERK definition. I’ll post a pull request when some more testing has been completed. This means that a single k factor value is used in DEFAULT_EJERK in the configuration file, it also means that M205 command needs to be issued before each tool change to set the new k factor for the new tool.