Share this

Connect the sensor to the PLC digital input port

2026-04-06 04:51:16 · · #1

I. Taking a proximity sensor as an example, its output switching quantity serves as the digital input to the PLC. Based on the type of its output stage switching transistor, it is divided into NPN and PNP types. Each type has open-collector output and output with pull-up or pull-down resistors on the collector, as shown in Figures 1 and 2.

1. Open collector output is beneficial for level conversion and matching, and can easily realize "AND" and "OR" logic relationships; because the internal transistor is in a high-impedance state when it is cut off, when testing with only power supply connected and no load is connected, its high-low level conversion state cannot be measured with a multimeter, so do not mistakenly judge it as bad.

2. When the collector has a pull-up or pull-down resistor, the high-low level transition can be easily measured from the output terminal after connecting the power supply. This type of switch is generally used alone, and it is important to ensure that its power supply voltage is consistent with the voltage required by the PLC input port.

3. Two-wire proximity switches require a certain holding current and potential difference to operate. It is not recommended to connect them directly to the PLC's digital input port. However, they can be connected to the PLC's digital input port after being converted by an intermediate relay. See Figure 6.

II. The digital input ports of Siemens SMART PLCs, due to the two anti-parallel LEDs in their optocoupler input units, can be either source-type or sink-type inputs; the key is to form a closed loop. It's important to note that for Siemens PLCs, source-type or sink-type input is relative to the PLC input point; current flowing out is source-type, and current flowing in is sink-type, as shown in Figures 3 and 4.

1. Because normally open proximity switches are more in line with the logic habits of programmers, most of the switches connected to PLC digital input ports are normally open.

2. When the field sensors are far from the control cabinet, their power supply is prone to interference and malfunctions. Local power can be supplied on-site, and the relays can be controlled first, with the passive contacts of the relays used as PLC inputs.

During maintenance, if the corresponding type of sensor is not available on site, this conversion method can also be used. Passive contacts have no polarity and can be used for both source and sink inputs, as shown in Figures 5 and 6.

3. When a signal needs to be emitted only when several sensors are triggered simultaneously, or when an emission occurs only when one sensor receives a signal, open-collector type sensors can be connected in parallel (OR logic) or in series (AND logic), as shown in Figures 7 and 8. It should be noted that this is not only to save PLC I/O ports, but primarily for protection or to enhance reliability, ensuring the protection of personnel and equipment. Because there are many manufacturers and their internal circuits are not standardized, when using several sensors in parallel or series, it is essential to conduct a test first to verify feasibility and operational reliability.

III. Photoelectric switches are similar to proximity switches and will not be described in detail. The following section introduces incremental photoelectric encoders.

1. Photoelectric encoders offer signal outputs including open-collector output, bus drive output (differential output), push-pull output, and voltage output. Because of the open-collector output, level matching is easy and fewer external leads are required, making it suitable for use with PLCs.

2. Photoelectric encoders are precision photoelectric devices; their internal optical prisms and photosensitive elements are fragile and easily damaged. They must be protected from impacts during use.

3. The connection to the PLC uses a high-speed digital input port. The appropriate input point filtering time must be configured in the software based on the encoder resolution and speed. A value of 0.2 µs can be directly selected for testing; selecting a longer time may result in pulse loss.

4. Before use, consult the manufacturer's manual. The following is an example of connecting a PNP incremental encoder to a SMART PLC. See Figure 9 for the connection method.


Read next

CATDOLL Dodo 109CM TPE

Height: 109cm Weight: 15.6kg Shoulder Width: 26cm Bust/Waist/Hip: 52/50/57cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22