The two are totally different phenomena in formulation terms. Locking is found in fully integrated lower order elements (2D 4-noded planar elements with higher order integration schemes for example), which exhibit “overstiffness” in bending problems. This formulation includes shear strains in bending which don't physically exist (sometimes called parasitic shear). Basically either use a higher order element or a lower order integration scheme to avoid the locking.
Zero energy modes (or hourglassing) is associated with lower order elements with (say) single point integration schemes. These elements are unable to capture the strain energy under certain modes of deformation (the lozenge effect, for example). To control hourglass modes in lower-order elements, an hourglass stiffness is sometimes added, which provides a stiffness to resist the zero energy modes. Although the default hourglass stiffness value is usually sufficient, you can usually override this if necessary. Again, consider using a different element formulation if possible (higher order element with midsided nodes should do the trick).
------------
See faq569-1083 for details on how to make best use of Eng-Tips.com