Setting Z=0 level, not using config.g
-
Our printer has a coreXY movement system with a special type of IDEX system. The Z-endstop is at Z-max. Our bed does not need leveling, but of course we need to be able to set the Z=0. Right now we are just changing the Z-axis limit in the config file with M208. But a nozzle or hot-end change would require this to be done by the customer, what we don't want.
We would like to create a macro that does the following:
- Home all axis.
- Move the bed up to Z=5mm.
- On the PanelDue move the bed up to touch the nozzle (or a caliber with a know thickness).
- Store the actual Z-axis limit or an offset by pressing a button on the PanelDue.
Steps 1 to 3 are straightforward, but is there a way to program step 4?
How do you, in case there is a bed probe, adjust the height difference between nozzle and probe? We couldn't find this in the G30..G32 description.
-
With a probe, you can set the trigger height with G31
-
I'm not 100% clear on what you're after, but here's my macro for homing to Zmax. I don't do any changes to the z-axis limit.
First I use this macro to set the trigger height of the zmax endstop.
; 0:/macros/Bed Leveling/0_Measure Zmax trigger.g ; Automates measuring the Zmax trigger for optical endstop at 300mm ; M291 P"This will set Z0 and calibrate Zmax height to 300mm" R"Proceed?" S3 M291 P"Homing all axis" T5 G28 ; Home all G90 ; Absolute positioning M98 P"0:/macros/0_Center Nozzle.g" ; Move nozzle to bed center M291 P"Adjust nozzle height until it's touching bed" Z1 S3 G92 Z0 ; set Z0 M291 P"Bed will now drop to Z300" S3 G1 Z300 ; Move bed down 300mm M291 P"Adjust optical endstop flag until light just turns off" R"Set Zmax=300mm" S3 M291 P"ZMax homing will now be tested, starting with homing Zmin" S3 M291 P"Homing to Zmin" T5 G28 Z M291 P"Ready to test Zmax homing?" R"Proceed?" S3 M291 P"Homing to Zmax" T5 M98 P"0:/macros/2_HomeZMax.g" ; Test Zmax homing M291 P"ZMax homing test complete. Printer will now home all." R"Proceed?" S3 G28 ; Home all M291 "ZMax calibration complete." S3
and then use this to home to z max
; HomeZMax.g ; Called to home Z to max endstop ; M574 Z2 S1 ; Set active-high switch (Opto) at the high end for Z Max. G91 ; Relative positioning G1 S1 Z330 F300 ; Move bed down until endstop triggers
But to do more specifically what you're asking in your list...
G28 ; home all G90 ; absolute positioning G1 X100 Y100 ; move to center of bed G1 Z5 ; move to Z=5 M291 P"Adjust nozzle height until it is touching the bed" Z1 S3 ; pop up with Z movement buttons G92 Z0 ; set Z0 G1 Z5 ; move back to z=5 G28 XY ; go back to home position
Nozzle probe offset configured with G31 in config.g
https://duet3d.dozuki.com/Wiki/GCode#Section_G31_Set_or_Report_Current_Probe_status -
Store the actual Z-axis limit or an offset by pressing a button on the PanelDue.
Do you mean store it on the SD card so that the Z=0 position will be the same after a power cycle? If so then the only way I can think of to do this now is:
- To find the new Z=0 level, after placing the nozzle 5mm above bed centre, send G30 with the Z probe type set to 0 (P0 in your M558 command).
- Then send G1 S3 Zxxx Fyyy (with appropriate xxx and yyy values) to send the head or bed ot the Z-max endstop. When the endstop is triggered, it will adjust the M208 Z limit. Then send M500 to save the new value in config-override.g.
The M586 command followed by M500 almost does what you want, however there is currently no facility to use M586 to probe manually instead of using a switch.