CN110324223A - Promote method, the equipment of the communication reliability of CAN network - Google Patents
Promote method, the equipment of the communication reliability of CAN network Download PDFInfo
- Publication number
- CN110324223A CN110324223A CN201910810915.1A CN201910810915A CN110324223A CN 110324223 A CN110324223 A CN 110324223A CN 201910810915 A CN201910810915 A CN 201910810915A CN 110324223 A CN110324223 A CN 110324223A
- Authority
- CN
- China
- Prior art keywords
- sampled point
- timeslice
- miscommunication
- section
- rate
- 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.)
- Granted
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
- H04L12/4013—Management of data rate on the bus
- H04L12/40136—Nodes adapting their rate to the physical link properties
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Maintenance And Management Of Digital Transmission (AREA)
Abstract
The invention discloses method, the equipment of a kind of communication reliability for promoting CAN network.Wherein, the method for the communication reliability of CAN network, comprising steps of monitoring current sampling point configures the miscommunication rate of lower CAN;It when the miscommunication rate is greater than preset value, keeps the timeslice total number of the position time of CAN constant, adjusts the timeslice quantity of institute's bit time correspondent section to change sampled point configuration;Each sampled point configuration and its corresponding miscommunication rate are counted, and the smallest sampled point configuration of miscommunication rate is selected to reinitialize CAN.The present invention can select the smallest sampled point configuration of miscommunication rate to optimize CAN network according to automatic progress sampled point configurations different the case where engineering site.
Description
Technical field
The present invention relates to the optimization of the communications parameter of CAN network more particularly to a kind of communication reliabilities for promoting CAN network
Method, and the equipment using this method.
Background technique
The communication quality of CAN network is related to several factors, mainly include the following: 1, between communication node away from
From the type and impedance of connection;2, the Crystal Oscillator Errors of each communication node;3, deviation caused by external environment.Due in product
Development phase, it is difficult to simulate all of above possible situation, optimum sampling point is also different in each situation, therefore usually
It is all to be solidificated in product program using the sampled point of an in most cases applicable compromise.
But in Practical Project scene, due to the influence of factors above, pre-set CAN sampled point may not be able to be protected
Demonstrate,prove the data transmit-receive quality of communication node, it may appear that phenomena such as abnormal is received and dispatched in data frame losing, influences the normal fortune of product function
Row.By taking multi-connected machine as an example, since device node type and number of nodes are more, engineering site differs greatly in addition, causes to lead to
News waveform quality differs greatly, and it is abnormal to cause communication function, to influence the function operation between device node.
Summary of the invention
In order to solve the technical issues of sampled point solidification cannot be adjusted according to circumstances in the product in the prior art, the present invention
Propose method, the equipment for promoting the communication reliability of CAN network.
The method of the communication reliability proposed by the present invention for promoting CAN network, comprising steps of
Monitor the miscommunication rate that current sampling point configures lower CAN;
It when the miscommunication rate is greater than preset value, keeps the timeslice total number of the position time of CAN constant, adjusts institute's rheme
The timeslice quantity of time correspondent section configures to change sampled point;
Each sampled point configuration and its corresponding miscommunication rate are counted, and selects the smallest sampled point configuration pair of miscommunication rate
CAN is reinitialized.
Preferably, each sampled point configuration includes: sampled point configuration and the change sampled point before changing sampled point configuration
With the sampled point configuration postponed.
Specifically, the miscommunication rate of the CAN under monitoring current sampling point configuration specifically includes:
The number Error of the total data frame Frame and the miscommunication in this time received in statistics a period of time,
Obtain miscommunication rate Err=(Error/Frame) * 100%.
Specifically, institute's bit time correspondent section is specially propagation time section, phase buffer section 1 and the phase buffer of position time
Section 2.
The first, change sampled point configuration specifically includes:
It keeps the sum of the timeslice of all sections of institute's bit time constant, reduces the timeslice number of phase buffer section 2, increase and pass
The timeslice number for broadcasting period and/or phase buffer section 1, after counting at least one change sampled point configuration and its it is corresponding
Miscommunication rate.
Second, change sampled point specifically includes:
It keeps the sum of the timeslice of all sections of institute's bit time constant, increases the timeslice number of phase buffer section 2, reduce and pass
The timeslice number for broadcasting period and/or phase buffer section 1, after counting at least one change sampled point configuration and its it is corresponding
Miscommunication rate.
The third, change sampled point specifically includes:
It keeps the sum of the timeslice of all sections of institute's bit time constant, increase the timeslice number of propagation time section and reduces phase
The timeslice number of bit buffering section 1, or reduce the timeslice number of propagation time section and increase the timeslice of phase buffer section 1
Number, sampled point configuration and its corresponding miscommunication rate after counting at least one change.
Equipment proposed by the present invention using CAN network, promotes it using method as described in the above technical scheme
The communication reliability of CAN network.
Specifically, the equipment includes multi-gang air-conditioner.
It through the invention can be in the engineering site of the engineering site of equipment, such as multi-gang air-conditioner, by automatic in real time
Communications parameter is adjusted, so that the sampled point of communication node is configured the automatic engineering-environment that adapts to and respectively communicates factor, promote network communication matter
Amount is determined the sampled point configuration of minimum miscommunication rate, ensures the normal communication of each communication node, avoid fixed sample point
The extremely caused function of bring data transmit-receive is operating abnormally.
Detailed description of the invention
Below with reference to embodiment and attached drawing, the present invention is described in detail, in which:
Fig. 1 is flow chart of the method for the present invention.
Specific embodiment
The principle and embodiment that the invention will now be described in detail with reference to the accompanying drawings.
Fig. 1 shows the specific network connection schematic diagram of the invention applied when on multi-connected machine, and CAN is one kind of bus,
Can have more main machine structures, CAN has positive and negative two polarity, that is, has two groups of lines, pass through two-wire balanced differential between each node
Mode sending and receiving data, thus CAN can the long equipment of, communication distance large number of with supporting node, outer machine, each interior machine in figure with
And between other device nodes be all a relationship of equality in communication, the mode of each node equality communicate, they
Using hand-in-hand connection structure, it is generally the case that the one end of outer machine as communication network, interior machine equipment or other as fresh air,
The other end of the CAN devices such as hot water node as communication network, in Practical Project, the network node up to up to a hundred, communication away from
From more than a km, engineering-environment factor is changeable.If there is corresponding error handling mechanism, it can be ensured that it communicates reliability.
The speed of two communication nodes (device node) needs consistent when communication, that is, the baud rate communicated is consistent, and
Baud rate=peripheral clock/frequency division coefficient/timeslice total number, therefore, can by adjust each section timeslice quantity simultaneously
The identical mode of the total number of retention time piece configures to adjust sampled point.When timeslice quantity referred herein is a CAN
Each section of meta position of timeslice quantity.Meta position is by four Duan Zucheng when one CAN, specifically by sync section SYNC, propagation time section PROP_
SEG, 1 PHASE_SEG1 of phase buffer section, 2 PHASE_SEG2 of phase buffer section composition.Wherein sync section is used for synchronous bus
Upper each node, is fixed as 1 timeslice, the present invention does not modify to it, and the present invention is by adjusting rear three sections of timeslice
Number configures to adjust sampled point.Propagation time, section PROP_SEG was prolonged for thermal compensation signal by the physics that communication line is propagated
When;1 PHASE_SEG1 of phase buffer section and 2 PHASE_SEG2 of phase buffer section is used to compensate the Crystal Oscillator Errors between node, work
As when allow resynchronize it is lengthened and is shortened.At the time of sampled point is exactly sampling location in the position time (whether CAN
When meta position) percentage, be embodied as: [(SYNC+PROP_SEG+PHASE_SEG1)/(SYNC+PROP_SEG+PHASE_
SEG1+PHASE_SEG2)] * 100%, it can be adjusted by adjusting the timeslice of three sections below.
When electricity operation on communication node each in communication network, each section was read in the CAN position time stored in memory device
Timeslice a numerical value, CAN module is initialized, obtain communication network agreement baud rate, into CAN data transmit-receive
Processing status.
During data transmit-receive, communication node counts the total data frame Frame and the section received in a period of time
The number Error of time internal bus mistake, so as to learn error rate Err=(Error/ under current sampling point configuration
Frame)*100%.The quality of reception of bus can be assessed by this error rate Err, error rate Err is greater than certain numerical value
Afterwards, it is likely to result in data frame losing, data exception etc., under serious conditions, each node can not will communicate completely, influence unit function
Normal operation.Therefore, if the present invention judges that the error rate Err of CAN bus is greater than preset value Err_max, illustrate current
Bus communication quality needs to reconfigure sampled point into next step there may be exception.
It attempts first kind configuration method: reconfiguring the timeslice number of three sections behind in the position time of CAN, that is, propagate
Period PROP_SEG, phase buffer section 1PHASE_SEG1, phase buffer section 2PHASE_SEG2 move back sampled point, that is, subtract
Few phase buffer section 2PHASE_SEG2 timeslice number, when propagation time section PROP_SEG+ phase buffer section 1PHASE_SEG1
Between the number of piece increase, while the timeslice number summation of three sections (could also say that four sections) need to be kept constant, specifically
The timeslice number of propagation time section PROP_SEG can be increased, or increase by the timeslice of 1 PHASE_SEG1 of phase buffer section
Number, if if the timeslice number of 2 reduction of phase buffer section is greater than 1, propagation time section PROP_ can also be increased simultaneously
The timeslice number of 1 PHASE_SEG1 of SEG and phase buffer section, we count the sampled point after at least one change configuration and
Its corresponding miscommunication rate, optimal embodiment are the sampled point configuration and its corresponding communication mistake after counting these three changes
Accidentally rate.
It attempts the second class configuration method: reconfiguring the timeslice number of three sections behind in the position time of CAN, that is, propagate
Period PROP_SEG, phase buffer section 1PHASE_SEG1, phase buffer section 2PHASE_SEG2 make sampled point move forward, that is, increase
Add 2 PHASE_SEG2 timeslice number of phase buffer section, when propagation time section PROP_SEG+ phase buffer section 1PHASE_SEG1
Between piece number reduce, while the timeslice number summation of three sections (could also say that four sections) need to be kept constant, specifically may be used
To reduce the timeslice number of propagation time section PROP_SEG, or reduce the timeslice of 1 PHASE_SEG1 of phase buffer section
Number, if if the increased timeslice number of phase buffer section 2 is greater than 1, propagation time section PROP_SEG can also be reduced simultaneously
With the timeslice number of 1 PHASE_SEG1 of phase buffer section, we count the sampled point after at least one change configuration and its it is right
The miscommunication rate answered, optimal embodiment are sampled point configuration and its corresponding miscommunication after counting these three changes
Rate.
It attempts third class configuration method: reconfiguring in the position time of CAN, propagation time section PROP_SEG, phase buffer
The timeslice number of 1 PHASE_SEG1 sections of section, 2 PHASE_SEG2 of phase buffer section are remained unchanged, and are keeping propagation time section
In the 1 constant situation of PHASE_SEG1 of PROP_SEG+ phase buffer section, the timeslice of propagation time section PROP_SEG can be increased
The timeslice number of phase buffer section 1PHASE_SEG1 is counted and reduced, or increases the time of phase buffer section 1PHASE_SEG1
Piece number and the timeslice number for reducing propagation time section PROP_SEG, while three sections need to be kept (to could also say that four
Section) timeslice number summation it is constant, we count the sampled point after at least one change configuration and its corresponding miscommunication
Rate, optimal embodiment are sampled point configuration and its corresponding miscommunication rate after counting both changes.
Sampled point configuration and its corresponding miscommunication rate are obtained to above-mentioned three classes configuration method, we can choose smaller
Value each section in the position time of CAN of configuration is configured according to the corresponding sampled point of the value, it is optimal still
All sampled points are configured and its corresponding miscommunication rate is compared, select minimum value therein, it will be in the position time of CAN
Each section of configuration is configured according to the corresponding sampled point of minimum value, updates sampled point configuration, while by the sampling
Point configuration is remembered, and electricity operation will configure according to the sampled point and carry out configuration CAN on next time.
It should be noted that the configuration of all sampled points contains the sampled point configuration before change and all after change adopt
Sampling point configuration.Because all sampled points after change configure the sampling that corresponding miscommunication rate might not be less than before change
Point configures corresponding miscommunication rate, it is possible to which the sampled point configuration before change is optimal.
We can first count all sampled point configurations and its corresponding communication when selecting the minimum value of miscommunication rate
Error rate finally compares minimum value again, can also first calculate such minimum value in every a kind of configuration method, then again will
The minimum value of three classes is compared with the value that the sampled point before change configures corresponding miscommunication rate, for example, in statistics first
When the miscommunication rate of class sampled point configuration, its minimum value is found, takes the smallest miscommunication rate to be denoted as Err_a, and record
The timeslice number of three sections after Err_a is corresponding.When counting the miscommunication rate of the second class sampled point configuration, it is found most
Small value is minimized and is denoted as Err_b, and records the timeslice number of corresponding three sections of Err_b.In statistics third class sampled point
When the miscommunication rate of configuration, find its minimum value, be minimized and be denoted as Err_c, and record corresponding three sections of Err_c when
Between piece number.Then take the communication corresponding with the sampled point configuration before change of the minimum value in Err_a, Err_b, Err_c wrong
Accidentally rate is compared, and takes minimum value therein.
By the above process, the sampled point of CAN bus can be made to adapt to engineering site in real time, avoided since product development is pre-
The sampled point and actual needs deviation first set, causes bus to receive abnormal phenomenon.This method can adapt to engineering ring automatically
Border respectively communicates factor, is determined the sampled point of minimum miscommunication rate, ensures the normal communication of each communication node.
This method is mainly used for promoting CAN communication data receiver accuracy, ensures communication node reliability, is determining parameter
Process grabs waveform by oscillograph (such as oscillograph of the model Infiniivision 700B of Agilent), to data
Frame is decoded, and counts different node error rates, can find out the rule under CAN time each factors, i.e. sampled point and engineering
Relationship between site environment factor is sampled as CAN network equipment.CAN network is used present invention may apply to a variety of
Equipment be of course equally applicable to other machines for using CAN to be communicated such as suitable for the communication network of multi-gang air-conditioner
Group network or equipment.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.
Claims (9)
1. a kind of method for the communication reliability for promoting CAN network, which is characterized in that comprising steps of
Monitor the miscommunication rate that current sampling point configures lower CAN;
It when the miscommunication rate is greater than preset value, keeps the timeslice total number of the position time of CAN constant, adjusts institute's rheme
The timeslice quantity of time correspondent section configures to change sampled point;
Each sampled point configuration and its corresponding miscommunication rate are counted, and selects the smallest sampled point configuration pair of miscommunication rate
CAN is reinitialized.
2. the method as described in claim 1, which is characterized in that each sampled point configuration includes: before change sampled point configures
Sampled point configuration and change sampled point match postpone sampled point configuration.
3. the method as described in claim 1, which is characterized in that the miscommunication rate of the CAN under monitoring current sampling point configuration
It specifically includes:
The number Error of the total data frame Frame and the miscommunication in this time received in statistics a period of time,
Obtain miscommunication rate Err=(Error/Frame) * 100%.
4. the method as described in claim 1, which is characterized in that institute's bit time correspondent section is specially the propagation time of position time
Section, phase buffer section 1 and phase buffer section 2.
5. method as claimed in claim 4, which is characterized in that change sampled point configuration specifically includes:
It keeps the sum of the timeslice of all sections of institute's bit time constant, reduces the timeslice number of phase buffer section 2, increase and pass
The timeslice number for broadcasting period and/or phase buffer section 1, after counting at least one change sampled point configuration and its it is corresponding
Miscommunication rate.
6. method as claimed in claim 4, which is characterized in that change sampled point specifically includes:
It keeps the sum of the timeslice of all sections of institute's bit time constant, increases the timeslice number of phase buffer section 2, reduce and pass
The timeslice number for broadcasting period and/or phase buffer section 1, after counting at least one change sampled point configuration and its it is corresponding
Miscommunication rate.
7. method as claimed in claim 4, which is characterized in that change sampled point specifically includes:
It keeps the sum of the timeslice of all sections of institute's bit time constant, increase the timeslice number of propagation time section and reduces phase
The timeslice number of bit buffering section 1, or reduce the timeslice number of propagation time section and increase the timeslice of phase buffer section 1
Number, sampled point configuration and its corresponding miscommunication rate after counting at least one change.
8. a kind of equipment using CAN network, which is characterized in that use claim 1 to 7 any one the method such as and come
Promote the communication reliability of its CAN network.
9. equipment as claimed in claim 8, which is characterized in that the equipment includes multi-gang air-conditioner.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910810915.1A CN110324223B (en) | 2019-08-30 | 2019-08-30 | Method and equipment for improving communication reliability of CAN network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910810915.1A CN110324223B (en) | 2019-08-30 | 2019-08-30 | Method and equipment for improving communication reliability of CAN network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110324223A true CN110324223A (en) | 2019-10-11 |
CN110324223B CN110324223B (en) | 2019-12-20 |
Family
ID=68126386
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910810915.1A Active CN110324223B (en) | 2019-08-30 | 2019-08-30 | Method and equipment for improving communication reliability of CAN network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110324223B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111182557A (en) * | 2020-02-25 | 2020-05-19 | 广州致远电子有限公司 | Tree network based detection networking system, method and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101022280A (en) * | 2006-12-15 | 2007-08-22 | 清华大学 | Orthogonal lower mixing frequency digital template matching pulse ultra wide band radio signal receiving method |
CN104202196A (en) * | 2014-09-11 | 2014-12-10 | 德科仕通信(上海)有限公司 | Method for detecting network performance problems and positioning failure nodes |
US20160087737A1 (en) * | 2013-05-29 | 2016-03-24 | Freescale Semiconductor, Inc. | A network receiver for a network using distributed clock synchronization and a method of sampling a signal received from the network |
CN106094801A (en) * | 2016-07-12 | 2016-11-09 | 四川大学 | A kind of novel CAN FD controller |
-
2019
- 2019-08-30 CN CN201910810915.1A patent/CN110324223B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101022280A (en) * | 2006-12-15 | 2007-08-22 | 清华大学 | Orthogonal lower mixing frequency digital template matching pulse ultra wide band radio signal receiving method |
US20160087737A1 (en) * | 2013-05-29 | 2016-03-24 | Freescale Semiconductor, Inc. | A network receiver for a network using distributed clock synchronization and a method of sampling a signal received from the network |
CN104202196A (en) * | 2014-09-11 | 2014-12-10 | 德科仕通信(上海)有限公司 | Method for detecting network performance problems and positioning failure nodes |
CN106094801A (en) * | 2016-07-12 | 2016-11-09 | 四川大学 | A kind of novel CAN FD controller |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111182557A (en) * | 2020-02-25 | 2020-05-19 | 广州致远电子有限公司 | Tree network based detection networking system, method and storage medium |
CN111182557B (en) * | 2020-02-25 | 2023-07-07 | 广州致远电子股份有限公司 | Detection networking system, method and storage medium based on tree network |
Also Published As
Publication number | Publication date |
---|---|
CN110324223B (en) | 2019-12-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105187148B (en) | A kind of network clock synchronization system and method based on ARM | |
CN101331736B (en) | Using travel-time as means for improving the accuracy of simple network time protocol | |
EP2983324A1 (en) | Timestamp generating method, device and system | |
US9167058B2 (en) | Timestamp correction in a multi-lane communication link with skew | |
EP2573975B1 (en) | Method and device for selecting sampling clock signal | |
CN103563287B (en) | Synchronization device and synchronization method | |
CN102833026B (en) | A kind of clock tracing method, system and network element | |
CN111970759B (en) | Delay adjustment method and device for end-to-end service, storage medium and electronic device | |
CN109936514A (en) | A kind of message processing method and device | |
CN104469831B (en) | Fault detection method and device are shunk in the network coverage | |
CN103248445A (en) | Clock synchronization method and device | |
EP2999168A1 (en) | Collaboration method and system in distributed resilient network interconnect system | |
CN107566088A (en) | The method of adjustment and charging adapter of a kind of baud rate | |
CN108599885B (en) | High-precision time synchronization method | |
CN110324223A (en) | Promote method, the equipment of the communication reliability of CAN network | |
CN106688207A (en) | Method for determining a propagation time of a telegram in a communication network, and corresponding network components | |
US7313737B2 (en) | Adaptive link adaptation | |
CN102511149B (en) | Output time method for minitoring network node, device and system thereof | |
CN103873281A (en) | Management method of fault injection and fault injection method | |
WO2021249546A1 (en) | Network monitoring method, electronic device and storage medium | |
CN112187679B (en) | Message processing method and device | |
CN101621346B (en) | Source synchronous receiving device with adaptive feedback and source synchronizing method | |
CN102404102B (en) | A kind of method and apparatus of synchronous ethernet | |
CN113489613B (en) | Message forwarding method and device | |
CN105007134A (en) | Method and device for restraining packet network PDV (Packet Delay Variation) noise and slave clock equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |