Embodiment
Consult Fig. 1, Fig. 2 and Fig. 3, the embodiment of motion control card of the present invention comprises:
As shown in Figure 1, the motion control card 10 in the present embodiment comprises:
Digital signal processor 101;
Host computer link block 102, for being connected with described digital signal processor and host computer;
MIII bus module 103, for being connected with described digital signal processor and driver;
Wherein, digital signal processor 101 obtains the motion control commands through resolving by host computer link block 102 from host computer, and according to the different conditions of driver, this motion control commands is forwarded to driver; Or digital signal processor 101 receives from the running state information of driver and this running state information is transmitted to host computer;
Host computer comprises teaching machine and/or industrial computer, and host computer link block 102 comprises USB functional module 1021 and/or PCI functional module 1022, as shown in Figure 2; USB functional module 1021, for being responsible for and being connected of teaching machine, completes the transmission from the order reception of teaching machine and the running state information of driver; In USB functional module 1021, can select CY7C68013A chip, it is connected by EMIFA interface and GPIO mouth with digital signal processor, and a USB interface is externally provided, and teaching machine can directly use this USB interface to be connected with motion control card 10; PCI functional module 1022, for being responsible for and being connected of industrial computer, completes the transmission from the order reception of industrial computer and the running state information of driver; In PCI functional module 1022, by the PCI/HPI interface of digital signal processor, provide external PCI connector through three pci bus buffer memorys, use this external PCI connector can be connected in the PCI slot of IPC; In the present embodiment, motion control card 10 provides the USB functional module 1021 and the PCI functional module 1022 that are connected with teaching machine and industrial computer respectively, in the time that reality connects, user can select teaching machine and industrial computer one of them be connected, or can select teaching machine to be all connected with this motion control card 10 with industrial computer, not limit herein;
Motion control card in the present embodiment taking digital signal processor 101 as core, for example, can be selected TMS320DM642 processor, does not limit herein;
MIII bus module 103 is for being responsible for and being connected of driver, and MIII bus module 103 comprises a Mechatrolink asic chip, an Ethernet PHY chip, two Magnetic Isolation electromagnetic isolation chips and two external connectors; Wherein Mechatrolink asic chip is MIII Communication specific IC, is responsible for the package of data link layer and unpacks, and further, can also substitute Mechatrolink asic chip by on-site programmable gate array FPGA; Ethernet PHY chip is responsible for data-switching to become the level of Physical layer to send out; Magnetic Isolation electromagnetic isolation chip is responsible for electromagnetic isolation; External connector is responsible for external interface; In connected mode, Mechatrolink asic chip is connected to EMIFA interface and the INT interrupt interface of digital signal processor, connect Ethernet PHY chip simultaneously, then provide two external connectors by two electromagnetic isolation chips, driver connects motion control card by these two external connectors;
Further, motion control card 10 in the present embodiment also comprises external memory area module 104, external memory area module 104 contains SDRAM and Flash, SDRAM is used for depositing order and the running state information of digital signal processor and IPC or teaching machine, and by the EMIFA interface of digital signal processor, SDRAM is mapped to CE0 address space; Flash is used for depositing firmware program, realizes self-starting function, and by the EMIFA interface of digital signal processor, Flash is mapped to CE1 address space;
Further, the motion control card 10 in the present embodiment also comprises replacement module 105, and replacement module 105 is for being responsible for the replacement to circuit, and replacement module 105 can be selected TPS386000 chip, is connected to the Reset replacement interface of digital signal processor;
Further, the motion control card 10 in the present embodiment also comprises power module 106, and power module 106 can be selected TPS54310 chip, provides power supply for being responsible for to whole motion control card, contains 1.2V, 1.4V, 1.8V, 3.3V and five kinds of voltages of 5V;
Motion control card 10 is forwarded to each driver for the control command of being responsible for host computer to send, thereby each driver can be responded the control command from host computer in time; Motion control card 10 is also transmitted to host computer for being responsible for by the running state information from each driver, to make host computer can show in time the state of each driver; The above-mentioned function of motion control card 10 mainly completes by digital signal processor 101, concrete:
Digital signal processor 101 comprises:
Upper machine communication module 1011, command process/state monitoring module 1012, MIII bus communication module 1013, MIII bus driver module 1014;
The flow process that the control command that digital signal processor 101 sends host computer is forwarded to each driver is concrete:
Upper machine communication module 1011, for realizing and the communication of host computer 20, receives the control command after host computer 20 is resolved, and this control command is sent to command process/state monitoring module 1012;
Command process/state monitoring module 1012 receives the control command after the parsing that host computer sends by Upper machine communication module 1011 in the mode of poll, according to the different conditions of driver, in the mode of interrupting, this control command is forwarded in each driver by MIII bus communication module 1013;
MIII bus communication module 1013 receives the control command that command process/state monitoring module 1012 sends, and sends to MIII bus driver module 1014 after this control command is encapsulated;
The control command encapsulating through MIII bus communication module 1013 receiving is sent to MIII Physical layer by MIII bus driver module 1014, thereby make MIII Physical layer that this control command is sent to driver, thereby driver is operated accordingly according to the control command receiving;
The flow process that the running state information that digital signal processor 101 sends driver is forwarded to host computer is concrete:
MIII bus driver module 1014 receives running state information the decapsulation that driver sends, then the running state information after decapsulation is sent to MIII bus communication module 1013;
MIII bus communication module 1013 receives the running state information of the driver that MIII bus driver module 1014 sends and resolves, then the running state information after resolving is sent to command process/state monitoring module 1012;
Command process/state monitoring module 1012 obtains the running state information from each driver of MIII bus communication module 1013 in the mode of interrupting, then running state information is sent to Upper machine communication module 1011;
Upper machine communication module 1011 receives the running state information of the driver that command process/state monitoring module 1012 sends, and this running state information is sent to host computer 20;
Further, digital signal processor 101 also comprises fault processing module 1015, in the time driver malfunction being detected, sends stop instruction initiatively to this driver, thereby make driver to motor power-off and stop the motion of robot, products for further is processed fault; In the time communication failure being detected, initiatively inside chip is resetted and reconnected, if do not connected, just report communication failure to host computer, products for further band hardware does Check processing;
In the present embodiment, motion control card is directly connected by the host computer link block in this motion control card with host computer, and motion control card is connected by the MIII bus module in this motion control card with driver; Thereby be directly connected with host computer the intermediate equipment of having saved between motion control card and host computer thereby realize motion control card in total framework of kinetic control system, reduced the cost of kinetic control system; Further, because it is mainly the position command that obtains each axle by interpolation algorithm that the control command of host computer is resolved, and the dominant frequency of digital signal controller in motion control card is lower, and arithmetic speed is slow, thereby directly caused the response speed of robot slow, tracking accuracy is low; And in the present embodiment, motion control card is mainly responsible for the transmission of data between host computer and driver, and the order of host computer is not resolved, allow dominant frequency is high, the host computer of fast operation resolves order, thereby greatly improved response speed and tracking accuracy.
Refer to Fig. 4, Fig. 5 and Fig. 6, the embodiment of motion control method of the present invention comprises:
301, the digital signal processor of motion control card receives the control command from host computer by host computer link block, or receives the running state information from driver by MIII bus module;
302, the digital signal processor of motion control card is forwarded to the control command of reception in driver according to the different conditions of driver, or the motion state information from driver receiving is transmitted to host computer;
Wherein, digital signal processor receives the control command from host computer by host computer link block, and the flow process this control command being forwarded in driver according to the different conditions of driver is specially:
Upper machine communication module receives the control command after host computer is resolved, and this control command is sent to command process/state monitoring module;
Command process/state monitoring module receives the control command after the parsing that host computer sends by Upper machine communication module in the mode of poll, according to the different conditions of driver, in the mode of interrupting, control command is forwarded in each driver by MIII bus communication module;
MIII bus communication module receives the control command that described command process/state monitoring module sends, and sends to MIII bus driver module after this control command is encapsulated;
The control command through the encapsulation of MIII bus communication module receiving is sent to MIII Physical layer by MIII bus driver module, thereby make described MIII Physical layer that described order is sent to driver;
Further, digital signal processor receives from the running state information of driver by MIII bus module, and the step that is forwarded to host computer is specially:
MIII bus driver module receives running state information the decapsulation that driver sends, then the running state information after decapsulation is sent to MIII bus communication module;
MIII bus communication module receives the running state information of the driver that described MIII bus driver module sends and resolves, then the running state information after resolving is sent to command process/state monitoring module;
Command process/state monitoring module obtains the running state information of each driver in the mode of interrupting, then this running state information is sent to Upper machine communication module;
Upper machine communication module receives the running state information of the driver of command process/state monitoring module transmission, and this running state information is sent to host computer;
As shown in Figure 5, motion control card 10 comprises: digital signal processor 101, the host computer link block 102 being connected with digital signal processor 101 respectively, MIII bus module 103, external memory area module 104 and replacement module 105 and power module 106; Wherein, host computer link block 102 is for being connected with host computer, and MIII bus module 103 is for being connected with driver, and what MIII bus module adopted is parallel bus;
As shown in Figure 6, further, host computer link block 102 comprises USB functional module 1021 and/or PCI functional module 1022; Host computer comprises teaching machine and/or industrial computer; Wherein, USB functional module 1021 is for connecting teaching machine, and PCI functional module 1022 is for connecting industrial computer;
Further, the motion control method providing in the present embodiment also comprises: in the time driver malfunction being detected, digital signal processor initiatively sends stop instruction to driver, thereby makes this driver to motor power-off and stop the motion of robot; In the time communication failure being detected, initiatively inside chip is resetted and reconnected;
In the motion control method of the present embodiment, host computer is directly connected with motion control card with driver, being different from teaching machine in prior art must be connected with motion controller by industrial computer, thereby can save the intermediate equipment industrial computer between motion control card and teaching machine, reduce the cost of kinetic control system; Further, because it is mainly the position command that obtains each axle by interpolation algorithm that the control command of host computer is resolved, and the dominant frequency of digital signal controller in motion control card is lower, and arithmetic speed is slow, thereby directly caused the response speed of robot slow, tracking accuracy is low; And in the present embodiment, motion control card is mainly responsible for the transmission of data between host computer and driver, and the order of host computer is not resolved, allow dominant frequency is high, the host computer of fast operation, teaching machine or industrial computer are resolved order, thereby have greatly improved response speed and tracking accuracy.
Refer to Fig. 4 and Fig. 5, the embodiment of kinetic control system of the present invention is concrete:
As shown in Figure 4, the kinetic control system in the present embodiment comprises:
Motion control card 10, host computer 20 and driver 30; Wherein, host computer 20 is directly connected with motion control card 10 respectively with driver 30; Concrete:
Motion control card 10 comprises digital signal processor 101, host computer link block 102, MIII bus module 103, external memory area module 104 and the replacement module 105 and the power module 106 that are connected with digital signal processor 101 respectively; Wherein, host computer link block 102 is connected with host computer 20, and MIII bus module 103 is connected with driver 30, and what MIII bus module adopted is parallel bus; MIII bus module 103 can be connected with a driver 30, also can be connected with multiple drivers 30, does not limit herein;
Data communication between motion control card 10, host computer 20 and driver 30 threes relates generally to the communication of PC control order and the communication of driver running state information;
Control command communication between motion control card 10, host computer 20 and driver 30 threes is concrete:
Host computer 20 obtains user's control command and this control command is resolved, then the control command after resolving is sent to motion control card 10;
Motion control card 10 receives after the control command that host computer 20 sends, and control command is transmitted to driver 30;
Driver 30 receives control command and carries out this control command;
Wherein, motion control card 10 receives after the control command that host computer 20 sends, the step that control command is transmitted to driver 30 mainly completes by digital signal processor 101, digital signal processor 101 comprises Upper machine communication module 1011, command process/state monitoring module 1012, MIII bus communication module 1013 and MIII bus driver module 1014; Concrete:
Upper machine communication module 1011, for realizing and the communication of host computer 20, receives the control command after host computer 20 is resolved, and this control command is sent to command process/state monitoring module 1012;
Command process/state monitoring module 1012 receives the control command after the parsing that host computer 20 sends by Upper machine communication module 1011 in the mode of poll, according to the different conditions of driver, in the mode of interrupting, this control command is forwarded in each driver 30 by MIII bus communication module 1013;
MIII bus communication module 1013 receives the control command that command process/state monitoring module 1012 sends, and sends to MIII bus driver module 1014 after this control command is encapsulated;
The control command encapsulating through MIII bus communication module 1013 receiving is sent to MIII Physical layer by MIII bus driver module 1014, thereby make MIII Physical layer that this control command is sent to driver 30, thereby driver is operated accordingly according to the control command receiving;
The communication of the running state information of the driver between motion control card 10, host computer 20 and driver 30 threes is concrete:
MIII bus driver module 1014 receives running state information the decapsulation that driver sends, then the running state information after decapsulation is sent to MIII bus communication module 1013;
MIII bus communication module 1013 receives the running state information of the driver that MIII bus driver module 1014 sends and resolves, then the running state information after resolving is sent to command process/state monitoring module 1012;
Command process/state monitoring module 1012 obtains the running state information from each driver of MIII bus communication module 1013 in the mode of interrupting, then running state information is sent to Upper machine communication module 1011;
Upper machine communication module 1011 receives the running state information of the driver that command process/state monitoring module 1012 sends, and this running state information is sent to host computer 20;
Further, digital signal processor 101 also comprises fault processing module 1015, in the time driver malfunction being detected, sends stop instruction initiatively to this driver, thereby make driver to motor power-off and stop the motion of robot, products for further is processed fault; In the time communication failure being detected, initiatively inside chip is resetted and reconnected, if do not connected, just report communication failure to host computer, products for further band hardware does Check processing;
In the present embodiment, host computer 20 comprises teaching machine 201 and industrial computer 202, and host computer link block 102 comprises USB functional module 1021 and PCI functional module 1022, as shown in Figure 5; USB functional module 1021, for being responsible for and being connected of teaching machine, completes the transmission from the order reception of teaching machine and the running state information of driver; In USB functional module 1021, can select CY7C68013A chip, it is connected by EMIFA interface and GPIO mouth with digital signal processor 101, and a USB interface is externally provided, and teaching machine can directly use this USB interface to be connected with motion control card 10; PCI functional module 1022, for being responsible for and being connected of industrial computer, completes the transmission from the order reception of industrial computer and the running state information of driver; In PCI functional module 1022, by the PCI/HPI interface of digital signal processor, provide external PCI connector through three pci bus buffer memorys, use this external PCI connector can be connected in the PCI slot of IPC; In the present embodiment, motion control card 10 provides the USB functional module 1021 and the PCI functional module 1022 that are connected with teaching machine 201 and industrial computer 202 respectively, in the time that reality connects, user can select teaching machine and industrial computer one of them be connected, or can select teaching machine to be all connected with this motion control card 10 with industrial computer, not limit herein; And in the time that user selects teaching machine to be connected with this motion control card 10 with industrial computer, preferentially process the communication between motion control card 10 and driver 30 by teaching machine 201, or also can preferentially be processed the communication between motion control card 10 and driver 30 by industrial computer 202, not limit herein;
In the kinetic control system of the present embodiment, host computer is directly connected with motion control card with driver, being different from teaching machine in prior art must be connected with motion controller by industrial computer, thereby can save the intermediate equipment industrial computer between motion control card and teaching machine, reduce the cost of kinetic control system; Further, because it is mainly the position command that obtains each axle by interpolation algorithm that the control command of host computer is resolved, and the dominant frequency of digital signal controller in motion control card is lower, and arithmetic speed is slow, thereby directly caused the response speed of robot slow, tracking accuracy is low; And in the present embodiment, motion control card is mainly responsible for the transmission of data between host computer and driver, and the order of host computer is not resolved, allow dominant frequency is high, the host computer of fast operation, teaching machine or industrial computer are resolved order, thereby have greatly improved response speed and tracking accuracy.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.