Hey guys,
I want to create a calibration routine for the IDEX and LiftingHotend printers I develope together with @CR3D .
I already asked here, but I think that was the wrong category.
https://forum.duet3d.com/topic/21737/rrf3-dual-extruder-calibration-tool-and-nozzle-offset/5?_=1614279002208
For this I want to "built" a routine which shall work like the following diagram:

I have multiple issues at the moment - I added my code below:
- Is it possible to make a "loop" that waits for user Interaction? I.e. if the z-height is ok? yes: continue, no: repeat certain part of code.
- What is the proper way to store the tool offset? M500 only store coorinate system offsets. I thought of writing to files (The M28 commands starting in line 28). The problem is: the content of the file then is :
G10 P1 Z{-axes[3].position}
But I want it to be
G10 P1 Z-2.2
Additionally these files are generated in the /gcode folder. I want them to be hidden or inside the macro folder so the user does not accidentally delete them.
3. Is there a way to ask / query the firmware if filament is loaded. Primarly I want to ask the firmware, if the filament runout sensor is triggerd. I really don't know how to "properly" use the object model...maybe it is in there and I am just blind...
; add tool1offset_z.g and tool2offset_z.g to config.g with M98 P"tool1offset_z.g" M98 P"tool2offset_z.g"
; built z-calibration gcode - 20x20 square
; built x-y-calibration gcode
M291 P"This will reset all previous defined tool offsets to the default values. Do you want to continue?" R"Calibration of Tool Offsets" S3
;M561 ; clear any bed transform
G28
M104 S215 T1 ; active & standby Temperature for Tool 1 200°C
M104 S215 T2 ; active & standby Temperature for Tool 2 200°C
M140 S65 ; set Bed Temperature to 65°C
G10 P1 X-10 Y0 Z0 ; set Tool 1 offsets to default values
G10 P2 X10 Y0 Z0 ; set Tool 1 offsets to default values
G1 Z5
; check if Filament is loaded in tool 1
;if FILAMENT_LOADED_T1 == TRUE Then
;ELSE
;T1
;M701 S"PLA"
; chek if Filament is loaded in tool 2
;if FILAMENT_LOADED_T2 == TRUE Then
;ELSE
;T2
;M701 S"PLA"
; start z-calibration routine
;##marker-mc-markface
M291 P"Put a piece of Paper on the built plate" R"Calibration of z-Position" S2
T1
M291 P"Move the Bed up using the buttons until the paper slightly graps on the nozzle" R"Calibration of z-Position- Tool 1" S3 X0 Y0 Z1
M28 tool1offset_z.g ; generate file for z-offset Tool1
G10 P1 Z{-axes[3].position} ; set z-offset of Tool1 to value from last calibration
M29
G1 Z5
T2
M291 P"Move the Bed up using the buttons until the paper slightly graps on the nozzle" R"Calibration of z-Position- Tool 2" S3 X0 Y0 Z1
M28 tool2offset_z.g ; generate file for z-offset Tool1
G10 P2 Z{-axes[3].position} ; set z-offset of Tool2 to value from last calibration
M29
G1 Z5
M291 P"Remove Piece of Paper" R"Calibration of z-Position" S2
; start test print for z-calibration
;M98 P"z_test_print.g" ; Print z-calibration lines
; ask user if he is satisfied
;If-Statement to ask user if z-offset is fine or z-calibration has to re-run, for rerun re_turn to ##marker-mc-markface
;start xy offset calibration
; to come....
Thank you for your help. I think together we might be able to built a routin that will every dual extruder printer which uses RRF.
Stay safe.
Max