Method for replacing servo motor in enabling state of main controller
By automatically completing the servo motor replacement process under the main controller enabled state, the servo driver solves the problem of low efficiency in the replacement of servo motors in the prior art, automatic parameter matching and position calibration are realized, and the working efficiency of the spot welding robot is significantly improved.
Patent Information
- Application Number
- CN202510446948.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
With the main controller enabled state, it is difficult for the prior art to efficiently replace the servo motor, resulting in the need to manually match the motor parameters and recalibrate the position, which is extremely inefficient.
The main controller sends motor replacement instructions to the servo drive, and the servo drive automatically completes the motor replacement process, including updating the motor parameters, calculating position deviations and performing position feedback calibration to realize inductive replacement of the motor.
It significantly improves the working efficiency of the spot welding robot, realizes automatic motor replacement and complete parameter matching and position calibration under the enabled state of the main controller.
Smart Images

Figure CN119945246A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial control technology, relates to an application scenario in which a servo motor is replaced when a main controller does not switch control states, and specifically provides a method for replacing a servo motor when a main controller is enabled. Background Art
[0002] With the development of industrial control technology, new functional requirements are constantly being proposed; the welding gun of a conventional welding robot is installed at the end and controlled by a six-axis robotic arm, while the spot welding robot requires an additional servo motor to independently control the welding gun. In other words, the corresponding servo motor needs to be replaced when the spot welding robot replaces the welding gun. In actual application scenarios, spot welding robots usually need to use different welding guns to complete corresponding tasks, and even multiple welding guns are required in one welding task; at present, during the process of replacing the welding gun of the spot welding robot, the robot needs to be moved to the designated position for replacing the welding gun, and then the main controller is enabled, and the servo driver matches the new motor parameters; since the motor parameters and motor position have changed after the motor is replaced, the servo driver needs to match the motor parameters and control parameters, which is usually matched by the operator, and the main controller needs to recalibrate and calculate the motor position so that the original spatial position does not change, so that the robot can continue to run the planned trajectory, and the process efficiency is extremely low; therefore, how to replace the servo motor in the master control enabled state becomes the focus of the present invention. Summary of the invention
[0003] The purpose of the present invention is to provide a method for replacing a servo motor when a main controller is enabled, so as to realize automatic replacement of the motor without switching the enabled state of the main controller, and complete parameter matching and position calibration, thereby significantly improving the working efficiency of the spot welding robot.
[0004] To achieve the above object, the technical solution adopted by the present invention is: A method for replacing a servo motor in an enabled state of a main controller comprises the following steps: Step 1. The main controller sends a motor replacement instruction to the servo driver; Step 2. The servo drive responds to the motor replacement command sent by the main controller, enters the motor replacement process and informs the main controller; the motor replacement process is as follows: Step 2.1. The servo driver collects the current position of the old motor and feeds the current position of the old motor as position feedback to the main controller in real time; Step 2.2. The servo driver calls the motor parameters of the new motor; Step 2.3. The servo drive shields all fault alarms related to the encoder; Step 2.4. The servo drive turns off PWM (Pulse-width Modulation) and enters the pseudo-enabled state: turns off the position loop control, speed loop control, and current loop control, and clears the control variables of the position loop control, speed loop control, and current loop control; then, the servo drive assigns the position feedback to the position loop given value; Step 2.5. The servo drive remains in the false enable state, replaces the motor cable and updates the motor parameters, and executes the motor parameter saving function at the same time; Step 2.6. The servo driver collects the position of the new motor and calculates the position deviation Δ between the new motor and the old motor; Step 2.7. The servo drive removes the fault alarm shield and enters the enable control state. In the enable control state, the motor position feedback is maintained as: P real +Δ,P real To enable the real-time position of the new motor in the control state; Step 3. After the servo driver completes the motor replacement, it notifies the main controller, which then controls the welding gun again to start the subsequent welding task.
[0005] Furthermore, in step 2.2, the motor parameters include: resistance, inductance, back electromotive force, moment of inertia, motor rated current, motor maximum current, number of motor pole pairs, electrical angle offset, torque constant, rated speed, maximum speed, and motor power.
[0006] Furthermore, in step 2.3, the fault alarms related to the encoder include: encoder packet loss and encoder undervoltage.
[0007] Furthermore, in step 2.6, the position deviation Δ is expressed as: Δ = P old -P new , P old is the position of the old motor (obtained from step 2.1), P new for the new motor location.
[0008] Based on the above technical solution, the beneficial effects of the present invention are: The present invention provides a method for replacing a servo motor when a main controller is enabled. First, the main controller sends a motor replacement instruction to a servo driver under predetermined conditions (such as a welding gun reaching a specified position). After receiving the motor replacement instruction, the servo driver enters a motor replacement process and informs the main controller. At this time, the servo driver automatically completes the motor replacement operation, including: updating motor parameters, updating control parameters, calculating the motor position deviation before and after replacement, and calibrating a new motor position feedback value based on the position deviation, etc., so that the main controller can realize non-sensing replacement of the motor, thereby significantly improving the work efficiency of the spot welding robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 It is a schematic diagram of the process of replacing the servo motor when the main controller is enabled in the present invention.
[0010] Figure 2 This is a detailed flow chart of replacing the servo motor when the main controller is enabled in the present invention. DETAILED DESCRIPTION
[0011] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0012] This embodiment provides a method for replacing a servo motor when a main controller is enabled. For the convenience of description, the motor to be replaced is called an old motor, and the motor after replacement is called a new motor. The method for replacing a servo motor when a main controller is enabled is as follows: Figure 1 As shown, the specific steps include: Step 1. The main controller sends a motor replacement instruction to the servo driver through communication; When the main controller sends a motor replacement command, the communication method is not limited. The motor replacement command can be a bit or a byte. Step 2. The servo drive responds to the motor replacement instruction sent by the main controller, enters the motor replacement process and informs the main controller through communication; Motor replacement process Figure 2 As shown, specifically: Step 2.1. The servo driver collects the current position of the old motor and feeds the current position of the old motor as position feedback to the main controller in real time to prevent the main controller from issuing fault alarms such as position loss and position error. Step 2.2. The servo driver calls the motor parameters of the new motor, including resistance, inductance, back electromotive force, moment of inertia, rated current of the motor, maximum current of the motor, number of motor pole pairs, electrical angle offset, torque constant, rated speed, maximum speed, motor power and other motor parameters. The motor parameters of the new motor are stored in advance; Step 2.3. The servo drive shields all fault alarms related to the encoder; Since the motor's encoder needs to be replaced when the motor is replaced, after the old motor is removed, the servo driver will issue an encoder-related fault alarm, such as encoder packet loss, encoder undervoltage, etc. Therefore, this embodiment pre-shields such fault alarms; Step 2.4. The servo drive turns off PWM (Pulse-width Modulation) and enters the pseudo-enabled state: turns off the position loop control, speed loop control, and current loop control, and clears the control variables of the position loop control, speed loop control, and current loop control to zero; then, the servo drive assigns the position feedback to the position loop given value; the control variables of the position loop control include: output value, proportional term, and integral value; the control variables of the speed loop control include: given value, feedback value, output value, proportional term, and integral value; the control variables of the current loop control include: given value, feedback value, output value, proportional term, and integral value; Step 2.5. The servo drive remains in the pseudo-enabled state to replace the motor cable and update the motor parameters, and execute the motor parameter saving function at the same time; the updated motor parameters are the motor parameters of the new motor called in step 2.2. Clicking the parameter saving function can ensure that the servo drive still maintains the updated motor parameters after restarting; the motor cable is replaced by the operator, first remove the power line plug and encoder line plug of the old motor, and then plug in the power line and encoder line plug of the new motor; Step 2.6. The servo driver collects the position of the new motor and calculates the position deviation between the new motor and the old motor, expressed as: Δ = P old -P new , Δ is the position deviation, P old is the position of the old motor (obtained from step 2.1), P new For the location of the new motor; Step 2.7. The servo drive removes the fault alarm shield and enters the enable control state. In the enable control state, the motor position feedback is maintained as: P real +Δ,P real To enable the real-time position of the new motor in the control state; The motor replacement is thus completed. The servo drive completes the entire process, and only needs to communicate with the main controller to make an agreement. In addition, after the motor replacement is completed, the feedback position of the motor is kept at P in the subsequent enabling control state. real +Δ, so that the new motor does not have any position change for the main controller, and the main controller does not need to recalibrate the position, that is, the servo motor can be replaced without any sense when the main controller is enabled; Step 3. After the servo driver completes the motor replacement, it informs the main controller through communication, and the main controller re-controls the welding gun to enter the subsequent welding task.
[0013] The above description is only a specific implementation mode of the present invention. Any feature disclosed in this specification, unless otherwise stated, may be replaced by other alternative features that are equivalent or have similar purposes; all disclosed features, or all methods or steps in the process, except for mutually exclusive features and / or steps, may be combined in any way.
Claims
1. A method for replacing a servo motor when a main controller is enabled, characterized in that: The following steps are involved: Step 1. The main controller sends a motor replacement instruction to the servo driver; Step 2. The servo drive responds to the motor replacement command sent by the main controller, enters the motor replacement process and informs the main controller; the motor replacement process is as follows: Step 2.
1. The servo driver collects the current position of the old motor and feeds the current position of the old motor as position feedback to the main controller in real time; Step 2.
2. The servo driver calls the motor parameters of the new motor; Step 2.
3. The servo drive shields all fault alarms related to the encoder; Step 2.
4. The servo drive turns off PWM wave generation and enters the pseudo-enabled state: turns off the position loop control, speed loop control, and current loop control, and clears the control variables of the position loop control, speed loop control, and current loop control; then, the servo drive assigns the position feedback to the position loop given value; Step 2.
5. The servo drive remains in the false enable state, replaces the motor cable and updates the motor parameters, and executes the motor parameter saving function at the same time; Step 2.
6. The servo driver collects the position of the new motor and calculates the position deviation Δ between the new motor and the old motor; Step 2.
7. The servo drive removes the fault alarm shield and enters the enable control state. In the enable control state, the motor position feedback is maintained as: P real +Δ,P real To enable the real-time position of the new motor in the control state; Step 3. After the servo driver completes the motor replacement, it notifies the main controller, which then controls the welding gun again to start the subsequent welding task.
2. The method for replacing a servo motor when the main controller is enabled according to claim 1, characterized in that: In step 2.2, the motor parameters include: resistance, inductance, back electromotive force, moment of inertia, motor rated current, motor maximum current, motor pole pair number, electrical angle offset, torque constant, rated speed, maximum speed, and motor power.
3. The method for replacing a servo motor when the main controller is enabled according to claim 1, characterized in that: In step 2.3, encoder-related fault alarms include: encoder packet loss and encoder undervoltage.
4. The method for replacing a servo motor in an enabled state of the main controller according to claim 1, characterized in that: In step 2.6, the position deviation Δ is expressed as: Δ = P old -P new , P old is the position of the old motor, P new for the new motor location.
Citation Information
Patent Citations
Time division multiplexing servo device and method for controlling operation of multiple motors
CN112506090A
Motor driving system and method, and storage medium
CN114285332A
Time division multiplexing control method and system for tool changer of machine tool, electronic equipment and storage medium
CN118305623A
Calibration method for disassembly and assembly motor reconstruction-free table based on semi-closed-loop pitching position ring
CN119135012A
Super-capacitor electric variable pitch system
CN203594558U