XY shift after power fail
-
Can you post your full config.g and homing files along with the results of M122 and M98 P"config.g" please?
-
@infiniteloop said in XY shift after power fail:
@tomf said in XY shift after power fail:
Any thoughts on what's happening?
looking at your resurrect.g file, it seems that you use object cancellation to just print the triangle from a file with multiple objects. I have no solution at hand, but to pin down the problem, could you perhaps isolate the triangle into a file with nothing else in it?
Then, the two M486 gcodes should be missing from the resurrect.g - check that before you restart the print, and in case they are still there, remove these lines. The question is: is the triangle still not to scale?
Interesting idea. The little triangle was created on Superslicer as a shape and modifier. To see if that has any effect, I created a one piece object on F360 to test that. The resulting print (image) exhibited the same offset:
The ressurect file still has M486 lines, as below. I commented these out but it didn't help.
M486 S0 A"Macro test 2 id:0 copy 0"
M486 S0G17 -
@infiniteloop I had another thought, which lead me to do a double power fail to see if the layer shift happened every time, but it only occurred at the first power fail. This test piece shows the updated test piece with a layer shift of the same magnitude (X-0.3, Y -3.5) for the first power fail, and aligned on the second power fail - a witness line shows where the restart happened.
-
@phaedrux said in XY shift after power fail:
Can you post your full config.g and homing files along with the results of M122 and M98 P"config.g" please?
Here you are:
config.g
; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"T-Rat" ; set printer name M669 K1 ; CoreXY G29 S1 ; Set Units to Millimeters ; Network M552 S1 ;TF - this sets the wifi or ethernet module to enabled. M552 P192.168.1.144 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.0 S0 D3 ; physical drive 0.0 goes forwards M569 P0.1 S0 D3 ; physical drive 0.1 goes forwards M569 P0.2 S0 D3 ; physical drive 0.2 goes forwards M569 P0.3 S1 D3 ; physical drive 0.3 goes forwards M569 P0.4 S1 D3 ; physical drive 0.4 goes forwards M569 P0.5 S0 D3 ; physical drive 0.5 goes forwards M584 X0.4 Y0.3 Z0.0:0.1:0.2 E0.5 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M911 S21.0 R30.0 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Power failure configuration M92 X80.00 Y80.00 Z800.00 ; set steps per mm M906 X1000 Y1000 Z800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout M566 X600.00 Y600.00 Z60.0 E600.00 P1 ; set maximum instantaneous speed changes (mm/min) M203 X10800.00 Y10800.00 Z1000.00 E3600.00 ; set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z100.00 E3600.00 ; set accelerations (mm/s^2) ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X305 Y300 Z300 S0 ; set axis maxima ; Endstops M574 X1 S1 P"io1.in" ; configure active high endstops M574 Y2 S1 P"io0.in" ; configure active high endstops M574 Z1 S2 ; configure Z-probe endstop for low end on Z M671 X-4.5:150:304.5 Y-4.52:305:-4.52 S5 ; define positions of Z leadscrews or bed levelling screws M557 X25:270 Y35:270 P5 ; define 5x5 mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B3950 A"Bed" ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out5 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S110 ; set temperature limit for heater 0 to 110C ;; Run Bed PID Tune ;; M307 H0 A303.1 C356.7 D1.4 S1.00 V24.0 B0 M307 H0 B0 R0.479 C511.2 D5.21 S1.00 V24.4 ; Fans M950 F0 C"out3" Q500 ; create fan 0 on pin out3 and set its frequency M106 P0 C"Hotend Fan" S0 H1 T45 L255 ; set fan 0 name and value. Thermostatic control turned on for Hotend M950 F1 C"out4" Q500 ; create fan 1 on pin out4 and set its frequency M106 P1 C"Layer Fan" S0 H-1 L255 ; set fan 1 name and value. Thermostatic control is turned off ; Tools M563 P0 D0 H1 F1 ; 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 M950 H1 C"out1" T1 ; create nozzle heater output on out2 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set the maximum temperature in C for heater ; EVA 2 / BMG / Mosquito 300C thermistor M92 E830 ; set extruder steps per mm, 0.9 angle/step (LDO Pancake) M906 E800 ; set extruder motor current (mA) and idle factor in per cent M308 S1 P"temp1" Y"thermistor" T100000 B4680 C6.455513e-8 A"Hotend" ;; Run Heater PID Tune!! ;; M307 H1 A751.5 C196.6 D4.7 S1.00 V23.9 B0 ; Z-Probe ; BLTouch M950 S0 C"io2.out" ; Create a servo pin on io2 M558 P9 C"io2.in" H5 F240 T10800 A5 S0.04 ; set Z probe type to unmodulated and the dive height + speeds G31 P25 X-26.00 Y-18.00 Z3.1 ; set Z probe trigger value, offset and trigger height, more Z means closer to the bed M404 N1.75 D0.4 ; Filament width and nozzle diameter T0 ; Pressure Advance M572 D0 S0.04
homeall.g
; BLTouch M280 P0 S160 ; Precautionary alarm release M280 P0 S90 ; Ensure the pin is raised G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-625 Y605 F3600 ; move quickly to X and U axis endstops and stop there (first pass) G1 H1 X-625 F1800 ; move quickly to X and U axis endstops and stop there (first pass) G1 H1 Y605 F1800 ; move quickly to X and U axis endstops and stop there (first pass) G1 H2 X5 Y-5 F6000 ; go back a few mm G1 H1 X-625 Y605 F360 ; move slowly to X and U axis endstops once more (second pass) G1 H1 X-625 F360 ; move slowly to X and U axis endstops once more (second pass) G1 H1 Y605 F360 ; move slowly to X and U axis endstops once more (second pass) G90 ; absolute positioning G1 X150 Y150 F10000 ; go to first probe point G30 ; home Z by probing the bed G91 ; relative positioning G1 Z5 F100 ; lift Z relative to current position G90 ; absolute positioning
homex.g
G91 ; relative positioning ;G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-625 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X5 F6000 ; go back a few mm G1 H1 X-625 F360 ; move slowly to X axis endstop once more (second pass) ;G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
homey.g
G91 ; relative positioning ;G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Y605 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 Y-5 F6000 ; go back a few mm G1 H1 Y605 F360 ; move slowly to Y axis endstop once more (second pass) ;G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
homez,g
; BLTouch M280 P0 S160 ; Precautionary alarm release M280 P0 S90 ; Ensure the pin is raised G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X150 Y150 F10000 ; 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 Z5 F100 ; lift Z relative to current position G90 ; absolute positioning
M122
M122 === Diagnostics === RepRapFirmware for Duet 3 Mini 5+ version 3.3 (2021-06-15 21:46:11) running on Duet 3 Mini5plus WiFi (standalone mode) Board ID: XZZAQ-X296U-D65J0-40KMQ-2Z03Z-ZFS7W Used output buffers: 3 of 40 (24 max) === RTOS === Static ram: 102724 Dynamic ram: 106620 of which 184 recycled Never used RAM 31320, free system stack 120 words Tasks: NETWORK(ready,15.7%,214) HEAT(notifyWait,0.0%,364) Move(notifyWait,0.1%,299) CanReceiv(notifyWait,0.0%,941) CanSender(notifyWait,0.0%,357) CanClock(delaying,0.0%,340) TMC(notifyWait,1.2%,115) MAIN(running,82.2%,394) IDLE(ready,0.0%,29) AIN(delaying,0.8%,264), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 00:22:42 ago, cause: power up Last software reset at 2022-01-24 15:14, reason: User, GCodes spinning, available RAM 31144, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 MCU revision 3, ADC conversions started 1362270, completed 1362270, timed out 0, errs 0 Step timer max interval 864 MCU temperature: min 30.1, current 31.4, max 32.2 Supply voltage: min 24.2, current 24.4, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/64/64, gc cycles 0 Driver 0: position 20000, standstill, SG min/max 0/16, read errors 0, write errors 0, ifcnt 13, reads 58255, writes 13, timeouts 0, DMA errors 0 Driver 1: position -12000, standstill, SG min/max 0/16, read errors 0, write errors 0, ifcnt 13, reads 58255, writes 13, timeouts 0, DMA errors 0 Driver 2: position 29693, standstill, SG min/max 0/16, read errors 0, write errors 0, ifcnt 13, reads 58254, writes 13, timeouts 0, DMA errors 0 Driver 3: position 0, standstill, SG min/max 0/10, read errors 0, write errors 0, ifcnt 13, reads 58254, writes 13, timeouts 0, DMA errors 0 Driver 4: position 0, standstill, SG min/max 0/16, read errors 0, write errors 0, ifcnt 13, reads 58255, writes 13, timeouts 0, DMA errors 0 Driver 5: position 0, standstill, SG min/max 0/278, read errors 0, write errors 0, ifcnt 13, reads 58255, writes 13, timeouts 0, DMA errors 0 Driver 6: position 0, standstill, SG min/max 0/0, read errors 0, write errors 0, ifcnt 9, reads 58258, writes 9, timeouts 0, DMA errors 0 Date/time: 2022-01-25 08:54:29 Cache data hit count 2500014546 Slowest loop: 191.04ms; fastest: 0.07ms === Storage === Free file entries: 10 SD card 0 detected, interface speed: 22.5MBytes/sec SD card longest read time 3.4ms, write time 10.4ms, max retries 0 === Move === DMs created 83, maxWait 71213ms, bed compensation in use: mesh, comp offset 0.000 === MainDDARing === Scheduled moves 381, completed moves 381, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1, chamberHeaters = -1 -1 Heater 0 is on, I-accum = 0.0 Heater 1 is on, I-accum = 0.4 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === CAN === Messages queued 12261, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 17 (min 17), ts 6811/0/0 Tx timeouts 0,3,6810,0,0,5445 last cancelled message type 30 dest 127 === Network === Slowest loop: 227.55ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 - WiFi - Network state is active WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.26 WiFi MAC address d8:bf:c0:14:e7:f2 WiFi Vcc 3.33, reset reason Power up WiFi flash size 2097152, free heap 25288 WiFi IP address 192.168.1.144 WiFi signal strength -82dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
M98 P"config.g"
M98 P"config.g" Warning: the height map was loaded when the current Z=0 datum was not determined probing. This may result in a height offset. Error: in file macro line 10 column 7: M552: expected string expression HTTP is enabled on port 80 FTP is disabled TELNET is disabled Warning: Heater 0 appears to be over-powered. If left on at full power, its temperature is predicted to reach 269C
-
@tomf The result of your double power fail is interesting: seems that resurect.g shifts X and Y consistently. I propose to try this:
Comment-out any homing commands from your start.g and from the start section (if any) of your slicer. Instead, before starting the test print, home X/Y withG28 X Y
(home Z as usual, that doesn't matter here). If you still see the layer shift after power-off, we have to look where the origin of X/Y might eventually be re-defined. In case the layer shift is gone, we can focus on your homing macros. -
@infiniteloop said in XY shift after power fail:
@tomf The result of your double power fail is interesting: seems that resurect.g shifts X and Y consistently. I propose to try this:
Comment-out any homing commands from your start.g and from the start section (if any) of your slicer. Instead, before starting the test print, home X/Y withG28 X Y
(home Z as usual, that doesn't matter here). If you still see the layer shift after power-off, we have to look where the origin of X/Y might eventually be re-defined. In case the layer shift is gone, we can focus on your homing macros.That made a difference! There's still an offset, but this time X-1.7, Y-2.0 so it suggests something's going on there. I don't know what but I really appreciate your input!
I don't have a start.g, instead I have homng and bed levelling in the slicer start code. I will change that and move the homing commands to to a start.g. I'll run again and report the findings. -
Can you post your slicer start gcode or better yet the first 50 lines or so of your sliced gcode file?
I can see some oddities in your config.g but nothing I think would cause the offset.
-
@phaedrux said in XY shift after power fail:
Can you post your slicer start gcode or better yet the first 50 lines or so of your sliced gcode file?
I can see some oddities in your config.g but nothing I think would cause the offset.
I don't know how to see the code lines in the gcode file, but here is the sliced file of the updated test part. rr_Macro test 2.1 0.4n_0.2L_PLA_16m_6g.gcode
I would appreciate knowing any 'oddities' in my config.g as I'm fairly new at this and trying to get it running smoothly.
Here is the start code from my slicer. I'm not using a start.g file
G90 ; use absolute coordinates
M83 ; extruder relative mode
M104 S[first_layer_temperature] ; set extruder temp
M140 S[first_layer_bed_temperature] ; set bed temp
G28; HOME ALL
G32 ; MESH BED LEVELLING
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S[first_layer_temperature] ; wait for extruder temp
M572 D0 S0.04 ;set PRESSURE ADVANCE;;PRIME LINE
G4 P1000; Pause
M300 S500 P800; Beep and we're off!
G4 P1000; PauseM564 S0 ; allow movement outside boundary
G1 X190.0 Y-2.0 Z0.4 F1000.0 ; go outside print are
G92 E0.0 ; set extruder position
G1 X170.0 E9.0 F1000.0 ; intro line
G1 X120.0 E12.5 F1000.0 ; main prime
G92 E0.0; reset extruder
M564 S1 ; limit movement within axis boundaries -
@tomf said in XY shift after power fail:
Here is the start code from my slicer.
Looking at your slicer's start code, I suggest you to retry the procedure I proposed in a previous post - with one additional step:
Append this line from the slicer's start script to your resurrect-prologue.g:
M564 S0
I'm really curious what happensEdit: Another thing worth trying is to remove the priming block (enclosed by the
M564
gcodes) from the start code before you slice the test print. I still don't know from where the offset originates: from the initial setup or from the retry after power failure. -
@infiniteloop said in XY shift after power fail:
M564 S0
Sorry, that didn't make any difference.
Neither did moving the home & levelling routines from the slicer to a start.g file
Neither did changing the purge line on the slicer's start gcode to be entirely within the axis boundary.
EDIT: Neither did commenting out the prime line block of the slicer start code.All these give a consistent XY offset of (-0.3, -3.5).
Not sure what to do from here.
-
@tomf said in XY shift after power fail:
@infiniteloop said in XY shift after power fail:
M564 S0
Sorry, that didn't make any difference.
Neither did moving the home & levelling routines from the slicer to a start.g file
Neither did changing the purge line on the slicer's start gcode to be entirely within the axis boundary.
EDIT: Neither did commenting out the prime line block of the slicer start code.All these give a consistent XY offset of (-0.3, -3.5).
Not sure what to do from here.
If the offset is consistent as a temporary fix could you not add a relative G1 move somewhere to adjust for it?
Frederick
-
@fcwilt Yes I may end up doing that but I would much rather get to the root cause.
-
@tomf said in XY shift after power fail:
G32 ; MESH BED LEVELLING
Can you post your bed.g file as well?
-
@tomf said in XY shift after power fail:
M280 P0 S160 ; Precautionary alarm release M280 P0 S90 ; Ensure the pin is raised
You may need to add a G4 S1 delay between these commands.
@tomf said in XY shift after power fail:
G29 S1 ; Set Units to Millimeters
The command doesn't match the comments here. You should remove that G29 S1 from config.g. You don't want to load the mesh until you've established Z0 with the probe anyway. Load it in your start gcode after homing and leveling.
@tomf said in XY shift after power fail:
M552 P192.168.1.144 S1
Remove the S1, it's already on the previous line.
@tomf said in XY shift after power fail:
; Tools
M563 P0 D0 H1 F1 ; 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 0CM950 H1 C"out1" T1 ; create nozzle heater output on out2 and map it to sensor 1
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H1 S280 ; set the maximum temperature in C for heaterYour tools are defined before the heater is created. The tool definition should come after.
That should take care of the errors in your config.g
-
@phaedrux said in XY shift after power fail:
@tomf said in XY shift after power fail:
G32 ; MESH BED LEVELLING
Can you post your bed.g file as well?
Here is my bed.g file:
; this script compensates for what the Z offset is
; so if G31 P500 X-30 Y-15 Z1.7 then first probe will be at
; X30 Y20 (when G30 P0 X0 Y5)M561 ; clear any bed transform
G30 P0 X10 Y10 Z-99999 ; probe near a leadscrew
G30 P1 X150 Y280 Z-99999 ; probe near a leadscrew
G30 P2 X270 Y10 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors -
Have you tested yet with a file that doesn't have object cancelation ?
-
@tomf said in XY shift after power fail:
Not sure what to do from here.
Well, look where the weird offset originates from. At least, we now can exclude some culprits:
- config.g - this file is run by the MCU after each reset of power-off, setting the system into a consistent state
- homex.g and homey.g - these cannot produce the offsets, a fact you have verified with your "double power failure" experiment.
- start.g (and the purging section in the slicer's start code). You've tested and modified that as well.
That's a lot of gcodes we now can ignore. Furthermore, resurrect.g does a pretty good job in freezing the state of all imaginable parameters it holds in its object model - it works as expected (see your second "power failure).
Which brings me to the following thesis: from the view of RepRap, the x/y coordinates prior to a power failure are "wrong" (i.e. unknown to the object model). Either you execute a macro I'm not aware of before starting the print - must then be something very special
ā¦ Or the slicer "knows" something about your printer's geometry which the object model of the Duet isn't aware of, i.e. nozzle offsets etc. When resurrect.g is called, it jumps right into the middle of the print file, thus ignoring the foreplay which the slicer celebrates at the beginning.To verify my thesis, you could strip-off the intro from the .gcode file - use a bare text editor, look for the first G1 codes with X, Y and E parameters. But caution: the nozzle height must be prepared to fit for the first layer, so set Z to something like 0.2 mm before running the stripped .gcode file.
If you think this is too risky, go through the prefs of your slicer (can't give you hints, I have no knowledge of SuperSlicer) and look for any X/Y offsets you inserted for your printer: nozzle, center of printhead, Z-probe, etc. Maybe you get a clue? Then, slice again.
Good luck!
-
@phaedrux said in XY shift after power fail:
Have you tested yet with a file that doesn't have object cancelation ?
Yes. In the test in reply to @infiniteloop from 25 Jan @07:40 EST I commented out the M486 lines and it didn't help.
-
Might be onto something... but how to fix??
Having done lots of tests I wondered if I had missed something so I decided to re-run some again. Photo for test #5 is the interesting one but I'll run through the others.
-
Superslicer with all normal start gcode, inclusive of XYZ homing, mesh levelling and prime line, but no going outside the XY boundaries for the prime line. Power off mid print, move head out the way manually and restart using M916. Result is that the offset is the same as before (X-.3, Y-3.5)
-
As 1 but comment out the M486 'cancellation' lines in ressurect.g. Same result.
-
As 1 but delete the M564 S0 code from ressurect-prologue.g (I had left it in from previous tests). Same result
-
Comment out the home and mesh levelling routines from the slicer. Manually home, but no mesh levelling. No change.
-
As 4 but also comment out the prime lines. NO LAYER SHIFT, hooray!
-
Repeat 5. Unfortunately this time the layer shift was back as before.
Clearly very odd, but I noticed something that had been happening but that I was ignoring. I was getting error messages (2 examples below, the second relates to test 6) EXCEPT that there was no error message associated with test 5.
"
Error: in file macro line 31 column 12: M486: non-empty string expected
File 0:/gcodes/rr_M-test 3B 0.4n_0.2L_PLA_15m_4g.gcode selected for printingressurect.g line 31:
M486 S0 A"M-test 3 id:0 copy 0"
"
"
Error: in file macro line 31 column 12: M486: non-empty string expected
File 0:/gcodes/rr_M-test 3C 0.4n_0.2L_PLA_15m_4g.gcode selected for printingressurect.g line 31:
M486 S0 A"M-test 3 id:0 copy 0"
"
I have no idea what might be going on, but the fact that this seems intermittent is concerning. Any suggestuins? -
-
Have you tried with a different slicer?