Motor control method and device, electronic equipment and computer readable storage medium
By monitoring the working condition type of the label printer motor and generating a sub-segment control strategy for different abnormal working conditions, the problem that motor control in the prior art is difficult to adapt to actual working conditions, and more stable and flexible motor operation is achieved.
Patent Information
- Application Number
- CN202411822073.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-25
Smart Images

Figure CN119696423A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor technology, and in particular to a motor control method, device, electronic device and computer-readable storage medium. Background Art
[0002] In recent years, with the widespread application of label printers in many industries, the effective control of label printer motors has attracted more and more attention. Usually, the control of label printer motors is carried out by using a fixed motor subdivision number, which is difficult to adapt to the actual working conditions of the motor. Summary of the invention
[0003] Embodiments of the present application provide a motor control method, device, electronic device, and computer-readable storage medium.
[0004] In a first aspect, an embodiment of the present application provides a motor control method, the method comprising:
[0005] Monitoring the motor operating condition type of the target motor corresponding to the label printer, and when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generating a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type;
[0006] Based on the target motor subdivision number control strategy, generate a motor pulse control signal for the target motor;
[0007] The motor pulse control signal is used to control the target motor to execute the target motor subdivision number control strategy.
[0008] Optionally, when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generating a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type includes:
[0009] When the motor abnormal operating condition type of the target motor is a motor torque shortage type, determining first matching torque information of the target motor for the target label paper, and first motor subdivision number information matched by the first matching torque information;
[0010] Based on the first matching torque information and the first motor subdivision number information, a first target motor subdivision number control strategy is determined.
[0011] Optionally, determining the first matching torque information of the target motor for the target label paper includes:
[0012] Get the label paper information of the target label paper;
[0013] Determine a preset printing speed corresponding to the label printer, and determine a target motor speed of the target motor based on the preset printing speed;
[0014] Based on the target motor speed and the label paper information, first matching torque information of the target motor for the target label paper is determined.
[0015] Optionally, the acquiring label paper information of the target label paper includes:
[0016] Determine label paper information of the target label paper based on at least one of the first label paper information acquisition method, the second label paper information acquisition method, and the third label paper acquisition method;
[0017] Among them, the first label paper information acquisition method is to acquire the label paper information of the target label paper sent by the terminal; the second label paper information is to determine the input information for the target label paper received by the label printer, and determine the label paper information of the target label paper based on the input information; the third label paper acquisition method is to identify the wireless radio frequency identification element corresponding to the target label paper to obtain an information recognition result, and determine the label paper information of the target label paper based on the information recognition result.
[0018] Optionally, when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generating a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type includes:
[0019] When the motor abnormal working condition type of the target motor is the motor temperature rise abnormal type, determining the current motor subdivision number information and the current pulse duty cycle information corresponding to the target motor;
[0020] Determine second matching torque information of the target motor for the target label paper;
[0021] Performing a first motor subdivision number increasing process on the current motor subdivision number information to obtain second motor subdivision number information, and performing a first pulse duty cycle increasing process on the current pulse duty cycle information to obtain first pulse duty cycle information, so that the target torque information corresponding to the target motor matches the second matching torque information;
[0022] Based on the second motor subdivision number information and the first pulse duty cycle information, a second target motor subdivision number control strategy is determined.
[0023] Optionally, the method further comprises:
[0024] monitoring a motor temperature of the target motor, and determining a temperature increase rate corresponding to the target motor based on the motor temperature;
[0025] When the temperature increase rate is greater than or equal to a preset temperature increase rate, it is determined that the abnormal motor operating condition type of the target motor is a motor temperature rise abnormality type.
[0026] Optionally, when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generating a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type includes:
[0027] When it is determined that the motor abnormal operating condition type of the target motor is the motor noise decibel abnormal type, current motor subdivision number information and current pulse duty cycle information corresponding to the target motor are determined;
[0028] Determining third matching torque information of the target motor for the target label paper;
[0029] Performing a second motor subdivision number increasing process on the current motor subdivision number information to obtain a third motor subdivision number information, and performing a second pulse duty cycle increasing process on the current pulse duty cycle information to obtain a second pulse duty cycle information, so that the target torque information corresponding to the target motor matches the third matching torque information;
[0030] Based on the third motor subdivision number information and the second pulse duty cycle information, a third target motor subdivision number control strategy is determined.
[0031] Optionally, the method further comprises:
[0032] The motor operation decibel value of the target motor is monitored, and when the motor operation decibel value is greater than or equal to a preset motor operation decibel value, it is determined that the abnormal motor operating condition type of the target motor is a motor noise decibel abnormal type.
[0033] Optionally, the method further comprises:
[0034] Receiving a reference motor subdivision control strategy for the target motor;
[0035] Based on the reference motor subdivision control strategy, generating a reference motor pulse control signal for the target motor;
[0036] The reference motor pulse control signal is used to control the target motor to execute the reference motor subdivision control strategy.
[0037] Optionally, the target motor includes a first winding coil and a second winding coil, the first winding coil is equipped with a first positive pin and a first negative pin, and the second winding coil is equipped with a second positive pin and a second negative pin; the motor pulse control signal for the target motor is generated based on the target motor subdivision control strategy, including:
[0038] Generate a first group of motor drive signals and a second group of motor drive signals that are mutually related based on the target motor subdivision number control strategy;
[0039] Wherein, the first group of motor drive signals includes a first sinusoidal pulse width modulation signal and a third sinusoidal pulse width modulation signal, the first sinusoidal pulse width modulation signal and the third sinusoidal pulse width modulation signal are complementary, the first sinusoidal pulse width modulation signal is used to access the first positive pin, and the third sinusoidal pulse width modulation signal is used to access the first negative pin;
[0040] The second group of motor drive signals includes a second sinusoidal pulse width modulation signal and a fourth sinusoidal pulse width modulation signal, the second sinusoidal pulse width modulation signal and the fourth sinusoidal pulse width modulation signal are complementary, the second sinusoidal pulse width modulation signal is used to connect to the second positive pin, and the fourth sinusoidal pulse width modulation signal is used to connect to the second negative pin;
[0041] The first sinusoidal pulse width modulated signal and the second sinusoidal pulse width modulated signal are orthogonal.
[0042] In a second aspect, an embodiment of the present application provides a motor control device, the device comprising:
[0043] A monitoring module, adapted to monitor the motor operating condition type of the target motor corresponding to the label printer, and when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generate a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type;
[0044] A motor pulse control signal generating module, adapted to generate a motor pulse control signal for the target motor based on the target motor subdivision number control strategy;
[0045] The motor control module is adapted to control the target motor to execute the target motor subdivision number control strategy by utilizing the motor pulse control signal.
[0046] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0047] Processor; and
[0048] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of the above.
[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, implement any of the methods described above.
[0050] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least: when the motor operating condition type of the target motor is monitored as the abnormal motor operating condition type, a target motor subdivision control strategy corresponding to the abnormal motor operating condition type is generated, and then a motor pulse control signal corresponding to the target motor subdivision control strategy is generated, so as to use the motor pulse control signal to control the target motor to execute the target motor subdivision control strategy, thereby controlling the target motor to escape from the abnormal motor operating condition type by adjusting the motor subdivision number, and restoring the normal motor operating condition type, so as to make the target motor work normally. The embodiment provided by the present application can adaptively adjust the control strategy of the target motor according to the corresponding abnormal motor operating condition type, greatly improving the flexibility and adaptability of the operation of the target motor in the label printer, thereby solving the technical problem that the control of the label printer motor is controlled by a fixed motor subdivision number, which is difficult to adapt to the actual working condition of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] 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, the drawings described below are only some embodiments of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A schematic diagram of a flow chart of a motor control method provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a flow chart of generating a target motor subdivision number control strategy corresponding to an abnormal motor operating condition type provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of a process for determining first matching torque information of a target motor for a target label paper provided in an embodiment of the present application;
[0055] Figure 4 A flow chart of a control strategy for determining a target motor subdivision number corresponding to an abnormal motor operating condition type provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of a flow chart for determining that the abnormal motor operating condition type of a target motor is a motor temperature rise abnormality type provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of a flow chart of another control strategy for determining a target motor subdivision number corresponding to an abnormal motor operating condition type provided in an embodiment of the present application;
[0058] Figure 7A flowchart of another motor control method provided in an embodiment of the present application;
[0059] Figure 8 A schematic diagram of a motor pulse control signal corresponding to the motor four-subdivision coefficient control provided in an embodiment of the present application;
[0060] Fig. 9 A schematic diagram of a motor subdivision coefficient corresponding to a control SPWM A+ signal provided in an embodiment of the present application;
[0061] Fig.10 A schematic diagram of controlling the motor speed corresponding to the target motor based on the SPWM A+ signal provided in an embodiment of the present application;
[0062] Fig.11 A schematic diagram of controlling the motor torque corresponding to the target motor based on the SPWM A+ signal provided in an embodiment of the present application;
[0063] Fig.12 A schematic diagram of the structure of a motor control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the embodiments of the present application.
[0065] In the related art, the performance of the motor in the label printer will directly affect the printing speed and printing quality of the label printer. The general motor drive scheme usually adopts the high and low levels of the same frequency to simulate non-subdivision or two-division. In the case of non-subdivision, the step angle of the motor is fixed, and each step pulse corresponds to a fixed step angle; in the case of two-division, the step angle of the motor is subdivided into smaller step angles. The subdivision method of the motor in the related art is fixed and difficult to adjust. This causes the motor to generate large noise and significant temperature rise during operation, and the running stability is insufficient. This situation not only affects the user's printing experience when using the label printer, but may also cause the failure of the label printer and the decline in printing quality. In addition, with the continuous improvement of the market's requirements for printing quality and efficiency, the supporting motor control method can no longer meet the current use requirements of label printers. Therefore, it is necessary to develop a new motor control method to overcome the technical problem that the control of the label printer motor in the related art adopts a fixed motor subdivision number for control, which is difficult to adapt to the actual working conditions of the motor.
[0066] To solve related technical problems, please refer to Figure 1 , Figure 1 A flowchart of a motor control method provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be an electronic device that executes the motor control method (such as a label printer with a target motor), or a processor in an electronic device that executes the motor control method, or a motor control service in an electronic device that executes the motor control method. For the convenience of description, the specific execution process of the motor control method is introduced below by taking the execution subject being a processor in an electronic device as an example. Figure 1 As shown, the motor control method includes:
[0067] S102: monitoring the motor operating condition type of the target motor corresponding to the label printer, and when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generating a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type.
[0068] The motor working condition of the target motor corresponding to the label printer is monitored to determine the motor working condition type of the target motor, and the motor working condition type of the target motor includes a normal motor working condition type and an abnormal motor working condition type. When the target motor is in the normal motor working condition type, the target motor works normally; when the target motor is in the abnormal motor working condition type, the target motor works abnormally.
[0069] Abnormal motor operating conditions include but are not limited to insufficient motor torque, abnormal motor temperature rise, abnormal motor noise decibel, etc. When the target motor is in the insufficient motor torque type, the torque output by the target motor is difficult to drive the target label paper in the label printer to move; when the target motor is in the abnormal motor temperature rise type, the temperature rise rate of the target motor is too fast, which may easily cause damage to the components in the target motor; when the target motor is in the abnormal motor noise decibel type, the operating decibel value of the target motor is too high, which may easily accelerate the wear and aging of the target motor and affect the user experience.
[0070] Therefore, when it is determined that the motor operating condition type of the target motor is an abnormal motor operating condition type, a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type is generated. The target motor subdivision number control strategy includes but is not limited to matching torque information, motor subdivision number information and motor speed information corresponding to the abnormal motor operating condition type. The matching torque information includes the motor torque that the target motor should output to match the corresponding target label paper, the motor subdivision number information includes the target motor subdivision number that the target motor should adjust for the target label paper, and the motor speed information includes the target motor speed that the target motor should adjust for the target label paper.
[0071] Based on the matching torque information, the motor torque can be controlled to improve the printing stability of the label printer; based on the motor subdivision number information, the motor control accuracy can be adjusted, effectively reducing the vibration during operation and thus improving the printing quality. This subdivision control method enables the target motor to maintain stable operation under different load conditions and adapt to various printing tasks; based on the motor speed information, the motor speed of the target motor can be accurately controlled, which has the advantages of smoother acceleration and deceleration and less noise than traditional solutions.
[0072] S104: Generate a motor pulse control signal for the target motor based on the target motor subdivision number control strategy.
[0073] Among them, after determining the target motor subdivision control strategy, the target motor subdivision control strategy is used to generate a motor pulse control signal for the target motor. Specifically, the motor subdivision information in the target motor subdivision control strategy can be used to adjust the current motor pulse control signal to generate a motor pulse control signal for the target motor. It is easy to understand that when the motor is controlled based on the motor subdivision, the corresponding motor speed information and matching torque information are also required to cooperate. Therefore, the current motor pulse control signal is actually adjusted synchronously using the motor subdivision information, motor speed information and matching torque information in the target motor subdivision control strategy.
[0074] When adjusting the current motor pulse control signal according to the motor subdivision information in the target motor subdivision control strategy, since the motor subdivision degree is determined by the approximate degree of the duty cycle of the SPWM (sine pulse width modulation) signal according to the sine wave change, more subdivisions of the target motor can be achieved by adjusting the approximate degree of the SPWM pulse duty cycle according to the sine wave change. The flexible setting of the subdivision number in the motor subdivision information can not only improve the accuracy of motor control, but also effectively reduce the vibration of the target motor during operation and improve the printing quality. This subdivision control method enables the target motor to maintain stable operation under different load conditions, thereby adapting to various printing tasks.
[0075] For example, for a subdivision coefficient of 0 (no subdivision), the target motor takes 4 full steps in one sinusoidal cycle. If different subdivision coefficients are to be achieved, this can be achieved by changing the number of SPWM signal pulses in the sinusoidal cycle. If one pulse represents one step of the target motor, when the motor subdivision coefficient is 4, it means that the motor takes 4x4=16 steps in one sinusoidal cycle, that is, there are 16 SPWM pulses in one sinusoidal cycle, and the number of motor subdivisions is 16 at this time; when the motor subdivision coefficient of the motor is 16, it means that the motor takes 4x16=64 steps in one sinusoidal cycle, that is, there are 64 SPWM pulses in one sinusoidal cycle, and the number of motor subdivisions is 64 at this time. Therefore, if there is no subdivision, the target motor takes N full steps in one sinusoidal cycle. When the subdivision coefficient is M, the SPWM pulses are NxM at this time, and the number of motor subdivisions is NxM at this time.
[0076] When the current motor pulse control signal is adjusted according to the motor speed information in the target motor subdivision control strategy, the motor speed is determined by the SPWM frequency, and the motor speed corresponding to the target motor is controlled by adjusting the SPWM frequency, that is, the printing speed is controlled. For example, the higher the frequency of the SPWM pulse, the more SPWM pulses there are in the same cycle, and the faster the motor speed corresponding to the target motor is.
[0077] When adjusting the current motor pulse control signal according to the matching torque information in the target motor subdivision control strategy, since the motor torque corresponding to the target motor is related to the duty cycle of the SPWM pulse, the larger the SPWM pulse duty cycle, the larger the torque of the target motor. Since the SPWM pulse duty cycle must satisfy the sinusoidal law, when the motor torque is modified, the SPWM pulse duty cycle changes proportionally as a whole. Here, the pulse duty cycle refers to the proportion of the high level in a pulse cycle. Therefore, the maximum duty cycle corresponding to the pulse can be adjusted accordingly, and other pulse duty cycles can be adjusted proportionally with reference to the adjustment ratio of the maximum duty cycle to set the motor torque. The motor torque is proportional to the pulse duty cycle. If the pulse duty cycle increases by N times, the motor torque will also increase by N times.
[0078] S106: Using the motor pulse control signal, control the target motor to execute the target motor subdivision control strategy.
[0079] Among them, after generating a motor pulse control signal for the target motor based on the target motor subdivision control strategy, the motor pulse control signal is input to the target motor to control the target motor to execute the target motor subdivision control strategy, thereby controlling the target motor to escape from the abnormal motor working condition type, and restore the motor normal working condition type, so that the target motor works normally. In addition, in the present embodiment, the target motor is electrically connected to the MCU (microcontroller unit) and the processor. In the actual control process, the processor obtains the motor operating parameters of the printer and is used to send a drive signal to the MCU. The PWM (pulse width modulation) module of the MCU generates a corresponding motor pulse control signal according to the motor operating parameters of the printer; the target motor receives the motor drive signal and operates under the control of the corresponding motor pulse control signal, so that the current and power consumption can be accurately controlled, the working efficiency of the target motor is improved, the energy loss is reduced, and the energy saving requirements can be effectively met.
[0080] In the embodiment provided by the present application, when the motor operating condition type of the target motor is monitored as the abnormal motor operating condition type, a target motor subdivision control strategy corresponding to the abnormal motor operating condition type is generated, and then a motor pulse control signal corresponding to the target motor subdivision control strategy is generated, so as to use the motor pulse control signal to control the target motor to execute the target motor subdivision control strategy, thereby controlling the target motor to escape from the abnormal motor operating condition type by adjusting the motor subdivision number, and restoring the normal motor operating condition type, so as to make the target motor work normally. The embodiment provided by the present application can adaptively adjust the control strategy of the target motor according to the corresponding abnormal motor operating condition type, greatly improving the flexibility and adaptability of the operation of the target motor in the label printer, thereby solving the technical problem that the control of the label printer motor adopts a fixed motor subdivision number for control, which is difficult to adapt to the actual working condition of the motor.
[0081] See also Figure 2 , Figure 2 A flow chart of a control strategy for generating a target motor subdivision number corresponding to an abnormal motor operating condition type provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, when it is determined in S102 that the motor operating condition type of the target motor is the motor abnormal operating condition type, a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type is generated, including:
[0082] S202: When the abnormal motor operating condition type of the target motor is insufficient motor torque type, determine first matching torque information of the target motor for the target label paper and first motor subdivision number information matched by the first matching torque information.
[0083] Among them, when the abnormal motor operating condition type of the target motor is the insufficient motor torque type, it indicates that the motor torque corresponding to the target motor is difficult to drive the corresponding target label paper at this time. It can be determined by monitoring whether the target label paper can maintain movement when the target motor is outputting motor torque. When the target label paper is difficult to maintain movement when the target motor is outputting motor torque, it indicates that the abnormal motor operating condition type of the target motor is the insufficient motor torque type.
[0084] When it is determined that the abnormal motor operating condition type of the target motor is insufficient motor torque type, it indicates that the current motor subdivision number is too large. At this time, the first matching torque information of the target motor for the target label paper can be determined, and then the current motor subdivision number is gradually reduced to determine the first motor subdivision number information corresponding to the first matching torque information, so that the motor torque corresponding to the target motor can drive the target label paper to move according to the target motor speed in the pre-set motor speed information, and the motor subdivision number corresponding to the first motor subdivision number information is less than the current motor subdivision number of the target motor.
[0085] S204: Determine a first target motor subdivision control strategy based on the first matching torque information and the first motor subdivision information.
[0086] After the first matching torque information and the first motor subdivision number information are determined, a first target motor subdivision number control strategy is determined based on the first matching torque information, the first motor subdivision number information and the pre-set motor speed information.
[0087] In the embodiment provided in the present application, when the abnormal motor operating condition type of the target motor is the insufficient motor torque type, the first matching torque information and the first motor subdivision number information of the target motor for the target label paper are determined, and then a control strategy for the first target motor subdivision number is generated, so that the motor torque is adjusted based on the first motor subdivision number information through matching motor subdivision numbers and motor torque, so that the target motor can smoothly drive the target label paper to move during the printing process of the label printer.
[0088] See also Figure 3 , Figure 3 A schematic diagram of a process for determining the first matching torque information of a target motor for a target label paper provided in an embodiment of the present application. Figure 3 As shown, determining the first matching torque information of the target motor for the target label paper in S202 includes:
[0089] S302: Acquire label paper information of target label paper.
[0090] The step of obtaining the label paper information of the target label paper in S302 includes:
[0091] Determine label paper information of the target label paper based on at least one of the first label paper information acquisition method, the second label paper information acquisition method, and the third label paper acquisition method;
[0092] Among them, the first label paper information acquisition method is to obtain the label paper information of the target label paper sent by the terminal; the second label paper information is to determine the input information for the target label paper received by the label printer, and determine the label paper information of the target label paper based on the input information; the third label paper acquisition method is to identify the wireless radio frequency identification element corresponding to the target label paper to obtain the information recognition result, and determine the label paper information of the target label paper based on the information recognition result.
[0093] Exemplarily, the first label paper information acquisition method may specifically be: the user enters the label paper information such as the width, thickness, and surface paper material of the target label paper in the software corresponding to the label printer in the terminal (such as a mobile phone, computer, tablet, smart watch, etc.). The second label paper information acquisition method may specifically be: the user manually enters the label paper information such as the width, thickness, and surface paper material of the target label paper on the label printer. The third label paper information acquisition method may specifically be: a wireless radio frequency identification element is provided on the target label paper. When the label printer is turned on, it will automatically identify the wireless radio frequency identification element on the target label paper to obtain an information identification result, and the information identification result is parsed to obtain the label paper information of the target label paper. The wireless radio frequency identification element on the target label paper carries the label paper information of the target label paper, and the label paper information includes the width, thickness, and surface paper material of the target label paper. The wireless radio frequency identification element includes but is not limited to an RFID (Radio Frequency Identification) element, which can realize contactless data communication to transmit information.
[0094] S304: Determine a preset printing speed corresponding to the label printer, and determine a target motor speed of the target motor based on the preset printing speed.
[0095] Among them, the preset printing speed corresponding to the label printer can be the printing speed entered by the user in the software corresponding to the label printer in the terminal (such as a mobile phone, computer, tablet, smart watch, etc.), or it can be the printing speed entered manually by the user on the label machine.
[0096] After determining the preset printing speed corresponding to the label printer, since the movement of the target label paper is driven by the target motor, the target motor speed of the target motor corresponding to the preset printing speed can be determined based on the mapping relationship between the motor speed of the target motor and the corresponding printing speed of the label printer.
[0097] S306: Determine first matching torque information of the target motor for the target label paper based on the target motor speed and the label paper information.
[0098] Among them, after determining the label paper information such as the width, thickness, surface paper material of the target label paper, and determining the target motor speed, the first matching torque information of the target motor for the target label paper is determined by looking up the table. It should be noted that the manufacturer corresponding to the label printer has tested a large number of motor speeds and label paper information corresponding to the matching torque of each model of motor in the first testing phase, and pre-made the matching torque information corresponding to the matching torque. Therefore, the first matching torque information of the target motor for the target label paper can be directly determined by looking up the table, and under the motor torque corresponding to the first matching torque information, the label printer can drive the target label paper to move according to the preset printing speed.
[0099] In the embodiment provided in the present application, the label paper information of the target label paper is determined, and the target motor speed of the target motor is determined based on the preset printing speed corresponding to the label printer, and then the first matching torque information of the target motor for the target label paper is determined, so that under the motor torque corresponding to the first matching torque information, the label printer can drive the target label paper to move according to the preset printing speed.
[0100] See also Figure 4 , Figure 4 A flow chart of a control strategy for determining a target motor subdivision number corresponding to an abnormal motor operating condition type provided in an embodiment of the present application. Figure 4 As shown, when it is determined in S102 that the motor operating condition type of the target motor is the motor abnormal operating condition type, a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type is generated, including:
[0101] S402: When the abnormal motor operating condition type of the target motor is the abnormal motor temperature rise type, determine the current motor subdivision number information and the current pulse duty cycle information corresponding to the target motor.
[0102] When it is confirmed that the abnormal motor working condition type of the current target motor is the abnormal motor temperature rise type, it indicates that the temperature rise rate of the current target motor is too fast, which may easily cause damage to the components in the target motor. At this time, the current motor subdivision number information and the current pulse duty cycle information corresponding to the target motor are obtained to adjust the current motor subdivision number information and the current pulse duty cycle information, thereby ensuring that the motor torque can at least maintain the current level while controlling the temperature rise rate of the target motor to decrease.
[0103] It should be noted that, the larger the corresponding value of the motor subdivision number, the smaller the temperature rise rate of the target motor and the motor torque also decreases; conversely, the smaller the corresponding value of the motor subdivision number, the larger the temperature rise rate of the target motor and the motor torque also increases.
[0104] For example, see Figure 5 , Figure 5 A flow chart of determining that the abnormal operating condition type of a target motor is a motor temperature rise abnormality type is provided in an embodiment of the present application. Figure 5 As shown, the method for determining that the abnormal motor operating condition type of the target motor is the abnormal motor temperature rise type includes:
[0105] S502: Monitor the motor temperature of the target motor, and determine a temperature increase rate corresponding to the target motor based on the motor temperature.
[0106] The target motor is provided with a temperature sensor for monitoring temperature, and the motor temperature of the target motor can be monitored based on the temperature sensor, so as to determine the motor temperature corresponding to the target motor at each time point, and then the motor temperature change rate value of the target motor per unit time is calculated, so as to determine the motor temperature change rate. When the motor temperature of the target motor increases, the motor temperature change rate at this time is the temperature increase rate corresponding to the target motor.
[0107] S504: When the temperature increase rate is greater than or equal to a preset temperature increase rate, determining that the abnormal motor operating condition type of the target motor is a motor temperature rise abnormality type.
[0108] Among them, after determining the temperature rise rate, the temperature rise rate is compared with the preset temperature rise rate. When the temperature rise rate is greater than or equal to the preset temperature rise rate, it indicates that the temperature rise rate of the current target motor is too fast, which may easily cause damage to the components in the target motor. Therefore, the abnormal motor operating condition type of the target motor is determined to be the abnormal motor temperature rise type; when the temperature rise rate is less than the preset temperature rise rate, the abnormal motor operating condition type of the target motor is determined to be the normal motor temperature rise type.
[0109] S404: Determine second matching torque information of the target motor for the target label paper.
[0110] After determining label paper information such as width, thickness, and surface paper material of the target label paper, and determining the target motor speed of the target motor, the second matching torque information of the target motor for the target label paper is determined by looking up a table.
[0111] It should be noted that the manufacturer of the label printer has tested the matching torque of each model of motor corresponding to the motor speed and label paper information in the first test phase, and has pre-made the matching torque information corresponding to the matching torque. Therefore, the second matching torque information of the target motor for the target label paper can be directly determined by looking up the table. Under the motor torque corresponding to the second matching torque information, the label printer can drive the target label paper to move at the preset printing speed.
[0112] S406: Perform a first motor subdivision increase process on the current motor subdivision number information to obtain the second motor subdivision number information, and perform a first pulse duty cycle increase process on the current pulse duty cycle information to obtain the first pulse duty cycle information, so that the target torque information corresponding to the target motor matches the second matching torque information.
[0113] Among them, since the current target motor is in the abnormal motor temperature rise type, it indicates that the motor subdivision number corresponding to the current motor subdivision number information is small. Therefore, the current motor subdivision number information can be processed by increasing the first motor subdivision number to obtain the second motor subdivision number information. At this time, the motor subdivision number corresponding to the second motor subdivision number information is greater than the motor subdivision number corresponding to the first motor subdivision number information.
[0114] At the same time, as the motor subdivision number gradually increases, the motor torque will gradually decrease. In order to meet the motor torque corresponding to the second matching torque information, the current pulse duty cycle information can be processed by increasing the first pulse duty cycle to obtain the first pulse duty cycle information. The pulse duty cycle corresponding to the first pulse duty cycle information is greater than the pulse duty cycle corresponding to the current pulse duty cycle information.
[0115] By jointly adjusting the current motor subdivision number information and the current pulse duty cycle information, the target torque information currently corresponding to the target motor is matched with the second matching torque information. When the target torque information matches the second matching torque information, the motor torque corresponding to the target torque information can be slightly greater than or equal to the motor torque corresponding to the second matching torque information.
[0116] S408: Determine a second target motor subdivision control strategy based on the second motor subdivision information and the first pulse duty cycle information.
[0117] Among them, after determining the second motor subdivision number information and the first pulse duty cycle information, the second target motor subdivision number control strategy is determined based on the second motor subdivision number information, the first pulse duty cycle information and the pre-set motor speed information, so that the target motor can be free from the motor temperature rise abnormal type.
[0118] In the embodiment provided in the present application, when it is determined that the motor abnormal working condition type of the target motor is the motor temperature rise abnormal type, it indicates that the motor subdivision number corresponding to the current motor subdivision number information is small. Therefore, the current motor subdivision number information can be processed by increasing the first motor subdivision number to obtain the second motor subdivision number information. At the same time, as the motor subdivision number gradually increases, the motor torque will gradually decrease. In order to meet the motor torque corresponding to the second matching torque information, the current pulse duty cycle information can be processed by increasing the first pulse duty cycle to obtain the first pulse duty cycle information, so that the target torque information corresponding to the target motor matches the second matching torque information. Finally, the second target motor subdivision number control strategy is determined based on the second motor subdivision number information and the first pulse duty cycle information, and then the control is performed based on the second target motor subdivision number control strategy to reduce the heating of the target motor, reduce the temperature rise, and thus extend the service life of the motor and reduce the maintenance cost.
[0119] See also Figure 6 , Figure 6 A flow chart of another method for determining a target motor subdivision number control strategy corresponding to an abnormal motor operating condition type provided in an embodiment of the present application. Figure 6 As shown, when it is determined in S102 that the motor operating condition type of the target motor is the motor abnormal operating condition type, a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type is generated, including:
[0120] S602: When it is determined that the abnormal motor operating condition type of the target motor is the abnormal motor noise decibel type, current motor subdivision number information and current pulse duty cycle information corresponding to the target motor are determined.
[0121] Among them, the motor operation decibel value of the target motor is monitored. When the motor operation decibel value is greater than or equal to the preset motor operation decibel value, the abnormal motor operating condition type of the target motor is determined to be the motor noise decibel abnormal type; when the motor operation decibel value is less than the preset motor operation decibel value, the abnormal motor operating condition type of the target motor is determined to be the motor noise decibel normal type.
[0122] When the target motor is in the abnormal motor noise decibel type, it indicates that the noise generated by the target motor is large, which will cause poor user use and accelerate the wear and aging of parts in the target motor. In order to control the target motor to escape the abnormal motor noise decibel type, the current motor subdivision number information and current pulse duty cycle information corresponding to the target motor can be determined at this time.
[0123] S604: Determine third matching torque information of the target motor for the target label paper.
[0124] After determining label paper information such as width, thickness, and surface paper material of the target label paper, and determining the target motor speed of the target motor, the third matching torque information of the target motor for the target label paper is determined by looking up a table.
[0125] It should be noted that the manufacturer of the label printer has tested the matching torque of each model of motor corresponding to the motor speed and label paper information in the first test phase, and has pre-made the matching torque information corresponding to the matching torque. Therefore, the third matching torque information of the target motor for the target label paper can be directly determined by looking up the table, and under the motor torque corresponding to the third matching torque information, the label printer can drive the target label paper to move at the preset printing speed.
[0126] S606: Perform a second motor subdivision increase process on the current motor subdivision information to obtain the third motor subdivision information, and perform a second pulse duty cycle increase process on the current pulse duty cycle information to obtain the second pulse duty cycle information, so that the target torque information corresponding to the target motor matches the third matching torque information.
[0127] Among them, since the motor abnormal working condition type of the target motor is the motor noise decibel abnormal type, it indicates that the motor subdivision number corresponding to the target motor is small at this time. Therefore, the current motor subdivision number information can be processed by increasing the second motor subdivision number to obtain the third motor subdivision number information, so that the motor subdivision number corresponding to the current motor subdivision number information is less than the motor subdivision number corresponding to the third motor subdivision number information.
[0128] At the same time, as the motor subdivision number gradually increases, the motor torque will gradually decrease. In order to meet the motor torque corresponding to the third matching torque information, the current pulse duty cycle information can be processed by a second pulse duty cycle increase to obtain the second pulse duty cycle information. The pulse duty cycle corresponding to the second pulse duty cycle information is greater than the pulse duty cycle corresponding to the current pulse duty cycle information.
[0129] By jointly adjusting the current motor subdivision number information and the current pulse duty cycle information, the target torque information currently corresponding to the target motor is matched with the third matching torque information. When the target torque information matches the third matching torque information, the motor torque corresponding to the target torque information can be slightly greater than or equal to the motor torque corresponding to the third matching torque information.
[0130] S608: Determine a third target motor subdivision control strategy based on the third motor subdivision information and the second pulse duty cycle information.
[0131] Among them, after determining the third motor subdivision number information and the second pulse duty cycle information, the third target motor subdivision number control strategy is determined based on the third motor subdivision number information, the second pulse duty cycle information and the pre-set motor speed information, so that the target motor can escape the abnormal type of motor noise decibel.
[0132] In the embodiment provided in the present application, when it is determined that the motor abnormal working condition type of the target motor is the motor noise decibel abnormal type, it indicates that the motor subdivision number corresponding to the current motor subdivision number information is small. Therefore, the current motor subdivision number information can be processed by increasing the second motor subdivision number to obtain the third motor subdivision number information. At the same time, as the motor subdivision number gradually increases, the motor torque will gradually decrease. In order to meet the motor torque corresponding to the third matching torque information, the current pulse duty cycle information can be processed by increasing the second pulse duty cycle to obtain the second pulse duty cycle information, so that the target torque information corresponding to the target motor matches the third matching torque information. Finally, the third target motor subdivision number control strategy is determined based on the third motor subdivision number information and the second pulse duty cycle information, and then the control is performed based on the third target motor subdivision number control strategy, so that the noise of the target motor during operation is significantly reduced through subdivision control, which improves the user's operating comfort and is particularly suitable for use in an environment with high quiet requirements.
[0133] See also Figure 7 , Figure 7 A flow chart of another motor control method provided in an embodiment of the present application. Figure 7 As shown, the method includes:
[0134] S702: Receive a reference motor subdivision control strategy for a target motor.
[0135] Among them, users can design a reference motor subdivision control strategy based on custom requirements. The reference motor subdivision control strategy can be entered by the user in the software corresponding to the label printer in the terminal (such as mobile phone, computer, tablet, smart watch, etc.), and then sent to the label printer; or the user can manually enter the reference motor subdivision control strategy on the label machine.
[0136] The reference motor subdivision control strategy includes but is not limited to torque information, motor subdivision information and motor speed information corresponding to the target motor. The matching torque information includes the motor torque that the target motor is preset to output, the motor subdivision information includes the target motor subdivision preset for the target motor, and the motor speed information includes the target motor speed preset for the target motor.
[0137] S704: Generate a reference motor pulse control signal for the target motor based on the reference motor subdivision control strategy.
[0138] After determining the reference motor subdivision control strategy, the reference motor subdivision control strategy is used to generate a reference motor pulse control signal for the target motor. Specifically, the motor subdivision information in the reference motor subdivision control strategy can be used to adjust the current motor pulse control signal to generate a reference motor pulse control signal for the target motor.
[0139] It is easy to understand that when the motor is controlled based on the reference motor subdivision number, the corresponding motor speed information and the corresponding torque information are also required to cooperate. Therefore, the current motor pulse control signal is actually adjusted synchronously using the motor subdivision number information, motor speed information and torque information in the reference motor subdivision number control strategy.
[0140] S706: Using the reference motor pulse control signal, control the target motor to execute the reference motor subdivision control strategy.
[0141] Among them, after generating a reference motor pulse control signal for the target motor based on the reference motor subdivision control strategy, the reference motor pulse control signal is input to the target motor to control the target motor to execute the reference motor subdivision control strategy, and then control the target motor to operate according to the reference motor subdivision control strategy set by the user.
[0142] In the embodiments provided in the present application, the reference motor subdivision number control strategy can be received and obtained from the outside, so that the user can flexibly design the reference motor subdivision number control strategy according to actual needs, and then generate a reference motor pulse control signal for the target motor through the reference motor subdivision number control strategy, so as to use the reference motor pulse control signal to control the target motor to execute the reference motor subdivision number control strategy, thereby meeting the user's actual printing needs.
[0143] In one embodiment provided in the present application, the target motor includes a first winding coil and a second winding coil, the first winding coil is equipped with a first positive pin and a first negative pin, and the second winding coil is equipped with a second positive pin and a second negative pin. Specifically, the first positive pin is connected to one end of the first winding coil in the coil length direction, and the first negative pin is connected to the other end of the first winding coil in the coil length direction. Similarly, the second positive pin is connected to one end of the second winding coil in the coil length direction, and the second negative pin is connected to the other end of the second winding coil in the coil length direction.
[0144] Exemplarily, in S104, based on the target motor subdivision number control strategy, a motor pulse control signal for the target motor is generated, including:
[0145] Generate a first set of motor drive signals and a second set of motor drive signals that are correlated with each other based on a target motor subdivision number control strategy;
[0146] Among them, the first group of motor drive signals includes a first sinusoidal pulse width modulation signal and a third sinusoidal pulse width modulation signal, the first sinusoidal pulse width modulation signal and the third sinusoidal pulse width modulation signal are complementary, the first sinusoidal pulse width modulation signal is used to access the first positive pin, and the third sinusoidal pulse width modulation signal is used to access the first negative pin; the second group of motor drive signals includes a second sinusoidal pulse width modulation signal and a fourth sinusoidal pulse width modulation signal, the second sinusoidal pulse width modulation signal and the fourth sinusoidal pulse width modulation signal are complementary, the second sinusoidal pulse width modulation signal is used to access the second positive pin, and the fourth sinusoidal pulse width modulation signal is used to access the second negative pin; the first sinusoidal pulse width modulation signal and the second sinusoidal pulse width modulation signal are orthogonal.
[0147] Exemplarily, the PWM module of the MCU may be used to output two sets of complementary PWM signals, namely, a first set of motor driving signals and a second set of motor driving signals.
[0148] The first sinusoidal pulse width modulation signal may be an SPWM A+ signal, the third sinusoidal pulse width modulation signal may be an SPWMA- signal, the second sinusoidal pulse width modulation signal may be an SPWM B+ signal, and the fourth sinusoidal pulse width modulation signal may be an SPWMB- signal. The first positive pin may be an A+ pin, the first negative pin may be an A- pin, the second positive pin may be a B+ pin, and the second negative pin may be a B- pin.
[0149] See also Figure 8 , Figure 8 Schematic diagram of the motor pulse control signal corresponding to the motor four-subdivision coefficient control provided in the embodiment of the present application. Based on the MCU, four SPWM signals can be given to the target motor driver chip. For the 4-subdivision coefficient control, these four SPWM signals are as follows: Figure 8 As shown, the SPWM A+ signal is generated based on the Sine Wave signal, the SineWave signal is a Normalized Modulating Wave signal, the SPWM A- signal is complementary to the SPWM A+ signal, the SPWM B+ signal is orthogonal to the SPWM A+ signal, and the SPWM B- signal is complementary to the SPWM B+ signal. These four SPWM signals are respectively connected to the A+, A-, B+, and B- pins of the motor driver chip input, that is, when any one of the four SPWM signals is controlled, the other three signals also change synchronously with it. For example, when the SPWM A+ signal is adjusted, the SPWM A- signal, SPWM B- signal, and SPWM B+ signal are also adjusted synchronously accordingly. Figure 8 In the figure, the horizontal axis is Time (time) and the vertical axis is Amplitude (amplitude). Figure 8The change information of four SPWM signals within unit time (such as 1s) is shown in FIG.
[0150] like Fig. 9 As shown, Fig. 9 Schematic diagram of the motor subdivision coefficient corresponding to the control SPWM A+ signal provided in the embodiment of the present application. For example, if the pulse signal is not subdivided, if the target motor can take 4 full steps in one sinusoidal cycle, if different motor subdivision numbers are to be achieved, the number of SPWM signal pulses in one sinusoidal cycle can be changed. When one pulse can represent one step of the target motor, when the motor subdivision coefficient corresponding to the target motor is determined to be 4, it means that the motor takes 4x4=16 steps in one sinusoidal cycle, that is, there are 16 SPWM pulses in one sinusoidal cycle (see Fig. 9 ); when the motor subdivision factor in the target motor is 16, it means that the motor takes 4x16=64 steps in one sinusoidal cycle, that is, there are 64 SPWM pulses in one sinusoidal cycle (see Fig. 9 Signal diagram corresponding to SPWM A+with 64Pulses). Fig. 9 Shows the change of SPWM A+ signal from 4 subdivision coefficient to 16 subdivision coefficient
[0151] like Fig.10 As shown, Fig.10 A schematic diagram of controlling the motor speed of the target motor based on the SPWM A+ signal provided in the embodiment of the present application. If an SPWM pulse motor takes one step, to control the motor speed of the target motor, the frequency of the SPWM pulse can be changed to achieve this. The higher the frequency of the SPWM pulse, the more SPWM pulses there are in the same cycle, and the faster the motor speed. Fig.10It shows the change of the SPWM A+ signal when the motor speed is doubled, that is, the period of the Sine Wave signal that generates the SPWM A+ signal is controlled to be half of the original period, so that the frequency is doubled, that is, the signal schematic diagram corresponding to the Sine Wave (One Period) is transformed into the signal schematic diagram corresponding to the Double Frequency Sine Wave (Two Period), so that the SPWM A+ signal with an initial motor subdivision number of 16 is transformed into the SPWM A+ signal with a motor subdivision number of 32, that is, the signal schematic diagram corresponding to SPWM A+16Pulses is transformed into the signal schematic diagram corresponding to SPWM A+32Pulses (Based on DoubledFrequency). The signal schematic diagram corresponding to SPWM A+32Pulses (Based on DoubledFrequency) is generated based on the signal schematic diagram corresponding to the Double Frequency Sine Wave (Two Period).
[0152] like Fig.11 As shown, Fig.11 A schematic diagram of the motor torque corresponding to the target motor controlled by the SPWM A+ signal provided in the embodiment of the present application. The motor torque is related to the duty cycle of the SPWM pulse, and the motor torque is proportional to the duty cycle of the SPWM pulse. The larger the SPWM pulse duty cycle, the greater the motor torque. Because the SPWM pulse duty cycle must satisfy the sinusoidal law, when modifying the motor torque, the SPWM pulse duty cycle can be controlled to change in proportion as a whole, and the corresponding motor torque can be set. Fig.11 The figure shows the change of SPWM A+ signal when the motor torque is reduced to 0.7 times of the initial value. Fig.11 In the figure, the signal schematic diagram corresponding to SPWM A+with 16 Pulses (Standard Duty) is generated based on the signal schematic diagram corresponding to Sine Wave (One Period). Standard Duty means that the duty cycle in the figure is used as the standard pulse duty cycle. In order to reduce the motor torque to 0.7 times the initial value, the pulse duty cycle in the signal schematic diagram corresponding to SPWM A+16 Pulses (Standard Duty) can be reduced to 0.7 times the standard pulse duty cycle as a whole, thereby obtaining SPWM A+with 16 Pulses (0.7Duty Factor), where Duty Factor represents the overall change coefficient of the pulse duty cycle.
[0153] See also Fig.12 , Fig.12 This is a schematic diagram of the structure of a motor control device provided in an embodiment of the present application. Fig.12 As shown, the motor control device 1200 includes:
[0154] The monitoring module 1210 is adapted to monitor the motor operating condition type of the target motor corresponding to the label printer, and when determining that the motor operating condition type of the target motor is the motor abnormal operating condition type, generate a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type;
[0155] A motor pulse control signal generating module 1220, adapted to generate a motor pulse control signal for a target motor based on a target motor subdivision number control strategy;
[0156] The motor control module 1230 is adapted to control the target motor to execute a target motor subdivision number control strategy using a motor pulse control signal.
[0157] Optionally, the monitoring module 1210 includes:
[0158] A motor torque deficiency type determination unit, adapted to determine, when the motor abnormal operating condition type of the target motor is the motor torque deficiency type, first matching torque information of the target motor for the target label paper and first motor subdivision number information matched by the first matching torque information;
[0159] The first target motor subdivision number control strategy determining unit is adapted to determine the first target motor subdivision number control strategy based on the first matching torque information and the first motor subdivision number information.
[0160] Optionally, the motor torque deficiency type determination unit includes:
[0161] An acquisition subunit, adapted to acquire label paper information of a target label paper;
[0162] A target motor speed determination subunit, adapted to determine a preset printing speed corresponding to the label printer, and determine a target motor speed of the target motor based on the preset printing speed;
[0163] The first matching torque information determining subunit is adapted to determine first matching torque information of the target motor for the target label paper based on the target motor speed and the label paper information.
[0164] Optionally, the acquisition subunit is further adapted to:
[0165] Determine label paper information of the target label paper based on at least one of the first label paper information acquisition method, the second label paper information acquisition method, and the third label paper acquisition method;
[0166] Among them, the first label paper information acquisition method is to obtain the label paper information of the target label paper sent by the terminal; the second label paper information is to determine the input information for the target label paper received by the label printer, and determine the label paper information of the target label paper based on the input information; the third label paper acquisition method is to identify the wireless radio frequency identification element corresponding to the target label paper to obtain the information recognition result, and determine the label paper information of the target label paper based on the information recognition result.
[0167] Optionally, the monitoring module 1210 includes:
[0168] A first determining unit, adapted to determine current motor subdivision number information and current pulse duty cycle information corresponding to the target motor when the motor abnormal operating condition type of the target motor is a motor temperature rise abnormal type;
[0169] A second matching torque information determining unit, adapted to determine second matching torque information of the target motor for the target label paper;
[0170] A first data increasing processing unit is adapted to perform a first motor subdivision increasing process on the current motor subdivision information to obtain the second motor subdivision information, and to perform a first pulse duty increasing process on the current pulse duty cycle information to obtain the first pulse duty cycle information, so that the target torque information corresponding to the target motor matches the second matching torque information;
[0171] The second target motor subdivision number control strategy determining unit is adapted to determine the second target motor subdivision number control strategy based on the second motor subdivision number information and the first pulse duty cycle information.
[0172] Optionally, the monitoring module 1210 further includes:
[0173] A temperature monitoring unit, adapted to monitor the motor temperature of the target motor and determine a temperature increase rate corresponding to the target motor based on the motor temperature;
[0174] The motor temperature rise abnormality type determination unit is adapted to determine that the motor abnormal operating condition type of the target motor is a motor temperature rise abnormality type when the temperature rise rate is greater than or equal to a preset temperature rise rate.
[0175] Optionally, the monitoring module 1210 further includes:
[0176] A second determination unit, adapted to determine, when determining that the motor abnormal operating condition type of the target motor is a motor noise decibel abnormal type, determine current motor subdivision number information and current pulse duty cycle information corresponding to the target motor;
[0177] A third matching torque information determining unit, adapted to determine third matching torque information of the target motor for the target label paper;
[0178] A second data increasing processing unit is adapted to perform a second motor subdivision increasing process on the current motor subdivision information to obtain third motor subdivision information, and perform a second pulse duty increasing process on the current pulse duty cycle information to obtain second pulse duty cycle information, so that the target torque information corresponding to the target motor matches the third matching torque information;
[0179] The third target motor subdivision number control strategy determining unit is adapted to determine the third target motor subdivision number control strategy based on the third motor subdivision number information and the second pulse duty cycle information.
[0180] Optionally, the monitoring module 1210 further includes:
[0181] The decibel monitoring module is suitable for monitoring the motor operation decibel value of the target motor. When the motor operation decibel value is greater than or equal to the preset motor operation decibel value, the abnormal motor operating condition type of the target motor is determined to be the motor noise decibel abnormal type.
[0182] Optionally, the motor control device 1200 further includes:
[0183] A receiving module, adapted to receive a reference motor subdivision control strategy for a target motor;
[0184] A generation module, adapted to generate a reference motor pulse control signal for a target motor based on a reference motor subdivision control strategy;
[0185] The control module is suitable for controlling the target motor to execute the reference motor subdivision control strategy by using the reference motor pulse control signal.
[0186] Optionally, the target motor includes a first winding coil and a second winding coil, the first winding coil is equipped with a first positive pin and a first negative pin, and the second winding coil is equipped with a second positive pin and a second negative pin; the motor pulse control signal generating module 1220 is also suitable for:
[0187] Generate a first set of motor drive signals and a second set of motor drive signals that are correlated with each other based on a target motor subdivision number control strategy;
[0188] Among them, the first group of motor drive signals includes a first sinusoidal pulse width modulation signal and a third sinusoidal pulse width modulation signal, the first sinusoidal pulse width modulation signal and the third sinusoidal pulse width modulation signal are complementary, the first sinusoidal pulse width modulation signal is used to access the first positive pin, and the third sinusoidal pulse width modulation signal is used to access the first negative pin; the second group of motor drive signals includes a second sinusoidal pulse width modulation signal and a fourth sinusoidal pulse width modulation signal, the second sinusoidal pulse width modulation signal and the fourth sinusoidal pulse width modulation signal are complementary, the second sinusoidal pulse width modulation signal is used to access the second positive pin, and the fourth sinusoidal pulse width modulation signal is used to access the second negative pin; the first sinusoidal pulse width modulation signal and the second sinusoidal pulse width modulation signal are orthogonal.
[0189] In the embodiments provided in the present application, an electronic device is also provided, which includes: a processor; and a memory arranged to store computer executable instructions, and when the executable instructions are executed, the processor executes a method according to any one of the above embodiments.
[0190] In the embodiments provided in the present application, a computer-readable storage medium is also provided, which stores one or more programs. When the one or more programs are executed by a processor, they implement the method of any one of the above embodiments.
[0191] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0192] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0193] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0194] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0195] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present application.
[0196] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0197] The above is a description of a motor control method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.
Claims
1. A motor control method, characterized in that: The method comprises: Monitoring the motor operating condition type of the target motor corresponding to the label printer, and when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generating a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type; Based on the target motor subdivision number control strategy, generate a motor pulse control signal for the target motor; The motor pulse control signal is used to control the target motor to execute the target motor subdivision number control strategy.
2. The method according to claim 1, characterized in that When determining that the motor operating condition type of the target motor is a motor abnormal operating condition type, generating a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type includes: When the motor abnormal operating condition type of the target motor is a motor torque shortage type, determining first matching torque information of the target motor for the target label paper, and first motor subdivision number information matched by the first matching torque information; Based on the first matching torque information and the first motor subdivision number information, a first target motor subdivision number control strategy is determined.
3. The method according to claim 2, characterized in that The determining of the first matching torque information of the target motor for the target label paper includes: Get the label paper information of the target label paper; Determine a preset printing speed corresponding to the label printer, and determine a target motor speed of the target motor based on the preset printing speed; Based on the target motor speed and the label paper information, first matching torque information of the target motor for the target label paper is determined.
4. The method according to claim 3, characterized in that The step of obtaining label paper information of a target label paper includes: Determine label paper information of the target label paper based on at least one of the first label paper information acquisition method, the second label paper information acquisition method, and the third label paper acquisition method; Among them, the first label paper information acquisition method is to acquire the label paper information of the target label paper sent by the terminal; the second label paper information is to determine the input information for the target label paper received by the label printer, and determine the label paper information of the target label paper based on the input information; the third label paper acquisition method is to identify the wireless radio frequency identification element corresponding to the target label paper to obtain an information recognition result, and determine the label paper information of the target label paper based on the information recognition result.
5. The method according to claim 1, characterized in that When determining that the motor operating condition type of the target motor is a motor abnormal operating condition type, generating a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type includes: When the motor abnormal working condition type of the target motor is the motor temperature rise abnormal type, determining the current motor subdivision number information and the current pulse duty cycle information corresponding to the target motor; Determine second matching torque information of the target motor for the target label paper; Performing a first motor subdivision number increasing process on the current motor subdivision number information to obtain second motor subdivision number information, and performing a first pulse duty cycle increasing process on the current pulse duty cycle information to obtain first pulse duty cycle information, so that the target torque information corresponding to the target motor matches the second matching torque information; Based on the second motor subdivision number information and the first pulse duty cycle information, a second target motor subdivision number control strategy is determined.
6. The method according to claim 5, characterized in that The method further comprises: monitoring a motor temperature of the target motor, and determining a temperature increase rate corresponding to the target motor based on the motor temperature; When the temperature increase rate is greater than or equal to a preset temperature increase rate, it is determined that the abnormal motor operating condition type of the target motor is a motor temperature rise abnormality type.
7. The method according to claim 1, characterized in that When determining that the motor operating condition type of the target motor is a motor abnormal operating condition type, generating a target motor subdivision number control strategy corresponding to the motor abnormal operating condition type includes: When it is determined that the motor abnormal operating condition type of the target motor is the motor noise decibel abnormal type, current motor subdivision number information and current pulse duty cycle information corresponding to the target motor are determined; Determining third matching torque information of the target motor for the target label paper; Performing a second motor subdivision number increasing process on the current motor subdivision number information to obtain a third motor subdivision number information, and performing a second pulse duty cycle increasing process on the current pulse duty cycle information to obtain a second pulse duty cycle information, so that the target torque information corresponding to the target motor matches the third matching torque information; Based on the third motor subdivision number information and the second pulse duty cycle information, a third target motor subdivision number control strategy is determined.
8. The method according to claim 7, characterized in that The method further comprises: The motor operation decibel value of the target motor is monitored, and when the motor operation decibel value is greater than or equal to a preset motor operation decibel value, it is determined that the abnormal motor operating condition type of the target motor is a motor noise decibel abnormal type.
9. The method according to claim 1, characterized in that: The method further comprises: Receiving a reference motor subdivision control strategy for the target motor; Based on the reference motor subdivision control strategy, generating a reference motor pulse control signal for the target motor; The reference motor pulse control signal is used to control the target motor to execute the reference motor subdivision control strategy.
10. The method according to claim 1, characterized in that The target motor includes a first winding coil and a second winding coil, the first winding coil is equipped with a first positive pin and a first negative pin, and the second winding coil is equipped with a second positive pin and a second negative pin; the motor pulse control signal for the target motor is generated based on the target motor subdivision control strategy, including: Generate a first group of motor drive signals and a second group of motor drive signals that are mutually related based on the target motor subdivision number control strategy; Wherein, the first group of motor drive signals includes a first sinusoidal pulse width modulation signal and a third sinusoidal pulse width modulation signal, the first sinusoidal pulse width modulation signal and the third sinusoidal pulse width modulation signal are complementary, the first sinusoidal pulse width modulation signal is used to access the first positive pin, and the third sinusoidal pulse width modulation signal is used to access the first negative pin; The second group of motor drive signals includes a second sinusoidal pulse width modulation signal and a fourth sinusoidal pulse width modulation signal, the second sinusoidal pulse width modulation signal and the fourth sinusoidal pulse width modulation signal are complementary, the second sinusoidal pulse width modulation signal is used to connect to the second positive pin, and the fourth sinusoidal pulse width modulation signal is used to connect to the second negative pin; The first sinusoidal pulse width modulated signal and the second sinusoidal pulse width modulated signal are orthogonal.
11. A motor control device, characterized in that: The device comprises: A monitoring module, adapted to monitor the motor operating condition type of the target motor corresponding to the label printer, and when determining that the motor operating condition type of the target motor is an abnormal motor operating condition type, generate a target motor subdivision number control strategy corresponding to the abnormal motor operating condition type; A motor pulse control signal generating module, adapted to generate a motor pulse control signal for the target motor based on the target motor subdivision number control strategy; The motor control module is adapted to control the target motor to execute the target motor subdivision number control strategy by utilizing the motor pulse control signal.
12. An electronic device, characterized in that: The electronic device includes: Processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 10 is implemented.