Layer Shift with pause and resume
-
Hello,
I've purchased a filament monitor. It is great. When the motion of the filament diverges too far from the predicted then the print pauses. That part seems to be working. The problem that I am seeing is that when I fix the problem and resume the print that the layers have shifted about 5mm in the +x direction.
What can I do to track down and eliminate the layer shifting on pause?
Should I add a "home x" command in my resume script? Is that even a thing? Are there other suggestions?
; pause.g
; called when a print from SD card is paused
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:33 GMT-0700 (Pacific Daylight Time)
M83 ; relative extruder moves
G1 E-10 F3600 ; retract 10mm of filament
G91 ; relative positioning
G1 Z5 F360 ; lift Z by 5mm
G90 ; absolute positioning
G1 X0 Y0 F6000 ; go to X=0 Y=0; resume.g
; called before a print from SD card is resumed
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:33 GMT-0700 (Pacific Daylight Time)
G1 R1 X0 Y0 Z5 F6000 ; go to 5mm above position of the last print move
G1 R1 X0 Y0 ; go back to the last print move
M83 ; relative extruder moves
G1 E10 F3600 ; extrude 10mm of filamentThanks,
Alan
-
Does manual pause and resume have the same problem? If so then you probably have the X acceleration (M201) set too high, or the requested X speed (the lower of the M203 setting and the F6000 in your G1 commands in pause.g and resume.g) set higher than your machine can do reliably. Suggestions:
- Use the motor EMF calculator at reprapfirmware.org to check whether the VIN voltage is high enough to avoid loss of torque at 100mm/sec
- If it is, then increasing X motor current may help
- Or try reducing X acceleration in M201
-
Thanks for replying. I had a look at the EMF calculator. I have no idea which of the motors are on my machine (I've been upgrading a HICTOP 3DP-11, an i3 clone I purchased a few years back). But even choosing the "worst case" motor I have large margins before my requested speed is too high. I have a 24v supply and that seems to help with the margin considerably. Even so, I halved the x-acceleration down to 500mm/s^2 and it had no effect on the shift.
The problem happens during manual pause and resume as well. And now that I have been present for it I can provide some additional clues.
- The layer shift happens only on the 1st pause. Pausing again doesn't produce another shift
- The layer shift happens on the travel to 0,0. not on the resume.
On the first pause only and then on the travel back to (0, 0) the head hits the left-hand stop (the one with the limit switch) hard and then skips as it continues to try to travel. It is almost as if it thinks it isn't yet at zero. But my gcode homes the machine at the start of every print. And the prints are generally quite good. I do not have any overall problem with layer-shifting.
I have also measured the layer shift, and it isn't 5mm. Really more like 2.5mm (one or two tooth slip?)
I also tried to see if re-homing x "home x" during pause would fix it. it does not. but going to position (25,25) instead of (0,0) during pause does resolve the problem.
So I'm thinking somehow I'm loosing my position before the part actually starts printing (I've been doing my pausing tests during the outline of the first layer, so very early in the print).
-
Which firmware version are you using, and do you have any G10 tool offsets configured?
What happens if you home the printer, select the tool, and then command it to (0,0) ?
If you have any tool offsets then it could be that (0,0) is reachable by the head reference point but not by the tool that is selected when you pause.
-
Can you post your config file, homing files, and any slicer start gcode you have as well?
-
Trying to take these questions in order:
> What firmware are you using:
software Information
Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
Firmware Electronics: Duet WiFi 1.02 or later
Firmware Version: 2.03beta3 (2019-03-25b6)
WiFi Server Version: 1.23
Web Interface Version: 1.22.6
Web Interface by Christian Hammacher
Licensed under the terms of the GPL v3> Do you have any G10 tool offsets configure
Not intentionally, are any of those set in the defaults? I can't find any G10 commands in the config file. but G10 P2 returns the following:
11:48:03 AMG10 P0
Tool 0 offsets: X0.00 Y0.00 Z0.00, active/standby temperature(s): 0.0/0.0What happens if you home your printer, select the tool and then command it to (0,0)?
I believe the G-Code for this would be:G28 ; home all axes
T0 ; select tool zero
G1 X0 Y0 ; Go to zero-zeroAnd after running G29, the web page reports: X 0, y 15, Z 6.46
T0 (no visible change)
G1 X0 Y0: The head moves and now reports X 0, Y0, Z 6.46I think the important thing is that it does not slam against the stop and slip a tooth in the belt.
> Could you post your config file:
; Configuration file for Duet WiFi (firmware version 1.21)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:32 GMT-0700 (Pacific Daylight Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Network
M550 P"Duet3D" ; Set machine name
M552 S1 ; Enable network
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Drives
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S0 ; Drive 1 goes backwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S0 ; Drive 3 goes backwards
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X80.00 Y80.00 Z400.00 E100.00 ; Set steps per mm
M566 X900.00 Y900.00 Z25.00 E500.00 ; Set maximum instantaneous speed changes (mm/min)
M203 X12000.00 Y12000.00 Z720.00 E12000.00 ; Set maximum speeds (mm/min)
M204 P3000.00 T3000.00
M201 X500.00 Y1000.00 Z100.00 E1000.00 ; Set accelerations (mm/s^2)
M906 X800.00 Y800.00 Z800.00 E800.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X215 Y265 Z180 S0 ; Set axis maxima; Endstops
M574 X1 Y1 S0 ; Set active low and disabled endstops; Z-Probe
M574 Z1 S2 ; Set endstops controlled by probe
M307 H3 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch
M558 P9 H5 F120 T6000 ; Set Z probe type to bltouch and the dive height + speeds
G31 P500 X25 Y0 Z1.465 ; Set Z probe trigger value, offset and trigger height
M557 X15:200 Y15:255 S20 ; Define mesh grid; Filament Sensor
M591 D0 P5 C3 R40:120 E3.0 A0 S1 ; Duet3D laser sensor for extruder drive 0, connected to endstop input 3 (E0),
; tolerance 40 to 120%, 3mm comparison length, enabled; Heaters
M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C
M307 H0 A141.8 C317.8 D2.1 V24.1 B0 ; Set PID parameters for the bed header, Gain 141.8, Constant 317.8, Deadtime 2.1, Voltage 24.1, Bang-Bang OFF
M307 H1 A388.6 C111.6 D4.9 V24.6 B0 ; Set PID parameters for the nozzle heater, Gain 388.6, Constant 111.6, Deadtime 4.9, Voltage 24.6, Bang-Bang OFF; Fans
M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1.0 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on; 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; Automatic saving after power loss is not enabled
; Custom settings are not configured
> Could you post your homing files:
; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:32 GMT-0700 (Pacific Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
M98 Pdeployprobe.g ; deploy mechanical Z probe
G1 S1 X-220 Y-275 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
G1 X5 Y5 F6000 ; go back a few mm
G1 S1 X-220 Y-275 F360 ; move slowly to X and Y axis endstops once more (second pass)
G90 ; absolute positioning
G1 X-10 Y15 F6000 ; go to first bed probe point and home Z
G30 ; home Z by probing the bed; Uncomment the following lines to lift Z after probing
;G91 ; relative positioning
;G1 S2 Z5 F100 ; lift Z relative to current position
;G90 ; absolute positioningM98 Pretractprobe.g ; retract mechanical Z probe
; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:33 GMT-0700 (Pacific Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 X-220 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 X5 F6000 ; go back a few mm
G1 S1 X-220 F360 ; move slowly to X axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioning; homey.g
; called to home the Y axis
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:33 GMT-0700 (Pacific Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 Y-275 F1800 ; move quickly to Y axis endstop and stop there (first pass)
G1 Y5 F6000 ; go back a few mm
G1 S1 Y-275 F360 ; move slowly to Y axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioning; homez.g
; called to home the Z axis
;
; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 24 2019 20:32:33 GMT-0700 (Pacific Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G90 ; absolute positioning
G1 X-10 Y15 F6000 ; go to first probe point
G30 ; home Z by probing the bed; Uncomment the following lines to lift Z after probing
;G91 ; relative positioning
;G1 S2 Z5 F100 ; lift Z relative to current position
;G90 ; absolute positioning> Could you post your slicer start GCODE you have
Slimplify 3D Start Gcode
G28 ; home all axes
M375; load heightmap
G1 X0 Y20 Z0.2 F3000 ; get ready to prime
M109 S[extruder0_temperature] ; heat the extruder
G92 E0 ; reset extrusion distance
G1 X200 E20 F600 ; prime nozzle -
Nothing jumps out at me.
-
I found it!
I turns out that the wire bundle connected to the print head was too short to get to the end of the x-axis travel. So just at the very end of the "priming stripe" (at 210mm out of 215 total travel) the belt would skip a tooth or two. Since it wasn't a problem with the actual kinematics of the machine, the prints came out great... till I paused and went all the way back to X0, where I'd get the matching slip on the other end. Perfect prints, but the virtual geometry didn't match the physical geometry after the priming stripe.
Totally my bad. But this is going to get added to my "wiring change checklist" so that next time I change a heater or a thermistor and take of the cable ties...I'll check that I still have full travel when I do the final tighten on my strain relief.
Woot! Thanks for all the help!
Alan