Homing Inconsistent Duet 3



  • Im having some weird issues with the Duet 3 where homing each axis and home all will work fine on one unit while others it will work 95% of the time if you home each axis individually and fail most of the time if you hit home all. It seems that the only differences is that some units are running DSF versions 1.1.0.5 on the one that is working fine while the others are running 1.2.3.0 and 1.2.4.0 and the one that is working fine has a 3B+ while the others have 3B Pis. All are running the same config and homing files. Also when it fails sometimes the Web interface will just hang, sometimes it homes the first axis but the web interface never acknowledges it triggers and will get stuck as "Busy" and the unit will need to be restarted.

    Any ideas would be greatly appreciated, I feel like Im missing something extremely simple

    G21						;Work in millimetres
    G90						;Send absolute coordinates...
    M83						;...but relative extruder moves
    
    ; Axis and motor configuration
    M569 P0 S1					;Drive 0 X / Rear
    M569 P1 S1					;Drive 1 Y / Front
    M569 P2 S1					;Drive 2 Z Front Left
    M569 P3 S1					;Drive 3 Z Rear Left
    M569 P4 S1					;Drive 4 Z Right
    M569 P5 S1					;Drive 5 Extruder
    M667 S1						;corexy mode
    
    M584 X0 Y1 Z2:3:4 E5			; Map X to drive 0 Y to drive 1, Z to drives 2, 3, 4, and E to drive 5
    ;Leadscrew locations
    M671 X-38:-38:340  Y62.5:247.5:139 S7.5		;X -38, -38, 340
    
    M350 X16 Y16 Z16 E16 I1				;set 16x microstepping for axes with interpolation
    M906 X1400 Y1400 Z1200 E1500 I60			;Set motor currents (mA)
    M201 X2000 Y2000 Z100 E1500			;Accelerations (mm/s^2)
    M203 X24000 Y24000 Z900 E3600			;Maximum speeds (mm/min) 
    M566 X1000 Y1000 Z100 E1500			;Maximum jerk speeds mm/minute E60 Z60
    M208 X300 Y300 Z400				;set axis maxima and high homing switch positions
    M208 X0 Y0 Z0 S1				;set axis minima and low homing switch positions
    ;M92 X200 Y200 Z1600 E819.5			;steps/mm
    M92 X200 Y200 Z800 E830			;steps/mm 0.9 z
    
    
    ; End Stops
    M574 X1 S0 P"io3.in"				
    M574 Y2 S0 P"io1.in"				
    
    ; Thermistors
    M308 S0 P"temp0" Y"thermistor" A"bed_heat" T100000 B4240 H0 L0 		;Bed thermistor
    
    M308 S1 P"temp1" Y"thermistor" A"e0_heat" T100000 B4725 C7.06e-8 H0 L0	
    
    
    ;Define Heaters
    M950 H0 C"out0" T0				
    M950 H1 C"out1" T1				
    
    M307 H0 A90.0 C700.0 D10.0 S1.00 B1 		
    M307 H1 A548.8 C298.6 D4.6 S1.00 B0 		
    
    M570 S360					
    M143 S285								
    
    ; Fans
    M950 F0 C"out4"					;Hotend fan on "out4" connector
    M106 P0 S255 H1 T50 				;enable thermostatic mode for hotend fan
    M950 F1 C"out5"					;Layer fan on "out5" connector
    M106 P1 S0 					;Layer Fan
    M950 F2 C"out6"					;Layer fan on "out6" connector
    M106 P2 S0 					;Layer Fan
    
    ; Tool definitions
    M563 P0 D0 H1 F1:2                        	;Define tool 0
    G10 P0 S0 R0                        		
    
    ;BLTouch
    ;M558 P9 C"io7.in" H5 R1 F50 T6000 A5 S0.02 B1	
    ;M950 S0 C"!io7.out"				
    M950 S0 C"io7.out" 
    M558 P9 C"io7.in" H10 F120 T3600 
    G31 X-10 Y66 Z3.1 P25 ; 				
    
    
    M557 X66:250 Y66:250 S92
    
    M501
    
    T0						;select first hot end```
    
    

    Home All

    G91                       ; relative mode
    G1 Z5 H2 F400			  ; Move down 5mm in Z 
    G1 H1 X-320 Y320 F1200   ; course home X or Y 
    G1 H1 X-320               ; course home X	   
    G1 H1 Y320               ; course home Y      
    G1 X5 Y-5 F1200             ; move away from the endstops
    G1 H1 X-10                ; fine home X        
    G1 H1 Y10                ; fine home Y        
    
    
    
    G90                       ; back to absolute mode
    
    G91
    G1 Z5 F200 H2             
    G90
    G1 X150 Y150 F6000 
    G30
    

    Home X

    G91
    G1 Z5 F200 H2   	
    G1 X-320 F3000 H1 	
    G1 X5 F600
    G1 X-10 H1 			
    G1 Z-5 F200 H2 		
    G90
    

    Home Y

    G91
    G1 Z5 F200 H2		
    G1 Y320 F3000 H1	
    G1 Y-5 F600
    G1 Y10 H1			
    G1 Z-5 F200 H2		
    G90
    

    Home Z

    G91
    G1 Z5 F800 H2			
    G90
    G1 X150 Y150 F2400
    G30
    G1 Z2 F200
    


  • The config tool generates homeall like that. Nothing wrong with it, but... I'd consider changing homeall to something like:

    M98 P"/sys/homex.g"
    M98 P"/sys/homey.g"

    etc, etc.



  • Also, I'd apt-get everything to the latest. Be sure you are on the "unstable" channel:

    https://duet3d.dozuki.com/Wiki/Getting_Started_With_Duet_3#Section_Software_Installation



  • @Danal thanks for the suggestions, the issue with apt-get everything is g32 read outs aren't reported after the system updates to 1.2.4.0. also we are running duetpi which I believe the documentation states that process is unneeded.



  • @projectR3D said in Homing Inconsistent Duet 3:

    we are running duetpi which I believe the documentation states that process is unneeded.

    would depend on the age of the image; at least the early ones only tracked the stable repo even before the 3.0 release.



  • @bearer all of the images have been between the end of January until now.

    The newest images have been the ones with the most issues.



  • Understood on the G32. I have lost those as well... living without for now.

    Anyway, I would give a try to the homeall calling all the other files.



  • @projectR3D said in Homing Inconsistent Duet 3:

    @bearer all of the images have been between the end of January until now.
    The newest images have been the ones with the most issues.

    tbh I don't know when/if they changed it, but you can check the files in /etc/apt/ to see if you have stable + unstable or just the one.

    pi@duet3:~ $ grep duet3d -r /etc/apt
    /etc/apt/sources.list.d/duet3d.list:#deb https://pkg.duet3d.com/ stable armv7
    /etc/apt/sources.list.d/duet3d-unstable.list:deb https://pkg.duet3d.com/ unstable armv7
    Binary file /etc/apt/trusted.gpg.d/duet3d.gpg matches
    pi@duet3:~ $
    


  • @Danal I will give it a try, thank you



  • @bearer ill Take a look thanks!



  • have a similar issue.
    reported here

    @tobias_munich said in RepRapFirmware 3.01-RC3 released:

    homeall.g issues:

    some times my homeall.g is not working correctly. its straight forward (see below).
    it does the 1st line (homex.g) correctly and sometimes it goes directly to the last line homez.g without executing the 2nd line (homey.g)

    no problem if i run each script separately .

    M98 P"homex.g"
    M98 P"homey.g"
    M98 P"homez.g"
    


  • Update:
    I played around and changed the order of homing x and y in my homall.g
    it was ok for 2 days. But today in the morning I had the problem again.
    would say in 95% of the cases its ok and randomly it fails.

    homall.g definitely has a problem.this macro looses lines to execute.

    next step; I will setup a separat macro with the same content. lets see what's happend
    surprise, surprise.


  • administrators

    I think this needs attention from @chrishamm because as far as i can see, only users running DSF+RPi are experiencing this problem. But here is a wild guess: what happens if you put another command between each pair of M98 calls, for example M400?


  • administrators

    another thing to look at is the DSF log when this happens, it may shed some light.

    if you do

    sudo journalctl -u duetcontrolserver -f
    

    In a console on the Pi you will see the latest log entries for duet control server. As a macro is called and expanded each command will show in the logs. It will be helpful to see if there is a difference between when a macro works and it does not.



  • @projectR3D said in Homing Inconsistent Duet 3:

    M201

    i had a similar issue. decreasing x and y acceleration (M201) helped.



  • I run a Pi 4, when I've encountered this and when looking for anything useful in the journals the cupboard is bare, the control server is basically disconnecting from the duet it seems, it doesn't see the problem and logs no error. My theory is that it sees no response from the Duet and remains 'busy' which locks out any other commands, it never times out but it sees no error since it hasn't actually crashed.

    The only way to recover is to either reboot or use sudo systemctl restart duetcontrolserver in a terminal window, then the system will respond again, like the OP most of the times I have seen this is during homing operations which aren't particularly complex in communication terms. This works not because the control server has failed but because the item holding / excluding other actions is forcibly removed from the queue.

    This behaviour is random and unpredictable and I've yet to find a trigger, we could do with a way to make the control server reporting a little more verbose - i.e to log all commands sent, responses received - to log the conversation.


  • administrators

    @Garfield ok, yes if DCS hangs then it does not log. This is a different issue to one we had much earlier on i think. It would be worth trying what @dc42 suggested and putting a M400 between macro calls to see if that solves the issue.

    How deep are your macros nested, like homeall->homez->deployprobe->(somecustommacro)->anothercustommacro...?



  • I have no macro nesting at all currently my homing files are all separate with no M98 calls, I don't use deployprobe (don't see such a macro anyway or knowingly call it).

    I'm not sure the DCS is hanging - p[retty sure that when I ran sudo systemctl status duetcontrolserver it comes back as 'running' but next time it does this I shall confirm exactly what status returns.

    I shall also try the M400 (once I've seen the error again - problem is that I can't reproduce it at will).



  • @dc42 (M400) thats a good point. will test it.
    and good to know, that you have it on your list, many thanks.

    but again. it's not a major issue. the homing scripts are working independently very well



  • I'm a Duet 3 user, with SBC and single 3HC, 3.01 RC3, DSF 1.2.4

    My homing is now consistently bugged when using the homeall.g command, regardless of whether I call individual macros or not.

    It happens on my X-axis, and behaves like the X Limit Switch is pressed, immediately stopping when X is homed.

    I have verified using the machine-specific diagnostics that the trigger is not being pressed, and I've confirmed that it does register correctly when I use my homex.g command and I can see it press, as well as manually pressing it.

    I've tried M400 as well as changing homeall.g to incorporate the gcode from homeX, same result, it behaves like the button is always pressed but then processes homeY+homeZ appropriately.

    Something weird is afoot here!



  • @Luke-sLaboratory said in Homing Inconsistent Duet 3:

    I'm a Duet 3 user, with SBC and single 3HC, 3.01 RC3, DSF 1.2.4

    My homing is now consistently bugged when using the homeall.g command, regardless of whether I call individual macros or not.

    It happens on my X-axis, and behaves like the X Limit Switch is pressed, immediately stopping when X is homed.

    I have verified using the machine-specific diagnostics that the trigger is not being pressed, and I've confirmed that it does register correctly when I use my homex.g command and I can see it press, as well as manually pressing it.

    I've tried M400 as well as changing homeall.g to incorporate the gcode from homeX, same result, it behaves like the button is always pressed but then processes homeY+homeZ appropriately.

    Something weird is afoot here!

    @Luke-sLaboratory please post your config.g, and homing files.



  • @Danal

    ; Drives
    M569 P0.1 S1                    ; physical drive 0.1 goes forwards XY
    M569 P0.0 S1                    ; physical drive 0.0 goes forwards XY
    M569 P0.2 S0                    ; physical drive 0.2 goes forwards Coupler
    M569 P0.3 S1				    ; physical drive 0.3 goes backwards Z
    M569 P0.4 S1				    ; physical drive 0.4 goes backwards Z
    M569 P0.5 S0                    ; physical drive 0.5 goes backwards Z
    M569 P1.0 S0					; Extruder 1
    M569 P1.1 S0					; Extruder 2
    M569 P1.2 S0					; Extruder 3
    M584 X0.1 Y0.0 Z0.3:0.4:0.5 C0.2 E1.0:1.1:1.2                     ; set drive mapping
    M350 X16 Y16 E16:16:16 I1                      						  ; configure microstepping with interpolation
    M350 Z16 C8 I0														  ; No interpolation on Z Axis
    M92 X160.00 Y160.00 Z1600.00 E409.00:409.00:409.00 C100         ; set steps per mm
    M566 X900 Y900 Z600 E1800:1800:1800 C2          ; set maximum instantaneous speed changes (mm/min)
    M203 X50000.00 Y50000.00 Z840 E10800.00:10800:10800 C5000   ; set maximum speeds (mm/min)
    M201 X2000.00 Y2000.00 Z18 E2500:2500:2500 C400      ; set accelerations (mm/s^2)
    M906 X2300 Y2300 Z1800 E1100:1100:1100 C600 I60             ; set motor currents (mA) and motor idle factor in per cent
    M84 S120                                      ; Set idle timeout
    
    ;Stall Detection
    M915 C S3 F0 H200					; Coupler
    
    ; Axis Limits
    M208 X-17 Y-15 Z0 C0 S1                             ; set axis minima
    M208 X622 Y660 Z950 C500 S0                       ; set axis maxima
    M671 X290.0:-32:627 Y658:185:186 S20 ; leadscrews at rear middle, front left+right
    
    ; Endstops
    M574 X1 S1 P"!io2.in"                         ; configure active-low endstop for low end on X via pin io2.in
    M574 Y1 S1 P"!io0.in"                         ; configure active-low endstop for low end on Y via pin io0.in
    ;M574 Y2 S1 P"!io1.in"			      ; configure active-low endstop for high end on Y via pin io1.in
    
    ;Tool Presence Checking
    M950 J"io4.in"
    
    ; Z-Probe
    
    M558 P5 C"io3.in" H10 F120 T3600      ; set Z probe type to simp switch and the dive height + speeds
    G31 X0 Y0 Z0 P200                        ; set Z probe trigger value, offset and trigger height
    ;M557 X15:600 Y15:600 S30                     ; define mesh grid - Whole Bed
    M557 X220:400 Y220:400 S50                     ; define mesh grid - Center Small
    

    for my homeall

    G91                     ; relative positioning
    G1 H2 Z5 F600          ; lift Z relative to current position
    G90
    M400
    M98 P"homex.g"
    M400
    M98 P"homey.g"
    M400
    M98 P"homez.g"			; this will leave it 5mm above the bed
    M400
    M98 P"homec.g"
    
    

    HomeX.g - same thing for homey just in y - comments are to try to diagnose this issue.

    M400
    ;M913 X40 Y40
    G1 H1 X-800 F6000 ; move quickly to X axis endstop and stop there (first pass)
    G1 X5 F3600       ; go back a few mm
    G1 H1 X-627 F360  ; move slowly to X axis endstop once more (second pass)
    M400
    ;M913 X100 Y100
    


  • Looks pretty much exactly like mine on the Jubilee:

    ; Home X Axis
    
    G91                     ; Set relative mode
    G1 X-999 F6000 H1       ; Big negative move to search for endstop
    G1 X4 F600              ; Back off the endstop
    G1 X-10 F600 H1         ; Find endstop again slowly
    G90                     ; Set absolute mode
    G1 X0 F6000
    

    I do see an interesting difference in our config.g: Your X endstop:
    M574 X1 S1 P"!io2.in" ; configure active-low endstop for low end on X via pin io2.in

    Mine:
    M574 X1 S1 P"io1.in" ; Set homing switch configuration X1 = low-end, S1 = active-high (NC)

    I'm wondering why the invert, the "!"... Are your switches "normally closed"? If they are "normally open", I wonder if the input pin is picking up noise when the motors are moving? I'd switch the physical wiring to "normally closed"... but, as a quick test, maybe add pullup to your definition and see what happens?
    M574 X1 S1 P"!^io2.in"

    P.S. I notice you are using io0.in for Y endstop. Documentation says don't use 0, it is reserved for PanelDue. However, I have used it; I missed that document at first. It seemed to work just fine.



  • @Danal

    Normally Open - My RB's were wired like that and I stick with it. no other reason than that.

    Not going to say its 100% not the wiring, but this is a setup that has been fully working for a few months without changes, including the io0.in, but you're right, I could move that.

    This works 100% of the time I just home X, using the script. If it was mechanical/electrical, I would expect it to behave similarly with the single call.

    I'll give pullup a try, but I'm not confident it will make a difference.



  • @Luke-sLaboratory said in Homing Inconsistent Duet 3:

    M201 X2000.00 Y2000.00 Z18 E2500:2500:2500 C400

    have you tried reducing accelerations?


Log in to reply