CN103412544A - Automation control method based on CAN buses - Google Patents
Automation control method based on CAN buses Download PDFInfo
- Publication number
- CN103412544A CN103412544A CN2013103547646A CN201310354764A CN103412544A CN 103412544 A CN103412544 A CN 103412544A CN 2013103547646 A CN2013103547646 A CN 2013103547646A CN 201310354764 A CN201310354764 A CN 201310354764A CN 103412544 A CN103412544 A CN 103412544A
- Authority
- CN
- China
- Prior art keywords
- bus
- message
- microcontroller
- automation
- controller
- 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
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Abstract
The invention relates to an automation control system based on CAN buses. The automation control system is composed of a microcontroller, at least one CAN controller and a USB module. Each CAN controller is connected to each CAN bus. Data are transmitted between the microcontroller and a PC through a USB bus so that CAN message receiving and transmission can be achieved. An automation service program is executed on the PC, and an automation client terminal based on the PC can receive and transmit a message through an automation server so that the target CAN bus can be controlled.
Description
Technical field
The present invention relates to the robotization of electronic technology field, particularly a kind of automation control system based on the CAN bus.
Background technology
The CAN bus, as the communication interface between each microcontroller, has a wide range of applications in automobile and industry; In the application process based on the CAN bus, need to receive and send specific message by the CAN bus, thereby realize the automation mechanized operation to certain equipment.
Robotization based on the CAN bus is controlled, and normally on PC, writes specific application program, by USB, turns the hardware of the interface card connecting band CAN interface of CAN, thereby realizes by the application program that PC holds, slave computer being controlled.The shortcoming of this method is: 1, extensibility is not strong, increases new function if need, and need to revise current application program, or the application program of redeveloping is to meet the demands; 2, can not control easily slave computer by automatized script.
Summary of the invention
Purpose of the present invention, in order to overcome based on the CAN bus, carry out the efficiency run in automation process exactly, use the COM technology of Windows to build automated server, make the application program of any one Windows end all can carry out alternately with server, to realize fast the robotization control based on the CAN bus.
Concrete technical scheme provided by the invention is as follows:
Automation control method based on the CAN bus, use microcontroller to be connected with at least one CAN controller, each CAN controller is connected to respectively on the CAN bus, thereby microcontroller carries out by usb bus and PC the transmitting-receiving that data transmission realizes the CAN message, on PC, carry out the automation services program, make Automation Client to receive and dispatch message by automated server.
Automation control method based on the CAN bus, comprise hardware circuit, program of lower computer and host computer procedure.
Based on the automation control method of CAN bus, described hardware circuit is comprised of microcontroller, at least one CAN controller, USB module; Microcontroller is connected with at least one CAN controller, and each CAN controller connects a CAN transceiver, and each CAN transceiver all is connected to one independently on the CAN bus.
Automation control method based on the CAN bus, described CAN controller is after listening to CAN message or erroneous frame on bus, by the data feedback monitored to microcontroller, microcontroller reads in local message reception buffer zone by it, and the data in reception buffer zone are uploaded to PC by the USB module.
Based on the automation control method of CAN bus, after described USB module receives the order of host computer, microcontroller is configured, comprise configuration of CAN bus parameter etc.
Automation control method based on the CAN bus, described host computer procedure is set up an automation server object in Windows, this automated server and USB interface communicate, the message information that reception gathers from slave computer, the message that will need simultaneously to send is sent to slave computer by USB interface.
Automation control method based on the CAN bus, described automation server object is supported the connection of any window client based on COM, thereby the bus data that slave computer listens to is transferred to client, the message that receives simultaneously client sends request, and will need message transmissions to the slave computer sent to send.
Based on the automation control method of CAN bus, its advantage is, 1, reasonable in design, and clear in structure, can be connected with a client arbitrarily by server; 2, client application can be script, only needs to revise script and can realize the renewal of client-side program and the change of Control the content.
The accompanying drawing explanation
Fig. 1 is total Organization Chart that in the invention process method, upper and lower computer connects
Fig. 2 is the actuating logic of hardware circuit in the invention process method
Fig. 3 is the actuating logic of automated server in the invention process method
In Fig. 1, microcontroller (101), CAN controller (102), CAN transceiver (103), CAN bus CANH(104), CAN bus CANL(105), USB module (106), PC (109), lower computer hardware circuit (110), USB line (111), other nodes (112) on bus
In Fig. 2, CAN controller reception buffer zone (201), the CAN controller sends buffer zone (202), and local CAN sends buffer zone (203), local CAN reception buffer zone (204), testing engine (205), message USB sends buffer zone (208), message USB reception buffer zone (209), computer CPU (211), CAN bus automated server program (212), CAN bus Automation Client program (213)
In Fig. 3, USB driver (301), USB reception buffer zone (302), USB sends buffer zone (303), automated server (304), Automation Client write request (305), Automation Client read request (306)
Embodiment
In Fig. 1, lower computer hardware circuit (110) comprises microcontroller (101), USB module (106) and CAN transceiver (103), lower computer hardware circuit (110) is connected to PC (109) by USB cable (111), simultaneously by CAN bus CANH(104) and CANL(105) be connected to other nodes (112) on bus.
The inner integrated CAN transceivers of other nodes (112) (103) on bus.
Microcontroller (101) connects at least one CAN controller (102), the TX pin of each CAN controller and RX pin are connected respectively TX pin and the RX pin of CAN transceiver (103), the CANH of CAN transceiver is connected to CAN bus CANH(104), the CANL of CAN transceiver is connected to the CANL(105 of CAN bus).
Microcontroller (101), inner integrated CPU and internal memory, be connected with one or more independently CAN controllers; Or inner integrated one or more CAN controllers; What Fig. 1 showed is the situation of the inner integrated CAN controller of microcontroller (102).
CAN controller (102), as the protocol conversion chip of CAN bus, be responsible for the information such as the message on the CAN bus and erroneous frame are fed back to microcontroller, and each CAN controller has TX and the RX pin be connected with the CAN transceiver.
In Fig. 2, lower computer hardware circuit (110) is connected to PC (109) by USB cable (111), PC (109) comprises at least one central processing unit (211), PC (109) internal operation automated server application program (212) and at least one Automation Client application program (213).
Lower computer hardware circuit (110) is by connecting CAN bus CANH(104) and CAN bus CANL(105) communicate with other nodes.
The flow process that lower computer hardware circuit (110) receives from the message of CAN bus is, after its CAN controller (102) listens to the CAN message by CAN transceiver (103), by its buffer memory to inner CAN reception buffer zone (201), and notice microcontroller (101), microcontroller (101) is saved in message USB reception buffer zone (209) by the message that calls receiver function (204) and will receive, by USB module (106) by these data upload to PC (109).
The transmission flow of lower computer hardware circuit (110) is, slave computer microcontroller (101) sends buffer zone (208) and reads the message data that will send from USB module (106) from message USB, by sending function (203), needs are sent to message on bus put into the CAN of CAN controller (102) and send buffer zone again, via CAN controller (102), send to the CANH(104 of CAN bus by CAN transceiver (103)) and CANL(105) on.
In Fig. 3, the automated server program (304) of host computer internal operation is connected to USB cable (111) by USB driver (301), thereby and sets up usb communication between lower computer hardware circuit (110).
The flow process that the host computer automated server carries out robotization control is, Automation Client (213) starts afterwards and automated server (304) connects, when Automation Client need to send the CAN message, by Automation Client write request (305), will need the message sent to pass to automated server (304), automated server (304) is put into USB by these messages and is sent buffer zone (303), by USB driver (301), send to lower computer hardware circuit (110), and send on the CAN bus via the CAN interface of slave computer; When Automation Client need to receive the CAN message, by Automation Client read request (306) to automated server (304) request message, if there is the message of having received in USB reception buffer zone (302), automated server (304) is just passed to these messages Automation Client (213).
Claims (7)
1. based on the automation control method of CAN bus, it is comprised of microcontroller, at least one CAN controller and USB module, it is characterized in that, microcontroller is connected with at least one CAN controller, each CAN controller is connected to respectively on the CAN bus, thereby microcontroller carries out by usb bus and PC the transmitting-receiving that data transmission realizes the CAN message of controlling based on PC, on PC, carry out the automation services program, make the Automation Client on PC to receive and dispatch message by automated server, thereby realize the robotization of target CAN bus is controlled.
2. the automation control method based on the CAN bus according to claim 1, is characterized in that, system comprises hardware circuit, program of lower computer and host computer procedure.
3. the automation control method based on the CAN bus according to claim 2, is characterized in that, described hardware circuit is comprised of microcontroller, at least one CAN controller, USB module; Microcontroller is connected with at least one CAN controller, and each CAN controller connects a CAN transceiver, and each CAN transceiver all is connected to one independently on the CAN bus.
4. the automation control method based on the CAN bus according to claim 3, it is characterized in that, described CAN controller is after listening to CAN message or erroneous frame on bus, by the data feedback monitored to microcontroller, microcontroller reads in local message reception buffer zone by it, and the data in reception buffer zone are uploaded to PC by the USB module.
5. the automation control method based on the CAN bus according to claim 4, is characterized in that, after described USB module receives the order of host computer, microcontroller is configured, and comprises configuration of CAN bus parameter etc.
6. the automation control method based on the CAN bus according to claim 2, it is characterized in that, described host computer procedure is set up an automation server object in Windows, this automated server and USB interface communicate, the message information that reception gathers from slave computer, the message that will need simultaneously to send is sent to slave computer by USB interface.
7. the automation control method based on the CAN bus according to claim 6, it is characterized in that, described automation server object is supported the connection of any window client based on COM, thereby the bus data that slave computer listens to is transferred to client, the message that receives simultaneously client sends request, and will need message transmissions to the slave computer sent to send.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103547646A CN103412544A (en) | 2013-08-15 | 2013-08-15 | Automation control method based on CAN buses |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103547646A CN103412544A (en) | 2013-08-15 | 2013-08-15 | Automation control method based on CAN buses |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103412544A true CN103412544A (en) | 2013-11-27 |
Family
ID=49605569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013103547646A Pending CN103412544A (en) | 2013-08-15 | 2013-08-15 | Automation control method based on CAN buses |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103412544A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110096002A (en) * | 2018-01-30 | 2019-08-06 | 上海融聂电子科技有限公司 | A kind of automatization test system and test method based on CANFD bus |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101276488A (en) * | 2008-03-26 | 2008-10-01 | 中国科学院电工研究所 | Vehicular recording instrument capable of implementing intelligent CAN bus communication |
CN202886974U (en) * | 2012-11-09 | 2013-04-17 | 谢强 | Server computer remote control system based on controller area network (CAN) bus |
-
2013
- 2013-08-15 CN CN2013103547646A patent/CN103412544A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101276488A (en) * | 2008-03-26 | 2008-10-01 | 中国科学院电工研究所 | Vehicular recording instrument capable of implementing intelligent CAN bus communication |
CN202886974U (en) * | 2012-11-09 | 2013-04-17 | 谢强 | Server computer remote control system based on controller area network (CAN) bus |
Non-Patent Citations (3)
Title |
---|
叶超邦: "OPC 数据访问3.0服务器的开发与研究", 《中国优秀硕士学位论文全文数据库(电子期刊) 信息科技辑》 * |
崔其祥: "基于OPC服务器CAN总线智能节点开发系统的研究及应用", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑2011年》 * |
陆晓燕: "基于CAN总线的OPC服务器端的程序设计", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑2008年》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110096002A (en) * | 2018-01-30 | 2019-08-06 | 上海融聂电子科技有限公司 | A kind of automatization test system and test method based on CANFD bus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106453383B (en) | UART-based master-slave multi-machine communication system and method | |
CN104506516A (en) | Gateway for conversion between Modbus RTU/ASCII (remote terminal unit/American standard code for information interchange) communication protocol and Modbus TCP (transmission control protocol) communication protocol and implementation method for gateway | |
CN101464848A (en) | Serial bus expansion method and apparatus | |
CN103428050A (en) | Multipath CAN (controller area network) simulation system based on CAN bus | |
CN103440187A (en) | Hardware script-based automated CAN (Controller Area Network) bus test method | |
CN105183687A (en) | Time-sharing serial communication method and system | |
CN105100000B (en) | Interface conversion device and network system | |
CN103412544A (en) | Automation control method based on CAN buses | |
CN103414619A (en) | Automation control method based on FlexRay bus | |
CN203324982U (en) | Wireless communication system between field bus and field terminal equipment | |
CN102609388B (en) | Slave node circuit, communication method and communication device | |
CN103414620A (en) | Double-channel CAN simulation system based on CAN buses | |
CN104460445A (en) | CAN bus communication terminal resistor accessing method | |
CN110096002A (en) | A kind of automatization test system and test method based on CANFD bus | |
KR101857088B1 (en) | Remote Input/output apparatus having return circuit and method for interfacing internal bus thereof | |
CN103414622A (en) | Simulation method based on CAN buses | |
CN102932475A (en) | Software design framework of gateway for internet of things | |
CN103079195B (en) | Wireless device and network address report method thereof | |
CN101667951A (en) | Network device and data transmission method thereof | |
CN112165422A (en) | One-master multi-slave temperature control system and address automatic matching method | |
CN105656740A (en) | RS422-CAN bus converter | |
CN103763333A (en) | Bridge connection communication module and method | |
CN104090856A (en) | Method and device for sharing serial port information | |
CN107733753B (en) | Networking expansion device | |
CN103428058A (en) | Double-circuit FlexRay simulation system based on FlexRay bus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20131127 |