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

    Is it possible to modify my resurrect.g ?

    Scheduled Pinned Locked Moved
    General Discussion
    3
    16
    641
    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.
    • dc42undefined
      dc42 administrators
      last edited by dc42

      @cvetantokov can you put a movement command in resurrect-prologue.g that makes the auto generated Z movement safe in all cases?

      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

      CvetanTokovundefined 1 Reply Last reply Reply Quote 0
      • CvetanTokovundefined
        CvetanTokov @T3P3Tony
        last edited by

        @t3p3tony yes , but every time it registers power falure , it creates a new resurrect.g , without the changes.

        T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
        • CvetanTokovundefined
          CvetanTokov @dc42
          last edited by

          @dc42 The problem is with the mivement of the z axis + 2 mm befero resume other axis coordinates , the the B axis start to rotate and it hits the spindle, also the problem is with tool changes, It discards all the tools and perform a tool change after that , but the tool is alredy in spindle collet , and it drops down . So i tryed to make it work with ressurect-prologue.g but there is no way.

          1 Reply Last reply Reply Quote 0
          • T3P3Tonyundefined
            T3P3Tony administrators @CvetanTokov
            last edited by

            @cvetantokov resurrect-prologue.g will be run before resurrect.g. is there no way you can use that to put the machine in a safe state to resume without having to edit resurrect.g?

            www.duet3d.com

            CvetanTokovundefined 2 Replies Last reply Reply Quote 0
            • CvetanTokovundefined
              CvetanTokov @T3P3Tony
              last edited by

              @t3p3tony No the problem is in ressurect.g, it make a tool change that drops my tool , i dont need any tool changes, and the bigger problem when it move z axis 2mm above last position the next line restore the position of all axes , and if my B axis is 180 degrees , it rotates and hits the Spindle.

              1 Reply Last reply Reply Quote 0
              • CvetanTokovundefined
                CvetanTokov @T3P3Tony
                last edited by

                @t3p3tony And also i forgot , a need to edit to be able to store my last spindle speed . Is it possible?

                T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                • T3P3Tonyundefined
                  T3P3Tony administrators @CvetanTokov
                  last edited by

                  @cvetantokov I just realised the Tool commands in resurrect.g that you posted have P0 on them so no action should be taken when they are run.

                  e.g.
                  T-1 P0
                  T2 P0
                  that should simply deselect whatever tool is selected (probably none unless you select one in your config.g)
                  and then reselect tool 2, without running any of the tool change macros.
                  Can you talk me through what is actually happening during the first 10 lines of your resurrect.g , including the call to resurrect-prologue.g

                  also what do you have in your resurrect-prologue.g?

                  www.duet3d.com

                  CvetanTokovundefined 1 Reply Last reply Reply Quote 0
                  • CvetanTokovundefined
                    CvetanTokov @T3P3Tony
                    last edited by

                    @t3p3tony This is my resurrect-prologue.g :

                    ; called to resume job after power out.
                    
                    M98 P"homeall.g"
                    G53G0A0B0
                    M42P0S0
                    M42P1S1
                    M42P2S1
                    M42P6S0
                    
                      if state.currentTool != -1
                       G53G0Z80
                       M42P5S0
                       G53G1X{global.ToolzeroXcoord}Y-27.4F5000
                       G53G1Z40F1000
                       if move.axes[2].machinePosition > 35  
                        G10P1L20 Z{global.ToolZero}; Set tool  axis offsets
                        G53G1Z40F1000
                        G30S-1
                        G10P1L20 Z{global.ToolZero}; Set tool  axis offsets
                        G53G1Z80
                        M42P5S1
                        G53G1  X0 Y0  Z80 F5000 ; go save Z
                       else
                        G53G0Z80
                        echo >"restoreToolNumber.g" "set global.currentToolNumber=-1"
                        T0P0
                        M291 S2 R"Tool Problem" P"Tool broken or missing!Please check!"
                        abort  
                        M42P6S0
                      
                    G1 R1 X0 Y0 A0 B0  ; go directly above the saved position without Z
                     
                    undefined
                    

                    The main problems with resurrect.g is line 11 "T1 P6" i have no idea why is "P6" and line 30 -this line move Z axis 2 mm above the stored position , this move is wrong it hits spindle with b axis . Here is my resurrect.g :

                    ; File "0:/gcodes/test.txt" resume print after power failure at 2021-10-14 12:36
                    G21
                    T-1 P0
                    G92 X-33.939 Y-0.670 Z8.521 A-6.975 B187.183
                    G60 S1
                    T1 P0
                    M98 P"resurrect-prologue.g"
                    M116
                    M290 X0.000 Y0.000 Z0.000 A0.000 B0.000 R0
                    T-1 P0
                    T1 P6 ------------------- this is wrong , i think it is firmware issue , if it is "T1 P0" it will be OK
                    ; Workplace coordinates
                    G10 L2 P1 X0.00 Y0.00 Z0.79 A0.00 B0.00
                    G10 L2 P2 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G10 L2 P3 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G10 L2 P4 X-115.50 Y63.50 Z80.35 A0.00 B0.00
                    G10 L2 P5 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G10 L2 P6 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G10 L2 P7 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G10 L2 P8 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G10 L2 P9 X0.00 Y0.00 Z0.00 A0.00 B0.00
                    G54
                    M106 S0.00
                    M116
                    G92 E0.00000
                    M82
                    M486 S-1
                    G17
                    M23 "0:/gcodes/test.txt"
                    M26 S7488
                    G0 F6000 Z10.521 ------------------------------------------------ this line is very bad , it always hits the spindle.
                    G0 F6000 X-33.939 Y-0.670 A-6.975 B187.183
                    G0 F6000 Z8.521
                    G1 F5310.0 P0
                    G21
                    M24
                    
                    undefined
                    

                    Here is picture of moving 2 mm above stored :
                    IMG-6139.jpg ![0_1634206565299_IMG-6139.jpg](Uploading 100%)

                    Here is executing the next line:
                    IMG-6140.jpg

                    The last position of B axis was 180 degreses, but before it starts it is at 0 degreses , Z goes 2 mm above stored position , and the returns the B axis to 180 degreses. This hits the spindle.
                    And one more in Ressurect.g there is no M3 code to start the spindle .

                    T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                    • T3P3Tonyundefined
                      T3P3Tony administrators @CvetanTokov
                      last edited by

                      @cvetantokov said in Is it possible to modify my resurrect.g ?:

                      the main problems with resurrect.g is line 11 "T1 P6

                      I have asked @dc42 about why this is happening

                      @cvetantokov said in Is it possible to modify my resurrect.g ?:

                      G0 F6000 Z10.521 ------------------------------------------------ this line is very bad , it always hits the spindle.

                      and there is no way in resurrect-prologue.g for you to move the Z axis and B axis to safe positions first, so that when the resume code runs they are safe?

                      Nore the less it looks like we need to have the option to do a lot less movement in ressurect.g ant leave most of the movement to resurect-prologue.g

                      www.duet3d.com

                      CvetanTokovundefined 1 Reply Last reply Reply Quote 0
                      • CvetanTokovundefined
                        CvetanTokov @T3P3Tony
                        last edited by

                        @t3p3tony Yes without tool changes , and without move Z axis 2 mm above the stored position , with this configuration it works perfect.When i manualy comment lines with tool changes and Z axis move above 2mm , it resurrects perfectly .

                        T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                        • T3P3Tonyundefined
                          T3P3Tony administrators @CvetanTokov
                          last edited by

                          @cvetantokov the resume process needs to place the tool at a sensible point to start the job. so in your case its not safe to go to Z+", then ro correctly orient the other axis, then to close the last of the Z gap. but that is the safe thing to do with a machine without a rotational axis. We will have to consider a general way to get the tool in the right point to start the job. It can't be set in resurrect-prologue because each start point is different.

                          www.duet3d.com

                          CvetanTokovundefined 1 Reply Last reply Reply Quote 0
                          • CvetanTokovundefined
                            CvetanTokov @T3P3Tony
                            last edited by

                            @t3p3tony So maybe first X Y coordinates, then B and A axis , and then move Z to the possition , and the it is able to be at 2 mm above stored Z.

                            1 Reply Last reply Reply Quote 0
                            • CvetanTokovundefined
                              CvetanTokov
                              last edited by

                              I manage to do it with by tricky way , i addet a "echno" command in my resurrect-prologue.g that it deletes my ressurect.g , and it worked.

                              ; called to resume job after power out.
                              
                              M98 P"homeall.g"
                              G53G0A0B0
                              M42P0S0
                              M42P1S1
                              M42P2S1
                              M42P6S0
                              
                                if state.currentTool != -1
                                 G53G0Z80
                                 M42P5S0
                                 G53G1X{global.ToolzeroXcoord}Y-27.4F5000
                                 G53G1Z40F1000
                                 G30S-1
                                 if move.axes[2].machinePosition > 35  
                                  G10P1L20 Z{global.ToolZero}; Set tool  axis offsets
                                  G53G1Z40F1000
                                  G30S-1
                                  G10P1L20 Z{global.ToolZero}; Set tool  axis offsets
                                  G53G1Z80
                                  M42P5S1
                                  G53G1  X0 Y0  Z80 F5000 ; go save Z
                              	M3S30000
                                 else
                                  G53G0Z80
                                  echo >"restoreToolNumber.g" "set global.currentToolNumber=-1"
                                  T0P0
                                  M291 S2 R"Tool Problem" P"Tool broken or missing!Please check!"
                                  abort  
                                  M42P6S0
                              echo >"resurrect.g" "G53G0Z80" ; replace resurrect.g 
                              G1 R1 X0 Y0 A0 B0  ; go directly above the saved position without Z
                              undefined
                              

                              it starts the resurrect.g , which contains the stored position , and store it by G60 S1 , then it starts the resurrect-prologue.g which makes calibration and in the end i use "echo >"resurrect.g" "G53G0Z80" ; replace resurrect.g " to replace resurrect.g , and it worked perfectly.

                              T3P3Tonyundefined 1 Reply Last reply Reply Quote 1
                              • T3P3Tonyundefined
                                T3P3Tony administrators @CvetanTokov
                                last edited by

                                @CvetanTokov related github issue:
                                https://github.com/Duet3D/RepRapFirmware/issues/620

                                T3P3 created this issue in Duet3D/RepRapFirmware

                                open Tn P6 entered in resurrect.g when it should be Tn P0 #620

                                www.duet3d.com

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