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 is used for being connected with said digital signal processor and host computer;
MIII bus module 103 is used for being connected with said digital signal processor and driver;
Wherein, digital signal processor 101 obtains the motion control commands through resolving through host computer link block 102 from host computer, and according to the different conditions of driver this motion control commands is forwarded to driver; Perhaps digital signal processor 101 receptions also are transmitted to host computer with this running state information from the running state information of driver;
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, and is as shown in Figure 2; USB functional module 1021 is used for being responsible for and being connected of teaching machine, and completion is from the transmission of the running state information of the order reception of teaching machine and driver; Can select the CY7C68013A chip for use in the USB functional module 1021, it is connected through EMIFA interface and GPIO mouth with digital signal processor, and a USB interface externally is provided, and teaching machine can directly use this USB interface to be connected with motion control card 10; PCI functional module 1022 is used for being responsible for and being connected of industrial computer, and completion is from the transmission of the running state information of the order reception of industrial computer and driver; Through the PCI/HPI interface of digital signal processor, external PCI connector is provided in the PCI functional module 1022, uses this external PCI connector can be connected in the PCI slot of IPC through three pci bus buffer memorys; In the present embodiment; Motion control card 10 provides respectively the USB functional module 1021 and PCI functional module 1022 that is connected with industrial computer with teaching machine; When reality connects; The user can select teaching machine and industrial computer one of them be connected, perhaps can select teaching machine all is connected with this motion control card 10 with industrial computer, do not limit here;
Motion control card in the present embodiment is a core with digital signal processor 101, for example can select the TMS320DM642 processor for use, does not limit here;
MIII bus module 103 is used for being responsible for and being connected of driver, and MIII bus module 103 comprises a Mechatrolink asic chip, an Ethernet PHY chip, two MagneticIsolation electromagnetic isolation chips and two external connectors; Wherein the Mechatrolink asic chip is a MIII communication special chip, the package of being responsible for data link layer with unpack, further, can also substitute the Mechatrolink asic chip through on-site programmable gate array FPGA; Ethemet PHY chip is responsible for becoming the level of Physical layer to send out data-switching; Magnetic Isolation electromagnetic isolation chip is responsible for electromagnetic isolation; External connector is responsible for external interface; On connected mode; The Mechatrolink asic chip is connected to the EMIFA interface and the INT interrupt interface of digital signal processor; Connect Ethemet PHY chip simultaneously; Provide two external connectors through two electromagnetic isolation chips then, driver connects motion control card through 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 the order and the running state information of digital signal processor and IPC or teaching machine, and through the EMIFA interface of digital signal processor SDRAM is mapped to the CE0 address space; Flash is used for depositing firmware program, realizes self-starting function, and through the EMIFA interface of digital signal processor Flash is mapped to the CE1 address space;
Further, the motion control card 10 in the present embodiment also comprises replacement module 105, and replacement module 105 is used for being responsible for the replacement to circuit, and replacement module 105 can be selected the TPS386000 chip for use, 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 the TPS54310 chip for use, is used for being responsible for to whole motion control card power supply being provided, and contains 1.2V, 1.4V, 1.8V, 3.3V and five kinds of voltages of 5V;
The control command that motion control card 10 is used for being responsible for host computer sends is forwarded to each driver, thereby makes each driver in time to respond the control command from host computer; Motion control card 10 also is used for being responsible for and will being transmitted to host computer from the running state information of each driver, so that upper function in time shows the state of each driver; The above-mentioned function of motion control card 10 is mainly accomplished through digital signal processor 101, and is 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 is used to realize 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 through Upper machine communication module 1011 with the mode of poll; According to the different conditions of driver, this control command is forwarded in each driver through MIII bus communication module 1013 with the mode of interrupting;
MIII bus communication module 1013 receives the control command that command process/state monitoring modules 1012 send, and sends to MIII bus driver module 1014 after this control command encapsulated;
The control command through 1013 encapsulation of MIII bus communication module that MIII bus driver module 1014 will receive sends to the MIII Physical layer; Thereby make the MIII Physical layer that this control command is sent to driver, thereby driver is operated according to the control command that receives accordingly;
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 and the decapsulation that driver sends, and again the running state information after the decapsulation is sent to MIII bus communication module 1013;
The running state information of the driver that MIII bus communication module 1013 reception MIII bus driver modules 1014 are sent is also resolved, and the running state information after will resolving again sends 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 with the mode of interrupting, and again running state information is sent to Upper machine communication module 1011;
Upper machine communication module 1011 receives the running state information of the driver of command process/state monitoring module 1012 transmissions, and this running state information is sent to host computer 20;
Further; Digital signal processor 101 also comprises fault processing module 1015, is used for when detecting driver malfunction, sends stop instruction initiatively for this driver; Thereby make driver to motor outage and stop the motion of robot, products for further is handled fault; When detecting communication failure, initiatively inside chip is resetted and connection again, if do not connect, just report communication failure to host computer, products for further band hardware is done to detect and is handled;
In the present embodiment, motion control card directly is connected through the host computer link block in this motion control card with host computer, and motion control card then is connected through the MIII bus module in this motion control card with driver; Thereby realize that in total framework of kinetic control system thereby motion control card directly is connected the intermediate equipment of having saved between motion control card and the host computer with host computer, has reduced the cost of kinetic control system; Further; Because it mainly is the position command that obtains each through interpolation algorithm that the control command of host computer is resolved, and the dominant frequency of the digital signal controller in the motion control card is lower, 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 mainly is responsible for the transmission of data between host computer and the driver; And parsing is not done in the order of host computer, let the host computer of dominant frequency height, fast operation come parsing is done in order, thereby improved response speed and tracking accuracy greatly.
See also 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 through the host computer link block, perhaps receives the running state information from driver through the MIII bus module;
302, the digital signal processor of motion control card is forwarded to the control command that receives in the driver according to the different conditions of driver, and the motion state information from driver that perhaps will receive is transmitted to host computer;
Wherein, digital signal processor receives the control command from host computer through the host computer link block, and according to the different conditions of driver the flow process that this control command is forwarded in the 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 through Upper machine communication module with the mode of poll; According to the different conditions of driver, control command is forwarded in each driver through the MIII bus communication module with the mode of interrupting;
The MIII bus communication module receives the control command that said command process/state monitoring module is sent, and sends to MIII bus driver module after this control command encapsulated;
The control command through the encapsulation of MIII bus communication module that MIII bus driver module will receive sends to the MIII Physical layer, thereby makes said MIII Physical layer that said order is sent to driver;
Further, digital signal processor receives the running state information from driver through the MIII bus module, and the step that is forwarded to host computer is specially:
MIII bus driver module receives running state information and the decapsulation that driver sends, and again the running state information after the decapsulation is sent to the MIII bus communication module;
The MIII bus communication module receives the running state information of the driver that said MIII bus driver module sends and resolves, and the running state information after will resolving again sends to command process/state monitoring module;
Command process/state monitoring module obtains the running state information of each driver with the mode of interrupting, and again 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 that is 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 used for being connected with host computer, and MIII bus module 103 is used for being connected with driver, and what the 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 used to connect teaching machine, and PCI functional module 1022 is used to connect industrial computer;
Further, the motion control method that provides in the present embodiment also comprises: when detecting driver malfunction, digital signal processor initiatively sends stop instruction to driver, thereby makes this driver to the motor outage and stop the motion of robot; When detecting communication failure, initiatively inside chip is resetted and connection again;
In the motion control method of present embodiment; Host computer directly is connected with motion control card with driver; Being different from the prior art teaching machine must be connected with motion controller through industrial computer; Thereby can save the intermediate equipment industrial computer between motion control card and the teaching machine, reduce the cost of kinetic control system; Further; Because it mainly is the position command that obtains each through interpolation algorithm that the control command of host computer is resolved, and the dominant frequency of the digital signal controller in the motion control card is lower, 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 mainly is responsible for the transmission of data between host computer and the driver; And parsing is not done in the order of host computer; Let dominant frequency is high, the host computer of fast operation, teaching machine or industrial computer come parsing is done in order, thereby have improved response speed and tracking accuracy greatly.
See also 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 directly is connected with motion control card 10 respectively with driver 30; Concrete:
Motion control card 10 comprises digital signal processor 101, the host computer link block 102 that is 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 connected with host computer 20, and MIII bus module 103 is connected with driver 30, and what the MIII bus module adopted is parallel bus; MIII bus module 103 can be connected with a driver 30, also can be connected with a plurality of drivers 30, does not limit here;
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 commands and this control command is resolved, and the control command after will resolving again sends to motion control card 10;
After motion control card 10 receives the control command of host computer 20 transmissions, control command is transmitted to driver 30;
Driver 30 receives control command and carries out this control command;
Wherein, After motion control card 10 receives the control command of host computer 20 transmissions; The step that control command is transmitted to driver 30 is mainly accomplished through 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 is used to realize 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 through Upper machine communication module 1011 with the mode of poll; According to the different conditions of driver, this control command is forwarded in each driver 30 through MIII bus communication module 1013 with the mode of interrupting;
MIII bus communication module 1013 receives the control command that command process/state monitoring modules 1012 send, and sends to MIII bus driver module 1014 after this control command encapsulated;
The control command through 1013 encapsulation of MIII bus communication module that MIII bus driver module 1014 will receive sends to the MIII Physical layer; Thereby make the MIII Physical layer that this control command is sent to driver 30, thereby driver is operated according to the control command that receives accordingly;
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 and the decapsulation that driver sends, and again the running state information after the decapsulation is sent to MIII bus communication module 1013;
The running state information of the driver that MIII bus communication module 1013 reception MIII bus driver modules 1014 are sent is also resolved, and the running state information after will resolving again sends 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 with the mode of interrupting, and again running state information is sent to Upper machine communication module 1011;
Upper machine communication module 1011 receives the running state information of the driver of command process/state monitoring module 1012 transmissions, and this running state information is sent to host computer 20;
Further; Digital signal processor 101 also comprises fault processing module 1015, is used for when detecting driver malfunction, sends stop instruction initiatively for this driver; Thereby make driver to motor outage and stop the motion of robot, products for further is handled fault; When detecting communication failure, initiatively inside chip is resetted and connection again, if do not connect, just report communication failure to host computer, products for further band hardware is done to detect and is handled;
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, and is as shown in Figure 5; USB functional module 1021 is used for being responsible for and being connected of teaching machine, and completion is from the transmission of the running state information of the order reception of teaching machine and driver; Can select the CY7C68013A chip for use in the USB functional module 1021, it is connected through EMIFA interface and GPIO mouth with digital signal processor 101, and a USB interface externally is provided, and teaching machine can directly use this USB interface to be connected with motion control card 10; PCI functional module 1022 is used for being responsible for and being connected of industrial computer, and completion is from the transmission of the running state information of the order reception of industrial computer and driver; Through the PCI/HPI interface of digital signal processor, external PCI connector is provided in the PCI functional module 1022, uses this external PCI connector can be connected in the PCI slot of IPC through three pci bus buffer memorys; In the present embodiment; Motion control card 10 provides respectively the USB functional module 1021 and PCI functional module 1022 that is connected with industrial computer 202 with teaching machine 201; When reality connects; The user can select teaching machine and industrial computer one of them be connected, perhaps can select teaching machine all is connected with this motion control card 10 with industrial computer, do not limit here; And when user's selection all is connected teaching machine with industrial computer with this motion control card 10; Preferentially by the communication between teaching machine 201 processing and motion control card 10 and the driver 30; Perhaps can not limit preferentially by the communication between industrial computer 202 processing and motion control card 10 and the driver 30 here yet;
In the kinetic control system of present embodiment; Host computer directly is connected with motion control card with driver; Being different from the prior art teaching machine must be connected with motion controller through industrial computer; Thereby can save the intermediate equipment industrial computer between motion control card and the teaching machine, reduce the cost of kinetic control system; Further; Because it mainly is the position command that obtains each through interpolation algorithm that the control command of host computer is resolved, and the dominant frequency of the digital signal controller in the motion control card is lower, 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 mainly is responsible for the transmission of data between host computer and the driver; And parsing is not done in the order of host computer; Let dominant frequency is high, the host computer of fast operation, teaching machine or industrial computer come parsing is done in order, thereby have improved response speed and tracking accuracy greatly.
The above is merely embodiments of the invention; Be not so limit claim of the present invention; Every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to be done; Or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.