Can't get my z endstop to stop the steppers.



  • been trying to upgrade my cr-10s with Duet 2 WIFI + Duet 5, i got most of it working(eventually) except for the Z endstop.
    i've got both drive 2 plugs populated(2 z steppers) and z endstop plugged where it should be, when i try and home the z axis, the endstop is hit but the stepper keeps going until i switch the printer off.
    the endstops LEDs are lit when they are not pressed(guessing active high), when i try home the z axis, it makes a funny sound for few seconds then drops past the switch. this is my config.g, please can someone help? ive been working on this upgrade for over a week. GRRRR

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

    ; Network
    M550 PMy printer ; Set machine name
    M552 S1 ; Enable network
    M587 S"*" P"" ; 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 S0 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards
    M569 P5 S1 ; Drive 5 goes forwards
    M350 X16 Y16 Z16 E16:16:16 I1 ; Configure microstepping with interpolation
    M92 X80 Y80 Z4000 E420:420:420 ; Set steps per mm
    M566 X900 Y900 Z12 E72000:72000:72000 ; Set maximum instantaneous speed changes (mm/min)
    M203 X1200000 Y1200000 Z1200000 E216000:216000:216000 ; Set maximum speeds (mm/min)
    M201 X3000 Y3000 Z3000 E1000:1000:1000 ; Set accelerations (mm/s^2)
    M906 X1000 Y1000 Z1500 E1000:1000:1000 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 X450 Y450 Z450 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y2 Z1 S1 ; Set active high endstops

    ; Z-Probe
    M558 P5 H5 F120 T6000 ; Set Z probe type to switch and the dive height + speeds
    G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
    M557 X15:435 Y15:435 S20 ; Define mesh grid

    ; Heaters
    M307 H0 B0 S1.00 ; Disable bang-bang mode for the bed heater and set PWM limit
    M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    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
    M563 P1 D1 H ; Define tool 1
    G10 P1 X0 Y0 Z0 ; Set tool 1 axis offsets
    G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C
    M563 P2 D2 H ; Define tool 2
    G10 P2 X0 Y0 Z0 ; Set tool 2 axis offsets
    G10 P2 R0 S0 ; Set initial tool 2 active and standby temperatures to 0C

    ; Automatic power saving
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Custom settings are not configured

    ; Miscellaneous
    T0 ; Select first tool



  • Can you post your homing files as well?

    Are you using a Z probe as well, or just and endstop?

    Have you seen this guide?

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



  • thanks for getting back to me so quick,
    no probe
    ive had a quick read of the link before but there must be something im missing.
    here are the settings i have:

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Sep 27 2018 22:38:13 GMT+1000 (Australian Eastern Standard Time)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 X-455 Y455 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y-5 F6000 ; go back a few mm
    G1 S1 X-455 Y455 F360 ; move slowly to X and Y axis endstops once more (second pass)
    G1 S1 Z-455 F1800 ; move Z down stopping at the endstop
    G90 ; absolute positioning
    G92 Z0 ; set Z to axis minimum (you may want to adjust this)

    ; Uncomment the following lines to lift Z after probing
    G91 ; relative positioning
    G1 S2 Z5 F100 ; lift Z relative to current position
    G90 ; absolute positioning

    ; homex.g
    ; called to home the X axis
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Sep 27 2018 22:38:13 GMT+1000 (Australian Eastern Standard Time)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 X-455 F1800 ; move quickly to X axis endstop and stop there (first pass)
    G1 X5 F6000 ; go back a few mm
    G1 S1 X-455 F360 ; move slowly to X axis endstop once more (second pass)
    G1 Z-5 F6000 S2 ; lower Z again
    G90 ; absolute positioning

    ; homey.g
    ; called to home the Y axis
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Sep 27 2018 22:38:13 GMT+1000 (Australian Eastern Standard Time)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Y455 F1800 ; move quickly to Y axis endstop and stop there (first pass)
    G1 Y-5 F6000 ; go back a few mm
    G1 S1 Y455 F360 ; move slowly to Y axis endstop once more (second pass)
    G1 Z-5 F6000 S2 ; lower Z again
    G90 ; absolute positioning

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Sep 27 2018 22:38:13 GMT+1000 (Australian Eastern Standard Time)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Z-455 F1800 ; move Z down until the endstop is triggered
    G92 Z0 ; set Z position to axis minimum (you may want to adjust this)

    ; Uncomment the following lines to lift Z after probing
    G91 ; relative positioning
    G1 S2 Z5 F100 ; lift Z relative to current position
    G90 ; absolute positioning



  • currently i only have the duet connected, ill be connecting the duex5 once i get this working.



  • i finally fixed it by making these changes.

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Sep 27 2018 22:38:13 GMT+1000 (Australian Eastern Standard Time)
    ;G91 ; relative positioning
    ;G1 Z5 F6000 S2 ; lift Z relative to current position
    ;G1 S1 Z-455 F1800 ; move Z down until the endstop is triggered
    ;G92 Z0 ; set Z position to axis minimum (you may want to adjust this)

    ; Uncomment the following lines to lift Z after probing
    ;G91 ; relative positioning
    ;G1 S2 Z5 F100 ; lift Z relative to current position
    ;G90 ; absolute positioning

    G91 ; relative mode
    G1 S1 Z250 F300 ; move Z towards the switch until it triggers
    G1 Z-5 F100 S2 ; move Z back 5mm
    G1 S1 Z10 F100 ; move Z slowly towards the switch until it triggers
    G90 ; back to absolute mode



  • damn, no idea what happened but it is having the same problem again



  • In those changes you posted you have the Z motor going in the opposite direction. If you manually move the axis which way does it go?

    Can you try reducing your Z axis acceleration in config.g?

    M201 Z60 instead of M201 Z3000

    Also verify that your Z axis steps per mm is really 4000.

    Z_steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch

    Can you also verify the max rated current for the z motor? Try to set the current at 70-85% of it's max.

    You may also want to reduce your maximum allowed speed. Keep in mind that reprapfirmware specifies speeds in mm/min, which is different from Marlin which uses mm/sec. 1.2 million mm/min is a little crazy, and if the feed rate is ever set too high for a move you may have some issues. 300mm/s is 18000mm/min and is far more reasonable. Your Z axis probably isn't going to move much faster than 5mm/s anyway.

    There have been some cases where the z axis being configured incorrectly can cause the motor to go in the opposite direction it thinks it is.



  • Thanks Phaedrux, looks like those changes worked.
    now i just have to connect the duex5 and hopefully start printing again.

    thanks again for all your help.



  • @phaedrux the max rated current on the 2 extra extruders are 2amp, the original creality steppers are cr-10 42-34 and i couldn't find current ratings for it. when i move the axis it was easier to move it down,



  • why is it that when i turn the printer off then on again, the settings have been saved but the endstop doesnt work and the z axis moves up when homing z, my endstop switch is at the bottom.



  • @rbtdata said in Can't get my z endstop to stop the steppers.:

    why is it that when i turn the printer off then on again, the settings have been saved but the endstop doesnt work and the z axis moves up when homing z, my endstop switch is at the bottom.

    Have you by any chance got a config-overide.g file in your sys directory? If so does that have anything in it that looks like it might change the end stop behaviour? What happens when you first turn on the machine is that it will load config.g, then config-overide.g. So anything in config-overide.g will do what it says - i.e over ride the config.g settings.

    If that is the case, then you need to save the changes in config-overide.g (or delete the file).

    This is a bit of a long shot but would explain why settings change when doing a power cycle.



  • @deckingman thanks for your reply, unfortunately the file doesn't exist.



  • @rbtdata I'm not familiar with the CR10 but I've had a look at your config.g and your Z homing files and there seem to be some inconsistencies. Can you let us know where the end stops are physically connected. The most usual arrangement is to have them at the low end of all axes but it's not obligatory. Oh, and do you move the gantry up and down in Z, or the bed?

    So the most common arrangement would be the X switch located on the left of the X axis, the Y switch located at the front, and the Z switch located at the top of the bed travel or at the bottom of the gantry if the bed is static in Z.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.