Skip to learning content
All sensor labs
Discrete inputbeginner lab

Photoelectric Sensor (Photoeye)

Detects parts as they pass — outputs a discrete bit when something blocks the light beam.

PLC address%I0.0
SignalBeam received
BenchLive + faults
FIELD DEVICE / 24 VDC

01 / Recognize it

What this sensor looks like

Learn the housing, active face, mounting, and connector before you meet it on a machine.

Representative real-world Photoelectric Sensor (Photoeye) hardware on an industrial workbench
Representative field appearance · form factors vary by manufacturer

Hardware recognition

Know what to look for

Use the silhouette, active face, and connection style to identify the device before checking its part number and datasheet.

Body and mounting
Usually a rectangular or threaded cylindrical body with a visible lens.
Active face
The optical window contains an emitter and receiver; alignment LEDs sit nearby.
Cable and terminals
Common 3-wire DC units use brown, blue, and black conductors or an M12 plug.
Field rule: identify by appearance, then verify the exact wiring, range, approvals, and output type from the device label and datasheet.

02 / Understand the principle

Watch cause become a PLC signal

Follow the physical event through the sensing element and into the exact controller value.

Signal story / live loop

Photoelectric Sensor (Photoeye): cause to controller

Paused

Now showingPhysical event

Carton enters the beam → Receiver loses light → %I0.0 = 1

03 / Test and commission it

Commission it on the bench

Move the process, adjust the setpoint, invert the logic and inject faults. Watch the PLC value respond immediately.

Commissioning bench

Photoelectric Sensor (Photoeye)

24 VDC%I0.0
ON
350 mm
430 mm

PLC channel

%I0.0

RAW 1

Engineering value

350 mm

Beam received

Output logic
Inject a field fault

Channel healthy

Signal is inside the expected operating range

Terminals
Brown +24 VBlue 0 VBlack OUT

Commissioning note: Set the switching point with at least 20% margin beyond the normal target position.

Field guide

A photoelectric sensor — often called a photoeye — detects objects without physical contact. It emits a beam of light (usually infrared) and monitors whether that beam reaches a receiver. When an object interrupts or reflects the beam, the sensor's output switches state, giving the PLC a discrete ON or OFF signal on an input address like %I0.0.

There are three common operating modes. In through-beam (or opposed) mode the emitter and receiver are separate units facing each other; an object crossing the gap breaks the beam. Retro-reflective mode uses a single housing that both emits and detects light bounced off a reflective target — the object breaks the return path. Diffuse mode has the emitter and receiver in the same housing and relies on light scattered back from the object's surface itself.

NPN sensors sink current (the output switches toward 0 V), while PNP sensors source current (the output switches toward the positive supply). A PLC input channel is designed for a particular current direction or has a configurable common; many modules do not accept both on the same wiring. Check the input-module manual and match its common polarity, voltage range, and input current before connecting the sensor.

Photoeyes are widely used for counting parts, detecting labels, confirming stack heights, and triggering reject gates. Their non-contact sensing avoids mechanical contact wear. Some models respond in less than 1 ms, while others trade speed for range, filtering, or measurement capability; use the selected model's response time and the PLC input/filter timing to verify a high-speed application.

Use this when…

  • Counting parts on a conveyor belt
  • Triggering a reject ejector when a defective part passes
  • Confirming a box is in position before a sealing head descends

Where you will see it

Bottling line

A retro-reflective photoeye counts bottles moving under a filling nozzle and signals the PLC to index the carousel.

Packaging

Diffuse photoeyes detect the leading and trailing edges of cardboard blanks on a case erector to control glue guns.

PLC wiring reference

Trace the complete electrical path instead of treating the PLC tag as magic. Confirm the device datasheet before wiring real hardware.

  1. 1Brown +24 V
  2. 2Blue 0 V
  3. 3Black OUT

Commissioning checkpoint

Set the switching point with at least 20% margin beyond the normal target position.

PLC address
%I0.0
Expected signal
Beam received

Field questions

Frequently asked questions

What signal does a Photoelectric Sensor (Photoeye) send to a PLC?

Beam received is read at %I0.0. The exact electrical connection is Brown +24 V, Blue 0 V, Black OUT.

How do you commission a Photoelectric Sensor (Photoeye)?

Set the switching point with at least 20% margin beyond the normal target position.

Next skill

Connect it to PLC logic

60-second PLC integration challenge

Take the field signal into ladder logic, run the process tests, and prove the machine responds safely to both normal and abnormal conditions.

Open PLC challenge

Free first success

Use the photoelectric sensor (photoeye) signal in PLC logic

Apply the wiring and commissioning model in a scored browser exercise, then save your progress and continue through the recommended path.

No installNo credit cardImmediate pass/fail feedback

Technical reference and worked-example guide

Photoelectric sensor and PLC input guide: field reference

Direct answer

The learner can identify the sensing mode, predict output and input state and isolate an optical, electrical, mapping or process fault.

Written for automation learners and technicians selecting, wiring, aligning and troubleshooting through-beam, retroreflective and diffuse photoelectric sensors.

System map / 02

NODE 01observable

Definition

The target, background, range, sensing mode, light or dark operation, output type, supply and PLC input.

NODE 02observable

Signal path

Object and beam condition through optics, sensor output, wiring, input channel, tag and machine response.

NODE 03observable

Worked example

Reliable present and absent detection over repeated parts with a recorded alignment margin.

NODE 04observable

Limits

Transparent or dark targets, reflections, contamination, vibration, chatter, misalignment and restart.

NODE 05observable

Common mistake

An optical, alignment, supply, output, common, input mapping or logic fault.

NODE 06observable

Verification

The selected device verified with its manual, actual target and production environment.

Answer surface / 07

What are the main types of photoelectric sensor?

Through-beam uses separate emitter and receiver, retroreflective returns light from a reflector, and diffuse sensing relies on light returned by the target.

Why does a photoeye work by hand but miss products?

Check alignment margin, target material, speed, response time, input filtering, reflections, contamination and the exact point where the PLC samples the signal.

Real photoelectric sensor footage

See this exact skill in the working simulator.

Watch the real browser product respond to the task on this page, then try the same practical workflow yourself. No slides, concept mockups, install, or credit card.

Try this in the browser
Photoelectric Sensor Explained — How a Photoeye Detects Parts