Inactive tool spindle speed update only works once
-
Updating the speed of a spindle that is not the currently active tool seems to work only once.
T0 M3 P1 S200 ; works M3 P1 S500 ; does not work
If we set the active tool with T1 it works.
When we try to change it through M4 it works but again only once:
T0 M3 P1 S200 ; works M4 P1 S500 ; works M4 P1 S1000 ; does not work M3 P1 S1000 ; works
Is this the expected behavior, and if so what is the reason?
We checked the code and it seems to come from these lines:
https://github.com/Duet3D/RepRapFirmware/blob/1194bf3d4867a844fe442cfc7d1500d933521467/src/GCodes/GCodes2.cpp#L583-L586
And especially this one where the rpm is updated if there is a state change
https://github.com/Duet3D/RepRapFirmware/blob/1194bf3d4867a844fe442cfc7d1500d933521467/src/Tools/Spindle.cpp#L134-L141 -
@svp_vub which version of RRF are you running? I cant see this is expected behaviour.
-
@svp_vub I confirm this is a bug. We will fix it in 3.5beta3 and probably also in 3.4.6.
-
@dc42 ok thanks a lot! Out of curiosity, do you already know what will become the expected behavior? Will we be able to update the spindle speed if it is not the currently active tool?
-
@svp_vub yes you will.