A method for on-line analysis of material samples with a system having a grinding mill for comminuting sample material samples to output comminuted material samples, an analyzer unit for performing the on-line analysis of the outputted comminuted material samples and having a housing holding an optical system including an optical head and a front glass with the optical system performing the on-line analysis of the outputted comminuted material samples and a receiving chamber for receiving the outputted comminuted material samples from the grinding mill, and a mechanism for moving the housing relative to the receiving chamber from and to a first position at which the front glass closes a wall opening into the receiving chamber, comprising:
- performing an analysis of a material sample with the housing in the first position;
- subsequently moving the housing into a second position of which the front glass is cleaned by a cleaning mechanism;
- and
- moving the housing with the cleaned front glass back to the first position preparatory to a subsequent analysis operation of a new material sample.