Strange homing behavior



  • Hi *,

    I want to start a new thread here, the former one was in the complete wrong direction. Excuse me!

    Problem ( Short): The probe (ir probe) get triggered in the air when I "home all" not at "home Z".
    (Long): I restart the printer, press on "homeall" in the gui. The printer homes XY in parallel at and stops close to X5 Y5. The homeall executes "/sys/homez.g" than. This drives the head to "Y155 X155". Here comes the first strange thing: The IR probe flash one time the red LED while it moves. (Why?) It lifts the head a bit up and starts the probing with "G1 H1 Z-500 F300". The probe action get triggered always after some millimeter but far away from the bed. No second run is executed, I think that the first flash, while it moves, it the first probe.
    The homez.g alone works as expected, whether the head is at "Y155 X155" or somewhere else.

    Any ideas why the homez.g called from the homeall.g works differently than executed without it?

    Setup:
    Duet 2 FW: 3.1.1 IR Probe
    Printer: CR10

    Homeall.g

    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-315 Y-315 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H2 X5 Y5 F6000       ; go back a few mm
    G1 H1 X-315 Y-315 F360  ; move slowly to X and Y axis endstops once more (second pass)
    
    M98 P"0:/sys/homez.g"
    

    homez.g

    G90
    G1 Y155 X155 F6000 ; go to first probe point
    M400
    G91               ; relative positioning
    
    ; First probe:
    G1 H2 Z5 F6000    ; lift Z relative to current position
    G1 H1 Z-500 F300 ; move Z down until the endstop is triggered
    ; probe again:
    G1 H2 Z5 F6000    ; lift Z relative to current position
    G1 H1 Z-500 F60 ; move Z down until the endstop is triggered
    G1 Z5 F250
    

    Cheers, Chriss



  • @Chriss

    Btw: The bed surface is Pertinax, a blank sheet of paper makes no difference.



  • You are using probe to home z. So dont use G1 moves in homez.g, just probe the bed - G30
    Assuming your probe is configured as probe.



  • @aidar

    Yes, that was a setup I tried too.:

    homez.g

    G90
    M300 S800 P100
    G1 Y155 X155 F6000 ; go to first probe point
    M300 S300 P300
    M400
    M600 S800 P500
    G91               ; relative positioning
    
    G91               ; relative positioning
    G1 H2 Z10 F6000    ; lift Z relative to current position
    G90               ; absolute positioning
    G1 Y155 X155 F6000 ; go to first probe point
    G30               ; home Z by probing the bed
    M558 F60          ; Chriss - set the down speed
    G30 
    M558 F350         ; Change the speed back
    

    I have exactly the same behavior, the head goes down only once and I get this error:
    Error: Z probe already triggered at start of probing move

    And "Z0" is somewhere up in the air.

    The probe config from config.g;

    ; Z-Probe
    M558 P1 C"zprobe.in" H5 F120 T6000
    G31 P500 X-26.0 Y-9.0 Z1.85					; Z-probe location and offset
    M557 X10:270 Y40:270 P5:5
    

    Edit: And the IR-Probe blinks one time during the travel to X155 X155.



  • @Chriss my guess is

    I would check two things:

    I would try setting a ^ in the M558:
    M558 P1 C"^zprobe.in" H5 F120 T6000
    to activate pullup.

    In homez the second G30 at the same height means the sensor is activated immediatelly because it is still at the same height. But to find the end position you need deactivated-move-activate->found 0 position, so I would add something like:

    G1 Y155 X155 F6000
    G30
    M558 F60
    G1 H2 Z10 F6000 ; <= this Z movement here added
    G30
    M558 F350



  • @JoergS5

    Thanks for your opinion, but I guess you did not understand my text.
    The head do not goes down a second time at X155 Y155.
    The probe blink one time during the travel and a second time at the destination which ends up in the air.

    I added the G1 for testing but this did not change anything.

    I'm sooo confused, the homez.g works fine as long as it is not executed by the homeall.g.

    Cheers, Chriss



  • @Chriss please see my post, I changed my answer while you answered. Please try the ^ addition.



  • @JoergS5

    Yes.... thanks for the heads up.

    I changed (again) the M558 and added the "^".

    I simplified the homez.g a bit. This is the remaining code:

    G90
    M300 S800 P100
    G1 Y155 X155 F6000 ; go to first probe point
    M300 S300 P300
    M400
    M600 S800 P500
    G91               ; relative positioning
    M558 F60          ; Chriss - set the down speed
    G30 
    M558 F350         ; Change the speed back
    

    With the same result, the probe get triggered up in the air. It doesn't make and difference whether I have a the "G1" you mention added or not.

    The files works fine as long as I do not call if from homeall.g.
    Btw: It is "broken" when I copy the commands into the homeall.g too.

    Cheers, Chriss



  • @Chriss are you sure you have not two homez on you sdcard and take the wrong one?



  • @JoergS5

    I do not think that I can have two files with the same name in the same directory on a FAT filesystem. 😉
    And it makes no difference whether the code is hosted directly in the homeall.g or if I execute the homez.g from the homeall.g. I still wounder about the single blink of the IR-Probe in the travel.

    Btw: The IR Probe blinks 4 times when it starts up. I'm not sure that this is correct. I have something on top of my head that there was something like "analog mode (less than 4 blinks) with or without the pullup (^)". :?



  • @Chriss I didn't mean two files in the same directory, but one in sys, one in root. Please check whether you have files in your root directory...



  • @JoergS5 Guten Abend. 😉

    Well, I think that I got your point, but this is not the case:

    150 Here comes the directory listing.
    drw-rw-rw- 1 ftp ftp             0 May 13 2020 gcodes
    drw-rw-rw- 1 ftp ftp             0 May 13 2020 macros
    drw-rw-rw- 1 ftp ftp             0 May 13 2020 sys
    drw-rw-rw- 1 ftp ftp             0 May 13 2020 System Volume Information
    drw-rw-rw- 1 ftp ftp             0 May 13 2020 www
    -rw-rw-rw- 1 ftp ftp          5734 Aug 08 2018 DuetDriverFiles.zip
    drw-rw-rw- 1 ftp ftp             0 May 12 2020 .Trash-1000
    drw-rw-rw- 1 ftp ftp             0 May 15 2020 filaments
    226 Transfer complete.
    ftp> 
    

    I added some eyecatcher code (some extra movement) to the homez.g, I see that eyecatcher when I execute homez.g and homeall.g. So there is no other file/config involved here.



  • @Chriss Ebenfalls Guten Abend!

    Sorry for my crazy ideas, I try to find the reason also...
    I don't know a difference between running in homeall and calling a macro containing the commands. In fact, some users use homeall to put in solely three calls to the homex/y/z macros.

    Back to the sensor: is it the Duet sensor? Do you know David's blog https://miscsolutions.wordpress.com/mini-height-sensor-board/
    This may give some more hints.



  • @JoergS5

    It is official now, it is snowing in hell!

    I played a bit with that extra move.. just for fun to see where the extra blink comes up and where not bla bla....

    So I added "G1 Y300 X300 F6000" on top of the homez.g. Again, just for fun. So the printer homes XY (0) via homeall.g and travels than to the other site of the bed. Instead of going straight to the center.
    And you know what? It worked now 3 times in a row. I will play a bit more....



  • But I still think that there is a difference between homeall.g and homez.g.

    I have changed the homez.g a bit. I have now a "run 1" with a "G1 H1" and a little lift of that afterwards. Than the "run 2" with the "G30":

    G90
    
    M300 S800 P100
    G1 Y155 X155 F6000 ; go to first probe point
    M300 S300 P300
    M400
    M600 S800 P500
    G91               ; relative positioning
    
    ; Run 1
    G1 H1 Z-500 F200 ; move Z down until the endstop is triggered
    G1 H2 Z5 F6000    ; lift Z relative to current position
    M400
    
    ; Run 2
    M558 F60          ; Chriss - set the down speed
    M600 S800 P2000		; beep
    G30 
    M558 F350         ; Change the speed back
    
    

    Step one get executed whether I call homez.g or homeall.g, but "step 2" produces a:

    Error: Z probe already triggered at start of probing move
    

    WHEN I execute it via homeall.g. It works fine when I execute homez.g.

    :?



  • @Chriss so homeall sets some precondition which is different from when you call only homez. So need "only" shorten homeall until you find the reason...


  • Moderator

    How have you wired the probe?

    Please post your full config.g

    G1 H1 Z-500 F200 ; move Z down until the endstop is triggered
    Do not use G1 H1. It is for endstop and negates all of the probe settings.



  • @JoergS5
    Yes, that was my idea too, bit look at it, there is not much to remove without making it completely useless. I need a homed X and Y to move Z.

    @Phaedrux said in Strange homing behavior:

    How have you wired the probe?

    I connected it to "zprobe.in", VCC and GND from the same connector. The ir-probe is much more user-friendly than the bl-touch. 😉

    I do not expect a problem with the ir-touch itself, it worked more than 99,998% if I use "homez.g"

    Please post your full config.g

    You will find it at the end.

    G1 H1 Z-500 F200 ; move Z down until the endstop is triggered
    Do not use G1 H1. It is for endstop and negates all of the probe settings.

    I changed the config a bit this morning. I have now:

    Homez.g

    G90
    G1 Y155 X155 F6000 ; go to first probe point
    M400
    G91               ; relative positioning
    
    ; Run 1
    M558 F250          ; Chriss - set the down speed
    G30
    
    ; Run 2
    M558 F60          ; Chriss - set the down speed
    M600 S800 P2000		; beep
    G30 
    M558 F350         ; Change the speed back
    

    And homeall.g

    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-315 Y-315 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H2 X5 Y5 F6000       ; go back a few mm
    G1 H1 X-315 Y-315 F360  ; move slowly to X and Y axis endstops once more (second pass)
    
    
    M98 P"0:/sys/homez.g"
    

    config.g

    ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sun May 10 2020 08:05:32 GMT+0200 (Central European Summer Time)
    
    ; General preferences
    G90                                            ; send absolute coordinates...
    M83                                            ; ...but relative extruder moves
    M550 P"Homer"                                  ; set printer name
    
    ; Network
    M552 S1                                        ; enable network
    M586 P0 S1                                     ; enable HTTP
    M586 P1 S1                                     ; enable FTP
    M586 P2 S1                                     ; enable Telnet
    
    ; Drives
    M569 P0 S0                                     ; physical drive 0 goes backward
    M569 P1 S1                                     ; physical drive 1 goes forwards
    M569 P2 S1                                     ; physical drive 2 goes forwards
    M569 P3 S1                                     ; physical drive 3 goes forwards
    
    M584 X0 Y1 Z2:9 E3                             ; Chriss - set drive mapping two Z motors connected to driver outputs E6(9) and Z(2)
    M671 X-28:330 Y155:155 S5.5                    ; Chriss - leadscrews at left (connected to E6(9)) and right (connected to E2) of X axis (S=MaxCorrection)
    
    M350 E16 I0                                    ; Chriss - without interpolation
    M350 X16 Y16 Z16 I1                            ; Chriss - configure microstepping with interpolation
    M92 X80.00 Y80.16 Z400.00 E431.06              ; Chriss - set steps per mm 2560     From Bondtech: E409.51   Original: E137.81 Calulator:
                                                   ; https://3d-druck-archiv.de/blog/grundlagen-3d-druck/steps-fuer-x-y-z-achse-einstellen-ueberpruefen-247
                                                   ; https://selbstgedruckt.de/berechnungstools/
    M566 X900.00 Y900.00 Z12.00 E120.00            ; Chriss - set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z800.00 E1200.00        ; Chriss - set maximum speeds (mm/min) Z180
    M201 X500.00 Y500.00 Z20.00 E250.00            ; Chriss - set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30                   ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                        ; Set idle timeout
    
    ; Axis Limits
    M208 X0:310 Y0:300                             ; Chriss - X carriage moves from 0 to 310, Y bed goes from 0 to 310
    
    ; Endstops
    M574 X1 S1 P"xstop"                            ; configure active-high endstop for low end on X via pin xstop
    M574 Y1 S1 P"ystop"                            ; configure active-high endstop for low end on Y via pin ystop
    M574 Z1 S2                                     ; configure Z-probe endstop for low end on Z
    
    ; Z-Probe IR Probe
    M558 P1 C"^zprobe.in" H5 F120 T6000
    G31 P500 X-26.0 Y-9.0 Z1.85					; Z-probe location and offset
    ; M564 S0 to disable axis limits.
    ;https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe
    
    ;M557 X10:270 Y40:270 P10:10                     ; Chriss - define mesh grid
    M557 X10:270 Y40:270 P5:5
    ;M557 X10:270 Y40:270 P2:2
    	     		                               ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M557_Set_Z_probe_point_or_define_probing_grid
    
    ;; Heaters
    ;BED
    M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T0                          ; create bed heater output on bedheat and map it to sensor 0
    M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
    M307 H0 A245.4 C400.5 D1.3 S1.00 V24.1 B0	   ; Chriss - Disable bang-bang, tuned with "M303 H0 S80"
    											   ; https://duet3d.dozuki.com/Guide/Ender+3+Pro+and+Duet+Maestro+Guide+Part+4:+Calibration/40#s161
    M140 H0                                        ; map heated bed to heater 0
    
    ; Hotend
    M308 S1 P"e0temp" Y"thermistor" T100000 B4138  ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1                           ; create nozzle heater output on e0heat and map it to sensor 1
    M143 H1 S280                                   ; set temperature limit for heater 1 to 280C
    M307 H1 A461.2 C156.1 D3.1 S1.00 V24.0 B0		; Chriss - tuned with "M303 H1 S250"
    
    
    ;; Fans
    ; Fan for the printed part:
    M950 F0 C"duex.fan4" Q500                           ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S0 H-1                                 ; set fan 0 value. Thermostatic control is turned off
    ; Fan for the Hotend;
    M950 F1 C"duex.fan3" Q500                      ; F="create fan 1" C="on pin duex.fan3" Q="and set its frequency"
    M106 P1 S1 H1 T45 C"Hotend"                    ; P="set fan 1" S="value" H="Thermostatic control Heater No." T=" is turned on at 45°C"
    
    
    
    
    ;; Tools
    ; Tool 0
    M563 P0 S"Extruder" D0 H1 F1                   ; define tool 0 (Fan F1  is bonded automatically)
    G10 P0 X0 Y0 Z0                                ; set tool 0 axis offsets
    G10 P0 R0 S0                                   ; set initial tool 0 active and standby temperatures to 0C
    
    ;; Filament Sensors - https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_filament-out_sensors
    ; Sensor 0
    M591 D0 P1 C"e0_stop" S1  						; filament monitor connected to E0_stop
    
    
    
    ;; Misc
    ; Configure Port for the PaneDuo
    M575 P1 B57600 S1 
    
    ;; EOF
    

  • Moderator

    Do you have a Duex? M584 X0 Y1 Z2:9 E3 Drive 9?
    If so, you may want to define it here:

    ; Drives
    M569 P0 S0                                     ; physical drive 0 goes backward
    M569 P1 S1                                     ; physical drive 1 goes forwards
    M569 P2 S1                                     ; physical drive 2 goes forwards
    M569 P3 S1                                     ; physical drive 3 goes forwards
    

    M350 E16 I0 No interpolation for the poor extruder?

    The M140 must come before the M143 for your bed heater.

    ;BED
    M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T0                          ; create bed heater output on bedheat and map it to sensor 0
    M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
    M307 H0 A245.4 C400.5 D1.3 S1.00 V24.1 B0	  
    M140 H0                                        ; map heated bed to heater 0
    

    M600 isn't a beep. It's a filament change pause.
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M600_Filament_change_pause

    ; Run 2
    M558 F60          ; Chriss - set the down speed
    M600 S800 P2000		; beep
    G30 
    M558 F350         ; Change the speed back
    

    You'd want M300
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M300_Play_beep_sound

    I'm actually wondering if some of your comments are being parsed strangely. The forum code block gets pretty confused by them as you can see, but when I copied and pasted it into a text editor with gcode highlighting it detected the comments ; correctly. Not sure how the Duet gcode parser could be handling it. Might be worth cleaning up your comments to be rather minimal particularly in the area where the URLs are.

    Can you send M558 P1 and G31 and see if it echoes back the same values as in config.g?



  • @Phaedrux said in Strange homing behavior:

    Do you have a Duex? M584 X0 Y1 Z2:9 E3 Drive 9?

    Indeed, I have one and it is connected. 😉

    If so, you may want to define it here:
    [...]

    Added

    M350 E16 I0 No interpolation for the poor extruder?
    I had some strange behaviors in the past with the original extruder. That may be different now with the bondtech. Well, I added it. Lets see later how that works now.

    The M140 must come before the M143 for your bed heater.
    [...]

    Done!

    M600 isn't a beep. It's a filament change pause.
    [...]

    You are right, my bad. I wanted to change the frequency, which ended in the "double comand" and not "double frequency". Typo, I removed all of the beeps in the meantime anyway. They where for debug only anyway.

    I'm actually wondering if some of your comments are being parsed strangely.
    [...]

    Indeed, that is a very good idea. I removed all the URLs and removed other things like "°". Just in case, that would not be the first time that I have bombed a parser with unexpected characters. 😉

    Can you send M558 P1 and G31 and see if it echoes back the same values as in config.g?

    42060566-c9f6-48ee-adea-5d1ca9c8db22-image.png

    Update:
    I tested/played a bit with the setup to understand the behavior better.
    Let me describe it like that: The "homeall.g" seems to work from time to time when "z" is not far away from the bed surface. But sometimes it drives into the bed.
    It seems that it gets triggered in the air only when "z" is more than 10cm away from the bed when I power on the printer. It works or drives into the bed when the head is below 5cm away from the bed.
    Did it make myself clear?
    Does that makes any sense to you?

    Cheers, Chriss


  • Moderator

    I thought we would at elast get something back from M558 P1.

    Please try sending the full M558 command from your config.g in the console.

    I can't remember if I asked before, but can you send M98 P"config.g" and see what you get for errors and messages?



  • @Phaedrux said in Strange homing behavior:

    I thought we would at elast get something back from M558 P1.

    Please try sending the full M558 command from your config.g in the console.

    I did not fully understand what you mean. 😞 I added "M558 P1" at the end of config.g, without any result. I do not see any output of that, nowhere.

    I tried telnet:

    [chriss@leela ~]$ telnet 192.168.1.170
    Trying 192.168.1.170...
    Connected to 192.168.1.170.
    Escape character is '^]'.
    M558 P1
    ok
    

    I can't remember if I asked before, but can you send M98 P"config.g" and see what you get for errors and messages?

    I guess that you mean "M98 P"0:/sys/config.g""

    [chriss@leela ~]$ telnet 192.168.1.170
    Trying 192.168.1.170...
    Connected to 192.168.1.170.
    Escape character is '^]'.
    M98 P"0:/sys/config.g"
    HTTP is enabled on port 80
    FTP is enabled on port 21
    TELNET is enabled on port 23
    Warning: Heater 0 appears to be over-powered. If left on at full power, its temperature is predicted to reach 270C
    Warning: Heater 1 appears to be over-powered. If left on at full power, its temperature is predicted to reach 486C
    ok
    

    So no parsing error if you where aiming for that.

    Cheers, Chriss


  • Moderator

    I mean send this in the console
    M558 P1 C"^zprobe.in" H5 F120 T6000
    G31 P500 X-26.0 Y-9.0 Z1.85

    And then try your homing.

    Though I'm starting to wonder if it's something wrong with the IR probe itself.



  • @Phaedrux said in Strange homing behavior:

    I mean send this in the console
    M558 P1 C"^zprobe.in" H5 F120 T6000
    G31 P500 X-26.0 Y-9.0 Z1.85

    And then try your homing.

    Done, with the same result, the probe get triggered in the air.

    Though I'm starting to wonder if it's something wrong with the IR probe itself.

    I have to admit that you may be right. I have in total 3 of the ir-probes here. Two for my corexy build and the one in my CR10.
    I replaced the one at my CR10 now with a other one. That seems not brand new any more, but it seems to work now. :?
    But it is a bit to early for me to blame the bl-touch. I will play a bit more with the new one before I will confirm that the new one is working.

    And I will put the suspicious probe into the corexy for some tests.



  • @Phaedrux

    Can you explain the homeall.g to me, please?
    I'm fully confused now. I removed the "M98" so source the homez.g from the homeall.g. So it looks like that now:

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sun May 10 2020 08:05:32 GMT+0200 (Central European Summer Time)
    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-315 Y-315 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H2 X5 Y5 F6000       ; go back a few mm
    G1 H1 X-315 Y-315 F360  ; move slowly to X and Y axis endstops once more (second pass)
    
    
    ;M98 P"0:/sys/homez.g"
    

    And you know what? The printer homes Z after it homed X and Y. WTF? I added a "beep" into the homez.g to test whether it get executed and not. And the printer beeped when I executed "G28" right after it homed X and Y.
    So I think that the homez.g is executed whether I execute it or not.
    Is that the expected behavior?


Log in to reply