Z height issue
-
My printer is configured and printing well, it has dual motors for Z and I have a 3d touch probe to home the Z axis, do auto bed leveling and the bed mesh.
I have a big issue that sometimes, something happens and the Z height gets messed up, the result is that the printing starts at a few milimeters in the air above the bed.Lately I was just homing the printer and loading the previously measured bed heigth map, and still the issue happenend.
I have added all the code that migh get involved in a print procedure, homing, stoping the print.config.g
; General preferences M111 S0 ; Debug off M550 P"V-King CXY" ; Machine name (can be anything you like) M551 Preprap ; Machine password M667 S1 ; select CoreXY mode ; Network M552 S1 M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address M552 P0.0.0.0 ; IP address (0 = use DHCP) M554 P192.168.1.1 ; Gateway M553 P255.255.255.0 ; Netmask M555 P2 ; Set output to look like Marlin ; Panel Due M575 P1 B57600 S1 ; Comms parameters for PanelDue ; Movement section G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M569 P0 S1 ; Drive 0 goes forwards (change to S0 to reverse it) M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S0 ; Drive 3 goes forwards M569 P4 S1 ; Drive 4 goes forwards M584 X0 Y1 Z2:4 E3 ; set drive mapping M671 X160:160 Y-140:320 S5 ; leadscrews position M208 X-11:281 Y-87:256 ; carriage max move positions M906 X800 Y800 Z1000 E600 I30 ; Set motor currents (mA) M84 S30 ; Set idle timeout M201 X3000 Y3000 Z120 E1000 ; Accelerations (mm/s^2) M203 X18000 Y18000 Z600 E12000 ; Maximum speeds (mm/min M566 X900 Y900 Z150 E600 ; Allowable instantaneous speed change mm/minute M92 X80 Y80 Z1600 E400.66 ; Set axis steps/mm M350 Z16 I0 ; configure microstepping without interpolation M350 X16 Y16 E16 I1 ; configure microstepping with interpolation ; Axis Limits M208 X-11 Y-87 Z-0.2 S1 ; set axis minimum (adjust to make X=0 and Y=0 the edge of the bed) M208 X281 Y256 Z200 S0 ; set axis maxima (adjust to suit your machine) ; Endstops M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M307 H3 A-1 C-1 D-1 ; release pin M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch M558 P9 C"zprobe.in+zprobe.mod" H5 F320 T18000 A30 S0.02 ; set Z probe type to bltouch and the dive height + speeds G31 P25 X32 Y-2 Z2.95 ; set Z probe trigger value, offset and trigger height (Bigger Z offset means closer to bed) M557 X0:270 Y5:255 S20 ; define mesh grid ; Heater and thermistor section M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M143 H0 S80 ; set temperature limit for heater 0 to 120C ;M307 H0 B1 ; bit-bang mode, does not work M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M308 S1 P"e0temp" Y"thermistor" T100000 B4138 M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M143 H1 S300 ; set temperature limit for heater 1 to 300C M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T100 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"fan2" Q500 ; create fan 2 on pin fan2 and set its frequency M106 P2 S1 H1 T180 ; set fan 2 value. Thermostatic control is turned on ; Tool definition section M563 P0 D0 H1 F0 ; Define tool 0 to use extruder drive 0 and heater 1 G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets M572 D0 S0.5 ; pressure advance ; Trigger buttons M574 E0 S0 ; sets the E0 endstop to active low for NO switch M574 E1 S0 ; same for E1 M581 E0 T2 S0 ; configure trigger 2 to use E0 endstop on falling edge for NO switch M581 E1 T3 S0 ; configure trigger 3 for E1 endstop falling edge for NO switch ; Epilogue ;*** If you are using axis compensation, put the figures in the following command ;M556 S78 X0 Y0 Z0 ; Axis compensation here M501 ; load saved parameters from non-volatile memory T0 ; select first hot end
bed.g
M561 ; clear any bed transform G29 S2; Clear bed height map ;G29 ; probe the bed and enable compensation G28 G30 P0 X160 Y5 Z-99999 G30 P1 X160 Y245 Z-99999 S2
`
homeall.gM561 ; remove any bed compensation G91 ; relative positioning G1 H2 Z15 F600 ; lift Z relative to current position G1 H1 X-291 Y-341 F6000 ; move quickly to X or Y endstop and stop there (first pass) G1 H1 X-291 ; home X axis G1 H1 Y-341 ; home Y axis G1 X5 Y5 F6000 ; go back a few mm G1 H1 X-291 F4000 ; move slowly to X axis endstop once more (second pass) G1 H1 Y-341 F4000 ; then move slowly to Y axis endstop G90 ; absolute positioning G1 X140 Y125 F6000 ; go to first bed probe point and home Z G30 ; home Z by probing the bed
homex.g
G91 ; relative positioning G1 H2 Z15 F600 ; lift Z relative to current position G1 H1 X-291 F8000 ; move quickly to X axis endstop and stop there (first pass) G1 X5 F6000 ; go back a few mm G1 H1 X-291 F6000 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-5 F600 ; lower Z again G90 ; absolute positioning
homey.g
G91 ; relative positioning G1 H2 Z15 F600 ; lift Z relative to current position G1 H1 Y-341 F12000 ; move quickly to Y axis endstop and stop there (first pass) G1 Y5 F18000 ; go back a few mm G1 H1 Y-341 F6000 ; move slowly to Y axis endstop once more (second pass) G1 H2 Z-5 F600 ; lower Z again G90 ; absolute positioning
homez.g
M561 ; remove any bed compensation G91 ; relative positioning G1 H2 Z15 54000 ; lift Z relative to current position G90 ; absolute positioning G1 X140 Y125 F18000 ; go to first probe point G30 ; home Z by probing the bed
slicer start code
G28 ;Home G29 S1; load mesh G1 Z15.0 F6000 ;Move the platform down 15mm ;Prime the extruder G92 E0 G1 F200 E3 G92 E0
slicer end code
M104 S0 M140 S0 ;Retract the filament G92 E1 G1 E-1 F300 G28 X0 Y0 M84
pause.g
M83 ; relative extruder moves G1 E-10 F3600 ; retract 10mm of filament G91 ; relative positioning G1 Z5 F360 ; lift Z by 5mm G90 ; absolute positioning G1 X0 Y0 F6000 ; go to X=0 Y=0
stop.g
M104 S0 ; cool extruder M140 S0 ; cool bed ;Retract the filament G92 E1 G1 E-1 F300 G28 X0 Y0 return to 0 M84 ; disable motors M106 P0 S0 ; stop layer fan
I am sorry for the long post but I hope somebody can help with this issue. Because restarting the printer does not fix it, the only thing I can do is redo the probe calibration and increase the Z probe offset.
-
@alexic said in Z height issue:
M307 H3 A-1 C-1 D-1 ; release pin M558 P9 C"zprobe.in+zprobe.mod" H5 F320 T18000 A30 S0.02 ;
For my BLTouch v3.0 I don't have the M307 or the + zprobe.mod part and it works fine. Have no idea if that would have any negative effect though.
I don't see where you create the height map using G30 and G29.
Frederick
-
Thanks for your input. the Z-probe code is taken from the duet page example, M307 is there to release the H3 pin which is by default by heater 3 and not cause any problems.
To greate the mesh I manually ran once first HomeAll then Run Mesh Compensation (G29) from the DWC.
Then I can see the map in the Height Map page, I assume G29 S1 is loading that map that is shown in the visualizer. Or am I wrong? -
@alexic said in Z height issue:
Thanks for your input. the Z-probe code is taken from the duet page example, M307 is there to release the H3 pin which is by default by heater 3 and not cause any problems.
To greate the mesh I manually ran once first HomeAll then Run Mesh Compensation (G29) from the DWC.
Then I can see the map in the Height Map page, I assume G29 S1 is loading that map that is shown in the visualizer. Or am I wrong?I forgot about the item on the DWC page where you can create the height map - that works fine.
Do you use baby stepping sometimes during a print? I include M290 R0 S0 ; cancel baby stepping in my macros when probing the bed, just to be safe. It might not be needed but it doesn't hurt.
I understand what M307 did under v2 firmware but it is not used with v3 firmware.
Did you read the following in regards for v3 firmware?
Frederick
==============================================
-
Identify the name of the pin that you connected the control input of the BLTouch to. On a Duet WiFi/Ethernet without an attached DueX expansion board, it will be one of exp.heater3 thru exp.heater7. If you have a DueX attached, one of duex.pwm1 thru duex.pwm5. On a Duet Maestro it is zprobe.mod. On Duet 3 it is one of io4.out, io5.out or io7.out. If you use one of these pin names, you will not need to invert the output.
-
The Z probe input pin will be zprobe.in on a Duet 2, or one of io4.in, io5.in or io7.in on a Duet 3. If using zprobe.in, you need to enable the pullup resistor using the ^ character in front of the pin name.
-
In your M558 command, specify probe type 9 and the input pin, for example:
M558 P9 C"^zprobe.in" H5 F100 T2000
If using pin zprobe.in then must include the ^ character in front of the pin name to enable the pullup resistor.
- Create a GPIO/Servo pin index using your chosen control pin:
M950 S0 C"exp.heater3"
In this example we chose to attach GPIO/Servo index 0 to pin exp.heater3 on the expansion connector of a Duet WiFi or Duet Ethernet. On a Duet Maestro you would use C"zprobe.mod" in the M950 command.
==============================================
-
-
Okay I added the ^ in front of zprobe.in it should be more robust in triggering the probe.
Still for me it's not about that, it is some offset stored somewehere in the software, or my probe might be damaged.
Because right now I had to recalibrate the probe and increase the Z offset from 2.95 to 3.9 and this seems impossible. -
@alexic said in Z height issue:
Okay I added the ^ in front of zprobe.in it should be more robust in triggering the probe.
Still for me it's not about that, it is some offset stored somewehere in the software, or my probe might be damaged.
Because right now I had to recalibrate the probe and increase the Z offset from 2.95 to 3.9 and this seems impossible.As to stored offsets the only ones I know of are:
- baby stepping in the Duet firmware
- xyz offsets in slicer applications
The probe Z offset is related to the mounting of the probe in relation to the nozzle.
Using this as your guide what is your nozzle-to-pin difference (the red number)?
-
-
@fcwilt the phisical offset is 2.9mm in reality
-
@Phaedrux Yes it is a clone, that's the name, 3D Touch. Everytime I wonder if the probe is not the issue, and I'm not sure, I plan to replace it with a IR-probe to clarify this unknown variable.
-
@alexic said in Z height issue:
@Phaedrux Yes it is a clone, that's the name, 3D Touch. Everytime I wonder if the probe is not the issue, and I'm not sure, I plan to replace it with a IR-probe to clarify this unknown variable.
Before I understood the difference my first two BLTouch were actually clones.
They did not work.
Then I got two genuine v3.0 units and they worked without issue.
Frederick