Internal stresses are very important for the performance of protective hard coatings. Tensile stresses favour the formation and propagation of cracks, inducing fracture and corrosion. Medium compressive stresses hinder fatigue. But high compressive stresses, typically for hard coatings produced by PVD (physical vapour deposition) processes, support delamination in order to relax the stored elastic energy. However notwithstanding its relevance, the internal stresses are only seldom used for the optimisation and quality control of hard coatings in industry. This unsatisfying situation is caused by the deficit in efficient measuring methods. The results of thin sheets, where the stresses can be simply measured by their curvature, are not necessarily representative for the coating of thicker parts. The conventional XRD (X-ray Diffraction), based on angle-dispersive evaluation needs expensive devices and is rather time consuming. The energy-dispersive technique opens new possibilities. It is based on polychromatic radiation. The interference of the lattice plane reflections corresponding to the Bragg-equation is investigated by the diffraction intensity of the different wavelength (or photon energies), not by varying the Bragg-angle as in conventional XRD. Hence, the whole diffraction pattern can be obtained in one shoot without the use of any goniometer. This allows the construction of small and compact measuring devices and the reduction of measuring time to a few minutes. The capability of the ED-XRD (Energy Dispersive X-ray Diffraction) is demonstrated for titanium nitride and chromium nitride films deposited by cathodic vacuum arc with varying parameters. Comparisons were made with the much more time-consuming AD-XRD (Angle Dispersive X-ray Diffraction) for residual stress analysis. The results of both methods are in good agreement.