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

    Pause.g and Resume.g with VFD Router Spindle.

    Scheduled Pinned Locked Moved
    CNC
    5
    20
    1.0k
    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.
    • A Former User?
      A Former User
      last edited by

      Surely with the conditional code and object model we must be getting close to making this possible through rs485/modbus?

      1 Reply Last reply Reply Quote 0
      • EducatingSavvasundefined
        EducatingSavvas @jlipavsky79
        last edited by

        @jlipavsky79 Not really. I found some work around where during a pause I sent a M42 P2 S0 to turn off the spindle enable command, but didn't send a M5 to turn off the PWM signal. I'm in the process of updating to RRF3 on a test rig so hopefully I'll test this again and see if there's any differences.

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by

          When you get to RepRap firmware R3, you can "capture" the PWM from the object model in pause, turn it off in pause, and then re-establish it in resume.

          The clean way to do that is a global variable. These are not shipping, yet, in RRF3. HOWEVER... there are unused 'harmless' spots that can be updated in the object model. So those can be used, right now today, to accomplish the same goal.

          RRF2 to 3 conversion is a fair amount of work and learning... yet... you could deal with VFD freq today in an OK way, and make it even cleaner when variables ship (which is pretty soon, per David).

          Delta / Kossel printer fanatic

          EducatingSavvasundefined 1 Reply Last reply Reply Quote 1
          • EducatingSavvasundefined
            EducatingSavvas @Danal
            last edited by

            @Danal Thanks Danal for the pointers - I've just finished converting my config.g and associated files to work with RRF3 and it's behaving as I had previous left it. I'd like to now learn how to implement some of the new features but it's like you say it's a sharp learning curve. Where do I start?

            I'm guessing here: https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Using_conditional_GCode_commands_in_bed_g_to_calibrate_a_delta_printer

            Does this mean we'd be able to eventually write scripts which can process g-code in real time? For example to enable a 4th or 5th axis for following vectors angles for a tangential knife cutter?

            Cheers, Savvas

            Danalundefined 1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal @EducatingSavvas
              last edited by

              @EducatingSavvas said in Pause.g and Resume.g with VFD Router Spindle.:

              Does this mean we'd be able to eventually write scripts which can process g-code in real time?

              Yes.

              I'd phrase it as "actions that occur interleaved with G-Code statements as they complete", but I think we are saying almost the same thing.

              Delta / Kossel printer fanatic

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

                Currently the spindle speed is usually not saved in restore point #1 when you pause the print. I will try to fix that in the next 3.01RC. Meanwhile the following may work, but I have not tested it:

                • At the start of pause.g use G60 S0 to save the spindle speed in restore point #0. After that you can turn the spindle off.
                • In restore.g use M3 R0 to restore the spindle speed, then a G4 command to allow the speed to be reached.

                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

                EducatingSavvasundefined 1 Reply Last reply Reply Quote 1
                • EducatingSavvasundefined
                  EducatingSavvas @dc42
                  last edited by

                  @dc42 Thanks that worked. For reference my pause.g file now looks like:

                  G60 S0 ; Save Spindle Speed
                  G91 ; Relative positioning
                  G1 Z5 F500 ; Slowly move z axis to safe location clearing material
                  G90 ; Absolute positioning
                  M5 ; Turn off Spindle PWM
                  M42 P0 S0 ; Turn off spindle enable
                  M117 Turning off and Raising spindle ;Display message
                  G4 p1000 ; Dwell while spindle slows to stop
                  G53 G1 F1000 Z-1 ; move z axis to safe z

                  and resume.g like:
                  M3 R0 ; Turn on PWM
                  M42 P0 S1 ; Turn on spindle enable
                  G4 P4000 ; Dwell
                  M291 P"STAND CLEAR! Job Resuming." R"Warning" S2 ; Display message and wait prompt

                  EducatingSavvasundefined 1 Reply Last reply Reply Quote 0
                  • EducatingSavvasundefined
                    EducatingSavvas @Danal
                    last edited by

                    @Danal said in Pause.g and Resume.g with VFD Router Spindle.:

                    interleaved

                    So much to learn... so little space in my head.

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

                      I've put a fix in the firmware source so that in future the spindle speed will be saved in restore point 1 along with the other parameters when you pause.

                      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 1
                      • EducatingSavvasundefined
                        EducatingSavvas @EducatingSavvas
                        last edited by

                        @EducatingSavvas In RRF3.01 RC6 you can now remove the line G60 S0 ; Save Spindle Speed from the pause.g file and change M3 R0 to M3 R1; Turn on PWM in the resume.g file.

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