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

    [3.01-RC10][Duet6HC] Spindle pwm 10-90%

    Scheduled Pinned Locked Moved
    CNC
    3
    6
    358
    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.
    • Sejlundefined
      Sejl
      last edited by

      Hi,
      I was looking through g-codes, but I am not really sure my logic is ok for how to set spindle pwm to be 10% at machine start.

      My spindle VFD is Escon50/5 board that requires three digital inputs: one pwm for spindle speed, and other two for spindle CW/CCW enable signal. VFD requires pwm input to be between 10-90% at all times, otherwise reports an error.

      This is my spindle configuration in config.g:
      M950 F0 C"out9" Q100 ; create Spindle control output as Fan0 on pin out9
      M563 P0 S"Spindle" F0 ; define tool 0 - Spindle, use fan F0
      M453 S0 C"out6+out7" T0 ; set machine to CNC mode with out6 for CW and out7 for CCW spindle signal

      Provided that this configuration is ok, can I use M106 to set default PWM value in config.g?

      Thank you in advance!

      Best regards

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

        Use M3 to set the spindle RPM, not M106. However, IMO it's a bad idea to have any commands in config.g that cause any sort of motion, for safety reasons.

        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
        • Sejlundefined
          Sejl
          last edited by

          But, M3 will also trigger CW enable output? I would like just to set pwm not to turn on spindle.

          Thank you for any suggestion.

          1 Reply Last reply Reply Quote 0
          • Sejlundefined
            Sejl
            last edited by

            @dc42
            Hey, I appreciate your product and everything you have done for Duet.

            But, please, you don't have to answer forum questions if you don't have a good answer, just so you can mark them as "answered". You haven't even read my question, then you have sent some reply that is not helpful at all. And then you ignored my follow-up question.
            Please, try to act more professionally.

            Other users, if anyone can help me with this, I would very much appreciate your help.

            Best regards

            1 Reply Last reply Reply Quote 0
            • radiomodellundefined
              radiomodell
              last edited by

              As dc42 sayed, it is no good idea to run spindle from config.g

              Standard G-Code starts spindle with M3/M4 commands and S-parameter to set RPM.

              @Sejl said in [3.01-RC10][Duet6HC] Spindle pwm 10-90%:

              My spindle VFD is Escon50/5 board that requires three digital inputs: one pwm for spindle speed, and other two for spindle CW/CCW enable signal. VFD requires pwm input to be between 10-90% at all times, otherwise reports an error.

              Escon 50/5 is Maxxon Brand? If yes, did you try ESCON -Studio software to reconfigure board not to raise an error under 10% PWM when spindle is switched off?
              I used EPOS-Studio to configure similar motion control devices. Each I/O was freely configurable.

              @Sejl said in [3.01-RC10][Duet6HC] Spindle pwm 10-90%:

              M950 F0 C"out9" Q100 ; create Spindle control output as Fan0 on pin out9

              If you want to follow your solution,I would try to define "out9" as standard I/O pin, eg. P0, and assign a PWM value with M42 command.

              @Sejl said in [3.01-RC10][Duet6HC] Spindle pwm 10-90%:

              M563 P0 S"Spindle" F0 ; define tool 0 - Spindle, use fan F0

              From my experience in CNC-Mode this is used for DWC Tool display only.

              @Sejl said in [3.01-RC10][Duet6HC] Spindle pwm 10-90%:

              M453 S0 C"out6+out7" T0 ; set machine to CNC mode with out6 for CW and out7 for CCW spindle signal

              A M3 S255 command would output 100% PWM signal at "out6" , a M4 S127 commad 50% at "out7" simultaniously setting "out6" to 0%.

              My strong recommendation is to use standard commands.

              Sejlundefined 1 Reply Last reply Reply Quote 0
              • Sejlundefined
                Sejl @radiomodell
                last edited by

                @radiomodell said in [3.01-RC10][Duet6HC] Spindle pwm 10-90%:

                Thank you for your answers!!!

                As dc42 sayed, it is no good idea to run spindle from config.g

                I have no intentions to run spindle from config.g. It was only a suggestion to set pwm output to some minimum % in config.g and then spindle would have been controlled later by g-code (by turning on digital outputs, and setting new values for pwm).

                Escon 50/5 is Maxxon Brand? If yes, did you try ESCON -Studio software to reconfigure board not to raise an error under 10% PWM when spindle is switched off?
                I used EPOS-Studio to configure similar motion control devices. Each I/O was freely configurable.

                Yes! I have used ESCON-Studio software to configure spindle, but I can't seem to find where to disable error if pwm is under 10%? Although, by later examination I think this error is reset upon setting enable signal high. Not sure 100%.

                If you want to follow your solution,I would try to define "out9" as standard I/O pin, eg. P0, and assign a PWM value with M42 command.

                Ok. I would have to modify post-processor for this, but not a big deal.

                From my experience in CNC-Mode this is used for DWC Tool display only.

                Yes. This was the original intention for this line, to be able to see spindle rpm on DWC.

                M453 S0 C"out6+out7" T0 ; set machine to CNC mode with out6 for CW and out7 for CCW spindle signal

                A M3 S255 command would output 100% PWM signal at "out6" , a M4 S127 commad 50% at "out7" simultaniously setting "out6" to 0%.

                Ok, I have misunderstood g-code explanation completely on this one. Thank you for clarification.

                Thank you again for clarification!
                Best regards!

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