中文官网

Photoelectric Sensor Wiring Diagrams

Content updated: .

This guide explains the circuit logic used across common industrial photoelectric sensors. Wire colors and connector pins remain model-specific: the ordered model datasheet takes priority over any generic diagram.

2-Wire, 3-Wire and 4-Wire Photoelectric Sensor Wiring

2-wire sensors

The load and sensor share a series current path. Check leakage current, voltage drop and whether the model is intended for AC, DC or both.

3-wire sensors

Two conductors power the sensor and one is the switching output. Match the NPN/PNP output to the PLC input common.

4-wire sensors

The additional conductor may provide a complementary output, teach input or alarm signal. Its function is not universal.

NPN vs PNP Photoelectric Sensor Outputs

OutputActive-state behaviourPLC/input requirement
NPNSinks output current toward 0 VInput/load referenced to the positive supply as specified
PNPSources output current from the positive supplyInput/load referenced to 0 V as specified
Relay outputPotential-free contact on models that provide itUse within the documented contact voltage/current limits

Do not guess from cable color alone. Confirm the exact model, connector pinout, voltage and output circuit before wiring.

Example DC Signal Paths to a PLC Input

These diagrams show current flow when the output is ON. They are circuit examples, not connector pin assignments. The two supply conductors still power the sensor in both arrangements.

NPN output: load above the switch

Supply + → PLC input/load → sensor OUT
Sensor NPN switch → supply 0 V
The input/load draws current from the positive supply; the active sensor provides its path to 0 V.

PNP output: load below the switch

Supply + → sensor PNP switch → sensor OUT
PLC input/load → supply 0 V
The active sensor supplies current to the input/load, which returns it to 0 V.

This follows OMRON’s NPN/PNP output-circuit explanation. For a replacement, choose the output configuration within the photoelectric sensor range before matching cable or connector details. Use the 3-wire and 4-wire input checks when diagnosing a shared PLC input cabinet.

Through-Beam Transmitter and Receiver Wiring

Power the transmitter

The emitter normally requires only its specified supply connection, unless the model adds test, enable or synchronization conductors.

Power the receiver

The receiver requires supply and provides the switching output. Align the pair before judging the electrical state.

Connect the control input

Verify output type, Light-ON/Dark-ON selection, PLC common, input current and whether an interposing relay is required.

See the H-M M12/M18 through-beam photoelectric sensor range for a model-specific product family.

PLC Input, Relay Load and Light-ON/Dark-ON Checks

PLC input common

An incorrect common reference is one reason a healthy NPN or PNP sensor appears not to switch.

Load and protection

Keep the output within its rated current. Use suppression for inductive coils and an interposing relay where the load exceeds the sensor output.

Output logic

Light-ON and Dark-ON describe whether the output activates when light is received or interrupted. Select the state required by the process logic.

Photoelectric Sensor Wiring Troubleshooting and FAQ

How do I wire a three-wire photoelectric sensor?

Connect the supply conductors according to the exact model datasheet, then connect the output conductor to a compatible PLC input or interface load. Confirm whether the output is NPN or PNP before energising the circuit.

What is the wiring difference between NPN and PNP?

An NPN output sinks current toward 0 V when active; a PNP output sources current from the positive supply. The PLC input common and load reference must match the selected output type.

How is a through-beam photoelectric sensor pair wired?

The transmitter normally needs supply power, while the receiver needs supply plus its switching output connection. Some models add teach, alarm or complementary outputs, so verify the exact pinout.

Is this wiring the same as a safety light curtain?

No. A general photoelectric switch is not automatically a safety-rated ESPE device. Safety light curtains use model-specific dual-channel safety outputs and must follow their own validated wiring instructions.