Z probe wrong direction unless I zero Z



  • I've notice that my core xy gets mixed up when trying to probe Z.

    If the printer powers up with the bed fully lowered, and I manually raise it (G1 Z-600 F6000). Then initiate a home all, the bed lowers.

    If I reset the printer while the bed is up, or set Z to 0 in the web interface, it probes as expected.

    I presume this is because it thinks the bed is at -600 Z when starting the Z probe?



  • @nick9one1

    Well you don't mention it but if the printer is in "absolute move" mode and G1 Z-600 moves it up that suggests you have something wrong with your Z axis settings.

    On my printer Z=0 has the bed near the top, just touching the nozzle.

    The lowest Z position is a positive value of 350.

    What do your M208 command(s) in the config.g file look like?

    Frederick


  • Moderator

    Post your files. Config.g and your homing files.



  •  ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sat Sep 05 2020 23:57:30 GMT+0100 (British Summer Time)
    
    ; General preferences
    M80					       ; Turns on the ATX power supply
    G90                                            ; send absolute coordinates...
    M83                                            ; ...but relative extruder moves
    M550 P"BLV MGN Cube"                           ; set printer name
    M669 K1                                        ; select CoreXY mode
    
    ; Network
    M552 S1                                        ; enable network
    M586 P0 S1                                     ; enable HTTP
    M586 P1 S0                                     ; disable FTP
    M586 P2 S0                                     ; disable Telnet
    
    ; Drives
    M569 P0 S0                                     ; physical drive 0 goes backwards
    M569 P1 S1                                     ; physical drive 1 goes forwards
    M569 P2 S1                                     ; physical drive 2 goes forwards
    M569 P3 S0                                     ; physical drive 3 goes backwards
    M584 X0 Y1 Z2 E3                               ; set drive mapping
    M350 X16 Y16 Z16 E16 I1                        ; configure microstepping with interpolation
    M92 X200.00 Y200.00 Z800.00 E415.5             ; set steps per mm
    M566 X600.00 Y600.00 Z24.00 E300.00            ; set maximum instantaneous speed changes (mm/min)
    M203 X20000.00 Y20000.00 Z600.00 E2000.00      ; set maximum speeds (mm/min)
    M201 X3000.00 Y3000.00 Z100.00 E5000.00        ; set accelerations (mm/s^2)
    M906 X1600 Y1600 Z1600 E1300 I30               ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                        ; Set idle timeout
    
    ; Pressure advance
    ; M572 D0 S0.05	
    
    ; Axis Limits
    M208 X-23 Y0 Z0 S1                             ; set axis minima
    M208 X305 Y332 Z350 S0                         ; set axis maxima
    
    ; Endstops
    M564 H0					       ; allow jog without homing
    M574 X1 S1 P"xstop"                            ;
    M574 Y2 S1 P"ystop"                            ;
    M574 Z1 S2                                     ; configure Z-probe endstop for low end on Z
    
    ; Z-Probe
    M558 P1 H5 C"^zprobe.in" H5 F200 T9000 I0 R0.5 ; set Z probe type to switch and the dive height + speeds
    G31 P500 X-2 Y-16.4 Z1.33                      ; set Z probe trigger value, offset and trigger height
    M557 X10:292 Y5:300 P8                       ; define mesh grid
    
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor"T100000 B3950 C0 R4700 A"Bed Temp"  	; 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
    M140 H0                                        				; map heated bed to heater 0
    M143 H0 S100                                   				; set temperature limit for heater 0 to 120C
    M307 H0 A466.3 C1262.5 D12.8 S1.00 V24.0 B0    				; Set PID for heated bed values
    M308 S1 P"e0temp" Y"thermistor" T100000 B3950 C0 R4700 A"Hotend Temp"   ; 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 S260                              				; set temperature limit for heater 1
    M307 H1 A340.0 C140.0 D5.5 S1.00 V24.0 B0     				; Set PID for hotend values
    
    ; Fans
    M950 F0 C"fan0" 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
    M950 F1 C"fan1" Q500                           ; create fan 1 on pin fan1 and set its frequency
    M106 P1 S1 H1 T45                              ; set fan 1 value. Thermostatic control is turned on
    
    ; Tools
    M563 P0 D0 H1 F0                               ; 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
    
    
    
    
    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sat Sep 05 2020 23:57:30 GMT+0100 (British Summer Time)
    
    G91              	; relative positioning
    G1 H2 Z5 F500   	; lift Z relative to current position
    G1 H1 X-355 F6000 	; move quickly to X axis endstop and stop there (first pass)
    G1 H0 X5 F6000 		; go back a few mm
    G1 H1 X-355 F360  	; move slowly to X axis endstop once more (second pass)
    
    G90              	; absolute positioning
    
    G91               	; relative positioning
    
    G1 H1 Y355 F6000 	; move quickly to Y axis endstop and stop there (first pass)
    G1 H0 Y-5 F6000 	; go back a few mm
    G1 H1 Y326 F360  	; move slowly to Y axis endstop once more (second pass)
    
    
    G90                    	; absolute positioning
    G1 X152.5 Y152.5 F6000 	; go to first bed probe point and home Z
    G30                    	; home Z by probing the bed
    
    
    

  • Moderator

    @nick9one1 said in Z probe wrong direction unless I zero Z:

    M564 H0 ; allow jog without homing

    It's best not to use this on a regular basis and could be hiding other issues. It's meant to save you from a crash.

    G1 H0 X5 F6000 ; go back a few mm

    Remove the H0 from your homing files. It's the default, so you don't need to specify it.

    When you jog your Z axis normally after homing (after you remove the M564) does Z+ move the bed away from the nozzle and Z- towards the nozzle?



  • From the documentation when using your Z probe for homing:

    The S2 option of M574 is intended for use only when axes other than Z are using the Z probe for homing. The only printers known that do this using Duet electronics are the RepRapPro Ormerod, Huxley Duo, and Mendel Tricolour machines. When using the Z probe to home Z, M574 Z0 should be used.



  • Remove the H0 from your homing files. It's the default, so you don't need to specify it.
    

    Done

    M564 H0 ; allow jog without homing
    
    It's best not to use this on a regular basis and could be hiding other issues. It's meant to save you from a crash.
    

    I will do after this issue is resolved - at the moment I need to raise the bed at least 300mm to home successfully.



  • When you jog your Z axis normally after homing (after you remove the M564) does Z+ move the bed away from the nozzle and Z- towards the nozzle?
    

    Yes, the jog buttons work as expected, and I get good prints.

    G1 Z5 F6000 lowers the bed
    G1 Z-5 F6000 raises the bed

    When the bed is fully lowered at power on, I have to send this before a home;
    G1 Z-500 F6000
    G92 Z0

    If I dont send G92 Z0 the printer seems to attempt a probe in the wrong direction (Z+ instead of Z-). I think this is because it thinks the bed is at Z-500 (my G1 Z-500 command).

    If I attempt to home when the bed is fully lowered at power on, the bed raises about 1/2 way (Z-), then starts going to other way (Z+).
    It seems to me like there is a timeout or travel limit safety.



  • @fcwilt

    M574 now looks like this;

    ; Endstops
    M564 H0					     ; allow jog without homing
    M574 X1 S1 P"xstop"                          ;
    M574 Y2 S1 P"ystop"                          ;
    M574 Z1 S1 P"zstop"                          ; 
    

    not

    ; Endstops
    M564 H0					       ; allow jog without homing
    M574 X1 S1 P"xstop"                            ;
    M574 Y2 S1 P"ystop"                            ;
    M574 Z1 S2                                     ; configure Z-probe endstop for low end on Z
    

    Unfortunately the behaviour is still the same



  • What fcwilt meant was remove the M574 line for the endstop, unless you still have one on Z maximum.

    Your M558 included an I0, which is not supported as part of RRF3.

    Your Z maximum is set as 350mm. How large is it as you seem to be issuing a -600mm move which would indicate your Z axis is larger than 350mm


  • Moderator

    @nick9one1 this came up recently in another thread, where the M208 Z limit was much smaller then the actual Z movement. If the probe move has to move more than 1.1 times the M208 Z limit, probing is cancelled and it will try to move the bed back to Z0. So set you M208 Z limit to much closer to the actual size, eg Z600. You can always set up a fast Z home move, then slow Z home, if it’s painful to watch it home 600mm at slow speed!

    Ian



  • @jay_s_uk said in Z probe wrong direction unless I zero Z:

    What fcwilt meant was remove the M574 line for the endstop, unless you still have one on Z maximum.

    Your M558 included an I0, which is not supported as part of RRF3.

    Your Z maximum is set as 350mm. How large is it as you seem to be issuing a -600mm move which would indicate your Z axis is larger than 350mm

    Thanks!

    I will remove I0 frm M558

    I guess Z max here is probably the cause of the bed getting to half way then reversing. I will change to Z650 (Z is 650)

    M208 X305 Y332 Z350 S0                         ; set axis maxima
    


  • @droftarts said in Z probe wrong direction unless I zero Z:

    @nick9one1 this came up recently in another thread, where the M208 Z limit was much smaller then the actual Z movement. If the probe move has to move more than 1.1 times the M208 Z limit, probing is cancelled and it will try to move the bed back to Z0. So set you M208 Z limit to much closer to the actual size, eg Z600. You can always set up a fast Z home move, then slow Z home, if it’s painful to watch it home 600mm at slow speed!

    Ian

    I like the idea of a faster Z home, so will try that.

    I'm also using a mini IR Z probe which seems to have similar behaviour when Z gets close.



  • I use

    M558 F250 				 										; Set the probing speed
    G30					 											; Probe a single point
    M558 F30 				 										; Set a slower probing speed
    G30					 											; Probe a single point
    

    In my Z homing file. That sets the first homing speed to just over 4mm/s and then 0.5mm/s. A similar change to your homing file would work for you.


  • Moderator

    @droftarts I thought it sounded familiar 😉



  • All working as expected now thankyou.

    I think the key change was setting the correct Z height

    M208 X305 Y332 Z350 S0 ; 
    

    now;

    M208 X305 Y332 Z950 S0 ; 
    

    Full Gcode;

    950 ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sat Sep 05 2020 23:57:30 GMT+0100 (British Summer Time)
    
    ; General preferences
    M80					       	; Turns on the ATX power supply
    G90                                            	; send absolute coordinates...
    M83                                            	; ...but relative extruder moves
    M550 P"BLV MGN Cube"                           	; set printer name
    M669 K1                                        	; select CoreXY mode
    
    ; Network
    M552 S1                                        	; enable network
    M586 P0 S1                                     	; enable HTTP
    M586 P1 S0                                     	; disable FTP
    M586 P2 S0                                     	; disable Telnet
    
    ; Drives
    M569 P0 S0                                     	; physical drive 0 goes backwards
    M569 P1 S1                                     	; physical drive 1 goes forwards
    M569 P2 S1                                     	; physical drive 2 goes forwards
    M569 P3 S0                                     	; physical drive 3 goes backwards
    M584 X0 Y1 Z2 E3                               	; set drive mapping
    M350 X16 Y16 Z16 E16 I1                        	; configure microstepping with interpolation
    M92 X200.00 Y200.00 Z800.00 E415.5             	; set steps per mm
    M566 X600.00 Y600.00 Z24.00 E300.00            	; set maximum instantaneous speed changes (mm/min)
    M203 X20000.00 Y20000.00 Z600.00 E2000.00      	; set maximum speeds (mm/min)
    M201 X3000.00 Y3000.00 Z100.00 E5000.00        	; set accelerations (mm/s^2)
    M906 X1500 Y1500 Z1500 E1100 I30               	; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                        	; Set idle timeout
    
    ; Pressure advance
    ; M572 D0 S0.05	
    
    ; Axis Limits
    M208 X-23 Y0 Z0 S1                            	; set axis minima
    M208 X305 Y332 Z950 S0                        	; set axis maxima
    
    ; Endstops
    M564 H0					       	; allow jog without homing
    M574 X1 S1 P"xstop"                            	;
    M574 Y2 S1 P"ystop"                            	;
    M574 Z1 S1 P"zstop"                            	; configure Z-probe endstop for low end on Z
    
    ; Z-Probe
    M558 P1 H5 C"^zprobe.in" H5 F250 T9000 R0.5	; set Z probe type to switch and the dive height + speeds
    G31 P500 X-2 Y-16.4 Z1.40                      	; set Z probe trigger value, offset and trigger height
    M557 X10:292 Y5:300 P5                       	; define mesh grid
    
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor"T100000 B3950 C0 R4700 A"Bed Temp"  	; 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
    M140 H0                                        				; map heated bed to heater 0
    M143 H0 S100                                   				; set temperature limit for heater 0 to 100C
    M307 H0 A466.3 C1262.5 D12.8 S1.00 V24.0 B0    				; Set PID for heated bed values
    M308 S1 P"e0temp" Y"thermistor" T100000 B3950 C0 R4700 A"Hotend Temp"   ; 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 S260                              				; set temperature limit for heater 1
    M307 H1 A340.0 C140.0 D5.5 S1.00 V24.0 B0     				; Set PID for hotend values
    
    ; Fans
    M950 F0 C"fan0" 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
    M950 F1 C"fan1" Q500                           	; create fan 1 on pin fan1 and set its frequency
    M106 P1 S1 H1 T45                              	; set fan 1 value. Thermostatic control is turned on
    
    ; Tools
    M563 P0 D0 H1 F0                               	; 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
    
    
    
    

Log in to reply