← Back to all lessons
Wiring 3
Pro
~10 minutes lab time

Wiring 3 — Photoeye Sensor to PLC Digital Input

What you'll learn

A **retro-reflective photoelectric sensor** (photoeye) emits an infrared beam toward a fixed reflector. While the return beam reaches the receiver the output is inactive. When an object breaks the beam — a part on a conveyor, a pallet at a station — the output fires. This make-on-detect behaviour is the basis for countless presence, counting, and positioning tasks in industrial automation.

Lab time: ~10 minutes.

Lesson briefing

Photoeye Sensor to PLC Digital Input

A retro-reflective photoelectric sensor (photoeye) emits an infrared beam toward a fixed reflector. While the return beam reaches the receiver the output is inactive. When an object breaks the beam — a part on a conveyor, a pallet at a station — the output fires. This make-on-detect behaviour is the basis for countless presence, counting, and positioning tasks in industrial automation.

The standard 3-wire colour code

Almost every industrial sensor you encounter follows the same wiring convention regardless of brand:

  • Brown (BN) — 24 VDC supply positive.
  • Blue (BU) — 0 V / DC common.
  • Black (BK) — signal output to the PLC input.

The brown and blue wires power the sensor's internal electronics. The black wire is the output — it carries the detection signal to the PLC.

PNP output — sourcing

This lesson uses a PNP (sourcing) sensor. When the sensor detects a target, its internal PNP transistor connects the black wire to the +24 V rail, sourcing current into the PLC input. The PLC input sees a HIGH (+24 V) signal. PNP is the dominant standard on modern European- style PLCs and is the safest choice when in doubt.

Closing the loop with an indicator lamp

The PLC output Y0 drives a small indicator lamp. When the PLC ladder program detects the X0 input (from the photoeye), it can energise Y0 to light the lamp. This lesson only covers the wiring side — the signal path from sensor to input and from output to lamp. Writing the ladder rung that connects X0 to Y0 is a separate concern, but wiring both ends now proves the full I/O path before programming begins.

Tip: never connect the brown or blue supply wires to the PLC input terminal. Only the black signal wire goes to the PLC input. The supply wires power the sensor body; the signal wire carries the detection state.

Hints

Hint 1

Start with the 24 V and 0 V distribution buses. Seed tb-24v.t0 from psu-1.+V and tb-0v.t0 from psu-1.0V, then power the PLC from t1 on each bus.

Hint 2

Sign up to unlock the full hint sequence.

Hint 3

Sign up to unlock the full hint sequence.

Hint 4

Sign up to unlock the full hint sequence.

Hint 5

Sign up to unlock the full hint sequence.

This lesson uses 8 placed components on the lab canvas. Components are vendor-neutral (no proprietary trademarks); the wiring rules apply to any equivalent industrial part.

Sign up to preview

Create a free account to preview this Pro lab; upgrade to open the interactive circuit.

Sign up to preview

You might also like