CN102420734A - System for realizing topological structure of controller area network (CAN) bus - Google Patents
System for realizing topological structure of controller area network (CAN) bus Download PDFInfo
- Publication number
- CN102420734A CN102420734A CN2011104154113A CN201110415411A CN102420734A CN 102420734 A CN102420734 A CN 102420734A CN 2011104154113 A CN2011104154113 A CN 2011104154113A CN 201110415411 A CN201110415411 A CN 201110415411A CN 102420734 A CN102420734 A CN 102420734A
- Authority
- CN
- China
- Prior art keywords
- arcnet
- bus
- bridge device
- cpu
- interface
- 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
Landscapes
- Bus Control (AREA)
Abstract
The invention discloses a system for realizing a topological structure of a controller area network (CAN) bus and relates to the field of industrial control. The system comprises master equipment, an attached resource computer network (ARCnet) bus, bridge equipment and CAN equipment, wherein the master equipment and the bridge equipment are respectively connected with the ARCnet bus; the CAN equipment is connected with the bridge equipment; and the bridge equipment is used for realizing data exchange between the ARCnet bus and the CAN equipment and protocol switching between an ARCnet protocol and a CAN protocol. By adoption of the system, the problems of lower transmission speed rate of the CAN bus and limitation on quantity of nodes are solved, and the implementation cost of the system is reduced.
Description
Technical field
The present invention relates to the industrial control technology field, particularly a kind of CAN bus topolopy is realized system.
Background technology
CAN (Controller Area Network, controller local area network) bus has characteristics such as real-time is good, antijamming capability is strong, and the CAN smart machine is used very extensively on the industry spot.The driving collection plate that particularly interlock system is used on the railway is considered factors such as safe, real-time, adopts the CAN interface mostly.The station that scale is bigger often needs up to a hundred and drives collection plate, so just needs a CAN bus to connect up to a hundred CAN smart machines.The centralized interlocking development of interlock system forward simultaneously, the interlocking main frame is placed by the cluster that promptly interlocks, and the interlocking main frame is connected with the driving collection plate of each non-cluster through bus.To present this application, have and adopt the CAN relaying to realize the scheme that cluster is connected with each non-cluster equipment; Also have and adopt the scheme of interlocking main frame, change the CAN interface equipment like Ethernet interface through protocol conversion between each station of CAN interface conversion equipment realization.
The CAN smart machine adopts CAN standard frame agreement more, and CAN standard frame agreement is used 11 bit identifiers, supports 2048 nodes in theory, but the CAN smart machine is only supported the identifier that part is limited mostly.If the CAN smart machine that uses surpasses the quantity that can receive the identifier restriction, just needing in addition, CAN bus of expansion realizes.
CAN bus maximum speed 1Mbps, if adopt the CAN trunking scheme to introduce a plurality of nodes, network service task burdensome can cause the CAN bus communication processing cycle to surpass the processor processes cycle.If use Ethernet to change CAN equipment; The Ethernet protocol more complicated is difficult to utilize chip microcontroller on the one hand, generally needs high-performance processor; Like X86, ARM (Advanced RISC Machines; A kind of microprocessor) etc., and need operating system just can effectively to move, soft, hardware cost is all very high; On the other hand, Ethernet is not a real-time bus, and delay and uncontrollability that the signal transmission brings may cause great influence to system.
Summary of the invention
The technical problem that (one) will solve
The technical problem that the present invention will solve is: how to provide a kind of CAN bus topolopy to realize system, to overcome the problem that the CAN bus transfer rate is lower and number of nodes is limited, reduce the system implementation cost simultaneously.
(2) technical scheme
For solving the problems of the technologies described above, the present invention provides a kind of CAN bus topolopy to realize system, and it comprises: main equipment, ARCnet bus, bridge device and CAN equipment; Said main equipment all is connected said ARCnet bus with bridge device; Said CAN equipment connects said bridge device through the CAN bus; Said bridge device is used to realize the exchanges data between said ARCnet bus and the CAN equipment, and the protocol conversion between ARCnet agreement and the CAN agreement.
Preferably, said bridge device comprises: ARCnet interface, CAN interface and CPU; Said ARCnet interface connects said ARCnet bus and CPU; Said CAN interface connects said CAN equipment and CPU.
Preferably, said bridge device also comprises: ARCnet sends buffer memory, ARCnet receives buffer memory, CAN reception buffer memory and CAN and sends buffer memory; Said ARCnet sends buffer memory and connects said CPU and ARCnet interface, is used for sending to said ARCnet interface behind the metadata cache from said CPU; Said ARCnet receives buffer memory and also connects said CPU and ARCnet interface, is used for sending to said CPU behind the metadata cache from said ARCnet interface; Said CAN receives buffer memory and connects said CPU and CAN interface, is used for sending to said CPU behind the metadata cache from said CAN interface; Said CAN sends buffer memory and connects said CPU and CAN interface, is used for sending to said CAN interface behind the metadata cache from said CPU.
Preferably, said bridge device also comprises: the ROM that is used to store said bridge device configuration information; Said ROM connects said CPU.
Preferably, said configuration information comprises: the ARCnet of bridge device address own, bridge device are sent ARCnet address, CAN communication baud rate, ARCnet communication baud rate and CAN and are received the data FIFO capacity.
Preferably, the field of the Frame of said ARCnet agreement comprises: effectively CAN bag quantity, actual CAN wrap and the CRC check sign indicating number.
Preferably, the son field that comprises of said actual CAN bag field comprises: CAN card state, identifier, control word and data.
Preferably, said system comprises the said bridge device that a plurality of and said ARCnet bus is connected.
Preferably, each said bridge device connects 32 the said CAN equipment that are no more than.
Preferably, said ARCnet bus adopts cable or optical fiber.
(3) beneficial effect
CAN bus topolopy realization according to the invention system has following advantage:
(1), use said bridge device to carry out protocol conversion; The ARCnet bus can be supported 254 nodes at most; The ARCnet traffic rate can reach 10M simultaneously, and 508 bytes of a communication data have improved extendible CAN number of devices, message capacity and traffic rate.
(2), the ARCnet protocol network is a kind of token network, each node is communicated by letter through the mode of transmitting token, the CAN protocol bus is a kind of bus of lacking frame, many main competitions simultaneously.Both combine and have guaranteed on the one hand the controllability of communicating by letter between the bridge devices all on the backbone network, can guarantee on the other hand that the CAN equipment that is connected with bridge device responds the main equipment order apace and feeds back main equipment information.
(3), the CPU of bridge device can have only link layer and physical layer two layer protocols; Application layer does not need too complicated agreement; Therefore utilize 8,16 common single-chip microcomputers just to be enough to realize on the hardware, do not need operating system on the software, directly utilize mcu programming just passable.With respect to the Ethernet protocol conversion of complicacy, cost has reduced a lot.
Description of drawings
Fig. 1 is the structural representation that the described CAN bus topolopy of the embodiment of the invention is realized system;
Fig. 2 is the structural representation of the described bridge device of the embodiment of the invention;
Fig. 3 is the flow chart that the said system of the embodiment of the invention receives the CAN device data.
Embodiment
Below in conjunction with accompanying drawing and embodiment, specific embodiments of the invention describes in further detail.Following examples are used to explain the present invention, but are not used for limiting scope of the present invention.
Fig. 1 is the structural representation that the described CAN bus topolopy of the embodiment of the invention is realized system.As shown in Figure 1, said system comprises: main equipment 100, ARCnet (Attached Resource Computer net, a kind of network communications standards) bus 200, bridge device 300 and CAN equipment 400.Said main equipment 100 connects said ARCnet bus 200; Said ARCnet bus 200 connects a plurality of said bridge devices 300; Each said bridge device 300 can connect 32 the said CAN equipment 400 that are no more than again through the CAN bus.Wherein, said main equipment 100 all moves the ARCnet agreement with ARCnet bus 200; Said CAN equipment 400 operation CAN agreements; Said bridge device 300 is used to realize the exchanges data between said ARCnet bus 200 and the CAN equipment 400, and the protocol conversion between ARCnet agreement and the CAN agreement.
Fig. 2 is the structural representation of the described bridge device of the embodiment of the invention.As shown in Figure 2, said bridge device 300 specifically comprises: ARCnet interface 301, ARCnet send buffer memory 302, CPU303, CAN reception buffer memory 304, CAN interface 305, CAN transmission buffer memory 306, ROM (read-only memory) 307 and ARCnet reception buffer memory 308.
Said ARCnet interface 301 sends buffer memory 302 through said ARCnet respectively and is connected said CPU with ARCnet reception buffer memory 308.Wherein, said ARCnet sends buffer memory 302, is used for sending to said ARCnet interface 301 behind the metadata cache from said CPU 303; Said ARCnet receives buffer memory 308, is used for sending to said CPU 303 behind the metadata cache from said ARCnet interface 301.Said CAN interface 305 receives buffer memory 304 through said CAN respectively and is connected said CPU 303 with CAN transmission buffer memory 306.Wherein, said CAN receives buffer memory 304, is used for sending to said CPU303 behind the metadata cache from said CAN interface 305; Said CAN sends buffer memory 306, is used for sending to said CAN interface 305 behind the metadata cache from said CPU 303.
Said CPU 303 is used for the form of passing data is changed, to adapt to recipient's protocol requirement.Particularly; Main equipment 100 in the said system all disposes an independently ARCnet address with bridge device 300; The ARCnet address of each bridge device 300 of main equipment 100 record with and the CAN equipment that connected, each bridge device 300 all writes down the ARCnet address of main equipment 100; When main equipment 100 when CAN equipment 400 sends data; At first data are sent to the ARCnet bus; All bridge devices 300 that are connected with the ARCnet bus judge whether it is the data that send to oneself according to the purpose ARCnet address in the data, if data are transmitted to CPU 303 after ARCnet receives buffer memory 308 buffer memorys; Otherwise, ignore; CPU303 receives and receives after the data of buffer memory 308 data transaction from ARCnet is the CAN protocol frame format, adapting to the requirement of CAN agreement, and after CAN sends to CAN equipment 400 after sending buffer memory 306 buffer memorys; When CAN equipment 400 when main equipment 100 sends data, be the inverse process of above-mentioned flow process basically, but still some difference.Fig. 3 is the flow chart that the said system of the embodiment of the invention receives the CAN device data.As shown in Figure 3, when CAN equipment 400 when main equipment 100 sends data, also be main equipment 100 when receiving the data from CAN equipment 400, concrete steps are following: A: at first receive the data that buffer memory 304 receives from CAN equipment 400 by CAN; B: the CAN whether the judgment data amount reaches bridge device 300 receives data FIFO (first in first out) capacity, if reach, and execution in step D, otherwise, execution in step C; C: judge further whether the stand-by period is overtime, if overtime, execution in step D, otherwise, return steps A: continue to wait for the data that receive from CAN equipment 400; D: send the data to CPU 303; CPU 303 receives the data that receive buffer memory 304 from CAN, is ARCnet protocol data frame format with data transaction, to adapt to the requirement of ARCnet agreement; Send buffer memory 302 through ARCnet then and be sent to ARCnet bus 200, arrive main equipment 100 again.Said CAN receives the data FIFO capacity to be passed through said bridge device 300 configuration settings.
Said ROM 307 connects said CPU 303, is used to store the configuration information of said bridge device 300.Said configuration information comprises: the ARCnet of bridge device address own, bridge device are sent ARCnet address, CAN communication baud rate, ARCnet communication baud rate and CAN and are received the data FIFO capacity.It can be the ARCnet address of main equipment 100 or the ARCnet address of other bridge devices that said bridge device is sent the ARCnet address.
Table 1 is the data frame format of the said ARCnet agreement of present embodiment, and is as shown in table 1, and the field of the Frame of the agreement of ARCnet described in the present embodiment comprises: effectively CAN bag quantity, actual CAN wrap and the CRC check sign indicating number.Table 2 is the form of said " actual CAN bag " field, and is as shown in table 2, and the son field that said " actual CAN bag " field comprises comprises: CAN card state, identifier, control word and data.Wherein definition is in full accord in " identifier ", " control word " and " data " son field and the CAN agreement, guarantees the data transparency transmission; For " CAN card state " son field, the CAN equipment 400 that said bridge device 300 inquiries are attached thereto if response is arranged, can be changed to this field " effectively "; Otherwise, can this field be changed to engineering noise.The longest 508 bytes of ARCnet protocol data frame, each " actual CAN bag " 14 byte of field, frame ARCnet data preferably comprise 32 " actual CAN bag " fields, like this each bridge device 300 preferred 32 CAN equipment 400 that are no more than that connect.Suppose that main equipment 100 connects a bridge device 300,32 CAN equipment 400 of 300 times expansions of this bridge device.32 CAN equipment 300 are with reference to CAN standard agreement frame, and every frame adds the consumption of CAN agreement, can reach the data volume about 100bits, if use 1M CAN bus transfer, need to consume the call duration time about 4ms; Use 200 transmission of ARCnet bus, can be with the whole data packing (about 400 bytes) of 32 CAN equipment 400, the disposable main equipment 100 that is transferred to uses the transmission of 10M ARCnet significance bit, only consumes the backbone network call duration time less than 1ms.If the more bridge device 300 of carry can reduce the call duration time consumption on the backbone network effectively, the CAN equipment 400 of each bridge device 300 carries can parallel communications simultaneously.
Table 1ARCnet protocol data frame format
The actual CAN bag of table 2 field format
When long-distance transmissions was used, each bridge device 300 potential ranges were far, used cable can't realize that ARCnet bus 200 can adopt optical fiber.ARCnet bus 200 has the function of automatic identification bus node state, and the state of the bridge device 300 that connects below can detecting is very easily notified main equipment 100 timely.
The embodiment of the invention said CAN bus topolopy realization system has following advantage:
(1), use said bridge device to carry out protocol conversion; The ARCnet bus can be supported 254 nodes at most; The ARCnet traffic rate can reach 10M simultaneously, and 508 bytes of a communication data have improved extendible CAN number of devices, message capacity and traffic rate.
(2), the ARCnet protocol network is a kind of token network, each node is communicated by letter through the mode of transmitting token, the CAN protocol bus is a kind of bus of lacking frame, many main competitions simultaneously.Both combine and have guaranteed on the one hand the controllability of communicating by letter between the bridge devices all on the backbone network, can guarantee on the other hand that the CAN equipment that is connected with bridge device responds the main equipment order apace and feeds back main equipment information.
(3), the CPU of bridge device can have only link layer and physical layer two layer protocols; Application layer does not need too complicated agreement; Therefore utilize 8,16 common single-chip microcomputers just to be enough to realize on the hardware, do not need operating system on the software, directly utilize mcu programming just passable.With respect to the Ethernet protocol conversion of complicacy, cost has reduced a lot.
Above execution mode only is used to explain the present invention; And be not limitation of the present invention; The those of ordinary skill in relevant technologies field under the situation that does not break away from the spirit and scope of the present invention, can also be made various variations and modification; Therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (10)
1. a CAN bus topolopy is realized system, it is characterized in that, comprising: main equipment, ARCnet bus, bridge device and CAN equipment; Said main equipment all is connected said ARCnet bus with bridge device; Said CAN equipment connects said bridge device through the CAN bus; Said bridge device is used to realize the exchanges data between said ARCnet bus and the CAN equipment, and the protocol conversion between ARCnet agreement and the CAN agreement.
2. the system of claim 1 is characterized in that, said bridge device comprises: ARCnet interface, CAN interface and CPU; Said ARCnet interface connects said ARCnet bus and CPU; Said CAN interface connects said CAN equipment and CPU.
3. system as claimed in claim 2 is characterized in that, said bridge device also comprises: ARCnet sends buffer memory, ARCnet receives buffer memory, CAN reception buffer memory and CAN and sends buffer memory; Said ARCnet sends buffer memory and connects said CPU and ARCnet interface, is used for sending to said ARCnet interface behind the metadata cache from said CPU; Said ARCnet receives buffer memory and also connects said CPU and ARCnet interface, is used for sending to said CPU behind the metadata cache from said ARCnet interface; Said CAN receives buffer memory and connects said CPU and CAN interface, is used for sending to said CPU behind the metadata cache from said CAN interface; Said CAN sends buffer memory and connects said CPU and CAN interface, is used for sending to said CAN interface behind the metadata cache from said CPU.
4. system as claimed in claim 2 is characterized in that, said bridge device also comprises: the ROM that is used to store said bridge device configuration information; Said ROM connects said CPU.
5. system as claimed in claim 4 is characterized in that, said configuration information comprises: the ARCnet of bridge device address own, bridge device are sent ARCnet address, CAN communication baud rate, ARCnet communication baud rate and CAN and are received the data FIFO capacity.
6. the system of claim 1 is characterized in that, the field of the Frame of said ARCnet agreement comprises: effectively CAN bag quantity, actual CAN wrap and the CRC check sign indicating number.
7. system as claimed in claim 6 is characterized in that, the son field that said actual CAN bag field comprises comprises: CAN card state, identifier, control word and data.
8. the system of claim 1 is characterized in that, said system comprises the said bridge device that a plurality of and said ARCnet bus is connected.
9. the system of claim 1 is characterized in that, each said bridge device connects 32 the said CAN equipment that are no more than.
10. like the described system of one of claim 1 to 9, it is characterized in that said ARCnet bus adopts cable or optical fiber.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104154113A CN102420734A (en) | 2011-12-13 | 2011-12-13 | System for realizing topological structure of controller area network (CAN) bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104154113A CN102420734A (en) | 2011-12-13 | 2011-12-13 | System for realizing topological structure of controller area network (CAN) bus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102420734A true CN102420734A (en) | 2012-04-18 |
Family
ID=45944979
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011104154113A Pending CN102420734A (en) | 2011-12-13 | 2011-12-13 | System for realizing topological structure of controller area network (CAN) bus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102420734A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105683936A (en) * | 2013-10-31 | 2016-06-15 | 高通股份有限公司 | Camera control slave devices with multiple slave device identifiers |
CN107222379A (en) * | 2017-06-07 | 2017-09-29 | 南京南瑞继保电气有限公司 | A kind of method and apparatus of serial communication |
CN111628920A (en) * | 2020-05-28 | 2020-09-04 | 上海辰瞻医疗科技有限公司 | Intercommunication method between multiple serial interface devices |
CN112665035A (en) * | 2021-01-19 | 2021-04-16 | 青岛海信日立空调***有限公司 | Multi-connected air conditioning system and control method thereof |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030052778A1 (en) * | 2001-09-18 | 2003-03-20 | Wong Chon Meng | Automated delivery and inventory status notification system and method |
CN1642116A (en) * | 2004-01-05 | 2005-07-20 | 华为技术有限公司 | Asynchronous transmission mode reverse multiplex measuring method and device |
CN1725181A (en) * | 2004-07-20 | 2006-01-25 | 华为技术有限公司 | Buffering method of SDH class logical simulation excitation data |
CN1803510A (en) * | 2005-09-19 | 2006-07-19 | 北京全路通信信号研究设计院 | Computer interlock system |
CN101777085A (en) * | 2009-12-30 | 2010-07-14 | 哈尔滨工业大学 | Small satellite signal processing unit work process simulation method, device and work method of logic state machine in device |
-
2011
- 2011-12-13 CN CN2011104154113A patent/CN102420734A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030052778A1 (en) * | 2001-09-18 | 2003-03-20 | Wong Chon Meng | Automated delivery and inventory status notification system and method |
CN1642116A (en) * | 2004-01-05 | 2005-07-20 | 华为技术有限公司 | Asynchronous transmission mode reverse multiplex measuring method and device |
CN1725181A (en) * | 2004-07-20 | 2006-01-25 | 华为技术有限公司 | Buffering method of SDH class logical simulation excitation data |
CN1803510A (en) * | 2005-09-19 | 2006-07-19 | 北京全路通信信号研究设计院 | Computer interlock system |
CN101777085A (en) * | 2009-12-30 | 2010-07-14 | 哈尔滨工业大学 | Small satellite signal processing unit work process simulation method, device and work method of logic state machine in device |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105683936A (en) * | 2013-10-31 | 2016-06-15 | 高通股份有限公司 | Camera control slave devices with multiple slave device identifiers |
CN105683936B (en) * | 2013-10-31 | 2018-11-16 | 高通股份有限公司 | With multiple camera controls from device identifier from equipment |
CN107222379A (en) * | 2017-06-07 | 2017-09-29 | 南京南瑞继保电气有限公司 | A kind of method and apparatus of serial communication |
CN111628920A (en) * | 2020-05-28 | 2020-09-04 | 上海辰瞻医疗科技有限公司 | Intercommunication method between multiple serial interface devices |
CN112665035A (en) * | 2021-01-19 | 2021-04-16 | 青岛海信日立空调***有限公司 | Multi-connected air conditioning system and control method thereof |
CN112665035B (en) * | 2021-01-19 | 2022-06-24 | 青岛海信日立空调***有限公司 | Multi-connected air conditioning system and control method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103248526B (en) | Realize signal equipment, the method for out-of-band supervision control management | |
CN103049414B (en) | Method for converting and transmitting data between FC (fiber channel) bus and CAN (controller area network) bus | |
CN201887792U (en) | Multi-protocol conversion gateway | |
CN101202707B (en) | Method for transmitting message of high speed single board, field programmable gate array and high speed single board | |
CN106411740B (en) | Network port extended method based on ethernet controller | |
CN101478460B (en) | FlexRay-CAN communication gateway and implementing method | |
CN105959288A (en) | Network protocol conversion method for power grid system and intercommunication method of power grid system | |
CN105337421A (en) | Protocol conversion method and mutual communication method in intelligent power network system | |
CN102664779B (en) | CAN bus data transmitting method | |
CN2938595Y (en) | High speed series interface device for plate communication | |
CN101222430A (en) | High-speed multi-protocol data transmission system and method | |
CN202190284U (en) | Protocol converter for CAN bus and SpaceWire bus | |
CN102420734A (en) | System for realizing topological structure of controller area network (CAN) bus | |
CN103067238A (en) | Data collection method compatible with MODBUS bus | |
CN101631148A (en) | Communication method for allocating dynamic addresses in serial communication protocols | |
CN104102607A (en) | CAN (controlled area network) bus driving method and system based on VxWorks operating system environment | |
CN101383788B (en) | FlexRay-RS485 communication gateway and implementing method | |
CN101650872B (en) | System and method for collecting power utilization information | |
CN101631074B (en) | Multilink message sending method, device and network equipment | |
CN100493018C (en) | Communication method via bus interface of network and and system thereof | |
CN103581163A (en) | Multifunctional remote I/O port control server and design method thereof | |
CN207625600U (en) | Ethernet expanded circuit based on exchanger chip | |
CN205647570U (en) | EtherCAT and deviceNET's communication gateway | |
CN101989250B (en) | Serial communication method and system | |
CN204145528U (en) | The how main real-time communication system of a kind of UART |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120418 |