In a typical computer-based building energy management system (BEMS) for HVAC applications, pertinent variables such as pressure, temperature, fluid flow rate, valve and damper positions and the open/close status of the flow control devices, are measured for control and energy monitoring purposes. In addition to these primary functions, the data from the measurements can also be used to detect the abnormal performance of the HVAC system and possible equipment malfunction. This paper describes the development of a prototype computerized diagnostic method for the detection of faulty equipment in an HVAC air handling unit (AHU) using sensor data from the BEMS as input. The method uses a computer model of the AHU to compute a set of optimum performance parameters for the AHU under normal operating conditions and compares the parameters with actual values calculated from the measured sensor data. Deviations between the two sets of parameters are an indication of either an out-of-tune system or malfunction of certain equipment. The program will point out to the building operator the source of the fault and the possible cause in a timely fashion. The modeling part of the program is computation intensive and is written in the FORTRAN language. The diagnostic part is rulebased and is written in the symbolic language Prolog for its inference capability. Example case runs are presented to illustrate the proposed method.