Debugging method and device of stepping driver, equipment, medium and program product
By setting the reference torque value and improving the control algorithm, the stepper driver is automatically debugged, which solves the problem of low debugging automation in the prior art, and improves the control accuracy and response speed of the stepper driver.
Patent Information
- Application Number
- CN202411380306.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-17
AI Technical Summary
The debugging of existing stepper drivers is low, requiring manual observation of bit signals and manual recording of data, resulting in low debugging efficiency.
By setting the reference torque value, the stepper driver controls the stepper motor to drive the stepper motor for movement, and improves the control algorithm based on whether the real-time torque reaches the reference torque value, and automatically adjusts the torque value to improve the degree of debugging automation.
It improves the automation of stepper driver debugging, improves control accuracy and response speed, and ensures that the stepper motor operates stably and accurately under various working conditions.
Smart Images

Figure CN119322474A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of stepper test technology, and in particular to a debugging method for a stepper drive, a debugging device for a stepper drive, a debugging equipment for a stepper drive, a storage medium and a computer program product. Background Art
[0002] At present, controlling the servo torque and monitoring the output of the driver in-position signal are realized in two ways. To observe the in-position signal, relevant personnel need to determine whether the relay at the output end of the driver has a coil energized, and the relevant data also needs to be recorded manually. As a result, the debugging personnel need to additionally observe the in-position status and manually record the relevant data, and the degree of debugging automation is low.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present application is to provide a debugging method for a stepper drive, a debugging device for a stepper drive, a debugging equipment for a stepper drive, a storage medium and a computer program product, aiming to solve the technical problem of low degree of debugging automation.
[0005] To achieve the above-mentioned purpose, the present application proposes a debugging method for a stepper drive, and the method is applied to a control component and comprises: setting a reference torque value;
[0006] Controlling the stepper driver to drive the stepper motor to perform positioning movement, so that the real-time torque output by the stepper driver driving the stepper motor reaches the reference torque value;
[0007] According to the situation that the real-time torque output by the stepper motor reaches the reference torque value, the control algorithm of the stepper driver is improved.
[0008] In one embodiment, the step of improving the control algorithm of the stepper driver includes:
[0009] If the real-time torque reaches the reference torque value, a new reference torque value is set, and the step of controlling the stepper driver to drive the stepper motor to perform positioning motion is returned to execution until the real-time torque fails to reach the reference torque value.
[0010] In one embodiment, the step of improving the control algorithm of the stepper driver includes:
[0011] If the real-time torque cannot reach the reference torque value, the latest reference torque value is used as the limit torque value of the stepper motor, and the control algorithm of the stepper driver is improved based on the limit torque value.
[0012] In one embodiment, the step of controlling the stepper driver to drive the stepper motor to perform positioning movement includes:
[0013] If the stepper driver is a pulse type control mode, the high-speed pulse signal is used to control the stepper driver to drive the stepper motor to perform positioning movement;
[0014] If the stepper driver is a bus-type control method, the motion control logic protocol is used to control the stepper driver to drive the stepper motor to perform positioning motion.
[0015] In one embodiment, after the step of controlling the stepper driver to drive the stepper motor to perform the positioning movement, the following steps are performed:
[0016] If the stepper driver is a pulse type control mode, a high level signal is obtained through the in-position signal output port of the stepper driver, wherein the control component obtains the high level signal indicating that the real-time torque output by the stepper motor reaches the reference torque value;
[0017] If the stepper driver is a bus-type control method, the in-position signal of the stepper driver is obtained according to the data recorded in the motion control logic protocol, wherein the control component obtains the in-position signal to indicate that the real-time torque output by the stepper motor reaches the reference torque value.
[0018] In one embodiment, the step of setting the reference torque value includes:
[0019] When the servo motor and the stepper motor are supported opposite to each other, the control component sends a control instruction to the servo driver, wherein the servo driver drives the servo motor to output a reference torque value according to the control instruction.
[0020] In addition, to achieve the above-mentioned purpose, the present application also proposes a debugging device for a stepper drive, the debugging device for the stepper drive comprising:
[0021] A setting module, used to set the reference torque value;
[0022] A control module, used for controlling the stepper driver to drive the stepper motor to perform positioning movement, so that the real-time torque output by the stepper driver driving the stepper motor reaches the reference torque value;
[0023] The debugging module is used to improve the control algorithm of the stepper driver according to the situation that the real-time torque output by the stepper motor reaches the reference torque value.
[0024] In addition, to achieve the above-mentioned purpose, the present application also proposes a debugging device for a stepper drive, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the debugging method for the stepper drive as described above.
[0025] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the debugging method of the stepper drive described above are implemented.
[0026] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the debugging method of the stepper drive as described above are implemented.
[0027] Compared with the traditional method that requires testers to observe the positioning status through additional components and the test data cannot be integrated into a system, manual testing is required, and the test automation level is low; this application determines whether the control algorithm of the stepper driver drives the stepper motor to perform the positioning movement based on whether the real-time torque output by the stepper motor reaches the reference torque. The setting of the torque value, the collection of data during the positioning movement, and the improvement of the control algorithm of the stepper driver are integrated into a debugging solution, which improves the automation level of debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 A flowchart diagram of a first embodiment of a method for debugging a stepper driver of the present application;
[0031] Figure 2 A flow chart of the debugging method of the stepper driver provided in the present application;
[0032] Figure 3 This is a schematic diagram of the module structure of the debugging method device of the stepper driver of the present application;
[0033] Figure 4This is a schematic diagram of the device structure of the hardware operating environment involved in the debugging method of the stepper driver of the present application.
[0034] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0035] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0036] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0037] It should be noted that the execution subject of this embodiment may be a control component, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a processor, etc. The following takes the control component as an example to illustrate this embodiment and the following embodiments.
[0038] Based on this, the present application embodiment provides a stepper driver debugging method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the debugging method of the stepper driver of the present application.
[0039] In this embodiment, the debugging method of the stepper driver is applied to the control component, including steps S10 to S30:
[0040] In one embodiment, the control component is a motion control card for controlling the motion of a motor.
[0041] Step S10, setting a reference torque value;
[0042] It should be noted that the reference torque value is used to set the torque output of the stepper motor to achieve precise motion control.
[0043] Step S20, controlling the stepper driver to drive the stepper motor to perform positioning movement, so that the real-time torque output by the stepper driver driving the stepper motor reaches the reference torque value;
[0044] It should be noted that the stepper driver is used to control the movement of the stepper motor. The stepper driver drives the stepper motor through a control algorithm. The stepper motor controls the number of rotation steps and speed through the stepper driver to achieve angular displacement or linear displacement. Positioning motion refers to the stepper motor moving along a predetermined path or position to reach a specific position. When the stepper motor reaches a specific position, the stepper driver sends a positioning signal to the control component. Real-time torque refers to the torque generated by the stepper motor in real time during the movement, that is, the torque output by the motor.
[0045] By controlling the torque to simulate different working conditions and monitoring the positioning performance of the stepper motor under these conditions, it can be ensured that the control algorithm of the stepper drive can provide enough torque to overcome the load in the actual application, thus ensuring that the stepper motor can accurately reach a specific position.
[0046] In one implementation, step S20 includes steps A10 to A20:
[0047] Step A10, if the stepper driver is a pulse type control mode, the stepper driver is controlled by a high-speed pulse signal to drive the stepper motor to perform positioning movement;
[0048] It should be noted that by sending pulse signals to the stepper driver, the rotation of the stepper motor can be precisely controlled. Each pulse signal causes the motor to rotate a fixed angle (step angle), so by controlling the number of pulses, the angle of rotation of the motor can be controlled to achieve precise positioning; among them, high-speed pulse signals refer to pulse sequences sent at a higher frequency. By increasing the frequency of the pulse signal, the rotation speed of the stepper motor can be increased.
[0049] Step A20: If the stepper driver is a bus-type control mode, the stepper driver is controlled by the motion control logic protocol to drive the stepper motor to perform positioning motion.
[0050] It should be noted that the bus-type control method uses fieldbuses such as EtherCAT (Ethernet for Control Automation Technology, a fieldbus system based on Ethernet), Profinet (an open industrial Ethernet communication protocol), CANopen (Controller Area Networkopen, a high-level communication protocol based on controller area network) for data communication. This control method connects devices such as drivers and controllers through a bus to achieve high-speed and synchronous data transmission, and is suitable for multi-axis systems that require complex coordinated control.
[0051] Motion control logic protocols such as CIA402 (CAN in Automation Draft Standard Proposed 402 Version, one of the sub-protocols in the CANopen standard protocol) stipulate the communication rules and data formats between the control system and the drive, and are used to control the drive to perform specific motion control tasks, such as positioning, speed control, etc. In the bus control mode, this protocol defines how to send instructions, parameter settings, status feedback and other information through the bus.
[0052] Through the motion control logic protocol, the bus-type stepper driver can receive instructions from the controller, such as target position, speed curve, etc., and then drive the stepper motor to ensure that it performs positioning movement according to the instruction requirements.
[0053] In this embodiment, the pulse type control mode directly controls the stepper driver through high-speed pulse signals, which is simple and low-cost; by accurately controlling the number and frequency of high-speed pulse signals, accurate position control of the stepper motor can be achieved. Bus type control supports multi-axis synchronization, remote monitoring and diagnosis, and more complex motion control functions such as torque control; bus type control mode controls the stepper driver through motion control logic protocol, providing higher communication speed and better system integration capabilities.
[0054] In another feasible implementation manner, after step S20, steps B10 to B20 are included:
[0055] Step B10, if the stepper driver is a pulse control mode, a high level signal is obtained through the in-position signal output port of the stepper driver, wherein the control component obtains the high level signal indicating that the real-time torque output by the stepper motor reaches the reference torque value;
[0056] It should be noted that the pulse type stepper driver controls the stepping action of the stepper motor by receiving the pulse signal sent by the control component, that is, each step of the motor's rotation; the in-position signal output port is an output port of the stepper driver, which is used to feedback to the control component whether the motor has reached the predetermined position; when the stepper motor moves to the target position or outputs the target torque according to the control instruction, the driver will output a signal through this port. When the in-position signal output port of the stepper driver sends a high-level signal, it means that the stepper motor has executed the predetermined number of steps or reached the reference torque value, that is, the real-time torque of the motor matches the reference torque value required in the control instruction.
[0057] Step B20, if the stepper driver is a bus-type control method, obtain the in-position signal of the stepper driver according to the data recorded in the motion control logic protocol, wherein the control component obtains the in-position signal to indicate that the real-time torque output by the stepper motor reaches the reference torque value.
[0058] It should be noted that in the bus control mode, the stepper drive communicates with the control component through a bus protocol (such as EtherCAT, CANopen, etc.). The control logic protocol refers to a standardized method for exchanging data between the control component and the drive, which defines the data format, transmission method and communication process. In this control mode, the control component obtains the in-position signal by reading the status information of the stepper drive, which is usually achieved by reading the process data object sent by the drive.
[0059] In this embodiment, when the control component detects a high-level signal emitted by the in-position signal output port of the stepper driver, or when the control component obtains the in-position signal from the status information of the stepper driver, it can be confirmed that the stepper motor has output the required real-time torque according to the control instruction; this feedback mechanism is part of the closed-loop control system, which is used to ensure that the output of the motor is consistent with the control instruction to achieve precise torque and position control.
[0060] Step S30, improving the control algorithm of the stepper driver according to the situation that the real-time torque output by the stepper motor reaches the reference torque value.
[0061] It should be noted that during the operation of the stepper motor, the control system will monitor the torque output by the motor in real time. If it is monitored that the real-time torque has reached the reference torque value (that is, the stepper motor is within the reference torque value range), it means that the stepper motor has reached the predetermined position under the reference torque value. At this time, the stepper driver sends an in-position signal to the control component; the control component obtains the currently set reference torque value based on the in-position signal to allow the stepper motor to reach the predetermined position.
[0062] Next, the control component adjusts the reference torque value. When the real-time torque output by the stepper motor does not reach the reference torque value (i.e., the stepper motor is not within the reference torque value range) under the latest reference torque value, it means that the stepper motor has not reached the predetermined position under the reference torque value. At this time, the stepper driver cannot send an in-position signal to the control component. Based on the latest reference torque value at this time, the control algorithm of the stepper driver is improved. This automated testing, acquisition, and debugging method can ensure that the stepper motor can operate stably and accurately under various working conditions.
[0063] This embodiment provides a debugging method for a stepper driver. First, the control component needs to set a torque target, that is, a reference torque value, according to task requirements or working conditions; next, the control component sends instructions to the stepper driver, controls the rotation of the stepper motor through pulse signals or bus communication, and makes the stepper motor perform positioning movement; during the operation of the stepper motor, the real-time torque output of the stepper motor is continuously monitored, that is, the position of the stepper motor is monitored and debugging data is collected; finally, when the real-time torque reaches the reference torque value, that is, the stepper motor is in place, the stepper driver sends a position signal to the control component. Based on the collected debugging data, the control algorithm of the stepper driver is improved, and the torque value is set, the data collected during the positioning movement, and the control algorithm of the stepper driver is improved and integrated into a set of debugging solutions, which not only improves the automation of debugging, but also improves the control accuracy and response speed of the stepper driver control algorithm, ensures that the stepper motor can reach the predetermined position, and improves the reliability of the control system.
[0064] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description and will not be described in detail later. Step S30, the debugging method of the stepper driver includes:
[0065] If the real-time torque reaches the reference torque value, a new reference torque value is set, and the process returns to the step of controlling the stepper driver to drive the stepper motor to perform positioning motion.
[0066] It should be noted that the output torque of the stepper motor is detected in real time, and the real-time torque is compared with the reference torque value. If the torque detected in real time reaches the reference torque value, it means that the stepper motor has reached the predetermined position under the drive of the stepper driver control algorithm; the stepper driver sends an in-position signal to the control component, and then the control component sets a new reference torque value. After setting the new reference torque value, the system returns to the step of controlling the stepper driver to drive the stepper motor to perform precise positioning movement.
[0067] In a feasible implementation manner, step S30 further includes:
[0068] If the real-time torque reaches the reference torque value, a new reference torque value is set, and the step of controlling the stepper driver to drive the stepper motor to perform positioning motion is returned to execution until the real-time torque fails to reach the reference torque value.
[0069] It should be noted that when the real-time torque of the stepper motor cannot reach the latest set reference torque value, the latest reference torque value is set as the limit torque value of the stepper motor. Subsequently, the control algorithm in the stepper driver will adjust and improve the parameters according to the limit torque value to optimize the performance and response of the motor. Such adjustments may include changing the current setting, adjusting the step rate, or using different control strategies to ensure that the motor operates stably within its capabilities while being as close to the required torque output as possible.
[0070] In this embodiment, when the servo motor and the stepper motor are supporting each other, if the real-time torque cannot reach the reference torque value, the latest reference torque value is used as the limit torque value of the stepper motor, and the control algorithm of the stepper drive is improved based on the limit torque value, which can better adapt to the actual capacity of the stepper motor and avoid performance degradation caused by excessive torque, such as slow speed or inaccurate position control; improving the parameters in the control algorithm according to the limit torque value can enable the control algorithm to control more complex logic, such as torque distribution, load prediction and adaptive control, which helps to improve the performance of the system under changing working conditions.
[0071] In this embodiment, by real-time monitoring of the actual position of the stepper motor and adjusting the reference torque value, the system can better adapt to load changes and ensure precise motion control under different working conditions, which helps to reduce positioning errors and improve overall control accuracy.
[0072] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the first embodiment can be referred to the above introduction and will not be described in detail later. Step S10 includes:
[0073] When the servo motor and the stepper motor are supported opposite to each other, the control component sends a control instruction to the servo driver, wherein the servo driver drives the servo motor to output a reference torque value according to the control instruction.
[0074] It should be noted that the way stepper motors and servo motors are supported usually refers to the fact that stepper motors and servo motors can be connected to equipment through different mechanical structures, such as directly mounted on a drive shaft, connected to a load through a belt or gear, etc. A servo drive is a high-performance motor drive that can control the position, speed, and acceleration of a servo motor. When the control component sends a control instruction to the servo drive, the servo drive adjusts the current and voltage according to the instruction and drives the servo motor to generate the required reference torque value, so that the control component sends a control instruction to the stepper drive according to the reference torque value to drive the stepper motor to perform positioning motion.
[0075] In this embodiment, in the application of servo motor and stepper motor, the control component sends control instructions to the servo driver, and the servo driver drives the servo motor to output a reference torque value according to these instructions, thereby realizing multi-axis coordinated control, ensuring that the motor can accurately position and maintain speed, complete complex motion trajectories, and thus achieve high-precision control effects.
[0076] In one embodiment, please refer to Figure 2 , Figure 2 A brief flow chart of a stepper driver debugging method is provided, specifically:
[0077] When the stepper motor and servo motor are supported, the EtherCAT communication in the motion control card controls the torque of the servo drive, and the motion control card controls the stepper drive to drive the stepper motor (when the stepper drive is a pulse control method, the high-speed pulse output port of the motion control card is used to control the stepper drive to drive the stepper motor; when the stepper drive is an EtherCAT control method, the EtherCAT communication of the motion control card is used to control the stepper drive to drive the stepper motor according to the CIA402 protocol); if the stepper motor is in place within the torque range (that is, the real-time torque output by the stepper motor reaches the servo The stepper driver outputs an in-place signal to the motion control card, wherein the motion control card obtains the in-place signal by: outputting a high level through the in-place signal output port of the stepper driver to obtain the in-place signal of the stepper driver; or, obtaining the in-place signal of the stepper driver through the corresponding data in the CIA402 protocol; if the motion control card can obtain the in-place signal, the servo driver is re-controlled to set a new torque and a new round of testing is started until the motion control card cannot obtain the in-place signal from the stepper driver; finally, the latest torque value is used as the limit torque value, the relevant data is sorted out, and the control algorithm of the stepper driver is optimized.
[0078] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the debugging method of the stepper driver of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0079] This application also provides a debugging device for a stepper driver, please refer to Figure 3 , the debugging device of the stepper driver comprises:
[0080] A setting module 10, used for setting a reference torque value;
[0081] The control module 20 is used to control the stepper driver to drive the stepper motor to perform positioning movement, so that the real-time torque output by the stepper driver driving the stepper motor reaches the reference torque value;
[0082] The debugging module 30 is used to improve the control algorithm of the stepper driver according to the situation that the real-time torque output by the stepper motor reaches the reference torque value.
[0083] Optionally, the module 10 is also configured to cause the control component to send a control instruction to the servo driver when the servo motor and the stepper motor are supported against each other, wherein the servo driver drives the servo motor to output a reference torque value according to the control instruction.
[0084] Optionally, the control module 20 is also used to control the stepper driver to drive the stepper motor to perform positioning movement through a high-speed pulse signal if the stepper driver is a pulse-type control mode;
[0085] If the stepper driver is a bus-type control method, the motion control logic protocol is used to control the stepper driver to drive the stepper motor to perform positioning motion.
[0086] Optionally, the control module 20 is further used to obtain a high-level signal through the in-position signal output port of the stepper driver if the stepper driver is in a pulse control mode, wherein the control component obtains the high-level signal indicating that the real-time torque output by the stepper motor reaches the reference torque value;
[0087] If the stepper driver is a bus-type control method, the in-position signal of the stepper driver is obtained according to the data recorded in the motion control logic protocol, wherein the control component obtains the in-position signal to indicate that the real-time torque output by the stepper motor reaches the reference torque value.
[0088] Optionally, the debugging module 30 is also used to set a new reference torque value if the real-time torque reaches the reference torque value, and return to execute the step of controlling the stepper driver to drive the stepper motor to perform positioning movement until the real-time torque cannot reach the reference torque value.
[0089] Optionally, the debugging module 30 is also used to use the latest reference torque value as the limit torque value of the stepper motor if the real-time torque cannot reach the reference torque value, and improve the control algorithm of the stepper drive based on the limit torque value.
[0090] The debugging device of the stepper drive provided by the present application adopts the debugging method of the stepper drive in the above embodiment, which can solve the technical problem of low debugging automation. Compared with the prior art, the beneficial effects of the debugging device of the stepper drive provided by the present application are the same as the beneficial effects of the debugging method of the stepper drive provided by the above embodiment, and other technical features in the debugging device of the stepper drive are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0091] The present application provides a debugging device for a stepper drive, the debugging device for the stepper drive comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the debugging method for the stepper drive in the first embodiment described above.
[0092] Reference below Figure 4 , which shows a schematic diagram of the structure of a debugging device for a stepper driver suitable for implementing an embodiment of the present application. The debugging device for the stepper driver in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The debugging device of the stepper drive shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0093] like Figure 4As shown, the debugging device of the stepper driver may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the debugging device of the stepper driver are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the debugging device of the stepper drive to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a debugging device of the stepper drive with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0094] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0095] The debugging device of the stepper drive provided by the present application adopts the debugging method of the stepper drive in the above embodiment, which can solve the technical problem of low debugging automation. Compared with the prior art, the beneficial effects of the debugging device of the stepper drive provided by the present application are the same as the beneficial effects of the debugging method of the stepper drive provided by the above embodiment, and other technical features in the debugging device of the stepper drive are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0096] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0097] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0098] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the debugging method of the stepper driver in the above-mentioned embodiment.
[0099] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0100] The computer-readable storage medium may be included in the debugging device of the stepper driver; or may exist independently without being assembled into the debugging device of the stepper driver.
[0101] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the debugging device of the stepper drive, the debugging device of the stepper drive: sets a reference torque value; controls the stepper drive to drive the stepper motor to perform positioning motion, so that the real-time torque output by the stepper drive driving the stepper motor reaches the reference torque value; and improves the control algorithm of the stepper drive according to the situation that the real-time torque output by the stepper motor reaches the reference torque value.
[0102] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0103] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0104] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0105] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the debugging method of the above-mentioned stepper driver, and can solve the technical problem of low automation of debugging. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the debugging method of the stepper driver provided by the above-mentioned embodiment, and will not be repeated here.
[0106] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the stepper driver debugging method as described above are implemented.
[0107] The computer program product provided by the present application can solve the technical problem of low debugging automation. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the stepper driver debugging method provided by the above embodiment, which will not be repeated here.
[0108] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A stepper driver debugging method, characterized in that: The method is applied to a control component, and the method comprises: Set the reference torque value; Controlling the stepper driver to drive the stepper motor to perform positioning movement, so that the real-time torque output by the stepper driver driving the stepper motor reaches the reference torque value; According to the situation that the real-time torque output by the stepper motor reaches the reference torque value, the control algorithm of the stepper driver is improved.
2. The debugging method of the stepper driver according to claim 1, characterized in that: The step of improving the control algorithm of the stepper driver comprises: If the real-time torque reaches the reference torque value, a new reference torque value is set, and the step of controlling the stepper driver to drive the stepper motor to perform positioning motion is returned to execution until the real-time torque fails to reach the reference torque value.
3. The debugging method of the stepper driver according to claim 1, characterized in that: The step of improving the control algorithm of the stepper driver comprises: If the real-time torque cannot reach the reference torque value, the latest reference torque value is used as the limit torque value of the stepper motor, and the control algorithm of the stepper driver is improved based on the limit torque value.
4. The debugging method of the stepper driver according to claim 1, characterized in that: The step of controlling the stepper driver to drive the stepper motor to perform positioning movement comprises: If the stepper driver is a pulse type control mode, the high-speed pulse signal is used to control the stepper driver to drive the stepper motor to perform positioning movement; If the stepper driver is a bus-type control method, the motion control logic protocol is used to control the stepper driver to drive the stepper motor to perform positioning motion.
5. The debugging method of the stepper driver according to claim 1, characterized in that: After the step of controlling the stepper driver to drive the stepper motor to perform the positioning movement, the method further comprises: If the stepper driver is a pulse type control mode, a high level signal is obtained through the in-position signal output port of the stepper driver, wherein the control component obtains the high level signal indicating that the real-time torque output by the stepper motor reaches the reference torque value; If the stepper driver is a bus-type control method, the in-position signal of the stepper driver is obtained according to the data recorded in the motion control logic protocol, wherein the control component obtains the in-position signal to indicate that the real-time torque output by the stepper motor reaches the reference torque value.
6. The debugging method of the stepper driver according to claim 1, characterized in that: The step of setting the reference torque value comprises: When the servo motor and the stepper motor are supported opposite to each other, the control component sends a control instruction to the servo driver, wherein the servo driver drives the servo motor to output a reference torque value according to the control instruction.
7. A debugging device for a stepper drive, characterized in that: The debugging device of the stepper driver comprises: A setting module, used to set the reference torque value; A control module, used for controlling the stepper driver to drive the stepper motor to perform positioning movement, so that the real-time torque output by the stepper driver driving the stepper motor reaches the reference torque value; The debugging module is used to improve the control algorithm of the stepper driver according to the situation that the real-time torque output by the stepper motor reaches the reference torque value.
8. A debugging device for a stepper drive, characterized in that: The device includes: a control component, a stepper drive, a servo drive, a stepper motor, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the stepper drive debugging method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the debugging method of the stepper driver according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the debugging method of the stepper drive according to any one of claims 1 to 6 are implemented.