Z-probe command (G30) causes runaway in X and Y



  • I've just set up my coreXY and can home both X and Y axis but cannot for the life of me work out how to probe the Z.

    The homing endstops are at the positive end of travel for both the X and Y and they home no problem but when I hit home Z the printer runs very slowly diagonally back to X/Y zero then probes the bed, the probe triggers and causes the bed to drop to its maximum and then for no apparent reason the head takes off in an X negative and Y positive diagonal until the carriage crashes.

    I initially se it up with reprap configurator and have had this problem from the start.

    Thankyou



  • can you post your config.g and homeall.g files?



  • I have posted up the entire contents of both,

    Thankyou

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Tue Aug 14 2018 09:06:02 GMT+1000 (Australian Eastern Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    M667 S1 ; Select CoreXY mode

    ; Network
    M550 P3d Printer ; Set machine name
    M551 Pthequickbrownunicorn ; Set password
    M552 S1 ; Enable network
    M587 S"Pizza Oven" P"Pizza Oven" ; Configure access point. You can delete this line once connected
    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 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P5 S0
    M569 P6 S0
    M350 X16 Y16 Z16 E16 I0 ; Configure microstepping without interpolation
    M92 X160 Y160 Z1600 E2000 ; Set steps per mm
    M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000 Y6000 Z180 E300 ; Set maximum speeds (mm/min)
    M201 X500 Y500 Z250 E250 ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E1000 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 X250 Y250 Z200 S0 ; Set axis maxima

    ; Endstops
    M574 X2 Y2 S1 ; Set active high endstops

    ; Z-Probe
    M574 Z1 S2 ; Set endstops controlled by probe
    M558 P1 H5 F120 T600 ; NAL changed probe type
    G31 P500 X125 Y125 Z2.5 ; Set Z probe trigger value, offset and trigger height
    M557 X25:285 Y25:285 S20 ; Define mesh grid

    ; Heaters
    M140 H-1 ; Disable heated bed
    M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; 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 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 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
    M584 Z2:5:6
    M564 H0

    and for home all; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool on Tue Aug 14 2018 09:06:02 GMT+1000 (Australian Eastern Standard Time)
    G91 ; relative positioning
    G1 Z5 F600 S2 ; lift Z relative to current position
    G1 S1 X255 F600 ; move quickly to X or Y endstop and stop there (first pass)
    G1 S1 X255 ; home X axis
    G1 S1 Y255 F600
    G1 S1 Y255 ; home Y axis
    G1 X-5 Y-5 F600 ; go back a few mm
    G1 S1 X255 F360 ; move slowly to X axis endstop once more (second pass)
    G1 S1 Y255 ; then move slowly to Y axis endstop
    G90 ; absolute positioning
    G1 X220 Y125 F600 ; 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 F10 ; lift Z relative to current position
    ;G90 ; absolute positioning


  • Moderator

    G31 P500 X125 Y125 Z2.5 ; Set Z probe trigger value, offset and trigger height

    This says that your z probe is 125mm away from your nozzle in both x and y. Is that correct?


  • Moderator

    You can also speed up your homing of x and y a bit for corexy.

    G91 ; relative mode
    G1 S1 X340 Y340 F3000 ; course home X or Y
    G1 S1 X340 ; course home X
    G1 S1 Y340 ; course home Y
    G1 X-4 Y-4 F600 ; move away from the endstops
    G1 S1 X10 ; fine home X
    G1 S1 Y10 ; fine home Y

    https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCoreXYPrinter



  • I changed the offset when I was mucking about trying to find out what was going on.
    I've changed it back to what it should be.

    The problem is when I issue a G30 command my understanding was the bed would come up and trigger the probe at the current X and Y position. Is this not the case?


  • Moderator

    If you home x and then y and then move the head to the center of the bed and issue a g30 from the console does it still do that weird behavior described in the first post? Or does that only when you do g28?


  • administrators

    @nichkos said in Z-probe command (G30) causes runaway in X and Y:

    The problem is when I issue a G30 command my understanding was the bed would come up and trigger the probe at the current X and Y position. Is this not the case?

    G30 without any additional parameters will run deployprobe.g unless the firmware thinks the Z probe is already deployed, move the head down or bed up until the probe triggers, then if it ran deployprobe.g it will run retractprobe.g to retract the probe. So if it is doing something strange, delete any deployprobe.g and retractprobe.g files in /sys on the SD card that you didn't intend to have.

    G30 with XY parameters and Z-(a lot) will move the head so that the probe is at the specified XY coordinates, taking account of the XY nozzle offset that you specified in your G31 command. It's up to you to make sure that you have specified sensible XY coordinates in G30 and sensible XY offsets in G31, because the usual limit checking is not done for G30 moves.



  • That's all it was. I deleted both deploy and retract probe files from the SD and problem solved.
    Thanks so much for that dc42. Because I was using the IR probe I never even looked at the deploy or retract so couldn't work out where the command to move outside of the soft limits was coming from and I never read anywhere in the G30 or G28 codes about deploying or retracting.
    Thanks mate


Log in to reply