WeChat Search
Jicheng Training

Today, we bring you the wiring methods for sensors and PLCs, with twenty wiring diagrams. Isn’t that rich? Let’s take a look!
1. Overview
The digital input interface of the PLC is not complex. To improve anti-interference capability, PLCs use optocouplers to isolate the input signals from the internal processing circuits. Therefore, the signal at the input end only drives the internal LED of the optocoupler, which is then received by the phototransistor of the optocoupler, allowing reliable transmission of external input signals.

Currently, PLC digital input ports are generally divided into single-ended common point and double-ended inputs. Due to the differences, users need to distinguish and understand the wiring when selecting external sensors to use them correctly, laying the foundation for subsequent programming work and system stability.

2. Types of Input Circuits
1Classification of Input Types
The digital input terminals of the PLC are classified by power supply into DC and AC. According to the input interface classification, they are divided into single-ended common point inputs and double-ended inputs. A single-ended common point connected to the positive terminal of the power supply is called SINK (sink current), while a single-ended common point connected to the negative terminal is called SRCE (source current).

2Overview of Terms
SINK leakage type allows current to flow out from the input terminal, so the input terminal should be connected to the negative terminal of the power supply, indicating that the internal optocoupler of the interface is a single-ended common point connected to the positive terminal, suitable for NPN-type sensors.
SOURCE type allows current to flow into the input terminal, so the input terminal should be connected to the positive terminal of the power supply, indicating that the internal optocoupler of the interface is a single-ended common point connected to the negative terminal, suitable for PNP-type sensors.
Proximity switches and photoelectric switches have NPN and PNP outputs divided into three and four wire outputs. For NPN proximity switches and photoelectric switches, when there is no detection signal, the output is high (considering an internal pull-up resistor), and when there is a detection signal, the internal NPN transistor conducts, and the switch output is low.
For PNP proximity switches and photoelectric switches, when there is no detection signal, the output is low (considering an internal pull-down resistor), and when there is a detection signal, the internal PNP transistor conducts, and the switch output is high.

The above situations are only applicable when the sensor is in a normally open state.
3By Power Supply Configuration Type
(1) DC Input Circuit
As shown in Figure 1, the DC input circuit requires the external input signal components to be passive dry contacts or DC active non-contact switch contacts. When the external input component is connected to the positive terminal of the power supply, current flows through R1, the internal LED of the optocoupler, VD1 (interface indicator), to the COM terminal, forming a loop. The receiving tube inside the optocoupler receives the signal from the external component, transmitting it to the internal processing; this interface powered by DC is called a DC input circuit;
DC power can be provided by the PLC internally or externally to the components of the external input signal. R2 in the circuit serves to bypass the current of the internal LED of the optocoupler, ensuring that the LED is not turned on by the static leakage current of the two-wire proximity switch.

(2) AC Input Circuit
As shown in Figure 2, the AC input circuit requires the external input signal components to be passive dry contacts or AC active non-contact switch contacts. The distinction from the DC interface is that a step-down circuit and bridge rectifier circuit are added before the optocoupler. After the external component is connected to the AC power, the current flows through R1, C2 through the bridge rectifier, converting it into a step-down DC. The subsequent circuit operates on the same principle as the DC circuit.
AC PLC is mainly suitable for relatively harsh environments, where wiring techniques do not change much; for example, proximity switches can directly replace the original travel switches with AC two-wire connections.

4By Port Type
(1) Single-ended Common Point (Comcon) Digital Input Method
To save input terminals, the structure of single-ended common point input connects all input circuits (optocouplers) inside the PLC to a common internal terminal marked COM, while the other end of each input circuit connects to its corresponding input terminals X0, X1, X2, …
The common point with N single-ended inputs can create N digital inputs (N+1 terminals), thus we call this structure “single-ended common point” input. Users need to follow the same practice when wiring external digital input components, connecting one end of all input components together, called the external common line of input components; the other end connects to the PLC input terminals X0, X1, X2, …
SINK input method can connect to NPN type sensors, meaning the X terminal is connected to the negative terminal.
SRCE input method can connect to PNP type sensors, meaning the X terminal is connected to the positive terminal of the device. (External input components can include push buttons, travel switches, reed switches, Hall switches, proximity switches, photoelectric switches, light curtain sensors, relay contacts, contactor contacts, and other switch components.)
(2) SINK (sink Current) Input Method ● Single-ended Common Point SINK Wiring (Internal common terminal COM→24V+, External common line→24V-). As shown in Figure 3:

(3) SRCE (source Current) Input Method
● Single-ended Common Point SRCE Wiring (Internal common terminal COM→24V-, External common line→24V+). As shown in Figure 4:

(4) SINK/SRCE Switchable Input Method
The S/S terminal differs from the COM terminal in that COM is fixedly connected to either the positive or negative terminal of the internal power supply, while the S/S terminal is non-fixed and connects to either the positive or negative terminal of the internal or external power supply as needed.
● Single-ended Common Point SINK Wiring (Internal common terminal S/S→24V+, External common line→24V-).

● Single-ended Common Point SRCE Wiring (Internal common terminal S/S→24V-, External common line→24V+).

(5) When there are many active input components (Hall switches, proximity switches, photoelectric switches, light curtain sensors, etc.) and the power consumption is relatively high, and the built-in power supply of the PLC cannot meet the requirements, an external power supply needs to be configured. According to demand, a 24VDC switch power supply of a certain power can be configured. The external power supply should not be connected in parallel with the built-in power supply. According to the characteristics of COM and external common lines, when using the SINK (sink Current) input method, the external power supply connects to the positive terminal of the built-in power supply; when using the SRCE (source Current) input method, the external power supply connects to the negative terminal of the built-in power supply.
(6) A simple way to judge the SINK (sink Current) input method is to short-circuit the Xn terminal and the negative terminal. If the interface indicator light is on, it indicates that it is the SINK input method. The optocoupler with a common positive terminal can connect to NPN-type sensors. For the SRCE (source Current) input method, short-circuit the Xn terminal and the positive terminal. If the interface indicator light is on, it indicates that it is the SRCE input method. The optocoupler with a common negative terminal can connect to PNP-type sensors.
(7) For two-wire switch inputs, if they are passive contacts, follow the input connection method shown in the above diagram. For two-wire proximity switches, it is necessary to determine the polarity of the proximity switch and connect it correctly.
(8) High-speed Dual-ended Input Circuit
This is mainly used for hardware high-speed counters (HHSC) input, with an interface voltage of 5VDC. In applications, to ensure high speed and high noise resistance, a dual-wire drive method (Line-Drive) is usually adopted. If the working frequency is not high and the noise is low, a 5VDC single-ended SINK or SRCE connection method can also be used, with a current-limiting resistor in series to convert it into a 24VDC single-ended SINK or SRCE connection method.
(9) Dual Input Dual Wire Drive Method (Line-Drive)

(10) 5VDC Single-ended SINK or SRCE Connection Method

(11) 24VDC Single-ended SINK or SRCE Connection Method

Note: For sensors powered by 24VDC, a current-limiting resistor must be connected in series on the input circuit. R1 should be 10Ω, and R2 should be 2KΩ. If a current-limiting resistor is not connected, the interface circuit may be damaged. The value of the current-limiting resistor should be 2.7KΩ.
3. External Input Components
1. Passive Dry Contacts (Push Buttons, Travel Switches, Reed Switches, Relay Contacts, etc.)
Passive dry contacts are relatively simple and easy to wire. There are no factors such as power supply polarity or voltage drop. The input components shown in Figure 3-6 are exactly this type. No further introduction is needed here.
2. Active Two-wire Sensors (Proximity Switches, Active Reed Switches)
Active two-wire proximity switches are classified into DC and AC. The characteristic of these sensors is that they have two wires. When the output end of the sensor is conductive, a holding voltage is needed to keep the circuit working, usually a voltage drop of 3.5-5V, with a static leakage current of less than 1mA. This index is very important; if it is too high, the optocoupler of the PLC input end will conduct when there is no detection signal.
DC two-wire proximity switches are divided into those with diode polarity protection and those with bridge rectifier polarity protection. The former requires attention to polarity when connecting to the PLC, while the latter does not. Active reed switches are mainly used for position detection on cylinders and do not require attention to polarity due to the internal bidirectional diode circuit; AC two-wire proximity switches also do not require attention to polarity. As shown in Figure 10:

(1) Single-ended Common Point SINK Wiring (Internal common terminal COM→24V+, External common line→24V-). As shown in Figure 11:

(2) Single-ended Common Point SRCE Wiring (Internal common terminal COM→24V-, External common line→24V+). As shown in Figure 12:

(3) The S/S terminal connection method refers to Figures 5-6 and 11-12.
3. Active Three-wire Sensors (Inductive Proximity Switches, Capacitive Proximity Switches, Hall Proximity Switches, Photoelectric Switches, etc.) The DC active three-wire proximity switches and photoelectric switches use transistors for output. Therefore, sensors are divided into NPN and PNP outputs. Some products have four-wire configurations with dual NPN or dual PNP outputs, which are just opposite states. There are also combined NPN and PNP four-wire outputs.
For NPN type, when the sensor detects a signal VT conducts, the current flows from the output terminal OUT to the negative terminal, making the output terminal OUT potential close to the negative terminal, usually referred to as high level turning into low level.
For PNP type, when the sensor detects a signal VT conducts, the current flows from the positive terminal to the output terminal OUT, making the output terminal OUT potential close to the positive terminal, usually referred to as low level turning into high level.
The resistor on the emitter of the transistor in the circuit is a short-circuit protection sampling resistor of 2-3Ω, which does not affect the output current. The resistor on the collector of the transistor is a pull-up and pull-down resistor, providing output potential for easy interface circuit. Another type of output from the transistor collector is open-collector output, which does not connect to pull-up and pull-down resistors.
In simple terms, when the transistor VT conducts, it is equivalent to a contact closing, as shown in Figure 13:

(1) Single-ended Common Point SINK Wiring (Internal common terminal COM→24V+, External common line→24V-). As shown in Figure 14:

(2) Single-ended Common Point SRCE Wiring (Internal common terminal COM→24V-, External common line→24V+). As shown in Figure 15:

(3) The S/S terminal connection method refers to Figures 5-6, 11-12, and 14-15.
The variety of PLC input interface circuit forms and the output signal forms of external components (sensors) necessitate an understanding of the PLC input circuit forms and the sensor output signal forms before wiring the PLC input module to ensure correct connections. This understanding will facilitate practical applications and lay the foundation for subsequent programming work and system stability.
HISTORY/Previous Recommendations
Complete question bank for the 2021 Electrician Beginner Exam (including answers)
Is troubleshooting inverter faults difficult? Just one click!
Can you access all electrical exam questions with one click? Do you not own this amazing tool yet?
Which of the five major electrical drawing software (CAD, Eplan, CADe_simu…) do you pick?
Latest electrical version of CAD drawing software, with ultra-detailed installation tutorial!
Latest electrical drawing software EPLAN, with ultra-detailed installation tutorial!
Common issues for beginners using S7-200 SMART programming software (includes download links)
Comprehensive electrical calculation EXCEL spreadsheets, automatically generated! No need to seek help for electrical calculations!
Bluetooth headsets, electrician/PLC beginner books are yours for the taking? Come and claim your electrical gifts!
Basic skills of PLC programming: Ladder diagrams and control circuits (including 1164 practical cases of Mitsubishi PLC)
Still can’t understand electrical diagrams? Take away the basics of electrician drawing and simulation software, quickly get started with theory and practice!
12 free electrician video courses, 10GB software/e-book materials, and 30 days of free electrician live classes are being given away!

Don’t forget to like + watch!
Click “Read the Original” to learn PLC/electrician courses for free.