CN112923839B - Stepping motor control method, device, equipment and storage medium - Google Patents

Stepping motor control method, device, equipment and storage medium Download PDF

Info

Publication number
CN112923839B
CN112923839B CN202110100266.3A CN202110100266A CN112923839B CN 112923839 B CN112923839 B CN 112923839B CN 202110100266 A CN202110100266 A CN 202110100266A CN 112923839 B CN112923839 B CN 112923839B
Authority
CN
China
Prior art keywords
signal
current
type
voltage
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110100266.3A
Other languages
Chinese (zh)
Other versions
CN112923839A (en
Inventor
董志刚
谢鹏义
谢鹏艺
刘新辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Helitai Intelligent Technology Co ltd
Original Assignee
Shenzhen Helitai Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Helitai Intelligent Technology Co ltd filed Critical Shenzhen Helitai Intelligent Technology Co ltd
Priority to CN202110100266.3A priority Critical patent/CN112923839B/en
Publication of CN112923839A publication Critical patent/CN112923839A/en
Application granted granted Critical
Publication of CN112923839B publication Critical patent/CN112923839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

The invention relates to the field of motor control, and discloses a stepping motor control method, a stepping motor control device, stepping motor control equipment and a storage medium. The invention monitors whether the current voltage signal in the stepping motor changes in real time; when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal; and executing a corresponding signal change difference calculation strategy according to the signal type, judging whether the stepper motor is positioned according to a strategy execution result, and accurately judging the positioning by collecting and calculating an electric signal in the working process of the stepper motor, so that the condition that manual gradual debugging is needed in the positioning process of the stepper motor is avoided, and one-key positioning of the stepper motor is realized.

Description

Stepping motor control method, device, equipment and storage medium
Technical Field
The present invention relates to the field of motor control, and in particular, to a method, apparatus, device, and storage medium for controlling a stepper motor.
Background
With the rapid development of economy in recent years, various enterprises have been increasingly demanded for production and processing.
The production of various devices involved is also becoming a focus of attention for enterprises. The positioning currently involved in the machining process is mainly realized by a stepping motor and a servo motor. And the price of the servo motor is far higher than that of the stepping motor. The positioning can only be performed by a stepper motor with limited economic costs. Because the stepper motor can not complete the action of a complete closed loop with the driver, when the stepper motor is used for positioning, a technician is required to manually control the positioning step by step, so that a great deal of manpower and time are consumed.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a stepping motor control method, a stepping motor control device, stepping motor control equipment and a storage medium, and aims to solve the technical problem that one-key positioning of a stepping motor cannot be used in the prior art.
To achieve the above object, the present invention provides a stepping motor control method comprising the steps of:
monitoring whether a current voltage signal in the stepping motor changes or not in real time;
when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal;
and executing a corresponding signal change difference calculation strategy according to the signal type, and judging whether the stepping motor finishes positioning or not according to a strategy execution result.
Optionally, the signal types of the changed electric signal include: a first type, a second type, and a third type;
the determining the signal type of the changed electric signal in the current-voltage signal when the current-voltage signal is changed comprises the following steps:
reading a current signal and a voltage signal from the current-voltage signal when the current-voltage signal changes;
when the current signal exceeds a first preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the first type;
when the voltage signal exceeds a second preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the second type;
and when the current signal exceeds a first preset threshold value and the voltage signal exceeds a second preset threshold value, judging that the signal type of the electric signal changed in the current-voltage signal is the third type.
Optionally, before the step of monitoring whether the current-voltage signal in the stepper motor changes in real time, the method includes:
acquiring voltage in a programmable logic controller of the stepping motor in real time to obtain a voltage signal;
collecting current in a stepping motor in real time to obtain a current signal;
and generating a current-voltage signal according to the voltage signal and the current signal.
Optionally, the executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether the stepper motor completes positioning according to a strategy execution result includes:
when the signal type is the third type, acquiring a third signal variation difference calculation strategy corresponding to the third type;
performing difference calculation on the current signal and the voltage signal according to the third signal change difference calculation strategy to obtain a difference value;
and judging whether the stepper motor finishes positioning or not according to the difference value.
Optionally, the executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether the stepper motor completes positioning according to a strategy execution result includes:
when the signal type is the first type, acquiring a first signal variation difference calculation strategy corresponding to the first type;
extracting a current voltage value of the voltage signal according to the first signal variation difference calculation strategy;
filtering the current voltage value to obtain a second voltage value, and judging whether the stepper motor is positioned according to the second voltage value;
or when the signal type is the second type, acquiring a second signal variation difference calculation strategy corresponding to the second type;
extracting a current value of the current signal according to the second signal variation difference calculation strategy;
and filtering the current value to obtain a second current value, and judging whether the stepper motor is positioned according to the second current value.
Optionally, the filtering processing is performed on the current voltage value to obtain a second voltage value, and determining whether the stepper motor finishes positioning according to the second voltage value includes:
filtering the current voltage value to obtain a second voltage value;
when the second voltage value is larger than the second preset threshold value, judging that the stepping motor finishes positioning;
and when the second voltage value is smaller than or equal to the second preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
Optionally, the filtering processing is performed on the current value to obtain a second current value, and determining whether the stepper motor finishes positioning according to the second current value includes:
filtering the current value to obtain a second current value;
when the second current value is larger than the first preset threshold value, judging that the stepping motor finishes positioning;
and when the second current value is smaller than or equal to the first preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
In addition, in order to achieve the above object, the present invention also provides a stepping motor control device including:
and a monitoring module: monitoring whether a current voltage signal in the stepping motor changes or not in real time;
and a fusion module: when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal;
and a judging module: and executing a corresponding signal change difference calculation strategy according to the signal type, and judging whether the stepping motor finishes positioning or not according to a strategy execution result.
In addition, in order to achieve the above object, the present invention also provides a stepping motor control apparatus comprising: the device comprises a memory, a processor and a stepper motor control program stored on the memory and executable on the processor, the stepper motor control program being configured to implement the steps of the stepper motor control method as described above.
In addition, in order to achieve the above object, the present invention also provides a storage medium, wherein a step motor control program is stored on the storage medium, and the step motor control program when executed by a processor implements the steps of the step motor control method as described above.
The invention monitors whether the current voltage signal in the stepping motor changes in real time; when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal; and executing a corresponding signal change difference calculation strategy according to the signal type, judging whether the stepper motor is positioned according to a strategy execution result, and accurately judging the positioning by collecting and calculating an electric signal in the working process of the stepper motor, so that the condition that manual gradual debugging is needed in the positioning process of the stepper motor is avoided, and one-key positioning by using the stepper motor is realized.
Drawings
Fig. 1 is a schematic structural diagram of a stepper motor control apparatus in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of a first embodiment of a control method of a stepper motor according to the present invention;
FIG. 3 is a flow chart of a second embodiment of the control method of the stepper motor of the present invention;
fig. 4 is a block diagram of a first embodiment of a stepping motor control device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a stepper motor control apparatus in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the stepping motor control apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is not limiting of the stepper motor control apparatus and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
As shown in fig. 1, an operating system, a data storage module, a network communication module, a user interface module, and a stepping motor control program may be included in the memory 1005 as one type of storage medium.
In the stepper motor control apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the stepper motor control apparatus of the present invention may be provided in the stepper motor control apparatus, which invokes the stepper motor control program stored in the memory 1005 through the processor 1001 and executes the stepper motor control method provided by the embodiment of the present invention.
An embodiment of the present invention provides a control method for a stepper motor, referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the control method for a stepper motor according to the present invention.
In this embodiment, the step motor control method includes the following steps:
step S10: monitoring whether a current voltage signal in the stepping motor changes or not in real time;
it should be noted that, the execution body of the present embodiment may be a stepper motor control device, or may be other devices that can implement the same or similar functions, and the present embodiment is not limited herein, and in the present embodiment, the stepper motor control device is described as an example. The stepping motor control device can be used for collecting electric signals generated in the operation of the stepping motor and carrying out data analysis processing on the electric signals, such as denoising of data, data fusion and the like.
It should be understood that a stepper motor, also called a pulse motor, is based on the most basic electromagnet principle, which is a freely rotatable electromagnet whose principle of action is to rely on the variation of the air gap permeance to produce electromagnetic torque. Each time a pulse signal is input, the rotor rotates by an angle or further, the output angular displacement or linear displacement is proportional to the input pulse number, and the rotating speed is proportional to the pulse frequency.
The current and voltage signals may be current signals, voltage signals, or other signal quantities that can achieve the same or similar functions, and the present embodiment is not limited herein, and in this embodiment, the current and voltage signals including the current signals and the voltage signals are described.
In a specific implementation, when monitoring the change of the current voltage signal, in the case of monitoring the change of the voltage, the voltage in the stepper motor may be monitored by using a detection method, or other manners capable of implementing the same or similar functions may be used, which is not limited herein. In the case of monitoring the current change, the thermoelectric method may be used to monitor the current in the stepper motor, or other manners that may achieve the same or similar functions, which is not limited herein.
In a specific implementation, since the stepper motor belongs to a direct current motor, no alternating current signal exists in the operation of the stepper motor, the current voltage after the stepper motor is started is a normal current voltage, and a signal deviating from the normal current voltage is regarded as a signal of the current voltage at the moment, and the current voltage signal is changed. For example: in the case of normal operation of the stepping motor, the driving voltage of the stepping motor is 12V, and when the stepping motor control device monitors that the motor driving voltage is 30V, it is determined that the current voltage signal in the stepping motor is changed at this time.
Step S20: when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal;
in a specific implementation, the stepper motor control device can be provided with two monitors for respectively monitoring the current and voltage signals, and when the current and voltage signals change, the stepper motor control device can correspondingly judge only by judging which monitor value changes. For example: the stepping motor control device is provided with a No. 1 monitor for monitoring current change and a No. 2 monitor for monitoring voltage change. When the current voltage signal in the stepping motor changes, the judgment can be performed by judging whether the number 1 monitor value changes or the number 2 monitor value changes.
Step S30: and executing a corresponding signal change difference calculation strategy according to the signal type, and judging whether the stepping motor finishes positioning or not according to a strategy execution result.
It should be noted that, the signal variation difference calculation strategy is set by a system administrator, and the optional step motor starting interference elimination, step motor normal working current and voltage value calibration, and variation difference range setting are selected.
In specific implementation, when the stepping motor control device obtains that the current change value exceeds the preset change difference range setting through the signal change difference calculation strategy during normal operation of the motor, the stepping motor is judged to be positioned completely at the moment. For example: the working voltage variation difference range set by the system administrator is as follows: 21-23V, when the stepping motor control device monitors that the voltage signal in the current voltage signal is 30V at the moment, the motor positioning is judged to be completed.
Further, before the step of monitoring whether the current-voltage signal in the stepper motor changes in real time, the step of monitoring comprises: acquiring voltage in a programmable logic controller of the stepping motor in real time to obtain a voltage signal; collecting current in a stepping motor in real time to obtain a current signal; and generating a current-voltage signal according to the voltage signal and the current signal.
The method comprises the steps of monitoring whether a current voltage signal in a stepping motor changes or not in real time; when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal; and executing a corresponding signal change difference calculation strategy according to the signal type, judging whether the stepper motor is positioned according to a strategy execution result, and accurately judging the positioning by collecting and calculating an electric signal in the working process of the stepper motor, so that the condition that manual gradual debugging is needed in the positioning process of the stepper motor is avoided, and one-key positioning by using the stepper motor is realized.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the control method of the stepper motor according to the present invention.
Based on the first embodiment, the step S20 in this embodiment includes:
step S201: reading a current signal and a voltage signal from the current-voltage signal when the current-voltage signal changes;
in a specific implementation, when the current and voltage signals change, the monitoring equipment in the stepping motor control equipment reads the current and voltage signals to obtain specific change values in the current and voltage signals.
Step S202: when the current signal exceeds a first preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the first type;
the signal types of the electrical signal that changes include a first type, a second type, and a third type. For example: the first type is a change in the current signal, the second type is a change in the voltage signal, and the third type is a change in both the current signal and the voltage signal.
It should be noted that, the first preset threshold is set by the system administrator according to the working normal state of the stepper motor, and because the stepper motor is a pulse type electric signal, the setting of the first preset threshold can eliminate the noise of the current to a certain extent. For example: the current of the stepper motor is 150A during normal operation, and the current of the test motor clamped to the product is 180A when positioning is completed, the first preset threshold may be set to 180A.
Step S203: when the voltage signal exceeds a second preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the second type;
the second preset threshold is set by the system administrator according to the working state of the stepper motor.
In a specific implementation, the stepper motor control device converts the original pulse signal of the encoder into a higher pulse signal and provides the higher pulse signal to a programmable logic controller in the stepper motor for collection. When the stepping motor works normally, the stepping motor control device can send original pulses to the programmable logic controller for collection, and when the stepping motor clamps a product, the stepping motor control device can not send the original pulses to the programmable logic controller for collection.
Step S204: and when the current signal exceeds a first preset threshold value and the voltage signal exceeds a second preset threshold value, judging that the signal type of the electric signal changed in the current-voltage signal is the third type.
It should be noted that the third type is a type that occurs when the current exceeds the first preset threshold value and the voltage exceeds the second preset threshold value, meaning that the current voltage in the stepper motor is changed and the corresponding preset threshold value is exceeded.
Further, in order to implement one-key positioning of the stepper motor, the step motor executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether positioning of the stepper motor is completed according to a strategy execution result, includes: when the signal type is the third type, acquiring a third signal variation difference calculation strategy corresponding to the third type; performing difference calculation on the current signal and the voltage signal according to the third signal change difference calculation strategy to obtain a difference value; and judging whether the stepper motor finishes positioning or not according to the difference value.
In a specific implementation, a system administrator sets a maximum value of a voltage difference value and a maximum value of a current difference value, when judging that a specific change condition of the current-voltage signal belongs to a third type, a corresponding third signal change difference calculation strategy is to determine a difference value between the current signal value and a first preset threshold value, namely the current difference value, and simultaneously determine a difference value between the voltage signal value and a second preset threshold value, namely the voltage difference value, and when the current difference value is smaller than the maximum current difference value and the voltage difference value is smaller than the maximum voltage difference value, the system positioning is judged to be effective. For example: the maximum current difference value set by the system administrator is 15A, the maximum voltage difference value is 50V, when the current-voltage variation belongs to the third type, the current difference value at this time is calculated to be 10A, the voltage difference value at this time is 20V, and the stepping motor control apparatus determines that the positioning at this time is completed.
Further, in order to reduce an error of one-key positioning of the stepper motor, when the signal type is the first type, acquiring a first signal variation difference calculation strategy corresponding to the first type; extracting a current voltage value of the voltage signal according to the first signal variation difference calculation strategy; filtering the current voltage value to obtain a second voltage value, and judging whether the stepper motor is positioned according to the second voltage value; or when the signal type is the second type, acquiring a second signal variation difference calculation strategy corresponding to the second type; extracting a current value of the current signal according to the second signal variation difference calculation strategy; and filtering the current value to obtain a second current value, and judging whether the stepper motor is positioned according to the second current value.
It should be noted that, the step motor has an objective factor and an error of current-voltage signal change caused by human factors in the working process, when the current or voltage signal changes, the signal which does not change needs to be filtered, so as to solve the noise of the signal in the system.
In a specific implementation, the filtering the current value to obtain a second current value, and determining whether the stepper motor completes positioning according to the second current value includes: filtering the current value to obtain a second current value; when the second current value is larger than the first preset threshold value, judging that the stepping motor finishes positioning; and when the second current value is smaller than or equal to the first preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
It should be noted that if the current-voltage signal after the filtering processing still exists in the first type or the second type, the stepper motor control device will alarm to indicate that a problem occurs in a certain link in the stepper motor.
In a specific implementation, the stepper motor control device converts the original pulse signal of the encoder into a higher pulse signal and provides the higher pulse signal to a programmable logic controller in the stepper motor for collection. When the stepping motor works normally, the stepping motor control device can send original pulses to the programmable logic controller for collection, and when the stepping motor clamps a product, the stepping motor control device can not send the original pulses to the programmable logic controller for collection.
In a specific implementation, the stepper motor control apparatus is responsible for monitoring the current of the drive motor in the stepper motor, the current level of the motor being constant while the stepper motor is in operation. When the centering clip is attached to the product, the current of the motor increases.
This example is achieved by reading a current signal and a voltage signal from the current-voltage signal when the current-voltage signal changes; when the current signal exceeds a first preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the first type; when the voltage signal exceeds a second preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the second type; when the current signal exceeds a first preset threshold value and the voltage signal exceeds a second preset threshold value, the signal type of the electric signal which changes in the current-voltage signal is judged to be the third type, and the positioning is judged by determining the third type of the current signal and the voltage signal which change simultaneously, so that the error of the stepping motor in the one-key positioning process is effectively reduced, and the stepping motor is better helped to perform one-key positioning.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores a stepper motor control program, and the stepper motor control program realizes the steps of the stepper motor control method when being executed by a processor.
Referring to fig. 4, fig. 4 is a block diagram showing the configuration of a first embodiment of the stepping motor control device according to the present invention.
As shown in fig. 4, a stepping motor control device according to an embodiment of the present invention includes:
the monitoring module 301: monitoring whether a current voltage signal in the stepping motor changes or not in real time;
fusion module 302: when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal;
the judging module 303: and executing a corresponding signal change difference calculation strategy according to the signal type, and judging whether the stepping motor finishes positioning or not according to a strategy execution result.
The method comprises the steps of monitoring whether a current voltage signal in a stepping motor changes or not in real time; when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal; and executing a corresponding signal change difference calculation strategy according to the signal type, judging whether the stepper motor is positioned according to a strategy execution result, and accurately judging the positioning by collecting and calculating an electric signal in the working process of the stepper motor, so that the condition that manual gradual debugging is needed in the positioning process of the stepper motor is avoided, and one-key positioning by using the stepper motor is realized.
In an embodiment, the monitoring module 301 is further configured to collect, in real time, a voltage in a programmable logic controller of the stepper motor to obtain a voltage signal; collecting current in a stepping motor in real time to obtain a current signal; and generating a current-voltage signal according to the voltage signal and the current signal.
In one embodiment, the fusion module 302 is further configured to read a current signal and a voltage signal from the current voltage signal when the current voltage signal changes; when the current signal exceeds a first preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the first type; when the voltage signal exceeds a second preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the second type; and when the current signal exceeds a first preset threshold value and the voltage signal exceeds a second preset threshold value, judging that the signal type of the electric signal changed in the current-voltage signal is the third type.
In an embodiment, the determining module 303 is further configured to obtain a third signal variation difference calculation policy corresponding to the third type when the signal type is the third type; performing difference calculation on the current signal and the voltage signal according to the third signal change difference calculation strategy to obtain a difference value; and judging whether the stepper motor finishes positioning or not according to the difference value.
In an embodiment, the fusion module 302 is further configured to obtain a first signal variation difference calculation policy corresponding to the first type when the signal type is the first type; extracting a current voltage value of the voltage signal according to the first signal variation difference calculation strategy; filtering the current voltage value to obtain a second voltage value, and judging whether the stepper motor is positioned according to the second voltage value; or when the signal type is the second type, acquiring a second signal variation difference calculation strategy corresponding to the second type; extracting a current value of the current signal according to the second signal variation difference calculation strategy; and filtering the current value to obtain a second current value, and judging whether the stepper motor is positioned according to the second current value.
In an embodiment, the fusion module 302 is further configured to perform a filtering process on the current voltage value to obtain a second voltage value; when the second voltage value is larger than the second preset threshold value, judging that the stepping motor finishes positioning; and when the second voltage value is smaller than or equal to the second preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
In an embodiment, the fusion module 302 is further configured to perform a filtering process on the current value to obtain a second current value; when the second current value is larger than the first preset threshold value, judging that the stepping motor finishes positioning; and when the second current value is smaller than or equal to the first preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
In an embodiment, the determining module 30 is further configured to obtain a third signal variation difference calculation policy corresponding to the third type when the signal type is the third type; performing difference calculation on the current signal and the voltage signal according to the third signal change difference calculation strategy to obtain a difference value; and judging whether the stepper motor finishes positioning or not according to the difference value.
Other embodiments or specific implementations of the stepper motor control apparatus of the present invention may refer to the above method embodiments, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read-only memory/random-access memory, magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1. A stepping motor control method, characterized by comprising the steps of:
monitoring whether a current voltage signal in the stepping motor changes or not in real time;
when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal;
executing a corresponding signal variation difference calculation strategy according to the signal type, judging whether the stepper motor finishes positioning or not according to a strategy execution result, wherein the signal variation difference calculation strategy comprises: the step motor starts interference elimination, the step motor is calibrated in normal working current and voltage values, and a variation difference range is set;
the signal types of the changed electric signals include: a first type, a second type, and a third type;
the determining the signal type of the changed electric signal in the current-voltage signal when the current-voltage signal is changed comprises the following steps:
reading a current signal and a voltage signal from the current-voltage signal when the current-voltage signal changes;
when the current signal exceeds a first preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the first type;
when the voltage signal exceeds a second preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the second type;
when the current signal exceeds a first preset threshold value and the voltage signal exceeds a second preset threshold value, judging that the signal type of the electric signal changed in the current-voltage signal is the third type;
executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether the stepper motor finishes positioning according to a strategy execution result, wherein the method comprises the following steps:
when the signal type is the third type, acquiring a third signal variation difference calculation strategy corresponding to the third type;
performing difference calculation on the current signal and the voltage signal according to the third signal change difference calculation strategy to obtain a difference value;
judging whether the stepper motor is positioned according to the difference value;
executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether the stepper motor finishes positioning according to a strategy execution result, wherein the method comprises the following steps:
when the signal type is the first type, acquiring a first signal variation difference calculation strategy corresponding to the first type;
extracting a current voltage value of the voltage signal according to the first signal variation difference calculation strategy;
filtering the current voltage value to obtain a second voltage value, and judging whether the stepper motor is positioned according to the second voltage value;
or when the signal type is the second type, acquiring a second signal variation difference calculation strategy corresponding to the second type;
extracting a current value of the current signal according to the second signal variation difference calculation strategy;
and filtering the current value to obtain a second current value, and judging whether the stepper motor is positioned according to the second current value.
2. The method of claim 1, wherein the step of monitoring in real time whether the current-voltage signal in the stepper motor is changed comprises:
acquiring voltage in a programmable logic controller of the stepping motor in real time to obtain a voltage signal;
collecting current in a stepping motor in real time to obtain a current signal;
and generating a current-voltage signal according to the voltage signal and the current signal.
3. The method for controlling a stepper motor according to claim 1, wherein the filtering the current voltage value to obtain a second voltage value, and determining whether the stepper motor is positioned according to the second voltage value comprises:
filtering the current voltage value to obtain a second voltage value;
when the second voltage value is larger than the second preset threshold value, judging that the stepping motor finishes positioning;
and when the second voltage value is smaller than or equal to the second preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
4. The method for controlling a stepper motor according to claim 1, wherein the filtering the current value to obtain a second current value, and determining whether the stepper motor is positioned according to the second current value comprises:
filtering the current value to obtain a second current value;
when the second current value is larger than the first preset threshold value, judging that the stepping motor finishes positioning;
and when the second current value is smaller than or equal to the first preset threshold value, judging that the stepping motor does not complete positioning, and returning to the step of monitoring whether the current voltage signal in the stepping motor changes in real time.
5. A stepping motor control device characterized by comprising:
and a monitoring module: monitoring whether a current voltage signal in the stepping motor changes or not in real time;
and a fusion module: when the current voltage signal changes, determining the signal type of the changed electric signal in the current voltage signal;
and a judging module: executing a corresponding signal variation difference calculation strategy according to the signal type, judging whether the stepper motor finishes positioning or not according to a strategy execution result, wherein the signal variation difference calculation strategy comprises: the step motor starts interference elimination, the step motor is calibrated in normal working current and voltage values, and a variation difference range is set;
the signal types of the changed electric signals include: a first type, a second type, and a third type;
the determining the signal type of the changed electric signal in the current-voltage signal when the current-voltage signal is changed comprises the following steps:
reading a current signal and a voltage signal from the current-voltage signal when the current-voltage signal changes;
when the current signal exceeds a first preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the first type;
when the voltage signal exceeds a second preset threshold value, judging the signal type of the electric signal which changes in the current voltage signal as the second type;
when the current signal exceeds a first preset threshold value and the voltage signal exceeds a second preset threshold value, judging that the signal type of the electric signal changed in the current-voltage signal is the third type;
executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether the stepper motor finishes positioning according to a strategy execution result, wherein the method comprises the following steps:
when the signal type is the third type, acquiring a third signal variation difference calculation strategy corresponding to the third type;
performing difference calculation on the current signal and the voltage signal according to the third signal change difference calculation strategy to obtain a difference value;
judging whether the stepper motor is positioned according to the difference value;
executing a corresponding signal variation difference calculation strategy according to the signal type, and judging whether the stepper motor finishes positioning according to a strategy execution result, wherein the method comprises the following steps:
when the signal type is the first type, acquiring a first signal variation difference calculation strategy corresponding to the first type;
extracting a current voltage value of the voltage signal according to the first signal variation difference calculation strategy;
filtering the current voltage value to obtain a second voltage value, and judging whether the stepper motor is positioned according to the second voltage value;
or when the signal type is the second type, acquiring a second signal variation difference calculation strategy corresponding to the second type;
extracting a current value of the current signal according to the second signal variation difference calculation strategy;
and filtering the current value to obtain a second current value, and judging whether the stepper motor is positioned according to the second current value.
6. A stepping motor control apparatus, characterized in that the stepping motor control device comprises: a memory, a processor and a stepper motor control program stored on the memory and executable on the processor, the stepper motor control program being configured to implement the steps of the stepper motor control method as claimed in any one of claims 1 to 4.
7. A storage medium having stored thereon a stepper motor control program which, when executed by a processor, implements the steps of the stepper motor control method of any one of claims 1 to 4.
CN202110100266.3A 2021-01-25 2021-01-25 Stepping motor control method, device, equipment and storage medium Active CN112923839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110100266.3A CN112923839B (en) 2021-01-25 2021-01-25 Stepping motor control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110100266.3A CN112923839B (en) 2021-01-25 2021-01-25 Stepping motor control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112923839A CN112923839A (en) 2021-06-08
CN112923839B true CN112923839B (en) 2023-06-27

Family

ID=76165884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110100266.3A Active CN112923839B (en) 2021-01-25 2021-01-25 Stepping motor control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112923839B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07229711A (en) * 1993-12-22 1995-08-29 Matsushita Electric Works Ltd Optical scanning type displacement measuring equipment
JP2013114456A (en) * 2011-11-29 2013-06-10 Nec Corp Voltage monitoring device and voltage monitoring method
JP2014079032A (en) * 2012-10-09 2014-05-01 Hitachi Appliances Inc Motor control device and refrigeration machine using the same
CN107453673A (en) * 2017-08-04 2017-12-08 北京新能源汽车股份有限公司 Method for detecting initial position of rotor, device and the electric machine control system of motor
CN107482979A (en) * 2017-08-14 2017-12-15 北京新能源汽车股份有限公司 A kind of localization method of rotor, device and single-chip microcomputer

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63109599U (en) * 1986-12-30 1988-07-14
JP4688050B2 (en) * 2006-06-13 2011-05-25 株式会社メレック Stepping motor step-out detection method and step-out detection device
EP2068436B1 (en) * 2007-12-03 2013-07-17 Roche Diagnostics GmbH Method and device for identifying step loss in a stepper motor
JP5016637B2 (en) * 2009-06-08 2012-09-05 マイコム株式会社 Stepping motor step-out detection device
JP5786283B2 (en) * 2010-06-04 2015-09-30 株式会社リコー Motor control apparatus, image forming apparatus, and motor control method
CN104422883B (en) * 2013-08-21 2017-07-21 华为技术有限公司 The detection method and detection device of a kind of motor desynchronizing
CN104092419B (en) * 2014-07-24 2017-02-01 重庆大学 Method for detecting step omitting of stepping motor
CN111082717B (en) * 2020-02-06 2022-05-03 浙江大华技术股份有限公司 Stepping motor control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07229711A (en) * 1993-12-22 1995-08-29 Matsushita Electric Works Ltd Optical scanning type displacement measuring equipment
JP2013114456A (en) * 2011-11-29 2013-06-10 Nec Corp Voltage monitoring device and voltage monitoring method
JP2014079032A (en) * 2012-10-09 2014-05-01 Hitachi Appliances Inc Motor control device and refrigeration machine using the same
CN107453673A (en) * 2017-08-04 2017-12-08 北京新能源汽车股份有限公司 Method for detecting initial position of rotor, device and the electric machine control system of motor
CN107482979A (en) * 2017-08-14 2017-12-15 北京新能源汽车股份有限公司 A kind of localization method of rotor, device and single-chip microcomputer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无刷直流电动机无位置传感器起动控制的研究;王小宁等;《微特电机》;第46卷(第2期);全文 *

Also Published As

Publication number Publication date
CN112923839A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN112865021B (en) Motor protection method, device, equipment and storage medium
CN113176501B (en) Equipment fault detection method and equipment based on Internet of things and storage medium
CN111928422A (en) Fan system operation abnormity detection method and device, air conditioner and storage medium
CN112923839B (en) Stepping motor control method, device, equipment and storage medium
CN113507487B (en) CAN communication safety detection method and device, electronic equipment and vehicle
JP5208377B2 (en) Electric motor driving apparatus and electric motor driving method
JP2005092297A (en) Automatic setting method of vibration suppression filter
CN110850850B (en) Off-line detection method, device and equipment for cooling water pump and storage medium
CN112858984B (en) Motor driving current calibration method, device, equipment and storage medium
CN112798954B (en) Detection method and device for vibration motor
CN110987448B (en) Engine air inlet state monitoring method, device and equipment
CN111765962A (en) System and method for testing vibration noise performance of direct current motor driving system
CN112904199B (en) Method and device for processing motor locked-rotor fault
CN115495363A (en) Software testing method, electronic equipment and readable storage medium
CN112039023B (en) Motor controller overcurrent self-recovery method and device, electronic equipment and storage medium
CN115144749A (en) Motor test system based on big data
CN113641149B (en) Tool magazine operation control method, device, equipment and storage medium
CN114460464A (en) Motor calibration method and device
JP4285057B2 (en) Servo control device
CN111308344A (en) Electrical appliance, motor fault identification method and device thereof and storage medium
CN111224592A (en) Permanent magnet motor control method of nonlinear model
CN112240978A (en) Blanking motor exception handling method, blanking system and storage medium
CN111090045A (en) Method and device for diagnosing loss of field of permanent magnet synchronous motor
CN110646746B (en) Power supply driving fault test system and method
CN112865666B (en) Method and device for generating fault prompt information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant