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

    Tool Change: Moving in axis without calling them

    Scheduled Pinned Locked Moved
    Beta Firmware
    3
    46
    2.1k
    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.
    • Danalundefined
      Danal
      last edited by

      @smoki3 said in Tool Change: Moving in axis without calling them:

      and the user must mention any axes that he wants restored

      Very interesting. I will keep that in mind as I research this further.

      When you go back to 2.02 there you see you dont have this movements.

      I can't run any version of 2; I am on Duet 3 hardware.

      Delta / Kossel printer fanatic

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

        @smoki3 said in Tool Change: Moving in axis without calling them:

        @smoki3 said in Tool Change: Moving in axis without calling them:

        @Danal
        no they are not coded. Just the lift of the nozzle before the tool change starts. Anything else is due to the fact that there is an issue after the tfree.g script with calculating the position.

        If you do a T-1 and then a T1 you get a different behaviour. Then you dont have the Z-movement even though are running exactly the same scripts.

        When you go back to 2.02 there you see you dont have this movements.

        I found this comment in the GCodes.cpp, which sound a bit like this bug @dc42

        else if (rp != nullptr)
        			{
        				currentUserPosition[axis] = moveArg + rp->moveCoords[axis];
        				// When a restore point is being used (G1 R parameter) then we used to set any coordinates that were not mentioned to the restore point values.
        				// But that causes issues for tool change on IDEX machines because we end up restoring the U axis when we shouldn't.
        				// So we no longer do that, and the user must mention any axes that he wants restored e.g. G1 R2 X0 Y0.
        			}
        

        That change was introduced way back in firmware 1.19.

        @Danal said in Tool Change: Moving in axis without calling them:

        @smoki3 said in Tool Change: Moving in axis without calling them:

        and the user must mention any axes that he wants restored

        Very interesting. I will keep that in mind as I research this further.

        When you go back to 2.02 there you see you dont have this movements.

        I can't run any version of 2; I am on Duet 3 hardware.

        I think the change in behaviour must be connected with this change, in the upgrade notes for 2.03:

        Tool changers, IDEX printers and similar using tfree#.g and tpost#.g files: tool offsets are now applied within the tfree#.g and tpost#.g macros (but not in the tpre#.g file because no tool is selected at that point).

        Perhaps there is a G1 command in the tfree or tpost file that needs to be corrected for tool offset, or else a G53 prefix added?

        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

        smoki3undefined 2 Replies Last reply Reply Quote 0
        • smoki3undefined
          smoki3 @dc42
          last edited by smoki3

          @dc42

          No I don't think so!

          I actually investigating:

          So frist my config:

          ; Configuration file for Duet WiFi (firmware version 1.21)
          ; executed by the firmware on start-up
          ;
          ; generated by RepRapFirmware Configuration Tool on Wed Sep 19 2018 21:12:53 GMT+0200 (Mitteleuropäische Sommerzeit)
          
          ; General preferences
          G90                                                ; Send absolute coordinates...
          M83                                                ; ...but relative extruder moves
          
          ; Network
          M550 PCoreXY                                   	   ; Set machine name
          M552 S1                                        	   ; Enable network
          M586 P0 S1                                         ; Enable HTTP
          M586 P1 S0                                         ; Disable FTP
          M586 P2 S0                                         ; Disable Telnet
          
          ; Drives
          M584 X0 Y1 Z2 E3:4:5:6 U7                          		; Map Drives to Axis
          M669 K1                                            		; Select CoreXY mode
          M569 P0 S0                                         		; Drive 0 goes forwards
          M569 P1 S0                                         		; Drive 1 goes forwards
          M569 P2 S1                                         		; Drive 2 goes forwards
          M569 P3 S0                                         		; Drive 3 goes forwards
          M569 P4 S0                                         		; Drive 4 goes forwards
          M569 P5 S0                                         		; Drive 5 goes forwards
          M569 P6 S0                                         		; Drive 6 goes forwards
          M569 P7 S0                                        		; Drive 7 goes forwards
          M350 X16 Y16 Z16 E16:16:16:16 I1                   		; Configure microstepping with interpolation
          M350 U8 I0					   		; Configure microstepping without interpolation
          M92 X100 Y100 Z1600 U100 E460:460:460:460          		; Set steps per mm
          M566 X600 Y600 Z18 U2 E100:100:100:100         		   		; Set maximum instantaneous speed changes (mm/min)
          M203 X35000 Y35000 Z1200 U25000 E5000:5000:5000:5000    	; Set maximum speeds (mm/min)
          M201 X6000 Y6000 Z400 U500 E2500:2500:2500:2500         	; Set accelerations (mm/s^2)
          M906 X1650 Y1650 Z1100 U200 E1450:1450:1450:1450 I30    	; Set motor currents (mA) and motor idle factor in per cent
          M84 S120                                           		; Set idle timeout
          
          ; Axis Limits
          M208 X-13.5 Y-56 Z0 U0 S1                          		; Set axis minima
          M208 X316 Y202 Z270.20 U500 S0                     		; Set axis maxima
          
          ; Thermal Sensors
          M308 S0 P"bedtemp" Y"thermistor" T100000 B3950                   	; Set thermistor + ADC parameters for heater 0
          M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.060000e-8       	; Set thermistor + ADC parameters for heater 1
          M308 S2 P"e1temp" Y"thermistor" T100000 B4725 C7.060000e-8       	; Set thermistor + ADC parameters for heater 2
          M308 S3 P"e2temp" Y"thermistor" T100000 B4725 C7.060000e-8      	; Set thermistor + ADC parameters for heater 3
          M308 S4 P"e3temp" Y"thermistor" T100000 B4725 C7.060000e-8      	; Set thermistor + ADC parameters for heater 4
          
          ; Hardware
          M950 H0 C"bedheat" T0
          M950 H1 C"e0heat" T1
          M950 H2 C"e1heat" T2
          M950 H3 C"!exp.heater3" T3
          M950 H4 C"!exp.heater4" T4
          M950 F3 C"duex.fan3"
          M950 F4 C"duex.fan4"
          M950 F5 C"duex.fan5"
          M950 F6 C"duex.fan6"
          M950 F7 C"duex.fan7"
          M950 F8 C"duex.fan8"
          
          ; Max Temp Protection
          M143 H0 S140                                   ; Set temperature limit for heater 0 to 140C
          M143 H1 S270                                   ; Set temperature limit for heater 1 to 270C
          M143 H2 S270                                   ; Set temperature limit for heater 2 to 270C
          M143 H3 S270                                   ; Set temperature limit for heater 3 to 270C
          M143 H4 S270                                   ; Set temperature limit for heater 4 to 270C
          
          ; Fanmapping
          M106 P0 S0 I0 F500 H-1 C"Tool 0"               ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
          M106 P3 S0 I0 F500 H-1 C"Tool 1"               ; Set fan 3 value, PWM signal inversion and frequency. Thermostatic control is turned off
          M106 P7 S0 I0 F500 H-1 C"Tool 2"               ; Set fan 7 value, PWM signal inversion and frequency. Thermostatic control is turned off
          M106 P5 S0 I0 F500 H-1 C"Tool 3"               ; Set fan 5 value, PWM signal inversion and frequency. Thermostatic control is turned off
          M106 P1 S1 I0 F500 H1 T55                      ; Set fan 1 value for Tool 0, PWM signal inversion and frequency. Thermostatic control is turned on
          M106 P4 S1 I0 F500 H2 T55                      ; Set fan 2 value for Tool 1, PWM signal inversion and frequency. Thermostatic control is turned on
          M106 P6 S1 I0 F500 H3 T55                      ; Set fan 6 value for Tool 2, PWM signal inversion and frequency. Thermostatic control is turned on
          M106 P8 S1 I0 F500 H4 T55                      ; Set fan 8 value for Tool 4, PWM signal inversion and frequency. Thermostatic control is turned on
          
          ; Endstops
          M915 X Y S5 H350 F0 R0           	       ; Set Stall detection sensitivity
          M915 U S5 H200 F0 R0			       ; Coupler
          M574 Y1 S3                                     ; Set endstops controlled by motor load detection
          M574 X1 S3                                     ; Set endstops controlled by motor load detection
          M574 U0                                        ; Set endstops controlled by motor load detection
          
          ; Z-Probe
          M574 Z0 C"nil" 		                       ; no Z endstop switch, free up Z endstop input
          M558 P5 C"!zstop" H3 F180 T25000	       ; Z probe connected to Z endstop input
          G31 X0 Y0 Z0.00 P500          	               ; Set Z probe offset + naher ran - weiter weg
          M557 X5:295 Y0:190 S48.33:47.5                 ; Define mesh grid
          
          ; Tools
          M563 P0 D0 H1 F0                               ; Define tool 0, Fan 0
          M563 P1 D1 H2 F3                               ; Define tool 1, Fan 3
          M563 P2 D2 H3 F7                               ; Define tool 2, Fan 7
          M563 P3 D3 H4 F5                               ; Define tool 3, Fan 5
          
          ; PID Settings Tools
          M307 H1 A595.9 C199.5 D4.5 S1.00 V24.1 B0      ; Set PID settings tool 0
          M307 H2 A775.0 C252.4 D8.2 S1.00 V24.1 B0      ; Set PID settings tool 1
          M307 H3 A716.5 C237.1 D8.7 S1.00 V24.1 B0      ; Set PID settings tool 2
          M307 H4 A567.7 C241.0 D6.7 S0.80 V24.1 B0      ; Set PID settings tool 3
          M307 H0 A181.4 C631.5 D4.9 S1.00 V24.1 B0      ; Bed PID Settings
          
          ; Tooloffset
          ;G10 P0 X0.00 Y34.50 Z-15.84                    ; Set tool 0 axis offsets
          ;G10 P1 X0.55 Y34.50 Z-15.83                    ; Set tool 1 axis offsets
          ;G10 P2 X0.16 Y34.50 Z-15.85                    ; Set tool 2 axis offsets
          ;G10 P3 X0.25 Y34.50 Z-15.70                    ; Set tool 3 axis offsets
          M98 Ptooloffset.g
          
          ; Tools Temperatures
          G10 P0 R0 S0                                   ; Set initial tool 0 active and standby temperatures to 0C
          G10 P1 R0 S0                                   ; Set initial tool 1 active and standby temperatures to 0C
          G10 P2 R0 S0                                   ; Set initial tool 2 active and standby temperatures to 0C
          G10 P3 R0 S0                                   ; Set initial tool 3 active and standby temperatures to 0C
          
          ; LED Strip
          M950 F2 C"nil"				       ; Free fan 2 pin
          M950 P2 C"fan2"				       ; create GPIO pin 2 attached to fan 2
          M42 P2 S30				       ; Turn LEDs on 30% PWM
          
          ; Calibrate MCU Temperature
          M912 P0 S-8
          
          ; DAA
          M593 F80
          
          ; Load config override
          M501
          

          Then I created a simple tpre.g (same for T0 and T1, just X0 for T0 and X50 for T1):

          ; tpre0.g
          ; called before tool 0 is selected
          
          
          G1 X0 F5000
          M400
          M98 P"/macros/Toolhead/1. Toolhead unlock"
          G4 P400
          
          G1 Y110 F5000
          M400
          
          M98 P"/macros/Toolhead/2. Toolhead lock"
          G4 P260
          
          G1 Y100 F5000
          

          Then the tfree.g (same X0 for T0 and X1 for T1):

          ; tfree0.g
          ; called when tool 0 is freed
          
          G91
          G1 Z10 F7200
          G90
          
          
          G53 G1 X0 F5000 ;XPOS
          G53 G1 Y110
          M400
          M98 P"/macros/Toolhead/1. Toolhead unlock"
          G4 P320
          G53 G1 Y100 F5000
          M400
          

          tpost.g is completely empty for both.

          the tool offsets are defines as followed:

          ; Tooloffset
          G10 P0 X20.00 Y15 Z-12.0                    ; Set tool 0 axis offsets
          G10 P1 X20.00 Y15 Z-12.0                   ; Set tool 1 axis offsets
          
          1 Reply Last reply Reply Quote 0
          • smoki3undefined
            smoki3 @dc42
            last edited by smoki3

            @dc42

            I made some videos:

            First I have just clicked on T0 to pick it up:

            https://photos.app.goo.gl/ipCKj1bHJ15dw8NKA

            After this I picked up T1 by clicking on it in DWC:

            https://photos.app.goo.gl/yqMHUWQt5n7gYiPX6

            Last on I deactivated T1 by click again on T1 in DWC:

            https://photos.app.goo.gl/Nnn5NxX9C4Ph9WFx5

            So do you see this wired diagonal move with XY axis and Z Axis in the second video?

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

              I understand why offsets are/aren't applied. They correlate to the "what tool number is currently mounted" status of the printer.

              Therefore, I have G53 in front of the vast majority of the moves, because those moves need to deal with the parking posts in absolute terms.

              I'll see if I can reproduce what happens in the above vids.

              Delta / Kossel printer fanatic

              smoki3undefined 1 Reply Last reply Reply Quote 0
              • smoki3undefined
                smoki3 @Danal
                last edited by

                @Danal said in Tool Change: Moving in axis without calling them:

                I understand why offsets are/aren't applied. They correlate to the "what tool number is currently mounted" status of the printer.

                Therefore, I have G53 in front of the vast majority of the moves, because those moves need to deal with the parking posts in absolute terms.

                I'll see if I can reproduce what happens in the above vids.

                As you can see in my tpre script I also have G53 in front of every move. That this diagonal move does not exist in the script and only happens if you directly move from T0 to T1 if you do a T0 → T-1 → T1 it does not happen.

                But I am not able to see at which coordinates. this diagonal move ends

                1 Reply Last reply Reply Quote 0
                • smoki3undefined
                  smoki3
                  last edited by

                  So I adjusted the tool offset not to this:

                  ; Tooloffset
                  G10 P0 X0.00 Y50 Z0.0                    ; Set tool 0 axis offsets
                  G10 P1 X0.00 Y0 Z0.0                   ; Set tool 1 axis offsets
                  

                  Then it looks like this:

                  https://photos.app.goo.gl/MzJ7iRV5FMb3namx7

                  As you can see the printer is moving diagonal 50mm in X axis (from the tpre.g) and Y axis (from removing the tool offset). The Z movement is gone because there is not Z tool offset defined.

                  Normaly it should just release T0 and move just 50mm in X axis as defined in the tpre script.

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

                    Please try the firmware at https://www.dropbox.com/sh/3azy1njy3ayjsbp/AACquxr2m00eV568RZg5QG5wa?dl=0. Running the Duet 2 version of this firmware on my tool changer, I don't see any diagonal moves, where as I did when running RRF 2.

                    Note, currently you cannot downgrade from this firmware via Duet Web Control when running with an attached SBC. That will be fixed shortly. Meanwhile, you can downgrade by running in standalone mode or by using Bossa.

                    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

                    smoki3undefined 2 Replies Last reply Reply Quote 0
                    • smoki3undefined
                      smoki3 @dc42
                      last edited by

                      @dc42 said in Tool Change: Moving in axis without calling them:

                      Please try the firmware at https://www.dropbox.com/sh/3azy1njy3ayjsbp/AACquxr2m00eV568RZg5QG5wa?dl=0. Running the Duet 2 version of this firmware on my tool changer, I don't see any diagonal moves, where as I did when running RRF 2.

                      Note, currently you cannot downgrade from this firmware via Duet Web Control when running with an attached SBC. That will be fixed shortly. Meanwhile, you can downgrade by running in standalone mode or by using Bossa.

                      The videos from above already with RRF3. This problem exists since 2.3 equal to RRF. With the tool changer scripts from E3D they bypass this bug because of calling X and Y axis in the first move of the tpre script. But there you can still see the Z axis movement during the first tpre move

                      1 Reply Last reply Reply Quote 0
                      • smoki3undefined
                        smoki3 @dc42
                        last edited by smoki3

                        @dc42

                        So tested it again now. It happens exactly the same as you can see on post 25.

                        If I move the whole tpre script to the tpost and add G53 in front of every G1 then it works fine.

                        The problem is: The not called axes are moving exactly the distance of the tool offset from the cleared tool instead of just update the coordinates for the not called axes and just move the called axis.

                        There were the changes in 2.03:

                        May 25th:

                        • Restore points (created by G60 and created automatically at the start of a pause or a tool change) now have their coordinates stored independently of any workplace offsets. So if you create a restore point and then change the workplace offsets, when you go back to the restore point it will go back to the same machine position regardless of the change in workplace offsets.

                        and this March 3rd:

                        -- Tool changers, IDEX printers and similar using tpre#.g and tpost#.g files: tool offsets are now applied within the tpre#.g and tpost#.g macros.

                        I assume that one of these leads to the bug.

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

                          @smoki3 said in Tool Change: Moving in axis without calling them:

                          So tested it again now. It happens exactly the same as you can see on post 25.

                          Is that with the RRF3 binary that I linked to, with build date yesterday?

                          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

                          smoki3undefined 2 Replies Last reply Reply Quote 0
                          • smoki3undefined
                            smoki3 @dc42
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • smoki3undefined
                              smoki3 @dc42
                              last edited by

                              @dc42 said in Tool Change: Moving in axis without calling them:

                              @smoki3 said in Tool Change: Moving in axis without calling them:

                              So tested it again now. It happens exactly the same as you can see on post 25.

                              Is that with the RRF3 binary that I linked to, with build date yesterday?

                              Yes, downloaded it today and tested it 10 mins ago.

                              Build:
                              RepRapFirmware for Duet 2 WiFi/Ethernet 3.0RC1 (2019-12-14b5)

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

                                I am trying to get setup to test this with your exact files (except for absolute coordinates of the tool parking, of course).

                                More later today...

                                Delta / Kossel printer fanatic

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

                                  Running:

                                  Board: Duet 3 MB6HC (MB6HC)
                                  DSF Version: 1.1.0.5
                                  Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.0beta12+1 (2019-12-02b2)

                                  I backed up all my pre/post/free files and copied yours in exactly. I set a Y tool1 offset of 25.

                                  I do not see any diagonal moves occur. T0 T1, T0 T-1 T1, no sequence I've tried produces a diagonal move.

                                  I DO see the final Y coordinate displayed in DWC for T1 jump from 100 to 125, when the T1 sequence ends.

                                  Delta / Kossel printer fanatic

                                  smoki3undefined 1 Reply Last reply Reply Quote 0
                                  • smoki3undefined
                                    smoki3 @Danal
                                    last edited by smoki3

                                    @Danal said in Tool Change: Moving in axis without calling them:

                                    Running:

                                    Board: Duet 3 MB6HC (MB6HC)
                                    DSF Version: 1.1.0.5
                                    Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.0beta12+1 (2019-12-02b2)

                                    I backed up all my pre/post/free files and copied yours in exactly. I set a Y tool1 offset of 25.

                                    I do not see any diagonal moves occur. T0 T1, T0 T-1 T1, no sequence I've tried produces a diagonal move.

                                    I DO see the final Y coordinate displayed in DWC for T1 jump from 100 to 125, when the T1 sequence ends.

                                    You have to set the tool offset for T0. Best you try it to set the offset for both tool in all 3 axis. It's always from the tool which is clear.

                                    I don't think the movement calculation is different for duet 3 and duet 2.

                                    Here the issue exists and on all the tool changer videos on YouTube you see it as well (moving z axis after tfree)

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

                                      I will give that a try. I'll just copy your tool offsets exactly.

                                      Delta / Kossel printer fanatic

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

                                        OK, I have reproduced the diagonal move.

                                        Interestingly enough, I then put messages (m117) and delays (G4) in the tpre1.g file... and the diagonal move WENT AWAY. Very, very, odd.

                                        At this moment, I'm experimenting with delays and similar to find out exactly which command causes the diagonal move.

                                        Delta / Kossel printer fanatic

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

                                          OK, to summarize: With exact copies of @smoki3 files, including the pre/post/free and the tool offset, the diagonal move is reproduced on my machine. Which is a CoreXY running:

                                          Board: Duet 3 MB6HC (MB6HC)
                                          DSF Version: 1.1.0.5
                                          Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.0beta12+1 (2019-12-02b2)

                                          With all XYZ on the main board, only tools on the expander boards.

                                          Some experimentation also shows:

                                          • A delay, such as G4 S1, positioned before any other commands in tpre1.g, stops the diagonal.

                                          • An M400, positioned before any other commands in tpre1.g, stops the diagonal. Note that I removed all the other M400s.

                                          • G53 in front of all move commands in tpre1.g has no effect, the diagonal still occurs.

                                          Given that this appears to be timing sensitive, it begins to make more sense why exact copies of the files are needed to reproduce.

                                          Anyway, I hope this helps dc42 figure out what's going on.

                                          Delta / Kossel printer fanatic

                                          smoki3undefined 1 Reply Last reply Reply Quote 0
                                          • smoki3undefined
                                            smoki3 @Danal
                                            last edited by

                                            @Danal said in Tool Change: Moving in axis without calling them:

                                            OK, to summarize: With exact copies of @smoki3 files, including the pre/post/free and the tool offset, the diagonal move is reproduced on my machine. Which is a CoreXY running:

                                            Board: Duet 3 MB6HC (MB6HC)
                                            DSF Version: 1.1.0.5
                                            Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.0beta12+1 (2019-12-02b2)

                                            With all XYZ on the main board, only tools on the expander boards.

                                            Some experimentation also shows:

                                            • A delay, such as G4 S1, positioned before any other commands in tpre1.g, stops the diagonal.

                                            • An M400, positioned before any other commands in tpre1.g, stops the diagonal. Note that I removed all the other M400s.

                                            • G53 in front of all move commands in tpre1.g has no effect, the diagonal still occurs.

                                            Given that this appears to be timing sensitive, it begins to make more sense why exact copies of the files are needed to reproduce.

                                            Anyway, I hope this helps dc42 figure out what's going on.

                                            Thanks for the nice analysis.

                                            Good point with the timing. It also makes sense. I sure @dc42 will fix it. Maybe already for 3.0RC1 🙂

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