Optical measurements during serial production in the pharmaceutical industry