install the auto z-offset again
-
I would like to try to install the auto z-offset again. I have already connected the switch and it reacts as it should on the board (green light).
For the filament sensor, I successfully wrote the following into the config.g:
M591 D0 P3 C"e0_stop" S1 ; filament monitor connected to E0_stop
But which M-command do I have to write in for the auto z-stop?Then I have to create a macro.
How do I call up the event and what do I have to write into the macro?...The previous descriptions never mentioned the basics (e.g. config.g).
Now I want the macro to say that the print head moves onto the switch until it is triggered?
The switch is about 15mm higher than the bed.
Then should he set Z to zero in G92 Z0 ?
Then he should use the Z probe to read out G1 x.. y.. and Z G92 z0 via the drive switch. He should then pass this value to the config.g.How should I do that?
-
@axiom
Most of what you want to do is handled byhomez.g
andhomeall.g
The rest is covered in these documents
https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_connecting
After calibration, you can edit your G31 Z offset in config.gMy suggestion would be to use the RRF configuration tool to create a set of macros suited to your machine.
https://configtool.reprapfirmware.org/Start
You can then use thee as the basis for any modifications required. -
G31 Z0 ; set Z-offset to Z=0 echo >"0:/sys/config_probe.g" "G31 Z0" M291 S3 R"Heating up nozzle" P"Wait for the nozzle to reach printing temperatures" M568 P0 S210 ; set tool 0 (primary hotend) temperature to 230c T0 ; select tool 0 (primary hotend) M116 P0 H5 ; wait for temperature to reach within 5c of set temperature M83 ; relative extruder moves G1 E-5 F300 ; retract 5mm of filament G4 P0 ; wait for movements to have stopped M300 S666 P666 ; beep M291 S3 R"Automatic Z Offset Calibration" P"Press OK to continue, or CANCEL to abort" M291 S3 R"Homing axes" P"Remove the puck. The printer will home the X, Y, and Z axises without the puck" M98 P"config_probe.g" ; Load BLTouch probe settings M280 P0 S60 I1 ; clear any probe errors G29 S2 ; cancel mesh bed compensation G91 ; relative positioning M913 X50 ; X axis 50% power G1 H2 Z5 F200 ; lift Z relative to current position G1 H1 X{(move.axes[0].max+5)*-1} Y{move.axes[1].max+5} F6000 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X5 Y-5 F600 ; go back a few mm G1 H1 X{(move.axes[0].max+5)*-1} Y{move.axes[1].max+5} F600 ; move slowly to X and Y axis endstops once more (second pass) M913 X100 ; X axis 100% power G90 ; absolute positioning G1 X{move.axes[0].min+5} Y{move.axes[1].min+5} F6000 ; move to front left G1 F600 ; reduce speed G30 ; home Z by probing the bed G31 Z0 ; set Z-offset to Z=0 M564 H1 S0 ; Negative movements are allowed G29 S2 ; cancel mesh bed compensation G90 ; absolute positioning G1 Z27 ; raise Z to 27mm G4 P0 ; wait for movements to have stopped M291 S3 R"Clean the nozzle" P"The nozzle has been pre-heated. Clean it from any plastic debris" G1 X100 Y200 F6000 ; go to X100, Y200 G4 P0 ; wait for movements to have stopped M300 S666 P666 ; beep M291 S3 P"Place the offset tool below the nozzle and press OK to perform the macro, or CANCEL to abort" G4 P200 ; wait 200ms G91 ; relative moves G1 H1 Z-12 F50 ; move 12mm down, stop when hitting the offset tool (but don't risk crashing the bed) G92 Z0 ; set current position as Z=0 G4 P200 ; wait 200ms G1 Z7 F200 ; move up 7mm G91 ; relative moves G1 X{sensors.probes[0].offsets[0] * -1} Y{sensors.probes[0].offsets[1] * -1} F1500 ; move nozzle so that BLTouch is in it's position G90 ; absolute moves G30 S-3 ; probes Z and adjusts the probe trigger height to match the actual stop height. G4 P200 ; wait 200ms G91 ; relative movement M568 P0 S0 ; set tool 0 temperatures to 0 var Z_auto_offset = {sensors.probes[0].triggerHeight} ; math to calculate the BLTouch offset if var.Z_auto_offset < 0.01 M291 S2 R"The nozzle has not touched the puck." P"Please check the guide for troubleshooting" echo "The nozzle has not touched the puck. Please check the guide for troubleshooting" echo >"0:/sys/config_probe.g" "G31 Z-3" elif var.Z_auto_offset >= 0.01 & var.Z_auto_offset < 3.5 echo >"0:/sys/config_probe.g" "G31 Z"^{var.Z_auto_offset} M291 S2 R"Z-offset has been stored" P"the Z-offset has been stored in the config_probe.g file. Verify the value stored with the value displayed in the console" echo "the Z-offset has been stored in the config_probe.g file. The Z-offset is", var.Z_auto_offset, "mm. Remove the offset tool and place it back in the box" elif var.Z_auto_offset >= 3.5 M291 S2 R"Z-Offset is too high" P"Please verify the probe height using the probe-calibration" echo "Z-Offset is too high. Please verify the probe height using the probe-calibration" echo >"0:/sys/config_probe.g" "G31 Z-3" M564 S1 H1 ; Negative movements are forbidden M300 S666 P666 ; beep G91 ; relative moves G1 Z5 ; lift nozzle up 5mm G90 ; absolute moves T-1 ; deselect all tools M18 ; release steppers
-
@Proschi78 Thanks very much!
but I still don't understand what I have to write in the Config.g?
"M574 D0 P1 C"e0-stop" S2" ???????I'm missing the basic information -
@axiom
Hi,
I'm currently swamped with a lot of things.
Once I find some time, I will help you and answer your questions.
Best regards,
Jan -
@Proschi78 That would be very nice and helpful...I'm completely stuck...I've made some progress...but still a long way from the goal
-
How can you do such an automatic measurement with a macro that older filmware could also interpret, e.g. 2.02(RTOS) (2018-12-24b1)!?
video1
https://www.youtube.com/watch?app=desktop&v=gvwfQ_r7xoU
video2
https://www.youtube.com/watch?app=desktop&v=00g7d2wuFAI