Toolchange macro doesn't move servo



  • Hello all,

    I'm currently working on a single-nozzle and single-motor dual extruder which switches filament using a RC servo.
    I got the servo to work by disabling heater 7 (M307 H7 A-1 C-1 D-1 )and using its pin for PWM to the servo. Now I can manually control the servo via gcode (M280) but it won't move when the toolchange macro commands it to move. I've doublechecked that the syntax is correct nut no error there.
    I already searched the forum, the rest of the internet and tried everything I could think of but no results 😞

    I'm using a Duet v1.04 and firmware 2.01.

    Any help is greatly appreciated! 🙂


  • administrators

    Has the printer been homed? Tool change macros are not run unless all axes are flagged as having been homed.

    If you use more than one M280 and/or M42 command to control the servo, you may need a delay (G4) command after the M280 command, so that the servo has time to see it before the next M280 or m42 command is sent.



  • Yes, the printer has been homed. It executes the macros since it retracts one filament and unretracts what would be the other filament, just the servo doesn't move.
    There are indeed two commands for the servo, one with S-1 to disable it.
    I've tried to put a pause in between those lines and now it works! Seems be that the servo was being disabled while it's on the verge of moving...
    Kinda embarrassing that the solution is so stupid simple... But thanks a lot anyways! 🙂


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.