CN102843266A - CAN network data transmitting method - Google Patents

CAN network data transmitting method Download PDF

Info

Publication number
CN102843266A
CN102843266A CN2011101690890A CN201110169089A CN102843266A CN 102843266 A CN102843266 A CN 102843266A CN 2011101690890 A CN2011101690890 A CN 2011101690890A CN 201110169089 A CN201110169089 A CN 201110169089A CN 102843266 A CN102843266 A CN 102843266A
Authority
CN
China
Prior art keywords
node
information
nodes
send
sending
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
Application number
CN2011101690890A
Other languages
Chinese (zh)
Inventor
刘宇
沈晓峰
张建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BYD Co Ltd
Original Assignee
BYD Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN2011101690890A priority Critical patent/CN102843266A/en
Priority to TW101122383A priority patent/TW201300261A/en
Publication of CN102843266A publication Critical patent/CN102843266A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a CAN (Controller Area Network) network data transmitting method. The method comprises the steps as follows: setting transmitting sequences of all CAN nodes in a CAN network respectively; and transmitting information to other CAN nodes in sequence through all CAN nodes based on relevant set transmitting sequences. With the method, the disadvantage that the information is synchronously transmitted to one CAN node via a plurality of CAN nodes in current CAN network, the CAN node just can process one information at one time, which leads to that the information is easily lost can be solved; the CAN nodes which receive the information can discontinuously receive the information from other CAN nodes, so that the reliability in information receiving of the CAN node in the CAN network can be greatly improved.

Description

A kind of CAN network data sending method
Technical field
The invention belongs to data and send the field, be specifically related to a kind of CAN network data sending method.
Background technology
At present, electronic equipment grows with each passing day, and communications facility is flourishing day by day.Along with people's increases the dependence of electronic information, and is also increasingly high to the requirement of electronic equipment, therefore also complicated more as the most frequently used communication system CAN network of car load.In a CAN network, each equipment that can receive and dispatch all is the node of a CAN network, and these nodes have plenty of hub-and-spoke configuration; Have plenty of network structure, yet along with the becoming increasingly complex of CAN network, the applicant finds that the CAN network inevitably can run into a problem; Because CAN node number is many more; The amount of information of CAN network system is just big more, and CAN system reception information also has the limit, therefore works as a plurality of CAN nodes and sends information to a CAN node simultaneously; And this CAN node is disposable can only handle an information time, the problem of like this will Presence information losing.
Summary of the invention
To existing C AN network; Because a plurality of CAN nodes send information to a CAN node simultaneously; Can only handle an information and this CAN node is disposable; Thereby the technical problem that causes information to be prone to lose provides a kind of CAN network data sending method, and this method can improve the reliability of CAN node reception information in the CAN network greatly.
Technical scheme of the present invention is:
A kind of CAN network data sending method may further comprise the steps:
Step 1: the sending order of setting all CAN nodes in the CAN network respectively;
Step 2: all CAN nodes send information to other all CAN nodes successively according to the sending order of setting separately.
Advantage of the present invention: can learn that from technique scheme of the present invention CAN network data sending method is through comprising: the sending order of setting all CAN nodes in the CAN network respectively; All CAN nodes send information to other all CAN nodes successively according to the sending order of setting separately; Make the CAN node of reception information receive the information that other CAN node sends discontinuously; So just avoided in the existing CAN network a plurality of CAN nodes to send information to a CAN node simultaneously; Can only handle an information and this CAN node is disposable; Thereby the drawback that causes information to be prone to lose, therefore, CAN network data sending method of the present invention can improve the reliability of CAN node reception information in the CAN network greatly.
Description of drawings
The method flow diagram that Fig. 1 provides for CAN network data sending method of the present invention.
The method flow diagram of the embodiment that Fig. 2 provides for CAN network data sending method of the present invention.
The method flow diagram of another embodiment that Fig. 3 provides for CAN network data sending method of the present invention.
Embodiment
Clearer for technical problem, technical scheme and beneficial effect that the present invention is solved, below in conjunction with accompanying drawing and embodiment, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The method flow diagram that Fig. 1 provides for CAN network data sending method of the present invention is consulted Fig. 1, and CAN network data sending method may further comprise the steps:
Step 11: the sending order of setting all CAN nodes in the CAN network respectively;
In the practical implementation, this step 11 is specially:
Set the sending order of each CAN node in the CAN network at random, wherein sending order be respectively first, second ..., N, wherein N is the natural number greater than 1; And N is a CAN node number all in the CAN network; For example, when the CAN network has 5 CAN nodes, then can set sending order at random to these 5 CAN nodes; Certain CAN node first, certain CAN node second, certain CAN node the 3rd, certain CAN node the 4th, last CAN node the 5th.
Certainly, be a kind of execution mode of step 11 more than, in the practical implementation; This step 11 can also comprise that other method realizes setting respectively the sending order of all CAN nodes in the CAN network; For example, can confirm the order of its transmission according to CAN nodes different in the CAN network, as; Complexity, significance level according to the CAN information content that node sends ... Confirm which CAN node elder generation transmission information, which takes second place
Step 12: all CAN nodes send information to other all CAN nodes successively according to the sending order of setting separately.
In the practical implementation, when the CAN network sends order when only needing all CAN nodes to carry out once to send information in operation one secondary data, this step 12 is specially:
Sending order be first CAN node when receiving the system start-up instruction, send information to other all CAN nodes, and send when finishing when information, send this CAN nodal informations transmissions notice that finishes to other all CAN nodes; And
Sending order is that the CAN node of M is that first CAN node picks up counting when sending information from sending order, when timing time reaches time S, perhaps receives sending order and is the information that the CAN node of M-1 sends and send when finishing notice, sends information to other all CAN nodes; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes, wherein S=T * (M-1), T is a Preset Time; M is a natural number, this M=(2,3 ... N), and M is according to ascending order value successively, promptly M successively value be 2; 3 ..., be N until value.
And send order when needing all CAN nodes to carry out repeatedly to send information in operation one secondary data when the CAN network, this step 12 is specially:
Sending order is that first CAN node is receiving the system start-up instruction; Receive sending order and be the information that the CAN node of N sends and send the notice that finishes; Be that the CAN node of N picks up counting when sending information perhaps, when timing time reaches time T, send information to other all CAN nodes from sending order; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes; And
Sending order is that the CAN node of M is that first CAN node picks up counting when sending information from sending order, when timing time reaches time S, perhaps receives sending order and is the information that the CAN node of M-1 sends and send when finishing notice, sends information to other all CAN nodes; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes, wherein S=T * (M-1), T is a Preset Time; M is a natural number, this M=(2,3 ... N), and M is according to ascending order value successively, promptly M successively value be 2; 3 ..., be N until value.
Be need further comprise according to need the circulate number of times of transmission information of all CAN nodes with being appreciated that:
Sending order is that first CAN node sends primary informations to other all CAN nodes at every turn, and with regard to stored count once, when stored count equaled above-mentioned all CAN nodes and need circulate the number of times of transmission information, CAN network data out of service were sent.
What this need explain be; " sending order " mentioned in the above-mentioned steps 12 except above-mentioned according to " first, second ..., N " order send successively outside; Can also according to " N, N-1 ..., second, first " order send successively; Certainly can also be other sending order, not do one by one at this and introduce.
In order to understand technical scheme of the present invention better, describe in detail with reference to the accompanying drawings and through specific embodiment.
The method flow diagram of the embodiment that Fig. 2 provides for CAN network data sending method of the present invention is consulted Fig. 2, and CAN network data sending method may further comprise the steps:
Step 21: sending order is that first CAN node (being called for short CAN node 1) is when receiving the system start-up instruction; CAN node 1 sends information to other all CAN nodes; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 22: sending order is that second CAN node (being called for short CAN node 2) picks up counting when CAN node 1 sends information; When timing time reaches time T; The information that perhaps receives 1 transmission of CAN node is sent when finishing notice; CAN node 2 sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 23: sending order is that the 3rd CAN node (being called for short CAN node 3) picks up counting when CAN node 1 sends information; When timing time reaches time 2T; The information that perhaps receives 2 transmissions of CAN node is sent when finishing notice; CAN node 3 sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 2n: sending order is that the CAN node (being called for short CAN node N) of N picks up counting when CAN node 1 sends information; When timing time reaches time (N-1) * T; The information that perhaps receives CAN node N-1 transmission is sent when finishing notice; CAN node N sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes.
It is understandable that; Because the CAN node of sending order between CAN node 3 and CAN node N; Its method of sending information is similar to the sending method of CAN node 3 and CAN node N; And can be by CAN node 3 and the like, therefore between step 23 and step 2n, omitted its step (see figure 2).
This embodiment is a kind of preferred version of the present invention, has increased overtime arbitration functions, i.e. the CAN node of back one transmission sends the notice that finishes in the information that the CAN node that receives last transmission sends; Perhaps when CAN node 1 sends information, pick up counting, when timing time reaches time (N-1) * T, send information to other all CAN nodes; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes, such purpose is; Both guaranteed that all CAN nodes sent information successively in an orderly manner, and (for example transmission information is unsuccessful unusually generation to occur at some or an above CAN node; Can't send this CAN nodal information and send the notice that finishes) time; Can guarantee that back CAN node can normally send information, thereby guarantee that the CAN network data normally sends, in addition; It is unusual that the CAN network data sending method that this embodiment adopts can also make that which CAN node appearance the designer detects; It for example can obtain, because should occur unreceived CAN node unusually through its information state of receiving that which CAN node sends of CAN node of checking some reception information.
The method flow diagram of another embodiment that Fig. 3 provides for CAN network data sending method of the present invention is consulted Fig. 3, and CAN network data sending method may further comprise the steps:
Step 31: sending order is that first CAN node (being called for short CAN node 1) is when receiving the system start-up instruction; CAN node 1 sends information to other all CAN nodes; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 32: sending order is that second CAN node (being called for short CAN node 2) picks up counting when CAN node 1 sends information; When timing time reaches time T; The information that perhaps receives 1 transmission of CAN node is sent when finishing notice; CAN node 2 sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 33: sending order is that the 3rd CAN node (being called for short CAN node 3) picks up counting when CAN node 1 sends information; When timing time reaches time 2T; The information that perhaps receives 2 transmissions of CAN node is sent when finishing notice; CAN node 3 sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 3n: sending order is that the CAN node (being called for short CAN node N) of N picks up counting when CAN node 1 sends information; When timing time reaches time (N-1) * T; The information that perhaps receives CAN node N-1 transmission is sent when finishing notice; CAN node N sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes;
Step 40:CAN node 1 receives the information of CAN node N transmission and sends the notice that finishes; Be that the CAN node of N picks up counting when sending information perhaps from sending order; When timing time reached time T, CAN node 1 sent information to other all CAN nodes, and when the information transmission finishes; Send this CAN nodal information to other all CAN nodes and send the notice that finishes, return execution in step 32.
In like manner; Because the CAN node of sending order between CAN node 3 and CAN node N; Its method of sending information is similar to the sending method of CAN node 3 and CAN node N, and can be by CAN node 3 and the like, therefore between step 33 and step 3n, omitted its step (see figure 3).
By on can know; The scheme of a present embodiment and a last embodiment is roughly the same; Difference is; A last embodiment is used for the CAN network and sends order in operation one secondary data and only need all CAN nodes to carry out once to send information, and present embodiment is used for the CAN network and sends order in operation one secondary data and need all CAN nodes to carry out the information of repeatedly sending.
What this need explain be; The value of above-mentioned preset time T is greater than Y; Wherein Y be meant a CAN node to other all CAN nodes send information and to other all CAN nodes send this CAN nodal informations send finish notify the used time and, wherein Y can be obtained through experiment repeatedly by the designer.Preferably, said preset time T is greater than Y, and less than 2Y.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a CAN network data sending method is characterized in that, may further comprise the steps:
Step 1: the sending order of setting all CAN nodes in the CAN network respectively;
Step 2: all CAN nodes send information to other all CAN nodes successively according to the sending order of setting separately.
2. CAN network data sending method according to claim 1 is characterized in that said step 1 is specially:
Set the sending order of each CAN node in the CAN network at random, wherein sending order be respectively first, second ..., N, wherein N is the natural number greater than 1, and N is a CAN node number all in the CAN network.
3. CAN network data sending method according to claim 2 is characterized in that said step 2 is specially:
Sending order is that first CAN node is when receiving the system start-up instruction; Send information to other all CAN nodes; And when information is sent when finishing, sending order is that first CAN node sends this CAN nodal informations to other all CAN nodes and sends the notice that finishes; And
Sending order is that the CAN node of M is that first CAN node picks up counting when sending information from sending order, when timing time reaches time S, perhaps receives sending order and is the information that the CAN node of M-1 sends and send when finishing notice; Sending order is that the CAN node of M sends information to other all CAN nodes, and when the information transmission finishes, sends this CAN nodal informations to other all CAN nodes and send the notice that finishes; Wherein S=T * (M-1), T is a Preset Time, and M is a natural number; This M=(2,3 ... N), and M according to ascending order value successively.
4. CAN network data sending method according to claim 2 is characterized in that said step 2 is specially:
Sending order is that first CAN node is when receiving the system start-up instruction; Perhaps receiving sending order and be the information that the CAN node of N sends sends when finishing notice; Be that the CAN node of N picks up counting when sending information from sending order perhaps, and when timing time reaches time T, sending order is that first CAN node is to other all CAN nodes transmission information; And when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes; And
Sending order is that the CAN node of M is that first CAN node picks up counting when sending information from sending order, when timing time reaches time S, perhaps receives sending order and is the information that the CAN node of M-1 sends and send when finishing notice; Send information to other all CAN nodes, and when the information transmission finishes, send this CAN nodal informations to other all CAN nodes and send the notice that finishes; Wherein S=T * (M-1), T is a Preset Time, and M is a natural number; This M=(2,3 ... N), and M according to ascending order value successively.
5. according to claim 3 or 4 described CAN network data sending methods; It is characterized in that; The value of said preset time T is greater than Y, wherein Y be meant a CAN node to other all CAN nodes send information and to other all CAN nodes send this CAN nodal informations send finish notify the used time and.
6. CAN network data sending method according to claim 5 is characterized in that, said preset time T is greater than Y, and less than 2Y.
CN2011101690890A 2011-06-22 2011-06-22 CAN network data transmitting method Pending CN102843266A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2011101690890A CN102843266A (en) 2011-06-22 2011-06-22 CAN network data transmitting method
TW101122383A TW201300261A (en) 2011-06-22 2012-06-22 Method for transmitting CAN network data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101690890A CN102843266A (en) 2011-06-22 2011-06-22 CAN network data transmitting method

Publications (1)

Publication Number Publication Date
CN102843266A true CN102843266A (en) 2012-12-26

Family

ID=47370343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101690890A Pending CN102843266A (en) 2011-06-22 2011-06-22 CAN network data transmitting method

Country Status (2)

Country Link
CN (1) CN102843266A (en)
TW (1) TW201300261A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045224A (en) * 2015-05-29 2015-11-11 珠海格力电器股份有限公司 Data transmission method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI552908B (en) * 2013-07-09 2016-10-11 Icm Inc The installation of the vehicle operating system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB8902276D0 (en) * 1989-02-02 1989-03-22 Univ Strathclyde Improved deterministic timed bus access method
US5123100A (en) * 1989-01-13 1992-06-16 Nec Corporation Timing control method in a common bus system having delay and phase correcting circuits for transferring data in synchronization and time division slot among a plurality of transferring units
JPH10285189A (en) * 1997-04-01 1998-10-23 Yazaki Corp Vehicle multiplex communication device
WO2001011829A1 (en) * 1999-08-06 2001-02-15 Mars Technology Institute Co., Ltd. Network with arbitration system using token
CN1496065A (en) * 2002-09-12 2004-05-12 雅马哈株式会社 Wave-type data processing equipment with general data bus
CN1746695A (en) * 2005-10-21 2006-03-15 清华大学 Fuel cell monolithic voltage monitor of vehicle
US20060159123A1 (en) * 2003-01-02 2006-07-20 Jean-Francois Fleury Method for reserving bandwidth in an ethernet type network
CN101459675A (en) * 2008-12-29 2009-06-17 南京南瑞继保电气有限公司 Real-time multi-path multiplexing synchronous high-speed transmission serial bus protocol
CN101534230A (en) * 2009-04-15 2009-09-16 中控科技集团有限公司 A method for sending data based on Ethernet, Ethernet nodes and a control system
CN101719793A (en) * 2009-12-07 2010-06-02 浙江工业大学 System for access control of unidirectional light bus network based on priority level dynamic regulation

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5123100A (en) * 1989-01-13 1992-06-16 Nec Corporation Timing control method in a common bus system having delay and phase correcting circuits for transferring data in synchronization and time division slot among a plurality of transferring units
GB8902276D0 (en) * 1989-02-02 1989-03-22 Univ Strathclyde Improved deterministic timed bus access method
WO1990009068A1 (en) * 1989-02-02 1990-08-09 University Of Strathclyde Improved deterministic timed bus access method
JPH10285189A (en) * 1997-04-01 1998-10-23 Yazaki Corp Vehicle multiplex communication device
WO2001011829A1 (en) * 1999-08-06 2001-02-15 Mars Technology Institute Co., Ltd. Network with arbitration system using token
CN1496065A (en) * 2002-09-12 2004-05-12 雅马哈株式会社 Wave-type data processing equipment with general data bus
US20060159123A1 (en) * 2003-01-02 2006-07-20 Jean-Francois Fleury Method for reserving bandwidth in an ethernet type network
CN1746695A (en) * 2005-10-21 2006-03-15 清华大学 Fuel cell monolithic voltage monitor of vehicle
CN101459675A (en) * 2008-12-29 2009-06-17 南京南瑞继保电气有限公司 Real-time multi-path multiplexing synchronous high-speed transmission serial bus protocol
CN101534230A (en) * 2009-04-15 2009-09-16 中控科技集团有限公司 A method for sending data based on Ethernet, Ethernet nodes and a control system
CN101719793A (en) * 2009-12-07 2010-06-02 浙江工业大学 System for access control of unidirectional light bus network based on priority level dynamic regulation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045224A (en) * 2015-05-29 2015-11-11 珠海格力电器股份有限公司 Data transmission method and device

Also Published As

Publication number Publication date
TW201300261A (en) 2013-01-01

Similar Documents

Publication Publication Date Title
CN101365220B (en) Stochastic access method based on user side cooperative grouping in collaboration cellular network
CN110831039A (en) Data transmission method and transmission server in multi-path concurrent system
CN102904609A (en) Networking method for integrated power line carrier communication network and topology network
CN102959912A (en) Prioritized transfer of data telegrams
CN103780363A (en) Apparatus and method for retransmitting message
CN104967600A (en) System and method for multi-lane auto-negotiation over reduced lane media
CN104717762A (en) Pairing method, primary terminal and slave terminal of wireless communication device
WO2017186014A1 (en) Method and device for wireless communication-related ue unit and base station
CN110971533B (en) Method, server apparatus, client apparatus, and medium for data communication
CN101541084B (en) Transmission method of signaling process in TDMA mode
CN102624628A (en) Home gateway and data packet express forwarding method for same
CN102843266A (en) CAN network data transmitting method
CN208940010U (en) A kind of intranet and extranet synchronization system
CN106788916B (en) Data transmission method and data transmission device for bus
CN105307282A (en) Method and device for preventing access collision of multiple user terminals
CN103152382A (en) Multi-file simultaneous-transmission control method directed at multi-host network
CN102594642A (en) Method for real-time controller area network (CAN) communication
CN103268264B (en) A kind of multi event synchronization RFID middleware system of low coupling and its implementation
CN107005420B (en) Group business feedback method and device
CN103516775B (en) A kind of method and system realizing equipment room Fast synchronization
CN102497306A (en) Method for realizing data transmission of distribution network substation and system thereof
WO2018141214A1 (en) Data transmission method, terminal device and storage medium
CN105262815B (en) Radio transmitting method and system based on radio frequency
CN102567083B (en) Object transmission method, object transmission device and object transmission system applying RPC (remote procedure call)
CN108702335A (en) Method and apparatus for sending and receiving media data in multimedia system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination