Treat M569.4 (set torque) like a movement command
-
Hi all,
When changing the torque of a driver in torque mode via M569.4 the change doesn't happen immediately (or in sync with other queued Gcode). I suppose this is because G0-G4 are stored in a seperate movement queue. For example:G1 X147.351 Y89.291 F9000 M569.4 P21.0 T-0.3 G1 E-1 F4200
This should move to a coordinate, then apply a negative torque, then do a retraction. Often the retraction happens before the negative torque is applied.
I think the M569.4 should be treated like the other queued movement commands (maybe there could even be a dedicated Gcode for it, G6 for example)
-
@nikscha I found a workaround for now, by inserting a G4 just before the M569.4.
Note that a supposedly equivalent M400 introduces stutters. -
@nikscha said in Treat M569.4 (set torque) like a movement command:
This should move to a coordinate, then apply a negative torque, then do a retraction.
RRF needs to know for how long the negative torque is to be applied. So after the M569.4 command you should use a G4 delay command. For example, G4 S5 would apply the torque for 5 seconds plus the small delay that occurs before starting a move when the movement queue is empty.
Commanding a normal move cancels torque mode. I see that the documention does not mention this; I will correct it.
-
@dc42 I should have clarified this better: I'm not trying to put the extruder motor into torque mode but a different driver (U axis). The whole gcode snipped would look closer to this:
G1 X147.351 Y89.291 F9000 ;move to coordinate M569.4 P21.0 T-0.3 ; apply negative torque on U axis G1 E-1 F4200 ; retract while negative torque is applied M569.4 P21.0 T0.5 ; apply positive torque on U axis ...continue printing with positive torque applied
At the moment I need to prefix every torque change with G4 to synchronise the change in torque and the retraction.
-
@nikscha it should be sufficient to use M400 immediately before each M569.4 command, to wait for the previous movement command to finish.
-
@dc42 I tried that but M400 introduces a weird stutter:
Same gcode, left one uses G4 before M569.4, right one uses M400