CN110147090B - Method and system for processing controller local area network bus closing fault - Google Patents

Method and system for processing controller local area network bus closing fault Download PDF

Info

Publication number
CN110147090B
CN110147090B CN201910581843.8A CN201910581843A CN110147090B CN 110147090 B CN110147090 B CN 110147090B CN 201910581843 A CN201910581843 A CN 201910581843A CN 110147090 B CN110147090 B CN 110147090B
Authority
CN
China
Prior art keywords
fault
bus
network
received message
time interval
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.)
Active
Application number
CN201910581843.8A
Other languages
Chinese (zh)
Other versions
CN110147090A (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.)
Weichai Power Co Ltd
Original Assignee
Weichai Power 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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN201910581843.8A priority Critical patent/CN110147090B/en
Publication of CN110147090A publication Critical patent/CN110147090A/en
Application granted granted Critical
Publication of CN110147090B publication Critical patent/CN110147090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Abstract

The invention discloses a method and a system for processing a controller area network bus closing fault, wherein the method comprises the following steps: when detecting that the controller local area network bus is closed, reporting the bus closing fault; detecting whether the receiving state of the received message is normal or not; if so, executing network restart when the time interval from the last network restart meets a preset time interval threshold; and if the bus fault disappears and the receiving state of the received message is normal after the network is restarted, judging that the bus shutdown fault is cured. The invention confirms the recovery strategy of the bus closing fault according to the message receiving state and the original bus closing fault state, ensures that the bus closing fault is correctly reported, and actively triggers the CAN network to restart when detecting that the CAN high and CAN low short circuit problems do not exist, so as to recover the network at the fastest and ensure the normal communication.

Description

Method and system for processing controller local area network bus closing fault
Technical Field
The invention relates to the technical field of fault diagnosis, in particular to a method and a system for processing a controller area network bus closing fault.
Background
CAN is a short for Controller Area Network (CAN). The CAN is designed to communicate as a microcontroller in the automotive environment, exchanging information between the onboard Electronic Control Units (ECUs) to form an automotive electronic control network.
At present, after CAN is short-circuited between high CAN and low CAN, a bus off fault CAN be reported. The CAN network CAN be restarted when the bus closing fault is responded, after the CAN network is restarted, although the CAN network does not reply, the original fault state transmitted by the chip disappears, the bus off fault has a false cure problem, and meanwhile, after the ECU diagnoses that the bus off fault is cured, the network CAN not be restarted any more, and even if the CAN high and the CAN low are not short-circuited any more, the network CAN not be restarted, so that the CAN network in the driving cycle CAN not be recovered. Therefore, the existing bus closing fault diagnosis is inaccurate, and the normal use of communication cannot be guaranteed.
Disclosure of Invention
In view of the above problems, the present invention provides a method and a system for handling a shutdown fault of a controller area network bus, which ensure accurate reporting of the shutdown fault of the bus and ensure normal communication.
In order to achieve the purpose, the invention provides the following technical scheme:
a controller area network bus shutdown fault handling method comprises the following steps:
when detecting that the controller local area network bus is closed, reporting the bus closing fault;
detecting whether the receiving state of the received message is normal or not;
if so, executing network restart when the time interval from the last network restart meets a preset time interval threshold;
and if the bus fault disappears and the receiving state of the received message is normal after the network is restarted, judging that the bus shutdown fault is cured.
Optionally, the method further comprises:
if the chip judges that the bus fault does not disappear or the receiving state of the received message is abnormal, whether the network restarting time exceeds the restarting time threshold value is judged, if so, the bus fault reporting state is maintained, and whether the bus fault is cured is judged again.
Optionally, the detecting whether the receiving state of the received packet is normal includes:
and judging whether the receiving state of the message is normal or not according to the state word of the received message.
Optionally, the method further comprises:
and when the time interval from the last network restart does not meet the preset time interval threshold, executing the network restart after the preset waiting time.
Optionally, the received message characterizes a received message of an engine electronic control unit.
A controller area network bus shutdown fault handling system, the system comprising:
the fault reporting unit is used for reporting a bus closing fault when the controller local area network bus closing fault is detected;
a state detection unit for detecting whether the receiving state of the received message is normal;
the time judgment unit is used for executing network restarting when the time interval from the last network restarting meets a preset time interval threshold if the time interval meets the preset time interval threshold;
and the fault judging unit is used for judging that the bus shutdown fault is cured if the bus fault disappears and the receiving state of the received message is normal after the network is restarted.
Optionally, the system further comprises:
and the re-judgment unit is used for judging whether the network restarting time exceeds a restarting time threshold value or not if the chip judges that the bus fault does not disappear or the receiving state of the received message is abnormal, and if so, maintaining the bus fault reporting state and re-judging whether the bus fault is cured or not.
Optionally, the state detection unit is specifically configured to:
and judging whether the receiving state of the message is normal or not according to the state word of the received message.
Optionally, the system further comprises:
and the execution unit is used for executing the network restart after the preset waiting time when the time interval from the last network restart does not meet the preset time interval threshold.
Optionally, the received message characterizes a received message of an engine electronic control unit.
Compared with the prior art, the invention provides a method and a system for processing the shutdown fault of the controller area network bus. The method comprises the steps of confirming a bus shutdown fault healing strategy according to a received message state and a bus shutdown original fault state, ensuring that a bus shutdown fault is correctly reported, actively triggering a CAN (controller area network) to restart, recovering a network at the fastest speed and ensuring that communication is normal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for handling a controller area network bus shutdown fault according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system for handling a controller area network bus shutdown failure according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not set forth for a listed step or element but may include steps or elements not listed.
In an embodiment of the present invention, a method for handling a controller area network bus shutdown fault is provided, and referring to fig. 1, the method includes:
s101, when detecting that a controller area network bus is closed, reporting a bus closing fault;
s102, detecting whether the receiving state of the received message is normal, if so, executing S103;
s103, when the time interval from the last network restart meets a preset time interval threshold, executing the network restart;
and S104, if the bus fault disappears and the receiving state of the received message is normal after the network is restarted, judging that the bus shutdown fault is cured.
In the existing scheme, when the bus shutdown fault state transmitted from the bottom layer judges the fault, the bus shutdown fault is reported, at the moment, the network is restarted, even if the CAN high CAN low is still short-circuited, the bus shutdown fault state transmitted from the bottom layer disappears, no fault is considered, the bus shutdown fault is treated falsely, and the original strategy judges that the bus shutdown fault is treated only according to the original fault state of the bus shutdown bottom layer, so that the bus shutdown fault CAN not be treated accurately.
In the embodiment of the invention, when the original fault state uploaded at the bottom layer judges a fault, a bus closing fault is reported; and detecting whether the receiving state of the received message is normal or not after the fault is reported, wherein the normal receiving state is the normal receiving state of the received message at the moment, which indicates that the bus shutdown fault is physically removed, for example, the CAN high CAN low short circuit problem disappears, and the message CAN be normally received after the network is restarted.
And if the receiving state is normal and the time interval from the last network restart meets the preset time interval threshold, executing the network restart. The preset time interval threshold may be a minimum restart interval time, that is, when the network restart time is longer than the minimum restart interval time from the last network restart time, the network restart is performed, it is determined that the fault is physically removed after the bus shutdown fault occurs, and the network restart CAN be resumed only by restarting the CAN network through the network, and if it is determined that the received message is normal and the original fault state uploaded at the bottom layer is a non-fault state within a certain time of the network restart, it is determined that the bus shutdown fault is cured.
In another implementation manner of the embodiment of the present invention, if the chip determines that the bus fault does not disappear or the receiving state of the received message is abnormal, it determines whether the network restart time exceeds the restart time threshold, and if so, maintains the bus fault reporting state, and re-determines whether the bus fault is cured.
The manner of judging whether the message is cured again is also the judgment according to the receiving state of the received message and the original fault state provided in the above embodiment.
In another embodiment, the detecting whether the receiving state of the received packet is normal includes:
and judging whether the receiving state of the message is normal or not according to the state word of the received message.
Specifically, the receiving state has a normal state 1 and a timeout state 2, and also has an initial state 0, when there is no short circuit action, the receiving state is cleared to be received normally next time, 1 represents normal receiving, and 2 represents that no timeout is received.
The received messages in the embodiment of the invention are received messages of an engine Electronic Control Unit (ECU), and some received messages are generally enabled according to the requirement of the control function of a controller, and the enabled messages are determined to be sent to the ECU by the controller, such as TCO1 messages from a meter and AT1OG1 messages from an NOX sensor, and whether the received messages are received or not can be periodically detected after the messages are enabled to be received. When the bus closing fault does not exist physically, the receiving state of the message is normal in the receiving period of the message, but at the moment, the CAN network cannot be guaranteed to be recovered and needs to be restarted, but when the bus closing fault does not disappear physically, the receiving state of the message is abnormal. The physical condition refers to a condition causing a bus shutdown fault, such as a CAN high CAN low short, that is, the physical condition is eliminated, which means that the action of the CAN high CAN low short disappears.
In order to prevent the problem that the bus shutdown fault exists when the network is restarted and then the CAN high CAN low short circuit problem is cancelled, the network cannot be cured under the condition, so that whether the fault is cured or not is judged within a certain time after the restart, namely, if the network is not recovered after the restart, the fault cure of the bus shutdown network CAN be judged by waiting for the next restart.
According to the method for processing the bus closing fault of the controller area network, a bus closing fault healing strategy is confirmed according to a message receiving state and a bus closing original fault state, the bus closing fault is guaranteed to be correctly reported, meanwhile, when the situation that the CAN high short circuit problem and the CAN low short circuit problem do not exist is detected, the CAN network is actively triggered to restart, the network is recovered at the fastest, and the normal communication is guaranteed.
In another embodiment of the present invention, a system for handling a controller area network bus shutdown failure is further provided, and referring to fig. 2, the system includes:
a fault reporting unit 10, configured to report a bus closing fault when detecting a controller area network bus closing fault;
a state detection unit 20, configured to detect whether a receiving state of a received packet is normal;
a time judgment unit 30, configured to, if yes, execute network restart when a time interval from a last network restart satisfies a preset time interval threshold;
and the fault determination unit 40 is configured to determine that the bus shutdown fault is cured if the bus fault is determined to disappear after the network is restarted and the receiving state of the received message is normal.
On the basis of the above embodiment, the system further includes:
and the re-judgment unit is used for judging whether the network restarting time exceeds a restarting time threshold value or not if the chip judges that the bus fault does not disappear or the receiving state of the received message is abnormal, and if so, maintaining the bus fault reporting state and re-judging whether the bus fault is cured or not.
On the basis of the foregoing embodiment, the state detection unit is specifically configured to:
and judging whether the receiving state of the message is normal or not according to the state word of the received message.
On the basis of the above embodiment, the system further includes:
and the execution unit is used for executing the network restart after the preset waiting time when the time interval from the last network restart does not meet the preset time interval threshold.
On the basis of the above embodiment, the received message represents a received message of an engine electronic control unit.
The invention provides a system for processing a bus shutdown fault of a controller area network, which is characterized in that when a fault reporting unit reports a bus shutdown fault, a state monitoring unit detects a message receiving state, and if the receiving state is normal and the restart time meets a preset time threshold value in a time judging unit, network restart is carried out. Namely, the fault judgment unit confirms a bus closing fault healing strategy according to the message receiving state and the original bus closing fault state, ensures that the bus closing fault is correctly reported, actively triggers the CAN network to restart, recovers the network at the fastest speed and ensures that the communication is normal.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for handling a controller area network bus shutdown fault is characterized by comprising the following steps:
when detecting that the controller local area network bus is closed, reporting the bus closing fault;
detecting whether the receiving state of the received message is normal or not;
if so, executing network restart when the time interval from the last network restart meets a preset time interval threshold;
if the bus fault disappears and the receiving state of the received message is normal after the network is restarted, judging that the bus shutdown fault is cured;
if the chip judges that the bus fault does not disappear or the receiving state of the received message is abnormal, whether the network restarting time exceeds the restarting time threshold value is judged, if so, the bus fault reporting state is maintained, and whether the bus fault is cured is judged again.
2. The method according to claim 1, wherein the detecting whether the receiving status of the received packet is normal comprises:
and judging whether the receiving state of the message is normal or not according to the state word of the received message.
3. The method of claim 1, further comprising:
and when the time interval from the last network restart does not meet the preset time interval threshold, executing the network restart after the preset waiting time.
4. The method of claim 1, wherein the received message is indicative of a received message from an engine electronic control unit.
5. A can bus shutdown fault handling system, comprising:
the fault reporting unit is used for reporting a bus closing fault when the controller local area network bus closing fault is detected;
a state detection unit for detecting whether the receiving state of the received message is normal;
the time judgment unit is used for executing network restarting when the time interval from the last network restarting meets a preset time interval threshold if the time interval meets the preset time interval threshold;
the fault judging unit is used for judging that the bus shutdown fault is cured if the bus fault disappears and the receiving state of the received message is normal after the network is restarted;
and the re-judgment unit is used for judging whether the network restarting time exceeds a restarting time threshold value or not if the chip judges that the bus fault does not disappear or the receiving state of the received message is abnormal, and if so, maintaining the bus fault reporting state and re-judging whether the bus fault is cured or not.
6. The system of claim 5, wherein the state detection unit is specifically configured to:
and judging whether the receiving state of the message is normal or not according to the state word of the received message.
7. The system of claim 5, further comprising:
and the execution unit is used for executing the network restart after the preset waiting time when the time interval from the last network restart does not meet the preset time interval threshold.
8. The system of claim 5, wherein the received message is indicative of a received message from an engine electronic control unit.
CN201910581843.8A 2019-06-30 2019-06-30 Method and system for processing controller local area network bus closing fault Active CN110147090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910581843.8A CN110147090B (en) 2019-06-30 2019-06-30 Method and system for processing controller local area network bus closing fault

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910581843.8A CN110147090B (en) 2019-06-30 2019-06-30 Method and system for processing controller local area network bus closing fault

Publications (2)

Publication Number Publication Date
CN110147090A CN110147090A (en) 2019-08-20
CN110147090B true CN110147090B (en) 2020-12-22

Family

ID=67596911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910581843.8A Active CN110147090B (en) 2019-06-30 2019-06-30 Method and system for processing controller local area network bus closing fault

Country Status (1)

Country Link
CN (1) CN110147090B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273636A (en) * 2020-01-19 2020-06-12 湖北三江航天红峰控制有限公司 Method for processing power-on error frame of CAN bus
CN113626048A (en) * 2020-05-07 2021-11-09 蜂巢智能转向系统(江苏)有限公司保定分公司 Electronic control unit flashing method and device based on CANape
CN113660141B (en) * 2021-08-18 2023-05-26 潍柴动力股份有限公司 Method, device, equipment, medium and product for detecting abnormity of sent message

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007028306A1 (en) * 2005-09-09 2007-03-15 Alcatel_Lucent A method for reconstructing the network address in the ipv6 access network
CN101783759A (en) * 2010-01-19 2010-07-21 浙江吉利汽车研究院有限公司 Bus error recovery processing method
CN104079454A (en) * 2014-07-11 2014-10-01 杭州华三通信技术有限公司 Equipment exception detecting method and equipment
CN105159285A (en) * 2015-09-17 2015-12-16 北京汽车股份有限公司 CAN controller bus fault processing method and device
CN105634895A (en) * 2016-01-26 2016-06-01 深圳市沃特玛电池有限公司 Error processing method and system for CAN (Controller Area Network) bus
CN108199874A (en) * 2017-12-29 2018-06-22 上海司南卫星导航技术股份有限公司 A kind of Network Fault Detection and method, GNSS receiver and the computer-readable medium repaired
CN108696401A (en) * 2017-04-12 2018-10-23 北大方正集团有限公司 Communicate self checking method, communication self-checking system, intelligent cabinet and server
CN109379232A (en) * 2018-11-23 2019-02-22 北京长城华冠汽车科技股份有限公司 A kind of Controller Area Network BUS closing fault treating method and apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007028306A1 (en) * 2005-09-09 2007-03-15 Alcatel_Lucent A method for reconstructing the network address in the ipv6 access network
CN101783759A (en) * 2010-01-19 2010-07-21 浙江吉利汽车研究院有限公司 Bus error recovery processing method
CN104079454A (en) * 2014-07-11 2014-10-01 杭州华三通信技术有限公司 Equipment exception detecting method and equipment
CN105159285A (en) * 2015-09-17 2015-12-16 北京汽车股份有限公司 CAN controller bus fault processing method and device
CN105634895A (en) * 2016-01-26 2016-06-01 深圳市沃特玛电池有限公司 Error processing method and system for CAN (Controller Area Network) bus
CN108696401A (en) * 2017-04-12 2018-10-23 北大方正集团有限公司 Communicate self checking method, communication self-checking system, intelligent cabinet and server
CN108199874A (en) * 2017-12-29 2018-06-22 上海司南卫星导航技术股份有限公司 A kind of Network Fault Detection and method, GNSS receiver and the computer-readable medium repaired
CN109379232A (en) * 2018-11-23 2019-02-22 北京长城华冠汽车科技股份有限公司 A kind of Controller Area Network BUS closing fault treating method and apparatus

Also Published As

Publication number Publication date
CN110147090A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN110147090B (en) Method and system for processing controller local area network bus closing fault
JP4844658B2 (en) Diagnostic device and diagnostic system
EP3754940B1 (en) Fraud detection method and fraud detection electronic control unit
CN106533805B (en) Micro-service request processing method, micro-service controller and micro-service architecture
CN101483544A (en) Fault location device, communication device, and fault location method
JP2002158668A (en) Abnormality detector of network system for vehicle
JP6369341B2 (en) In-vehicle communication system
US20170180370A1 (en) Communication system and information collection method executed in communication system
CN106649043B (en) Automatic fault diagnosis method and system for operation and maintenance system
CN104104542B (en) A kind of real-time intelligent troubleshooting method based on RS485
JP5578207B2 (en) Communication load judgment device
JP2013106200A (en) Communication repeater for vehicle and sleep control method
JP5071340B2 (en) Gateway device, vehicle network, one-side disconnection detection method
JP6497656B2 (en) COMMUNICATION METHOD AND COMMUNICATION DEVICE USING THE SAME
JP2004348274A (en) Diagnostic device for communication failure
JP2012086601A (en) Electronic control unit, in-vehicle system and node monitoring method
JP3770053B2 (en) Method for determining communication return in vehicle network
JP2019084942A (en) Electronic control apparatus
JP6913869B2 (en) Surveillance equipment, surveillance systems and computer programs
CN104408059A (en) Fault processing method and device
JP7011637B2 (en) Illegal signal detection device
CN104181914A (en) Automobile fault detection method and system
CN112751822B (en) Communication apparatus, operation method, abnormality determination apparatus, abnormality determination method, and storage medium
JP7103197B2 (en) Communications system
JP6365876B2 (en) node

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