I have an IDEX printer and each of the two tools has a its own probe (pz probes). These probes can trigger on contact in all 3 dimensions. I'm trying to take advantage of that fact to probe a pin with each tool to automatically configure the tool offsets.
As you'd expect, I have the standard X/Y/Z axes with a U axis which is mapping to X for tool 1.
I can probe Z successfully using either tool by activating the appropriate tool and specifying the corresponding probe # when running the G30 command. I can probe the pin successfully with T0 by running G38.2 commands. However, when I try to run G38.2 commands with T1 active, I get unexpected and inexplicable (to me) behaviour. Here is a series of commands I ran with a corresponding comment documenting what actually happened when I executed the command:
T0 G38.2 X150 K0 ; Moves X until probe 0 is triggered
T1 G38.2 X150 K1 ; Moves X & U until probe 1 is triggered
T0 G38.2 U150 K0 ; Moves U until probe 0 is triggered
T1 G38.2 U150 K1 ; Moves X until probe 1 is triggered
T1 G53 G38.2 U150 K1
The first line is what I'd expect (probe X by moving X when tool 0 is selected). The second command, however, is a mystery. To make sure G38.2 wasn't expectding unmapped axes to be specified, I also tried the G38.2 commands using the U axis which certainly didn't help me understand what was happening. Finally, I also tried machine coordinates for the U moves in case it was some discrepancy between machine positions vs. mapped axes (I can't say for sure what happened as I didn't record it in my notes but I expecdt it was the same as not using machine coordinates).
Any explanations or suggestions for accomplishing my goal of automatically aligning the tools?
My config.g is:
M98 P"/sys/global-declarations.g"
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
; Drives
M569 P0 S0 ; D3 ; physical drive 0 goes backwards, stealthchop
M569 P1 S0 ; D3 ; physical drive 1 goes backwards
M569 P2 S0 ; D3 ; physical drive 2 goes backwards
M569 P3 S0 ; D3 ; physical drive 3 goes backwards
M569 P4 S0 ; D3 ; physical drive 4 goes backwards
M569 P1.0 S1 ; D3 ; physical drive 1.0 goes forwards
M569 P1.1 S1 ; D3 ; physical drive 1.1 goes forwards
M569 P1.2 S1 ; D3 ; physical drive 1.2 goes forwards
M584 X0.2 Y0.1:1.2 u1.1 E0.0:1.0 Z0.3:0.4 ; set drive mapping
M92 X160.00 Y160.00 U160.00 Z800.00 E680:680 ; set steps per mm (recommended; 690 orbiter)
M350 X16 Y16 U16 Z16 E16 I1 ; set microstepping to 256 interpolation
M566 X600.00 Y600.00 U600.00 Z240.00 E300:300 P1 ; set maximum instantaneous speed changes (mm/min)
M203 X12000.00 Y12000.00 U12000.00 Z600.00 E7200:7200 ; set maximum speeds (mm/min)
M201 X1000.00 Y1000.00 U1000.00 Z500.00 E5000:5000 ; set accelerations (mm/s^2)
;M906 X1350 Y1350 U1350 Z1200 E850:850 I30 ; set motor currents (mA) and motor idle factor in per cent (orbiter supposed to be 1200)
M906 X1200 Y1000 U1200 Z840 I30 ; Set motor currents (mA) and motor idle factor in per cent
M906 E850:850 I10 ; (orbiter supposed to be 1200)
M84 S30 ; Set idle timeout
; Z drive
;M671 X{global.xCenter, global.xCenter} Y-35:385 S2 ; motor order: front, back
M671 X150:150 Y-35:385 S2 ; motor order: front, back
; Axis Limits
M208 X0 Y-10 Z0 U-50 S1 ; set axis minima
M208 X350 Y356 Z425 U305 S0 ; set axis maxima
; Endstops
M574 X2 S1 P"^0.io5.in" ; configure active-high endstop for high end on X
M574 Y2 S1 P"^0.io6.in+^1.io0.in" ; configure active-high endstop for high end on Y
M574 U1 S1 P"^1.io2.in" ; configure active-high endstop for high end on U
; Z-Probe
M558 K0 P8 C"^!io1.in" R1.0 H5 F400 A5 T24000
G31 K0 X0 Y0 Z0 P25
M558 K1 P8 C"^!1.io5.in" R1.0 H5 F400 A5 T24000
G31 K1 X0 Y0 Z0 P25
M557 X0:325 Y5:355 P9 ; define mesh grid
M376 H2
; Filament sensor (BTT SFS 2.0)
M591 D0 P7 C"0.io3.in" L3 R50:150 E22 S1
M591 D1 P7 C"1.io1.in" L3 R50:150 E22 S1
; Pressure advance
M572 D0 S0.05
M572 D1 S0.05
; Fans (tool 0)
M950 F0 C"out5" Q250 ; create fan and set its frequency
M106 P0 S0 H-1 ; set fan value (off). Thermostatic control is turned off
M950 F1 C"out6" Q500 ; create fan and set its frequency
M106 P1 S1 T45 H1 ; set fan value (on). Thermostatic control is turned on
; Fans (tool 1)
M950 F2 C"1.out7" Q250 ; create fan and set its frequency
M106 P2 S0 H-1 ; set fan value (off). Thermostatic control is turned off
M950 F3 C"1.out6" Q500 ; create fan and set its frequency
M106 P3 S1 T45 H2 ; set fan value (on). Thermostatic control is turned on
; Fans (board cooling)
M950 F4 C"!1.out3" Q25000 ; create fan and set its frequency
M106 P4 S1 H-1 ; set fan value (on). Thermostatic control is turned off
; Bed Heater
M308 S0 P"temp0" Y"thermistor" T100000 B4092 ; configure sensor
M950 H0 C"out0" T0 ; create bed heater output and map it to sensor 0
M307 H0 R0.272 C349.6 D8.37 S1.00 V23.7
M140 H0 ; map heated bed to heater 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
; tool 0 thermistor
M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor
M950 H1 C"out1" T1 ; create nozzle heater output and map it to sensor 1
; tool 0
M307 H1 R3.927 K0.564:0.293 D1.73 E1.35 S1.00 B0 V24.1
M563 P0 S"E3Dv6" D0 H1 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
; tool 1 thermistor
M308 S2 P"1.temp2" Y"thermistor" T100000 B4725 C7.06e-8; configure sensor
M950 H2 C"1.out2" T2 ; create nozzle heater output and map it to sensor 2
; tool 1
M307 H2 R3.401 K0.474:0.307 D1.67 E1.35 S1.00 B0 V24.2
M563 P1 S"E3Dv6" D1 H2 X3 F2 ; define tool 1
G10 P1 U-1.61 Y-0.19 Z0.135 ; set tool 1 axis offsets
; Set both tools to standby mode
M568 A1 P0 R0 S0
M568 A1 P1 R0 S0
; Tool (common)
G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C
; MCU DOES NOT WORK ON THE DUET 3 MINI 5+?
M912 P0 S-12.5 ; Calibrate MCU temperature
; Miscellaneous
M912 P0 S-1
M98 P"/sys/global-defaults.g"
and the full machine specific config can be found on github using common config found here.