An ophthalmic surgical system 10 detects a change in a viscosity of a material being aspirated from an eye 32. The system 10 includes a control module 18 connected to an aspiration pump 20, and a flow meter 19 connected to the control module 18 and the aspiration pump 20. The flow meter 19 provides a flow rate of material aspirated from the eye 32 by the aspiration pump 20. A surgical handpiece 24 connected to the aspiration pump 20 and the control module 18 is inserted into the eye 32 during surgery. The control module 18, during surgery, detects a step change in the flow rate of material aspirated from the eye 32 and the control module 18 further causes the surgical system 10 to alert a surgeon that a change in viscosity of the material being aspirated has been detected indicating that the handpiece 24 has moved from a material of a first viscosity to a material of a second viscosity.