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

    Strange z offset after printing.

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    23
    3.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.
    • lolmoduleundefined
      lolmodule
      last edited by lolmodule

      Hi all. I am having an issue where when I finish a print the z will be offset by a seemingly random amount. Re homing the z doesn't fix it. If I home Z and go to 10mm in z then say z0 the duet will read Z 0.4 ( or some other number, it changes ). a power cycle and subsequent homing does fix it.

      My printer is a Voron 1.5, coreXY with a Duet Wifi on 1.20 using S3D to slice my STL's. I can post my config.g and S3D start/ end scripts as needed. ( scripts were from another friend who also has a voron but he hasnt been available lately for me to ask.)

      Any help is greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by Phaedrux

        Are you using Mesh Bed Compensation?

        A few more details would be helpful, like what z probe type. Posting your config is always helpful.

        How is the Voron by the way? If I were to build another printer I think it would be a Voron 2.0

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • lolmoduleundefined
          lolmodule
          last edited by

          No Mesh Bed Compensation. I am using a PL-08N inductive sensor as my Z probe. I love my Voron. It's my second printer ( but first built. First printer was an FLsun delta) and I am currently building a V2. I have been using my V1 in a coroplast box to print ABS parts for my V2. Works quite well, though not perfect.

          My config:

          ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
          ; executed by the firmware on start-up
          ;
          ; generated by RepRapFirmware Configuration Tool on Mon Nov 20 2017 00:03:40 GMT-0500 (Eastern Standard Time)

          ; General preferences
          M111 S0 ; Debugging off
          G21 ; Work in millimetres
          G90 ; Send absolute coordinates...
          M83 ; ...but relative extruder moves
          M555 P2 ; Set firmware compatibility to look like Marlin
          ; Automatic saving after power loss is not enabled

          M667 S1 ; Select CoreXY mode
          M208 X0 Y0 Z0 S1 ; Set axis minima
          M208 X300 Y300 Z300 S0 ; Set axis maxima

          ; Endstops
          M574 X2 Y2 S0 ; Set active low endstops

          ;Z-Probe
          M558 P5 H3 I1 F120 T9000 ; Set Z probe type to unmodulated and the dive height + speeds
          G31 P500 X0 Y-40 Z2.0 ; Set Z probe trigger value, offset and trigger height

          M557 X50:250 Y50:250 S20 ; Define mesh grid

          ; Drives
          M569 P0 S1 ; Drive 0 goes forwards
          M569 P1 S1 ; Drive 1 goes forwards
          M569 P2 S0 ; Drive 2 goes backwards
          M569 P3 S0 ; Drive 3 goes backwards
          M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
          M92 X80 Y80 Z400 E608 ; Set steps per mm
          M566 X420 Y420 Z100 E72 ; Set maximum instantaneous speed changes (mm/min)
          M203 X16000 Y16000 Z1000 E5400 ; Set maximum speeds (mm/min)
          M201 X2250 Y2250 Z500 E3000 ; Set accelerations (mm/s^2)
          M906 X1200 Y1200 Z1200 E1000 I30 ; Set motor currents (mA) and motor idle factor in per cent
          M84 S30 ; Set idle timeout

          ; Bed Heater (H0)(Keenovo 120v 600W powered through SSR)
          M143 H0 S125 ; Set maximum heater temperature to 125C
          M305 P0 T100000 B3950 C7.06e-8 R4700 ; Set thermistor + ADC parameters for heater 0

          ; Here I record the results of all my 'M303 H0 S120' autotunes for the bed
          ; Heater 0 model: gain 236.9, time constant 509.8, dead time 1.1, max PWM 1.00, calibration voltage 24.5, mode PID
          ; Heater 0 model: gain 230.9, time constant 494.7, dead time 1.1, max PWM 1.00, calibration voltage 24.5, mode PID
          ; Heater 0 model: gain 316.0, time constant 482.7, dead time 1.4, max PWM 1.00, calibration voltage 24.5, mode PID
          ; Heater 0 model: gain 271.9, time constant 601.0, dead time 1.2, max PWM 0.80, calibration voltage 24.5, mode PID
          ; Then set the M307 parameters with a rough average
          M307 H0 A316.0 C482.7 D1.4 S0.6 B0 ; Set model parameters for heater 0 and use PID mode?

          ; Hot End Heater (H1) (E3D-V6 24v 40W)
          M143 H1 S280 ; Set maximum heater temperature to 245C
          M305 P1 T100000 B4725 C7.06e-8 R4700 ; Set thermistor + ADC parameters for heater 1

          ; Here I record the results of all my 'M303 H1 S240' autotunes ********* FOR E3D V6 24v 40W **********
          ; Heater 1 model: gain 483.0, time constant 183.7, dead time 4.9, max PWM 1.00, calibration voltage 24.5, mode: PID
          ; Heater 1 model: gain 320.5, time constant 123.3, dead time 3.2, max PWM 1.00, calibration voltage 24.5, mode: PID
          ; Heater 1 model: gain 322.3, time constant 122.2, dead time 3.4, max PWM 1.00, calibration voltage 24.5, mode PID
          ; Then I set the M307 parameters with a rough average
          M307 H1 A322.3 C122.2 D3.4 B0 ; Set model parameters for heater 1 and use PID mode
          M307 H2 A-1 C-1 D-1
          ; Extruders

          ; Tool/Extruder 0
          M563 P0 D0 H1 ; Tool 0 uses Drive 0 and Heater 1
          G10 P0 X0 Y0 Z0 ; Set Tool 0 axis offsets
          G10 P0 R0 S0 ; Set Tool 0's initial active and standby temperatures to 0C

          T0 ; select Tool/Extruder 0 by default

          ; Tools
          M563 P0 D0 H1 ; Define tool 0
          G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
          G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

          ; Network
          M550 PVoron ; Set machine name
          M552 S1 ; Enable network
          M587 S"ASUS" P"Threatlevel302" ; Configure access point. You can delete this line once connected
          M586 P0 S1 ; Enable HTTP
          M586 P1 S0 ; Disable FTP
          M586 P2 S0 ; Disable Telnet

          ; Fans
          M106 P0 S0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
          M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

          ; Custom settings are not configured

          Phaedruxundefined 1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator @lolmodule
            last edited by

            @lolmodule What does your homez.g look like?

            Z-Bot CoreXY Build | Thingiverse Profile

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

              Also please post your homeall.g file, and tell us which firmware you are using.

              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
              • lolmoduleundefined
                lolmodule
                last edited by lolmodule

                I am running 1.20 firmware.

                ; homeall.g
                ; called to home all axes
                ;
                ; generated by RepRapFirmware Configuration Tool on Mon Nov 13 2017 23:47:22 GMT-0600 (Central Standard Time)

                ; Relative positioning
                G91

                ; Lift Z
                G1 Z3 F9000

                ; Course home X or Y
                G1 X332 Y318 F2500 S1
                ; Course home X
                G1 X332 S1
                ; Course home Y
                G1 Y318 S1

                ; Move away from the endstops
                G1 X-5 Y-5 F2500

                ; Fine home X
                G1 X332 F360 S1
                ; Fine home Y
                G1 Y318 S1
                ; Absolute positioning
                G90

                ; Go to middle of bed and home Z
                G1 X150 Y150 F9000
                G30

                ; Uncomment the following line to lift the nozzle after probing
                G1 Z10 F150


                ; homez.g
                ; called to home the Z axis
                ;
                ; generated by RepRapFirmware Configuration Tool on Mon Nov 20 2017 00:03:40 GMT-0500 (Eastern Standard Time)

                ; Lift Z relatively to current position
                G91
                G1 Z5 F6000

                ; Back to absolute positioning
                G90

                ; Go to first bed probe point and home the Z axis
                G1 X150 Y150 F6000
                G30

                ; Uncomment the following lines to lift Z after probing
                G91
                G1 Z10 F100
                G90

                1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator
                  last edited by

                  Do you see any signs of skipping steps on the Z axis? If you run it up and down does it sound smooth and consistent? Any signs of binding? Are you running the Z motors at ~85% rated current?

                  I'm not familiar with your probe type, so I don't know what to look for to see if it's functioning properly or not.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • deckingmanundefined
                    deckingman
                    last edited by

                    On power up, all settings will be read in from config.g (and or config-overide.g if you use it). So if a power cycle fixes it and homing works fine, then logic would dictate that there is something in the print gcode file that is changing a setting. It might be an idea if you post the first and last 50 or so lines of the gcode file that your are printing - especially the parts that contain your start, and more importantly your end, gcode.

                    Ian
                    https://somei3deas.wordpress.com/
                    https://www.youtube.com/@deckingman

                    1 Reply Last reply Reply Quote 0
                    • lolmoduleundefined
                      lolmodule
                      last edited by lolmodule

                      I am not getting binding on Z and do not see any skipping. Im fairly certain the probe its self is functioning properly.

                      Start Script:
                      T0
                      M104 S0 ;cancel S3D set temp
                      G21 ; set units to mm
                      G90 ; use absolute coordinates
                      T0 ; select tool 0
                      M207 S8.5 F4000 T1800 Z0.4 ; setup firmware retraction

                      G92 E0.0 ; reset e count
                      M220 S100 ; reset speed multiplier
                      M140 S[bed2_temperature] ; set bed temperature and do not wait
                      M109 S205 ; set print head temperature and wait
                      M190 S[bed2_temperature] ; set bed temperature and wait

                      M140 S[bed2_temperature] ; set bed temperature and do not wait
                      M109 S[extruder0_temperature] ; set print head temperature and wait
                      M190 S[bed2_temperature] ; set bed temperature and wait


                      Post processing for FW retraction

                      {REPLACE "G1 E-1.0000 F6000\n" "G10\n"} ; firmware retract
                      {REPLACE "G1 E1.0000 F6000\n" "G11\n"} ; firmware unretract
                      {REPLACE "G1 E1.0000 F1800\n" "G11\n"} ; firmware skirt unretract


                      Ending script

                      G91 ;relative positioning
                      G1 E-5.00 F1000 ;retract 5mm of filament
                      G1 Z+1.00 X+20.0 Y+20.0 F20000 ;short quick move to disengage from print
                      G1 Z+10.00 F20000 ;move Z-Axis 10mm away from part

                      G90 ;absolute positioning
                      G1 X10 Y10 ; move gantry close to home
                      G91 ; relative positioning

                      G1 E-5.00 F500 ;retract additional filament to prevent oozing
                      G90 ;absolute positioning
                      M104 S0 ;turn off hotend
                      M140 S0 ;turn off heatbed
                      M106 S0 ; shut off blower


                      The scripts are not made by me ( they are from a friend that also has a Voron).

                      Phaedruxundefined 1 Reply Last reply Reply Quote 0
                      • Phaedruxundefined
                        Phaedrux Moderator @lolmodule
                        last edited by

                        @lolmodule said in Strange z offset after printing.:

                        G1 Z+10.00 F20000 ;move Z-Axis 10mm away from part

                        What happens if you send this command manually? Does it successfully move 10mm?

                        Z-Bot CoreXY Build | Thingiverse Profile

                        deckingmanundefined 1 Reply Last reply Reply Quote 0
                        • deckingmanundefined
                          deckingman @Phaedrux
                          last edited by

                          @phaedrux said in Strange z offset after printing.:

                          @lolmodule said in Strange z offset after printing.:

                          G1 Z+10.00 F20000 ;move Z-Axis 10mm away from part

                          What happens if you send this command manually? Does it successfully move 10mm?

                          Yup. That looks like a very high feed rate for the Z axis. I'd think that may well be the problem.

                          Ian
                          https://somei3deas.wordpress.com/
                          https://www.youtube.com/@deckingman

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

                            I can't see anything obviously wrong with your files. Two possibilities:

                            • This issue might be related to the one that I fixed in firmware 2.0, even though that one was most evident when using mesh bed compensation. So you could try upgrading to firmware 2.0.

                            • If the print file is somehow changing the babystepping amount or the tool Z offset, that would cause the problem. So try sending the following commands after a print and check that the results returned are correct:

                            G31 T5 ; should return trigger height = 2.0
                            M290 ; should return zero, or whatever babystepping you used
                            G10 P0 ; should return Z offset = 0

                            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
                            • lolmoduleundefined
                              lolmodule
                              last edited by

                              Ok. I re did my Z0 and my probe trigger height just to make sure everything was ok. Which is why my trigger height is a tad different than before. I printed a calibration cube and put in the commands you suggested @dc42 this is the results:

                              G10 P0
                              Tool 0 offsets: X0.00 Y0.00 Z0.00, active/standby temperature(s): 0.0/0.0

                              M290
                              Baby stepping offset is 0.000mm

                              G31 T5
                              Threshold 500, trigger height 2.19, offsets X0.0 Y-40.0

                              Everything looks good right?


                              https://gyazo.com/e708fbecbdc5baf48ebf945f10f2fadf


                              Notice the commanded position and the readout in the top right.

                              I tried the suggestion by @Phaedrux and manually entered that move command ( verified Z 0, sent the G1 Z+10.00 F20000, then back to 0 and it was fine.)

                              I have no idea whats going on. I haven't updated to 2.0 yet but I think it might fix whatever issue I might be having but I will wait to see what you all have to say.

                              I really do appreciate the time you guys ( even though it may not be much time) put into helping me out.

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

                                It looks to me that you have some sort of bed compensation in use that is causing a 0.4mm adjustment. Please run M122 and see what the "Bed compensation in use" field reports.

                                Another possibility is that the GCode file you printed uses a M206 commands to offset the Z axis.

                                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
                                • lolmoduleundefined
                                  lolmodule
                                  last edited by

                                  No bed compensation: https://gyazo.com/9193b8b3715ef0341789c3e7e04b06f3

                                  Checked the last few files and there are no M206 commands. My start script does have an M207 that has a Z0.4 in it.

                                  M207 S8.5 F4000 T1800 Z0.4 ; setup firmware retraction

                                  Could that be it? like I mention earlier I am not fully up on Gcode so when my friend gave me the scripts for FW retraction I just used them. Is there a reason to have a Z0.4 in the FW retraction?

                                  1 Reply Last reply Reply Quote 0
                                  • Phaedruxundefined
                                    Phaedrux Moderator
                                    last edited by

                                    The Z parameter for firmware retraction controls Z hop.

                                    Z-Bot CoreXY Build | Thingiverse Profile

                                    1 Reply Last reply Reply Quote 0
                                    • lolmoduleundefined
                                      lolmodule
                                      last edited by

                                      Ah ok. I dont know what the issue could be then... Everything appears to be setup right.

                                      1 Reply Last reply Reply Quote 0
                                      • Phaedruxundefined
                                        Phaedrux Moderator
                                        last edited by

                                        Might be time to give 2.0 a try.

                                        If that doesn't work, you could try backing up all your existing config files from the /sys folder and then starting fresh with a new config bundle generated by the RepRap configurator. It would likely take some tuning and adjusting to get it working properly for your printer again, as the configurator really provides more of a starting point than a final working config. This would also give you a chance to dig into RepRap firmware and gcode a little more which is really quite powerful once you get into it.

                                        I still suspect some binding or skipped steps occasionally, can you verify what the rated current for your z stepper is and whether you're running it at close to 85% of rated?

                                        Z-Bot CoreXY Build | Thingiverse Profile

                                        1 Reply Last reply Reply Quote 0
                                        • deckingmanundefined
                                          deckingman
                                          last edited by

                                          I thought that the 20,000 mm/min (333mm/sec) for the Z move in the end gcode was way too fast (which it is) but then it'll be limited to 1,000 because that's what is in config.g.

                                          Like Phaedrux, I'm also inclined to think it's binding or skipping steps. You could try lower Z acceleration.

                                          Ian
                                          https://somei3deas.wordpress.com/
                                          https://www.youtube.com/@deckingman

                                          1 Reply Last reply Reply Quote 0
                                          • lolmoduleundefined
                                            lolmodule
                                            last edited by

                                            It may be that, but like I posted above. I ran that high Accel z move manually and it returned to 0 no problem. ( But that doesn't mean it isn't the cause)

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