There are two basic types of 3 wire proximity sensor applicable to certain types of PLC. The European standard PLCs are designed for positive logic circuits known as sink current input PLC which would require a PNP proximity sensor. While Asian standard PLCs, on the other hand, are designed specifically for negative logic circuits known as source current input PLC which requires an NPN proximity sensor.
Although some modern PLCs are designed with the ability to provide accessibility to easily switch the circuit connection between these two configuration, awareness on the distinction between these two types of standards is a must in order for the user to know which particular type of proximity sensor to use for a particular type of PLC.
The following electrical diagrams illustrates the difference on the wiring connection between a PNP and an NPN proximity sensor when connected to a sinking and sourcing configured input Mitsubishi PLC. Figure 1 below shows a PNP proximity sensor connected to a sinking current (positive logic) configured PLC.
|Figure 1: PNP proximity sensor connected to a sinking current input (positive logic) configured PLC.|
Figure 2 below shows an NPN proximity sensor connected to a sourcing current input (negative logic) configured PLC.
|Figure 2: NPN proximity sensor connected to a sourcing current input (negative logic) configured PLC.|
The diagram in Figure 2 shows that to be able to make it suitable to the requirements of a negative logic circuit, the PLC was configured to conform to a source current input in order to make the intended circuit to work according to the conditions of a negative logic circuit. This is achieved by joining together the S/S (Sink/Source) terminal with the 24V terminal of the PLC, while the 0V terminal is connected to the Emitter of the proximity sensor so that when the NPN transistor is activated with the detection of object by the proximity sensor, 0V is then distributed from the emitter to the collector of the transistor to complete the internal circuit of the PLCs input terminal X1.
|Figure 3: PLC Ladder Program for use with Proximity Sensor|
Figure 3 above shows a PLC ladder program intended for the wiring configurations of Figure 1 and Figure 2. This PLC ladder program is common to both sink and source current input configuration, this ladder program will work for both NPN and PNP proximity sensor.
Referring to the PLC electrical diagrams of Figure 1 and Figure 2, a manual push button switch is connected to the PLC input terminal X0 which when switched ON will cause to send one pulse action to the auxiliary relay coil M100, which in turn will set and maintain M102 at ON condition. M102 will then eventually turn ON output coil Y0.
M102 also serves as a safety interlock contact in rung 3 that prevents any unnecessary activation of pulse M101 to avoid any unwanted resetting of M102 from stray object detection by the proximity sensor when the manual push button has not been switched ON yet.
Subsequently, it follows then that for as long as M102 is initiated and maintained ON, the next step is to allow acknowledgement of input signal from the proximity sensor connected to the PLC input terminal X1 when it is activated by detecting objects, which will send one pulse signal to energize M101, which will eventually reset M102 to turn OFF output coil Y0.
Another circuit distinctly different from what was featured in this article is the traditional wiring method, which is an alternative conventional approach outside the scope of this article discussed in my blog post Wiring Connection for a Three Wire Solid State DC Proximity Sensor Without using a PLC.