Control method of travel switch
By recording the positions of mechanical equipment and operating mechanisms in limit switches, and establishing and correcting the movement prediction function, the control error problem caused by component aging is solved, and higher control accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202511195946.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2026-02-24
AI Technical Summary
After prolonged use, existing limit switches experience component aging, which alters the correlation between the movement distance of the mechanical equipment and the movement distance of the operating mechanism. This makes it difficult to accurately control the operating mechanism through the movement of the mechanical equipment, leading to increased control errors of the limit switch on the circuit system.
By recording the positions of mechanical equipment and operating mechanisms, a movement prediction function is established, and this relationship is corrected through correction coefficients or correction functions during long-term use to ensure the consistency of the operating mechanism with that at the time of initial use and reduce control errors.
This improves the control sensitivity and reliability of limit switches during long-term use and reduces the error of mechanical equipment in the movement of the operating mechanism.
Smart Images

Figure CN121560079A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of limit switch technology, and more specifically, relates to a control method for a limit switch. Background Technology
[0002] A limit switch is a device used to switch the motion state of mechanical equipment. It is equipped with an operating mechanism. When the operating mechanism is driven by the mechanical equipment and moves to a preset position, the limit switch will trigger an electrical signal, which will then control the circuit system to stop the mechanical equipment or change its direction of motion.
[0003] External or internal sensors can be used to record the current movement distance of mechanical equipment and operating mechanisms. In actual use, there is usually a certain relationship between the movement distance of mechanical equipment and the movement distance of operating mechanism, which can be expressed by a specific function. Based on this, the operator can precisely control the movement of operating mechanism by moving mechanical equipment.
[0004] However, after prolonged use, due to factors such as component aging, the correspondence between the moving distance of the mechanical equipment and the moving distance of the operating mechanism will not remain fixed, but will change continuously. This makes it impossible for operators to accurately control the movement of the operating mechanism by moving the mechanical equipment, which in turn leads to the control error of the limit switch on the circuit system increasing with subsequent use. Summary of the Invention
[0005] Existing limit switches, after prolonged use, are prone to problems such as component aging, making it difficult to accurately control the movement of the operating mechanism by moving the mechanical equipment. Ultimately, this results in the limit switch failing to accurately control the circuit system to switch the movement state of the mechanical equipment.
[0006] This invention proposes a control method for a limit switch, wherein the limit switch is provided with an operating mechanism (1), and a mechanical device (2) is provided on one side of the operating mechanism (1). The method is characterized by comprising the following steps: S1. After the mechanical equipment (2) moves and comes into contact with the operating mechanism (1) of the limit switch, record the position of the mechanical equipment (2) as the first initial position and the position of the operating mechanism (1) as the second initial position. S2. Record the position of the mechanical equipment (2) and the position of the operating mechanism (1) at regular intervals, and record them as the first change position and the second change position respectively. The process of moving the mechanical equipment (2) and the operating mechanism (1) is called the full movement process. Establish the correspondence between the first change position and the second change position. S3. Each time the mechanical equipment (2) and the operating mechanism (1) make a full movement, the first change position and the second change position, as well as the position change of the second change position, shall be recorded in accordance with the above method. S4. Based on the changes in the second change position during the last full movement of the operating mechanism (1), the correspondence between the first change position and the second change position is corrected. S5. Based on the result of the correction of the correspondence between the first changed bit and the second changed bit, correct the first changed bit in the current full movement process, and continue to correct the correspondence between the first changed bit and the second changed bit based on the change of the second changed bit.
[0007] Further, in steps S2-S4, a movement prediction function F is constructed with the first change position as the independent variable and the second change position as the dependent variable, as the correspondence between the two, and y=F(x), where x is the given value of the first change position and y is the predicted value of the second change position.
[0008] Furthermore, the movement prediction function is to establish a fitting curve for all the first and second changes recorded during a single movement, and use the expression of the fitting curve as the movement prediction function.
[0009] Furthermore, the change of the second changing bit in steps S3 and S4 is represented by the bit change rate, and is given the following definition: , in Y represents the bit change rate of the second changing bit at the i-th recording time during the j-th full shift. ij This represents the second changed bit at the i-th recording moment during the j-th full movement. For the j-th full movement, at the i-th recording time, the predicted value of the second change position is obtained by substituting the first change position into the movement prediction function.
[0010] Furthermore, the method for correcting the moving prediction function in step S4 is either to introduce a correction coefficient or to introduce a correction function.
[0011] Furthermore, the correction factor 'a' is obtained from the following formula: , Let be the average displacement rate during the j-th full migration process.
[0012] Furthermore, the correction function G is constructed by taking the second changed bit X at the i-th recording time during the j-th full move process. ij As the independent variable, As dependent variables, a one-to-one fitting curve is established for both, and the expression of the fitting curve is used as a correction function, and thus... , where x is the given value of the first change position, G(x) is the correction value of the first change position, y is the predicted value of the second change position, and F is the moving prediction function.
[0013] Furthermore, the formula for correcting the first change position in the full shift process in step S5 is as follows: Where a j-1 G is the correction coefficient obtained during the j-th full movement. j-1 Let be the correction function obtained during the j-th full movement.
[0014] Furthermore, in steps S1 and S2, the mechanical device (2) and the limit switch move by translation or rotation.
[0015] The beneficial effect of this invention is that it proposes a control method for limit switches. By recording the positions of the operating mechanism on the limit switch and the mechanical equipment that drives the operating mechanism at regular intervals, a relationship between the mechanical equipment and the operating mechanism is established and predicted. This relationship is then corrected by the subsequent changes in the movement of the operating mechanism. This aims to maximize the consistency between the operating mechanism on the limit switch and its initial use during long-term use, thereby reducing the error in controlling the movement of the operating mechanism by the mechanical equipment and making the control of the limit switch more sensitive and reliable. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of the control method in this invention; Figure 2 This is a three-dimensional structural diagram of the limit switch in this invention.
[0017] The correspondence between the labels and component names in the attached figures is as follows: 1. Operating mechanism; 2. Mechanical equipment. Detailed Implementation
[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments.
[0019] This invention proposes a control method for limit switches. Figure 1 A step diagram for implementing the control method, such as Figure 2 As shown, the limit switch is equipped with an operating mechanism 1, and a mechanical device 2 is provided on one side of the operating mechanism 1. A sensor is provided on the outside of the limit switch and the operating mechanism 1 to monitor the position changes of both. The present invention mainly includes the following steps: S1. Record the initial positions of mechanical equipment 2 and operating mechanism 1; In actual use, after the mechanical device 2 moves and comes into contact with the operating mechanism 1, it will drive the operating mechanism 1 to move. The movement of the mechanical device 2 and the operating mechanism 1 can be either translation or rotation. Figure 2 The system records the position of mechanical device 2 in contact with operating mechanism 1 when the mechanical device 2 translates and the operating mechanism 1 rotates. The position of mechanical device 2 is recorded as the first initial position X0, and the position of operating mechanism 1 is recorded as the second initial position Y0. The first initial position and the second initial position are generally the same, but their representation methods are different depending on the movement methods of mechanical device 2 and operating mechanism 1. Specifically, for operating mechanism 1, when its movement method is translation, the value of the second initial position is defined as 0 initial position, and when its movement method is rotation, the value of the second initial position is defined as 0° initial angle. The method for determining the value of the first initial position is the same as that for the second initial position.
[0020] S2. Construct the moving prediction function; With mechanical device 2 already in contact with operating mechanism 1, the initial time point T0 is defined as the time point at which mechanical device 2 begins to drive operating mechanism 1 to move. Afterward, the positions of mechanical device 2 and operating mechanism 1 are recorded at regular intervals. The i-th recording time is denoted as Ti, at which point mechanical device 2 is in the first change position X corresponding to the i-th recording time. i Above, the operating mechanism 1 is in the second change position Y corresponding to the i-th recording time. i The movement of operating mechanism 1 and mechanical device 2 continues until operating mechanism 1 moves to its position, causing the limit switch to send a signal to the circuit system and change its state, thus stopping the movement of operating mechanism 1 and mechanical device 2. The process from the start to the end of the movement of mechanical device 2 and operating mechanism 1 is defined as the total movement process S, and can be represented by the following data set, where n represents the total number of movements of mechanical device 2 and operating mechanism 1: Since the movement of the operating mechanism 1 is entirely driven by the mechanical equipment 2, there is a certain correlation between the first change position and the second change position. Specifically, after the entire movement process is completed, a movement prediction function can be constructed using the recorded data, with the first change position as the independent variable and the second change position as the dependent variable. This movement prediction function can predict the value of the second change position based on the given first change position, which makes it easier for the operator to accurately control the limit switch.
[0021] The method for constructing the movement prediction function F is as follows: the first and second change positions are taken as independent and dependent variables, respectively, and a fitting curve between them is established. The function expression of the fitting curve is taken as the movement prediction function, which is: y=F(x), where x is the given value of the first change position and y is the predicted value of the second change position. Usually, the recorded value during the first full movement of the limit switch is selected to construct the movement prediction function. At this time, the movement prediction function is also called the initial movement prediction function.
[0022] S3. Repeat the recording of each full move process; Each time the mechanical device 2 moves the operating mechanism 1, a full movement process occurs. Therefore, it is necessary to record each full movement process. Let the j-th full movement process be defined as S. j This leads to the following representation of S. j The data set, n represents the total number of moves of mechanical equipment 2 and operating mechanism 1: In the j-th full movement process, the i-th recorded time is denoted as T. ij This corresponds to the first change bit X of mechanical equipment 2 at the i-th recording time. ij At this time, the operating mechanism 1 is in the second change position Y corresponding to the i-th recording time. ij .
[0023] In theory, as long as the positions of mechanical device 2 and operating mechanism 1 are recorded at the same interval during each full movement, the first and second change positions corresponding to the same recording time should be exactly the same. However, during long-term use, due to the aging of the limit switch itself, although the movement of operating mechanism 1 still depends only on the movement of mechanical device 2, the functional relationship between the first and second change positions has changed. In order to repair the functional relationship between the two in the future, it is necessary to record the change of the second change position of operating mechanism 1.
[0024] Given the following definition: , in Y is the position change rate of the second position of the operating mechanism 1 at the i-th recording time during the j-th full movement. ij This represents the second change position of operating mechanism 1 at the i-th recording moment during the j-th full movement. For the j-th full movement, the predicted value of the second change bit corresponding to the i-th recording time of the operating mechanism 1 is given. If the second change bit Y at the same recording time as the i-th recording time in the j-th full movement has already been directly recorded in the (j-1)-th full movement, then... i(j-1) So there are That is, the second change position recorded in the previous full shift can be directly used as the predicted value of the second change position in the current full shift. Otherwise, a shift prediction function is needed for prediction, as shown in the following formula: , X ij This represents the first changed bit at the i-th recording time during the j-th full movement.
[0025] S4. Repair the moving prediction function; Because the position of the operating mechanism 1 of the limit switch will change during long-term use, in order to accurately predict the change of the second position of the operating mechanism 1 with the change of the first position of the mechanical device 2 and reduce the error, it is necessary to repair the movement prediction function. The specific repair process is as follows.
[0026] Define the movement prediction function for the (j-1)th full movement process as F j-1 During the j-th full movement, calculate the average position change rate of the second position of the operating mechanism 1. The standard deviation of the potential variation rate, s, are respectively: When the standard deviation of the displacement rate s is small, it can be approximated that the displacement rate of the second position at each recording time is relatively close during the j-th full movement of the operating mechanism 1. In this case, a correction coefficient a can be directly defined, and... As n increases, the range of values for the standard deviation s of the displacement rate will also increase accordingly. Operators can choose according to the actual situation. Within these ranges, the correction coefficient a can be directly calculated using the above formula.
[0027] When the standard deviation of the potential variation s does not satisfy the formula for calculating the correction coefficient a, it cannot be assumed that the potential variation rates of the second variation at each recording time are relatively close. In this case, a correction function G needs to be constructed, satisfying the following formula. The correction function G is constructed by taking X... ij As the independent variable, As the dependent variable, a fitting curve is established between the two, and the functional expression of the fitting curve is used as the correction function G, where x is the given value of the first change position, G(x) is equivalent to the correction value of the first change position, y is the predicted value of the second change position, and F is the movement prediction function. In this invention, since the correction coefficient and correction function have been introduced, F remains unchanged. In some limit switches that are more prone to mechanical aging, a new F can be obtained by refitting based on previous data after the operating mechanism 1 of the limit switch rotates a certain number of times.
[0028] S5, Correct the entire movement process.
[0029] Ideally, mechanical device 2 can drive operating mechanism 1 to move in the same way each time, so that the limit switch can control the circuit system normally each time. However, considering that the limit switch will age during long-term use, causing deviation in the movement of operating mechanism 1, a correction function is needed to correct the first change position.
[0030] Taking the i-th moment in the full shift process as an example, for ease of calculation, the time value is the same in different full shift processes as long as the value of i is the same. The first change bit X in the first full shift process is... i1 It is pre-defined and requires no correction. The correction coefficient or correction function for the first changing bit needs to be calculated by the second changing bit Y. ij Only by obtaining the positional change rate can the first change position X in the second full shift process be determined. i2 and X i1 Completely identical, the first change bit X during the (j+1)th full move process i(j+1) The correction coefficient 'a' for the j-th full move can be obtained from the j-th and (j-1)-th full moves using the method in step S4. j-1 Or the correction function G j-1 The following formula is given. Then control the mechanical equipment 2 with the first change position X i(j+1) The movement of the limit switch causes the operating mechanism 1 to move in a manner almost identical to the second change position during the first full movement, thereby controlling the limit switch more precisely. In addition, based on the correction coefficient and correction function, the operator can also predict the value of the second change position based on a given first change position, thus more accurately judging the current status of the limit switch.
[0031] Subsequently, steps S3-S4 can be repeated, that is, the correction coefficient, correction function, and moving prediction function are adjusted using the newly recorded second change bit, and a new first change bit is constructed based on the adjusted correction coefficient and correction function.
[0032] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A control method for a limit switch, wherein the limit switch is provided with an operating mechanism (1), and a mechanical device (2) is provided on one side of the operating mechanism (1), characterized in that, Includes the following steps: S1. After the mechanical equipment (2) moves and comes into contact with the operating mechanism (1) of the limit switch, record the position of the mechanical equipment (2) as the first initial position and the position of the operating mechanism (1) as the second initial position. S2. Record the position of the mechanical equipment (2) and the position of the operating mechanism (1) at regular intervals, and record them as the first change position and the second change position respectively. The process of moving the mechanical equipment (2) and the operating mechanism (1) is called the full movement process. Establish the correspondence between the first change position and the second change position. S3. Each time the mechanical equipment (2) and the operating mechanism (1) make a full movement, the first change position and the second change position, as well as the position change of the second change position, shall be recorded in accordance with the above method. S4. Based on the changes in the second change position during the last full movement of the operating mechanism (1), the correspondence between the first change position and the second change position is corrected. S5. Based on the result of the correction of the correspondence between the first changed bit and the second changed bit, correct the first changed bit in the current full movement process, and continue to correct the correspondence between the first changed bit and the second changed bit based on the change of the second changed bit.
2. The control method for the limit switch according to claim 1, characterized in that: In steps S2-S4, a movement prediction function F is constructed with the first change position as the independent variable and the second change position as the dependent variable, as the correspondence between the two, and y=F(x), where x is the given value of the first change position and y is the predicted value of the second change position.
3. The control method for the limit switch according to claim 2, characterized in that: The movement prediction function is as follows: during a single full-process movement, a fitting curve is established for each of the first and second changes recorded, and the expression of the fitting curve is used as the movement prediction function.
4. The control method for the limit switch according to claim 3, characterized in that: The change of the second changing bit in steps S3 and S4 is represented by the bit change rate, and is given by the following definition: ;in Y represents the bit change rate of the second changing bit at the i-th recording time during the j-th full shift. ij This represents the second changed bit at the i-th recording moment during the j-th full movement. For the j-th full movement, at the i-th recording time, the predicted value of the second change position is obtained by substituting the first change position into the movement prediction function.
5. The control method for the limit switch according to claim 4, characterized in that: The correction method for the moving prediction function in step S4 is divided into introducing a correction coefficient or introducing a correction function.
6. The control method for the limit switch according to claim 5, characterized in that: The correction factor, a, is obtained from the following formula: , Let be the average displacement rate during the j-th full migration process.
7. The control method for the limit switch according to claim 6, characterized in that: The correction function G is constructed by taking the second change bit X at the i-th recording time during the j-th full move. ij As the independent variable, For the dependent variable, a one-to-one correspondence is established to create a fitting curve for both variables. The expression of the fitting curve is used as a correction function, and... , where x is the given value of the first change position, G(x) is the correction value of the first change position, y is the predicted value of the second change position, and F is the moving prediction function.
8. The control method for the limit switch according to claim 7, characterized in that: The formula for correcting the first change position in the full shift process in step S5 is as follows: Where a j-1 G is the correction coefficient obtained during the j-th full movement. j-1 Let be the correction function obtained during the j-th full movement.
9. The control method for the limit switch according to claim 1, characterized in that: In steps S1 and S2, the mechanical device (2) and the limit switch move by translation or rotation.