CN116073702A - Equipment zeroing method and device, terminal equipment and medium - Google Patents

Equipment zeroing method and device, terminal equipment and medium Download PDF

Info

Publication number
CN116073702A
CN116073702A CN202211373649.9A CN202211373649A CN116073702A CN 116073702 A CN116073702 A CN 116073702A CN 202211373649 A CN202211373649 A CN 202211373649A CN 116073702 A CN116073702 A CN 116073702A
Authority
CN
China
Prior art keywords
zeroing
real
motor
pulse signal
stepping motor
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.)
Pending
Application number
CN202211373649.9A
Other languages
Chinese (zh)
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 Yankong Automation Technology Co ltd
Original Assignee
Shenzhen Yankong Automation 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 Yankong Automation Technology Co ltd filed Critical Shenzhen Yankong Automation Technology Co ltd
Priority to CN202211373649.9A priority Critical patent/CN116073702A/en
Publication of CN116073702A publication Critical patent/CN116073702A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P3/00Arrangements for stopping or slowing electric motors, generators, or dynamo-electric converters
    • H02P3/02Details of stopping control
    • H02P3/025Details of stopping control holding the rotor in a fixed position after deceleration
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P3/00Arrangements for stopping or slowing electric motors, generators, or dynamo-electric converters
    • H02P3/06Arrangements for stopping or slowing electric motors, generators, or dynamo-electric converters for stopping or slowing an individual dynamo-electric motor or dynamo-electric converter

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

The invention discloses a device zeroing method, a device, a terminal device and a computer readable storage medium, wherein the method comprises the following steps: acquiring real-time operation parameters and standard operation parameters of a motor operated by driving equipment, and detecting pulse signals corresponding to mechanical limit of limiting equipment operation according to the real-time operation parameters and the standard operation parameters; and carrying out motor zeroing operation according to the pulse signal. The invention can carry out equipment zeroing based on mechanical limit, and realizes flexible and accurate equipment zeroing operation.

Description

Equipment zeroing method and device, terminal equipment and medium
Technical Field
The present invention relates to the field of automatic control technologies, and in particular, to a device zeroing method, a device, a terminal device, and a computer readable storage medium.
Background
And returning the equipment to zero, namely returning the control equipment to a preset original point position, and further executing subsequent task control and processing operation based on the original point position.
In the related art, a sensor signal may be used as a return-to-zero origin, specifically, a hall switch, a photodiode, or the like is installed at the return-to-zero origin, and when the apparatus returns thereto, the sensor emits a detection signal, and when the control circuit detects the signal, the apparatus is controlled to stop at the corresponding position. However, the zeroing mode of the equipment increases the complexity of the circuit and cannot be universally applied to various industrial scenes.
Disclosure of Invention
The invention mainly aims to provide a device zeroing method, a device, terminal equipment and a computer readable storage medium, and aims to realize flexible and accurate device zeroing operation by directly conducting device zeroing based on mechanical limit.
To achieve the above object, the present invention provides a device zeroing method, which includes the steps of:
acquiring real-time operation parameters and standard operation parameters of a motor operated by driving equipment, and detecting pulse signals corresponding to mechanical limit of limiting equipment operation according to the real-time operation parameters and the standard operation parameters;
and performing equipment zeroing operation according to the pulse signal.
Optionally, the real-time operation parameters include a first real-time operation parameter, and the standard operation parameters include: the method comprises the steps of acquiring a real-time operation parameter and a standard operation parameter of a motor operated by driving equipment, and detecting a pulse signal corresponding to mechanical limit of the operation of the limiting equipment according to the real-time operation parameter and the standard operation parameter, wherein the step comprises the following steps:
controlling the stepping motor to run in a preset direction through a pulse instruction triggered by the stepping driver;
Acquiring a first real-time operation parameter of the stepping motor through a motor encoder, and taking a parameter corresponding to the pulse instruction as a first standard operation parameter;
and detecting that the rising edge of the pulse signal corresponding to the mechanical limit of the operation of the limiting equipment is effective when the first real-time operation parameter is in a preset first range and the difference value between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold value.
Optionally, when the mechanical limit is an elastic limit, after the step of detecting that the rising edge of the pulse signal corresponding to the mechanical limit is effective when the first real-time operation parameter is within a preset first range and the difference between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold, the method further includes:
controlling the stepping motor to run in the direction opposite to the preset direction through the stepping driver, and acquiring the current second real-time running parameter and the current second standard running parameter of the stepping motor;
when the difference value between the second real-time operation parameter and the second standard operation parameter is a preset first reference value, triggering a torque instruction through the step driver;
And at the elastic limit position, unloading the stepping motor based on the torque command to detect that the falling edge of the pulse signal corresponding to the elastic limit is effective.
Optionally, the step of unloading the stepping motor at the elastic limit based on the torque command includes:
controlling the motor shaft torque of the stepping motor to be reduced to a preset second reference value according to the torque command, and acquiring the current third real-time operation parameter of the stepping motor so as to unload the stepping motor at the elastic limit position;
the step of detecting the pulse signal corresponding to the mechanical limit of the operation of the limiting equipment comprises the following steps:
and detecting the falling edge of the pulse signal corresponding to the elastic limit to take effect when the third real-time operation parameter is in a preset second range.
Optionally, the step of performing motor zeroing operation according to the pulse signal includes:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether a rising edge or a falling edge of a pulse signal of the mechanical limit point is detected in the running process;
if yes, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the rising edge or the first motor Z signal after the falling edge is detected in the running process;
And if the Z signal of the first motor is detected, controlling the stepping motor to stop running so as to finish the zeroing operation of the equipment.
Optionally, the step of performing a return-to-zero operation on the motor according to the pulse signal includes:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
if the rising edge is detected, the stepping motor is controlled to stop running so as to finish the equipment zeroing operation.
Optionally, the step of performing a return-to-zero operation on the motor according to the pulse signal includes:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
if the rising edge is detected, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the falling edge is detected again in the running process;
if the falling edge is detected, the motor is controlled to stop running so as to finish the zeroing operation of the equipment.
In order to achieve the above object, the present invention further provides a device zeroing apparatus, where the device zeroing apparatus includes:
The determining module is used for acquiring real-time operation parameters and standard operation parameters of a motor operated by the driving equipment and detecting pulse signals corresponding to mechanical limit of the operation of the limiting equipment according to the real-time operation parameters and the standard operation parameters;
and the zeroing module is used for carrying out equipment zeroing operation according to the pulse signal.
In order to achieve the above object, the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a device zeroing program stored on the memory and executable on the processor, and the device zeroing program is executed by the processor to implement the steps of the device zeroing method as described above.
In addition, to achieve the above object, the present invention also proposes a computer-readable storage medium having stored thereon a device zeroing program which, when executed by a processor, implements the steps of the device zeroing method as described above.
To achieve the above object, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the device zeroing method as described above.
The invention provides a device zeroing method, a device, a terminal device, a computer readable storage medium and a computer program product, wherein a pulse signal corresponding to mechanical limit of limiting device operation is detected by acquiring a real-time operation parameter and a standard operation parameter of a motor for driving the device to operate and according to the real-time operation parameter and the standard operation parameter; and performing equipment zeroing operation according to the pulse signal.
Compared with the prior art that the zeroing is performed through the sensor, in the invention, the pulse signal corresponding to the mechanical limit is directly obtained according to the real-time operation parameter and the standard operation parameter of the motor, and then the zeroing operation of the equipment is performed according to the pulse signal. Therefore, the invention can directly carry out zero-returning operation on the motor according to mechanical limit, does not need to add an additional circuit, simplifies the complex operation of equipment zero-returning, and simultaneously, compared with the method which directly uses pulse signals to carry out zero-returning operation, the invention improves the zero-returning precision and is generally applicable to the zero-returning operation of various driving systems.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of an embodiment of the device zeroing method of the present invention;
FIG. 3-1 is a first schematic diagram of a device zeroing method according to an embodiment of the present invention;
FIG. 3-2 is a second schematic diagram of a device zeroing method according to an embodiment of the present invention;
FIG. 4-1 is a third schematic diagram of a device zeroing method according to an embodiment of the present invention;
FIG. 4-2 is a fourth schematic diagram illustrating a device zeroing method according to an embodiment of the present invention;
FIG. 5-1 is a fifth schematic diagram illustrating a device zeroing method according to an embodiment of the present invention;
FIG. 5-2 is a sixth schematic diagram illustrating a device zeroing method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of functional modules of an embodiment of the apparatus for zeroing a 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 device structure of a hardware running environment according to an embodiment of the present invention.
The terminal equipment in the embodiment of the invention can be a driver for driving a motor to run, and the like, and also can be a smart phone, an industrial personal computer, a server, network equipment and the like, and the terminal equipment in the embodiment can be used for accurate zeroing of equipment.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. 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., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), 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 device configuration shown in fig. 1 does not constitute a limitation of the device return-to-zero device, and may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
As shown in fig. 1, an operation, a network communication module, a user interface module, and a device zeroing program may be included in the memory 1005 as one type of computer storage medium. Operations are programs that manage and control device hardware and software resources, supporting the execution of device zeroing programs, as well as other software or programs. In the device shown in fig. 1, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to call a device zeroing program stored in the memory 1005 and perform the following operations:
Acquiring real-time operation parameters and standard operation parameters of a motor operated by driving equipment, and detecting pulse signals corresponding to mechanical limit of limiting equipment operation according to the real-time operation parameters and the standard operation parameters;
and performing equipment zeroing operation according to the pulse signal.
Further, the real-time operating parameters include a first real-time operating parameter, and the standard operating parameters include: the processor 1001 may be configured to call a device zeroing program stored in the memory 1005 and perform the following operations:
controlling the stepping motor to run in a preset direction through a pulse instruction triggered by the stepping driver;
acquiring a first real-time operation parameter of the stepping motor through a motor encoder, and taking a parameter corresponding to the pulse instruction as a first standard operation parameter;
and detecting that the rising edge of the pulse signal corresponding to the mechanical limit of the operation of the limiting equipment is effective when the first real-time operation parameter is in a preset first range and the difference value between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold value.
Further, when the mechanical limit is an elastic limit, after detecting that the rising edge of the pulse signal corresponding to the mechanical limit is effective when the first real-time operation parameter is within a preset first range and the difference between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold, the processor 1001 may be configured to call a device zeroing program stored in the memory 1005, and perform the following operations:
Controlling the stepping motor to run in the direction opposite to the preset direction through a stepping driver, and acquiring the current second real-time running parameter and the current second standard running parameter of the stepping motor;
when the difference value between the second real-time operation parameter and the second standard operation parameter is a preset first reference value, triggering a torque instruction through the step driver;
and at the elastic limit position, unloading the stepping motor based on the torque command, and detecting that the falling edge of the pulse signal corresponding to the elastic limit is effective.
Further, the processor 1001 may be configured to call a device zeroing program stored in the memory 1005, and perform the following operations:
controlling the motor shaft torque of the stepping motor to be reduced to a preset second reference value according to the torque command so as to unload the force of the stepping motor at the elastic limit position and obtain the current third real-time operation parameter of the stepping motor;
the processor 1001 may be configured to call a device zeroing program stored in the memory 1005 and perform the following operations:
and detecting the falling edge of the pulse signal corresponding to the elastic limit to take effect when the third real-time operation parameter is in a preset second range.
Further, the processor 1001 may be configured to call a device zeroing program stored in the memory 1005, and perform the following operations:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether a rising edge or a falling edge of a pulse signal of the mechanical limit point is detected in the running process;
if yes, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the rising edge or the first motor Z signal after the falling edge is detected in the running process;
and if the Z signal of the first motor is detected, controlling the stepping motor to stop running so as to finish the zeroing operation of the equipment.
Further, the processor 1001 may be configured to call a device zeroing program stored in the memory 1005, and perform the following operations:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
if the rising edge is detected, the stepping motor is controlled to stop running so as to finish the equipment zeroing operation.
Further, the processor 1001 may be configured to call a device zeroing program stored in the memory 1005, and perform the following operations:
Controlling a stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
if the rising edge is detected, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the falling edge is detected again in the running process;
if the falling edge is detected, the motor is controlled to stop running so as to finish the zeroing operation of the equipment.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the device zeroing method of the present invention.
Embodiments of the present invention provide embodiments of a device zeroing method, it being noted that although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than what is shown or described herein.
The stepper drive system requires zero calibration prior to operation. Many methods of zero calibration, such as the installation of a stop at the zero position, which is blocked by the stop when the stepper motor control device returns to the zero position, are simple, but when the device is blocked by the stop, severe jitter and loud noise may be generated. The mode occupies installation space and increases wiring cost, and the precision can be in error due to the influence of the speed of returning to the original point, mechanical errors and temperature dust. In order to make the zeroing of the automatic equipment more accurate and convenient, a sensor signal can be used as a zeroing origin, specifically, a Hall switch, a photodiode and other sensors are arranged at a zero position, when the stepping motor control equipment returns to the zero position, the sensor sends out a detection signal, and the motor is controlled to stop when the control circuit detects the signal. However, such a device zeroing increases the complexity of the circuit and is not universally applicable to various industrial scenarios, such as industrial sites where sensors cannot be installed.
Based on the above problems, the invention provides a device zeroing method applicable to a stepping driving system, in the invention, a mechanical structure is used as a limit instead of a sensor, and after the mechanical limit is detected, the mechanical limit is used as an origin, or a motor Z signal is continuously searched reversely to be used as the origin, wherein the motor Z signal is a single pulse signal (also called zero pulse or identification pulse) sent by a motor encoder for each rotation, and the single pulse signal is used for determining the origin position so as to control the motor to stop running at the origin position, thereby realizing more flexible device zeroing operation.
Specifically, the device zeroing method in this embodiment may be applied to a motor driver, and the motor driver executes the method, and specifically includes the following steps:
step S10, acquiring real-time operation parameters and standard operation parameters of a motor for driving equipment to operate, and detecting pulse signals corresponding to mechanical limit for limiting equipment to operate according to the real-time operation parameters and the standard operation parameters;
it should be noted that, in this embodiment, the motor may be a stepper motor, the corresponding real-time operation parameter is an operation parameter of the stepper motor (for example, the number of steps of the motor running in real time) obtained by using the motor encoder, and the standard operation parameter is an operation parameter corresponding to a pulse signal triggered by a stepper driver connected to the stepper motor (for example, the number of steps the stepper motor should theoretically take when the stepper driver sends a certain number of pulse signals to the stepper motor).
On the basis, after the motor driver acquires the real-time operation parameters and the standard operation parameters of the stepping motor, the pulse signals corresponding to the preset mechanical limit are detected according to the acquired real-time operation parameters and the standard operation parameters, wherein the mechanical limit is a component for limiting the operation of the equipment, and the mechanical limit is not specifically limited in the embodiment, for example, the mechanical limit can be rigid limit or elastic limit. In addition, the pulse signal in this embodiment is a flag bit generated by the motor driver for the device zeroing operation, and includes a rising edge and a falling edge.
And step S20, performing equipment zeroing operation according to the pulse signal.
After the terminal equipment determines the pulse signal corresponding to the mechanical limit, the zero return operation is carried out on the stepping motor according to the pulse signal, so that the motor can stop at a preset origin.
It should be noted that, in this embodiment, different origins (i.e. zero points of the device zeroing) may be determined according to different types of mechanical limitations, so as to implement flexible zeroing of the device.
In this embodiment, after acquiring the real-time operation parameter and the standard operation parameter of the stepper motor, the terminal device detects a pulse signal corresponding to a preset mechanical limit according to the acquired real-time operation parameter and standard operation parameter. After the terminal equipment acquires the pulse signal corresponding to the mechanical limit, the stepping motor is subjected to zero returning operation according to the pulse signal, so that the motor can stop at a preset origin.
Compared with the mode of returning to zero through a sensor in the prior art, in the invention, the pulse signal corresponding to the mechanical limit is detected directly according to the real-time operation parameter and the standard operation parameter of the motor, and then the equipment returning to zero operation is carried out according to the pulse signal. Therefore, the invention can directly carry out zero-returning operation on the motor according to mechanical limit, does not need to add an additional circuit, simplifies the complex operation of equipment zero-returning, and simultaneously, compared with the sensor, the invention improves the zero-returning precision because the invention directly uses pulse signals to carry out zero-returning operation, and is generally applicable to zero-returning operation of various driving systems.
Further, based on the first embodiment of the inventive device zeroing, a second embodiment of the inventive device zeroing is presented.
In this embodiment, in the step S10, the "acquiring the real-time operation parameter and the standard operation parameter of the motor operated by the driving device, and detecting the pulse signal corresponding to the mechanical limit of the operation of the limiting device according to the real-time operation parameter and the standard operation parameter" may include:
step S101, controlling a stepping motor to run in a preset direction through a pulse instruction triggered by a stepping driver;
Step S102, acquiring a first real-time operation parameter of the stepping motor through a motor encoder, and taking a parameter corresponding to the pulse instruction as a first standard operation parameter;
step S103, detecting a rising edge of a pulse signal corresponding to a mechanical limit for limiting the operation of the device when the first real-time operation parameter is within a preset first range and a difference between the first standard operation parameter and the first standard operation parameter reaches a preset threshold.
In this embodiment, in order to improve the zeroing accuracy based on the mechanical limit, it is necessary to accurately detect the rising edge and the falling edge of the pulse signal corresponding to the mechanical limit, determine that the rising edge and the falling edge are effective, and on this basis, once the rising edge or the falling edge of the pulse signal is detected, perform the zeroing operation further by using the rising edge and the falling edge of the pulse signal as deceleration points or zero points (i.e., origin points).
Therefore, in this embodiment, the detection manner of the rising edge of the pulse signal corresponding to the mechanical limit is specifically: triggering a pulse command PulseRef through a step driver (PulseRef is a variable name set by a device zeroing program for executing a device zeroing method, and the rest are the same), and further controlling a step motor to run in a preset direction (such as a forward direction) according to the PulseRef; when the stepping motor operates in the forward direction, a first real-time operation parameter of the stepping motor is obtained through a motor encoder, and meanwhile, a parameter corresponding to the PulseRef is used as a first standard operation parameter of the stepping motor; further, it is detected whether the first real-time operation parameter of the stepper motor is within a preset first range and whether a difference value inposserr between the first standard operation parameter and the first real-time operation parameter of the stepper motor (inposserr is a representation of the difference value defined by the device zeroing procedure for executing the device zeroing method, in this embodiment, other representations other than inposserr may be used), whether a preset Threshold lockrotor_threshold is reached (likewise, lockrotor_threshold is a representation of the difference value defined by the device zeroing procedure for executing the device zeroing method, and if the first real-time operation parameter is detected to be in the preset first range and the difference value inposserr between the first standard operation parameter and the first real-time operation parameter reaches the preset Threshold value lockrotor_threshold, the step driver stops outputting the pulse signal to the step motor and clears the difference value inposserr, at this time, a rising edge LockRotor flag of the pulse signal corresponding to the mechanical limit is determined (the same above, the LockRotor flag also defines one of the expression modes of the rising edge for the device zero-return program executing the device zero-return method), that is, the rising edge number LockRotor flag is set to 1. In this embodiment, the preset first range and the preset threshold are not specifically limited, and may be flexibly set according to the actual zeroing scene of the stepping device.
Further, in step S103, when the first real-time operation parameter is within the preset first range and the difference between the first standard operation parameter and the first real-time operation parameter reaches the preset threshold, the rising edge of the pulse signal corresponding to the mechanical limit is detected to be effective. After "may further include:
step S104, controlling the stepping motor to run in the direction opposite to the preset direction through a stepping driver, and obtaining the current second real-time running parameter and the current second standard running parameter of the stepping motor;
step S105, triggering a torque command by the step driver when the difference between the second real-time operation parameter and the second standard operation parameter is a preset first reference value;
and S106, at the elastic limit position, unloading the stepping motor based on the torque command to detect that the falling edge of the pulse signal corresponding to the elastic limit is effective.
In this embodiment, in order to adapt the present invention to a scenario in which the mechanical limit is an elastic limit (such as a spring, an elastic baffle, etc.), it is necessary to further determine a falling edge of the pulse signal corresponding to the elastic limit.
Specifically, the detection mode of the rising edge of the pulse signal corresponding to the elastic limit is specifically as follows: after the rising edge lockrotor flag is effective, triggering a pulse instruction through a stepping driver to control the stepping motor to run in the direction opposite to the preset direction (namely reverse direction), and acquiring real-time running parameters (namely second real-time running parameters) and standard running parameters (namely second standard running parameters) in the running process of the stepping motor; further, detecting whether the difference value inosrer between the second real-time operation parameter corresponding to the stepper motor and the second standard operation parameter is reduced to a preset first reference value (in this embodiment, the preset first reference value may be specifically 0), if the difference value inosrer is detected to be reduced to 0, which means that the real-time operation parameter corresponding to the stepper motor is the same as the standard operation parameter, the device controlled by the stepper motor is at the critical point of elastic limit, that is, the device contacts with the elastic limit bit, and the magnitude of the reaction force generated by the elastic limit is just not limited to the operation of the device, at this time, the stepper driver will stop outputting the pulse signal to the stepper motor and trigger the torque command TorRef (in the same way, torRef defines a representation manner of the torque command for the device zeroing program for executing the device zeroing method); and using the torque command TorRef, the control equipment performs force unloading at the elastic limit position to determine that the falling edge of the pulse signal in the elastic limit scene is effective.
Further, in the step S106, the "force-releasing the stepping motor based on the torque command" may include:
step a, controlling the motor shaft torque of the stepper motor to be reduced to a preset second reference value according to the torque command, and obtaining the current third real-time operation parameter of the stepper motor so as to unload the force of the stepper motor at the elastic limit position;
in the step S10, the "pulse signal corresponding to the mechanical limit for detecting and limiting the operation of the device" may include "
And step S107, detecting that the falling edge signal of the pulse signal corresponding to the elastic limit is effective when the third real-time operation parameter is in a preset second range.
In this embodiment, in order to be applicable to a scenario in which mechanical limitation is elastic limitation, a falling edge corresponding to a pulse signal in the elastic limitation scenario needs to be determined, so that when the falling edge is detected, a position where the falling edge is located is used as a zero point of the device, and a device zeroing operation is implemented.
Specifically, for example, the motor driver may control the motor shaft torque of the stepper motor to drop to a preset second reference value (the preset second reference value in the present embodiment may be specifically 0) according to the torque command, so as to realize the force unloading of the motor at the elastic limit position.
And when the motor shaft torque of the stepping motor is reduced to a preset second reference value, acquiring the current real-time operation parameter (namely, a third real-time operation parameter) of the stepping motor through a motor encoder, detecting whether the third real-time operation parameter is in a preset second range after delaying DelayCnt (the delay is defined as a representation mode of the delay for a device zeroing program for executing a device zeroing method) and determining that the falling edge of a pulse signal corresponding to the elastic limit is effective when the third real-time operation parameter is detected to be in the preset second range, namely, setting the falling edge lockRotorFlag signal to 0. In this embodiment, the preset second range is not specifically limited, and may be flexibly set according to the actual zeroing scene of the stepping device.
It should be understood that, in this embodiment, the device zeroing procedure for executing the device zeroing method is not specifically limited to the defining manner of each parameter (such as the rising edge, the falling edge, the delay, etc. parameters), and may be defined in other manners besides the defining manner in this embodiment.
In this embodiment, if it is detected that the first real-time operation parameter corresponding to the stepper motor is in the preset first range and the difference between the first standard operation parameter and the first real-time operation parameter reaches the preset threshold, the rising edge of the pulse signal corresponding to the mechanical limit is detected to be effective. After the rising edge is effective, the terminal equipment controls the difference value between the second real-time operation parameter corresponding to the stepping motor and the second standard operation parameter to be reduced to 0, controls the motor shaft torque of the stepping motor to be reduced to 0 according to the torque command triggered by the motor driver, further obtains the current third real-time operation parameter of the stepping motor through the motor encoder, and detects that the falling edge of the pulse signal corresponding to the elastic limit is effective when the third real-time operation parameter is in a preset second range.
Therefore, the invention can accurately detect the rising edge and the falling edge of the pulse signal corresponding to the mechanical limit, so as to realize the accurate zeroing of the motor by utilizing the rising edge and the falling edge, and is applicable to zeroing systems of various devices, thereby reducing the zeroing operation complexity, improving the zeroing accuracy of the system and improving the user experience.
Further, based on the first embodiment and the second embodiment of the apparatus zeroing method of the present invention, a third embodiment of the apparatus zeroing method of the present invention is presented.
In this embodiment, in the above step S20, "performing the motor zeroing operation according to the pulse signal" may include:
step S201, controlling a stepping motor to run at a low speed in a preset direction, and judging whether a rising edge or a falling edge of a pulse signal of the mechanical limit point is detected in the running process;
and step S202, if yes, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the rising edge or the first motor Z signal after the falling edge is detected in the running process.
Step S203, if the first motor Z signal is detected, the step motor is controlled to stop running, so as to complete the device zeroing operation.
In this embodiment, after the rising edge or the falling edge of the pulse signal corresponding to the mechanical limit is validated, the device zeroing operation may be performed according to the rising edge or the falling edge.
Specifically, for example, as shown in fig. 3-1, the motor Z signal is used as an origin (i.e., zero point), and the rising edge of the mechanical limit is used as a deceleration point. In this scenario, when the terminal device controls the stepper motor to run at a low speed in a preset direction (forward direction), the terminal device decelerates and stops when detecting a deceleration point, runs at a low speed in a reverse direction, and judges whether a first motor Z signal after a rising edge is detected in the process of running at the low speed in the reverse direction, if the first motor Z signal is detected, the terminal device stops running.
Or, as shown in fig. 3-2, the motor Z signal is used as an origin, and the falling edge of the mechanical limit is used as a deceleration point. In this scenario, when the terminal device controls the stepper motor to run at a low speed in a direction (reverse direction) opposite to the preset direction, the terminal device decelerates and stops when detecting a deceleration point, and runs at a forward low speed, and in the forward low speed running process, judges whether a first motor Z signal after a falling edge is detected, and if the first motor Z signal is detected, stops running. It should be noted that, in the present embodiment, the forward direction and the reverse direction are defined directions, and referring to fig. 3-1 and 3-2, the right direction operation is the forward direction operation, and the reverse direction operation is the reverse direction operation.
Further, in the above step S20, "performing the motor zeroing operation according to the pulse signal" may include:
step S204, controlling the stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
and step S205, if the rising edge is detected, controlling the stepping motor to stop running so as to finish the equipment zeroing operation.
In this embodiment, in order to adapt to an industrial scenario in which the mechanical limit is a rigid limit, the rising edge of the mechanical limit is directly used as the origin, and no deceleration point is set in such a scenario.
Specifically, for example, as shown in fig. 4-1, when the terminal device controls the stepping motor to operate at a low speed in a preset direction (forward direction) with the rising edge of the mechanical limit as the origin, the terminal device stops operating when the rising edge of the mechanical limit, i.e., the origin, is detected.
Or, as shown in fig. 4-2, when the falling edge of the mechanical limit is used as the origin, the terminal device stops running when the rising edge of the mechanical limit, namely, the origin, is detected when the stepping motor is controlled to run at a low speed in a direction (reverse direction) opposite to the preset direction.
Further, in the step S20, "performing the motor zeroing operation according to the pulse signal" may include:
step S206, controlling the stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
step S207, if the rising edge is detected, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the falling edge is detected again in the running process;
and step S208, if the falling edge is detected, controlling the motor to stop running so as to finish the equipment zeroing operation.
In this embodiment, in order to adapt to an industrial scenario in which the mechanical limit is an elastic limit, a rising edge of the mechanical limit is taken as a deceleration point, and a falling edge of the mechanical limit is correspondingly taken as an origin.
Specifically, for example, as shown in fig. 5-1, when the terminal device controls the stepper motor to run at a low speed in a preset direction (forward direction), the terminal device stops decelerating when detecting a rising edge of the mechanical limit, that is, a deceleration point, and runs at a low speed in a reverse direction, and determines whether a falling edge of the mechanical limit is detected during the running at the low speed in the reverse direction, if the falling edge is detected, the terminal device stops running.
Or as shown in fig. 5-2, when the terminal device controls the stepping motor to run at a low speed (reverse direction) in a direction opposite to the preset direction, the terminal device stops decelerating when detecting the rising edge of the mechanical limit, namely the deceleration point, and runs at a low speed in the forward direction, and judges whether the falling edge of the mechanical limit is detected or not in the process of running at the low speed in the forward direction, if the falling edge is detected, the terminal device stops running.
In the embodiment, the device zeroing mode under the conditions of rigid limit, elastic limit and other limit is provided, so that the device zeroing method and device can be applied to zeroing systems of various devices, the zeroing operation complexity is reduced, the zeroing accuracy of the system is improved, and the user experience is also improved.
In addition, an embodiment of the present invention further provides a device zeroing apparatus, referring to fig. 6, where the device zeroing apparatus includes:
the determining module 10 is configured to obtain a real-time operation parameter and a standard operation parameter of a motor that drives the device to operate, and detect a pulse signal corresponding to a mechanical limit that limits the device to operate according to the real-time operation parameter and the standard operation parameter; the method comprises the steps of carrying out a first treatment on the surface of the
And the zeroing module 20 is used for performing motor zeroing operation according to the pulse signal.
Further, the real-time operating parameters include a first real-time operating parameter, and the standard operating parameters include: a first standard operating parameter, the determining module 10, comprises:
the control unit is used for controlling the stepping motor to run in a preset direction through a pulse instruction triggered by the stepping driver;
the first parameter acquisition unit is used for acquiring a first real-time operation parameter of the stepping motor through a motor encoder and taking a parameter corresponding to the pulse instruction as a first standard operation parameter;
the rising edge validating unit is used for detecting that the rising edge of the pulse signal corresponding to the mechanical limit of the limiting equipment runs is validated when the first real-time operation parameter is in a preset first range and the difference value between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold value.
Further, when the mechanical limit is an elastic limit, the determining module 10 further includes:
the second parameter acquisition unit is used for controlling the stepping motor to run in the direction opposite to the preset direction through the stepping driver and acquiring the current second real-time running parameter and the current second standard running parameter of the stepping motor;
The torque instruction triggering unit is used for triggering a torque instruction through the step driver when the difference value between the second real-time operation parameter and the second standard operation parameter is a preset first reference value;
and the force unloading unit is used for unloading the force of the stepping motor based on the torque command at the elastic limit position so as to detect that the falling edge of the pulse signal corresponding to the elastic limit is effective.
Further, the force unloading unit includes:
the control subunit is used for controlling the motor shaft torque of the stepping motor to be reduced to a preset second reference value according to the torque command, and acquiring the current third real-time operation parameter of the stepping motor so as to unload the stepping motor at the elastic limit position;
the determining module 10 includes:
and the falling edge validation unit is used for detecting the falling edge validation of the pulse signal corresponding to the elastic limit when the third real-time operation parameter is in a preset second range.
Further, the zeroing module 20 includes:
the first judging unit is used for controlling the stepping motor to run at a low speed in a preset direction and judging whether the rising edge or the falling edge of the pulse signal of the mechanical limit point is detected in the running process;
The second judging unit is used for controlling the stepping motor to run at a low speed in a direction opposite to the preset direction and judging whether the rising edge or the first motor Z signal after the falling edge is detected in the running process;
and the first zeroing unit is used for controlling the stepping motor to stop running so as to finish the zeroing operation of the equipment.
Further, the zeroing module 20 includes:
a third judging unit for controlling the stepping motor to run at a low speed in a preset direction and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
and the second zeroing unit is used for controlling the stepping motor to stop running so as to finish the zeroing operation of the equipment.
Further, the zeroing module 20 includes:
a fourth judging unit for controlling the stepping motor to run at a low speed in a preset direction and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
a fifth judging unit for controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the falling edge is detected again in the running process;
and the third zeroing unit is used for controlling the motor to stop running so as to finish zeroing operation of the equipment.
The expansion content of the specific implementation mode of the equipment zeroing system is basically the same as that of each embodiment of the equipment zeroing method, and the details are not repeated here.
In addition, the embodiment of the invention also provides a computer readable storage medium, wherein the storage medium is stored with a device zeroing program, and the device zeroing program realizes the steps of a device zeroing method when being executed by a processor.
Embodiments of the apparatus zeroing apparatus and the computer readable storage medium of the present invention may refer to embodiments of the apparatus zeroing method of the present invention, and are not 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 (such as ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a motor driver or a smart phone, an industrial personal computer, a server, 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 (10)

1. A device zeroing method, wherein the device zeroing method comprises:
acquiring real-time operation parameters and standard operation parameters of a motor operated by driving equipment, and detecting pulse signals corresponding to mechanical limit of limiting equipment operation according to the real-time operation parameters and the standard operation parameters;
and performing equipment zeroing operation according to the pulse signal.
2. The apparatus zeroing method of claim 1, wherein the real-time operation parameters include a first real-time operation parameter, the standard operation parameters include a first standard operation parameter, the step of acquiring the real-time operation parameter and the standard operation parameter of the motor driving the apparatus to operate, and detecting a pulse signal corresponding to a mechanical limit limiting the operation of the apparatus according to the real-time operation parameter and the standard operation parameter includes:
controlling the stepping motor to run in a preset direction through a pulse instruction triggered by the stepping driver;
acquiring the first real-time operation parameter of the stepping motor through a motor encoder, and taking the parameter corresponding to the pulse instruction as the first standard operation parameter;
and detecting the rising edge of a pulse signal corresponding to the mechanical limit of limiting equipment operation when the first real-time operation parameter is in a preset first range and the difference value between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold value.
3. The apparatus zeroing method of claim 2, wherein when the mechanical limit is an elastic limit, after the step of detecting a rising edge of a pulse signal corresponding to the mechanical limit when the first real-time operation parameter is within a preset first range and a difference between the first standard operation parameter and the first real-time operation parameter reaches a preset threshold, further comprising:
controlling the stepping motor to run in the direction opposite to the preset direction through the stepping driver, and acquiring the current second real-time running parameter and the current second standard running parameter of the stepping motor;
when the difference value between the second real-time operation parameter and the second standard operation parameter is a preset first reference value, triggering a torque instruction through the step driver;
and at the elastic limit position, unloading the stepping motor based on the torque command so as to detect the falling edge of the pulse signal corresponding to the elastic limit.
4. The apparatus zeroing method of claim 3, wherein said step of de-energizing said stepper motor at said elastic limit based on said torque command comprises:
controlling the motor shaft torque of the stepping motor to be reduced to a preset second reference value according to the torque command, and acquiring the current third real-time operation parameter of the stepping motor so as to unload the stepping motor at the elastic limit position;
The step of detecting the pulse signal corresponding to the mechanical limit of the operation of the limiting equipment comprises the following steps:
and detecting the falling edge of the pulse signal corresponding to the elastic limit when the third real-time operation parameter is in a preset second range.
5. The device zeroing method of claim 1, wherein said step of performing a device zeroing operation based on said pulse signal comprises:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether a rising edge or a falling edge of a pulse signal of the mechanical limit point is detected in the running process;
if yes, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the rising edge or the first motor Z signal after the falling edge is detected in the running process;
and if the Z signal of the first motor is detected, controlling the stepping motor to stop running so as to finish the zeroing operation of the equipment.
6. The apparatus zeroing method according to claim 1, wherein the step of zeroing the motor according to the pulse signal comprises:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
If the rising edge is detected, the stepping motor is controlled to stop running so as to finish the equipment zeroing operation.
7. The apparatus zeroing method according to claim 1, wherein the step of zeroing the motor according to the pulse signal comprises:
controlling a stepping motor to run at a low speed in a preset direction, and judging whether the rising edge of the pulse signal of the mechanical limit point is detected or not in the running process;
if the rising edge is detected, controlling the stepping motor to run at a low speed in a direction opposite to the preset direction, and judging whether the falling edge of the pulse signal is detected or not in the running process;
if the falling edge is detected, the motor is controlled to stop running so as to finish the zeroing operation of the equipment.
8. A device zeroing apparatus, comprising:
the determining module is used for acquiring real-time operation parameters and standard operation parameters of a motor operated by the driving equipment and detecting pulse signals corresponding to mechanical limit of the operation of the limiting equipment according to the real-time operation parameters and the standard operation parameters;
and the zeroing module is used for carrying out equipment zeroing operation according to the pulse signal.
9. A terminal device comprising a memory, a processor and a base device zeroing program stored on the memory and executable on the processor, the device zeroing program when executed by the processor implementing the steps of the device zeroing method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a device zeroing program, which when executed by a processor, implements the steps of the device zeroing method of any of claims 1 to 7.
CN202211373649.9A 2022-11-03 2022-11-03 Equipment zeroing method and device, terminal equipment and medium Pending CN116073702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211373649.9A CN116073702A (en) 2022-11-03 2022-11-03 Equipment zeroing method and device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211373649.9A CN116073702A (en) 2022-11-03 2022-11-03 Equipment zeroing method and device, terminal equipment and medium

Publications (1)

Publication Number Publication Date
CN116073702A true CN116073702A (en) 2023-05-05

Family

ID=86182806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211373649.9A Pending CN116073702A (en) 2022-11-03 2022-11-03 Equipment zeroing method and device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN116073702A (en)

Similar Documents

Publication Publication Date Title
CN110793553B (en) Zero point positioning method, system, servo motor and storage medium
CN110955274B (en) Displacement control method, system, servo motor and storage medium
US7501783B2 (en) Method of automatically setting vibration suppression filter and automatic setting apparatus for vibration suppression filter
CN109687782B (en) Control device and control system of stepping motor
CN107607743B (en) Acceleration correction method, terminal and related medium product
CN112208356B (en) Torque control method, device, storage medium and apparatus
CN114919642B (en) Electric power steering compensation method and device and vehicle
US20110040525A1 (en) Method and system for calculating elementary symmetric functions of subsets of a set
CN116073702A (en) Equipment zeroing method and device, terminal equipment and medium
CN111157832A (en) Electromagnetic compatibility testing method and device and computer readable storage medium
US20190256063A1 (en) Deceleration determination device and non-transitory computer readable storage medium for storing program thereof
CN110617208A (en) DC brushless water pump and no-load protection method thereof
CN112065977A (en) Gear shifting position identification method, gear shifting position identification device, gear shifting position identification equipment and storage medium
CN112255931B (en) Data processing method and device, storage medium and electronic equipment
CN108021153A (en) A kind of workbench back to zero control method and system
US20150229122A1 (en) Method and device for recognizing a short circuit in a pwn driver circuit
US9977048B2 (en) Method and device for examining signals
CN112148152A (en) Drive processing method and device for input device, electronic device and medium
CN108173608B (en) Method, apparatus and storage medium for obtaining power estimation value and electronic device
CN114362638A (en) Method, system, terminal device and medium for latching motor position
CN111605526A (en) Brake pressure adjusting method, device, equipment and readable storage medium
JP6610162B2 (en) State determination device and state determination method
CN115703474A (en) Detection method and device for clamping stagnation fault of accelerator pedal, electronic equipment, storage medium and vehicle
CN110154084B (en) Sensor unit, control method, and recording medium
KR102371615B1 (en) Apparatus and method for estimating motion state of surrounding vehicle

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