The content of the invention
The shortcoming of prior art in view of the above, it is an object of the invention to provide a kind of automation control system and side
Method, plant equipment, embedded programming, control one by way of realize the Automated condtrol of safety, high speed, its low cost,
Operational precision is high, scalability is high, is easy to system upgrade and extension.
In order to achieve the above objects and other related objects, the present invention provides a kind of automation control system, right for realizing
The Automated condtrol of basic machine, including motion controller and servo-driver;The motion controller is used to receive client
The control instruction that sends and according to the control instruction generate each joint of basic machine position data and transmission to described
Servo-driver, and receive the movable information of the basic machine sent by the servo-driver;The servo-driver
Control parameter for generating each motor on basic machine according to the position data in each joint of basic machine, and obtain machine
The movable information of tool body is simultaneously sent to the motion controller.
In one embodiment of the invention, also including client, the client is used to send control instruction to the motion
Controller, and receive the movable information of the basic machine sent by the motion controller.
In one embodiment of the invention, the motion controller includes that path planning unit, inverse kinematics unit, interpolation are put down
Sliding unit, network communication unit and SPI communication unit;
The network communication unit is used to be realized by Ethernet and the communication between client;
The path planning unit is used to be planned according to the control instruction path of basic machine;
The interpolation smooth unit is used for smooth planned basic machine path;
The inverse kinematics unit be used for will it is smooth after the positional information in basic machine path to be converted to basic machine each
The position data in joint;
The SPI communication unit is used to be realized by spi bus and the communication between servo-driver.
In one embodiment of the invention, also including image acquiring device, described image acquisition device is used to obtain machinery originally
Real time environment image residing for body, and send to the motion controller;
The motion controller includes that environmental detection unit, path planning unit, inverse kinematics unit, interpolation are smooth single
Unit, network communication unit and SPI communication unit;
The environmental detection unit is used for the real time environment image according to residing for basic machine, obtains residing for basic machine
Real time environment information;
The real time environment information that the path planning unit is used for according to residing for the control instruction and basic machine is machine
Tool body path planning;
The interpolation smooth unit is used for smooth planned basic machine path;
The inverse kinematics unit be used for will it is smooth after the positional information in basic machine path to be converted to basic machine each
The position data in joint;
The network communication unit is used to be realized by Ethernet and the communication between client;
The SPI communication unit is used to be realized by spi bus and the communication between servo-driver.
In one embodiment of the invention, the servo-driver includes motor position and speed control unit and SPI communication
Unit;
The motor position and speed control unit are used for each according to the control parameter control of each motor on basic machine
The motion of individual motor, and obtain the movable information of basic machine;
The SPI communication unit is used to realize and the communication between motion controller.
In one embodiment of the invention, the motor on the servo-driver and the basic machine passes through RS485 buses
Connection.
In one embodiment of the invention, the motion controller and the servo-driver are integrated in same on-chip system.
Meanwhile, the present invention also provides a kind of plant equipment, including any of the above-described institute that basic machine is connected with basic machine
The automation control system stated, is controlled with by the automation control system to the basic machine.
In one embodiment of the invention, the basic machine is robot body.
Correspondingly, the present invention also provides a kind of automation control method, for realizing the Automated condtrol to basic machine,
Comprise the following steps:
The control instruction that sends of client is received by motion controller and to generate basic machine according to control instruction each
The position data in individual joint is simultaneously sent to servo-driver, while receiving the motion of the basic machine sent by servo-driver
Information;
Each motor on basic machine is generated according to the position data in each joint of basic machine by servo-driver
Control parameter, while obtaining the movable information of basic machine and sending to motion controller.
In one embodiment of the invention, also include:Control instruction is sent to the motion controller by client, and
The movable information of the basic machine that reception is sent by the motion controller.
In one embodiment of the invention, the motion controller performs following operation:
By the communication between real-time performance and client;
The path of basic machine is planned according to control instruction;
Smooth planned basic machine path;
The positional information in the basic machine path after will be smooth is converted to the position data in each joint of basic machine;
Realized by spi bus and the communication between servo-driver.
In one embodiment of the invention, also including obtaining the real time environment figure residing for basic machine by image acquiring device
Picture, and send to the motion controller;
The motion controller performs following operation;
Real time environment image according to residing for basic machine, obtains the real time environment information residing for basic machine;
Real time environment information according to residing for control instruction and basic machine is basic machine path planning;
Smooth planned basic machine path;
The positional information in the basic machine path after will be smooth is converted to the position data in each joint of basic machine;
By the communication between real-time performance and client;
Realized by spi bus and the communication between servo-driver.
In one embodiment of the invention, the servo-driver performs following operation:
Control parameter according to each motor on basic machine controls the motion of each motor, and obtains basic machine
Movable information;
Realized by spi bus and the communication between servo-driver.
In one embodiment of the invention, the motor on the servo-driver and the basic machine passes through RS485 buses
Connection.
In one embodiment of the invention, the motion controller and the servo-driver are integrated in same on-chip system.
As described above, automation control system of the invention and method, plant equipment, have the advantages that:
(1) Automated condtrol of safety, high speed is realized by embedded programming, its low cost, operational precision are high;
(2) automation control system be divide into client layer, motion control layer and servo-drive layer, is divided the work between each layer bright
It is connected really and closely;Protocol contents between motion control layer and servo-drive layer can be self-defined, can be with minimum data
The maximum information content of amount transmission is with the response time for realizing maximum and the faster speed of service;
(3) motion controller and servo-driver are integrated, realization controls one, is convenient for software and hardware liter
Level, it is easy to be quickly adaptive to different basic machines;
(4) the drawbacks of overcoming existing teaching to program, intelligently can carry out Automated condtrol with reference to external environment condition in real time, protect
Card is run in optimal and safest mode;
(5) can simultaneously support that six axles are synchronized with the movement, eight axle independent controls are applicable with great flexibility with wider
Scope.
Specific embodiment
Embodiments of the present invention are illustrated below by way of specific instantiation, those skilled in the art can be by this specification
Disclosed content understands other advantages of the invention and effect easily.The present invention can also be by specific realities different in addition
The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under spirit of the invention.It should be noted that, in the case where not conflicting, following examples and implementation
Feature in example can be mutually combined.
It should be noted that the diagram provided in following examples only illustrates basic structure of the invention in a schematic way
Think, component count, shape and size when only display is with relevant component in the present invention rather than according to actual implementation in schema then
Draw, it is actual when the implementing kenel of each component, quantity and ratio can be a kind of random change, and its assembly layout kenel
It is likely more complexity.
Automation control system of the invention is used to realize to the Automated condtrol of basic machine, including motion controller and
Servo-driver;The motion controller is used to receiving the control instruction that client sends and is generated according to the control instruction
The position data in each joint of basic machine is simultaneously sent to the servo-driver, and reception is sent by the servo-driver
The movable information of the basic machine for coming;The servo-driver is used to generate machine according to the position data in each joint of basic machine
The control parameter of each motor on tool body, and obtain the movable information of basic machine and send to the motion controller
Reference picture 1, automation control system of the invention 1 is used to realize the Automated condtrol to basic machine, including visitor
Family end 11, motion controller 12 and servo-driver 13.
Client 11 is used to send control instruction to motion controller, and receives the machinery sent by motion controller
The movable information of body.
Specifically, client 11 can send single control instruction, it is also possible to send serial control instruction.Wherein, it is single
Control instruction is used for control machinery body and performs single action, such as start, stop, pause, recover, turn left, turning right, reach,
Move afterwards etc..Serial control instruction is used for control machinery body and performs sequence of operations, such as pick-up operation, rotation process.
The movable information of basic machine includes movement state information and the position data in each joint.Wherein, shape is moved
State information includes proper motion, abnormal motion etc..
Client 11 can send control instruction using touch-screen, button etc., and the machinery for receiving is shown by display screen
The movable information of body feedback, and the simulating sports for showing basic machine.
Preferably, client 11 uses host computer, you can directly to send the computer of manipulation order.Host computer can be
Teaching machine or industrial computer.Wherein, teaching machine is called teaching-programming pendant, is performed by electronic system or computer system.Work
Control machine (Industrial Personal Computer, IPC) is industrial control computer, is that one kind uses bus structures, right
Production process and electromechanical equipment, technological equipment carry out the instrument general name of Detection & Controling.There is industrial computer important computer to belong to
Property and feature, such as there is computer CPU, hard disk, internal memory, peripheral hardware and interface, and have operating system, controlling network and agreement, meter
Calculation ability, friendly man-machine interface.The product and technology of industry control industry are very special, belong to intermediate products, and it is other each rows to be
Industry provides reliable, embedded, intelligentized industrial computer.
In an embodiment of the present invention, client 11 can generate control instruction by off-line programing.Wherein, client can
The language for using includes G code, PYTHON language and C/C++ language.Client also include simulated environment, can as requested from
Line simulates the movement locus of basic machine and assesses the feasibility of motion, while can be according to the basic machine for feeding back
Each joint position data real-time Simulation basic machine newest motion conditions.
Motion controller 12 be used for according to control instruction generate basic machine each joint position data and transmission to watching
Driver 13 is taken, and is received the movable information of the basic machine sent by servo-driver 13 and is sent to client.
Wherein, motion controller 12 is integrated in an on-chip system, for running a motion control program, refers to according to control
The position data in each joint of order generation basic machine is simultaneously sent to servo-driver 13, and reception is sent out by servo-driver 13
The movable information of the basic machine sent simultaneously is sent to client.
Communicated by real-time performance between motion controller 12 and client;Motion controller 12 and servo controller 13 it
Between by spi bus connect, using full-duplex data transmit.
Motion controller 12 is realized by embedded system.Specifically, motion controller uses four core ARM frameworks,
Cortex A8 processors, dominant frequency is 900M Hz, runs (SuSE) Linux OS, can receive the control that client sends and refer to
Make, data etc., and for different control instructions, generate the position data in corresponding each joint.For those skilled in the art
Personnel, environmental information according to residing for control instruction and basic machine is come to generate the position data in corresponding each joint be
The algorithm of comparative maturity, is that by.Implementing for the algorithm be not emphasis place of the invention, therefore no longer goes to live in the household of one's in-laws on getting married herein
State.
As shown in Fig. 2 in a preferred embodiment, motion controller 12 includes path planning unit 121, interpolation
Smooth unit 122, inverse kinematics unit 123, network communication unit 124 and SPI communication unit 125.
Network communication unit 124 is used to be realized by Ethernet and the communication between client.Specifically, network service list
Unit 124 receives the control instruction that sends of client, and sends the movable information of basic machine to client.
Path planning unit 121 is used to plan the path of basic machine.Wherein, path planning unit 121 can be according to difference
The different path of standard planning, such as shortest path, most gentle path, farthest path.
Interpolation smooth unit 122 is used for smooth planned basic machine path.Path after smoothing processing avoids machine
The unnecessary violent rotation of tool body.To those skilled in the art, smooth paths have been highly developed existing skills
Art, including many algorithms, will not be repeated here.
Inverse kinematics unit 123 be used for will it is smooth after the positional information in basic machine path be converted to basic machine and respectively close
The position data of section.Inverse kinematics is the parameter for determining the movable object in the posture joint to be set required for reaching
Process.
SPI communication unit 125 is used to be realized by spi bus and the communication between servo-driver.Specifically, SPI leads to
Letter unit 125 is sent by control data to the servo-driver, and reception servo controller that spi bus send basic machine
Basic machine movable information.
Preferably, motion controller 12 also includes I/O control unit, error handling unit and test cell.I/O control unit
For being responsible for receiving I/O state, and IO is zeroed out or set.Error handling unit is used to receive and report servo-driver
The error message for sending.Test cell is used to carry out system testing and debugging to motion controller.
Servo-driver 13 is used to generate each motor on basic machine according to the position data in each joint of basic machine
Control parameter, and obtain basic machine movable information and transmission to motion controller 12.
Wherein, servo-driver 13 is integrated in an on-chip system, for running a servo-drive program, with according to mechanical sheet
The control parameter of each motor on the position data generation basic machine in each joint of body, and the motion letter for obtaining basic machine
Cease and send to motion controller 12.
Specifically, servo-driver 13 is realized by embedded system.In a preferred embodiment of the invention, use
FPGA runs NIOS and VERILOG, receives the position data in each joint with SPI NIOS cores and is converted into the control of each motor
, be distributed to the control parameter of each motor in six motor control NIOS cores by Mailbox then by parameter processed, reaches six axles
The purpose of Synchronization Control.
Wherein, the motor on servo-driver 13 and basic machine is connected by RS485 buses.
As shown in figure 3, in a preferred embodiment, servo-driver 13 includes SPI communication unit 131 and motor
Position and speed control unit 132.
SPI communication unit 131 is used to be realized by spi bus and the communication between motion controller.Specifically, SPI leads to
Letter unit receives the control parameter of each motor on basic machine by spi bus, and the movable information of basic machine is sent
To motion controller.
Motor position and speed control unit 132 are used to control each according to the control parameter of each motor on basic machine
The motion of motor, and obtain the movable information of basic machine.Specifically, motor position and speed control unit pass through
ENDAT2.2 agreements control the motion of each motor according to the control parameter of each motor on basic machine, and obtain machinery originally
The movable information of body.
Preferably, servo-driver 13 also includes power saving unit, error detection units and hardware testing unit.Power saving unit
For each state of the motor driving plate according to the basic machine for detecting, power output is adjusted.Error detection units are used for
Detect the error message of servo-driver.Hardware testing unit is used to that the hardware of servo-driver to be tested and debugged.
Preferably, as shown in figure 4, automation control system of the invention also includes image acquiring device 14, the image is obtained
Device 14 is taken for obtaining the real time environment image residing for basic machine, and is sent to motion controller.Wherein, image obtains dress
Put and use camera.
Image acquiring device 14 can be arranged on basic machine, it is also possible to which being arranged on can obtain residing for basic machine
Any position of ambient image.Image acquiring device 14 can be joined directly together with motion controller 12, it is also possible to by wireless
The mode of communication is attached.
Correspondingly, motion controller 12 also includes environmental detection unit, and the environmental detection unit is used for according to basic machine
Residing real time environment image, obtains the real time environment information residing for basic machine.
The real time environment information that path planning unit is used for according to residing for basic machine is basic machine path planning.Example
Such as, during path planning unit path planning, if real time environment information shows path, there is barrier in front, again path planning.
Preferably, in automation control system of the invention, motion controller 12 and servo-driver 13 are integrated in same
On-chip system.
Reference picture 5, plant equipment of the invention includes basic machine 2, the above-mentioned Automated condtrol being connected with basic machine
System 1, is realized to the Automated condtrol of basic machine with by automation control system.
Reference picture 6, automation control method of the invention is used for Automated condtrol of the realization to basic machine, including following
Step:
Step S1, control instruction is sent by client to motion controller, while reception is sent by motion controller
Basic machine movable information.
Specifically, client can send single control instruction, it is also possible to send serial control instruction.Wherein, single control
System instruction performs single action for control machinery body, such as start, stop, pause, recover, turn left, turning right, reach, after
Move etc..Serial control instruction is used for control machinery body and performs sequence of operations, such as pick-up operation, rotation process.
The movable information of basic machine includes movement state information and the position data in each joint.Wherein, shape is moved
State information includes proper motion, abnormal motion etc..
Client can send control instruction using touch-screen, button etc., and the machinery for receiving is shown by display screen originally
The movable information of body feedback, and the simulating sports for showing basic machine.
Preferably, client uses host computer, you can directly to send the computer of manipulation order.Host computer can be shown
Religion device or industrial computer.Wherein, teaching machine is called teaching-programming pendant, is performed by electronic system or computer system.Industry control
Machine (Industrial Personal Computer, IPC) is industrial control computer, is that one kind uses bus structures, opposite
Product process and electromechanical equipment, technological equipment carry out the instrument general name of Detection & Controling.Industrial computer has important computer attribute
And feature, such as there is computer CPU, hard disk, internal memory, peripheral hardware and interface, and have operating system, controlling network and agreement, calculating
Ability, friendly man-machine interface.The product and technology of industry control industry are very special, belong to intermediate products, and it is other every profession and trades to be
Reliable, embedded, intelligentized industrial computer is provided.
In an embodiment of the present invention, client can generate control instruction by off-line programing.Wherein, client can make
Language includes G code, PYTHON language and C/C++ language.Client also includes simulated environment, can be offline as requested
The movement locus for simulating basic machine and the feasibility for assessing motion, while can be according to the basic machine for feeding back
The newest motion conditions of the position data real-time Simulation basic machine in each joint.
Step S2, the position data in basic machine each joint according to control instruction is generated by motion controller and is sent
To servo-driver, while receiving the movable information of the basic machine sent by servo-driver and sending to client.
Wherein, motion controller is integrated in an on-chip system, for running a motion control program, with according to control instruction
The position data in each joint of generation basic machine is simultaneously sent to servo-driver, and receive what is sent by servo-driver
The movable information of basic machine is simultaneously sent to client.
Communicated by real-time performance between motion controller and client;Pass through between motion controller and servo controller
Spi bus are connected, and are transmitted using full-duplex data.
Motion controller is realized by embedded system.Specifically, motion controller uses four core ARM frameworks, cortex
A8 processors, dominant frequency is 900MHz, runs (SuSE) Linux OS, can receive control instruction, data that client sends
Deng, and for different control instructions, generate the position data in corresponding each joint.For those skilled in the art personnel, root
The position data that corresponding each joint is generated according to the environmental information residing for control instruction and basic machine is to compare into
Ripe algorithm, is that by.Implementing for the algorithm be not emphasis place of the invention, therefore will not be repeated here.
In a preferred embodiment, motion controller performs following operation:
1) by the communication between real-time performance and client.
Specifically, the control instruction that sends of client is received by network, and sends the movable information of basic machine extremely
Client.
2) path of basic machine is planned.
Wherein, path planning unit can be according to the different path of different standard plannings, such as shortest path, most gentle road
Footpath, farthest path etc..
3) planned basic machine path is smoothed.
Path after smoothing processing avoids the unnecessary violent rotation of basic machine.For those skilled in the art
Speech, during smooth paths have been highly developed prior art, including many algorithms, will not be repeated here.
4) positional information in the basic machine path after will be smooth is converted to the position data in each joint of basic machine.
Inverse kinematics is the process of the parameter for determining the movable object in the posture joint to be set required for reaching.
5) realized by spi bus and the communication between servo-driver.
Specifically, the control data of basic machine is sent by spi bus to servo-driver, and receives servo controller
The movable information of the basic machine for sending.
Preferably, motion controller also includes the error message of detection motion controller, and system is carried out to motion controller
Test and debugging, and I/O state is received, and IO is zeroed out or set.
Step S3, by servo-driver according to the position data in each joint of basic machine generate basic machine on each
The control parameter of motor, while obtaining the movable information of basic machine and sending to motion controller.
Wherein, servo-driver is integrated in an on-chip system, for running a servo-drive program, with according to basic machine
The control parameter of each motor on the position data generation basic machine in each joint, and the movable information for obtaining basic machine
And send to motion controller.
Specifically, servo-driver is realized by embedded system.In a preferred embodiment of the invention, use
FPGA runs NIOS and VERILOG, receives the position data in each joint with SPI NIOS cores and is converted into the control of each motor
, be distributed to the control parameter of each motor in six motor control NIOS cores by Mailbox then by parameter processed, reaches six axles
The purpose of Synchronization Control.
Wherein, the motor on servo-driver and basic machine is connected by RS485 buses.
In a preferred embodiment, servo-driver performs following operation:
1) control parameter according to each motor on basic machine controls the motion of each motor, and obtains basic machine
Movable information.
Specifically, each motor is controlled according to the control parameter of each motor on basic machine by ENDAT2.2 agreements
Motion, and obtain the movable information of basic machine.
2) realized by spi bus and the communication between motion controller.
Specifically, the control parameter of each motor on basic machine is received by spi bus, and by the motion of basic machine
Information is sent to motion controller.
Preferably, servo-driver can also be adjusted according to each state of the motor driving plate of the basic machine for detecting
The energy-saving effect of power output is saved, the error message of detection servo-driver, and the hardware of servo-driver is tested
And debugging.
Preferably, automation control method of the invention also includes being obtained residing for basic machine by image acquiring device
Real time environment image, and send to motion controller.Wherein, image acquiring device uses camera.
Image acquiring device can be arranged on basic machine, it is also possible to be arranged on the ring that can be obtained residing for basic machine
Any position of border image.Image acquiring device can be joined directly together with motion controller, it is also possible to by radio communication
Mode is attached.
Correspondingly, motion controller also includes performing following operation:Real time environment image according to residing for basic machine, obtains
Take the real time environment information residing for basic machine;Real time environment information according to residing for basic machine is basic machine planning road
Footpath.For example, during path planning unit path planning, if real time environment information shows path, there is barrier in front, plans again
Path.
Preferably, in automation control method of the invention, motion controller and servo-driver are integrated in on a piece of
System.
In sum, automation control system of the invention and method, plant equipment by embedded programming realize safety,
The Automated condtrol of high speed, its low cost, operational precision are high;Automation control system be divide into client layer, motion control layer
With servo-drive layer, divide the work between each layer clearly and be closely connected;Protocol contents between motion control layer and servo-drive layer
Can be self-defined, can be with the maximum information content of minimum data transfers with the response time for realizing maximum and faster operation
Speed;Motion controller and servo-driver are integrated, realization controls one, are convenient for software and hardware upgrading, it is easy to
It is quickly adaptive to different basic machines;The drawbacks of overcoming existing teaching to program, intelligently can enter with reference to external environment condition in real time
Row Automated condtrol, it is ensured that run in optimal and safest mode;Can simultaneously support that six axles are synchronized with the movement, eight axles are independently controlled
System, with great flexibility and the wider scope of application.So, the present invention effectively overcomes various shortcoming of the prior art
And have high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.It is any ripe
The personage for knowing this technology all can carry out modifications and changes under without prejudice to spirit and scope of the invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete with institute under technological thought without departing from disclosed spirit such as
Into all equivalent modifications or change, should be covered by claim of the invention.