A custom LabVIEW(R) 4-based system has been developed for BP Chemicals, a buIk plastics manufacturer that measures, on-line and in real time, the concentrations of three additives in the polyethylene melt in an extruder. This system is located at a large-scale production plant in Grangemouth, Scotland. This software acquires data from a Carl Zeiss MCS photodiode array UV/visible spectrophotometer, analyzes the optical spectra using the Charm Works(TM) partial least-squares (PLS) modeling algorithm, and predicts the concentration of additives in the polyethylene melt. The software is self-learning, with minimal involvement from the operators. In training mode, the software is "calibrated" using liquid chromatography (LC) performed on physical samples (removed from the extruder) in the site laboratories. The primary training exercise required only 30 carefully selected samples. These collectively explore the dynamic ranges of each chemical constituent, The model can be continually upgraded and optimized by occasional remodeling with additional training samples. The prediction engine continuously samples optical spectra and determines the concentration of each additive. Now the composition of the polyethylene melt can be inferred in real time rather than waiting several hours for physical sampling and LC analysis in the laboratory. (C) 1998 National Instruments. Published by John Wiley & Sons, Inc.