Here are part of my config.g that relate to the 4th axis:
M584 X0 Y1 Z2 U4 E3 P3 ; U4 is the 4th tower axis which is E1 stepper driver on the Duet Wifi
M665 R244.500 L400.970:400.970:400.970:8019.4 B150.0 H448.37 X-0.072 Y0.021 Z0.000
M669 X0 Y0
M666 X-0.34 Y-0.31 Z0.66 A0.00 B0.00
;Drives
M569 P0 S0 ; Drive 0 goes forwards, X tower stepper
M569 P1 S0 ; Drive 1 goes forwards, y tower stepper
M569 P2 S0 ; Drive 2 goes forwards, Z tower stepper
M569 P3 S0 ; Drive 3 goes forwards, E0 stepper
M569 P4 S0 ; Drive 4 goes forwards, 4th tower stepper
M350 X16 Y16 Z16 U16 E16 I1 ; Configure microstepping with interpolation
M92 X200 Y200 Z200 U200 E2787 ; Set steps per mm
M566 X1200 Y1200 Z1200 U1200 E40 ; Set maximum instantaneous speed changes (mm/min)
M203 X18000 Y18000 Z18000 U18000 E1200 ; Set maximum speeds (mm/min)
M201 X1000 Y1000 Z1000 U1000 E120 ; Set accelerations (mm/s^2)
M906 X1600 Y1600 Z1600 U1400 E500 I40 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
; Endstops
M574 X2 Y2 Z2 U2 S1 ; Set active low endstops
;Tools
G10 P0 X0 Y0 Z0 U0 ; Set tool 0 axis offsets
M500
Config-override.g lines of code related to the 4th axis:
M665 L400.970:400.970:400.970:8019.400 R244.529 H447.421 B150.0 X0.044 Y-0.103 Z0.000
homedelta.g:
G91 ; relative positioning
M584 P4 ;unhide U4
;*** Slow homing has been configured. Change F180 to F1800 below when your configuration is working
G1 S1 X450 Y450 Z450 U450 F1400 ; move all towers to the high end stopping at the endstops (first pass)
G1 X-5 Y-5 Z-5 U-5 F1800 S2 ; go down a few mm
;*** Slow homing has been configured. Change F180 to F360 below when your configuration is working
G1 S1 X10 Y10 Z10 U10 F360 ; move all towers up once more (second pass)
G1 Z-5 F6000 ; move down a few mm so that the nozzle can be centred
G90 ; absolute positioning
G1 X0 Y0 F6000 ; move X+Y to the centre
M584 P3 ; hide U4
I believe that's it.
4th axis rod length is 20 times that of XYZ. I haven't tried changing it.