Motor motion control circuit and method based on EtherCAT protocol

By using the EtherCAT protocol and digital-to-analog conversion module in the motor control system, the digital control amount of the upper computer is converted into an analog voltage signal, which solves the problems of complex control links and insufficient voltage control accuracy in the existing motor control system, and realizes high-precision and real-time motor control, and ensures the safety and stability of the system through temperature monitoring.

CN120090530AActive Publication Date: 2025-06-03SHENZHEN HUAMAO AOTE TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510549392.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-06-03
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

The existing motor control systems have problems such as complex control link levels, long response paths and insufficient voltage control accuracy, which are difficult to meet the needs of high-precision voltage control and strong real-time performance.

Method used

The motor motion control circuit based on the EtherCAT protocol is adopted, and the connection between the main control module and the digital-to-analog conversion module is connected to the upper computer's digital control amount to be accurately converted into a continuously adjustable analog voltage signal. The temperature of the motor operating environment is monitored through the temperature sensing module to ensure the safety and stability of the control system.

Benefits of technology

The motor control link is simplified, the control accuracy and response speed are improved, the high-precision voltage control of the motor is realized, and the safety and stability of the system are ensured through real-time temperature monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090530A_ABST
    Figure CN120090530A_ABST
Patent Text Reader

Abstract

The invention relates to a motor motion control circuit and method based on the EtherCAT protocol, the motor motion control method based on the EtherCAT protocol comprises a main control module, a digital-to-analog conversion module, an analog-to-digital conversion module and a temperature sensing module, the main control module is in data communication with an upper computer based on the EtherCAT protocol, and the temperature sensing module is in data communication with the upper computer based on the EtherCAT protocol. A first SPI communication end of the master control module is connected with a data communication end of the digital-to-analog conversion module, a voltage signal output end of the digital-to-analog conversion module is connected with a voltage signal input end of the motor driving module, and a second SPI communication end of the master control module is connected with a data communication end of the analog-to-digital conversion module. The temperature signal output end of the temperature sensing module is connected with the temperature signal input end of the analog-to-digital conversion module. The master control module is arranged to perform real-time communication with the upper computer based on the EtherCAT protocol, and the digital-to-analog conversion module is combined to output a control voltage signal, so that high-precision voltage control operation on the motor driving module is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor motion control, and in particular to a motor motion control circuit and method based on the EtherCAT protocol. Background Art

[0002] Currently, in the field of industrial control equipment, as a core execution element, motors are widely used in various automated control systems, usually for converting the input control voltage signal into mechanical output on the motor shaft to drive the controlled equipment or mechanism, so as to realize the automatic operation and precise control of the system. In the prior art, the control methods of most motors rely on the PLC system, and the PLC is used to control the digital quantity output module to provide a drive signal to the motor. However, this control architecture based on digital quantity output has problems such as complex control link levels and long response paths. Especially in the scenario where high-precision voltage control of the motor is required, the switching quantity characteristics of the digital quantity output make the voltage regulation not fine enough, and it is difficult to meet the requirements of continuously adjustable and real-time motor control. Summary of the Invention

[0003] In order to solve the problems of how to simplify the motor control link and achieve precise voltage control of the motor, so as to improve the control accuracy and response speed of the system, the present application provides a motor motion control circuit and method based on the EtherCAT protocol.

[0004] A motor motion control circuit based on the EtherCAT protocol is connected between the upper computer and the motor drive module. The motor motion control circuit based on the EtherCAT protocol includes a main control module, a digital-to-analog conversion module, an analog-to-digital conversion module, and a temperature sensing module. The main control module conducts data communication with the upper computer based on the EtherCAT protocol. The first SPI communication terminal of the main control module is connected to the data communication terminal of the digital-to-analog conversion module. The voltage signal output terminal of the digital-to-analog conversion module is connected to the voltage signal input terminal of the motor drive module. The second SPI communication terminal of the main control module is connected to the data communication terminal of the analog-to-digital conversion module. The temperature sensing module is used to detect the operating environment temperature of the motor drive module, and the temperature signal output terminal of the temperature sensing module is connected to the temperature signal input terminal of the analog-to-digital conversion module.

[0005] By adopting the above technical solution, by setting the main control module to communicate with the host computer in real time based on the EtherCAT protocol and combining with the digital-to-analog conversion module to output a control voltage signal, the digital control quantity of the host computer can be converted into a continuously adjustable voltage signal, so as to realize the high-precision voltage control operation of the motor drive module; by connecting the main control module with the analog-to-digital conversion module and introducing the temperature sensing module to collect the real-time temperature signal of the motor operating environment, the thermal state of the module can be effectively monitored, thus ensuring the safety and stability of the control system operation.

[0006] Preferably, the digital-to-analog conversion module includes a digital-to-analog conversion chip U30 and a plurality of voltage output units. The data communication terminal of the digital-to-analog conversion chip U30 is connected to the first SPI communication terminal of the main control module. The data communication terminal of the digital-to-analog conversion chip U30 includes a data input port, a clock signal port, a synchronization signal port, and an update output signal port. A plurality of channel output ports are provided on the digital-to-analog conversion chip U30, and each of the channel output ports is connected to the corresponding voltage output unit. The voltage signal output terminal of each voltage output unit is connected to the voltage signal input terminal of the motor drive module.

[0007] By adopting the above technical solution, by setting a plurality of channel output ports and voltage output units, and enabling the digital-to-analog conversion chip U30 to receive the control instructions of the main control module through the multi-line SPI interface, the independent voltage control of multiple output channels can be realized, so as to meet the fine speed regulation requirements of different motors or multiple motors operating in parallel; by setting the update output signal port, the synchronous update of the DAC output can be realized, thus avoiding the control inconsistency problem caused by the channel voltage change delay.

[0008] Preferably, the voltage output unit includes at least one first operational amplifier and at least one second operational amplifier. The non-inverting input terminal of the first operational amplifier is connected to the channel output port. The output terminal of the first operational amplifier is connected to the non-inverting input terminal of the second operational amplifier. The common node between the output terminal of the first operational amplifier and the non-inverting input terminal of the second operational amplifier is connected to the inverting input terminal of the first operational amplifier. The output terminal of the second operational amplifier is connected to the voltage signal input terminal of the motor drive module. The common node between the output terminal of the second operational amplifier and the voltage signal input terminal of the motor drive module is connected to the inverting input terminal of the second operational amplifier.

[0009] By adopting the above technical solution, by feeding the output signal of the first operational amplifier into its inverting input terminal through a feedback network and connecting it to the second operational amplifier, a stable voltage-following buffer output structure can be formed, thereby improving the driving ability and stability of the voltage output; through the cascaded amplification and isolation of two operational amplifiers, the output voltage noise and interference can be reduced, thereby improving the response accuracy of motor control and the anti-interference ability of the system.

[0010] Preferably, the temperature sensing module includes a plurality of thermistor sensing units. Each thermistor sensing unit includes at least one first resistor, at least one second resistor, and at least one thermistor. The first end of the first resistor is connected to the power supply, the second end of the first resistor is connected to the first end of the thermistor, the second end of the thermistor is connected to the first end of the second resistor, the second end of the second resistor is grounded, the common node between the second end of the first resistor and the first end of the thermistor is connected to the positive input terminal of the differential signal of the analog-to-digital conversion module, and the common node between the second end of the thermistor and the first end of the second resistor is connected to the negative input terminal of the differential signal of the analog-to-digital conversion module.

[0011] By adopting the above technical solution, by forming a pull-up voltage-dividing network with the first resistor and the thermistor, and a pull-down voltage-dividing network with the thermistor and the second resistor, and respectively outputting positive and negative differential voltage signals to the analog-to-digital conversion module, the voltage change signal of the thermistor can be collected in a differential form, thereby improving the sampling accuracy and anti-interference ability of the temperature signal; by constructing multiple monitoring points with multiple thermistors, the temperatures at multiple key positions of the motor drive module can be monitored in real time, thereby improving the coverage and protection effect of temperature control management.

[0012] A motor motion control method based on the EtherCAT protocol is applied to a motor motion control circuit based on the EtherCAT protocol. The motor motion control method based on the EtherCAT protocol includes: Based on the EtherCAT protocol, obtain the analog value sent by the host computer; According to the analog value, update the pre-established cache variable, generate a corresponding updated variable, and send the updated variable to the motor drive module. The updated variable is used to output a corresponding PWM signal to control the corresponding rotation speed of the motor drive module; If it is detected that the updated variable is successfully sent, then obtain the running environment temperature data of the motor drive module in real time; According to the running environment temperature data, determine whether to perform the corresponding power cut-off operation.

[0013] By adopting the above technical solution, by acquiring the analog command from the host computer based on the EtherCAT protocol and converting it into a buffer variable for controlling the PWM signal, high-speed and reliable data transmission and accurate control data generation can be achieved, thus ensuring that the rotational speed response of the motor drive module is timely and accurate; by performing temperature acquisition and judgment after the data is successfully sent, a closed-loop status response mechanism can be formed, thus realizing the linkage management of temperature control protection and drive control.

[0014] Preferably, in the step of updating the pre-established buffer variable according to the analog value to generate a corresponding updated variable, it includes: According to the analog value, at least determine the DAC channel number, voltage symbol, and voltage value; Call the pre-established buffer variable, where the buffer variable at least includes a channel bit, a sign bit, and a data bit; Update the channel bit according to the DAC channel number; Update the sign bit according to the voltage symbol; Update the data bit according to the voltage value; Integrate the updated channel bit, the updated sign bit, and the updated data bit to generate a corresponding updated variable.

[0015] By adopting the above technical solution, by parsing the analog value into the DAC channel number, voltage symbol, and voltage value, and combining the channel bit, sign bit, and data bit in the buffer variable structure, the core byte content of the control instruction can be dynamically constructed and updated, thus ensuring the structural integrity and parameter accuracy of the control instruction; through the independent update mechanism of the channel bit, sign bit, and data bit, higher flexibility in data encapsulation and stronger control expansion ability can be achieved, thus adapting to the flexible regulation requirements in different output scenarios.

[0016] Preferably, in the step of acquiring the operating environment temperature data of the motor drive module in real time, it includes: Acquire the differential signal across the corresponding thermistor in the temperature sensing module in real time; Determine the feedback voltage Vf according to the differential signal across the thermistor; Calculate the corresponding operating environment temperature data based on the feedback voltage Vf.

[0017] By adopting the above technical solution, by collecting the differential voltage signal across the thermistor and further calculating the feedback voltage Vf, the current thermal state of the key part of the module can be reflected in real time, thus providing basic data for subsequent temperature judgment; through the real-time sampling and feedback mechanism, a fast-response temperature control data link can be realized, thus meeting the requirement of the module for the timeliness of temperature rise protection in high-power operation scenarios.

[0018] Preferably, the step of calculating corresponding operating environment temperature data based on the feedback voltage Vf includes: Invoking a pre-established thermocouple data look-up table, and determining corresponding first thermocouple temperature step points TC_TLT1, second thermocouple temperature step points TC_TLT2, a first voltage step value TC_mv1 corresponding to the first thermocouple temperature step point TC_TLT1, and a second voltage step value TC_mv2 corresponding to the second thermocouple temperature step point TC_TLT2 according to the thermocouple data look-up table; Calculating corresponding operating environment temperature data fTmp according to the first thermocouple temperature step point TC_TLT1, the second thermocouple temperature step point TC_TLT2, the first voltage step value TC_mv1, the second voltage step value TC_mv2, and the feedback voltage Vf. The calculation formula is .

[0019] By adopting the above technical solution, by selecting step temperature points and corresponding voltage values based on the thermocouple look-up table method, the actual temperature corresponding to the current feedback voltage can be calculated in a linear interpolation manner, so as to provide high-precision temperature conversion ability; through a standardized look-up table structure and interpolation calculation formula, the generality and accuracy of temperature measurement can be guaranteed, so that the temperature control judgment has stronger adaptability under different types of thermal sensitive devices.

[0020] Preferably, in the step of judging whether to perform corresponding power cut-off operation according to the operating environment temperature data, it includes: Determining a preset overheat threshold and a preset restart threshold; Judging whether the operating environment temperature data is greater than the preset overheat threshold. If it is not greater than the preset overheat threshold, the power supply of the motor drive module is maintained; If it is greater than the preset overheat threshold, perform the corresponding power cut-off operation, and obtain the operating environment temperature data at the next sampling moment; Judging whether the operating environment temperature data at the next sampling moment is less than the preset restart threshold. If it is not less than the preset restart threshold, continue to perform the corresponding power cut-off operation; If it is less than the preset restart threshold, perform the corresponding restart motor power operation.

[0021] By adopting the above technical solution, by setting the overheat threshold and the restart threshold, and judging the conditions for power cut-off or recovery based on the temperature data, an automatic over-temperature protection and recovery control strategy can be realized, so as to improve the safety and intelligent level during the system operation; by judging the sampling timing and restart conditions, the system instability phenomenon caused by frequent start and stop can be avoided, so as to ensure the smoothness and reliability of the control process.

[0022] Preferably, before the step of updating the pre-established cache variable according to the analog value, the method further includes: Calculating a real-time rotational speed value Res according to the analog value AO, and the calculation formula is ; Determining a secondary confirmation threshold. If the real-time rotational speed value Res is less than or equal to the secondary confirmation threshold, then prepare to execute the step of updating the pre-established cache variable according to the analog value; If the real-time rotational speed value Res is greater than the secondary confirmation threshold, then send the real-time rotational speed value Res to the host computer; Detecting whether the secondary confirmation data from the host computer is received. If the secondary confirmation data from the host computer is received, then prepare to execute the step of updating the pre-established cache variable according to the analog value. If the response time of the secondary confirmation data exceeds the preset response threshold, then obtain a new analog value again.

[0023] By adopting the above technical solution, by linearly mapping the analog value to the rotational speed range and calculating the real-time rotational speed value, it is possible to dynamically reflect the current rotational speed state of the motor, thereby enhancing the perception ability and data transparency of the system; by setting the secondary confirmation threshold and introducing the host computer response mechanism, it is possible to prevent the mis-triggering of high-speed control commands, thereby improving the operation safety and man-machine interaction cooperation efficiency of the system.

[0024] In summary, the present application includes at least one of the following beneficial technical effects: 1. Adopting a control architecture that combines the EtherCAT protocol with high-precision analog signal processing to solve the problems of complex motor control links, response lag, insufficient voltage control accuracy, etc. Specifically, this solution sets the main control module as the core control unit, supports data communication with the host computer based on the EtherCAT protocol, thereby realizing the high-speed and low-latency issuance of real-time control instructions, avoiding the multi-level transmission path of indirect control via the intermediate digital output module in the traditional PLC system, significantly reducing the number of levels in the control link, and improving the system response speed. The main control module is connected to the digital-to-analog conversion module through the first SPI communication interface, accurately converts the digital control quantity transmitted by the host computer into a continuously adjustable analog voltage signal, and then directly sends this voltage signal into the motor drive module to control the working state of the motor, such as rotational speed, torque, etc., realizing the refined drive control of the motor, and significantly improving the linearity and controllability of voltage regulation; 2. To ensure the stability of the control system under high-power operating conditions, the circuit is also equipped with a temperature sensing module and an analog-to-digital conversion module to monitor the thermal state in the operating environment of the motor drive module. The temperature change signal collected by the temperature sensing module is converted into a digital signal via the analog-to-digital conversion module and transmitted to the main control module through the second SPI communication interface. The main control module can perform logical judgments based on the collected temperature values. For example, when the detected temperature exceeds the set threshold (such as 100 °C), the control system automatically disconnects the power supply to the motor to achieve over-temperature protection. After the temperature drops below the safe value (such as 40 °C), the power supply is automatically restored, thus effectively avoiding problems such as circuit burnout or system anomalies caused by excessive temperature rise and improving the safety and intelligence level of the system. Description of the Drawings

[0025] Figure 1 is a flow block diagram of a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application.

[0026] Figure 2 is a partial circuit schematic diagram of the main control module and the analog-to-digital conversion module in a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application; Figure 3 is a partial circuit schematic of the voltage output unit in a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application Figure 1 ; Figure 4 is a partial circuit schematic of the voltage output unit in a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application Figure 2 ; Figure 5 is a partial circuit schematic of the voltage output unit in a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application Figure 3 ; Figure 6 is a partial circuit schematic of the voltage output unit in a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application Figure 4 ; Figure 7 is a partial circuit schematic diagram of the analog-to-digital conversion module, temperature sensing module, and main control module in a motor motion control circuit based on the EtherCAT protocol in an embodiment of the present application; Figure 8 is a schematic diagram of a table for looking up thermocouple data in a motor motion control method based on the EtherCAT protocol in an embodiment of the present application; Figure 9 is a flowchart of a motor motion control method based on the EtherCAT protocol in an embodiment of the present application; Figure 10 It is the implementation flowchart of step S20 in a motor motion control method based on the EtherCAT protocol in an embodiment of the present application; Figure 11 It is the implementation flowchart of step S30 in a motor motion control method based on the EtherCAT protocol in an embodiment of the present application; Figure 12 It is the implementation flowchart of step S303 in a motor motion control method based on the EtherCAT protocol in an embodiment of the present application; Figure 13 It is the implementation flowchart of step S40 in a motor motion control method based on the EtherCAT protocol in an embodiment of the present application; Figure 14 It is the implementation flowchart before step S20 in a motor motion control method based on the EtherCAT protocol in an embodiment of the present application. Detailed implementation manners

[0027] The following further describes the present application in detail with reference to the accompanying drawings.

[0028] In an embodiment, as Figure 1 shown, the present application discloses a motor motion control circuit based on the EtherCAT protocol, which is connected between a host computer and a motor drive module. A motor motion control circuit based on the EtherCAT protocol includes a main control module, a digital-to-analog conversion module, an analog-to-digital conversion module, and a temperature sensing module. The main control module performs data communication with the host computer based on the EtherCAT protocol. The first SPI communication terminal of the main control module is connected to the data communication terminal of the digital-to-analog conversion module. The voltage signal output terminal of the digital-to-analog conversion module is connected to the voltage signal input terminal of the motor drive module. The second SPI communication terminal of the main control module is connected to the data communication terminal of the analog-to-digital conversion module. The temperature sensing module is used to detect the operating environment temperature of the motor drive module. The temperature signal output terminal of the temperature sensing module is connected to the temperature signal input terminal of the analog-to-digital conversion module.

[0029] In this embodiment, the motor motion control circuit realizes functions such as data communication based on the EtherCAT protocol, analog voltage control, and temperature detection and protection through the coordinated cooperation of the main control module, digital-to-analog conversion module, analog-to-digital conversion module, and temperature sensing module. As the core control component, the main control module integrates an EtherCAT communication interface internally, enabling high-speed real-time data interaction with the host computer. After receiving the motor control instructions from the host computer, it establishes an instruction transmission path with the data communication end of the digital-to-analog conversion module through the first SPI communication end, and sends the control command to the digital-to-analog conversion module in digital form. After receiving this digital quantity, the digital-to-analog conversion module converts it into a continuously adjustable analog voltage signal through the internal digital-to-analog conversion chip, and outputs this voltage value through its voltage signal output end, which is directly connected to the voltage signal input end of the motor drive module, thereby driving the motor to operate at the corresponding voltage and achieving fine adjustment control of the motor speed or torque.

[0030] During the continuous operation of the motor, its working state may cause the internal environment temperature of the motor drive module to rise. Therefore, a temperature sensing module is set up to monitor this temperature change in real time. The temperature sensing module usually includes one or more thermistors, and the detected temperature information is output to its temperature signal output end in the form of an analog voltage signal. This temperature signal output end is connected to the temperature signal input end of the analog-to-digital conversion module. After the analog-to-digital conversion module converts the temperature signal into a digital signal, it is transmitted to the second SPI communication end of the main control module. The main control module then determines whether the temperature of the current motor working environment exceeds the preset safety threshold. If it exceeds the limit, it can trigger the power cut-off action set in the control logic, suspend the power supply to the motor, and then restart the power supply after the temperature drops to the set recovery value, thereby effectively ensuring the safety and reliability of the system operation.

[0031] Through the coordinated management of the main control module for upstream and downstream modules, the first SPI communication end realizes the output path from the control instruction to the analog voltage, the second SPI communication end realizes the input path from the temperature signal acquisition to the digital feedback, the motor drive module becomes the execution unit for outputting control actions, the temperature sensing module participates in the over-temperature judgment process as an environmental state sensing component, and the analog-to-digital conversion module and the digital-to-analog conversion module respectively undertake the tasks of signal acquisition conversion and output conversion, thus constructing a highly integrated motor control system for communication, control, feedback, and protection.

[0032] Furthermore, as Figure 2As shown in the figure, the digital-to-analog conversion module includes a digital-to-analog conversion chip U30 and multiple voltage output units. The data communication terminal of the digital-to-analog conversion chip U30 is connected to the first SPI communication terminal of the main control module. The data communication terminal of the digital-to-analog conversion chip U30 includes a data input port, a clock signal port, a synchronization signal port, and an update output signal port. There are multiple channel output ports on the digital-to-analog conversion chip U30, and each channel output port is connected to a corresponding voltage output unit. The voltage signal output terminal of each voltage output unit is connected to the voltage signal input terminal of the motor drive module.

[0033] In this embodiment, through the cooperation of the digital-to-analog conversion chip U30 and multiple voltage output units, this structure completes the conversion of the digital control signal output by the main control module into an analog voltage signal, and accurately outputs this analog voltage signal to the motor drive module to achieve motor motion control. The main control module establishes a communication connection with the digital-to-analog conversion chip U30 through its first SPI communication terminal, specifically including that the data line output by the main control module is connected to the data input port of the digital-to-analog conversion chip U30 for transmitting the data content in the control instruction. At the same time, the clock signal line output by the main control module is connected to the clock signal port of the digital-to-analog conversion chip U30 to drive the SPI data synchronous transmission process. The frame synchronization signal synchronously output by the main control module is connected to the synchronization signal port of the digital-to-analog conversion chip U30 to calibrate the starting point of each group of data transmissions and ensure the integrity and validity of the data. After all necessary data transmissions are completed, the update instruction signal output by the main control module is connected to the update output signal port of the digital-to-analog conversion chip U30 to trigger the internal data latch and output update operations of the chip, enabling the digital-to-analog conversion chip U30 to generate a new analog voltage value based on the received digital data.

[0034] The analog output structure of the digital-to-analog conversion chip U30 is composed of its multiple channel output ports. Each channel output port corresponds to an independent voltage channel and supports the multi-channel output control function. These channel output ports are respectively connected to multiple voltage output units in a one-to-one correspondence. The analog voltage signal output by each channel is further conditioned and buffered by its corresponding voltage output unit. The voltage output unit may include an amplifier component inside to improve the driving ability and output stability, ensuring the response consistency and stability of the output voltage under different load conditions. The voltage signal output terminal of each voltage output unit is directly connected to the voltage signal input terminal of the motor drive module. The change in the control voltage will affect the PWM control signal output by the motor drive module, thereby controlling the actual operating state of the motor, such as starting, stopping, accelerating, decelerating, and steady-speed operation, etc.

[0035] In the overall structure, the main control module precisely controls the output behavior of each channel of the digital-to-analog conversion chip U30 through the SPI protocol. The digital-to-analog conversion chip U30 serves as the core for converting digital and analog signals, generating the target voltage based on the input digital instructions. The channel output port is responsible for signal distribution, and the voltage output unit completes voltage stabilization and transmission, ultimately achieving multi-channel voltage control of the motor drive module. It has the technical advantages of fast response speed, high control precision, and strong multi-channel independent control ability, and is suitable for industrial scenarios with high requirements for motion control.

[0036] Furthermore, as Figures 3 - 6 shown, the voltage output unit includes at least one first operational amplifier and at least one second operational amplifier. The non-inverting input terminal of the first operational amplifier is connected to the channel output port. The output terminal of the first operational amplifier is connected to the non-inverting input terminal of the second operational amplifier. The common node between the output terminal of the first operational amplifier and the non-inverting input terminal of the second operational amplifier is connected to the inverting input terminal of the first operational amplifier. The output terminal of the second operational amplifier is connected to the voltage signal input terminal of the motor drive module. The common node between the output terminal of the second operational amplifier and the voltage signal input terminal of the motor drive module is connected to the inverting input terminal of the second operational amplifier.

[0037] In this embodiment, the voltage output unit realizes the buffering drive and stable conditioning of the channel output voltage signal through the series structure of the first operational amplifier and the second operational amplifier, ensuring that the analog voltage signal has sufficient load drive ability and output voltage accuracy during the transmission to the motor drive module. Specifically, the non-inverting input terminal of the first operational amplifier is directly connected to the channel output port of the digital-to-analog conversion chip U30 to receive the analog voltage signal output by the channel output port. This analog voltage signal is processed by the first operational amplifier for voltage following. The output terminal voltage will follow the input terminal voltage change but has a stronger output current drive ability. At the same time, the output terminal of the first operational amplifier is connected to the non-inverting input terminal of the second operational amplifier to form a cascaded input structure. This connection node, as a common node, is also connected to the inverting input terminal of the first operational amplifier, thus constructing a typical voltage follower structure to achieve high-precision buffered output through feedback, improving the isolation ability and anti-interference ability to the signal source.

[0038] The non-inverting input terminal of the second operational amplifier receives the output signal of the first operational amplifier, and its output terminal is connected to the voltage signal input terminal of the motor drive module, which is used to stably output the buffered voltage signal to the motor drive module. At the same time, a feedback path is provided between the output terminal and the inverting input terminal of the second operational amplifier to form another voltage follower closed-loop structure, so as to ensure that the output voltage remains stable and unchanged under different load conditions of the motor drive module. This cascaded dual-amplifier structure can effectively improve the stability and consistency of the analog voltage signal during transmission on the one hand, and significantly enhance the current driving ability of the entire output link on the other hand, thus meeting the requirements of the motor drive module for high-precision analog voltage signal input. Through the setting of this voltage output unit, the voltage signal at the channel output port can be reliably transmitted to the motor drive module without being affected by load changes, effectively avoiding problems such as voltage fluctuation, response lag, and accuracy degradation, and improving the stability, response speed, and control accuracy of the entire motor motion control system during actual operation.

[0039] Further, as Figure 7 shown, the temperature sensing module includes a plurality of thermistor sensing units. Each thermistor sensing unit includes at least one first resistor, at least one second resistor, and at least one thermistor. The first end of the first resistor is connected to the power supply, the second end of the first resistor is connected to the first end of the thermistor, the second end of the thermistor is connected to the first end of the second resistor, the second end of the second resistor is grounded, and the common node between the second end of the first resistor and the first end of the thermistor is connected to the positive input terminal of the differential signal of the analog-to-digital conversion module, and the common node between the second end of the thermistor and the first end of the second resistor is connected to the negative input terminal of the differential signal of the analog-to-digital conversion module.

[0040] In this embodiment, through the setting of a plurality of thermistor sensing units, the temperature sensing module realizes the temperature detection of key positions in the operating environment of the motor drive module. Each thermistor sensing unit consists of a first resistor, a second resistor, and a thermistor to form a resistive voltage division structure. Through this structure, a voltage signal related to the ambient temperature is generated and transmitted to the analog-to-digital conversion module in a differential manner, thereby realizing the accurate acquisition and digital processing of temperature. Specifically, the first end of the first resistor is connected to a stable power supply node to provide a reference voltage input. Its second end is directly connected to the first end of the thermistor to form a pull-up branch. The second end of the thermistor is connected to the first end of the second resistor to form a pull-down branch. The second end of the second resistor is grounded, thus establishing a temperature-sensitive voltage division path mediated by the thermistor between the first resistor and the second resistor. When the ambient temperature changes, the resistance value of the thermistor changes with the temperature fluctuation, thereby causing a relative change in the voltages on both sides of this voltage division structure.

[0041] In this resistor network, a common node between the second end of the first resistor and the first end of the thermistor forms a sensitive point where the voltage rises and falls due to temperature changes. This node is connected to the positive input terminal of the differential signal of the analog-to-digital conversion module as the positive input terminal of the differential signal. The common node between the second end of the thermistor and the first end of the second resistor forms a reference terminal, which is connected to the negative input terminal of the differential signal of the analog-to-digital conversion module, thus constituting a complete differential input channel. The analog-to-digital conversion module generates digital data that changes proportionally to the temperature in the area where the thermistor is located based on the voltage difference between these two input terminals. The main control module determines whether the current environment of the motor drive module is within the normal temperature range based on this. If the temperature value represented by the differential voltage detected by the analog-to-digital conversion module exceeds the preset over-temperature threshold, the control logic triggers the power protection mechanism, performs the motor shutdown operation, and resumes operation after the temperature drops below the safe range, thereby realizing the adaptive dynamic response of the system temperature control. Through the configuration of this structure, the temperature sensing module not only has the ability of multi-point sampling and high-precision response characteristics, but also can effectively improve the anti-noise performance in a complex interference environment, ensuring the accuracy and stability of the temperature detection process.

[0042] As Figure 9 shown, a motor motion control method based on the EtherCAT protocol is applied to a motor motion control circuit based on the EtherCAT protocol. A motor motion control method based on the EtherCAT protocol includes: S10. Based on the EtherCAT protocol, obtain the analog value sent by the host computer; in this embodiment, the analog value refers to that the main control module performs high-speed real-time communication with the host computer configured as the master through its integrated EtherCAT slave interface and receives the motion control instruction sent by it, where the instruction carries the analog control value corresponding to the motor operation state. Specifically, the analog value is generated by the host computer according to the operation requirements, representing the required voltage output level. The main control module extracts the analog parameters by parsing the received data frame and uses them as the basic input for subsequent digital-to-analog conversion control and speed regulation, thereby establishing a real-time closed-loop control channel between the host computer and the motor. For example, in a certain control cycle, the host computer sends an analog value of 25600 representing an output of 8.5V through the EtherCAT protocol, and the main control module generates a voltage control signal based on this value to adjust the motor operation state.

[0043] S20. Update the pre-established cache variable according to the analog value, generate the corresponding updated variable, and send the updated variable to the motor drive module. The updated variable is used to output the corresponding PWM signal to control the corresponding rotational speed of the motor drive module. In this embodiment, the main control module internally maintains a cache variable with a 32-bit structure for constructing a complete control instruction byte format, which includes three parts: a channel bit, a sign bit, and a numerical bit. Specifically, the main control module extracts the target DAC channel number, voltage sign information, and the corresponding voltage amplitude according to the analog value, maps them to the preset position segments in the cache variable respectively, and combines and integrates them in a bitwise operation manner to generate a control variable for digital-to-analog conversion. Subsequently, the main control module sends the updated variable to the digital-to-analog conversion chip through the SPI bus, enabling it to output the corresponding analog voltage signal. The motor drive module converts the received voltage into a PWM control signal, thereby driving the motor to reach the target rotational speed. For example, when the voltage corresponding to the analog value is 9.6V, the system will control the motor to operate at a speed close to full speed.

[0044] S30. If it is detected that the sending of the updated variable is successful, then obtain the operating environment temperature data of the motor drive module in real time. In this embodiment, after the main control module completes the data writing operation for the digital-to-analog conversion module, it confirms that the SPI communication is successfully completed, then triggers the temperature monitoring process, and calls the analog-to-digital conversion module to sample and convert the differential voltage signal of the temperature sensing module, thereby obtaining the real-time temperature value of the environment around the motor drive module. Specifically, the temperature sensing module is composed of multiple thermistors. The voltage sampling signal changes as the resistance value of the thermistor changes with temperature. The main control module performs interpolation conversion according to the ADC acquisition result to obtain the operating temperature in the current hot state. For example, if the voltage corresponding to the ADC return value is 2.5mV, the current temperature can be obtained as 72 degrees Celsius according to the look-up table calculation, and the system makes the next judgment based on this.

[0045] S40. Judge whether to perform the corresponding power cut-off operation according to the operating environment temperature data. In this embodiment, after the main control module completes the data writing operation for the digital-to-analog conversion module, it confirms that the SPI communication is successfully completed, then triggers the temperature monitoring process, and calls the analog-to-digital conversion module to sample and convert the differential voltage signal of the temperature sensing module, thereby obtaining the real-time temperature value of the environment around the motor drive module. Specifically, the temperature sensing module is composed of multiple thermistors. The voltage sampling signal changes as the resistance value of the thermistor changes with temperature. The main control module performs interpolation conversion according to the ADC acquisition result to obtain the operating temperature in the current hot state. For example, if the voltage corresponding to the ADC return value is 2.5mV, the current temperature can be obtained as 72 degrees Celsius according to the look-up table calculation, and the system makes the next judgment based on this.

[0046] In one embodiment, such as Figure 10As shown, in step S20, that is, in the step of updating the pre-established cache variable according to the analog value and generating the corresponding updated variable, it includes: S201. According to the analog value, at least determine the DAC channel number, voltage symbol, and voltage value; in this embodiment, after the main control module receives the analog control instruction sent by the host computer, it first parses and converts the analog value to extract the DAC channel number, the polarity flag of the output voltage, and the numerical body of the voltage corresponding to the control instruction. Specifically, the analog value is generally of the unsigned integer type. Combining the set output voltage range and channel allocation rules of the system, the main control module can extract the channel number to which the current control target belongs through the set channel coding rule, such as channel 1, channel 2, etc.; then, according to whether the analog value is less than the set zero threshold, it judges whether it is a negative voltage control to determine the voltage symbol; subsequently, a scaling or truncation operation is performed on the analog value to obtain the numerical part of the required voltage value for filling the data field of the subsequent instruction. For example, if the analog value is 25700, the corresponding channel can be parsed as channel 2, the voltage is positive, and the voltage value corresponds to 8.03V.

[0047] S202. Call the pre-established cache variable, and the cache variable at least includes a channel bit, a symbol bit, and a data bit; in this embodiment, the system pre-defines a 32-bit control variable with a fixed format in the internal storage structure of the main control module. Different bit fields in this variable are used to store the key field information required for control. Specifically, the high-order field in the cache variable structure is reserved for representing the DAC channel number, the middle bit field represents the positive and negative signs of the voltage, and the low-order field is used to represent the numerical bits of the voltage. When calling this cache variable, the main control module loads it in the form of a variable template and prepares to write and update its respective fields, laying a data foundation for the subsequent SPI communication instruction transmission.

[0048] S203. Update the channel bit according to the DAC channel number; in this embodiment, after the main control module parses the target DAC channel number, it encodes the channel number according to the preset format and writes it into the corresponding channel bit field in the cache variable. Specifically, in the 32-bit structure, the channel bit is usually allocated in the high-order interval, such as bits 26 to 29. The main control module encodes the channel number through bitwise OR operation or shift operation and writes it into the specified bit field, so that the entire control variable can clearly identify the current target control channel. For example, if the current control channel is channel 3, the number will be converted into a bit value of "0011" and written into the cache variable in the channel bit.

[0049] S204. Update the sign bit according to the voltage sign. In this embodiment, the main control module writes the sign information into the position of the sign bit specified in the buffer variable according to the parsed positive and negative polarity judgment result of the voltage. Specifically, in the 32-bit variable structure, the 25th bit is usually defined as the sign bit. If the current voltage is negative voltage control, this bit is written as "1"; if it is positive voltage control, it is written as "0", so that the subsequent digital-to-analog conversion chip can recognize the voltage direction according to the sign bit when receiving this variable and correctly generate the forward or reverse output voltage. For example, if the current control target is an output of -2.5V, the sign bit will be set to "1".

[0050] S205. Update the data bits according to the voltage value. In this embodiment, the main control module encodes the extracted voltage value information in bit format and writes it into the data bit field of the buffer variable to represent the specific amplitude of the final output voltage. The data bit segment is usually allocated in the low-order region, for example, between the 8th bit and the 24th bit. The main control module fills the value into this field in the form of an unsigned integer to ensure that the numerical part of the variable is proportional to the analog voltage output. For example, if the voltage value is 7.5V and the maximum value of the corresponding analog quantity is 32000, the value 24000 will be written into the data bit field as the DAC output control reference.

[0051] S206. Integrate the updated channel bits, the updated sign bits, and the updated data bits to generate the corresponding updated variable. In this embodiment, the main control module combines all the above-written fields bit by bit to complete the reconstruction operation of the 32-bit buffer variable and generate the instruction data containing the complete control information. The updated variable constitutes the instruction word finally used to drive the digital-to-analog conversion module. The main control module will send this variable to the digital-to-analog conversion chip through the SPI communication interface in the next cycle, instructing it to output the analog voltage signal with the corresponding sign and value on the specified channel, so as to achieve precise control of the motor drive module. For example, the updated variable is "0x4D7A0000", which contains all the control information of channel 3, positive voltage, and a value of 8.0V.

[0052] In one embodiment, as Figure 11 shown, in step S30, that is, the step of obtaining the running environment temperature data of the motor drive module in real time, includes: S301. Obtain the differential signal across the corresponding thermistor in the temperature sensing module in real time. In this embodiment, the main control module controls the analog-to-digital conversion module to start the differential signal sampling instruction for the temperature sensing module, and obtains the change value of the voltage across the thermistor. This differential signal corresponds to the voltage difference across the upper and lower resistor voltage division structures in the thermistor sensing unit. Specifically, each thermistor and two fixed resistors form a voltage division path. When the resistance value of the thermistor changes due to changes in the external temperature, the potential of its voltage division point also changes accordingly. The analog-to-digital conversion module is respectively connected to the common nodes at the upper and lower ends of the thermistor, and collects the voltage difference between its positive input terminal and negative input terminal to form a stable differential signal input path. The differential sampling mode can effectively eliminate common-mode interference, improve the reading accuracy of temperature signals, and ensure that the system still has good temperature detection capabilities in industrial field environments with strong electromagnetic interference or large signal drift.

[0053] S302. Determine the feedback voltage Vf based on the differential signal across the thermistor. In this embodiment, after the main control module receives the digital signal returned by the analog-to-digital conversion module, it converts the differential voltage value into the actual voltage value Vf according to the reference voltage and resolution parameters of the ADC module. This value is the real-time voltage feedback result across the thermistor. Specifically, under the condition that the system uses a 12-bit ADC and the reference voltage is 2.048V, the main control module performs a ratio operation on the sampling result and the maximum resolution of 4096. For example, if the ADC return value is 1250, then Vf is approximately 0.625V after conversion. This feedback voltage reflects the current resistance state of the thermistor. Since the thermistor is of the NTC type, its resistance value decreases as the temperature increases. Therefore, the change curve of Vf can effectively characterize the temperature change trend and provide basic data for subsequent temperature calculation.

[0054] S303. Calculate the corresponding operating environment temperature data based on the feedback voltage Vf. In this embodiment, the main control module calls the pre-set thermocouple look-up table data internally, selects the temperature points corresponding to the two voltage points adjacent to the current Vf, and calculates the accurate current temperature value using the linear interpolation method.

[0055] In one embodiment, as Figure 8 and Figure 12 shown, in step S303, that is, the step of calculating the corresponding operating environment temperature data based on the feedback voltage Vf includes: S3031. Call the pre-established thermocouple data look-up table, and determine the corresponding first thermocouple temperature step point TC_TLT1, second thermocouple temperature step point TC_TLT2, first voltage step value TC_mv1 corresponding to the first thermocouple temperature step point TC_TLT1, and second voltage step value TC_mv2 corresponding to the second thermocouple temperature step point TC_TLT2 according to the thermocouple data look-up table; in this embodiment, after receiving the feedback voltage Vf, the main control module automatically retrieves the thermocouple comparison data table stored in its internal memory, and this data table records the mapping relationship between multiple temperature points and their corresponding standard voltage values. By traversing and comparing the interval where the Vf value is located in the data table, the main control module locates two voltage nodes TC_mv1 and TC_mv2 adjacent to Vf, where TC_mv1 is the maximum voltage point less than or equal to Vf, and TC_mv2 is the minimum voltage point greater than Vf, and the corresponding temperature points are TC_TLT1 and TC_TLT2 respectively. For example, when Vf is 3.62 mV, if it is found from the look-up table that 3.42 mV corresponds to a temperature of 80 °C and 3.77 mV corresponds to a temperature of 90 °C, then TC_mv1 is 3.42 mV, TC_TLT1 is 80 °C, TC_mv2 is 3.77 mV, and TC_TLT2 is 90 °C. This step provides clear interval boundaries for subsequent interpolation and conversion of temperature.

[0056] S3032. Calculate the corresponding operating environment temperature data fTmp according to the first thermocouple temperature step point TC_TLT1, second thermocouple temperature step point TC_TLT2, first voltage step value TC_mv1, second voltage step value TC_mv2, and feedback voltage Vf. The calculation formula is ; in this embodiment, continuing with the previous example, substituting into the formula, we get fTmp = (90 - 80) / (3.77 - 3.42) × (3.62 - 3.42) + 80 ≈ 86 °C, indicating that the current motor drive module environment temperature is approximately 86 degrees Celsius. By using interpolation calculation instead of full-table search, it not only improves the calculation efficiency but also avoids the error problem of being unable to match due to the sampling voltage falling in the data gap, ensuring that the control system can quickly and accurately master the current thermal state and providing a precise basis for the over-temperature processing logic.

[0057] In one embodiment, as Figure 13 shown, in step S40, that is, in the step of judging whether to perform the corresponding power cut-off operation according to the operating environment temperature data, it includes: S401. Determine the preset overheat threshold and the preset restart threshold; in this embodiment, during the initialization configuration phase of the system or the factory setting of the product, upper and lower limit control parameters for the temperature safety range during the operation of the motor drive module are preset, which are respectively used to determine whether to perform power-off protection and whether power supply can be restored. Specifically, the preset overheat threshold refers to the value when the ambient temperature exceeds this value, the system will regard it as an abnormal high temperature state, and the power supply to the motor needs to be interrupted to prevent the power device from being burned due to heat accumulation. This value can be set to 100 degrees Celsius, for example; the preset restart threshold refers to the value when the system detects that the temperature drops below this threshold, and it is considered that the environment has returned to the safe range, and the power supply to the motor can be restarted. This value can be set to 40 degrees Celsius, for example. By setting two levels of temperature thresholds, the frequent start and stop of the motor caused by the frequent fluctuation of the temperature at the boundary state can be avoided, thereby enhancing the system stability.

[0058] S402. Determine whether the operating environment temperature data is greater than the preset overheat threshold. If it is not greater than the preset overheat threshold, maintain the power supply of the motor drive module; in this embodiment, after the main control module obtains the ambient temperature fTmp calculated by the temperature sensing module within the current sampling period, it compares and judges with the preset overheat threshold in real time. If the temperature value is lower than or equal to the overheat threshold, it indicates that the system is in a normal operating state, and the main control module does not interfere with the motor power supply logic, maintains the normal power supply state of the motor drive module, and continues to execute the motor motion control operation. For example, in a certain sampling period, the temperature value is 85 degrees Celsius, which does not reach the overheat threshold of 100 degrees Celsius, then the control system will continue to maintain the power supply state and does not trigger the power-off process.

[0059] S403. If it is greater than the preset overheat threshold, perform the corresponding power cut operation and obtain the operating environment temperature data at the next sampling moment; in this embodiment, when the main control module detects that the current operating temperature value has exceeded the set overheat threshold, for example, the detected value is 102 degrees Celsius, it immediately triggers a power control signal to close the power supply path connected to the motor drive module to prevent the temperature from continuing to rise and causing damage to the power module. At the same time, the system does not immediately enter the complete shutdown state, but enters the thermal protection monitoring stage, periodically executes the next round of temperature sampling tasks, records whether the current temperature changes, and prepares for whether to restore power supply in the next step. This operation ensures the safe power-off response of the system in case of overheating and reserves the possibility of automatic restart, realizing the intelligence of control.

[0060] S404. Determine whether the operating environment temperature data at the next sampling moment is less than the preset restart threshold. If it is not less than the preset restart threshold, continue to perform the corresponding power cut operation. In this embodiment, the main control module re-compares the temperature value with the preset restart threshold after each new temperature data sampling. If the current temperature is still higher than the safe recovery threshold, for example, continuously at 45 °C, it is considered that the environmental heat has not been fully released, and the existing power-off state is maintained, the motor power is not turned on, and continue to wait for the next round of temperature change sampling. Through the continuous temperature tracking and judgment mechanism, it is prevented from erroneously restoring the motor power supply when the temperature has not completely dropped, thereby further reducing the loss of the electrical system under repeated thermal shocks.

[0061] S405. If it is less than the preset restart threshold, perform the corresponding operation to restart the motor power supply. In this embodiment, when the main control module detects that the environmental temperature has dropped below the safe recovery range, for example, has dropped to 35 °C, the system will determine that the current environment meets the power supply restoration condition, immediately execute the closing of the power control signal, restore the power supply to the motor drive module, and make the motor re-enter the operating state. This operation marks the end of a complete temperature protection cycle, and the system returns from the overheat protection state to the normal working state, ensuring a quick restoration of work efficiency under the premise of safety, and improving the equipment operation continuity and response flexibility.

[0062] In one embodiment, as Figure 14 shown, before step S20, that is, before the step of updating the pre-established cache variable according to the analog value, it further includes: S11. Calculate the real-time rotation speed value Res according to the analog value AO, and the calculation formula is ; In this embodiment, after the main control module receives the analog value AO from the host computer, based on the pre-set linear mapping relationship between the analog quantity and the motor rotation speed, it uses interpolation or proportional conversion to deduce the target rotation speed Res of the current motor under this analog control. Specifically, if it is set that the analog value AO linearly corresponds to the voltage output range of 2V to 10V between 6400 and 32000, and the voltage of 2V to 10V corresponds to the motor rotation speed change range from 0 rpm to 6960 rpm, then the main control module calculates the target rotation speed value through this formula. For example, when the AO value is 16000, it is calculated that the current motor should operate at a speed of about 3262.5 rpm, and this rotation speed information will be used for subsequent decision-making in the control strategy, especially for risk warning and control confirmation in the case of high-speed operation.

[0063] S12. Determine the secondary confirmation threshold. If the real-time rotational speed value Res is less than or equal to the secondary confirmation threshold, prepare to execute the step of updating the pre-established cache variable according to the analog value. In this embodiment, to ensure the control reliability in the high-speed state, the system sets a speed threshold for triggering additional confirmation, which is called the secondary confirmation threshold. This threshold can be set to a certain value according to the motor model and usage scenario, such as 3000 rpm. After calculating the rotational speed Res, the main control module will compare it with this threshold. If Res is less than or equal to 3000 rpm, the system considers that the instruction is in a safe speed range where it can be directly executed without an additional confirmation process, and can immediately prepare to execute the subsequent variable update and voltage output processes to ensure the timeliness and efficiency of control response.

[0064] S13. If the real-time rotational speed value Res is greater than the secondary confirmation threshold, send the real-time rotational speed value Res to the host computer. In this embodiment, when the main control module determines that the rotational speed of the motor corresponding to the current instruction has exceeded the set safety range, to prevent the risk of high-speed operation caused by misoperation or abnormal data, the currently calculated target rotational speed value is sent to the host computer through the EtherCAT protocol or other communication interfaces to notify the user or the upper control system to confirm whether to continue executing the instruction. This step, as part of the protection mechanism, ensures that there is a clear human-machine interaction or system logic judgment confirmation before high-risk operation, which helps to improve the overall safety of the system and the controllability of the control. For example, when Res is calculated as 5800 rpm, which is significantly higher than the secondary confirmation threshold, the system automatically pauses the variable update and waits for the host computer to confirm whether to continue.

[0065] S14. Detect whether the secondary confirmation data from the host computer is received. If the secondary confirmation data from the host computer is received, prepare to execute the step of updating the pre-established cache variable according to the analog value. If the response time of the secondary confirmation data exceeds the preset response threshold, obtain a new analog value again. In this embodiment, after sending the high-speed reminder to the host computer, the main control module will enter the listening and waiting state to detect whether the confirmation signal from the host computer is received within the specified time window, indicating that the user has carefully agreed to continue executing the high-speed control instruction. This response time can be set to, for example, 2 seconds. If the confirmation data is received during this period, the system resumes the subsequent control process, continues to update the cache variable and execute the voltage output. If the confirmation signal is not received after exceeding this response time, the system will regard it as a rejection or control interruption by the host computer, actively abandon the current instruction execution, and re-enter the analog value reading process to ensure the effectiveness and timeliness of the control data. This mechanism effectively avoids safety accidents caused by communication anomalies or misoperations under high-risk operating conditions, and enhances the reliability and robustness of the system in practical applications.

[0066] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A motor motion control circuit based on EtherCAT protocol, characterized in that: Connected between a host computer and a motor drive module, the motor motion control circuit based on the EtherCAT protocol comprises a main control module, a digital-to-analog conversion module, an analog-to-digital conversion module and a temperature sensing module. The main control module performs data communication with the host computer based on the EtherCAT protocol. The first SPI communication terminal of the main control module is connected to the data communication terminal of the digital-to-analog conversion module, the voltage signal output terminal of the digital-to-analog conversion module is connected to the voltage signal input terminal of the motor drive module, the second SPI communication terminal of the main control module is connected to the data communication terminal of the analog-to-digital conversion module, the temperature sensing module is used to detect the operating environment temperature of the motor drive module, and the temperature signal output terminal of the temperature sensing module is connected to the temperature signal input terminal of the analog-to-digital conversion module.

2. The motor motion control circuit based on the EtherCAT protocol according to claim 1, characterized in that: The digital-to-analog conversion module includes a digital-to-analog conversion chip U30 and multiple voltage output units. The data communication end of the digital-to-analog conversion chip U30 is connected to the first SPI communication end of the main control module. The data communication end of the digital-to-analog conversion chip U30 includes a data input port, a clock signal port, a synchronization signal port and an update output signal port. The digital-to-analog conversion chip U30 is provided with multiple channel output ports, each of which is connected to the corresponding voltage output unit, and the voltage signal output end of each voltage output unit is connected to the voltage signal input end of the motor drive module.

3. The motor motion control circuit based on EtherCAT protocol according to claim 2, characterized in that: The voltage output unit includes at least one first operational amplifier and at least one second operational amplifier, the non-inverting input terminal of the first operational amplifier is connected to the channel output port, the output terminal of the first operational amplifier is connected to the non-inverting input terminal of the second operational amplifier, the common node between the output terminal of the first operational amplifier and the non-inverting input terminal of the second operational amplifier is connected to the inverting input terminal of the first operational amplifier, the output terminal of the second operational amplifier is connected to the voltage signal input terminal of the motor drive module, and the common node between the output terminal of the second operational amplifier and the voltage signal input terminal of the motor drive module is connected to the inverting input terminal of the second operational amplifier.

4. The motor motion control circuit based on EtherCAT protocol according to claim 1, characterized in that: The temperature sensing module includes a plurality of thermistor sensing units, and the thermistor sensing units include at least one first resistor, at least one second resistor and at least one thermistor, wherein a first end of the first resistor is connected to a power supply, a second end of the first resistor is connected to a first end of the thermistor, a second end of the thermistor is connected to a first end of the second resistor, a second end of the second resistor is grounded, a common node between the second end of the first resistor and the first end of the thermistor is connected to a positive input end of a differential signal of the analog-to-digital conversion module, and a common node between the second end of the thermistor and the first end of the second resistor is connected to a negative input end of a differential signal of the analog-to-digital conversion module.

5. A motor motion control method based on the EtherCAT protocol, applied to a motor motion control circuit based on the EtherCAT protocol as claimed in any one of claims 1 to 4, characterized in that: The motor motion control method based on the EtherCAT protocol includes: Based on the EtherCAT protocol, obtain the analog value sent by the host computer; According to the analog value, the pre-established cache variable is updated to generate a corresponding updated variable, and the updated variable is sent to the motor drive module, and the updated variable is used to output a corresponding PWM signal to control the corresponding speed of the motor drive module; If it is detected that the updated variable is sent successfully, the operating environment temperature data of the motor drive module is acquired in real time; According to the operating environment temperature data, it is determined whether to execute a corresponding power cut-off operation.

6. The motor motion control method based on EtherCAT protocol according to claim 5, characterized in that: The step of updating the pre-established cache variables according to the simulated value to generate corresponding updated variables includes: According to the analog value, at least a DAC channel number, a voltage sign and a voltage value are determined; Calling a pre-established cache variable, wherein the cache variable at least includes a channel bit, a sign bit, and a data bit; According to the DAC channel number, updating the channel bit; According to the voltage sign, updating the sign bit; updating the data bit according to the voltage value; The updated channel bits, the updated sign bits and the updated data bits are integrated to generate corresponding updated variables.

7. The motor motion control method based on EtherCAT protocol according to claim 5, characterized in that: The step of acquiring the operating environment temperature data of the motor drive module in real time includes: Acquire the differential signal at both ends of the corresponding thermistor in the temperature sensing module in real time; According to the differential signal at both ends of the thermistor, the feedback voltage Vf is determined; Based on the feedback voltage Vf, corresponding operating environment temperature data is calculated.

8. The motor motion control method based on EtherCAT protocol according to claim 7, characterized in that: The step of calculating the corresponding operating environment temperature data based on the feedback voltage Vf comprises: Calling a pre-established thermocouple data lookup table, and determining the corresponding first thermocouple temperature step point TC_TLT1, the second thermocouple temperature step point TC_TLT2, the first voltage step value TC_mv1 corresponding to the first thermocouple temperature step point TC_TLT1, and the second voltage step value TC_mv2 corresponding to the second thermocouple temperature step point TC_TLT2 according to the thermocouple data lookup table; According to the first thermocouple temperature step point TC_TLT1, the second thermocouple temperature step point TC_TLT2, the first voltage step value TC_mv1, the second voltage step value TC_mv2 and the feedback voltage Vf, the corresponding operating environment temperature data fTmp is calculated, and the calculation formula is: .

9. The motor motion control method based on EtherCAT protocol according to claim 5, characterized in that: The step of determining whether to execute a corresponding power cut-off operation according to the operating environment temperature data includes: determining a preset overheat threshold and a preset restart threshold; Determine whether the operating environment temperature data is greater than the preset overheating threshold, and if not, maintain the power supply of the motor drive module; If it is greater than the preset overheating threshold, the corresponding power cut-off operation is performed, and the operating environment temperature data at the next sampling moment is obtained; Determine whether the operating environment temperature data at the next sampling moment is less than a preset restart threshold, and if not less than the preset restart threshold, continue to perform the corresponding power cut-off operation; If it is less than the preset restart threshold, the corresponding restart motor power supply operation is executed.

10. The motor motion control method based on EtherCAT protocol according to claim 5, characterized in that: Before the step of updating the pre-established cache variable according to the analog value, the method further includes: According to the analog value AO, the real-time speed value Res is calculated, and the calculation formula is: ; Determine a secondary confirmation threshold, and if the real-time rotation speed value Res is less than or equal to the secondary confirmation threshold, prepare to execute a step of updating a pre-established cache variable according to the analog value; If the real-time speed value Res is greater than the secondary confirmation threshold, the real-time speed value Res is sent to the host computer; Detect whether the secondary confirmation data of the host computer is received. If the secondary confirmation data of the host computer is received, prepare to execute the step of updating the pre-established cache variable according to the analog value. If the response time of the secondary confirmation data exceeds the preset response threshold, re-acquire the new analog value.

Citation Information

Patent Citations

  • Application method and device for air conditioner protection circuit

    CN104633847A

  • Cooperative robot driver based on EtherCAT, hardware FOC and gallium nitride power tube and control method

    CN114865958A

  • Temperature detection device of frequency converter, control method of temperature detection device and frequency converter

    CN117254747A

  • Novel temperature measurement module and voltage input module combination method

    CN117367498A

  • Cold atomic clock digital PID temperature control system and method

    CN118502513A