CN102437928A - Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus - Google Patents

Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus Download PDF

Info

Publication number
CN102437928A
CN102437928A CN2011104179093A CN201110417909A CN102437928A CN 102437928 A CN102437928 A CN 102437928A CN 2011104179093 A CN2011104179093 A CN 2011104179093A CN 201110417909 A CN201110417909 A CN 201110417909A CN 102437928 A CN102437928 A CN 102437928A
Authority
CN
China
Prior art keywords
intelligent instrument
bus
numbered
blastspeed
traffic 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
Application number
CN2011104179093A
Other languages
Chinese (zh)
Other versions
CN102437928B (en
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.)
Third Institute Of Equipment Research Institute Of Second Artillery Of C
Original Assignee
Third Institute Of Equipment Research Institute Of Second Artillery Of C
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 Third Institute Of Equipment Research Institute Of Second Artillery Of C filed Critical Third Institute Of Equipment Research Institute Of Second Artillery Of C
Priority to CN201110417909.3A priority Critical patent/CN102437928B/en
Publication of CN102437928A publication Critical patent/CN102437928A/en
Application granted granted Critical
Publication of CN102437928B publication Critical patent/CN102437928B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention belongs to the technical field of computer network communication, and in particular relates to a method for automatically adapting to speed change of a bus. The technical scheme of the invention provides a communication method capable of self-adaptively switching between two speeds of a CAN (Controller Area Network) bus and an intelligent instrument can automatically adapt to the bus speeds of different systems by two ways as follows: one way is that a No.0 intelligent instrument is used for setting bus speeds for other intelligent instruments; and the other way is that the bus speeds can be automatically indentified and configured by the other intelligent instruments, so that the artificial configuration is not needed.

Description

The means of communication that self adaptation is switched between two kinds of speed of CAN bus
Technical field
The invention belongs to the computer network communication technology field, the method that particularly a kind of automatic adaptation Bus Speed changes.
Background technology
Measurement and control area often adopts the CAN bussing technique in modern times; Be characterized in that (numbering 0~M) is connected with the CAN bus a plurality of intelligent instruments; Each intelligent instrument all has address of oneself and function independently, transmits self check, data or real time information through the CAN bus, constitutes an incorporate TT&C system.In general, the CAN bus communication speed of system is fixed, and each intelligent instrument only need be arranged to a fixed value on request.
But in some particular application, different like the bus communication speed of two systems, be general but require the intelligent instrument of access bus, perhaps same system needs to adopt the A traffic rate in certain environment, and in another environment, needs to adopt the B traffic rate.If intelligent instrument has the interface of setting, the operator can carry out the speed setting before then being connected with system, if intelligent instrument does not have the interface, just is difficult to adapt to the variation of traffic rate.
Summary of the invention
The objective of the invention is: a kind of means of communication that self adaptation is switched between two kinds of traffic rates of CAN bus are provided, communicate speed when intelligent instrument is powered on automatically and switch.
Technical scheme of the present invention is: the means of communication that self adaptation is switched between two kinds of CAN Bus Speeds may further comprise the steps:
A. establish have in the system that adopts the CAN bus one be numbered 0 intelligent instrument with in addition M number the intelligent instrument that is respectively 1~M; Be numbered 0 intelligent instrument to set the CAN bus communication speed be A or be B by said;
B. make said 0 the intelligent instrument back that powers on that is numbered carry out following steps:
B1. make i=1;
B2. the traffic rate according to the CAN bus is set at A or is B, and the variable bLastSpeed of order expression intelligent instrument and system's success communication last time speed is 0 or is 1;
B3. the CAN bus is current traffic rate is set at A;
B4. communicate by letter with the intelligent instrument that is numbered i, bLastSpeed is given the intelligent instrument that is numbered i;
B5. waiting n Time time;
B6. then forward b9 to by return data as receiving; Otherwise carry out b7;
B7. the CAN bus is current traffic rate is set at B;
B8. communicate by letter with the intelligent instrument that is numbered i, bLastSpeed is given the intelligent instrument that is numbered i;
B9. make i=i+1, if i<M then carries out b3; Otherwise carry out b10;
B10. the traffic rate with the CAN bus is set at the value corresponding with bLastSpeed;
B11. finish;
C. after making the said intelligent instrument that is numbered 1~M power on, before carrying out main program, carry out following steps:
C1. be 0 or be 1 according to the variable bLastSpeed of this intelligent instrument of expression, the current traffic rate of this intelligent instrument is set at A or is B with system's success communication last time speed;
C2. communicate by letter with said 0 the intelligent instrument of being numbered;
C3. waiting n Time time;
If c4. receive return data, then forward c5 to; Otherwise, bLastSpeed is put instead, the traffic rate of this intelligent instrument is set at the value corresponding with bLastSpeed;
C5. finish;
D. receive in the service routine at the said intelligent instrument that is numbered 1~M, increase following steps:
D1. judge whether received breath is to be numbered 0 the bLastSpeed assignment that intelligent instrument sent;
D2. as not, then carry out d3; In this way, then accomplish the bLastSpeed assignment of this intelligent instrument, the traffic rate of this intelligent instrument is set at the value corresponding with bLastSpeed, to said 0 the intelligent instrument return data that is numbered;
D3. continue to carry out and receive service routine.
The present invention realizes that in two ways intelligent instrument adapts to the different system Bus Speed automatically; The one, for other intelligent instrument Bus Speed is set by No. 0 intelligent instrument; The 2nd, discern and be provided with Bus Speed automatically by other intelligent instrument, thereby need not to carry out manual work setting.
Embodiment
Embodiment 1: the means of communication that self adaptation is switched between two kinds of CAN Bus Speeds may further comprise the steps:
A. establish have in the system that adopts the CAN bus one be numbered 0 intelligent instrument with in addition M number the intelligent instrument that is respectively 1~M; Be numbered 0 intelligent instrument to set the CAN bus communication speed be A or be B by said;
B. make said 0 the intelligent instrument back that powers on that is numbered carry out following steps:
B1. make i=1;
B2. the traffic rate according to the CAN bus is set at A or is B, and the variable bLastSpeed of order expression intelligent instrument and system's success communication last time speed is 0 or is 1;
B3. the CAN bus is current traffic rate is set at A;
B4. communicate by letter with the intelligent instrument that is numbered i, bLastSpeed is given the intelligent instrument that is numbered i;
B5. waiting n Time time;
B6. then forward b9 to by return data as receiving; Otherwise carry out b7;
B7. the CAN bus is current traffic rate is set at B;
B8. communicate by letter with the intelligent instrument that is numbered i, bLastSpeed is given the intelligent instrument that is numbered i;
B9. make i=i+1, if i<M then carries out b3; Otherwise carry out b10;
B10. the traffic rate with the CAN bus is set at the value corresponding with bLastSpeed;
B11. finish;
C. after making the said intelligent instrument that is numbered 1~M power on, before carrying out main program, carry out following steps:
C1. be 0 or be 1 according to the variable bLastSpeed of this intelligent instrument of expression, the current traffic rate of this intelligent instrument is set at A or is B with system's success communication last time speed;
C2. communicate by letter with said 0 the intelligent instrument of being numbered;
C3. waiting n Time time;
If c4. receive return data, then forward c5 to; Otherwise, bLastSpeed is put instead, the traffic rate of this intelligent instrument is set at the value corresponding with bLastSpeed;
C5. finish;
D. receive in the service routine at the said intelligent instrument that is numbered 1~M, increase following steps:
D1. judge whether received breath is to be numbered 0 the bLastSpeed assignment that intelligent instrument sent;
D2. as not, then carry out d3; In this way, then accomplish the bLastSpeed assignment of this intelligent instrument, the traffic rate of this intelligent instrument is set at the value corresponding with bLastSpeed, to said 0 the intelligent instrument return data that is numbered;
D3. continue to carry out and receive service routine.
Embodiment 2: like the embodiment 1 described means of communication that self adaptation is switched between two kinds of speed of CAN bus, it is characterized in that: the variable bLastSpeed of said expression intelligent instrument and system's success communication last time speed is stored in the outage memory cell of each intelligent instrument.
Embodiment 3: like the embodiment 1 described means of communication that self adaptation is switched between two kinds of speed of CAN bus, it is characterized in that: the variable bLastSpeed of said expression intelligent instrument and system's success communication last time speed is stochastic variable when intelligent instrument powers on.

Claims (3)

1. the means of communication that self adaptation is switched between two kinds of CAN Bus Speeds may further comprise the steps:
A. establish have in the system that adopts the CAN bus one be numbered 0 intelligent instrument with in addition M number the intelligent instrument that is respectively 1~M; Be numbered 0 intelligent instrument to set the CAN bus communication speed be A or be B by said;
B. make said 0 the intelligent instrument back that powers on that is numbered carry out following steps:
B1. make i=1;
B2. the traffic rate according to the CAN bus is set at A or is B, and the variable bLastSpeed of order expression intelligent instrument and system's success communication last time speed is 0 or is 1;
B3. the CAN bus is current traffic rate is set at A;
B4. communicate by letter with the intelligent instrument that is numbered i, bLastSpeed is given the intelligent instrument that is numbered i;
B5. waiting n Time time;
B6. then forward b9 to by return data as receiving; Otherwise carry out b7;
B7. the CAN bus is current traffic rate is set at B;
B8. communicate by letter with the intelligent instrument that is numbered i, bLastSpeed is given the intelligent instrument that is numbered i;
B9. make i=i+1, if i<M then carries out b3; Otherwise carry out b10;
B10. the traffic rate with the CAN bus is set at the value corresponding with bLastSpeed;
B11. finish;
C. after making the said intelligent instrument that is numbered 1~M power on, before carrying out main program, carry out following steps:
C1. be 0 or be 1 according to the variable bLastSpeed of this intelligent instrument of expression, the current traffic rate of this intelligent instrument is set at A or is B with system's success communication last time speed;
C2. communicate by letter with said 0 the intelligent instrument of being numbered;
C3. waiting n Time time;
If c4. receive return data, then forward c5 to; Otherwise, bLastSpeed is put instead, the traffic rate of this intelligent instrument is set at the value corresponding with bLastSpeed;
C5. finish;
D. receive in the service routine at the said intelligent instrument that is numbered 1~M, increase following steps:
D1. judge whether received breath is to be numbered 0 the bLastSpeed assignment that intelligent instrument sent;
D2. as not, then carry out d3; In this way, then accomplish the bLastSpeed assignment of this intelligent instrument, the traffic rate of this intelligent instrument is set at the value corresponding with bLastSpeed, to said 0 the intelligent instrument return data that is numbered;
D3. continue to carry out and receive service routine.
2. the means of communication that self adaptation is switched between two kinds of speed of CAN bus according to claim 1, it is characterized in that: the variable bLastSpeed of said expression intelligent instrument and system's success communication last time speed is stored in the outage memory cell of each intelligent instrument.
3. the means of communication that self adaptation is switched between two kinds of speed of CAN bus according to claim 1, it is characterized in that: the variable bLastSpeed of said expression intelligent instrument and system's success communication last time speed is stochastic variable when intelligent instrument powers on.
CN201110417909.3A 2011-12-15 2011-12-15 Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus Expired - Fee Related CN102437928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110417909.3A CN102437928B (en) 2011-12-15 2011-12-15 Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110417909.3A CN102437928B (en) 2011-12-15 2011-12-15 Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus

Publications (2)

Publication Number Publication Date
CN102437928A true CN102437928A (en) 2012-05-02
CN102437928B CN102437928B (en) 2014-04-16

Family

ID=45985812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110417909.3A Expired - Fee Related CN102437928B (en) 2011-12-15 2011-12-15 Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus

Country Status (1)

Country Link
CN (1) CN102437928B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724144A (en) * 2012-06-26 2012-10-10 浙江吉利汽车研究院有限公司杭州分公司 Self-adaptive gateway device and data transmission method thereof
CN104320221A (en) * 2014-11-13 2015-01-28 福州瑞芯微电子有限公司 Bus transfer rate control method and device for communication module
CN108933718A (en) * 2017-08-30 2018-12-04 北京猎户星空科技有限公司 The configuration method of traffic rate, device and the network equipment in CAN network
CN113726402A (en) * 2021-07-20 2021-11-30 西安空间无线电技术研究所 Satellite-borne RS 485-based dual-bus self-adaptive control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5530696A (en) * 1994-06-22 1996-06-25 International Business Machines Corporation Intelligent concentrator for multiple speed data communications systems
CN101465838A (en) * 2007-12-21 2009-06-24 希姆通信息技术(上海)有限公司 Method for implementing self-adapting velocity simulation I*C bus communication
CN101741766A (en) * 2008-11-07 2010-06-16 北京广利核系统工程有限公司 Conversion device and method from CAN network to ethernet network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5530696A (en) * 1994-06-22 1996-06-25 International Business Machines Corporation Intelligent concentrator for multiple speed data communications systems
CN101465838A (en) * 2007-12-21 2009-06-24 希姆通信息技术(上海)有限公司 Method for implementing self-adapting velocity simulation I*C bus communication
CN101741766A (en) * 2008-11-07 2010-06-16 北京广利核系统工程有限公司 Conversion device and method from CAN network to ethernet network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王志颖等: "《面向安全关键系统的CAN总线应用研究综述》", 《计算机应用研究》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724144A (en) * 2012-06-26 2012-10-10 浙江吉利汽车研究院有限公司杭州分公司 Self-adaptive gateway device and data transmission method thereof
CN102724144B (en) * 2012-06-26 2015-06-10 浙江吉利汽车研究院有限公司杭州分公司 Self-adaptive gateway device and data transmission method thereof
CN104320221A (en) * 2014-11-13 2015-01-28 福州瑞芯微电子有限公司 Bus transfer rate control method and device for communication module
CN104320221B (en) * 2014-11-13 2018-01-09 福州瑞芯微电子股份有限公司 The bus transfer rate control method and device of a kind of communication module
CN108933718A (en) * 2017-08-30 2018-12-04 北京猎户星空科技有限公司 The configuration method of traffic rate, device and the network equipment in CAN network
CN108933718B (en) * 2017-08-30 2021-05-14 北京猎户星空科技有限公司 Method and device for configuring communication rate in CAN (controller area network) and network equipment
CN113726402A (en) * 2021-07-20 2021-11-30 西安空间无线电技术研究所 Satellite-borne RS 485-based dual-bus self-adaptive control method
CN113726402B (en) * 2021-07-20 2022-08-12 西安空间无线电技术研究所 Satellite-borne RS 485-based dual-bus self-adaptive control method

Also Published As

Publication number Publication date
CN102437928B (en) 2014-04-16

Similar Documents

Publication Publication Date Title
CN102437928B (en) Communication method capable of self-adaptively switching between two speeds of CAN (Controller Area Network) bus
CN102820649B (en) Method for building real time digital system (RTDS)-energy management system (EMS) system-level closed-loop control experiment simulation platform
CN103336486A (en) Method for battery module address assignment of battery energy storage system
EP2533398A3 (en) Enhanced communication infrastructure for hierarchical intelligent power distribution grid
MY119845A (en) Management of functionality in a consumer electronics system
US20160094350A1 (en) Automatic Power Budget Management for Power-Over-Ethernet Apparatus
CN105554012B (en) A kind of EtherCAT slave station based on DSP turns the communication unit of Canopen main website
CN108923484A (en) Charge power adjusting method, device, power supply unit and storage medium
JP2016163349A (en) Energy storage system and synchronization method of energy storage system
CN103891086A (en) Providing electrical energy
CN104168162A (en) Traffic generator for interchanger verification testing by software-hardware cooperation achieving
WO2016155996A1 (en) Production system and method for controlling same
CN103763740A (en) Method and device for balancing loads of single boards
CN104833924A (en) Serial automatic addressing method and system of lead storage battery internal resistance detection modules
CN103353715A (en) Data transmission method for redundancy protection measurement and control of monitoring system
CN104702428A (en) Method for determining work order dispatching modes and integrated alarm system
CN105281343A (en) Modular series-parallel filter compensation system and method
KR20150080183A (en) Method and Apparatus for dynamic traffic engineering in Data Center Network
CN104618157A (en) Network management method, device and system
CN104317868B (en) A kind of regulation and control integral method based on single preposition more SCADA applications
RU2011134072A (en) METHOD AND DEVICE FOR MONITORING THE ACTIVATION OF BLOCKS BELONGING AT LEAST TO ONE MULTIPLEX NETWORK BY MEASURING NON-TIME ACTIVATIONS
CN105407059A (en) QoS scheduler and scheduling method for SCSI target device
CN104699649A (en) Multi-branch serial bus interface and data exchange method
CN201845215U (en) Concentrating-distributing type wireless control system, master controller and slave controllers
CN101815315A (en) Redundancy backup swap method, device and 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
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140416

Termination date: 20141215

EXPY Termination of patent right or utility model