Part traceability is one of the inevitable requirements in most modern manufacturing processes. In a hard disk drive (HDD), magnetic head dictates the performance of read/write operations. A number of manufacturing processes are involved to transform a wafer disc to slider bars and finally gliding sliders of the head. In this work, we concentrate on reading serial numbers of slider bar and its attached fixture prior to a bar-lapping process. Since the serial numbers on a bar are in the scale of 18x30 microns and their reflectance nature is rather poor, special optics and lighting components are required. As nature of high optical magnification with limited depth of focus (DOF), conventional image acquisition system can not cover the bar attachment position variation due to wide tolerance of the slider bar fixture. We proposed a serial number reading system using autofocus module to cope with it. Liquid lens and image processing algorithms are introduced to evaluate and adjust the focus automatically. Since our system has to be augmented to an existing machine, footprint is also another main concern. We therefore designed a special rig so the system meets all the fore-mentioned requirements. The system was tested in the production line and had 98% and 90% accuracy for serial number and barcode decoding, respectively. The main cause of barcode reading inaccuracy was from many cycles of the fixture reuse and cleaning in the production line.