At the front of the gantry steel plate, fix 1angle bracket using 1 screw and 1 locknut.
Put the compression spring on the M5x50 screw and place both in the free hole of the angle bracket.
Bring the motor and pinion assembly and attach both using 1 locknut.
Tighten the nut to strongly load the spring, leaving around 2-3mm of compression run available. Alternatively, you can fully tighten the spring until it is closed and unscrew it backwards for 3 full turns (which corresponds to a distance of 2.4mm).