The proxiniy switch canbe dvided intothetwowire and threewire and te threewie proximiy switch can be futer dvidedint NPNand PNP,bot of them have the dferent wing
modes.
Pleaserefer to the folloingfigure:

● The wiring of the two-wire proximity switch is relatively simple. As shown in a typical proximity switch wiring diagram, the sensor and the load are connected in series, and then to the power supply. This is a common connection method for proximity switches used in simple control applications.
● The wiring of the three-wire proximity switch is more specific:
The red (or brown) wire connects to the positive terminal of the power supply (+V);
The blue wire connects to the 0V terminal (ground);
The yellow (or black) wire is the signal output and must be connected to the input of the load (such as a relay or PLC).
For an NPN proximity switch, the other end of the load should be connected to +V;
For a PNP proximity switch, the load should be connected to 0V.
This distinction is essential in understanding the correct 3 wire proximity switch wiring diagram, particularly when comparing NPN vs PNP proximity switch functionality.
● The load of the proximity switch can be a signal light, a relay coil or a digital input module of a programmable controller PLC.
● The model selection of the three-wire proximity switch connected to the PLC digital input module must be paid special attention to: PLC digital input modules can generally be divided into two categories, one of which has a common input end of the power supply 0V end. The current flows out of the input module (Japanese mode), in this case, the NPN type proximity switch must be selected; the other type of common input end is the positive end of the power supply, and the current flows into the input module, that is, the well input (European mode), in this case, the PNP type proximity switch must be selected.
● The two-wire proximity switch is limited by working conditions. When it is turned on, the switch itself produces a certain voltage drop, and when it is turned off, there is a certain residual current flowing through it, which should be considered when selecting. Although the three-wire proximity switch has one more wire, it is not troubled by unfavorable factors such as residual current and works more reliably.