CN109194200A - A kind of control method of servo motor and device - Google Patents
A kind of control method of servo motor and device Download PDFInfo
- Publication number
- CN109194200A CN109194200A CN201811100981.1A CN201811100981A CN109194200A CN 109194200 A CN109194200 A CN 109194200A CN 201811100981 A CN201811100981 A CN 201811100981A CN 109194200 A CN109194200 A CN 109194200A
- Authority
- CN
- China
- Prior art keywords
- servo motor
- delivery outlet
- control
- pulse
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- 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
- H02P29/00—Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors
Abstract
The present invention provides a kind of control method of servo motor and devices, wherein, this method comprises: determining the pulse delivery outlet and pulse direction delivery outlet of three servo motors respectively, wherein, the pulse delivery outlet is used to send the control instruction of control rotation direction to three servo motors, and the pulse direction delivery outlet is used to send the control instruction of control rotation distance to three servo motors;Three servo motors are controlled by sending control instruction to the pulse delivery outlet and the pulse direction delivery outlet.Through the invention, it can solve the problem of simplification for how realizing Serve Motor Control in the related technology, pass through the unified pulse delivery outlet and pulse direction delivery outlet for determining servo motor, control instruction is sent to servo motor by determining pulse delivery outlet and pulse direction delivery outlet later, control to servo motor, the simplification for realizing Serve Motor Control achievees the effect that improve user experience.
Description
Technical field
The present invention relates to the communications fields, in particular to a kind of control method of servo motor and device.
Background technique
With the fast development of industrial automation, non-standard equipment is in various industries fast development, servo motor application control
Indispensable component in non-standard automatic equipment is had become, how convenient to use and operation becomes the side pursued
To.
Aiming at the problem that how to realize the simplification of Serve Motor Control in the related technology, solution is not yet proposed.
Summary of the invention
The embodiment of the invention provides a kind of control method of servo motor and device, at least solve in the related technology how
The problem of realizing the simplification of Serve Motor Control.
According to one embodiment of present invention, a kind of control method of servo motor is provided, comprising:
The pulse delivery outlet and pulse direction delivery outlet of three servo motors are determined respectively, wherein the pulse delivery outlet
For sending the control instruction of control rotation direction to three servo motors, the pulse direction delivery outlet is used for described
Three servo motors send the control instruction of control rotation distance;
Three servos are controlled by sending control instruction to the pulse delivery outlet and the pulse direction delivery outlet
Motor.
Optionally, the pulse delivery outlet of three servo motors determining respectively and pulse direction delivery outlet include:
Definition Y0 is pulse delivery outlet 1, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet 3, wherein three servos
Motor includes servo motor 1, servo motor 2 and servo motor 3, and the Y0 is the pulse delivery outlet of servo motor 1, and the Y1 is
The pulse delivery outlet of servo motor 2, the Y2 are the pulse delivery outlet of servo motor 3;
Definition Y4 is pulse direction delivery outlet 1, and Y5 is pulse direction delivery outlet 2, and Y6 is pulse direction delivery outlet 3, wherein
The Y4 is the pulse direction delivery outlet of the servo motor 1, and the Y5 is the pulse direction delivery outlet of the servo motor 2,
The Y6 is the pulse direction delivery outlet of the servo motor 3.
Optionally, described to control institute by sending control instruction to the pulse delivery outlet and the pulse direction delivery outlet
Stating three servo motors includes:
The first distance control instruction for sending control rotation distance to the servo motor 1 by the Y0, according to described
First distance control instruction controls the distance that the servo motor 1 rotates;By the Y1 to servo motor 2 send control rotation away from
From second distance control instruction, the distance that the servo motor 2 rotates is controlled according to the second distance control instruction;Pass through
The Y2 sends the third distance controlling instruction of control rotation distance to the servo motor 3, according to the third distance controlling
Instruction controls the distance that the servo motor 3 rotates;
The first direction control instruction for sending control rotation direction to the servo motor 1 by the Y4, according to described
First direction control instruction controls the direction that the servo motor 1 rotates;It is sent and is controlled to the servo motor 2 by the Y5
The second direction control instruction of rotation direction controls the side that the servo motor 2 rotates according to the second direction control instruction
To;The third direction control instruction for sending control rotation direction to the servo motor 3 by the Y6, according to the third party
The direction that the servo motor 3 rotates is controlled to control instruction.
Optionally, the method also includes:
It defines the Z phase that X5 is the Y0 to export, X6 is that the Z phase of the Y1 exports, and X7 is that the Z phase of the Y3 exports.
Optionally, described by sending control instruction control to the pulse delivery outlet and the pulse direction delivery outlet
After three servo motors, the method also includes:
The first location information that the servo motor 1 is fed back is received by the X5, the servo is received by the X6
The second location information that motor 2 is fed back receives the third place information that the servo motor 3 is fed back by the X7, wherein institute
First location information is stated for prompting the servo motor 1 to turn to the second position, the second location information from first position
For prompting the servo motor 2 to turn to the 4th position from the third place, the servo motor 3 turns to from the 5th position
Six positions;
Judge whether the position after the second position and the control servo motor 1 rotate is identical, judges described the
Whether the position after four positions are rotated with the control servo motor 2 is identical, judges the 6th position and servo electricity
Whether the position after machine 3 rotates is identical, wherein the position after the servo motor 1 rotates is according to the first distance
What control instruction and first direction control instruction determined, the servo motor 2 rotate after position be according to described second away from
It is determined from control instruction and second direction control instruction, the position after the servo motor 2 rotates is according to the third
What distance controlling instruction and the third direction control instruction determined;
In the case where judging result is no, by sending the first distance control instruction and the first direction control
System instruction controls the servo motor 1 and rotates back into the first position, by sending the second distance control instruction and institute
It states the second direction control instruction control servo motor 2 and rotates back into the third place, by sending the third distance
Control instruction and the third direction control instruction control the servo motor 3 and rotate back into the 5th position.
According to another embodiment of the invention, a kind of servo motor control device is additionally provided, comprising:
Determining module, for determining the pulse delivery outlet and pulse direction delivery outlet of three servo motors respectively, wherein institute
Pulse delivery outlet is stated for sending the control instruction of control rotation direction, the pulse direction output to three servo motors
Mouth is for sending the control instruction of control rotation distance to three servo motors;
First control module, for by sending control instruction to the pulse delivery outlet and the pulse direction delivery outlet
Control three servo motors.
Optionally, the determining module includes:
First definition unit is pulse delivery outlet 1 for defining Y0, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet 3,
Wherein, three servo motors include servo motor 1, servo motor 2 and servo motor 3, and the Y0 is the arteries and veins of servo motor 1
Delivery outlet is rushed, the Y1 is the pulse delivery outlet of servo motor 2, and the Y2 is the pulse delivery outlet of servo motor 3;
Second definition unit is pulse direction delivery outlet 1 for defining Y4, and Y5 is pulse direction delivery outlet 2, and Y6 is pulse
Direction delivery outlet 3, wherein the Y4 is the pulse direction delivery outlet of the servo motor 1, and the Y5 is the servo motor 2
Pulse direction delivery outlet, the Y6 be the servo motor 3 pulse direction delivery outlet.
Optionally, first control module includes:
First control unit, for sending the first distance of control rotation distance to the servo motor 1 by the Y0
Control instruction controls the distance that the servo motor 1 rotates according to the first distance control instruction;By the Y1 to servo
Motor 2 sends the second distance control instruction of control rotation distance, controls the servo electricity according to the second distance control instruction
The distance that machine 2 rotates;The third distance controlling instruction of control rotation distance, root are sent to the servo motor 3 by the Y2
The distance that the servo motor 3 rotates is controlled according to third distance controlling instruction;
Second control unit, for sending the first direction of control rotation direction to the servo motor 1 by the Y4
Control instruction controls the direction that the servo motor 1 rotates according to the first direction control instruction;By the Y5 to described
Servo motor 2 sends the second direction control instruction of control rotation direction, according to second direction control instruction control
The direction that servo motor 2 rotates;Referred to by the Y6 to the third direction control that the servo motor 3 sends control rotation direction
It enables, the direction that the servo motor 3 rotates is controlled according to the third direction control instruction.
Optionally, described device further include:
Definition module is exported for defining the Z phase that X5 is the Y0, and X6 is that the Z phase of the Y1 exports, and X7 is the Y3's
Z phase exports.
Optionally, described device further include:
Receiving module passes through the X6 for receiving the first location information that the servo motor 1 is fed back by the X5
The second location information that the servo motor 2 is fed back is received, the third place that the servo motor 3 is fed back is received by the X7
Information, wherein the first location information is described for prompting the servo motor 1 to turn to the second position from first position
Second location information is for prompting the servo motor 2 to turn to the 4th position, the servo motor 3 from the 5th from the third place
Position turns to the 6th position;
Judgment module, for judge position after the second position and the control servo motor 1 rotate whether phase
Together, judge whether the position after the 4th position is rotated with the control servo motor 2 is identical, judges the 6th position
It is whether identical as the position after the servo motor 3 rotation, wherein the position after the servo motor 1 rotates is basis
What the first distance control instruction and first direction control instruction determined, the position after the servo motor 2 rotates is root
It is determined according to the second distance control instruction and second direction control instruction, the position after the servo motor 2 rotates is
It is determined according to third distance controlling instruction and the third direction control instruction;
Second control module, for being referred to by sending the first distance control in the case where judging result is no
It enables and the first direction control instruction controls the servo motor 1 and rotates back into the first position, by sending described the
The instruction of two distance controllings and the second direction control instruction control the servo motor 2 and rotate back into the third place, lead to
Cross send third distance controlling instruction and the third direction control instruction control the servo motor 3 rotate back into it is described
5th position.
According to still another embodiment of the invention, a kind of storage medium is additionally provided, meter is stored in the storage medium
Calculation machine program, wherein the computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
According to still another embodiment of the invention, a kind of electronic device, including memory and processor are additionally provided, it is described
Computer program is stored in memory, the processor is arranged to run the computer program to execute any of the above-described
Step in embodiment of the method.
Through the invention, due to respectively determine three servo motors pulse delivery outlet and pulse direction delivery outlet, wherein
The pulse delivery outlet is used to send the control instruction of control rotation direction to three servo motors, and the pulse direction is defeated
Export the control instruction for sending control rotation distance to three servo motors;By to the pulse delivery outlet and institute
State pulse direction delivery outlet and send control instruction and control three servo motors, therefore, can solve in the related technology how
The problem of realizing the simplification of Serve Motor Control is exported by the unified pulse delivery outlet for determining servo motor and pulse direction
Mouthful, control instruction is sent to servo motor by determining pulse delivery outlet and pulse direction delivery outlet later, to servo motor
Control, realize the simplification of Serve Motor Control, achieve the effect that improve user experience.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of hardware block diagram of the mobile terminal of control method of servo motor of the embodiment of the present invention;
Fig. 2 is a kind of flow chart of control method of servo motor according to an embodiment of the present invention;
Fig. 3 is the block diagram of servo motor control device according to an embodiment of the present invention;
Fig. 4 is the block diagram one of servo motor control device according to the preferred embodiment of the invention;
Fig. 5 is the block diagram two of servo motor control device according to the preferred embodiment of the invention.
Specific embodiment
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in combination with Examples.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.
Embodiment 1
Embodiment of the method provided by the embodiment of the present application one can be in mobile terminal, terminal or similar fortune
It calculates and is executed in device.For running on mobile terminals, Fig. 1 is a kind of control method of servo motor of the embodiment of the present invention
The hardware block diagram of mobile terminal, as shown in Figure 1, mobile terminal 10 may include three (only showing one in Fig. 1) processing
Device 102 (processing unit that processor 102 can include but is not limited to Micro-processor MCV or programmable logic device FPGA etc.) and
Memory 104 for storing data, optionally, above-mentioned mobile terminal can also include the transmission device for communication function
106 and input-output equipment 108.It will appreciated by the skilled person that structure shown in FIG. 1 is only to illustrate, simultaneously
The structure of above-mentioned mobile terminal is not caused to limit.For example, mobile terminal 10 may also include it is more than shown in Fig. 1 or less
Component, or with the configuration different from shown in Fig. 1.
Memory 104 can be used for storing computer program, for example, the software program and module of application software, such as this hair
The corresponding computer program of message method of reseptance in bright embodiment, processor 102 are stored in memory 104 by operation
Computer program realizes above-mentioned method thereby executing various function application and data processing.Memory 104 may include
High speed random access memory, may also include nonvolatile memory, as one or more magnetic storage device, flash memory or its
His non-volatile solid state memory.In some instances, memory 104 can further comprise remotely setting relative to processor 102
The memory set, these remote memories can pass through network connection to mobile terminal 10.The example of above-mentioned network includes but not
It is limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device 106 is used to that data to be received or sent via a network.Above-mentioned network specific example may include
The wireless network that the communication providers of mobile terminal 10 provide.In an example, transmitting device 106 includes a Network adaptation
Device (Network Interface Controller, referred to as NIC), can be connected by base station with other network equipments to
It can be communicated with internet.In an example, transmitting device 106 can for radio frequency (Radio Frequency, referred to as
RF) module is used to wirelessly be communicated with internet.
Based on above-mentioned mobile terminal, a kind of control method of servo motor is provided in the present embodiment, Fig. 2 is according to this hair
The flow chart of a kind of control method of servo motor of bright embodiment, as shown in Fig. 2, the process includes the following steps:
Step S202 determines the pulse delivery outlet and pulse direction delivery outlet of three servo motors, wherein the arteries and veins respectively
It rushes delivery outlet and is used for sending the control instruction of control rotation direction, the pulse direction delivery outlet to three servo motors
In the control instruction for sending control rotation distance to three servo motors;
Step S204, by being sent described in control instruction control to the pulse delivery outlet and the pulse direction delivery outlet
Three servo motors.
Through the above steps, due to respectively determine three servo motors pulse delivery outlet and pulse direction delivery outlet,
In, the pulse delivery outlet is used to send the control instruction of control rotation direction, the pulse side to three servo motors
It is used to send the control instruction of control rotation distance to three servo motors to delivery outlet;By to the pulse delivery outlet
Therefore sending control instruction control three servo motors with the pulse direction delivery outlet can solve in the related technology
The problem of how realizing the simplification of Serve Motor Control passes through the unified pulse delivery outlet and pulse direction for determining servo motor
Delivery outlet sends control instruction to servo motor by determining pulse delivery outlet and pulse direction delivery outlet later, to servo
The control of motor realizes the simplification of Serve Motor Control, achievees the effect that improve user experience.
The embodiment of the present invention is watched by the pulse delivery outlet and pulse direction delivery outlet of unified definition servo motor to realize
The simplification of motor control is taken, specifically, the pulse delivery outlet for determining three servo motors respectively and pulse direction output
Mouth may include: to define Y0 for pulse delivery outlet 1, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet 3, wherein described three
Servo motor includes servo motor 1, servo motor 2 and servo motor 3, and the Y0 is the pulse delivery outlet of servo motor 1, described
Y1 is the pulse delivery outlet of servo motor 2, and the Y2 is the pulse delivery outlet of servo motor 3;Y4 is defined as pulse direction output
1, Y5 of mouth is pulse direction delivery outlet 2, and Y6 is pulse direction delivery outlet 3, wherein the Y4 is the pulse of the servo motor 1
Direction delivery outlet, the Y5 are the pulse direction delivery outlet of the servo motor 2, and the Y6 is the pulse of the servo motor 3
Direction delivery outlet.
In the embodiment of the present invention, the pulse output quantity and the transmission control of pulse direction delivery outlet to servo motor can be passed through
Instruction is uniformly controlled servo motor, specifically, described by sending to the pulse delivery outlet and the pulse direction delivery outlet
Control instruction control three servo motors may include: by the Y0 to the servo motor 1 send control rotation away from
From first distance control instruction, the distance that the servo motor 1 rotates is controlled according to the first distance control instruction;Pass through
The Y1 sends the second distance control instruction of control rotation distance to servo motor 2, according to the second distance control instruction control
Make the distance that the servo motor 2 rotates;The third distance of control rotation distance is sent to the servo motor 3 by the Y2
Control instruction controls the distance that the servo motor 3 rotates according to third distance controlling instruction;By the Y4 to described
Servo motor 1 sends the first direction control instruction of control rotation direction, according to first direction control instruction control
The direction that servo motor 1 rotates;Referred to by the Y5 to the second direction control that the servo motor 2 sends control rotation direction
It enables, the direction that the servo motor 2 rotates is controlled according to the second direction control instruction;It is electric to the servo by the Y6
Machine 3 sends the third direction control instruction of control rotation direction, controls the servo electricity according to the third direction control instruction
The direction that machine 3 rotates.
The embodiment of the present invention can also judge whether servo motor installs control instruction according to the content that servo motor is fed back
It is rotated, specifically, defines the Z phase that X5 is the Y0 and export, X6 is that the Z phase of the Y1 exports, and X7 is that the Z phase of the Y3 is defeated
Out.Further, institute is controlled by sending control instruction to the pulse delivery outlet and the pulse direction delivery outlet described
After stating three servo motors, the first location information that the servo motor 1 is fed back is received by the X5, is connect by the X6
The second location information that the servo motor 2 is fed back is received, the third place that the servo motor 3 is fed back is received by the X7 and is believed
Breath, wherein the first location information is for prompting the servo motor 1 to turn to the second position from first position, and described the
Two location informations are for prompting the servo motor 2 to turn to the 4th position from the third place, and the servo motor 3 is from the 5th
It sets and turns to the 6th position;Judge whether the position after the second position is rotated with the control servo motor 1 is identical, sentences
Break the 4th position and the control servo motor 2 rotate after position it is whether identical, judge the 6th position and institute
Whether the position stated after servo motor 3 rotates is identical, wherein the position after the servo motor 1 rotates is according to
What first distance control instruction and first direction control instruction determined, the position after the servo motor 2 rotates is according to institute
State what second distance control instruction and second direction control instruction determined, the position after the servo motor 2 rotates is basis
What the third distance controlling instruction and the third direction control instruction determined;In the case where judging result is no, lead to
Cross send the first distance control instruction and the first direction control instruction control the servo motor 1 rotate back into it is described
First position controls the servo motor 2 by sending the second distance control instruction and the second direction control instruction
It rotates back into the third place, control institute by sending the third distance controlling instruction and the third direction control instruction
It states servo motor 3 and rotates back into the 5th position.
By defining input and output point, three Panasonic's Serve Motor Controls (position control mode) are controlled with Mitsubishi PLC
Example explanation, definition Y0 are pulse delivery outlet 1, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet 3, and Y4 is pulse direction output
1, Y5 of mouth is pulse direction delivery outlet 2, and Y6 is pulse direction delivery outlet 3.X5 is that the Z phase of Y0 exports (open collector), and X6 is
The Z phase of Y1 exports, and X7 is that the Z phase of Y3 exports, and realizes position control by the i.e. controllable servo motor of SERVO CONTROL special instruction.
The embodiment of the present invention uses input and output point, format program by unified definition, then by simplifying programming side
Formula, then next time directly uses the control module for servo motor after the completion of programming, and importing program is i.e. controllable, does not need to compile again
Program control servo motor, reduces programming time, improves working efficiency.Due to programming forms diversification, pass through unified definition
Using input and output point, format program, then by simplifying programming mode, programming efficiency is improved.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Embodiment 2
A kind of servo motor control device is additionally provided in the present embodiment, and the device is for realizing above-described embodiment and excellent
Embodiment is selected, the descriptions that have already been made will not be repeated.As used below, predetermined function may be implemented in term " module "
Software and/or hardware combination.Although device described in following embodiment is preferably realized with software, hardware,
Or the realization of the combination of software and hardware is also that may and be contemplated.
Fig. 3 is the block diagram of servo motor control device according to an embodiment of the present invention, as shown in Figure 3, comprising:
Determining module 32, for determining the pulse delivery outlet and pulse direction delivery outlet of three servo motors respectively, wherein
The pulse delivery outlet is used to send the control instruction of control rotation direction to three servo motors, and the pulse direction is defeated
Export the control instruction for sending control rotation distance to three servo motors;
First control module 34, for being referred to by sending control to the pulse delivery outlet and the pulse direction delivery outlet
It enables and controls three servo motors.
Fig. 4 is the block diagram one of servo motor control device according to the preferred embodiment of the invention, as shown in figure 4, described true
Cover half block 32 includes:
First definition unit 42 is pulse delivery outlet 1 for defining Y0, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet
3, wherein three servo motors include servo motor 1, servo motor 2 and servo motor 3, and the Y0 is servo motor 1
Pulse delivery outlet, the Y1 are the pulse delivery outlet of servo motor 2, and the Y2 is the pulse delivery outlet of servo motor 3;
Second definition unit 44 is pulse direction delivery outlet 1 for defining Y4, and Y5 is pulse direction delivery outlet 2, and Y6 is arteries and veins
Rush direction delivery outlet 3, wherein the Y4 is the pulse direction delivery outlet of the servo motor 1, and the Y5 is the servo motor
2 pulse direction delivery outlet, the Y6 are the pulse direction delivery outlet of the servo motor 3.
Fig. 5 is the block diagram two of servo motor control device according to the preferred embodiment of the invention, as shown in figure 5, described
One control module 34 includes:
First control unit 52, for by the Y0 to the servo motor 1 send control rotation distance first away from
From control instruction, the distance that the servo motor 1 rotates is controlled according to the first distance control instruction;By the Y1 to watching
The second distance control instruction that motor 2 sends control rotation distance is taken, the servo is controlled according to the second distance control instruction
The distance that motor 2 rotates;The third distance controlling instruction of control rotation distance is sent to the servo motor 3 by the Y2,
The distance that the servo motor 3 rotates is controlled according to third distance controlling instruction;
Second control unit 54, for sending the first party of control rotation direction to the servo motor 1 by the Y4
To control instruction, the direction that the servo motor 1 rotates is controlled according to the first direction control instruction;By the Y5 to institute
The second direction control instruction that servo motor 2 sends control rotation direction is stated, institute is controlled according to the second direction control instruction
State the direction of the rotation of servo motor 2;The third direction control of control rotation direction is sent to the servo motor 3 by the Y6
Instruction controls the direction that the servo motor 3 rotates according to the third direction control instruction.
Optionally, described device further include:
Definition module is exported for defining the Z phase that X5 is the Y0, and X6 is that the Z phase of the Y1 exports, and X7 is the Y3's
Z phase exports.
Optionally, described device further include:
Receiving module passes through the X6 for receiving the first location information that the servo motor 1 is fed back by the X5
The second location information that the servo motor 2 is fed back is received, the third place that the servo motor 3 is fed back is received by the X7
Information, wherein the first location information is described for prompting the servo motor 1 to turn to the second position from first position
Second location information is for prompting the servo motor 2 to turn to the 4th position, the servo motor 3 from the 5th from the third place
Position turns to the 6th position;
Judgment module, for judge position after the second position and the control servo motor 1 rotate whether phase
Together, judge whether the position after the 4th position is rotated with the control servo motor 2 is identical, judges the 6th position
It is whether identical as the position after the servo motor 3 rotation, wherein the position after the servo motor 1 rotates is basis
What the first distance control instruction and first direction control instruction determined, the position after the servo motor 2 rotates is root
It is determined according to the second distance control instruction and second direction control instruction, the position after the servo motor 2 rotates is
It is determined according to third distance controlling instruction and the third direction control instruction;
Second control module, for being referred to by sending the first distance control in the case where judging result is no
It enables and the first direction control instruction controls the servo motor 1 and rotates back into the first position, by sending described the
The instruction of two distance controllings and the second direction control instruction control the servo motor 2 and rotate back into the third place, lead to
Cross send third distance controlling instruction and the third direction control instruction control the servo motor 3 rotate back into it is described
5th position.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong
Following manner realization is crossed, but not limited to this: above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with any
Combined form is located in different processors.
Embodiment 3
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein
The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S11 determines the pulse delivery outlet and pulse direction delivery outlet of three servo motors, wherein the pulse is defeated respectively
Export for three servo motors send control rotation direction control instruction, the pulse direction delivery outlet be used for
Three servo motors send the control instruction of control rotation distance;
S12, step S204, by sending control instruction control to the pulse delivery outlet and the pulse direction delivery outlet
Three servo motors.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (Read-
Only Memory, referred to as ROM), it is random access memory (Random Access Memory, referred to as RAM), mobile hard
The various media that can store computer program such as disk, magnetic or disk.
Embodiment 4
The embodiments of the present invention also provide a kind of electronic device, including memory and processor, stored in the memory
There is computer program, which is arranged to run computer program to execute the step in any of the above-described embodiment of the method
Suddenly.
Optionally, above-mentioned electronic device can also include transmission device and input-output equipment, wherein the transmission device
It is connected with above-mentioned processor, which connects with above-mentioned processor.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S11 determines the state of mobile terminal by household electrical appliance;
S11 determines the pulse delivery outlet and pulse direction delivery outlet of three servo motors, wherein the pulse is defeated respectively
Export for three servo motors send control rotation direction control instruction, the pulse direction delivery outlet be used for
Three servo motors send the control instruction of control rotation distance;
S12, step S204, by sending control instruction control to the pulse delivery outlet and the pulse direction delivery outlet
Three servo motors.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
It is performed by computing device in the storage device, and in some cases, it can be to be different from shown in sequence execution herein
Out or description the step of, perhaps they are fabricated to each integrated circuit modules or by them multiple modules or
Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
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.It is all within principle of the invention, it is made it is any modification, etc.
With replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of control method of servo motor characterized by comprising
The pulse delivery outlet and pulse direction delivery outlet of three servo motors are determined respectively, wherein the pulse delivery outlet is used for
The control instruction of control rotation direction is sent to three servo motors, the pulse direction delivery outlet is used for described three
Servo motor sends the control instruction of control rotation distance;
Three servo motors are controlled by sending control instruction to the pulse delivery outlet and the pulse direction delivery outlet.
2. the method according to claim 1, wherein the pulse delivery outlet for determining three servo motors respectively
Include: with pulse direction delivery outlet
Definition Y0 is pulse delivery outlet 1, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet 3, wherein three servo motors
Including servo motor 1, servo motor 2 and servo motor 3, the Y0 is the pulse delivery outlet of servo motor 1, and the Y1 is servo
The pulse delivery outlet of motor 2, the Y2 are the pulse delivery outlet of servo motor 3;
Definition Y4 is pulse direction delivery outlet 1, and Y5 is pulse direction delivery outlet 2, and Y6 is pulse direction delivery outlet 3, wherein described
Y4 is the pulse direction delivery outlet of the servo motor 1, and the Y5 is the pulse direction delivery outlet of the servo motor 2, described
Y6 is the pulse direction delivery outlet of the servo motor 3.
3. according to the method described in claim 2, it is characterized in that, described by the pulse delivery outlet and the pulse side
Sending control instruction control three servo motors to delivery outlet includes:
The first distance control instruction for sending control rotation distance to the servo motor 1 by the Y0, according to described first
Distance controlling instruction controls the distance that the servo motor 1 rotates;Control rotation distance is sent to servo motor 2 by the Y1
Second distance control instruction controls the distance that the servo motor 2 rotates according to the second distance control instruction;By described
Y2 sends the third distance controlling instruction of control rotation distance to the servo motor 3, is instructed according to the third distance controlling
Control the distance that the servo motor 3 rotates;
The first direction control instruction for sending control rotation direction to the servo motor 1 by the Y4, according to described first
Direction control command controls the direction that the servo motor 1 rotates;Control rotation is sent to the servo motor 2 by the Y5
The second direction control instruction in direction controls the direction that the servo motor 2 rotates according to the second direction control instruction;It is logical
The third direction control instruction that the Y6 sends control rotation direction to the servo motor 3 is crossed, according to the third direction control
System instruction controls the direction that the servo motor 3 rotates.
4. according to the method described in claim 2, it is characterized in that, the method also includes:
It defines the Z phase that X5 is the Y0 to export, X6 is that the Z phase of the Y1 exports, and X7 is that the Z phase of the Y3 exports.
5. according to the method described in claim 4, it is characterized in that, described by the pulse delivery outlet and the pulse
After direction delivery outlet sends control instruction control three servo motors, the method also includes:
The first location information that the servo motor 1 is fed back is received by the X5, the servo motor 2 is received by the X6
The second location information of feedback receives the third place information that the servo motor 3 is fed back by the X7, wherein described the
For prompting the servo motor 1 to turn to the second position from first position, the second location information is used for one location information
The servo motor 2 is prompted to turn to the 4th position from the third place, the servo motor 3 turns to the 6th from the 5th position
It sets;
Judge whether the position after the second position is rotated with the control servo motor 1 is identical, judges described 4th
Whether the position set after rotating with the control servo motor 2 is identical, judges the 6th position and 3 turns of the servo motor
Whether the position after dynamic is identical, wherein the position after the servo motor 1 rotates is referred to according to first distance control
What order and first direction control instruction determined, the position after the servo motor 2 rotates is controlled according to the second distance
What instruction and second direction control instruction determined, the position after the servo motor 2 rotates is according to the third distance control
What system instruction and the third direction control instruction determined;
In the case where judging result is no, referred to by sending the first distance control instruction and first direction control
It enables and controls the servo motor 1 and rotate back into the first position, by sending the second distance control instruction and described the
Two direction control commands control the servo motor 2 and rotate back into the third place, by sending the third distance controlling
Instruction and the third direction control instruction control the servo motor 3 and rotate back into the 5th position.
6. a kind of servo motor control device characterized by comprising
Determining module, for determining the pulse delivery outlet and pulse direction delivery outlet of three servo motors respectively, wherein the arteries and veins
It rushes delivery outlet and is used for sending the control instruction of control rotation direction, the pulse direction delivery outlet to three servo motors
In the control instruction for sending control rotation distance to three servo motors;
First control module, for by sending control instruction control to the pulse delivery outlet and the pulse direction delivery outlet
Three servo motors.
7. device according to claim 6, which is characterized in that the determining module includes:
First definition unit is pulse delivery outlet 1 for defining Y0, and Y1 is pulse delivery outlet 2, and Y2 is pulse delivery outlet 3,
In, three servo motors include servo motor 1, servo motor 2 and servo motor 3, and the Y0 is the pulse of servo motor 1
Delivery outlet, the Y1 are the pulse delivery outlet of servo motor 2, and the Y2 is the pulse delivery outlet of servo motor 3;
Second definition unit is pulse direction delivery outlet 1 for defining Y4, and Y5 is pulse direction delivery outlet 2, and Y6 is pulse direction
Delivery outlet 3, wherein the Y4 is the pulse direction delivery outlet of the servo motor 1, and the Y5 is the arteries and veins of the servo motor 2
Direction delivery outlet is rushed, the Y6 is the pulse direction delivery outlet of the servo motor 3.
8. device according to claim 7, which is characterized in that first control module includes:
First control unit, for being controlled by the Y0 to the first distance that the servo motor 1 sends control rotation distance
Instruction controls the distance that the servo motor 1 rotates according to the first distance control instruction;By the Y1 to servo motor
2 send the second distance control instruction of control rotation distance, according to described 2 turns of servo motor of second distance control instruction control
Dynamic distance;The third distance controlling instruction for sending control rotation distance to the servo motor 3 by the Y2, according to described
The instruction of third distance controlling controls the distance that the servo motor 3 rotates;
Second control unit, for being controlled by the Y4 to the first direction that the servo motor 1 sends control rotation direction
Instruction controls the direction that the servo motor 1 rotates according to the first direction control instruction;By the Y5 to the servo
Motor 2 sends the second direction control instruction of control rotation direction, controls the servo according to the second direction control instruction
The direction that motor 2 rotates;The third direction control instruction of control rotation direction is sent to the servo motor 3 by the Y6,
The direction that the servo motor 3 rotates is controlled according to the third direction control instruction.
9. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer
Program is arranged to execute method described in any one of claim 1 to 5 when operation.
10. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory
Sequence, the processor are arranged to run the computer program to execute side described in any one of claim 1 to 5
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811100981.1A CN109194200A (en) | 2018-09-20 | 2018-09-20 | A kind of control method of servo motor and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811100981.1A CN109194200A (en) | 2018-09-20 | 2018-09-20 | A kind of control method of servo motor and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109194200A true CN109194200A (en) | 2019-01-11 |
Family
ID=64908993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811100981.1A Pending CN109194200A (en) | 2018-09-20 | 2018-09-20 | A kind of control method of servo motor and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109194200A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425772A (en) * | 2007-11-02 | 2009-05-06 | 深圳迈瑞生物医疗电子股份有限公司 | Dynamic data collection system and accurately positioning method for collection position |
CN103399515A (en) * | 2013-08-14 | 2013-11-20 | 中国航空工业集团公司北京长城计量测试技术研究所 | Point location motion controller |
CN103580554A (en) * | 2013-10-12 | 2014-02-12 | 欣旺达电子股份有限公司 | Method for controlling servo motor by secondary controller, secondary controller and system |
JP2014230303A (en) * | 2013-05-17 | 2014-12-08 | 株式会社キーエンス | Motor driving apparatus |
CN104811101A (en) * | 2015-04-07 | 2015-07-29 | 中智电气南京有限公司 | AC (alternate current) servo motor based on position feedback structure |
CN106341649A (en) * | 2015-07-07 | 2017-01-18 | 杭州海康威视数字技术股份有限公司 | Cradle head control method and device |
CN106527352A (en) * | 2016-11-23 | 2017-03-22 | 河池学院 | Robot servo motor positioning control method |
CN106774269A (en) * | 2016-12-29 | 2017-05-31 | 合肥欣奕华智能机器有限公司 | The method of testing and test system of a kind of controller for industrial robot |
CN206908538U (en) * | 2017-07-06 | 2018-01-19 | 深圳市嘉昱机电有限公司 | Servo motor driving device and system |
-
2018
- 2018-09-20 CN CN201811100981.1A patent/CN109194200A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425772A (en) * | 2007-11-02 | 2009-05-06 | 深圳迈瑞生物医疗电子股份有限公司 | Dynamic data collection system and accurately positioning method for collection position |
JP2014230303A (en) * | 2013-05-17 | 2014-12-08 | 株式会社キーエンス | Motor driving apparatus |
CN103399515A (en) * | 2013-08-14 | 2013-11-20 | 中国航空工业集团公司北京长城计量测试技术研究所 | Point location motion controller |
CN103580554A (en) * | 2013-10-12 | 2014-02-12 | 欣旺达电子股份有限公司 | Method for controlling servo motor by secondary controller, secondary controller and system |
CN104811101A (en) * | 2015-04-07 | 2015-07-29 | 中智电气南京有限公司 | AC (alternate current) servo motor based on position feedback structure |
CN106341649A (en) * | 2015-07-07 | 2017-01-18 | 杭州海康威视数字技术股份有限公司 | Cradle head control method and device |
CN106527352A (en) * | 2016-11-23 | 2017-03-22 | 河池学院 | Robot servo motor positioning control method |
CN106774269A (en) * | 2016-12-29 | 2017-05-31 | 合肥欣奕华智能机器有限公司 | The method of testing and test system of a kind of controller for industrial robot |
CN206908538U (en) * | 2017-07-06 | 2018-01-19 | 深圳市嘉昱机电有限公司 | Servo motor driving device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103309308B (en) | A kind of device intelligence control method and device, system, PnP device | |
CN106161100B (en) | A kind of internet of things equipment configuration method and internet-of-things terminal | |
JP6421220B2 (en) | Field device control management method and apparatus based on Industrial Internet Operating System | |
CN110351378A (en) | A kind of control method and system of internet of things equipment | |
CN107276866A (en) | Home appliance match somebody with somebody network method, device and home appliance | |
CN109980776A (en) | A kind of intelligence distribution transforming system and the systematic difference method | |
CN105334809B (en) | A kind of autocontrol method and device | |
CN103048959A (en) | Method for configuring a control device | |
CN106899594A (en) | For the sub- device management method and system of smart home platform | |
CN109147788A (en) | The update method and device in local voice library | |
CN108107755A (en) | Home wiring control weighs sharing method and device | |
CN104898440A (en) | Household electrical appliance control method and apparatus | |
EP1344291B1 (en) | An improved digital protection and control device and method thereof | |
CN107395468A (en) | Household appliance controlling system, method and its equipment | |
US8005915B2 (en) | Method for providing download and upload service in network control system | |
CN113168334A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN105785905A (en) | Configurable field bus system and configuration method thereof | |
CN108873787A (en) | Household appliance and its control method, control device, terminal control equipment | |
CN105049339A (en) | Method and device for loading control interface of intelligent device | |
CN105978761A (en) | Smart home appointed adding method, smart home appointed adding device and terminal | |
CN104317205B (en) | terminal control method and system | |
CN109194200A (en) | A kind of control method of servo motor and device | |
CN107526584A (en) | Data cut-in method and device | |
CN108234052A (en) | The method, apparatus and system that a kind of clock synchronizes | |
US20070130278A1 (en) | Home network system |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190111 |