BL-Touch and two endstop switches



  • Hi, I have installed Independent Z motors and endstop switches on my CoreXY and it is working well. But is there a way to use this setup and BL-Touch?
    Endstop switch to tram the bed and BL-Touch to compensate for error on the build plate?



  • Yes you can do that. You could modify your homing script to do it all. Or perhaps split out the lead screw leveling into bed.g (G32) and then use the BLTouch for homing.

    You can use the M558 command to configure your probe and endstops right before you use them.

    It's up to you if G30 and the BLTouch is used to home Z.

    How are you currently homing and leveling? Can you post your files?



  • Thank you for replying.
    For now I am using manual leveling. Here are my files:

    Duet2 Eth.
    Firmware Version: 2.01(RTOS) (2018-07-26b2)
    Web Interface Version: 1.21.2-dc42

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

    M667 S1 ; Select CoreXY mode

    ; Network
    M550 P"RatRig" ; Set machine name
    M552 P192.168.1.14 S1 ; Enable network and set IP address
    M553 P255.255.255.0 ; Set netmask
    M554 P192.168.1.254 ; Set gateway
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards

    M350 X16 Y16 Z16 U16 E16 I1 ; Configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 U400.00 E430.00 ; Set steps per mm
    M566 X600.00 Y600.00 Z12.00 U12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z180.00 U180.00 E1500.00 ; Set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 U20.00 E10000.00 ; Set accelerations (mm/s^2)
    M906 X1200.00 Y1200.00 Z1200.00 U1200.00 E1200.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 U0 S1 ; Set axis minima
    M208 X300 Y300 Z300 U300 S0 ; Set axis maxima

    ;DUAL Z
    M584 X0 Y1 Z2:3 U3 E4 P3

    ; Endstops
    M574 X1 Y1 Z2 U2 S1 ; Set active high endstops - Endret Z og U fra 1 til 2

    ; Z-Probe
    M558 P0 H5 F0 T6000 ; Set Z probe type to switch and the dive height + speeds
    G31 P500 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height
    M557 X15:15 Y15: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 S280 ; Set temperature limit for heater 1 to 280C

    ; 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 ; 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 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


    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Tue Jan 29 2019 20:37:16 GMT+0100 (sentraleuropeisk normaltid)

    G91 ; Relative positioning

    G1 S2 Z2 F6000 ; Lift Z

    G1 S1 X-305 Y-305 F3000 ; Course home X and Y
    G1 S1 X-305 ; Course home X
    G1 S1 Y-305 ; Course home Y
    G1 X4 Y4 F600 ; Move away from the endstops
    G1 S1 X-10 ; Fine home X
    G1 S1 Y-10 ; Fine home Y
    G91 ; relative positioning
    G1 S2 Z2 F6000 ; lift Z relative to current position

    M584 Z2 U3 P4 ; split Z motor control to Z and U for it to work we have to show U (param P4) in the UI

    G1 S1 Z-305 U-305 F1000 ; Move Z and U down until the switches triggers

    M584 Z2:3 P3 ; back to combined axes and hidden U

    G90 ; Back to absolute positioning

    G92 Z0 ; Tell the firmware where we are

    ; Uncomment the following lines to lift Z after probing
    ;G91 ; relative positioning
    ;G1 Z10 F1000 ; lift Z relative to current position
    ;G90 ; absolute positioning

    ;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


    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Tue Jan 29 2019 20:37:17 GMT+0100 (sentraleuropeisk normaltid)

    G91 ; relative positioning
    G1 S2 Z2 F6000 ; lift Z relative to current position

    M584 Z2 U3 P4 ; split Z motor control to Z and U for it to work we have to show U (param P4) in the UI

    G1 S1 Z-305 U-305 F1000 ; Move Z and U down until the switches triggers

    M584 Z2:3 P3 ; back to combined axes and hidden U

    G90 ; Back to absolute positioning

    G92 Z0 ; Tell the firmware where we are

    ; Uncomment the following lines to lift Z after probing
    G91 ; relative positioning
    ;G1 Z10 F1000 ; lift Z relative to current position
    G90 ; absolute positioning



  • ; Z-Probe
    M558 P0 H5 F0 T6000 ; Set Z probe type to switch and the dive height + speeds
    G31 P500 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height

    So you could leave your current homing files as is to level the bed if you wish, and configure the BLtouch in your config.g. that would allow the BLTouch to be used for G29 mesh compensation.

    If you wanted to use the BLTouch also for homing Z, you could add a section below the G92 Z0 to raise the Z axis, move the probe to the center of the bed, and then issue G30 to probe the bed and find the z height.



  • Thank you, I will try this.


 

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