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

    Cannot turn Spindle ON using M3

    Scheduled Pinned Locked Moved Solved
    CNC
    2
    5
    803
    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.
    • T49undefined
      T49
      last edited by

      Hi,
      I am setting up a screw drive CNC and using a Duet 2 Wifi (latest FW and Workbee Controller) and BLDC (Brushless Motor Driver) to control the Spindle. The BLDC uses a 0-10V signal that controls the Spindle speed. FAN0 (on pin 20) output goes via a PWM to voltage converter to achieve the speed control.
      So far I have managed to control the Spindle speed using the M106 fan PWM controller command but I wanted to utilize the CNC printer functionality namely using M3 & M5. So I can turn the Spindle OFF Ok with M5 using below command set:
      M106 P0 I-1 H-1 A20 ; disable FAN0 & allocate tool 0 to pin 20
      M563 P0 S"Spindle" ;
      M453 S"Spindle" P20 I1 T0, Tool 0 = Spindle and invert PWM
      M5 ; Successfully turn OFF the Spindle

      Now, if I try sending an M3 command to turn the Spindle back ON it just does NOT work. The WorkBee Controller accepts the command with a green tick but nothing happens. I also noticed that F0 appears to revert to a FAN setting again.

      Any help would be appreciated.
      Cheers.

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

        You need to include an RPM parameter in the M3 command.

        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
        • T49undefined
          T49
          last edited by

          Thank you for reply dc42.
          I tried this but still no good I'm afraid.

          I did notice that if I re-send M106 P0 I-1 H-1 A20 again, it starts the Spindle (ie turns Spindle on again).

          It appears to me that FAN0 (have not tried the other servo O/P's) resets itself to a FAN once it has received
          the M5 command to stop the Spindle.
          Also tried expanding the M453 S"Spindle" P20 I1 R20000 T0 (In case the SW checks M3 spindle speed on M3 20000 due to safety but that made no difference).

          Any other suggestions?
          Cheers,

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

            Which firmware version are you using?

            Please post your complete config.g file.

            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

            T49undefined 1 Reply Last reply Reply Quote 0
            • T49undefined
              T49 @dc42
              last edited by

              @dc42 On further investigation I have discovered the (syntax) error. Sorry, my bad. I overlooked the "S" before the RMP. I have tested and M3 S20000 or M3 S10000, etc work fine. So all good now. Thanks again for your help. Cheers,

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