Servo feeder implementation method and system based on photoelectric switch trigger compensation

Through the compensation method based on photoelectric switch triggering, the photoelectric switch signal is used to determine the tooth number and controlled by the motor end position, which solves the accuracy and stability problems caused by mechanical wear of the servo motor feeder during long-term use, achieving high precision and low maintenance. Cost-effective feeding effect.

CN118574404BActive Publication Date: 2024-09-27HEFEI ANXIN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411048858.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-09-27
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

Existing servo motor feeders are prone to control failure due to mechanical wear under long-term and high-intensity use. Photoelectric encoders and magnetic encoders are high in cost, difficult to maintain, and require high structural stability, which affects feeding accuracy and stability.

Method used

A compensation method based on photoelectric switch triggering is adopted. The ratchet triggers the photoelectric switch signal to determine and update the tooth number. The feed wheel motor end position control is used to achieve accurate feeding of the ratchet end to avoid mechanical structure wear affecting accuracy. The motor end position closed-loop control is used to reduce structural stability. sexual requirements.

Benefits of technology

It improves feeding accuracy and stability, reduces maintenance costs, avoids accuracy deterioration and control failure caused by mechanical wear, and overcomes the shortcomings of high structural stability requirements and difficult maintenance in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118574404B
    Figure CN118574404B
Patent Text Reader

Abstract

The present invention relates to the field of control technology, and specifically discloses a servo feeder implementation method and system based on photoelectric switch trigger compensation, the method comprising: the ratchet triggers a photoelectric switch signal to determine the initial current tooth number of the ratchet; according to the initial current tooth number and the corresponding compensation value, the initial current tooth number of the ratchet is driven to move to the corresponding position and then stop; after receiving the feeding and / or withdrawing instruction, the target tooth number corresponding to the target position is calculated; the feeding wheel motor drives the ratchet to rotate to start feeding and / or withdrawing, and the current tooth number of the ratchet is updated in real time according to the ratchet trigger photoelectric switch signal of the feeder until the current tooth number is the target tooth number; according to the compensation value corresponding to the target tooth number, the target tooth number of the ratchet is driven to move to the accurate position. This scheme effectively avoids the problem that the mechanical structure of the feeder is worn out for a long time, which causes the feeding accuracy to deteriorate or even be lost, improves the feeding accuracy and stability, reduces the maintenance difficulty, and saves costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of control technology, and in particular to a servo feeder implementation method and system based on photoelectric switch trigger compensation. Background Art

[0002] The electronic manufacturing industry has developed rapidly in recent years, especially the widespread application of surface mount technology (SMT), which has made the placement of electronic components more efficient and accurate. As the core equipment in the SMT production line, the performance of the placement machine directly affects the production efficiency and quality of electronic products. During the operation of the placement machine, the feeder (feeder) plays a vital role, responsible for accurately and quickly delivering components to the placement position.

[0003] At present, feeders are mainly divided into two categories: pneumatic feeders and servo motor feeders. Pneumatic feeders use changes in air pressure to convey components, and have the advantages of simple structure and low cost, but have certain limitations in terms of accuracy and speed. Servo motor feeders use precise motor control to achieve high-precision conveying of components. For example, the ratchet end of the servo motor feeder uses sensors such as photoelectric encoders and magnetic encoders for position closed-loop control to improve conveying accuracy. However, since photoelectric encoders and magnetic encoders are costly and difficult to maintain, and are sensitive to structural changes, the existing servo motor feeders have high requirements for structural stability, and control failure may occur due to mechanical wear under long-term and high-intensity use. Summary of the invention

[0004] The purpose of the present invention is to overcome the problems existing in the prior art and provide a servo feeder implementation method and system based on photoelectric switch trigger compensation, which can improve the feeding accuracy and stability of the feeder and reduce maintenance costs.

[0005] In order to achieve the above object, the first aspect of the present invention provides a servo feeder implementation method based on photoelectric switch trigger compensation, the method comprising the following steps:

[0006] When the feeder is powered on, the ratchet of the feeder triggers the photoelectric switch signal to determine the initial current tooth number of the ratchet;

[0007] According to the initial current tooth number and the corresponding compensation value, the initial current tooth number of the ratchet is driven to move to the corresponding position and then stop;

[0008] After receiving the feeding and / or withdrawing instructions, the target tooth number corresponding to the target position is calculated;

[0009] The feed wheel motor drives the ratchet wheel to rotate to start feeding and / or withdrawing the material. The current tooth number of the ratchet wheel is updated in real time according to the ratchet wheel triggering photoelectric switch signal of the feeder until the current tooth number is the target tooth number;

[0010] According to the compensation value corresponding to the target tooth number, the target tooth number of the ratchet is driven to move to the accurate position.

[0011] Preferably, the process of determining the initial current tooth number of the ratchet according to the ratchet-triggered photoelectric switch signal of the feeder comprises the following process:

[0012] After the feeder is powered on, the feed wheel motor of the feeder rotates at a constant speed and drives the ratchet wheel to rotate until the photoelectric switch signal is triggered;

[0013] The initial current tooth number is obtained by searching the teeth according to the Hall encoder value at the ratchet end when triggered.

[0014] Preferably, the method of driving the ratchet wheel to move to a corresponding position and then stop according to the initial current tooth number and the corresponding compensation value is specifically as follows:

[0015] According to the compensation value corresponding to the initial current tooth number, the multi-turn electrical angle encoding value of the feed wheel motor when the initial current tooth number rotates to the correct position is calculated as target_counter;

[0016] The feed wheel motor stops when the multi-turn electrical angle encoding value reaches target_counter, and the initial current tooth number and corresponding position confirmation are completed.

[0017] Preferably, the photoelectric switch includes a main photoelectric switch and an auxiliary photoelectric switch, and the initial current tooth number is determined by the main photoelectric switch trigger signal. If the main photoelectric switch and the auxiliary photoelectric switch trigger signals alternately, the current tooth number is updated. If one of the photoelectric switches is triggered twice in succession, the current tooth number is not updated.

[0018] Preferably, the process of updating the current tooth number of the ratchet in real time according to the ratchet-triggered photoelectric switch signal of the feeder is as follows:

[0019] After the feeding wheel motor starts feeding and / or retracting the material, the ratchet triggers the photoelectric switch to judge the current and last triggered photoelectric switches;

[0020] If the main photoelectric switch is currently triggered and the auxiliary photoelectric switch was triggered last time, the current tooth number will increase by 1 when feeding and decrease by 1 when returning; if the auxiliary photoelectric switch is currently triggered and the main photoelectric switch was triggered last time, the current tooth number will increase by 1 when feeding and decrease by 1 when returning.

[0021] Preferably, the method further comprises:

[0022] Set the two parameters of main variable and sub-variable to indicate that the last time was the main photoelectric switch triggered and the last time was the sub-photoelectric switch triggered. After power-on to determine the initial current tooth number, the main variable is 1 and the sub-variable is 0;

[0023] The feeding wheel motor starts feeding and / or retracting the material, and after the photoelectric switch is triggered,

[0024] If the main photoelectric switch is triggered and the secondary variable is 1, the current tooth number is increased by 1 when feeding, and the current tooth number is reduced by 1 when returning, and the secondary variable is updated to 0 and the main variable is 1, which is used for the next update reading judgment of the current tooth number; if the main photoelectric switch is not triggered and the main variable is 1, the current tooth number is increased by 1 when feeding, and the current tooth number is reduced by 1 when returning, and the secondary variable is updated to 0 and the main variable is 1, which is used for the next update reading judgment of the current tooth number.

[0025] Preferably, the feeding wheel motor drives the ratchet wheel to rotate to start feeding and / or withdrawing the material as follows:

[0026] After receiving the material feeding or material withdrawal instruction, the ratchet target tooth number corresponding to the target position is calculated;

[0027] The feed wheel motor controls the ratchet movement and updates the current tooth number in real time. When the current tooth number is the target tooth number, the electrical angle multi-turn encoding value corresponding to the target position at the motor end is calculated based on the electrical angle multi-turn encoding value of the feed wheel motor when the target tooth number triggers the photoelectric switch and the compensation value corresponding to the target tooth number, and the feed wheel motor end is controlled to send it to the target position.

[0028] Preferably, after calculating the multi-turn electrical angle encoding value corresponding to the target position of the motor end, the deceleration speed curve is planned according to the compensation value and the current speed, the ratchet deceleration is controlled according to the deceleration speed curve planning, and the feeding wheel motor end is driven to the multi-turn electrical angle encoding value corresponding to the target position to control the delivery to the target position.

[0029] A second aspect of the present invention provides a feeder error compensation system based on photoelectric switch triggering, comprising:

[0030] The initial current tooth number determination module is used for determining the initial current tooth number of the ratchet by triggering the photoelectric switch signal of the ratchet after the feeder is powered on, and driving the ratchet to move to the corresponding position according to the initial current tooth number and the corresponding compensation value and then stop;

[0031] A target tooth number determination module is used to calculate the target tooth number corresponding to the target position after receiving a material feeding and / or material withdrawing instruction;

[0032] The trigger update module is used for the feed wheel motor to drive the ratchet wheel to rotate to start feeding and / or unloading, and the current tooth number of the ratchet wheel is updated in real time according to the ratchet wheel trigger photoelectric switch signal of the feeder until the current tooth number is the target tooth number;

[0033] The compensation module is used to drive the target tooth number of the ratchet to move to an accurate position according to the compensation value corresponding to the target tooth number.

[0034] A third aspect of the present invention provides a computer-readable storage medium, comprising a program, wherein the program can be executed by a processor to implement the steps of the above method.

[0035] Through the above technical scheme, the ratchet is used to trigger the photoelectric switch to determine and update the tooth number. The feeding of each tooth is based on the photoelectric switch as the compensation reference. The position control of the feeding wheel motor end is used to realize the final accurate feeding of the ratchet end. The change of gear gap will not affect the accuracy, which effectively avoids the problem of long-term mechanical structure wear of the feeder causing the feeding accuracy to deteriorate or even be lost, thereby improving the feeding accuracy and stability. In addition, compared with the scheme that relies on the use of optical or magnetic encoding at the ratchet end for position closed-loop, the present invention adopts motor end position closed-loop control, and the influence of motor end position feedback fluctuation on the ratchet end is very small, which overcomes the disadvantage of the existing ratchet end closed-loop scheme that has high requirements for the stability of the ratchet end structure, further improves the feeding accuracy and stability, and at the same time reduces the maintenance difficulty and saves costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0037] Figure 1 It is a schematic diagram of the process of an embodiment of the present invention;

[0038] Figure 2 It is a schematic diagram of the process of updating the current tooth number of the ratchet in real time according to the ratchet triggering photoelectric switch signal of the feeder;

[0039] Figure 3 Schematic diagram of ratchet alternately triggering the main and auxiliary photoelectric switches in an embodiment of the present invention;

[0040] Figure 4 It is a schematic diagram of the local structure of a feeder according to an embodiment of the present invention.

[0041] In the figure, 1. Main photoelectric switch; 2. Auxiliary photoelectric switch; 3. Ratchet; 4. Feed wheel motor. DETAILED DESCRIPTION

[0042] In order to further illustrate the features of the present invention, the technical solution of the present invention is described in more detail below through specific implementation methods. However, the present invention can be implemented in many other places different from the description, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited by the specific implementation disclosed below.

[0043] A first aspect of an embodiment of the present invention provides a method for implementing a servo feeder based on photoelectric switch trigger compensation, the method comprising the following steps:

[0044] S1, the feeder is powered on, and the ratchet of the feeder triggers the photoelectric switch signal to determine the initial current tooth number of the ratchet;

[0045] like Figure 1 As shown in the figure, after the feeder is powered on, the pre-trigger action is performed: the feed wheel motor rotates at a certain speed to drive the ratchet forward until the ratchet triggers the photoelectric switch to perform subsequent operations, and then the initial current tooth number is obtained according to the Hall code value of the ratchet end when triggered. The ratchet Hall code value is obtained by using Heidemann correction and Cordic solution.

[0046] S2, according to the initial current tooth number and the corresponding compensation value, the initial current tooth number of the ratchet is driven to move to the corresponding position and then stop;

[0047] According to the compensation distance value corresponding to the initial current tooth number, the multi-turn electrical angle encoding value target_counter of the motor corresponding to the exact position is calculated, and the deceleration movement begins. When the multi-turn electrical angle encoding value reaches target_counter, it stops. The feed wheel motor is in a holding state. At this time, the material picking point is accurate, and the initial current tooth number is determined. The compensation value corresponding to each tooth number of the ratchet is the data that has been calibrated and saved in advance. When in use, it can be directly read according to the tooth number. The calibration of the compensation value determines the type and calibration method of the compensation value according to the actual application scenario, such as the patent for "calibration, compensation method and system for gear angle error using incremental encoder" (application number 202210461992.2).

[0048] S3. After receiving the feeding and / or withdrawing instruction, the target tooth number corresponding to the target position is calculated.

[0049] S4, the feeding wheel motor drives the ratchet wheel to rotate to start feeding and / or withdrawing the material, and the current tooth number of the ratchet wheel is updated in real time according to the ratchet wheel triggering photoelectric switch signal of the feeder until the current tooth number is the target tooth number;

[0050] Further, in step S4, the feeding wheel motor drives the ratchet wheel to rotate to start feeding and / or withdrawing the material as follows:

[0051] The logic of updating the tooth number when feeding or withdrawing ensures that the current tooth number is absolutely accurate and reliable. After receiving the feeding or withdrawing instruction, the ratchet target tooth number corresponding to the target position is calculated to determine whether it is the tooth to start the position closed-loop control.

[0052] First, the speed planning curve is calculated according to the displacement. The feed wheel motor controls the ratchet movement according to the speed planning curve and updates the current tooth number in real time. When the current tooth number is the target tooth number, the electrical angle multi-turn coding value corresponding to the target position at the motor end is calculated according to the electrical angle multi-turn coding value of the feed wheel motor when the photoelectric switch is triggered by the target tooth number and the compensation value corresponding to the target tooth number, and the feed wheel motor is controlled to send it to the target position.

[0053] S5. According to the compensation value corresponding to the target tooth number, the target tooth number of the ratchet is driven to move to the accurate position. Specifically, after calculating the multi-turn electrical angle encoding value corresponding to the target position at the motor end, a deceleration speed curve is planned according to the compensation value and the current speed. The ratchet is controlled to decelerate according to the deceleration speed curve planning, and the feeding wheel motor end is driven to the multi-turn electrical angle encoding value corresponding to the target position to control the delivery to the target position.

[0054] Exemplarily, the feeding process is as follows:

[0055] 1) Under the guarantee of the initial current tooth number determined at power-on and the tooth number update logic during feeding and unloading, the current tooth number is known. When feeding, the number of teeth to be added can be calculated according to different step pitches, such as adding 1 for 2mm, adding 2 for 4mm, and so on. In this way, the target tooth number can be obtained, and the theoretical displacement corresponding to the step pitch (the unit is counter, one circle at the motor end is 16777216 counter) can also be obtained.

[0056] (2) The feeding speed is planned according to the theoretical displacement to obtain the time nodes of acceleration, uniform speed and deceleration.

[0057] (3) Perform position closed-loop control until the ratchet triggers the pawl detection photoelectric switch.

[0058] (4) The logic of updating the current tooth number is the process of updating the tooth number when feeding and returning the material, which will not be repeated here.

[0059] (5) If the current tooth number is equal to the target tooth number, it means that the position closed-loop control of the end position can be switched to; otherwise, the movement needs to continue.

[0060] (6) When it is determined in step (5) that the end has been reached and closed-loop position control is required, according to the designed calibration process, the distance between the accurate material picking position and the position triggered by the photoelectric switch is the compensation displacement of the current tooth number. The electrical angle multi-turn encoding value at this time and the compensation displacement can be obtained to calculate the electrical angle multi-turn encoding value corresponding to the target position.

[0061] (7) Plan the terminal deceleration speed curve based on the compensation displacement and current speed in step (6).

[0062] (8) Control the ratchet deceleration according to the speed and position planned by the terminal deceleration speed curve.

[0063] (9) When the target position is within the threshold range, the feeding is terminated.

[0064] The material return process is the same as the material delivery process and will not be repeated here.

[0065] Taking into account the situation that trigger signals will be generated on both sides of the tooth when the direction of the same tooth changes, the tooth number corresponding to the tooth position does not need to be updated, and the problem is solved by using two independent primary and secondary pawl detection photoelectric switches.

[0066] In another embodiment of the present invention, the photoelectric switch includes a main photoelectric switch and an auxiliary photoelectric switch, and the initial current tooth number is determined by the trigger signal of the main photoelectric switch. If the main photoelectric switch and the auxiliary photoelectric switch trigger signals alternately, the current tooth number is updated. If one of the photoelectric switches is triggered twice in a row, the current tooth number is not updated.

[0067] Further, based on the main photoelectric switch and the auxiliary photoelectric switch, in step S4, the process of updating the current tooth number of the ratchet in real time according to the ratchet trigger photoelectric switch signal of the feeder is as follows:

[0068] After the feeding wheel motor starts feeding and / or retracting the material, the ratchet triggers the photoelectric switch to judge the current and last triggered photoelectric switches;

[0069] If the main photoelectric switch is currently triggered and the auxiliary photoelectric switch was triggered last time, the current tooth number will increase by 1 when feeding and decrease by 1 when returning; if the auxiliary photoelectric switch is currently triggered and the main photoelectric switch was triggered last time, the current tooth number will increase by 1 when feeding and decrease by 1 when returning.

[0070] For example, Figure 4 As shown, the main photoelectric switch and the auxiliary photoelectric switch are arranged on the feeder corresponding to the ratchet position, the distance between the main photoelectric switch and the auxiliary photoelectric switch is less than or equal to the distance between the adjacent teeth of the ratchet, and the ratchet is connected to the feeding wheel. Figure 2 As shown in the figure, the flow chart of updating the tooth number according to the triggering photoelectric switch during feeding and unloading: after the power is turned on to determine the initial tooth number, the current tooth number is only updated according to the triggering of the photoelectric switch and the feeding and unloading conditions during operation. In addition, considering that when the direction of the same tooth changes, both sides of the tooth will generate trigger signals, in this case the tooth number corresponding to the position of the tooth does not need to be updated. Figure 3 As shown in the figure, this situation can be solved by using two independent photoelectric switches, the main and the auxiliary, because no matter feeding or withdrawing, for the ratchet with adjacent teeth 4mm apart, each photoelectric switch will only have a trigger signal about 4mm, and the main and auxiliary photoelectric switches must generate trigger signals alternately. If a photoelectric switch is triggered continuously, it means that the other side of the same tooth is triggered. In this case, there is no need to update the current tooth number. Figure 2As shown, two variables are set: the main variable last_major_tri_flag and the sub-variable last_minor_tri_flag respectively indicate that the last time was the main photoelectric switch triggering and the last time was the sub-photoelectric switch triggering. Because the power-on determines that the initial current tooth number is moving to trigger the main photoelectric switch, the initial last_major_tri_flag is 1 and the last_minor_tri_flag is 0. In the subsequent feeding and unloading process, if it is currently triggered by the main photoelectric switch and the sub-variable is 1, the current tooth number is increased by 1 during feeding, and the current tooth number is reduced by 1 during unloading, and the sub-variable is updated to 0 and the main variable is 1, which is used for the next current tooth number update reading judgment; if it is not currently triggered by the main photoelectric switch and the main variable is 1, the current tooth number is increased by 1 during feeding, and the current tooth number is reduced by 1 during unloading, and the sub-variable is updated to 0 and the main variable is 1, which is used for the next current tooth number update reading judgment. The current tooth number is monitored by two photoelectric switches, and the prior knowledge of alternating triggering can filter out false triggering caused by ratchet jitter, ensuring that the current tooth number can be updated correctly.

[0071] The wear of the mechanical structure of the feeder during long-term operation will cause the feeding accuracy to deteriorate or even be lost. The scheme of the present invention uses a photoelectric switch as a reference, and ensures that there is no back-and-forth adjustment process, so that the change in gear gap will not affect the accuracy. Compared with the scheme that relies on the use of optical or magnetic encoding at the ratchet end for position closed loop, and the photoelectric encoder code disk is easily contaminated, the present invention is a closed-loop control of the position of the motor end of the feed wheel. The feedback fluctuation of the motor end position has little effect on the ratchet end, and overcomes the disadvantage of the existing ratchet end closed-loop scheme that has high requirements for the stability of the ratchet end structure.

[0072] Based on the same inventive concept, a second aspect of an embodiment of the present invention provides a servo feeder implementation system based on photoelectric switch trigger compensation, comprising:

[0073] The initial current tooth number determination module is used for determining the initial current tooth number of the ratchet by triggering the photoelectric switch signal of the ratchet after the feeder is powered on, and driving the ratchet to move to the corresponding position according to the initial current tooth number and the corresponding compensation value and then stop;

[0074] A target tooth number determination module is used to calculate the target tooth number corresponding to the target position after receiving a material feeding and / or material withdrawing instruction;

[0075] The trigger update module is used for the feed wheel motor to drive the ratchet wheel to rotate to start feeding and / or unloading, and the current tooth number of the ratchet wheel is updated in real time according to the ratchet wheel trigger photoelectric switch signal of the feeder until the current tooth number is the target tooth number;

[0076] The compensation module is used to drive the target tooth number of the ratchet to move to an accurate position according to the compensation value corresponding to the target tooth number.

[0077] Based on the same inventive concept, a third aspect of an embodiment of the present invention provides a computer-readable storage medium, including a program, wherein the program can be executed by a processor to implement the steps of the above method.

[0078] To sum up, the technical solution of the present invention utilizes a ratchet-triggered photoelectric switch to determine and update the tooth number. The feeding of each tooth is based on the photoelectric switch as the compensation reference. The position control of the feeding wheel motor end is used to realize accurate feeding of the final ratchet end. The change of gear gap will not affect the accuracy, which effectively avoids the problem of mechanical structure wear of the feeder during long-term operation causing the feeding accuracy to deteriorate or even be lost, thereby improving the feeding accuracy and stability. In addition, compared with the solution that relies on the use of optical or magnetic encoding at the ratchet end for position closed-loop, the present invention adopts motor-end position closed-loop control, and the influence of motor-end position feedback fluctuation on the ratchet end is very small, which overcomes the disadvantage of the existing ratchet end closed-loop solution that has high requirements for the stability of the ratchet end structure, further improves the feeding accuracy and stability, and at the same time reduces the maintenance difficulty and saves costs.

[0079] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited thereto. Within the technical concept of the present invention, the technical solution of the present invention can be subjected to a variety of simple modifications, including the combination of various specific technical features in any suitable manner. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations. However, these simple modifications and combinations should also be regarded as the contents disclosed by the present invention and belong to the protection scope of the present invention.

Claims

1. A method for realizing a servo feeder based on photoelectric switch trigger compensation, characterized in that: The method comprises the following steps: When the feeder is powered on, the ratchet of the feeder triggers the photoelectric switch signal to determine the initial current tooth number of the ratchet; According to the initial current tooth number and the corresponding compensation value, the initial current tooth number of the ratchet is driven to move to the corresponding position and then stop; After receiving the feeding and / or withdrawing instructions, the target tooth number corresponding to the target position is calculated; The feed wheel motor drives the ratchet wheel to rotate to start feeding and / or withdrawing the material. The current tooth number of the ratchet wheel is updated in real time according to the ratchet wheel triggering photoelectric switch signal of the feeder until the current tooth number is the target tooth number; According to the compensation value corresponding to the target tooth number, the target tooth number of the ratchet is driven to move to the accurate position.

2. The method according to claim 1, characterized in that The process of determining the initial current tooth number of the ratchet according to the ratchet trigger photoelectric switch signal of the feeder includes the following steps: After the feeder is powered on, the feed wheel motor of the feeder rotates at a constant speed and drives the ratchet wheel to rotate until the photoelectric switch signal is triggered; The initial current tooth number is obtained by searching the teeth according to the Hall encoder value at the ratchet end when triggered.

3. The method according to claim 1, characterized in that The method of driving the ratchet wheel to move to the corresponding position and then stop according to the initial current tooth number and the corresponding compensation value is specifically as follows: According to the compensation value corresponding to the initial current tooth number, the multi-turn electrical angle encoding value of the feed wheel motor when the initial current tooth number rotates to the correct position is calculated as target_counter; The feed wheel motor stops when the multi-turn electrical angle encoding value reaches target_counter, and the initial current tooth number and corresponding position confirmation are completed.

4. The method according to claim 1, characterized in that: The photoelectric switch includes a main photoelectric switch and an auxiliary photoelectric switch. The initial current tooth number is determined by the trigger signal of the main photoelectric switch. If the main photoelectric switch and the auxiliary photoelectric switch trigger signals alternately, the current tooth number is updated. If one of the photoelectric switches is triggered twice in succession, the current tooth number is not updated.

5. The method according to claim 4, characterized in that The process of updating the current tooth number of the ratchet in real time according to the ratchet trigger photoelectric switch signal of the feeder is as follows: After the feeding wheel motor starts feeding and / or retracting the material, the ratchet triggers the photoelectric switch to judge the current and last triggered photoelectric switches; If the main photoelectric switch is currently triggered and the auxiliary photoelectric switch was triggered last time, the current tooth number will increase by 1 when feeding and decrease by 1 when returning. If the auxiliary photoelectric switch is currently triggered and the main photoelectric switch was triggered last time, the current tooth number will increase by 1 when feeding and decrease by 1 when returning.

6. The method according to claim 5, characterized in that The method further comprises: Set the two parameters of main variable and sub-variable to indicate that the last time was the main photoelectric switch triggered and the last time was the sub-photoelectric switch triggered. After power-on to determine the initial current tooth number, the main variable is 1 and the sub-variable is 0; The feeding wheel motor starts feeding and / or retracting the material, and after the photoelectric switch is triggered, If the main photoelectric switch is triggered and the secondary variable is 1, the current tooth number is increased by 1 when feeding, and the current tooth number is reduced by 1 when returning, and the secondary variable is updated to 0 and the main variable is 1, which is used for the next update reading judgment of the current tooth number; if the main photoelectric switch is not triggered and the main variable is 1, the current tooth number is increased by 1 when feeding, and the current tooth number is reduced by 1 when returning, and the secondary variable is updated to 0 and the main variable is 1, which is used for the next update reading judgment of the current tooth number.

7. The method according to any one of claims 1 to 6, characterized in that: The feeding wheel motor drives the ratchet wheel to rotate to start feeding and / or withdrawing the material. The process is as follows: After receiving the material feeding or material withdrawal instruction, the ratchet target tooth number corresponding to the target position is calculated; The feed wheel motor controls the ratchet movement and updates the current tooth number in real time. When the current tooth number is the target tooth number, the electrical angle multi-turn encoding value corresponding to the target position at the motor end is calculated based on the electrical angle multi-turn encoding value of the feed wheel motor when the target tooth number triggers the photoelectric switch and the compensation value corresponding to the target tooth number, and the feed wheel motor end is controlled to send it to the target position.

8. The method according to claim 7, characterized in that After calculating the multi-turn electrical angle encoding value corresponding to the target position of the motor end, the deceleration speed curve is planned according to the compensation value and the current speed. The ratchet deceleration is controlled according to the deceleration speed curve planning, and the feeding wheel motor end is driven to the multi-turn electrical angle encoding value corresponding to the target position to control the delivery to the target position.

9. A feeder error compensation system based on photoelectric switch triggering, characterized in that: include: The initial current tooth number determination module is used for determining the initial current tooth number of the ratchet by triggering the photoelectric switch signal of the ratchet after the feeder is powered on, and driving the ratchet to move to the corresponding position according to the initial current tooth number and the corresponding compensation value and then stop; A target tooth number determination module is used to calculate the target tooth number corresponding to the target position after receiving a material feeding and / or material withdrawing instruction; The trigger update module is used for the feed wheel motor to drive the ratchet wheel to rotate to start feeding and / or unloading, and the current tooth number of the ratchet wheel is updated in real time according to the ratchet wheel trigger photoelectric switch signal of the feeder until the current tooth number is the target tooth number; The compensation module is used to drive the target tooth number of the ratchet to move to an accurate position according to the compensation value corresponding to the target tooth number.

10. A computer-readable storage medium, characterized in that: The method comprises a program which can be executed by a processor to implement the steps of the method according to any one of claims 1 to 8.