Share this

A must-read for beginners: How to connect your PLC to these 7 types of devices!

2026-04-06 05:57:45 · · #1

Common input devices for PLCs include pushbuttons, limit switches, proximity switches, selector switches, DIP switches, and various sensors, while output devices include relays, contactors, and solenoid valves. Properly connecting the input and output circuits is a prerequisite for ensuring the safe and reliable operation of the PLC.

1. Connection between PLC and control electrical equipment

Figure 1 is a wiring diagram for input devices such as pushbuttons, limit switches, and changeover switches. The PLC in the figure is a DC common input type, meaning all input points share a common terminal COM, and the COM terminal has a built-in DC 24V power supply. If it is a grouped input type, the group connection can also be performed as shown in the figure below.

As shown in Figure 1, here is a connection between the PLC and the master control electrical input devices.

2. Connection between PLC and rotary encoder

A rotary encoder is a photoelectric rotary measuring device that directly converts the measured angular displacement into a digital signal (high-speed pulse signal). Therefore, the output pulse signal of the rotary encoder can be directly input to a PLC, where a high-speed counter counts the pulse signal to obtain the measurement result. Different models of rotary encoders output different numbers of pulse phases; some output three-phase pulses (A, B, Z), some only two phases (A and B), and the simplest only has one phase (A).

As shown in Figure 2, the connection between the rotary encoder and the PLC

Figure 2 shows a connection diagram between a rotary encoder that outputs two-phase pulses and an FX series PLC. The encoder has four leads: two pulse output lines, one COM terminal line, and one power supply line. The encoder can be powered by an external power supply or directly from the PLC's DC 24V power supply. The power supply "-" terminal should be connected to the encoder's COM terminal, and the "+" terminal should be connected to the encoder's power supply terminal. The encoder's COM terminal is connected to the PLC's input COM terminal, and the A and B phase pulse output lines are directly connected to the PLC's input terminals. When connecting, pay attention to the PLC's input response time. Some rotary encoders also have a shielded wire; this shielded wire must be grounded during use.

3. Connection between PLC and sensor

There are many types of sensors, and their output methods vary. When using two-wire sensors such as proximity switches and photoelectric switches, the large leakage current of the sensor may cause incorrect input signals, leading to malfunctions of the PLC. In this case, a bypass resistor R can be connected in parallel at the PLC input terminal, as shown in Figure 3. When the leakage current is less than 1mA, its effect can be ignored.

As shown in the bottom diagram, the connection between the PLC and the two-wire sensor...

In the formula: I is the leakage current of the sensor (mA), UOFF is the upper limit of the low level of the PLC input voltage (V), RC is the input impedance of the PLC (KΩ), and the value of RC varies depending on the input point.

4. Connection between PLC and multi-position DIP switch

If certain data in the PLC control system needs to be modified frequently, a multi-bit DIP switch can be connected to the PLC for external data setting. Figure 4 shows a schematic diagram of a single-bit DIP switch, which can input a decimal number 0-9 or a hexadecimal number 0-F.

Figure 4 below shows a schematic diagram of a single-position DIP switch.

As shown in Figure 5, four DIP switches are assembled together, with the COM terminals of each switch connected together and then connected to the COM terminal on the PLC input side. The four data lines of each DIP switch are connected to the four PLC input points in a specific order. As can be seen from the figure, using DIP switches occupies many PLC input points, so this method is generally not used unless absolutely necessary.

The connection between the 54-bit DIP switch and the PLC is shown in the figure below.

5. Connection between PLC and output device switches

When connecting a PLC to output devices, output points in different groups (different common terminals) can have different voltage types and levels for their corresponding output devices (loads). However, output points in the same group (same common terminal) should have the same voltage type and level. Whether to group the outputs depends on the voltage type and level of the output devices. Figure 6 illustrates the connection method between the PLC and output devices using an FX2N as an example. The connection shown in the figure assumes the output devices share the same power supply, so the common terminals of each group are connected together; otherwise, they should be grouped. The figure only shows the connection between output points Y0-Y7 and the output devices; the connection methods for other output points are similar.

As shown in Figure 6, the connection between the PLC and the output device

6. Connection between PLC and inductive load

The output terminals of a PLC are often connected to inductive output devices (inductive loads). To prevent damage to the internal output components of the PLC caused by the voltage generated when the inductive circuit is disconnected, a freewheeling diode should be connected in parallel across its terminals when the PLC is connected to an inductive output device. If it is a DC inductive load, a resistor-capacitor snubber circuit should be connected in parallel across its terminals. See Figure 6-10.

As shown in Figure 7, the connection between the PLC and the inductive output device

In the diagram, the freewheeling diode can be selected with a rated current of 1A and a rated voltage greater than 3 times the power supply voltage; the resistor value can be 50~120Ω, and the capacitor value can be 0.1~0.47μF. The rated voltage of the capacitor should be greater than the peak voltage of the power supply. Pay attention to the polarity of the freewheeling diode when wiring.

7. Connection between PLC and seven-segment LED display

A PLC can be directly connected to a seven-segment LED display using digital outputs, but if the PLC controls a multi-digit seven-segment LED display, a large number of output points are required.

As shown in Figure 8, here is the connection between the PLC and the two-digit seven-segment LED display.

As shown in Figure 8, the circuit uses a CD4513 chip with latching, decoding, and driving functions to drive a common-cathode LED seven-segment display. The data input terminals A to D of the two CD4513 chips share four output terminals of the PLC, where A is the least significant bit and D is the most significant bit. LE is the latch enable input terminal. On the rising edge of the LE signal, the BCD number input from the data input terminal is latched into the on-chip register, and then decoded and displayed. If the input is not a decimal number, the display is off. When LE is high, the displayed number is unaffected by the data input signal. Clearly, the number of output points occupied by N displays is P = 4 + N.

If the PLC uses a relay output module, pull-down resistors should be connected to each output terminal of the PLC connected to the CD4513 to prevent the input terminals of the CD4513 from being floating when the contacts of the output relays are open. When the state of the PLC output relays changes, their contacts may bounce. Therefore, a data output signal should be sent first, and after the signal stabilizes, the data should be latched into the CD4513 using the rising edge of the LE signal.

Read next

CATDOLL CATDOLL 115CM Shota Doll Kiki Male Doll

Height: 115cm Male Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: N/A ...

Articles 2026-02-22