i have to fix the last problem. i need to mantain the 4th axis 30mm over the current position after the homing, cause i have insufficient lenght as i mentioned before. and i have no possibility to move it up.
is it possible to do it via firmware?
The firmware assumes that when all axes have been homed, the U carriage is at the correct distance from the effector, and it will maintain that distance.
What I think you are saying is that you have insufficient height on the U axis to maintain sufficient distance. The following might work (I haven't tested it). Home the printer as normal. Suppose you then want to move the U axis to be 15mm higher than it is (but it can't move up any further). Use a G1 Z command to move down at least 15mm. Un-hide the U axis if it is hidden, and read off the U coordinate in DWC. Now send a G92 Uxx command where xx is 15mm lower than that coordinate (to make the firmware think the U carriage is 15mm lower than it really is). Then hide the U axis again. Then make a small movement. You may find that the U carriage rises 15mm to "correct" the U coordinate error that you introduced using the G92 command.
Of course, if you then try to move within 15mm of the maximum height, the U carriage will crash into the stop.
So the only real solutions are to increase the range of the U carriage, or move the X, Y and Z endstop switches down by the appropriate amount.