2 independent Z lead screws



  • Trying to configure my BL touch to auto adjust the Z axis using two lead screws. I found the code for bed.g

    G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis
    G30 P1 X180 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors

    Can I insert this in the bed.g to execute then do a mesh as well?
    how can I execute through the web interface to just self adjust the Z level.

    Here is my config.g file

    ; Configuration file for Duet WiFi (firmware version 2.03)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sat Mar 07 2020 12:38:22 GMT-0800 (Pacific Standard Time)

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Big-box" ; set printer name

    ; Network
    M552 S1 ; enable network
    M586 P0 S1 ; enable HTTP
    M586 P1 S0 ; disable FTP
    M586 P2 S0 ; disable Telnet

    ; Drives
    M569 P0 S1 ; physical drive 0 goes forwards
    M569 P1 S0 ; 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:4 E3 ; two Z motors connected to driver outputs Z and E1
    M671 X-20:580 Y0:0 S0.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis
    M208 X0:560 Y0:300 ; X carriage moves from -5 to 205, Y bed goes from 0 to 200
    M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E409.00 ; set steps per mm
    M566 X600.00 Y600.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z180.00 E1500.00 ; set maximum speeds (mm/min)
    M201 X3000.00 Y3000.00 Z100.00 E10000.00 ; set accelerations (mm/s^2)
    M906 X1800 Y1800 Z1800 E1300 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z-1.4 S1 ; set axis minima
    M208 X560 Y300 Z560 S0 ; set axis maxima

    ; Endstops
    M574 X1 Y1 S1 ; set active high endstops
    M574 Z1 S2 ; set endstops controlled by probe

    ; Z-Probe
    M307 H3 A-1 C-1 D-1 ; disable heater on PWM channel for BLTouch
    M558 P9 H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds
    G31 P500 X42.15 Y-52.36 Z0.5 ; set Z probe trigger value, offset and trigger height
    M557 X15:560 Y50:195 S20 ; define mesh grid

    ; Heaters
    M305 P0 T100000 B4138 R4700 ; set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 R4700 ; set thermistor + ADC parameters for heater 1
    M143 H1 S285 ; set temperature limit for heater 1 to 285C

    ; Fans
    M106 P0 S0 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

    ; 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

    ; Custom settings are not defined

    and this is the error I'm receiving when I try to home the z axis

    Warning: motor phase A may be disconnected reported by driver(s) 2
    Warning: motor phase B may be disconnected reported by driver(s) 2

    Originally I just ran both Z motors via the series connectors, do i need to have those jumpers plugged back in? If so I will have to make some so what connectors need connected?


  • Moderator

    @mathew-u said in 2 independent Z lead screws:

    Can I insert this in the bed.g to execute then do a mesh as well?

    Yes.

    how can I execute through the web interface to just self adjust the Z level.

    G32 calls bed.g

    do i need to have those jumpers plugged back in?

    Yes you will need to reinstall the jumpers now that you're only using one of the connectors. If you lost the original jumpers you could make up a dummy plug with wire to do the same thing. That would get rid of the error. It's literally telling you that a motor it expected to be connected is not connected, which is true.



  • Great got it all working but now when I try to auto compensate I get these errors

    2:47:18 PM Error: Compensation or calibration cancelled due to probing errors
    2:47:14 PM G32
    Error: Z probe was not triggered during probing move

    and

    2:49:11 PMG32
    Error: Some computed corrections exceed configured limit of 0.50mm: 0.630 -5.616


  • Moderator

    You may need to get them close manually first. One side looks to be several mm out and you have it limited to a 0.5mm difference. This limit could be raised in your M671 command, but keep in mind that your gantry will need some flex to it otherwise it may bind.

    Try getting it close manually first. Then it should stay relatively close when power is removed and the G32 should be able to correct for it going forward.



  • Got it, problem solved!

    In the config.g in the line

    G31 P500 X42.15 Y-52.36 Z0.5 ; set Z probe trigger value, offset and trigger height

    Does the Z0.5 represent the offset at which the printer will use to start printing? At the moment I can not get prints to start very well because I am having a hard time setting the Z offset but once I start the file I just use the baby offset tool to change the Z every print.


  • Moderator


Log in to reply