Because the housing depth measurement device used in current automobile horn production has lotsof defects such as low efficiency,low precision and difficulty to fit with automatic production line,a new depthmeasurement system is designed,which integrated the PLC,HMI and digital display unit. This paper gives a detaildescription to this system about the hardware constitution,software programming,realization of communication be-tween hardware and HMI design. In practice,it is proved that this depth measurement system is reliable in opera-tion. It can improve the measurement efficiency by more than 40% and its measurement accuracy can reach 99.8%. This system completely fulfills the requirement of housing depth measurement in production of automobile hornon automatic production line.