← Back to all lessons
Wiring 3
Free

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.

The power rail is already wired. The supply feeds the +24 V and 0 V strips, the strips feed the PLC, and the supply's protective earth is bonded to the ground bar. Those greyed, locked wires are the ones Wiring 1A: Power the PLC teaches. You only wire what is new in this lab.

Hints

Hint 1

The power rail is already fitted and locked. Take the sensor supply from the +24 V and 0 V strips: any free slot of a strip is the same rail.

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.

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 free to start

This foundation lab is included on Free — sign up takes a minute.

Sign up free to start →

You might also like

Competency and practice field guide

PLC digital-input wiring lesson: practice plan

Direct answer

The learner can trace a complete input-current path and locate the first disagreement among field state, terminal voltage, module LED and controller tag.

Written for pLC beginners connecting switches and three-wire sensors to compatible input channels while learning supply, common, polarity, module indication and software mapping.

a supervised industrial control-panel bench used to trace power, protection, terminals, contactors, PLC I/O and field wiring with a correctly selected meter while studying digital input sourcing, sinking and tag evidence
System map / 02

NODE 01observable

Scope

Field-device output type, PNP or NPN convention, supply voltage, input sinking or sourcing behavior, common, polarity, channel rating, off-state leakage, terminal, address, tag and debounce.

NODE 02observable

Signal path

Physical target through sensor electronics or contact, field power, conductor, digital-input circuit, common return, module indication, process image, tag and application decision.

NODE 03observable

Baseline practice

Each known field state produces the expected terminal voltage, channel indication and tag state through repeated operating cycles.

NODE 04observable

Edge cases

Reversed polarity, incompatible output, missing common, open conductor, short, leakage, wrong channel, duplicate address, chatter and power return.

NODE 05observable

Fault practice

A target, sensor, supply, polarity, conductor, terminal, input circuit, common, address, tag or logic mismatch.

NODE 06observable

Transfer to the job

The installed circuit checked against current sensor and input specifications, drawings and approved electrical and functional tests.

Answer surface / 07

How do you wire a sensor to a PLC digital input?

Match sensor output type to input topology, provide compatible power, complete the signal and common path, then verify field indication, terminal voltage, module LED and tag.

What is the difference between sourcing and sinking?

The terms describe current direction and which side supplies or receives current; verify the complete device-and-input circuit because regional terminology can be inconsistent.