Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Toolchange macro doesn't move servo

    Scheduled Pinned Locked Moved Solved
    Third-party add-ons
    2
    3
    543
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Eumldeumlundefined
      Eumldeuml
      last edited by Eumldeuml

      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! 🙂

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        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.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • Eumldeumlundefined
          Eumldeuml
          last edited by

          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! 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA