Magnetic switch: The core component for detecting the position of the automated cylinder. Its function, selection and installation
Time: 2026/1/16 Views: 194

Today, Wuxi Rihuan Sensor Technology Co., Ltd. will introduce magnetic switches to us. These are the core components for detecting the positions of automated cylinders, and we will learn about their functions, selection, and installation. 

In the precise control system of automated equipment, the cylinder, as the core component of the actuator, the accuracy of its extension and retraction positions directly determines the operational efficiency and stability of the entire system. And the magnetic switch is the "eye" that realizes the precise detection of the cylinder's position, widely used in mechanical manufacturing, electronic processing, automotive assembly and other automated scenarios. As a professional brand deeply involved in sensor technology, Jihuan Sensing, with years of technical accumulation, has launched the MS series of magnetic switches (including DMSH/DMSG/DMSE and other sub-models), which perfectly meet the requirements of cylinder magnetic ring detection and have become the preferred solution for many automated enterprises. This article will combine the characteristics of Rihuan Sensing's MS series products, from four dimensions - the core function of magnetic switches, key classification, installation methods and application precautions - to comprehensively analyze this basic component of automation.

1. Core Function: Precisely Control the "End Point" of the Cylinder

The core function of the magnetic switch is to detect the position of the cylinder. Specifically, it determines whether the piston of the cylinder reaches the preset position during its extension and retraction. Its working principle is based on the magnetic control effect - the cylinder piston usually has a magnetic ring installed, and when the piston moves near the magnetic switch, the magnetic-sensitive element inside the switch is triggered by the magnetic field, transmitting the "position reached" information to the control system, thereby achieving subsequent action interlocking.

Jihuan Sensing's MS series magnetic switches are precisely adapted to the requirements of the cylinder in this core function:

Its sensing method is "NS in the middle of the magnetic ring", perfectly matching the magnetic field characteristics of the cylinder piston's magnetic ring, with the sensitivity of the switch covering 30-800GS (some models are 40-280GS), capable of stably capturing the piston's position signal;

From the actual scenario, the role of the MS series can be refined into two points:

Travel Limiting: Preventing the cylinder from over-movement and causing mechanical collisions, the MS series has a protection level of IP67 and can work stably in complex working conditions such as dust and oil contamination; 

 

II. Key Classification: Select Models Precisely Based on Appearance and Output Method

For the MS series magnetic switches, the models should be classified based on "switch appearance" and "output method". Different classifications directly correspond to the compatibility of the cylinder and the wiring logic. The following are the core classification dimensions:

(1) By switch appearance: Matching the installation structure of the cylinder

The MS series includes sub-styles such as DMSH, DMSG, DMSE, DMSJ, and DMST, all using the "groove / fixture" installation method, which respectively adapt to the installation slot sizes of different cylinders: 

image (1).png

(2) According to wiring methods: two-wire system and three-wire system

The wiring method determines the connection logic between the magnetic switch and the power supply and the load, and is also a parameter that needs to be prioritely confirmed during the selection process. The core differences between the two are as shown in the following table: 

image.png

III. Four Installation Methods: Suitable for Different Cylinder Types and Scenarios

The installation method of magnetic switches needs to be determined based on the structure of the cylinder (such as whether it has a pull rod, whether there is an installation surface), size (small or large), and usage environment (whether it is subject to impact or vibration). The four common installation methods each have their applicable scenarios and operation points. 

(1) Steel Band Installation: The Preferred Option for Small and Medium-sized Cylinders without Pull Rods

Steel band installation is suitable for small and medium-sized cylindrical cylinders without pull rods. The magnetic switch is fixed on the outer side of the cylinder tube using steel bands. The core advantage is that it is firmly fixed and less affected by vibrations. However, when operating, two key details need to be noted: 


Torque control: When tightening the steel belt, the torque should not be too large - excessive force will cause the steel belt to be stretched, losing its fixation effect. In severe cases, the steel belt may even break;

Horizontal installation: The steel belt must remain parallel to the cylinder barrel and cannot be tilted. Otherwise, when the cylinder operates, it will be subjected to impact, and the steel belt is prone to loosen, resulting in a deviation of the switch position. 

image (2).png


There are two common types of steel band installation: one is fixed by the combination of "switch bracket + steel band", and the other is integrated fixation of the steel band and the switch using the "switch retaining seat" (the specific form needs to be combined with actual accessories, not limited to the above two). 

(2) Track Installation: Small and Medium-sized Cylinders Compatible with Cylinders with Installation Surfaces

The core of track installation is to fix the magnetic switch on the installation surface of the cylinder or on the preset track through the combination of "track + hex nut + installation screw". This method is applicable to small and medium-sized cylinders as well as cylinders with installation surfaces (such as square cylinders and standard cylindrical cylinders). 

image (3).png

The key operation points lie in "position adjustability": During installation, the magnetic switch can be adjusted along the track by sliding the square nut, precisely aligning with the "position of completion" of the cylinder piston. After adjustment, simply tighten the installation screws. Common types of track installations include "direct insertion of the switch into the track + screw fixation" and "indirect fixation through a J-shaped installation piece", which offer high flexibility and are suitable for scenarios where the detection position needs to be frequently fine-tuned. 

(3) Installation of pull rods: Special method for cylinders with pull rods

For some cylinders (such as large double-acting cylinders), the ends of the cylinder body will be equipped with pull rods (to enhance the cylinder's strength). In this case, the "pull rod installation" method should be adopted: a special "magnetic switch mounting piece" should be inserted onto the pull rod of the cylinder, and ensure that the bottom surface of the mounting piece is completely in contact with the surface of the cylinder barrel - if there is any gap, the vibration during the cylinder's operation will cause the mounting piece to shake, affecting the detection accuracy. 

image (4).png


The advantage of this method is that the fixed point is closely linked to the cylinder body, ensuring strong stability in the detection position, making it suitable for heavy-duty pneumatic equipment with high precision requirements. 

(4) Direct Installation: Simple and Efficient "Slot-Based Fixation"

Direct installation is the most straightforward method and is suitable for cylinders with an "installation slot" already provided by the cylinder body: Insert the magnetic switch directly into the installation slot of the cylinder body, and then fix it using the "locking screw" (in some scenarios, an installation accessory may be needed to assist in the fixation). 


image (5).png

The core requirement is "proper insertion + tight screwing": The switch must be fully inserted into the bottom of the installation slot to prevent loosening due to insufficient insertion depth; the locking screw must be tightened, but not with excessive force that could damage the cylinder's threads. This method is highly efficient and suitable for batch assembly or in scenarios with limited space for equipment. 


IV. Application Notes: Ensure Stable Operation

(1) Circuit Connection: Match the Output Mode with the Load

The safety and detection accuracy of magnetic switches not only depend on the selection and installation, but also require attention to two key details: 

Power Supply and Load: In two-wire systems, it is essential to strictly prevent "direct connection to the power supply".

Two-wire magnetic switches are the type most prone to burning out - because their internal circuit lacks overload protection design. If the brown and blue wires are directly connected to the power supply (without connecting the load in series), it will cause a short circuit in the internal coil and instantly burn out the switch. Therefore, when wiring two-wire switches, the circuit logic of "power supply → load → magnetic switch → power supply" must be followed to ensure that the current passes through the load before entering the switch. 

image (6).png


Although three-wire switches do not require the connection of loads, it is necessary to distinguish between PNP/NPN output types to avoid mismatch with the input signal type of the control system (for example, if the PLC input is NPN type but a PNP type switch is connected, the signal transmission will not be normal). 

(2) Multiple switches in parallel: The spacing should be greater than 40mm to prevent interference

When two pneumatic cylinders use magnetic switches in parallel (such as adjacent pneumatic operation positions in an automated production line), be cautious of "magnetic field mutual interference" - the magnetic rings on the piston of the cylinders will generate magnetic fields. If the distance between the two cylinder barrels is too close, the superposition of the magnetic fields will cause the switches to trigger incorrectly, affecting the detection accuracy. 

image (7).png

Therefore, the document clearly stipulates: The distance between the two cylinders should be greater than 40mm. The magnetic field should be isolated by a physical barrier to ensure that each magnetic switch is only affected by the magnetic field of the corresponding cylinder piston. 



As a reliable product in the field of automated detection, the RIHUAN Sensor MS series magnetic switches (including DMSH/DMSG and other sub-models) offer precise magnetic ring sensing, flexible installation compatibility, and stable circuit performance, providing reliable position detection solutions for various cylinders. It is a practical choice for industries such as mechanical manufacturing and electronic processing.