PLC Sim Lab
Industrial sensors

Vision and colour sensors

A colour sensor or vision sensor is a small camera that decides OK or not OK. It checks the colour of a cap, the presence of a label, the position of a part or a printed code, and tells the PLC the result in milliseconds.

2 min read · Updated 2026-10-02

Colour sensors

A colour sensor shines white (or RGB) light on the target and measures the red, green and blue light reflected back. You teach it a reference colour by holding a good part in front of it and pressing a button. In operation it compares every part with the reference and switches its output when the colour matches within a tolerance.

Vision sensors and smart cameras

A vision sensor is a camera with a built-in processor. Instead of one colour value it looks at the whole image and runs inspection tools:

Triggering

The camera needs to know when the part is in the right place. Usually a photo-eye or the PLC gives a trigger input; the camera takes one image, evaluates it and sets its outputs. Moving parts need a short exposure time or a flash to avoid blur.

Outputs to the PLC

SignalMeaning
READYcamera can accept a trigger
OK / NGinspection passed / failed
BUSYinspection running
Data (Ethernet)code contents, measured values, which tool failed

Simple systems use digital outputs; modern cameras send results over PROFINET, EtherNet/IP or TCP to the PLC. Typically the PLC waits for the result, then fires a reject cylinder for NG parts.

Lighting is everything

Most vision problems are lighting problems. Ring lights, back lights (for silhouettes and holes), dome lights (for shiny parts) and polarizing filters make the feature clear and remove reflections. Shield the station from sunlight and changing room light.

Tips

Try it yourself. Wire sensors, contactors and a PLC, write ladder logic and press RUN in the free PLC Sim Lab Playground. Nothing to install.

Open the Playground →Guided lessons →