Solved 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 movesM667 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 forwardsM350 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 positionM584 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 positionM584 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 heightSo 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.
-
to have the above bltouch function as the z endstop only when a home all or x,y,z is homed.
what needs to be changed, i tried the above and it just freezes.can you show me?
; Configuration file for Duet WiFi (firmware version 3)
; Z-Probe
;M950 S0 C"exp.heater7" ; create servo pin 0 for BLTouch
M950 S0 C"!exp.heater7" ; create servo pin 0 for BLTouch
M558 P9 C"^zprobe.in" H5 F120 T24000 ; set Z probe type to bltouch and the dive height + speeds
G31 P500 X0 Y0 Z4.222 ; set Z probe trigger value, offset and trigger height
M557 X70:400 Y180:500 S100 ; define mesh grid**
; HOME ALL
; BLTOUCH PREP
;
M400 ; wait for current moves to finish
G4 S1
M280 P0 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed
G4 S1
M402 ; Retract probe just in case it's down
M400 ; wait for current moves to finishG91 ; relative positioning
G1 H2 Z10 F800 ; lift Z relative to current position
G1 H1 X-445 Y540 F1800 ; move quickly to X or Y endstop and stop there (first pass)
G1 H1 X-445 F1800 ; home X axis
G1 H1 Y540 F1800 ; home Y axis
G1 X5 Y-5 F800 ; go back a few mm
G1 H1 X-445 F200 ; move slowly to X axis endstop (second pass)
G1 H1 Y540 F200 ; move slowly to Y axis endstop (second pass)
G1 H1 Z-905 F400 ; home Z axis
G1 Z5 F800 ; go back a few mm
G1 H1 Z-905 F100 ; move slowly to Z axis endstop (second pass)
G90 ; absolute positioning
G92 Z0 ; set Z position to axis minimum (you may want to adjust this)
G91 ; relative positioning
G1 Z10 F800 ; lift Z relative to current position
G90 ; absolute positioningim such a pain in the ass but im learning
-
@tracar said in BL-Touch and two endstop switches:
G1 H1 Z-905 F400 ; home Z axis
G1 Z5 F800 ; go back a few mm
G1 H1 Z-905 F100 ; move slowly to Z axis endstop (second pass)
G90 ; absolute positioning
G92 Z0 ; set Z position to axis minimum (you may want to adjust this)
G91 ; relative positioning
G1 Z10 F800 ; lift Z relative to current position
G90 ; absolute positioningYou're using the commands to home Z using an endstop here. You should be using G30 to call for a Z probe move. Position the probe with a G1 X Y move first.
See the examples here: https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCartesianPrinter#Section_Homing_Z
If you have further questions, please start a new thread.