CN112824059B - Encoder data conversion method, device and equipment - Google Patents
Encoder data conversion method, device and equipment Download PDFInfo
- Publication number
- CN112824059B CN112824059B CN201911119375.9A CN201911119375A CN112824059B CN 112824059 B CN112824059 B CN 112824059B CN 201911119375 A CN201911119375 A CN 201911119375A CN 112824059 B CN112824059 B CN 112824059B
- Authority
- CN
- China
- Prior art keywords
- motor
- incremental encoder
- servo driver
- value
- turn
- 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
Links
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1602—Programme controls characterised by the control system, structure, architecture
- B25J9/161—Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01D—MEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
- G01D5/00—Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P5/00—Arrangements specially adapted for regulating or controlling the speed or torque of two or more electric motors
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P2203/00—Indexing scheme relating to controlling arrangements characterised by the means for detecting the position of the rotor
- H02P2203/03—Determination of the rotor position, e.g. initial rotor position, during standstill or low speed operation
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- Fuzzy Systems (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Power Engineering (AREA)
- Control Of Electric Motors In General (AREA)
Abstract
The invention discloses a method, a device and equipment for converting encoder data, which are used for converting the pulse number of an incremental encoder into a single-turn value and a turn number of a motor rotating shaft, can ensure that the position of the motor rotating shaft can be recorded after a servo driver is powered off, and ensure that a robot can still normally work after the servo driver is powered off. The method comprises the following steps: acquiring the accumulated pulse number of an incremental encoder on at least one motor; converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor; and sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
Description
Technical Field
The invention relates to the technical field of industrial robots, in particular to a method, a device and equipment for converting encoder data.
Background
The servo driver is an important component in the technical field of intelligent control at present, is particularly widely applied to automation equipment such as industrial robots, numerical control machining centers and the like, is mainly applied to high-precision positioning systems, generally controls a servo motor in three modes of position, speed and moment, realizes position measurement by connecting an encoder, is installed on the motor, acquires rotation information of a motor rotating shaft, and sends the rotation information to the servo driver of a control motor.
At present, the servo motors of many old industrial robots use incremental encoders, the incremental encoders generally can adopt pulse counting to represent the number of turns of motor rotation, a servo driver receives pulses of the incremental encoders and accumulates the number of received pulses to determine the position of the motor rotation, but in actual conditions, the condition of power failure of the servo driver often occurs, after the power failure of the servo driver, the industrial robot may still move due to inertia, or the movement of the industrial robot changes due to manual handling, but at the moment, the incremental encoders cannot send pulses to the servo driver, so that the position of the motor cannot be judged after the servo driver is powered on again, the robot cannot work, and needs to move to a reference position first, and time is consumed.
Disclosure of Invention
The invention provides a method, a device and equipment for converting encoder data, which are used for converting the pulse number of an incremental encoder into a single-turn value and a turn number of a motor rotating shaft, can ensure that the position of the motor rotating shaft can be recorded after a servo driver is powered off, and ensure that a robot can still normally work after the servo driver is powered off.
In a first aspect, the present invention provides a method for converting encoder data, the method comprising:
acquiring the accumulated pulse number of an incremental encoder on at least one motor;
converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
and sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver determines the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
As an alternative embodiment, converting the number of pulses of the incremental encoder on the at least one motor into a single turn value and a number of turns of the motor shaft according to the accuracy of the incremental encoder on the at least one motor, includes:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
As an alternative embodiment, obtaining the number of pulses accumulated by an incremental encoder on at least one motor comprises:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
after the pulse number of the incremental encoder on at least one motor is acquired periodically, the method further comprises the following steps:
determining the difference between the number of pulses in the period and the number of pulses in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation manner, if the number of pulses in the present period is greater than a first preset threshold, and/or the difference is greater than a second preset threshold, sending a corresponding alarm state to the servo driver, including:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As an alternative embodiment, after converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a number of turns of the motor shaft, the method further comprises the following steps:
and storing the single-turn value and the turn number in a memory powered by a non-servo driver.
In a second aspect, the present invention provides a method for converting encoder data, the method comprising:
the method comprises the steps that a servo driver receives a single-circle value and a circle number corresponding to at least one motor, wherein the single-circle value and the circle number are obtained by converting the pulse number accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor;
and the servo driver determines the absolute position of the motor rotating shaft according to the single-turn value and the turn number.
As an optional implementation, the method further comprises:
the servo driver receives an alarm state and verification data of the motor, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration;
and after the servo driver passes the verification of the verification data, controlling the motor to decelerate or stop according to the alarm state of the motor.
In a third aspect, the present invention provides an encoder data conversion system, comprising: the servo driver comprises an encoder conversion module, at least one servo driver and at least one incremental encoder, wherein the encoder conversion module comprises at least one first interface connected with the servo driver and at least one second interface connected with the incremental encoder, and the servo driver comprises:
the encoder conversion module is used for acquiring the accumulated pulse number of the incremental encoder on at least one motor; converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor; sending the single-circle value and the number of turns in the memory to a servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns;
the servo driver is used for receiving a single-circle value and a number of circles corresponding to at least one motor, wherein the single-circle value and the number of circles are obtained by converting the number of pulses accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor; and determining the absolute position of the motor rotating shaft according to the single-turn value and the number of turns.
In a fourth aspect, the present invention provides an encoder data conversion apparatus, comprising: the device comprises a pulse number acquisition module, a conversion module and a sending module, wherein:
the pulse number acquisition module is used for acquiring the pulse number accumulated by the incremental encoder on at least one motor;
the conversion module is used for converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
and the sending module is used for sending the single-circle value and the number of turns of the motor rotating shaft to the servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
As an optional implementation manner, the conversion module is specifically configured to:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
As an optional implementation manner, the pulse number acquiring module is specifically configured to:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
the device also comprises an alarm module for:
determining the difference value of the pulse number in the period and the pulse number in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation manner, the alarm module is specifically configured to:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As an optional implementation, the apparatus further comprises a storage module configured to:
and storing the single-turn value and the number of turns in a memory powered by a non-servo driver.
In a fifth aspect, the present invention provides a servo driver apparatus for encoder data conversion, the apparatus comprising: receiving module, confirm position module, wherein:
the receiving module is used for receiving a single-circle value and a number of circles corresponding to at least one motor, wherein the single-circle value and the number of circles are obtained by converting the number of pulses accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor;
and the position determining module is used for determining the absolute position of the motor rotating shaft according to the single-turn value and the turn number.
As an optional implementation, the apparatus further comprises a control module configured to:
receiving an alarm state and verification data of a motor, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration;
and after the verification of the verification data is passed, controlling the motor to decelerate or stop according to the alarm state of the motor.
In a sixth aspect, the present invention provides an encoder data conversion apparatus comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of:
acquiring the accumulated pulse number of an incremental encoder on at least one motor;
converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
and sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
As an optional implementation, the processor is specifically configured to:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
As an optional implementation manner, the processor is specifically configured to:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
after the pulse number of the incremental encoder on at least one motor is obtained periodically, the method further comprises the following steps:
determining the difference value of the pulse number in the period and the pulse number in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation, the processor is specifically configured to:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As an optional implementation manner, the processor is specifically further configured to:
and storing the single-turn value and the turn number in a memory powered by a non-servo driver.
In a seventh aspect, the present invention provides a servo driver apparatus for encoder data conversion, the apparatus comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of:
receiving a single-circle value and a number of circles corresponding to at least one motor, wherein the single-circle value and the number of circles are obtained by converting the number of pulses accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor;
and determining the absolute position of the motor rotating shaft according to the single-turn value and the turn number.
As an optional implementation manner, the processor is specifically further configured to:
receiving an alarm state and verification data of a motor, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration;
and after the verification of the verification data is passed, controlling the motor to decelerate or stop according to the alarm state of the motor.
In an eighth aspect, the present invention provides a computer storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of the method of the first aspect.
In a ninth aspect, the present invention provides a computer storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the second aspect described above.
The method, the device and the equipment for converting the encoder data have the following beneficial effects that:
the pulse number of the incremental encoder is converted into the single-circle value and the number of circles of the motor rotating shaft, the position of the motor rotating shaft can be guaranteed to be recorded after the servo driver is powered off, and the robot can still work normally after the servo driver is powered off.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram of a pulse signal of an incremental encoder according to an embodiment of the present invention;
FIG. 2 is a diagram of a pulse signal for another incremental encoder according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for converting encoder data according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for detecting motor anomalies and sending an alarm state according to an embodiment of the present invention;
FIG. 5 is a flow chart of another method for converting encoder data according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating an encoder data conversion system according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of an encoder converting module according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware connection of an encoder converting module according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an encoder data conversion apparatus according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a servo driver apparatus for encoder data conversion according to an embodiment of the present invention;
fig. 11 is a schematic diagram of an encoder data conversion apparatus according to an embodiment of the present invention;
fig. 12 is a schematic diagram of a servo driver apparatus for encoder data conversion according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application scenario described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems. In the description of the present invention, the term "plurality" means two or more unless otherwise specified.
The working principle of the incremental encoder is first briefly described below:
the incremental encoder acquires the incremental information of the position of the motor, namely the angle change value of the motor, and generally represents through pulses, the larger the rotation angle is, the more the number of pulses is, each incremental encoder has a precision, and the number of pulses which represents the rotation of the motor for one circle can be determined according to the precision.
The incremental encoder determines pulses through two signal lines, wherein the pulses comprise an A-phase pulse and a B-phase pulse, the rotating direction is determined through the sequence of the A-phase pulse and the B-phase pulse, as shown in figure 1, the A-phase pulse is in front, the B-phase pulse is behind, and the motor rotates clockwise (CW direction), as shown in figure 2, the B-phase pulse is in front, and the A-phase pulse is behind, and the motor rotates counterclockwise (CCW direction).
Because the servo motors of a lot of old industrial robots at present use incremental encoders, in practical situations, the servo drivers cannot be guaranteed to be in a power supply state for a long time, if the servo drivers are powered off, after the servo drivers are powered off, the industrial robots may still move due to inertia or the movement of the industrial robots is changed due to manual handling, but at the moment, the incremental encoders cannot send pulses to the servo drivers, so that the positions of the motors cannot be judged after the servo drivers are powered on again, the robots cannot work, and the robots need to move to an original point (namely a reference position) first, which is time-consuming; in addition, if need update industrial robot's motor, then servo driver must need the outage, is difficult to not only find the motor that installation mechanical interface matches, even find the motor of matching and change the completion after, after servo driver power-on, need remove industrial robot to the reference point, wastes time and energy, if eliminate the update with industrial robot body, then need higher cost, causes the waste. That is, industrial robots currently using incremental encoders need to be moved back to the reference position each time the servo drive is de-energized.
The method provided by the embodiment of the invention provides a method for converting data of the incremental encoder under the conditions of not replacing the motor of the industrial robot and not replacing the industrial robot, so that the servo driver does not need to move the industrial robot to the reference position after power failure and power on again, and only needs to determine the absolute position of the rotating shaft of the motor according to the converted data of the incremental encoder, thereby saving cost and avoiding time and labor.
As shown in fig. 3, an embodiment of the present invention provides a method for converting encoder data, where the method is implemented by the following steps:
300, acquiring the accumulated pulse number of an incremental encoder on at least one motor;
it should be noted that, in the embodiment of the present invention, the number of the motors includes one or more, after each motor rotates, the incremental encoder on the motor generates a pulse signal, and in the implementation, the number of the motors is multiple, and the pulse signals generated by the incremental encoder on each motor are accumulated to obtain the number of pulses accumulated by the incremental encoder on each motor.
Optionally, in the embodiment of the present invention, the pulse number accumulated by the incremental encoder on the at least one motor may be obtained in real time, or the pulse number accumulated by the incremental encoder on the at least one motor may be obtained periodically.
301, converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
in this embodiment, if there are a plurality of motors, there are a plurality of incremental encoders on the motors, and the accuracy of the incremental encoders on each motor may be different or the same, which is not limited to the above.
It can be understood that, the number of turns and the number of turns of the motor shaft of the pulse number conversion of the incremental encoder on the motor in this embodiment are equivalent to the number of turns and the number of turns of the absolute encoder, that is, the number of turns and the number of turns of the motor shaft of the pulse number conversion of the incremental encoder in this embodiment are equivalent to the number of turns and the number of turns of the incremental encoder, and the data of the incremental encoder is equivalent to the data of the absolute encoder, so that the effect of converting the incremental encoder into the absolute encoder is realized without updating the motor, replacing the encoder and updating the robot.
If the number of the motors is one, converting the pulse number of the incremental encoder on the motor into the single-turn value and the turn number of the rotating shaft of the motor according to the precision of the incremental encoder on the motor;
if the number of the motors is multiple, the pulse number of the incremental encoder on each motor is converted into the single-circle value and the number of turns of the motor rotating shaft according to the precision of the incremental encoder on each motor, wherein the pulse number of the incremental encoder on each motor is possibly different due to the fact that the precision of the incremental encoder on each motor is different, and therefore the single-circle value and the number of turns of the motor rotating shaft converted by the pulse number of the incremental encoder are also possibly different. For example, a 16 bit incremental encoder, there would be 65536 signals for one motor revolution.
In implementation, the motor, the incremental encoder, the precision of the incremental encoder, the pulse number of the incremental encoder on the motor, and the single-turn value and the turn number of the rotating shaft of the motor can be in one-to-one correspondence.
As an alternative embodiment, converting the number of pulses of the incremental encoder on the at least one motor into a single turn value and a number of turns of the motor shaft according to the accuracy of the incremental encoder on the at least one motor comprises:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
In implementation, the single turn may be a turn of the motor shaft, the predefined single-turn reference position of the motor shaft may be defined as required, for convenient calculation, the predefined single-turn reference position of the motor shaft may be marked as zero, and after the reference position is selected, each position on the single turn of the motor shaft has a corresponding value.
In the implementation, the pulse number of the incremental encoder on the at least one motor is recorded as A, the pulse number accumulated by the incremental encoder on the motor determined by one rotation of the motor is recorded as B, the integral part obtained by dividing A by B is used as the rotation number of the rotating shaft of the motor, and the decimal part obtained by dividing A by B is converted according to the predefined single-turn reference position to obtain the single-turn value.
Optionally, in this embodiment, the single-turn reference position of the motor rotating shaft may be preset, and the preset single-turn reference position is also updated according to a requirement, for example, after the motor of the robot is replaced, the single-turn reference position of the motor rotating shaft needs to be recalibrated, that is, the single-turn reference position of the motor rotating shaft needs to be updated, and this embodiment does not limit when the single-turn reference position of the motor rotating shaft is changed too much.
And 302, sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver determines the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
As an alternative embodiment, after converting the pulse number of the incremental encoder on the at least one motor into the single-turn value and the number of turns of the rotating shaft of the motor, the method further comprises the following steps:
and storing the single-turn value and the number of turns in a memory powered by a non-servo driver.
Therefore, the single-circle value and the number of turns of the motor rotating shaft stored in the memory can be sent to the servo driver, so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
It should be noted that, in this embodiment, the power may be supplied to the memory through a battery; in implementation, under the condition that the servo driver supplies power, the memory can be supplied with power according to the power supply provided by the servo driver, or the battery can be supplied with power according to the power supply provided by the servo driver, and under the condition that the servo driver is powered off, the battery can be used for supplying power to the memory;
in addition, under the condition that the servo driver is powered off, a battery can be used for supplying power to components except for an interface for servo communication, for example, the battery can be used for supplying power to the components such as the motor and the incremental encoder, so that the motor can still operate under the condition that the servo driver is powered off, the pulse number of the incremental encoder on the motor can still be acquired, the accumulated pulse number is converted into the single-turn value and the turn number of the motor rotating shaft, and the data conversion of the incremental encoder is realized.
Optionally, if a plurality of motors are provided, under the condition that the servo driver is powered off, a battery may be used to supply power to one motor and the incremental encoders of the motor, or a battery may be used to supply power to a plurality of motors and a plurality of incremental encoders corresponding to the plurality of motors, where the number of the motors and the incremental encoders that are powered by the battery may be determined according to actual requirements, such as the power condition of the battery or the operating condition of the motors, and the number of the motors and the incremental encoders that are powered by the battery is not limited too much in this embodiment.
And converting the pulse number accumulated by the incremental encoder on the at least one motor into a single-turn value and a turn number of the motor rotating shaft, and storing the single-turn value and the turn number into the memory so as to determine the absolute position of the motor rotating shaft according to the single-turn value and the turn number after the servo driver is powered off and powered on.
Therefore, the method can ensure that the pulse number accumulated by the incremental encoder on the motor cannot be influenced even if the servo driver is powered off, and the accumulated pulse number cannot be influenced to be converted into a single-circle value and a number of circles and then stored in the memory to be used as effective data, so that the accurate absolute position of the motor rotating shaft can still be determined after the servo driver is powered off and powered on.
Optionally, the sending the single-turn value and the number of turns of the motor rotating shaft to a servo driver includes:
and converting the single-turn value and the turn number into serial data according to a serial port communication protocol, and sending the serial data to the servo driver.
Optionally, in this embodiment, the memory may be powered by a battery, if the battery power is abnormal, an alarm signal may be sent to the servo driver, and if the battery power is insufficient, an alarm signal may be sent to the servo driver so that the servo driver charges the battery, or the battery is replaced.
In this embodiment, the method described above may be applied to a test environment, or may be applied to an actual environment, and when applied to the test environment, the pulse number accumulated by the incremental encoder in the normal operating state is converted into the single-turn value and the turn number of the motor rotating shaft, and the single-turn value and the turn number are stored in the memory, and the data of the motor rotating shaft in the normal operating state is determined, so as to be used to check the acquired single-turn value and the turn number of the robot in the actual operating environment according to the data of the motor rotating shaft in the normal operating state.
Optionally, in this embodiment, the pulse number of the incremental encoder on at least one motor may be obtained periodically; after the pulse number of the incremental encoder on at least one motor is acquired periodically, the method further comprises the following steps:
determining the difference between the number of pulses in the period and the number of pulses in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation manner, if the number of pulses in the present period is greater than a first preset threshold, and/or the difference value is greater than a second preset threshold, sending a corresponding alarm state to the servo driver, including:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As shown in fig. 4, the present embodiment may provide a method for detecting an abnormality of a motor and sending an alarm state, which is described by taking a motor as an example, and the specific flow of the method is as follows:
and step 406, sending an acceleration abnormity alarm to the servo driver.
In implementation, the preset calibration data is sent to the servo driver when the calibration data of the motor is sent, the servo driver may first calibrate the received calibration data, if the calibration fails, it indicates that the received data may be incorrect, the received data may be discarded, and if the calibration passes, the motor may be controlled to slow down or stop according to the received speed abnormality alarm, or the motor may be controlled to slow down or stop according to the received acceleration abnormality alarm, or the motor may be controlled to slow down or stop according to the received speed abnormality alarm and the acceleration abnormality alarm.
Optionally, after the servo driver passes the verification of the verification data, the power supply can be cut off according to the alarm state of the motor to make the motor suddenly stop, and the power supply can also report to the upper equipment of the servo driver.
In this embodiment, the processing executed by the servo driver according to the alarm state of the motor is only an example, and the processing mode executed by the servo driver according to the alarm state of the motor is not limited too much in this embodiment, and corresponding processing may be executed according to actual requirements.
As shown in fig. 5, based on the same inventive concept, this embodiment further provides an encoder data conversion method, which can be applied to a servo driver, and since the principle of solving the problem of the method is similar to that of the method described above, the specific implementation process of the method may refer to the implementation of the method described above, and the repetition points are not described again, and the specific flow of the method is as follows:
500, a servo driver receives a single-circle value and a number of circles corresponding to at least one motor, wherein the single-circle value and the number of circles are obtained by converting the number of pulses accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor;
and step 501, the servo driver determines the absolute position of the motor rotating shaft according to the single-circle value and the number of circles.
Optionally, the servo driver may receive a single-turn value and a turn number corresponding to at least one motor according to a serial port communication protocol.
As an optional implementation, the method further comprises:
the servo driver receives an alarm state and verification data of the motor, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration;
and after the servo driver passes the verification of the verification data, controlling the motor to decelerate or stop according to the alarm state of the motor.
In implementation, the servo driver may first verify the received verification data, if the verification fails, it indicates that the received data may be incorrect, the received data may be discarded, and if the verification passes, the servo driver may control the motor to slow down or stop according to the received speed abnormality alarm, or control the motor to slow down or stop according to the received acceleration abnormality alarm, or control the motor to slow down or stop according to the received speed abnormality alarm and the received acceleration abnormality alarm.
Optionally, after the calibration data passes the calibration by the servo driver, the power supply can be cut off according to the alarm state of the motor to make the motor suddenly stop, and the power supply can also report to the upper equipment of the servo driver.
In this embodiment, the processing executed by the servo driver according to the alarm state of the motor is only an example, and the processing mode executed by the servo driver according to the alarm state of the motor is not limited too much in this embodiment, and the corresponding processing may be executed according to the actual situation requirement.
Based on the same inventive concept, the embodiment of the present invention further provides an encoder data conversion system, and since the system is the system in the method in the embodiment of the present invention, and the principle of the system to solve the problem is similar to the method, the implementation of the system may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 6, the system includes: the encoder conversion module 600, at least one servo driver 601, at least one incremental encoder 602, the encoder conversion module includes at least one first interface connected with the servo driver, at least one second interface connected with the incremental encoder, wherein:
the encoder conversion module is used for acquiring the accumulated pulse number of the incremental encoder on at least one motor; converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor; sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns;
the servo driver is used for receiving a single-circle value and a circle number corresponding to at least one motor, wherein the single-circle value and the circle number are obtained by converting the pulse number accumulated by the incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor; and determining the absolute position of the motor rotating shaft according to the single-turn value and the turn number.
Optionally, the at least one first interface connected to the servo driver is a serial interface.
The first interface and the second interface may be different interfaces or the same interface, and this embodiment is not limited to this.
Optionally, the number of the incremental encoders is the same as that of the servo drivers, and the incremental encoders and the servo drivers are in one-to-one correspondence;
if there are a plurality of incremental encoders, there are a plurality of servo drivers, a plurality of interfaces for connecting the encoder conversion module to the plurality of incremental encoders, and a plurality of interfaces for connecting the encoder conversion module to the plurality of servo drivers.
As an alternative implementation, as shown in fig. 7, the hardware structure of the encoder conversion module includes a main module 700 and at least one extension module 701;
the main module comprises a Field Programmable Gate Array (FPGA), a power module, a configuration module and the like, wherein the configuration module comprises dial switch buttons and harness connectors, the number of the dial switch buttons is the same as that of the expansion modules, the harness connectors can be connected with a plurality of expansion modules at the same time, and for example, the harness connectors can be connected with 8 expansion modules at the same time; the main module is a necessary module, and the number of the main modules is one;
the expansion module comprises a second interface connected with the incremental encoder, a first interface connected with the servo driver, a wiring harness connector and the like, the number of the expansion modules is one or more, and one or more expansion modules can be selected according to specific use conditions, which is not limited in the embodiment. For example, if there are 6 incremental encoders, 6 expansion modules may be selected;
if the number of the incremental encoders is multiple, multiple expansion modules can be selected, and the multiple expansion modules are connected in a cascading mode;
as shown in fig. 8, the wire harness between the main module 800 and the at least one expansion module 801 includes at least a power line +, a power line-, a-phase pulse, B-phase pulse, serial data transmission, serial data reception, and the like.
As an optional implementation manner, the encoder conversion module is specifically configured to:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
As an optional implementation manner, the encoder conversion module is specifically configured to:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
after the pulse number of the incremental encoder on at least one motor is acquired periodically, the method further comprises the following steps:
determining the difference between the number of pulses in the period and the number of pulses in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation manner, the encoder conversion module is specifically configured to:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As an optional embodiment, the system further comprises a battery module for:
and supplying power to a memory for storing the single-turn value and the turn number.
Based on the same inventive concept, the embodiment of the present invention further provides an encoder data conversion apparatus, and since the apparatus is an apparatus in the method in the embodiment of the present invention, and the principle of the apparatus to solve the problem is similar to the method, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 9, the apparatus includes: a pulse number acquiring module 900, a converting module 901 and a sending module 902, wherein:
the pulse number acquisition module 900 is used for acquiring the number of pulses accumulated by an incremental encoder on at least one motor;
the conversion module 901 is configured to convert the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
and a sending module 902, configured to send the single-turn value and the number of turns of the motor rotating shaft to the servo driver, so that the servo driver determines the absolute position of the motor rotating shaft according to the single-turn value and the number of turns.
As an optional implementation, the conversion module 901 is specifically configured to:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
As an alternative embodiment, the pulse number acquiring module 900 is specifically configured to:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
the device also comprises an alarm module for:
determining the difference between the number of pulses in the period and the number of pulses in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation manner, the alarm module is specifically configured to:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As an optional implementation, the apparatus further comprises a storage module configured to:
and storing the single-turn value and the number of turns in a memory powered by a non-servo driver.
Based on the same inventive concept, embodiments of the present invention further provide a servo driver apparatus for encoder data conversion, and since the apparatus is an apparatus in the method in the embodiments of the present invention, and a principle of the apparatus for solving the problem is similar to that of the method, the apparatus may be implemented by referring to the implementation of the method, and repeated descriptions are omitted.
As shown in fig. 10, the apparatus includes: a receiving module 1000, a determine location module 1001, wherein:
the receiving module 1000 is configured to receive a single-turn value and a number of turns corresponding to at least one motor, where the single-turn value and the number of turns are obtained by converting a number of pulses accumulated by an incremental encoder on the at least one motor according to accuracy of the incremental encoder on the at least one motor;
and a position determining module 1001 for determining the absolute position of the motor rotating shaft according to the single-turn value and the number of turns.
As an optional implementation, the apparatus further comprises a control module configured to:
receiving an alarm state and verification data of a motor, wherein the alarm state of the motor comprises speed abnormality and/or acceleration abnormality;
and after the verification of the verification data is passed, controlling the motor to decelerate or stop according to the alarm state of the motor.
Based on the same inventive concept, the embodiment of the present invention further provides an encoder data conversion device, and since the device is a device in the method in the embodiment of the present invention, and the principle of the device to solve the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 11, the apparatus includes: a processor 1100 and a memory 1101, wherein the memory 1101 stores program code, which when executed by the processor 1100, causes the processor 1100 to perform the steps of:
acquiring the accumulated pulse number of an incremental encoder on at least one motor;
converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
and sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver determines the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
As an optional implementation manner, the processor 1100 is specifically configured to:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
As an optional implementation manner, the processor 1100 is specifically configured to:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
after the pulse number of the incremental encoder on at least one motor is acquired periodically, the method further comprises the following steps:
determining the difference value of the pulse number in the period and the pulse number in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
As an optional implementation, the processor 1100 is specifically configured to:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
As an optional implementation manner, the processor 1100 is further specifically configured to:
and storing the single-turn value and the number of turns in a memory powered by a non-servo driver.
Based on the same inventive concept, embodiments of the present invention further provide a servo driver device for encoder data conversion, and since the device is a device in the method in the embodiments of the present invention, and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 12, the apparatus includes: a processor 1200 and a memory 1201, wherein the memory 1201 stores program code that, when executed by the processor 1200, causes the processor 1200 to perform the steps of:
receiving a single-circle value and a circle number corresponding to at least one motor, wherein the single-circle value and the circle number are obtained by converting the pulse number accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor;
and determining the absolute position of the motor rotating shaft according to the single-turn value and the number of turns.
As an optional implementation manner, the processor 1200 is specifically further configured to:
receiving an alarm state and verification data of a motor, wherein the alarm state of the motor comprises speed abnormality and/or acceleration abnormality;
and after the verification of the verification data is passed, controlling the motor to decelerate or stop according to the alarm state of the motor.
Based on the same inventive concept, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the steps of:
acquiring the accumulated pulse number of an incremental encoder on at least one motor;
converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor;
and sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver determines the absolute position of the motor rotating shaft according to the single-circle value and the number of turns.
Based on the same inventive concept, an embodiment of the present invention further provides another computer storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the following steps:
receiving a single-circle value and a circle number corresponding to at least one motor, wherein the single-circle value and the circle number are obtained by converting the pulse number accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor;
and determining the absolute position of the motor rotating shaft according to the single-turn value and the number of turns.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (13)
1. A method of encoder data conversion, the method comprising:
acquiring the accumulated pulse number of an incremental encoder on at least one motor;
converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor, and storing the single-turn value and the turn number in a memory powered by a non-servo driver; recording the pulse number of an incremental encoder on the at least one motor as A, recording the pulse number accumulated by the incremental encoder on the motor determined by one rotation of the motor as B, taking the integral part obtained by dividing A by B as the number of turns of the motor rotating shaft, and converting the decimal part obtained by dividing A by B according to a predefined single-turn reference position to be taken as the single-turn value of the motor rotating shaft;
sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns;
and under the condition that the servo driver is powered off, a battery is used for supplying power to the motor, the memory and the incremental encoder so as to ensure that the motor can still run.
2. The method of claim 1, wherein converting the number of pulses of the incremental encoder on the at least one motor to a single turn value and a number of turns of a motor shaft based on the accuracy of the incremental encoder on the at least one motor comprises:
determining the number of pulses accumulated by the incremental encoder on the motor when the motor rotates for one circle according to the precision of the incremental encoder on the at least one motor;
and determining the single-turn value and the number of turns of the motor rotating shaft according to the predefined single-turn reference position of the motor rotating shaft and the pulse number.
3. The method of claim 1, wherein obtaining a number of pulses accumulated by an incremental encoder on at least one motor comprises:
periodically acquiring the pulse number of an incremental encoder on at least one motor;
after the pulse number of the incremental encoder on at least one motor is acquired periodically, the method further comprises the following steps:
determining the difference value of the pulse number in the period and the pulse number in the previous period;
and if the pulse number in the period is larger than a first preset threshold value and/or the difference value is larger than a second preset threshold value, sending a corresponding alarm state to the servo driver.
4. The method according to claim 3, wherein if the number of pulses in the present period is greater than a first preset threshold and/or the difference is greater than a second preset threshold, sending a corresponding alarm state to the servo driver, comprising:
determining that the speed of the motor is abnormal according to the fact that the pulse number is larger than a first preset threshold value, and/or determining that the acceleration of the motor is abnormal according to the fact that the difference value is larger than a second preset threshold value;
and sending the alarm state and the verification data of the motor to a servo driver so as to control the motor to decelerate or stop according to the alarm state of the motor after the servo driver passes the verification of the verification data, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration.
5. A method of encoder data conversion, the method comprising:
the method comprises the steps that a servo driver receives a single-circle value and a circle number corresponding to at least one motor, wherein the single-circle value and the circle number are obtained by converting the pulse number accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor; the single-turn value and the number of turns are stored in a memory powered by a non-servo driver; recording the pulse number of an incremental encoder on the at least one motor as A, recording the pulse number accumulated by the incremental encoder on the motor determined by one rotation of the motor as B, taking the integral part obtained by dividing A by B as the number of turns of the motor rotating shaft, and converting the decimal part obtained by dividing A by B according to a predefined single-turn reference position to be taken as the single-turn value of the motor rotating shaft;
the servo driver determines the absolute position of the motor rotating shaft according to the single-turn value and the number of turns;
and under the condition that the servo driver is powered off, a battery is used for supplying power to the motor, the memory and the incremental encoder so as to ensure that the motor can still operate.
6. The method of claim 5, further comprising:
the servo driver receives an alarm state and verification data of the motor, wherein the alarm state of the motor comprises abnormal speed and/or abnormal acceleration;
and after the servo driver passes the verification of the verification data, controlling the motor to decelerate or stop according to the alarm state of the motor.
7. An encoder data conversion system, the system comprising: the servo driver comprises an encoder conversion module, at least one servo driver and at least one incremental encoder, wherein the encoder conversion module comprises at least one first interface connected with the servo driver and at least one second interface connected with the incremental encoder, and the servo driver comprises:
the encoder conversion module is used for acquiring the accumulated pulse number of the incremental encoder on at least one motor; converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor, and storing the single-turn value and the turn number in a memory powered by a non-servo driver; sending the single-circle value and the number of turns of the motor rotating shaft to a servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns; recording the pulse number of an incremental encoder on the at least one motor as A, recording the pulse number accumulated by the incremental encoder on the motor determined by one rotation of the motor as B, taking the integral part obtained by dividing A by B as the number of turns of the motor rotating shaft, and converting the decimal part obtained by dividing A by B according to a predefined single-turn reference position to be taken as the single-turn value of the motor rotating shaft;
the servo driver is used for receiving a single-circle value and a number of circles corresponding to at least one motor, wherein the single-circle value and the number of circles are obtained by converting the number of pulses accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor; determining the absolute position of the motor rotating shaft according to the single-turn value and the turn number; and under the condition that the servo driver is powered off, a battery is used for supplying power to the motor, the memory and the incremental encoder so as to ensure that the motor can still operate.
8. An apparatus for converting encoder data, the apparatus comprising: the pulse number acquisition module, the conversion module and the transmission module are arranged, wherein:
the pulse number acquisition module is used for acquiring the accumulated pulse number of the incremental encoder on at least one motor;
the conversion module is used for converting the pulse number of the incremental encoder on the at least one motor into a single-turn value and a turn number of a motor rotating shaft according to the precision of the incremental encoder on the at least one motor, and storing the single-turn value and the turn number in a memory powered by a non-servo driver; recording the pulse number of an incremental encoder on the at least one motor as A, recording the pulse number accumulated by the incremental encoder on the motor determined by one rotation of the motor as B, taking the integral part obtained by dividing A by B as the number of turns of the motor rotating shaft, and converting the decimal part obtained by dividing A by B according to a predefined single-turn reference position to be taken as the single-turn value of the motor rotating shaft;
and the sending module is used for sending the single-circle value and the number of turns of the motor rotating shaft to the servo driver so that the servo driver can determine the absolute position of the motor rotating shaft according to the single-circle value and the number of turns, and a battery is used for supplying power to the motor, the memory and the incremental encoder under the condition that the servo driver is powered off so as to ensure that the motor can still operate.
9. A servo driver apparatus for encoder data conversion, the apparatus comprising: receiving module, confirm position module, wherein:
the receiving module is used for receiving a single-circle value and a number of circles corresponding to at least one motor, wherein the single-circle value and the number of circles are obtained by converting the number of pulses accumulated by an incremental encoder on the at least one motor according to the precision of the incremental encoder on the at least one motor; the single-turn value and the number of turns are stored in a memory powered by a non-servo driver; recording the pulse number of an incremental encoder on the at least one motor as A, recording the pulse number accumulated by the incremental encoder on the motor determined by one rotation of the motor as B, taking the integral part obtained by dividing A by B as the number of turns of the motor rotating shaft, and converting the decimal part obtained by dividing A by B according to a predefined single-turn reference position to be taken as the single-turn value of the motor rotating shaft;
the position determining module is used for determining the absolute position of the motor rotating shaft according to the single-turn value and the number of turns; and under the condition that the servo driver is powered off, a battery is used for supplying power to the motor, the memory and the incremental encoder so as to ensure that the motor can still operate.
10. An encoder data conversion apparatus, characterized in that the apparatus comprises: a processor and a memory, wherein the memory stores program code which, when executed by the processor, causes the processor to carry out the steps of the method of any of claims 1 to 4.
11. A servo driver apparatus for encoder data conversion, the apparatus comprising: a processor and a memory, wherein the memory stores program code which, when executed by the processor, causes the processor to carry out the steps of the method of any of claims 5 to 6.
12. A computer storage medium on which a computer program is stored, which program, when being executed by a processor, carries out the steps of a method according to any one of claims 1 to 4.
13. A computer storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of a method according to any one of claims 5 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911119375.9A CN112824059B (en) | 2019-11-15 | 2019-11-15 | Encoder data conversion method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911119375.9A CN112824059B (en) | 2019-11-15 | 2019-11-15 | Encoder data conversion method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112824059A CN112824059A (en) | 2021-05-21 |
CN112824059B true CN112824059B (en) | 2023-01-17 |
Family
ID=75906159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911119375.9A Active CN112824059B (en) | 2019-11-15 | 2019-11-15 | Encoder data conversion method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112824059B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113483799B (en) * | 2021-06-25 | 2024-07-05 | 佛山非夕机器人科技有限公司 | Magnetic encoder detection method, apparatus, computer device, and storage medium |
CN113865623A (en) * | 2021-09-26 | 2021-12-31 | 烟台环球机床装备股份有限公司 | An incremental encoder to absolute encoder interface circuit |
CN114019961A (en) * | 2021-10-25 | 2022-02-08 | 河南牧原智能科技有限公司 | Method and device for positioning trolley and readable storage medium |
CN114102594B (en) * | 2021-11-25 | 2023-11-14 | 深圳市越疆科技股份有限公司 | Mechanical arm joint and initial position determining method, device, equipment and storage medium |
CN118034174B (en) * | 2024-04-15 | 2024-06-21 | 南京比沃特视频系统有限公司 | Data processing method and device for double encoder system |
CN118990603B (en) * | 2024-10-23 | 2025-02-28 | 河南瞳安无忧智能科技有限公司 | Motor-based robot head control method, device and storage medium |
CN119045411B (en) * | 2024-10-31 | 2025-01-17 | 福建富昌维控电子科技股份有限公司 | Reconstruction method and terminal of multi-axis pulse space trajectory |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN209014017U (en) * | 2018-12-20 | 2019-06-21 | 歌尔科技有限公司 | Multifunctional encoder and motor driver |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4079251A (en) * | 1976-08-12 | 1978-03-14 | Osann Jr Robert | Incremental optical encoder system for absolute position measurement |
CN101532852B (en) * | 2008-03-14 | 2010-12-15 | 上海精浦机电有限公司 | Intelligent increment or absolute-value encoder circuit board and work method thereof |
CN201758379U (en) * | 2010-08-06 | 2011-03-09 | 上海开通数控有限公司 | Power outage position memory device of servo drive controller |
JP6708428B2 (en) * | 2016-02-12 | 2020-06-10 | キヤノン株式会社 | Robot device, control method, manufacturing method, program, and recording medium |
CN106363623B (en) * | 2016-09-30 | 2018-09-21 | 深圳市同川科技有限公司 | The detection method of robot location's detection device |
CN107650142B (en) * | 2017-07-12 | 2024-04-26 | 哈尔滨工大特种机器人有限公司 | Servo driving system applied to mechanical arm joint |
CN108880122B (en) * | 2018-07-16 | 2019-05-14 | 睿尔曼智能科技(北京)有限公司 | A kind of intelligent AC servo-driver of high integration high power density |
-
2019
- 2019-11-15 CN CN201911119375.9A patent/CN112824059B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN209014017U (en) * | 2018-12-20 | 2019-06-21 | 歌尔科技有限公司 | Multifunctional encoder and motor driver |
Also Published As
Publication number | Publication date |
---|---|
CN112824059A (en) | 2021-05-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112824059B (en) | Encoder data conversion method, device and equipment | |
CN109849046B (en) | Zero returning method and zero returning system of steering engine rotor, steering engine and robot | |
CN104698974A (en) | Numeric control machine tool and debugging method thereof | |
JP2010238174A (en) | Positioning device and positioning method | |
US11796985B2 (en) | Industrial equipment controller and industrial equipment data collection system | |
CN109230916B (en) | Elevator operation control method, system, controller and encoder | |
CN103034241B (en) | Method of adjusting the position of origin of a machine and a machine having a function for adjusting the position of origin | |
JPWO2012164740A1 (en) | Multi-axis motor drive system and multi-axis motor drive device | |
JP3370845B2 (en) | Absolute encoder | |
CN105702016B (en) | Device and method for checking an operating clock signal of a position measuring device | |
US12085967B2 (en) | Movement system and position estimation method | |
CN101458510A (en) | Communications system for position detector | |
CN116069703B (en) | Encoder communication mode conversion device and method | |
CN112873264B (en) | Industrial robot joint structure, robot control system and method | |
EP3319226B1 (en) | Servomotor drive device | |
CN110941208B (en) | Encoder and control system | |
JP2020051816A (en) | Encoder and control system | |
CN114310882B (en) | Method, device, equipment and storage medium for determining position of motor end of actuator | |
JP2004139299A (en) | Control program and method for returning to home position in positioning system | |
CN112207824B (en) | Method, system, device and storage medium for controlling multiple single-axis modules | |
CN117118278A (en) | Multi-path control method for stepping motor | |
JP6781226B2 (en) | Encoder and control system | |
US20040109752A1 (en) | Conveyor system | |
JP2022111732A (en) | Control systems, programmable controllers and motion control modules | |
KR890003637B1 (en) | Errormovement-prevention of nc |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 230013 Southwest District of Hefei City, Anhui Province Applicant after: Hefei xinyihua Intelligent Machine Co.,Ltd. Address before: 230013 Southwest District of Hefei City, Anhui Province Applicant before: HEFEI SINEVA INTELLIGENT MACHINE Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |