Method for motion control of an electric machine, electric machine and storage medium
Patent Information
- Application Number
- CN202211444344.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-11-18
AI Technical Summary
现有技术中,电机吸样,或者加样后,因电机的运动特性,会存在样本抖动,严重时会出现样本洒落的情况
[0044]采用本发明实施例,具有如下有益效果:当电机需要复位时,生成复位指令;根据复位指令和电机的当前位置计算第一加速度,第一加速度为电机从校准位置减速到初始位置的加速度,校准位置距离与初始位置之间的距离小于当前位置距离与初始位置之间的距离。在本实施例中,计算第一加速度保证电机复位,运动速度变化能够平稳的进行,在电机运动的过程中减少电机丢步,过冲等情况,进而保证血液样本有序进行检测。进一步地,根据第一加速度确定电机到达检测位置时的预设速度,检测位置位于校准位置和初始位置之间;获取电机经过检测位置时的第一速度;当第一速度大于预设速度时,控制电机根据第二加速度进行减速,其中,第二加速度的绝对值大于第一加速度的绝对值,以使电机在到达初始位置时的速度为0。这样能够保证电机运动稳定性,在血细胞分析仪需要立停的时候,避免电机因速度过快产生过冲,或者异响等问题,从而保证血细胞分析仪的稳定检测。
Smart Images

Figure CN115864913B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motion control technology, and in particular to a motion control method for an electric motor, the electric motor, and a storage medium. Background Technology
[0002] Blood cell analyzers play an increasingly important role in human health checkups. A standard operation of blood analyzers involves a mechanical motor-controlled sampling needle drawing up a sample and transferring it to a reaction chamber. However, in existing technologies, the motor's motion characteristics can cause sample jitter during aspiration or addition, potentially leading to sample spillage. Furthermore, during sample testing, the motor may experience step loss or overshoot, resulting in unreliable blood sample analysis.
[0003] Existing motor motion control methods cannot guarantee motor motion stability. When the blood cell analyzer needs to stop immediately, motion control issues can cause the motor to speed up, overshoot, and produce abnormal noises, thus compromising the stability of the blood cell analyzer. Summary of the Invention
[0004] Based on this, it is necessary to propose a motion control method for an electric motor, an electric motor, and a storage medium to address the above problems.
[0005] A motion control method for an electric motor, the method comprising:
[0006] When the motor needs to be reset, a reset command is generated;
[0007] The first acceleration is calculated based on the reset command and the current position of the motor. The first acceleration is the acceleration of the motor decelerating from the calibration position to the initial position. The distance between the calibration position and the initial position is less than the distance between the current position and the initial position.
[0008] The preset speed at which the motor reaches the detection position is determined based on the first acceleration, and the detection position is located between the calibration position and the initial position.
[0009] Obtain the first speed of the motor when it passes the detection position;
[0010] When the first speed is greater than the preset speed, the control motor decelerates according to the second acceleration, wherein the absolute value of the second acceleration is greater than the absolute value of the first acceleration, so that the speed of the motor is 0 when it reaches the initial position.
[0011] Optionally, the first acceleration is calculated based on the reset command and the current position of the motor, specifically including:
[0012] The initial number of steps required for the motor to move to the initial position is obtained based on the current position.
[0013] Add a preset number of steps to the initial number of steps to get the first number of steps;
[0014] The distance traveled at a constant speed is obtained based on the first number of steps and the calibration position;
[0015] The distance of deceleration is obtained from the distance of uniform motion;
[0016] The first acceleration is obtained based on the distance covered by the deceleration motion. Optionally, before generating the reset instruction, the following is also included:
[0017] The motor is controlled to perform a reset operation at a preset reset speed according to the power-on command;
[0018] Determine whether to acquire the initial position signal of the motor; and,
[0019] When the initial position signal is received, the control motor performs a braking operation.
[0020] Optionally, controlling the motor to perform a reset operation at a preset reset speed according to the power-on command also includes:
[0021] Get the current position of the motor;
[0022] If the current position is not obtained, set the motor's reset step count to the maximum number of steps; and,
[0023] The motor is controlled to perform a reset operation based on the maximum number of steps taken.
[0024] Optionally, the method further includes, when the first speed is less than a preset speed, specifically including:
[0025] Get the remaining number of steps the motor will take;
[0026] The number of compensation steps is obtained based on the first acceleration;
[0027] The current number of steps is obtained based on the remaining steps and the compensation steps; and,
[0028] The motor is controlled to decelerate based on the current number of steps and the initial acceleration.
[0029] Optionally, the method further includes:
[0030] When the motor needs to move, a motion command is generated. The motion command includes the direction of movement and the number of steps. The direction of movement includes a first direction and a second direction.
[0031] Controlling the motor to move according to motion commands specifically includes:
[0032] The current position to which the motor will move is determined based on the number of steps taken.
[0033] Control the motor to move to the current position;
[0034] When the current position is detected as the position is reached, the motor is controlled to stop moving.
[0035] An electric motor is provided with an initial position, a detection position, a calibration position, and a current position. The initial position, detection position, calibration position, and current position are sequentially arranged below the motor's motion guide rail, and sensors are provided thereon.
[0036] in:
[0037] The sensor at the current position is used to detect the current position on the guide rail;
[0038] The sensor at the calibration position is used to obtain the reset speed of the motor when it passes the calibration position;
[0039] A position sensor is used to detect the initial speed of the motor when it reaches the detection position; and,
[0040] The motor also includes a processor, which is connected to the sensor and is used to perform the steps of any of the methods described above.
[0041] Optionally, the calibration position is located between the detection position and the current position, and closer to the side of the detection position.
[0042] Optionally, the sensor is an optocoupler sensor.
[0043] A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of any of the methods described above.
[0044] The embodiments of the present invention have the following beneficial effects: When the motor needs to be reset, a reset command is generated; a first acceleration is calculated based on the reset command and the current position of the motor. The first acceleration is the acceleration of the motor decelerating from the calibration position to the initial position, and the distance between the calibration position and the initial position is less than the distance between the current position and the initial position. In this embodiment, calculating the first acceleration ensures that the motor resets smoothly, and the change in movement speed is stable. During the motor movement, the motor is less prone to step loss and overshoot, thereby ensuring that blood samples are tested in an orderly manner. Further, a preset speed is determined based on the first acceleration when the motor reaches the detection position, which is located between the calibration position and the initial position; the first speed of the motor when it passes the detection position is obtained; when the first speed is greater than the preset speed, the motor is controlled to decelerate according to a second acceleration, wherein the absolute value of the second acceleration is greater than the absolute value of the first acceleration, so that the speed of the motor when it reaches the initial position is 0. This ensures the stability of the motor movement and avoids problems such as overshoot or abnormal noise caused by excessive speed when the blood cell analyzer needs to stop immediately, thereby ensuring the stable detection of the blood cell analyzer. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] in:
[0047] Figure 1A This is a flowchart of the motor motion control method in the first embodiment of the present invention;
[0048] Figure 1B This is a flowchart of the motor motion control method in the first embodiment of the present invention;
[0049] Figure 2 This is a flowchart of step S102 in the first embodiment of the present invention;
[0050] Figure 3 This is a flowchart of the motor motion control method in the second embodiment of the present invention;
[0051] Figure 4 This is a flowchart of the motor motion control method in the third embodiment of the present invention;
[0052] Figure 5 This is a flowchart of the motor motion control method in the fourth embodiment of the present invention;
[0053] Figure 6 This is a flowchart of the motor motion control method in the fifth embodiment of the present invention. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] Please refer to the following: Figure 1A This is a flowchart of the motor motion control method in the first embodiment of the present invention. Specifically, the motor motion control method provided in this embodiment includes the following steps.
[0056] Step S101: When the motor needs to be reset, a reset command is generated. In this embodiment, the motor is used to transport the blood sample for testing; please refer to the relevant documentation for details. Figure 1B When the motor moves to any of the following positions—current position 11, current position 12, current position 13, current position 14, current position 15, current position 16, or current position 17—after completing the sample detection task, the motor needs to be reset for the next round of detection. At this time, the motor needs to be reset, generating a reset command.
[0057] Step S102: Calculate the first acceleration based on the reset command and the motor's current position. The first acceleration is the acceleration of the motor as it decelerates from the calibration position to the initial position. The distance between the calibration position and the initial position is less than the distance between the current position and the initial position. In this embodiment, to ensure the efficiency of blood detection, the reset speed of the motor varies depending on its position during reset. The first acceleration is calculated based on the reset command and the motor's current position. The current position is determined, and the distance the motor needs to confirm is obtained based on the current position. The first acceleration is then calculated based on this distance. Please refer to steps S1021-S1024 for details.
[0058] Step S103: Determine the preset speed at which the motor reaches the detection position based on the first acceleration. The detection position is located between the calibration position and the initial position. In this embodiment, the first acceleration is the acceleration calculated based on the current position, at which the speed is 0 when reaching the initial position. The distance between the calibration position and the initial position is constant, and the speed at which the motor reaches the detection position is calculated based on the first acceleration.
[0059] Step S104: Obtain the first speed of the motor when it passes the detection position. In this embodiment, the first speed of the motor when it passes the detection position is obtained by a speed sensor set at the detection position.
[0060] Step S105: When the first speed is greater than the preset speed, the motor is controlled to decelerate according to the second acceleration, wherein the absolute value of the second acceleration is greater than the absolute value of the first acceleration, so that the motor speed is 0 when it reaches the initial position. In this embodiment, when the first speed is greater than the preset speed, the motor cannot decelerate to 0 when it reaches the initial position, which may cause an impact. Therefore, when the first speed is greater than the preset speed, the motor is controlled to decelerate with a greater acceleration to ensure that the motor speed is 0 when it reaches the initial position. This ensures that the motor can stop smoothly, thereby maintaining the stability of the blood testing equipment.
[0061] The embodiments of the present invention have the following beneficial effects: When the motor needs to be reset, a reset command is generated; a first acceleration is calculated based on the reset command and the current position of the motor. The first acceleration is the acceleration of the motor decelerating from the calibration position to the initial position, and the distance between the calibration position and the initial position is less than the distance between the current position and the initial position. In this embodiment, calculating the first acceleration ensures that the motor resets smoothly, and the change in movement speed is stable. During the motor movement, the motor is less prone to step loss and overshoot, thereby ensuring that blood samples are tested in an orderly manner. Further, a preset speed is determined based on the first acceleration when the motor reaches the detection position, which is located between the calibration position and the initial position; the first speed of the motor when it passes the detection position is obtained; when the first speed is greater than the preset speed, the motor is controlled to decelerate according to a second acceleration, wherein the absolute value of the second acceleration is greater than the absolute value of the first acceleration, so that the speed of the motor when it reaches the initial position is 0. This ensures the stability of the motor movement and avoids problems such as overshoot or abnormal noise caused by excessive speed when the blood cell analyzer needs to stop immediately, thereby ensuring the stable detection of the blood cell analyzer.
[0062] Please refer to the following: Figure 2 This is a flowchart of step S102 in the first embodiment of the present invention. Step S102 involves calculating a first acceleration based on a reset command and the current position of the motor. Specifically, it includes the following steps.
[0063] Step S1021: Obtain the initial number of steps required for the motor to move to the initial position based on the current position. Please refer to [link / reference needed]. Figure 1B Specifically, the current position is 11 as shown in the figure, that is, the sample is placed at the current position 11. At this time, the initial number of motion steps CurPos required for the motor to move to the initial position is obtained based on the current position 11.
[0064] Step S1022: Add a preset increment to the initial number of steps to obtain the first number of steps. Specifically, the initial number of steps is the number of steps set at the current position 11, plus a small increment MinStep to obtain the first number of steps CurStep. This prevents the motor from failing to reach the initial position due to missed steps during the movement process.
[0065] Step S1023: The distance for uniform motion is obtained based on the first number of motion steps (CurStep) and the calibration position. Specifically, the distance for uniform motion of the sample is calculated based on the first number of motion steps (CurStep) and the calibration position, thus ensuring the efficiency of sample detection.
[0066] Step S1024: Obtain the distance for deceleration based on the distance traveled during uniform motion. Specifically, after the motor has been moving at a constant speed for a period of time, in this embodiment, the current distance traveled at the constant speed is 1 meter.
[0067] Step S1025: Obtain the first acceleration based on the distance of the deceleration motion. Specifically, after the motor has moved 1 meter, deceleration begins to ensure that the motor's speed is 0 when it reaches the initial position, thus reducing instrument vibration caused by motor overshoot.
[0068] Please refer to the following: Figure 3 This is a flowchart of the motor motion control method in the second embodiment of the present invention. The difference between the motor motion control method provided in the second embodiment and the motor motion control method provided in the first embodiment is that, before generating the reset command, the motor motion control method provided in the second embodiment further includes the following steps.
[0069] Step S301: Control the motor to perform a reset operation at a preset reset speed according to the power-on command.
[0070] Step S302: Determine whether to acquire the initial position signal of the motor.
[0071] Step S303: When the initial position signal is obtained, control the motor to perform a braking operation.
[0072] In this embodiment, when the blood analyzer is powered on, it first performs a reset operation at an extremely slow speed, for example, 0.1 meters per second. At this speed, the motor movement of the blood analyzer can be braked at any time without causing abnormal noise due to overshoot. Therefore, when the sensor at the initial position detects that the motor has reached the initial position, it will brake directly without the need for additional deceleration. This embodiment ensures that the motor is in the initial position before it starts moving, preventing overshoot caused by incorrect initial position and other situations that may cause machine vibration, thus ensuring stable motor operation.
[0073] Please refer to the following: Figure 4 This is a flowchart of the motor motion control method in the third embodiment of the present invention. The difference between the motor motion control method provided in the third embodiment and the motor motion control method provided in the first embodiment is that, before controlling the motor to perform a reset operation at a preset reset speed according to the power-on command, the motor motion control method provided in the third embodiment further includes the following steps.
[0074] Step S401: Obtain the current position of the motor.
[0075] Step S402: When the current position is not obtained, set the motor's reset movement step count to the maximum movement step count.
[0076] Step S403: Based on the maximum number of steps, control the motor to perform a reset operation.
[0077] In this embodiment, before each movement operation, the distance the motor needs to travel needs to be confirmed. Specifically, this is done by using a sensor to acquire the current position. The sensor detects whether the motor is currently in its current position, thus determining the distance the motor needs to travel and ultimately determining the time required for the entire reset process. However, in some cases, such as when the sensor malfunctions and cannot detect the motor's current position, a maximum distance the motor can travel is set, for example, 1 meter. This ensures that the motor will always return to its initial position after the reset, guaranteeing accurate position calculation during subsequent motor use and ensuring stable motor operation.
[0078] Please refer to the following: Figure 5 This is a flowchart of the motor motion control method in the fourth embodiment of the present invention. The difference between the motor motion control method provided in the fourth embodiment and the motor motion control method provided in the first embodiment is that when the first speed is less than the preset speed, the motor motion control method provided in the fourth embodiment further includes the following steps.
[0079] Step S501: Obtain the remaining number of motion steps for the motor.
[0080] Step S502: Obtain the number of compensation steps based on the first acceleration.
[0081] Step S503: Obtain the current number of steps based on the remaining number of steps and the compensation steps.
[0082] Step S504: Control the motor to decelerate according to the current number of steps and the first acceleration.
[0083] In this embodiment, the motor may lose steps during actual movement. Therefore, the remaining number of steps of the motor is obtained, and the compensation step number is obtained according to the first acceleration to ensure that the current number of steps is greater than the actual movement distance of the motor. This ensures that the motor can stop at the initial position and will not further adjust the current acceleration. This ensures that the motor can accurately stop at the initial position while maintaining its working efficiency.
[0084] Please refer to the following: Figure 6 This is a flowchart of the motor motion control method in the fifth embodiment of the present invention. The difference between the motor motion control method provided in the fifth embodiment and the motor motion control method provided in the first embodiment is that when the motor needs to move, a motion command is generated. The motion command includes the motion direction and the number of motion steps. The motion direction includes a first direction and a second direction. The fifth embodiment also includes the following steps for controlling the motor to move according to the motion command.
[0085] Step S601: Obtain the current position to which the motor will move based on the number of steps.
[0086] Step S602: Control the motor to move to the current position.
[0087] Step S603: When the current position is detected as an arrival signal, control the motor to stop moving.
[0088] In this embodiment, all motor movements are determined by the direction of movement and the number of steps. Therefore, during the movement, it is necessary to obtain the current position that the motor will reach based on the number of steps before controlling the motor to move to the current position. This ensures the stability of the motor movement and prevents overshoot. When the arrival signal of the current position is obtained, the motor is controlled to stop moving. In other words, while ensuring the motor's running speed, it is ensured that the motor can accurately stop at the designated current position to receive the blood sample to be tested, thus ensuring the efficiency of the motor in the testing process.
[0089] This invention also provides a motor 10, which has an initial position 11, a detection position 12, a calibration position 13, and a current position 14. The initial position 11, detection position 12, calibration position 13, and current position 14 are sequentially arranged below the motor's motion guide rail 21, and a sensor (not shown) is provided therein. Please refer to [the relevant documentation / reference]. Figure 1B The sensor is located in the groove at any of the following current positions: current position 141, current position 142, current position 143, current position 144, current position 145, current position 146, current position 147, etc.
[0090] Furthermore, the sensor is an optocoupler sensor. Specifically, an optocoupler sensor is a device that converts optical signals into electrical signals. Its working principle is based on the photoelectric effect. The photoelectric effect refers to the phenomenon where, when light shines on certain materials, the electrons in the material absorb the energy of the photons, resulting in a corresponding electrical effect. Based on different phenomena, the photoelectric effect is divided into three categories: external photoelectric effect, internal photoelectric effect, and photovoltaic effect. Optoelectronic devices include phototubes, photomultiplier tubes, photoresistors, photodiodes, phototransistors, and photovoltaic cells, etc.
[0091] In some feasible embodiments, a sensor with corresponding functions may also be selected and placed at a designated location.
[0092] Specifically, the sensor at current position 11 is used to detect the current position on the guide rail. The sensor at calibration position 12 is used to acquire the reset speed of the motor when it passes the calibration position. The sensor at detection position 13 is used to detect the first speed of the motor when it reaches the detection position.
[0093] The motor 10 also includes a processor (not shown), which is connected to the sensor and is used to perform the steps described above.
[0094] In this embodiment, the processor processes an executable program stored in the memory, wherein the memory includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory may be an internal storage unit of the computer device 900, such as the hard disk of the computer device 900. In other embodiments, the memory may be an external storage device of the computer device 900, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device 900. Furthermore, the memory may include both internal storage units and external storage devices of the computer device 900. The memory can be used not only to store application software and various types of data installed on the computer device 900, such as computer programs for motor motion control methods, but also to temporarily store data that has been output or will be output, such as data generated by the execution of motor motion control methods. In some feasible embodiments, the processor 920 may be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0095] The motor 10 also includes a sampling needle fixing assembly 31, which is located below the guide rail 21 and is used to fix the sample to be tested.
[0096] The motor 10 also includes a motor pulley 41 for controlling the movement of the motor.
[0097] Specifically, the processor executes a computer program for a method of controlling the motion of the motor to control the motor 10 and achieve motion control.
[0098] In some feasible embodiments, the calibration position 13 is located between the detection position and the current position 14 of 12, and closer to the detection position. This minimizes the distance the motor decelerates, increases the uniform speed distance of the motor during operation, and enables the motor to move efficiently, further ensuring the operating efficiency of the detection instrument.
[0099] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program causes the processor to perform the steps of any of the methods described above. Specifically, the program may be stored in a non-volatile computer-readable storage medium. When executed, the program may include the processes described in the embodiments of the methods above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0100] Furthermore, the method according to the present invention can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the above-described method of the present invention.
[0101] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0102] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for controlling the motion of an electric motor, characterized in that, The method includes: When the motor needs to be reset, a reset command is generated; The first acceleration is calculated based on the reset command and the current position of the motor. The first acceleration is the acceleration of the motor decelerating from the calibration position to the initial position. The first acceleration is calculated based on the current position, and the acceleration is 0 when the speed reaches the initial position. The distance between the calibration position and the initial position is less than the distance between the current position and the initial position. The preset speed at which the motor reaches the detection position is determined based on the first acceleration, and the detection position is located between the calibration position and the initial position. Obtain the first speed of the motor when it passes the detection position; When the first speed is greater than the preset speed, the motor is controlled to decelerate according to the second acceleration, wherein the absolute value of the second acceleration is greater than the absolute value of the first acceleration, so that the speed of the motor when it reaches the initial position is 0.
2. The motion control method for a motor according to claim 1, characterized in that, The calculation of the first acceleration based on the reset command and the current position of the motor specifically includes: The initial number of steps required for the motor to move to the initial position is obtained based on the current position. Add a preset number of steps to the initial number of steps to obtain the first number of steps; The distance of uniform motion is obtained based on the first number of steps and the calibration position; The distance for deceleration is obtained from the distance of the uniform motion; and, The first acceleration is obtained based on the distance of the deceleration motion.
3. The motion control method for a motor according to claim 1, characterized in that, Before generating the reset instruction, the following is also included: The motor is controlled to perform a reset operation at a preset reset speed according to the power-on command; Determine whether to acquire the initial position signal of the motor; and, When the initial position signal is received, the motor is controlled to perform a braking operation.
4. The motion control method for a motor according to claim 3, characterized in that, Before controlling the motor to perform a reset operation at a preset reset speed according to the power-on command, the following steps are included: Obtain the current position of the motor; When the current position is not obtained, the reset step count of the motor is set to the maximum number of steps; and, Based on the maximum number of steps taken, the motor is controlled to perform a reset operation.
5. The motion control method for a motor according to claim 1, characterized in that, The method further includes, specifically, when the first speed is less than the preset speed: Obtain the remaining number of steps of the motor; The number of compensation steps is obtained based on the first acceleration; The current number of steps is obtained based on the remaining number of steps and the compensation steps; and, The motor is controlled to decelerate based on the current number of steps and the first acceleration.
6. The motion control method for a motor according to claim 1, characterized in that, The method further includes: When the motor needs to move, a motion command is generated, which includes the direction of movement and the number of steps. The direction of movement includes a first direction and a second direction. The current position to which the motor will move is obtained based on the number of steps taken. Control the motor to move to the current position; and, When the current position is detected as the arrival signal, the motor is controlled to stop moving.
7. An electric motor, characterized in that, The motor is equipped with an initial position, a detection position, a calibration position, and a current position. The initial position, the detection position, the calibration position, and the current position are sequentially located below the motor's motion guide rail, and sensors are installed thereon. in: The sensor at the current position is used to detect the position of the current position on the guide rail; The sensor at the calibration position is used to obtain the reset speed of the motor when it passes the calibration position; The sensor for detecting the detection position is used to detect the first speed of the motor when it reaches the detection position; and, The motor further includes a processor connected to the sensor for performing the steps of the method as described in any one of claims 1 to 6.
8. The motor according to claim 7, characterized in that, The calibration position is located between the detection position and the current position, and closer to the side of the detection position.
9. The motor according to claim 7 or 8, characterized in that, The sensor is an optocoupler sensor.
10. A computer-readable storage medium, characterized in that, The device stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Motor reset control method and device, storage medium and transmission apparatus
CN109391190A
Method for driving sensorless motor
CN110291712A