CN109561005A - A kind of CAN bus network-building method and the data transmission system based on CAN bus - Google Patents
A kind of CAN bus network-building method and the data transmission system based on CAN bus Download PDFInfo
- Publication number
- CN109561005A CN109561005A CN201710877992.XA CN201710877992A CN109561005A CN 109561005 A CN109561005 A CN 109561005A CN 201710877992 A CN201710877992 A CN 201710877992A CN 109561005 A CN109561005 A CN 109561005A
- Authority
- CN
- China
- Prior art keywords
- bus
- data
- node device
- equipment
- identifier
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40169—Flexible bus arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40169—Flexible bus arrangements
- H04L12/40176—Flexible bus arrangements involving redundancy
- H04L12/40195—Flexible bus arrangements involving redundancy by using a plurality of nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Abstract
A kind of CAN bus network-building method and CAN bus based data transmission system, wherein this method comprises: Step 1: obtaining facility information transmitted by each node device in CAN bus;Step 2: obtaining corresponding identifier data from the facility information of each node device, bus state data are generated according to the identifier data of each node device, the identifier data of each node device is compared with bus state data respectively, effective equipment is determined from each node device according to comparison result, and the data transmission channel between effective equipment and entire car controller is connected.This method not necessarily corresponds to each node device CAN bus transceiver is respectively configured, also just reduce the quantity of equipment included in CAN bus in this way, to reduce the area of related pcb board, and then reduce the network complexity and system bulk of CAN bus.
Description
Technical field
The present invention relates to data communication technology fields, specifically, being related to a kind of CAN bus network-building method and based on CAN
The data transmission system of bus.
Background technique
In mixed power electric car field, the application of CAN communication network is extremely widespread, technological innovation also day crescent
It is different.CAN bus technology initially appears in auto industry, is to meet user to the comfort of vehicle, safety and convenience
Requirement, various electronic control units can connect into powerful control network by CAN bus.
The communication mechanism of CAN bus agreement can be divided into sequentially in time: message generates, message is sent, message receives
With Message processing Four processes.The primary condition of the implementation of the above process include: two and more than two network nodes,
Bus and terminal resistance appropriate, system structure are as shown in Figure 1.As shown in Figure 1, being transmitted for CAN bus based data
For system, each of which node is made of three parts, it may be assumed that is generated, the control unit 101 of processing data, is encapsulated data into
The CAN controller 102 of message and the CAN transceiver 103 for generating or receiving differential voltage signal.
However, encountering the case where needing multiple network nodes on the same network sometimes, at this time in engineer application
Need to be equipped with multiple bus transceivers.
Summary of the invention
To solve the above problems, the present invention provides a kind of CAN bus network-building methods, which comprises
Step 1: obtaining facility information transmitted by each node device in CAN bus;
Step 2: obtaining corresponding identifier data from the facility information of each node device, set according to each node
Standby identifier data generates bus state data, respectively by the identifier data of each node device and total threadiness
State data are compared, and effective equipment are determined from each node device according to comparison result, and effectively set described
The standby data transmission channel conducting between entire car controller.
According to one embodiment of present invention, in the step 2, to the identifier data of each node device
It carries out and operates, obtain the bus state data.
According to one embodiment of present invention, when the value of the bus state data is 1, the CAN bus is in
Bus idle state.
According to one embodiment of present invention, in the step 2, when the value of the bus state data is 0,
Judge whether identifier data and the bus state data of each equipment are equal respectively, and by identifier data and always linear
The equal node device of state data is determined as effective equipment.
The present invention also provides a kind of CAN bus based data transmission system, the system is using as above any one institute
The CAN bus network-building method stated carries out data transmission.
According to one embodiment of present invention, the system comprises:
Multiple node devices;
Entire car controller;
Internal network device is connect with the multiple node device by CAN bus, is used to obtain CAN bus
Facility information transmitted by each node device, and corresponding identifier number is obtained from the facility information of each node device
According to according to the identifier data of each equipment generation bus state data, respectively by the identifier number of each node device
It is compared according to the bus state data, effective equipment is determined from each node device according to comparison result,
And the data transmission channel between effective equipment and entire car controller is connected.
According to one embodiment of present invention, the internal network device is configured to the mark to each node device
It accords with data to carry out and operate, obtains the bus state data.
According to one embodiment of present invention, the internal network device is configured to the value in the bus state data
Judge whether identifier data and the bus state data of each equipment equal when being 0 respectively, and by identifier data with
The equal equipment of bus state data is determined as effective equipment.
CAN bus based data transmission system provided by the present invention realizes existing be based on by internal network device
The function of CAN bus transceiver in the data transmission system of CAN bus.For the present system, internal network device can be same
When connect with multiple node devices, therefore also there is no need to correspond to each node device to be respectively configured CAN bus transceiver,
Also just reduce the quantity of equipment included in CAN bus in this way, to reduce the area of related pcb board, and then reduces
The network complexity and system bulk of CAN bus.In addition, compared to existing data transmission network, it is provided by the present invention
Data transmission network faster message transmission rate can be realized under identical clock frequency.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right
Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is required attached drawing in technical description to do simple introduction:
Fig. 1, which is that existing CAN bus communication is basic, constitutes schematic diagram;
Fig. 2 is that existing integrated assembly CAN network constitutes schematic diagram;
Fig. 3 is the structural schematic diagram of CAN bus based data transmission system according to an embodiment of the invention;
Fig. 4 is the implementation process schematic diagram of CAN bus network-building method according to an embodiment of the invention;
Fig. 5 is bus arbitration logic schematic diagram according to an embodiment of the invention.
Specific embodiment
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and examples, how to apply to the present invention whereby
Technological means solves technical problem, and the realization process for reaching technical effect can fully understand and implement.It needs to illustrate
As long as not constituting conflict, each feature in each embodiment and each embodiment in the present invention can be combined with each other,
It is within the scope of the present invention to be formed by technical solution.
Meanwhile in the following description, for illustrative purposes and numerous specific details are set forth, to provide to of the invention real
Apply the thorough understanding of example.It will be apparent, however, to one skilled in the art, that the present invention can not have to tool here
Body details or described ad hoc fashion are implemented.
In addition, step shown in the flowchart of the accompanying drawings can be in the department of computer science of such as a group of computer-executable instructions
It is executed in system, although also, logical order is shown in flow charts, and it in some cases, can be to be different from herein
Sequence execute shown or described step.
Fig. 2 shows existing integrated assembly CAN networks to constitute schematic diagram.From figure 2 it can be seen that existing CAN
Each node device (such as the equipment such as DC/AC controller, motor driver and engine controller) requires to lead in network
It crosses corresponding bus transceiver to connect with entire car controller, is also allowed in entire CAN network in this way comprising multiple total
Line transceiver, so that node device needs to occupy biggish use space.
For the above problem in the presence of the prior art, a kind of new CAN bus based number is present embodiments provided
According to Transmission system and a kind of CAN bus network-building method, wherein Fig. 3 shows the CAN bus based data transmission system
Structural schematic diagram, Fig. 4 show the implementation process schematic diagram of the CAN bus network-building method.
As shown in figure 3, CAN bus based data transmission system provided by the present embodiment preferably includes: Duo Gejie
Point device (such as first node equipment 301a, second node equipment 301b and third node device 301c), internal networking dress
Set 302 and entire car controller 303.Wherein, above-mentioned node device passes through CAN bus and connect with internal network device 302, together
When, internal network device 302 is also connect with entire car controller 303, and internal network device 303 can be provided using the present embodiment
CAN bus network-building method realize the data communication between entire car controller 303 and each node device.
As shown in figure 4, internal network device 302 can obtain each section in CAN bus in step S401 in the present embodiment
Facility information transmitted by point device is then obtained from the facility information of acquired each node device in step S402 again
Corresponding identifier information.Internal network device 302 can determine each section by the identifier information of each node device
The priority of point device, so that the higher node device of priority is connected with the communication link between entire car controller 303.
Each node device of CAN bus network does not have master-slave, and when bus free, all units, which can be sent, to disappear
Breath and reception message.When having multiple node devices while being ready for sending message, internal network device 302 is advantageously according to mark
The priority of symbol just determines to send the sequence of message, the high node device acquisition transmission route of priority.
In the present embodiment, internal network device 303 is preferably in step S403 according to the identifier of each node device
Data generate bus state data, and in step s 404 respectively by the identifier data of each equipment and above-mentioned bus state number
According to being compared, to determine effective equipment from each node device according to comparison result, (i.e. current priority is highest
Node device).
For existing CAN bus based data transmission system, disappear when multiple node devices are ready for sending simultaneously
When breath, CAN bus will carry out bit-by-bit arbitration to identifier, i.e. each transceiver supervises the bit level of transmission in bus
Depending on to level be compared.Wherein, if sending is that level is identical as the level monitored in bus, the node
Equipment can also continue to send data;And if it is not the same, so node device will lose arbitration, the node device is necessary
It exits without retransmiting subsequent bit.
In the present embodiment, internal network device 303 is based on above-mentioned principle in step S403 to each node device
Identifier data carry out and operation, to obtain bus state data.Specifically, as shown in figure 5, in section 1, identifier
1, identifier 2, identifier 3 are high level (i.e. logical one), and internal network device 303 is according to above-mentioned identifier data at this time
Obtained bus state data will be high level (i.e. logical one), this also means that CAN bus is in bus free shape at this time
State, each node device can't receive or send data by CAN bus.
In section 2, identifier 2 jumps to low level (i.e. logical zero) first, and identifier 1 and identifier 3 are still height
Level, the bus state data that internal network device 303 is obtained according to above-mentioned three group identifier data at this time will be low level, this
Also it means that in the presence of the node device for needing to carry out data transmit-receive.
If there is the node device for needing to carry out data transmit-receive, internal network device 303 will be in step S404 at this time
Whether the middle identifier data for judging each node device respectively and above-mentioned bus state data are equal, and by identifier data etc.
It is determined as effective equipment in the node device of bus state data.
As shown in figure 5, in section 2, identifier 2 is low level, while bus state data are also low in the present embodiment
Level, and identifier 1 and identifier 3 are then high level, therefore internal network device 302 also will will be corresponding to identifier 2
Node device (i.e. second node equipment 301b) is determined as effective equipment, and internal network device 302 understands priority processing, and this effectively sets
Standby communication task, thus the data transmission channel between effective equipment and entire car controller is connected in step S405.
In the present embodiment, which realizes existing CAN bus based data transmission system by internal network device 302
The function of CAN bus transceiver in system.However, for the present system, internal network device 302 can simultaneously with multiple nodes
Equipment connection, therefore also there is no need to correspond to each node device CAN bus transceiver is respectively configured, it also just reduces in this way
The quantity of equipment included in CAN bus, to reduce the area of related pcb board, and then reduces the net of CAN bus
Network complexity and system bulk.In addition, compared to existing data transmission network, data transmission network provided by the present embodiment
Network can realize faster message transmission rate under identical clock frequency.
It should be understood that disclosed embodiment of this invention is not limited to specific structure disclosed herein or processing step
Suddenly, the equivalent substitute for these features that those of ordinary skill in the related art are understood should be extended to.It should also be understood that
It is that term as used herein is used only for the purpose of describing specific embodiments, and is not intended to limit.
" one embodiment " or " embodiment " mentioned in specification means the special characteristic described in conjunction with the embodiments, structure
Or characteristic is included at least one embodiment of the present invention.Therefore, the phrase " reality that specification various places throughout occurs
Apply example " or " embodiment " the same embodiment might not be referred both to.
Although above-mentioned example is used to illustrate principle of the present invention in one or more application, for the technology of this field
For personnel, without departing from the principles and ideas of the present invention, hence it is evident that can in form, the details of usage and implementation
It is upper that various modifications may be made and does not have to make the creative labor.Therefore, the present invention is defined by the appended claims.
Claims (8)
1. a kind of CAN bus network-building method, which is characterized in that the described method includes:
Step 1: obtaining facility information transmitted by each node device in CAN bus;
Step 2: corresponding identifier data is obtained from the facility information of each node device, according to each node device
Identifier data generates bus state data, respectively by the identifier data of each node device and the bus state number
According to being compared, effective equipment is determined from each node device according to comparison result, and by effective equipment with
Data transmission channel conducting between entire car controller.
2. the method as described in claim 1, which is characterized in that in the step 2, to the mark of each node device
Know symbol data to carry out and operate, obtains the bus state data.
3. method according to claim 1 or 2, which is characterized in that described when the value of the bus state data is 1
CAN bus is in bus idle state.
4. method according to any one of claims 1 to 3, which is characterized in that in the step 2, when total threadiness
When the value of state data is 0, judge whether the identifier data of each equipment and the bus state data are equal respectively, and will
The identifier data node device equal with bus state data is determined as effective equipment.
5. a kind of CAN bus based data transmission system, which is characterized in that the system is used as appointed in Claims 1 to 4
CAN bus network-building method described in one carries out data transmission.
6. system as claimed in claim 5, which is characterized in that the system comprises:
Multiple node devices;
Entire car controller;
Internal network device is connect with the multiple node device by CAN bus, is used to obtain each in CAN bus
Facility information transmitted by node device, and corresponding identifier data, root are obtained from the facility information of each node device
Bus state data are generated according to the identifier data of each equipment, respectively by the identifier data of each node device and institute
It states bus state data to be compared, effective equipment is determined from each node device according to comparison result, and by institute
The data transmission channel stated between effective equipment and entire car controller is connected.
7. system as claimed in claim 6, which is characterized in that the internal network device is configured to set each node
Standby identifier data carries out and operation, obtains the bus state data.
8. system as claimed in claim 6, which is characterized in that the internal network device is configured in the bus state number
According to value be 0 when judge whether the identifier data of each equipment and the bus state data equal respectively, and will identify
The symbol data equipment equal with bus state data is determined as effective equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710877992.XA CN109561005A (en) | 2017-09-26 | 2017-09-26 | A kind of CAN bus network-building method and the data transmission system based on CAN bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710877992.XA CN109561005A (en) | 2017-09-26 | 2017-09-26 | A kind of CAN bus network-building method and the data transmission system based on CAN bus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109561005A true CN109561005A (en) | 2019-04-02 |
Family
ID=65862016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710877992.XA Pending CN109561005A (en) | 2017-09-26 | 2017-09-26 | A kind of CAN bus network-building method and the data transmission system based on CAN bus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109561005A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112910749A (en) * | 2021-01-18 | 2021-06-04 | 国汽智控(北京)科技有限公司 | CAN channel connection equipment identification method and data transmission method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102026050A (en) * | 2009-09-18 | 2011-04-20 | 华中科技大学 | Optical fiber CAN bus hub and networking method thereof |
CN102752084A (en) * | 2012-07-27 | 2012-10-24 | 湖南先步信息股份有限公司 | Multi-device controller area network (CAN) communication intelligent retransmission method |
CN106508016B (en) * | 2009-04-16 | 2013-08-14 | 西北工业大学 | The airborne intelligent bus system of many level, hybrid coding |
CN104301191A (en) * | 2013-06-05 | 2015-01-21 | 上海联影医疗科技有限公司 | Bus system |
CN106059806A (en) * | 2016-05-27 | 2016-10-26 | 杭州华三通信技术有限公司 | CAN message sending method and device |
-
2017
- 2017-09-26 CN CN201710877992.XA patent/CN109561005A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106508016B (en) * | 2009-04-16 | 2013-08-14 | 西北工业大学 | The airborne intelligent bus system of many level, hybrid coding |
CN102026050A (en) * | 2009-09-18 | 2011-04-20 | 华中科技大学 | Optical fiber CAN bus hub and networking method thereof |
CN102752084A (en) * | 2012-07-27 | 2012-10-24 | 湖南先步信息股份有限公司 | Multi-device controller area network (CAN) communication intelligent retransmission method |
CN104301191A (en) * | 2013-06-05 | 2015-01-21 | 上海联影医疗科技有限公司 | Bus system |
CN106059806A (en) * | 2016-05-27 | 2016-10-26 | 杭州华三通信技术有限公司 | CAN message sending method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112910749A (en) * | 2021-01-18 | 2021-06-04 | 国汽智控(北京)科技有限公司 | CAN channel connection equipment identification method and data transmission method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN205666856U (en) | Train level ethernet switching equipment and system | |
CN111030905B (en) | Network transmission method, CAN bus network, storage medium and electronic equipment | |
CN105354159A (en) | RS485 distributed bus system based control method | |
CN102820889B (en) | Parallel communication device and communication means thereof | |
CN106330468A (en) | Ethernet power supply device and Ethernet power supply method | |
CN110505135A (en) | CAN bus based battery system automatic network-building method | |
CN103501236A (en) | Method and device for generating network control plane logical topology | |
CN104301191A (en) | Bus system | |
CN109561005A (en) | A kind of CAN bus network-building method and the data transmission system based on CAN bus | |
CN207896980U (en) | Communication structure and communication system | |
CN105207866B (en) | Communication means and airconditioning control network based on airconditioning control network-based control terminal | |
CN101895560B (en) | Fieldbus DP-NET with open two-stage topological structure | |
CN105159158A (en) | Electrical bus applicable to micro satellites | |
CN106130829B (en) | Bus test method and device | |
US10277040B2 (en) | Communication system for a battery-management system for a battery, and method for operating at least one predefined coupling network of such a communications system | |
CN109460379A (en) | A kind of method and switching device of serial ports selection | |
CN212785977U (en) | Car light control module | |
CN105743634B (en) | A kind of parallel connection device systems and its carrier synchronization control method | |
CN211089663U (en) | Vehicle-mounted Ethernet data intercepting device | |
CN209118135U (en) | A kind of automobile-used CAN bus telecommunication circuit of electrical salf-walking | |
CN209842613U (en) | Data transmission device | |
CN103179012A (en) | FlexRay network node adopting iCoupler magnetic isolation protecting measures | |
Li et al. | A protocol designed for intra-spacecraft impulse radio ultra-wideband communications | |
CN111181828B (en) | Device for realizing CAN bus communication star connection | |
CN103248502B (en) | Distributed aggregated link group Topology Discovery, fault handling method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190402 |