We discuss the creation and evolution of the optically induced spin coherence in an ensemble of singly charged
(In,Ga)As/GaAs quantum dots. The sample is periodically excited by the pulsed laser radiation which causes the creation
of the discrete spin precession spectrum of electrons in an external magnetic field, known as mode-locking. The nuclei
additionally help to focus all precessing spins into the discrete modes and even make it possible to realize the singlemode
regime, where the whole inhomogeneous ensemble precesses without dephasing.