For a two-wire proximity switch, it is equivalent to a switch and can sense the proximity of metal or non-metal. The general principle is Hall effect. A three-wire proximity switch has two output terminals, one is normally closed and the other is normally open. When an object approaches, the state will change. Generally, we only use one end, and two. The voltage drop of the wire system is much larger than that of the three-wire system, so when using the two-wire switch, we should pay attention to the minimum voltage of the load. When using the two-wire switch, we must pass through the load (relay coil, PLC digital module, etc.), or it will be burned out by short circuit.
Inside the proximity switch is a magnetoresistor. When it approaches the value of metal resistance, it becomes smaller and turns on. The two-wire circuit must carry its allowable current load before it is connected to the power supply. It is absolutely not allowed to connect to the power supply without load.