What are the signal output methods for limit switches? How to match them with a PLC?

Feb 12, 2026

Leave a message

In industrial automation control systems, limit switches is key component to transform mechanical movement into electrical signal, and it has the core functions of position detection, stroke control and safety protection. The diversity of signal output directly determines the flexibility of matching with Programmable Logic Controllers. In this paper, the signal output type, working principle, hardware connections and logic programming of the limit switches are analyzed in detail, which provides technical reference for industrial control system design.
Type of signal output for limited-position switches
The signal output of limit switches is divided into two main types: contact type and non-contact type. Contactless also includes a variety of technical routes such as inductive, capacitive, photoelectric, magnetic, and ultrasonic methods. Different types of limit switches exhibit obvious differences in signal characteristics, application scenarios and matching methods with phase-locked rings.
1.Contact Limit Switches
Contact limit switches realizes signal output by opening and closing the mechanical contact. Their core structure consists of an operating mechanism, a contact system and a reset spring. When the moving components come into contact with the operating mechanism, the contact system changes its state and produces an electrical signal. According to the contact state, contact limit switches can be divided into the open (NO) and normally closed (NC) types:

  • Normal Open (NO): In default, the contact is open and there is no signal output. When triggered by a moving component, the contact closes, sending out an electrical signal.
  • Normal Close (NC): Contact is closed by default, with continuous output. When triggered by a moving component, the contact opens, interrupting the signal.
  • Contact limit switches has the advantages of simple structure, low cost and strong anti-jamming ability. It is widely used in machine tools, elevators and conveyor lines. However, their mechanical contacts are prone to wear and tear, their service life is affected by frequency of use, and they response speeds relatively slowly (usually in milliseconds).

2.Non-Contact Limit Switches
The contactless limit switches detects changes in physical quantities (such as inductance, capacitance, light intensity or magnetic field strength) between the target object and the sensor to achieve a signal output without mechanical contact. It is characterized by high response speeds, long service life and high reliability. According to its detection principles, the contactless limit switches can be divided into the following types:
(1) Inductive Limit Switches
Inductive limit switches detects metal objects utilizing electromagnetic induction principles. When the metal target enters the sensor's detection range, the amplitude of the oscillating circuit decreases, triggering signal output. Their output signals is usually a switch signal (high/low levels) that can be connected directly to a PLC digital input module. Inductive limit switches are suitable for metal detection scenarios such as tool position detection and metal components sorting in machine tools.
(2) Capacitive Limit Switches
The capacitance of output signals between the target object and the sensor electrode is detected by capacitance limiting switch. When a non-metallic target,such as plastic, liquid or particulate matter, enters the detection range, the capacitance value changes, triggering a signal output. Their output signals is also an exchange signal, but their detection distance is shorter than that of inductive types, and they are more affected by ambient humidity and temperature. Capacitive limit switches is often used in material level detection and packaging machine positioning.
(3) Photoelectric Limit Switches
Photoelectric limit switches detects target object by the photoelectric effect. Depending on their optical range, they can be classified into transmitters, reflectors and diffuse reflectors:
Transmission light: transmitters and receivers are installed separately. When a target object blocks the path of light, it triggers a signal. Their detection distances (up to several dozen metres) make them suitable for remote positioning.
Reflection: The transmitter and receiver are integrated in a single unit. A reflector is required to operate a signal that is triggered when a target object reflects light back to the receiver. Their detection distances is moderate.
Diffuse Reflective: The transmitter and receiver are also integrated into a single unit. The signal is triggered when light is diffused from the surface of the target object to the receiver without the need for a reflector. However, their detection distances are relatively short (usually less than 1 metre), making them suitable for close positioning.
Photovoltaic limited-position switch output switch signal response speed (microsecond range), widely used in automated production lines, logistics sorting, robot positioning and other scenarios.
(4) Magnetic Limit Switches
Magnetic limit switches utilizes Hall effect or magnetoresistive effect to detect the change of magnetic field. When a magnetic object,such as a permanent magnet, enters the detection range, the sensor outputs an electrical signal. Their output signals is an on-off signal with strong jamming resistance, making it suitable for position detection in harsh environments (such as oil and dust), such as hydraulic cylinder position feedback and valve opening detection.
(5) Ultrasonic Limit Switches

Ultrasonic limit switches distance measurement by emitting ultrasonic waves and detecting echo time. When the target object enters a set range, the sensor outputs an electrical signal. Their output signals can be switching signals or analog signals (distance values), suitable for contactless distance detection scenarios such as material stack height detection and robot obstacle avoidance.

Matching Methods of Limit Switches and Phase Lock Loop

In order to ensure reliable signal transmission and correct control logic logic, it is necessary to combine hardware connections and logic programming to match the limited-position switch with the phase-locked loop.

1. Hardware connection
(1) Power Supply Matching
The supply voltage of limit switches must match the voltage level of the PLC input module. Common PLC input modules support DC24V or AC220V power supplies, while limited-position switches typically operate on DC12V, DC24V or AC220V. If the voltage does not match, you can use a power conversion module (such as a DC-DC converter) or relay to adjust.
(2) Signal Type Matching
The signal output type (NPN or PNP) of the limit switches must match the signal reception type of the PLC input module:

  • NPN Limit Switches: output terminal is connected to the common terminal (COM) and grounding end (GND) of the PLC input module, and the signal line is connected to the PLC input point. When triggered, the signal line is transmitted to the ground and the PLC input point detects a low-level signal.
  • PNP Limit Switches: The output terminal is connected to the common terminal (COM) and positive power supply (VCC) of the PLC input module, and the signal line is connected to the PLC input point. When triggered, the signal line is connected to the positive power supply, and the PLC input point detects the advanced signal.
  • If the signal type of the limit switch does not match PLC, a signal conversion module (such as NPN-PNP converters) or relay can be used for conversion.

(3) Wiring Optimization
In order to improve the system's anti-interference capabilities of the system, the following principles should be followed when connecting a limit switches to a phase-locked ring:

  • Shielded Cable Usage: In case of long distance transmission or serious electromagnetic interference, shielded cable shall be used to connect limit switches and phase-locking rings, and the shielding layer shall be grounded.
  • Independent Power Supply: provides the independent power supply for limit switches, avoids sharing the power power supply with PLC output module or other high power equipment, reduces the power fluctuations to the signal influence.
  • Contact protection: For contact limit switches, RC absorption circuits or diodes can be connected in parallel between contacts to inhibit the arc that occurs when the contact is opened, extending contact life.

2. Logic Programming
(1) Input Point Configuration
In PLC programming software, the input point connected to a limited-position switch must have the correct signal type (high or low) and must be consistent with the hardware connection method. For example, if an an NPN limit switch is used, the PLC input point should be configured to be low-end active.
(2) Control Logic Design
The control logic of limit switches must be designed according to specific application scenarios. Common logic includes:

  • Trip control: Triggers the motor to stop or reverse using a limited-position switch to detect the end position of the moving components. For example, in an automated production line, when the cart moves to the right, limit switch is triggered, and the PLC output signal reverses the motor, causing the cart to move to the left.
  • Safety protection: use limit switches to detect dangerous areas, triggering emergency stops. In machine tool processing, for example, when the machine moves to its limit, a limit switch is triggered and PLC immediately cuts off the motor to prevent damage to the equipment.
  • Sequential Control: The complex sequential control of motion is realized through the combination of several limit switches. For example, in bit control, the combination of the original position limit switch, feed start limit switch and feed end limit switch enables automatic loop, fast feed, feed and fast retreat of the bit.

(3) Fault Diagnosis and Handling.
In order to improve the reliability of the system, the diagnosis logic of limit switches should be added into PLC program, such as:

  • Signal loss detection: using a timer to detect whether the limit-switch signal has not changed in the specified time. If it goes out of time, it triggers an alarm.
  • Signal Conflict Detection: Detects whether signals from mutually exclusive limit switches,such as forward and reverse limiting switches, are active at the same time. If so, set off the alarm.
  • Manual Reset Function: After a malfunction occurs, the fault signal must be cleared manually (for example, by pressing the reset button) in order to restore normal system operation.

Application Case Analysis
In this paper, the matching method of limit switches and PLC is introduced in detail by taking the reciprocating control of trolley in automatic production line as an example:
1. System Composition

  • Moving Components: Carts that move left and right along the guide rail.
  • Drive: A motor that drives a tram through a gearbox.
  • Limit switch: A left limit switch (NC type) and a right limit switch (NO type) are used to detect the position of the trolley on the left and right, respectively.
  • PLC: A brand of universal PLC, with support for DC24V power supply and PNP signal types.

2. Hardware connection

  • Power Supply Matching: limit switches operate in DC24V and match the voltage level of PLC input modules, so no conversion is required.
  • Signal Type Matching: The correct limit switch is NO type, which requires the use of relays to convert to a PNP signal. Specifically, the output terminal of limit switch is connected to the relay coil, and the normal open contact end of the relay is connected to the common terminal (VCC) of the PLC input module and the other end to the PLC input point. The left limit switch is NC type and is directly connected to the common terminal (VCC) and input point of the PLC input module (must be configured as low end active in PLC program).
  • Wiring Optimization: using Shielded cables connection limit switches and PLC, shielding layer grounding. An independent DC24V power supply is provided for limit switches to avoid power supply sharing with PLC output modules.

3. Logic Programming
Input Point Configuration: In PLC programming software, the input point configuration to the right limit switch is high and the input point configuration to the left limit switch is low.
Control Logic Design:

  • Start control: Press the start button and PLC outputs a signal that spins the motor forward and moves the car to the right.
  • Right Limit Detection: When the cart moves to the right, the right limit switch is triggered, relays are closed, and PLC input points detect advanced signals. PLC then outputs a signal to reverse the motor and move the trolley to the left.
  • Left Limit Detection: When the trolley moves to the left, the left limit switch is triggered and a low level signal is detected at the PLC input point. PLC then outputs a signal that spins the motor forward and moves the cart to the right.
  • STOP CONTROL: By pressing the stop button, PLC cuts off the motor and stops the trolley's motion.

Fault Diagnosis and Handling:

  • Signal Loss Detection: Use a timer to detect whether the correct limit switch signal has not changed in 10 seconds. If the timeout occurs, a "right limit fault" alarm triggered.
  • Signal Conflict Detection: Detects whether signals from the left-right limit switches are active at the same time. If so, trigger a "limit conflict" alarm.

Manual Reset Function: after the failure, press reset button to clear the fault signal, restore normal system operation.
INTRODUCTION Conclusion:
As a key component of industrial automation control systems, the limited-position switch provides a variety of signal output modes and flexible choice for system design. By reasonably matching the signal type, supply voltages and wiring methods of limit switches, and combining it with PLC logic programming, high efficiency and reliable position detection and motion control can be achieved. In practical applications, appropriate limit switch types should be selected according to the requirements of specific scenario and best practices in hardware connections and logic programming should be followed to ensure the stability and security of the system. With the development of Industry 4.0 and Internet of Things (IoT), limit switches are moving toward intelligent, networked, and will be deeply integrated with devices such as PLC, sensors, and actuators in the future, bringing more possibilities for industrial automation control.

Send Inquiry