please read you manual.
if the cam is operated in P or S mode then you have to set the aperture ring to smallest possible aperture... otherwise the cam cannot close the aperture to that value.
if you shoot in A or M then you have the option to set the aperture with the command dial OR the aperture ring. there is menu option to change that.