CN108555906A - Control method, device and the robot of robot - Google Patents

Control method, device and the robot of robot Download PDF

Info

Publication number
CN108555906A
CN108555906A CN201810314389.5A CN201810314389A CN108555906A CN 108555906 A CN108555906 A CN 108555906A CN 201810314389 A CN201810314389 A CN 201810314389A CN 108555906 A CN108555906 A CN 108555906A
Authority
CN
China
Prior art keywords
timer
motor
processor
value
robot
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.)
Granted
Application number
CN201810314389.5A
Other languages
Chinese (zh)
Other versions
CN108555906B (en
Inventor
梁惺
徐小涵
江世欢
罗阳
查沛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing East Yuzhong Energy Industry Co Ltd
Original Assignee
Chongqing East Yuzhong Energy Industry 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 Chongqing East Yuzhong Energy Industry Co Ltd filed Critical Chongqing East Yuzhong Energy Industry Co Ltd
Priority to CN201810314389.5A priority Critical patent/CN108555906B/en
Publication of CN108555906A publication Critical patent/CN108555906A/en
Application granted granted Critical
Publication of CN108555906B publication Critical patent/CN108555906B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1658Programme controls characterised by programming, planning systems for manipulators characterised by programming language

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Manipulator (AREA)

Abstract

An embodiment of the present invention provides a kind of control method of robot, device and robots, are related to robotic technology field.Robot includes main control chip and motor.Encoder is provided on motor, motor is connect by encoder with the main control chip.Main control chip includes processor, first timer and second timer.Method includes:For processor based under the down trigger of first timer, the direction place value in the second timer that current time reads determines the direction of rotation of the motor;Obtain current detection pulse value and last detection pulse value;Based on the spilling interruption times in the second timer read within a upper moment to the period between current time, zero crossing number of the motor under direction of rotation is obtained;Based on current detection pulse value, last detection pulse value and zero crossing number, the umber of pulse generated in the period described in motor is obtained, to obtain the range ability of the robot.Error is eliminated, data accuracy is improved.

Description

Control method, device and the robot of robot
Technical field
The present invention relates to robotic technology fields, in particular to a kind of control method of robot, device and machine People.
Background technology
The more robotically-driven motor of small intelligent is used currently on the market, in the cost-effective and small and exquisite direction of the bodily form On can all select DC speed-reducing, and to determine the distance of operation it is necessary to know the rotation angle of motor.Therefore with encoder Decelerating motor be optimal selection.Using the user of the motor when testing of electric motors is rotary pulsed, traditional approach is mainly used, Timer counter in robot causes step-by-step counting error or big data fluctuations occur when overflowing, to cause Entirely kinetic control system is unstable.
Invention content
The purpose of the present invention is to provide a kind of control method of robot, device and robots, to improve the above problem. To achieve the goals above, the technical solution adopted by the present invention is as follows:
In a first aspect, an embodiment of the present invention provides a kind of control method of robot, it is applied to robot, the machine People includes main control chip and motor.Encoder is provided on the motor, the motor passes through the encoder and the master control Chip connects.The main control chip includes processor, first timer and second timer.The motor passes through the encoder It is electrically connected with the processor, the processor is electrically connected with the first timer and the second timer, the method Including:The processor is based on second timing that under the down trigger of the first timer, current time reads Direction place value in device, determines the direction of rotation of the motor;The processor obtains the second timing described in the current time The meter of second timer described in current detection pulse value in the counter of device and the upper moment before the current time Last detection pulse value in number device;The processor based on the upper moment between the current time when Between spilling interruption times in the second timer that reads in section, obtain mistake of the motor under the direction of rotation Zero number;The processor is based on the current detection pulse value, the last detection pulse value and the zero crossing Number obtains the umber of pulse generated in the period described in the motor, to obtain the range ability of the robot.
Second aspect, an embodiment of the present invention provides a kind of control devices of robot, run on robot, the machine People includes main control chip and motor.Encoder is provided on the motor, the motor passes through the encoder and the master control Chip connects.The main control chip includes processor, first timer and second timer.The motor passes through the encoder It is electrically connected with the processor, the processor is electrically connected with the first timer and the second timer, described device Including:Determination unit, first acquisition unit, second acquisition unit and computing unit.Determination unit, for based on described first Under the down trigger of timer, the direction place value in the second timer that current time reads determines the motor Direction of rotation.First acquisition unit, for obtaining the current detection in the counter of second timer described in the current time Last detection pulse in the counter of second timer described in pulse value and upper moment before the current time Value.Second acquisition unit, for based on reading within the upper moment to the period between the current time Spilling interruption times in the second timer obtain zero crossing number of the motor under the direction of rotation.It calculates Unit, for being based on the current detection pulse value, the last time detects pulse value and the zero crossing number, described in acquisition The umber of pulse generated in period described in motor, to obtain the range ability of the robot.
The third aspect, an embodiment of the present invention provides a kind of robots, including main control chip and motor.It is set on the motor It is equipped with encoder, the motor is connect by the encoder with the main control chip.The main control chip includes processor, One timer and second timer.The motor is electrically connected by the encoder with the processor, the processor and institute State first timer and second timer electrical connection.The main control chip includes memory, the processor and described is deposited Reservoir is electrically connected by bus.Have program stored therein code in the memory.The processor, for by the bus from institute It states and said program code is read and run in memory, execute above-mentioned method.
An embodiment of the present invention provides a kind of control method of robot, device and robot, the robot includes master Control chip and motor.Encoder is provided on the motor, the motor is connect by the encoder with the main control chip. The main control chip includes processor, first timer and second timer.The motor passes through the encoder and the place Device electrical connection is managed, the processor is electrically connected with the first timer and the second timer, the method includes:It is described Processor is based under the down trigger of the first timer, the direction in the second timer that current time reads Place value determines the direction of rotation of the motor;The processor obtains the counter of second timer described in the current time In current detection pulse value and upper moment before the current time described in second timer counter in it is upper One-time detection pulse value;The processor within the upper moment to the period between the current time based on reading To the second timer in spilling interruption times, obtain zero crossing number of the motor under the direction of rotation; The processor is based on the current detection pulse value, the last detection pulse value and the zero crossing number, obtains institute The umber of pulse generated in the period described in motor is stated, to obtain the range ability of the robot.By adding zero crossing number It is calculated, is run in one direction always if solving motor, timer counter causes step-by-step counting to miss when overflowing The problem of difference or big data fluctuations, eliminates error, improves data accuracy.
Other features and advantages of the present invention will be illustrated in subsequent specification, also, partly be become from specification It is clear that by implementing understanding of the embodiment of the present invention.The purpose of the present invention and other advantages can be by saying what is write Specifically noted structure is realized and is obtained in bright book, claims and attached drawing.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the flow chart of the control method for the robot of the embodiment of the present invention provided;
Fig. 2 is a kind of structure diagram of the control device of robot provided in an embodiment of the present invention;
Fig. 3 is the structure diagram of the control device of another robot provided in an embodiment of the present invention;
Fig. 4 is the structure diagram of robot provided in an embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is implemented The component of example can be arranged and be designed with a variety of different configurations.Therefore, below to the reality of the present invention provided in the accompanying drawings The detailed description for applying example is not intended to limit the range of claimed invention, but is merely representative of the selected implementation of the present invention Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without creative efforts Every other embodiment, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.Meanwhile the present invention's In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Referring to Fig. 1, an embodiment of the present invention provides a kind of control method of robot, it is applied to robot, the machine Device people includes main control chip and motor.Encoder is provided on the motor, the motor passes through the encoder and the master Control chip connection.The main control chip includes processor, first timer and second timer.The motor passes through the coding Device is electrically connected with the processor, and the processor is electrically connected with the first timer and the second timer, the side Method includes:Step S100, step S110, step S120 and step S130.
Step S100:The processor based under the down trigger of the first timer, what current time read Direction place value in the second timer, determines the direction of rotation of the motor.
Before step S100, the method can also include:
The processor controls the first timer and the second timer opens spilling interruption, wherein described First timer is configured to timing mode, and the second timer is configured to timer orthogonal coding pattern.
The processor is configured to timer orthogonal coding pattern, obtain the collected motor of the encoder The pulse signal of rotation, controls the first timer and second timer is opened to overflow and be interrupted.Processor is fixed described first When device down trigger under, in the form of interruption according to preset frequency read second timer in analog value.In this implementation In example, first timer can be used for timing.
Step S100 may include:
The processor reads a deposit in the second timer under the down trigger of the first timer Direction place value in device;
If the processor judges to show that the direction place value as the first preset direction value, determines the rotation side of the motor To for rotate forward;
If the processor judges to show that the direction place value as the second preset direction value, determines the rotation side of the motor To for reversion.
In the present embodiment, the first preset direction value can be 0, and the second preset direction value can be 1.
Step S110:The processor obtains the current detection in the counter of second timer described in the current time Last detection pulse in the counter of second timer described in pulse value and upper moment before the current time Value.
Step S120:The processor within the upper moment to the period between the current time based on reading Spilling interruption times in the second timer got obtain zero crossing of the motor under the direction of rotation Number.
In the present embodiment, interruption times=zero crossing number is overflowed.
By taking 30ms calculates pulsatile once number as an example, the timing of first timer is 30ms, and processor is with the first timing The down trigger form of device reads each value in second timer every 30ms.Second timer overflow value is set as 390, For example, motor rotates forward always, and within this 30ms, overflow twice and interrupted, then the zero crossing number of positive direction is just It has carried out twice, i.e., positive direction zero crossing number is 2.
Step S130:The processor is based on the current detection pulse value, the last time detects pulse value and described Zero crossing number obtains the umber of pulse generated in the period described in the motor, to obtain the range ability of the robot.
When the processor determines that the direction of rotation of the motor is to rotate forward, step S130 may include:
After the current detection pulse value is subtracted the last detection pulse value by the processor, in addition obtaining in advance To the motor rotate a circle generate umber of pulse and the zero crossing number product, obtain in the period described in the motor The umber of pulse generated is rotated forward, to obtain the range ability of the robot.
I.e.:Umber of pulse=current detection pulse value-last time detection the arteries and veins generated is rotated forward in period described in the motor Punching value+motor, which rotates a circle, generates umber of pulse × zero crossing number.
Wherein, motor rotate a circle generate umber of pulse can be determined by the model of motor.The electricity for example, direct current selected slows down Machine reduction ratio is 1:30, and the strong magnetic code disk of 13 lines is carried on the rotor of selected model, then needed for motor shaft rotates a circle Umber of pulse:13 × 30=390.Other models can similarly obtain.
When the processor determines that the direction of rotation of the motor is reversion, step S130 may include:
After the current detection pulse value is subtracted the last detection pulse value by the processor, advance acquisition is subtracted To the motor rotate a circle generate umber of pulse and the zero crossing number product, obtain in the period described in the motor The umber of pulse generated is inverted, to obtain the range ability of the robot.
I.e.:Umber of pulse=current detection pulse value that reversion generates in period described in the motor-last time detects arteries and veins Punching value-motor, which rotates a circle, generates umber of pulse × zero crossing number.
An embodiment of the present invention provides a kind of control methods of robot, are applied to robot, and the robot includes master Control chip and motor.Encoder is provided on the motor, the motor is connect by the encoder with the main control chip. The main control chip includes processor, first timer and second timer.The motor passes through the encoder and the place Device electrical connection is managed, the processor is electrically connected with the first timer and the second timer, the method includes:It is described Processor is based under the down trigger of the first timer, the direction in the second timer that current time reads Place value determines the direction of rotation of the motor;The processor obtains the counter of second timer described in the current time In current detection pulse value and upper moment before the current time described in second timer counter in it is upper One-time detection pulse value;The processor within the upper moment to the period between the current time based on reading To the second timer in spilling interruption times, obtain zero crossing number of the motor under the direction of rotation; The processor is based on the current detection pulse value, the last detection pulse value and the zero crossing number, obtains institute The umber of pulse generated in the period described in motor is stated, to obtain the range ability of the robot.By adding zero crossing number It is calculated, is run in one direction always if solving motor, timer counter causes step-by-step counting to miss when overflowing The problem of difference or big data fluctuations, eliminates error, improves data accuracy.
Referring to Fig. 2, an embodiment of the present invention provides a kind of control device 200 of robot, robot is run on, it is described Robot includes main control chip and motor.Be provided with encoder on the motor, the motor by the encoder with it is described Main control chip connects.The main control chip includes processor, first timer and second timer.The motor passes through the volume Code device is electrically connected with the processor, and the processor is electrically connected with the first timer and the second timer, described Device 200 includes:Determination unit 210, first acquisition unit 220, second acquisition unit 230 and computing unit 240.
Determination unit 210, for based under the down trigger of the first timer, current time to read described Direction place value in second timer, determines the direction of rotation of the motor.
Described device 200 can also include:Dispensing unit 201.
Dispensing unit 201 opens spilling interruption for controlling the first timer and the second timer, In, the first timer is configured to timing mode, and the second timer is configured to timer orthogonal coding pattern.
The determination unit 210 may include:Reading subunit 211, judgment sub-unit 212.
Reading subunit 211, under the down trigger of the first timer, reading in the second timer Direction place value in one register.
Judgment sub-unit 212, if for judging to show that the direction place value as the first preset direction value, determines the motor Direction of rotation be rotate forward;If judging to show that the direction place value as the second preset direction value, determines the rotation side of the motor To for reversion.
First acquisition unit 220, for obtaining the current inspection in the counter of second timer described in the current time Surveyed the last detection arteries and veins in the counter of second timer described in pulse value and upper moment before the current time Punching value.
Second acquisition unit 230, for based within the upper moment to the period between the current time Spilling interruption times in the second timer read obtain zero crossing of the motor under the direction of rotation Number.
Computing unit 240, for based on the current detection pulse value, the last detection pulse value and the zero passage Point number, obtains the umber of pulse generated in the period described in the motor, to obtain the range ability of the robot.
The computing unit 240 may include the first computation subunit 241.
First computation subunit 241, after the current detection pulse value is subtracted the last detection pulse value, In addition the motor got in advance, which rotates a circle, generates the product of umber of pulse and the zero crossing number, the motor is obtained The umber of pulse generated is rotated forward in the period, to obtain the range ability of the robot.
Referring to Fig. 3, the computing unit 240 can also include the second computation subunit 242.
Second computation subunit 242, after the current detection pulse value is subtracted the last detection pulse value, Subtract the motor got in advance rotate a circle generate umber of pulse and the zero crossing number product, obtain the motor The umber of pulse that reversion generates in the period, to obtain the range ability of the robot.
The above each unit can be by software code realization, at this point, above-mentioned each unit can be stored in depositing for main control chip In reservoir.The above each unit can equally be realized by hardware such as IC chip.
The technique effect of the control device 200 of robot provided in an embodiment of the present invention, realization principle and generation is with before It is identical to state embodiment of the method, to briefly describe, device embodiment part does not refer to place, can refer to phase in preceding method embodiment Answer content.
Referring to Fig. 4, an embodiment of the present invention provides a kind of robot 300, including main control chip 310 and motor 320.Institute It states and is provided with encoder 321 on motor 320, the motor 320 is connect by the encoder 321 with the main control chip 310. The main control chip 310 includes processor 311, first timer 312 and second timer 313.The motor 320 passes through described Encoder 321 is electrically connected with the processor 311, the processor 311 and the first timer 312 and second timing Device 313 is electrically connected.The main control chip 310 includes memory 314, and the processor 311 and the memory 314 pass through bus Electrical connection.Have program stored therein code in the memory 314.The processor 311, for by the bus from the storage Said program code is read and run in device 314, executes above-mentioned method.
Memory 314 can store various software programs and module, such as the control of robot provided by the embodiments of the present application Corresponding program instruction/the module of method and device processed.Processor 106 is stored in the software program in memory 314 by operation And module realizes the control of the robot in the embodiment of the present application to perform various functions application and data processing Method.
Memory 314 can include but is not limited to random access memory (Random Access Memory, RAM), only Read memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
Processor 311 can be a kind of IC chip, have signal handling capacity.Above-mentioned processor can be general Processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable Gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.It can To realize or execute disclosed each method, step and the logic diagram in the embodiment of the present application.General processor can be micro- Processor or the processor can also be any conventional processor etc..
It is appreciated that structure shown in Fig. 4 is only to illustrate, robot 300 may also include than shown in Fig. 4 more or more Few component, or with the configuration different from shown in Fig. 4.Hardware, software or its group may be used in each component shown in Fig. 4 It closes and realizes.
The technique effect and preceding method of robot 300 provided in an embodiment of the present invention, realization principle and generation are implemented Example is identical, and to briefly describe, device embodiment part does not refer to place, can refer to corresponding contents in preceding method embodiment.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, the flow chart in attached drawing and block diagram Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product, Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code Part, a part for the module, section or code, which includes that one or more is for implementing the specified logical function, to be held Row instruction.It should also be noted that at some as in the realization method replaced, the function of being marked in box can also be to be different from The sequence marked in attached drawing occurs.For example, two continuous boxes can essentially be basically executed in parallel, they are sometimes It can execute in the opposite order, this is depended on the functions involved.It is also noted that every in block diagram and or flow chart The combination of box in a box and block diagram and or flow chart can use function or the dedicated base of action as defined in executing It realizes, or can be realized using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion Point, can also be modules individualism, can also two or more modules be integrated to form an independent part.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

1. a kind of control method of robot, which is characterized in that be applied to robot, the robot includes main control chip and electricity Machine is provided with encoder on the motor, and the motor is connect by the encoder with the main control chip, the master control core Piece includes processor, first timer and second timer, and the motor is electrically connected by the encoder with the processor, The processor is electrically connected with the first timer and the second timer, the method includes:
The processor is based on the second timer that under the down trigger of the first timer, current time reads In direction place value, determine the direction of rotation of the motor;
The processor obtains current detection pulse value in the counter of second timer described in the current time and described Last detection pulse value in the counter of second timer described in a upper moment before current time;
The processor is based on described read within the upper moment to the period between the current time Spilling interruption times in two timers obtain zero crossing number of the motor under the direction of rotation;
The processor is based on the current detection pulse value, the last detection pulse value and the zero crossing number, obtains The umber of pulse generated in the period described in the motor is obtained, to obtain the range ability of the robot.
2. according to the method described in claim 1, it is characterized in that, in the processor based in the first timer Under disconnected triggering, the direction place value in the second timer that current time reads, obtain the motor direction of rotation it Before, the method further includes:
The processor controls the first timer and the second timer opens spilling interruption, wherein described first Timer configuration is timing mode, and the second timer is configured to timer orthogonal coding pattern.
3. according to the method described in claim 1, it is characterized in that, the processor is based on the interruption in the first timer Under triggering, the direction place value in the second timer that current time reads determines the direction of rotation of the motor, packet It includes:
The processor is read under the down trigger of the first timer in a register in the second timer Direction place value;
If the processor judges to show that the direction place value as the first preset direction value, determines that the direction of rotation of the motor is It rotates forward;
If the processor judges to show that the direction place value as the second preset direction value, determines that the direction of rotation of the motor is Reversion.
4. according to the method described in claim 3, it is characterized in that, when the processor determines that the direction of rotation of the motor is It rotates forward, the processor is based on the current detection pulse value, the last detection pulse value and the zero crossing number, obtains The umber of pulse generated in the period described in the motor is obtained, to obtain the range ability of the robot, including:
After the current detection pulse value is subtracted the last detection pulse value by the processor, in addition get in advance The motor, which rotates a circle, generates the product of umber of pulse and the zero crossing number, obtains in the period described in the motor and rotates forward The umber of pulse of generation, to obtain the range ability of the robot.
5. according to the method described in claim 3, it is characterized in that, when the processor determines that the direction of rotation of the motor is Reversion, the processor are based on the current detection pulse value, the last detection pulse value and the zero crossing number, obtain The umber of pulse generated in the period described in the motor is obtained, to obtain the range ability of the robot, including:
After the current detection pulse value is subtracted the last detection pulse value by the processor, subtracts and get in advance The motor, which rotates a circle, generates the product of umber of pulse and the zero crossing number, obtains reversion in the period described in the motor The umber of pulse of generation, to obtain the range ability of the robot.
6. a kind of control device of robot, which is characterized in that run on robot, the robot includes main control chip and electricity Machine is provided with encoder on the motor, and the motor is connect by the encoder with the main control chip, the master control core Piece includes processor, first timer and second timer, and the motor is electrically connected by the encoder with the processor, The processor is electrically connected with the first timer and the second timer, and described device includes:
Determination unit, for based under the down trigger of the first timer, current time reads described second fixed When device in direction place value, determine the direction of rotation of the motor;
First acquisition unit, for obtaining the current detection pulse value in the counter of second timer described in the current time With the last detection pulse value in the counter of second timer described in the upper moment before the current time;
Second acquisition unit, for based on reading within the upper moment to the period between the current time Spilling interruption times in the second timer obtain zero crossing number of the motor under the direction of rotation;
Computing unit, for detecting pulse value and the zero crossing number based on the current detection pulse value, the last time, The umber of pulse generated in the period described in the motor is obtained, to obtain the range ability of the robot.
7. device according to claim 6, which is characterized in that described device further includes:
Dispensing unit is opened spilling for controlling the first timer and the second timer and is interrupted, wherein described the One timer is configured to timing mode, and the second timer is configured to timer orthogonal coding pattern.
8. device according to claim 6, which is characterized in that the determination unit includes:
Reading subunit, under the down trigger of the first timer, reading one in the second timer and posting Direction place value in storage;
Judgment sub-unit, if for judging to show that the direction place value as the first preset direction value, determines the rotation of the motor Direction is to rotate forward;If judging to show that the direction place value as the second preset direction value, determines that the direction of rotation of the motor is anti- Turn.
9. device according to claim 8, which is characterized in that the computing unit includes:
First computation subunit, after the current detection pulse value is subtracted the last detection pulse value, in addition pre- The motor first got, which rotates a circle, generates the product of umber of pulse and the zero crossing number, when obtaining described in the motor Between the umber of pulse generated is rotated forward in section, to obtain the range ability of the robot.
10. a kind of robot, which is characterized in that including main control chip and motor, encoder, the electricity are provided on the motor Machine is connect by the encoder with the main control chip, and the main control chip includes that processor, first timer and second are fixed When device, the motor is electrically connected by the encoder with the processor, the processor and the first timer and institute State second timer electrical connection;The main control chip includes memory, and the processor and the memory are electrically connected by bus It connects;Have program stored therein code in the memory;The processor, for being read simultaneously from the memory by the bus Said program code is run, the method as described in any claims of claim 1-5 is executed.
CN201810314389.5A 2018-04-09 2018-04-09 Robot control method and device and robot Active CN108555906B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810314389.5A CN108555906B (en) 2018-04-09 2018-04-09 Robot control method and device and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810314389.5A CN108555906B (en) 2018-04-09 2018-04-09 Robot control method and device and robot

Publications (2)

Publication Number Publication Date
CN108555906A true CN108555906A (en) 2018-09-21
CN108555906B CN108555906B (en) 2021-03-23

Family

ID=63534410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810314389.5A Active CN108555906B (en) 2018-04-09 2018-04-09 Robot control method and device and robot

Country Status (1)

Country Link
CN (1) CN108555906B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110834334A (en) * 2019-11-20 2020-02-25 常州捷佳创精密机械有限公司 Control method and device for manipulator and processing tank equipment
CN113686363A (en) * 2021-08-25 2021-11-23 武汉珞珈伊云光电技术有限公司 Measuring method, system, electronic device and storage medium based on encoder

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104330581A (en) * 2014-10-23 2015-02-04 李东升 Motor rotation speed measuring system and measuring method
US20150048724A1 (en) * 2012-03-30 2015-02-19 Denso Wave Incorporated Control apparatus for controlling rotation of joints of robot
CN106645786A (en) * 2016-12-31 2017-05-10 深圳市优必选科技有限公司 Speed detection method and device of permanent magnet synchronous motor
CN106645784A (en) * 2017-01-16 2017-05-10 哈尔滨理工大学 Method and circuit for measuring rotating speed of rotary machine
CN206379903U (en) * 2016-12-03 2017-08-04 中国电子科技集团公司第四十三研究所 A kind of motor without position sensor velocity checking circuits
CN107133192A (en) * 2017-05-11 2017-09-05 北方电子研究院安徽有限公司 High speed loader and pulse counter circuit in a kind of SoC systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150048724A1 (en) * 2012-03-30 2015-02-19 Denso Wave Incorporated Control apparatus for controlling rotation of joints of robot
CN104330581A (en) * 2014-10-23 2015-02-04 李东升 Motor rotation speed measuring system and measuring method
CN206379903U (en) * 2016-12-03 2017-08-04 中国电子科技集团公司第四十三研究所 A kind of motor without position sensor velocity checking circuits
CN106645786A (en) * 2016-12-31 2017-05-10 深圳市优必选科技有限公司 Speed detection method and device of permanent magnet synchronous motor
CN106645784A (en) * 2017-01-16 2017-05-10 哈尔滨理工大学 Method and circuit for measuring rotating speed of rotary machine
CN107133192A (en) * 2017-05-11 2017-09-05 北方电子研究院安徽有限公司 High speed loader and pulse counter circuit in a kind of SoC systems

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110834334A (en) * 2019-11-20 2020-02-25 常州捷佳创精密机械有限公司 Control method and device for manipulator and processing tank equipment
CN110834334B (en) * 2019-11-20 2023-11-07 常州捷佳创精密机械有限公司 Control method and device of manipulator and treatment tank equipment
CN113686363A (en) * 2021-08-25 2021-11-23 武汉珞珈伊云光电技术有限公司 Measuring method, system, electronic device and storage medium based on encoder
CN113686363B (en) * 2021-08-25 2023-11-07 武汉珞珈伊云光电技术有限公司 Encoder-based measurement method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN108555906B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
CN104459352B (en) The method for detecting open phase and its device of motor
CN107634993B (en) A kind of information push event-handling method, device and electronic equipment
CN108555906A (en) Control method, device and the robot of robot
CN108900121A (en) Motor initial phase and phase sequence detecting method and control system for permanent-magnet synchronous motor
CN106645786B (en) Permanent magnet synchronous motor speed detection method and device
CN108777578A (en) A kind of code device signal method of sampling and device
CN107124132B (en) A kind of method for identification of rotational inertia and identifier
CN107656093A (en) A kind of detection method and device of rotary encoder
CN109995297A (en) A kind of initial rotation varied angle scaling method for permanent magnet synchronous electric electromechanical bridge assembly
CN105446605B (en) Information processing method and electronic equipment
CN109307795A (en) Data point detection method and device
CN109635864A (en) A kind of fault tolerant control method and device based on data
CN109542040A (en) I/O signal processing method and programmable logic controller (PLC)
CN109696120A (en) A kind of steering engine and its angle detecting method, device and computer readable storage medium
CN106546762B (en) A kind of measurement of rotating speed circuit working method in asynchronous generator power-generating control system
CN109713944B (en) Linear motor driving chip braking method and device
CN109617462A (en) A kind of recognition methods of electric motor starting state
CN109286353A (en) A kind of motor control mode fault detection method and device
CN104422883B (en) The detection method and detection device of a kind of motor desynchronizing
WO2019223108A1 (en) Method and apparatus for measuring movement distance, and storage medium
CN108226563A (en) A kind of motor speed measuring method and apparatus
CN109905059B (en) Sensorless direct current brushless motor control method and device
CN106685279A (en) Method and device for detecting Hall signals of motor
CN108810250A (en) fall detection method and related product
CN104932885B (en) A kind of information processing method and electronic equipment

Legal Events

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