With the widespread use of nonlinear loads in the power system, the problems associated with harmonics are of great concern. Harmonics would cause extra power losses in the transmission system. For the general end users, it may only cause the short-term power interruption in the electrical apparatus. But for the large electrical equipments, harmonics could lead to fault and even cause economical problem and decrease the life of power devices. Therefore, the detection of power quality is a noticeable issue.This paper intends to develop a harmonic/interharmonic virtual instrument based on the adaptive linear neural network (ADALINE) technique for accurately measuring the harmonic and interharmonic currents generated by the nonlinear loads in the power systems. With the advantages of simple structure and efficient computation in ADALINE, the design of virtual instrument is proposed to mitigate the leakage and picket-fence effects came from the direct usage of ADALINE according to the requirements of IEC Std. 61000-4-7. Finally, the performance of proposed method can be verified through a simple test system implemented with LabVIEW program.