The question is vague but here is my train of thoughts.
Sensor to detect plastic only.
Similar to the question pesticides detection sensor there isn t a specific sensor to look for glasses or plastic polymers.
You have to do some logic that both type of sensors are on then it is metal only capacitance sensor is on it is plastic or glass.
Inductive sensors detect metal objects contactless and wear free.
Unlike photoelectric sensors this allows a inductive proximity sensor to detect a metal object through opaque plastic.
Inductive proximity sensors can only detect metal targets.
Omron also have sensor to detect aluminum non iron then it would be three sensors and more logic to decide.
The rectangular housing plastic for inductive sensor by bernstein is a robust plastic case with a size of 27x10mm and 60x36mm.
Or you want to distinguish diffeent types of plastic say pvc vs.
Balluff s patented hybrid capacitive technology sensor series detects water based conductive media through thick glass and plastic walls while compensating for moisture foam and material build up.
In contrast to inductive sensors which only detect metallic objects capacitive sensors can also detect non metallic materials.
Metals are conductive while plastics ceramics are not.
Google for omron or ifm proximity sensors learn and find something you want and purchase.
Capacitive sensors for level detection use a spherical field to detect the product bulk material or liquid e g.
Dr zia s tiny 2 5 mm by 2 5 mm sensor is able to be swirled through a liquid and detect concentration levels as low as two parts per billion using a test that takes less than 10 minutes.
Prices are indicative only and may vary by country.
They do not detect non metal targets such as plastic wood paper and ceramic.
Typical applications are in the wood paper glass plastic food chemical and semiconductor browse capacitive linear position sensors datasheets for ifm electronic gmbh.
If you want to go more complex than 1.
Still you could go for indirect methods like reflectivity infrared signature by black body radiation.