CN103023715B - A kind of fault monitoring method based on RS485 bus communication link - Google Patents
A kind of fault monitoring method based on RS485 bus communication link Download PDFInfo
- Publication number
- CN103023715B CN103023715B CN201210483566.5A CN201210483566A CN103023715B CN 103023715 B CN103023715 B CN 103023715B CN 201210483566 A CN201210483566 A CN 201210483566A CN 103023715 B CN103023715 B CN 103023715B
- Authority
- CN
- China
- Prior art keywords
- node
- diagnosis
- message
- link
- host node
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 57
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000012544 monitoring process Methods 0.000 title claims abstract description 12
- 238000003745 diagnosis Methods 0.000 claims abstract description 74
- 230000005540 biological transmission Effects 0.000 claims description 22
- 230000004044 response Effects 0.000 description 8
- 230000000875 corresponding effect Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Landscapes
- Maintenance And Management Of Digital Transmission (AREA)
Abstract
A kind of fault monitoring method based on RS485 bus communication link of disclosure, is comprised the steps: step 1, is sent with each from the host node Diagnosis of Links message of nodal information from node to each by the host node timing in the data link layer of RS485 bus communication link;Step 2, respectively receive corresponding host node Diagnosis of Links message from node after send with diagnosing message from nodal information from node link to host node immediately;Step 3, when host node do not receive within the setting time corresponding from node diagnose message from node link after, namely judge this link or this there is fault from node and carry out indicating fault and fault reports。The Diagnosis of Links message timing that the present invention utilizes and normal data distinguishes is transmitted at host node with between node, and the time according to receiving and feed back judges corresponding failure point, substantially increases the timely discovery rate of fault。
Description
Technical field
The present invention relates to network safety filed, be specifically related to a kind of for host node on RS485 bus communication link and/or the method that whether has fault to be monitored from node。
Background technology
RS-485 bus is that the EIA automatic field worked out uses and compares a kind of universal serial bus widely, and RS-485 bus can be suitable for remote digital communication, has multinode, at a distance and receive highly sensitive feature;RS-485 standard adopts balanced type to send, and the data collector that differential type receives drives bus, has the ability suppressing common mode disturbances;RS-485 is generally adopted half-duplex operation, and any whenever can only be had to be in transmission state。Communication based on RS-485 bus is generally adopted master-slave communication design, after namely major node sends communication command, is for just making corresponding action after this node from node recognition command。Under These characteristics, the diagnostic mode of the existing communications protocol based on RS-485 bus is:
1, the transmission of data is only carried out, diagnosis communication link not carried out。After communication link or node failure, mutually can not receiving just data, just can find the fault of communication link after a period of time that master and slave node sends valid data, this results in and finds that the time of fault is uncertain at random。
2, only by special diagnostic command or diagnostic device, communication link being detected, these measures are it cannot be guaranteed that diagnose real-time carrying out, and fault can only passively occur, but also add extra operation or extra equipment。
The existence of the problems referred to above makes RS485 bus communication link Shortcomings in high-security applications。
Summary of the invention
For solving the problem that in prior art, RS485 communication bus link can not find when there is fault in real time, the present invention provides a kind of fault monitoring method based on RS485 bus communication link, concrete scheme is as follows: a kind of fault monitoring method based on RS485 bus communication link, it is characterized in that, comprise the steps:
Step 1, sent with each from the host node Diagnosis of Links message of nodal information from node to each by the timing of host node in the data link layer of RS485 bus communication link;
Step 2, respectively receive corresponding host node Diagnosis of Links message from node after send with diagnosing message from nodal information from node link to host node immediately;
Step 3, when host node do not receive within the setting time corresponding from node diagnose message from node link after, namely judge this link or this there is fault from node and carry out indicating fault and fault reports。
It is preferably: wherein host node is independent calculating for each timing from node。
Be preferably: described host node to fault from while node reporting fault information, stop this transmission from node normal data, but do not stop this being sent from the host node Diagnosis of Links message of node, until solving this transmission just carrying out normal data after node failure。
It is preferably: also include actively judging step from node failure: in the time arranging timing receipt host node Diagnosis of Links message from node, from node within the setting time, do not receive host node Diagnosis of Links message time, namely judge that this link or host node exist fault and carry out indicating fault and fault reports。
Be preferably: described host node Diagnosis of Links message include purpose from node address information, send the source address information of diagnosis message, the data type distinguished mutually with normal data formulated according to communications protocol and data check information。
Be preferably: described from node link diagnose message include purpose host node address information, send diagnosis message from node address information, the data type distinguished mutually with normal data formulated according to communications protocol and data check information。
Be preferably: the transmission time of described host node Diagnosis of Links message carries out when link data normal communication and during link idle all in real time, during the link data normal communication of wherein host node host node Diagnosis of Links message in the way of inserting normal data queue with normal data transmission。
It is preferably: described host node Diagnosis of Links message, diagnose message and normal data message from node link and use data type to make a distinction data transmission format。
The present invention utilizes the Diagnosis of Links message distinguished with normal data, and timing is transmitted at host node with between node, and the time according to receiving and feed back judges corresponding failure point, substantially increases the timely discovery rate of fault。The fault detection method of the present invention makes Communication diagnostic to carry out in real time, no matter is that data are transmitted or the network idle stage is all carrying out;Communication failure calls time controlled, from finding that link failure is controlled to reporting links fault time;On transfer bus, each node all can diagnose;Detection process does not need extra diagnostic command or action, it is not necessary to manual operation gets final product diagnosis communication link, it is not required that increase extra hardware device or input。The diagnosis of the present invention does not affect the normal transmission of communication data。
Accompanying drawing explanation
The method flow diagram of Fig. 1 present invention。
Detailed description of the invention
OSI seven layer model definition according to communication, net definitions is physical layer (PhysicalLayer), data link layer (DatalinkLayer), Internet (NetworkLayer), transport layer (TransportLayer), session layer (SessionLayer), represents layer (PresentationLayer), application layer (ApplicationLayer)。The present invention is the purpose reaching real-time diagnosis link, therefore in communications protocol, the data link layer (DatalinkLayer) of master and slave node is carried out respective design, as it is shown in figure 1, the fault monitoring method based on RS485 bus communication link of the present invention, comprise the steps:
101, sent with each from the Diagnosis of Links message of nodal information from node to each by the host node timing in the data link layer of RS485 bus communication link;
In the design of communications protocol link layer, (time of setting can according to link communication speed every the time of setting for major node, the system requirement self-defining to link failure response time, to meet system to link failure response time for principle) send with from the Diagnosis of Links message of node address information to each from node, Diagnosis of Links message can be produced by the automatic trigger link layer of the diagnosis message intervalometer of link layer, not by top level control, intervalometer was timed according to the setting time, will carrying out in real time when being sent in normal data communication and be idle of Diagnosis of Links message, when normal data communication, the diagnosis message intervalometer trigger link layer of link layer produces Diagnosis of Links message, link layer is inserted into Diagnosis of Links message in normal data transfer queue after these frame data transmit。Diagnosis of Links message and normal data message and other command messages use data type to make a distinction in data transmission format;
102, each receive corresponding diagnosis message from node after send with from the Diagnosis of Links message of nodal information to host node immediately;
When normal data communication, packet parsing is being carried out from the link layer of node receive the link packet of host node from node after, find when from the link layer analytic message of node as Diagnosis of Links message, then after these frame data are transmitted, the communication link free time time, the Diagnosis of Links message from node is replied to host node at once from node link layer, and when there is no the normal data transfer free time, receive the Diagnosis of Links message of host node and after link layer resolves from node, reply the Diagnosis of Links message from node to host node at once from node link layer。
103, when host node does not receive corresponding after the Diagnosis of Links message of node within the setting time, namely judge this link or this there is fault from node and carry out indicating fault and fault reports。
Master node link-layer diagnoses from node link and starts this after message and carry out timing from the timer of node (time of setting is according to link communication speed, the system requirement self-defining to link failure response time being sent to certain, to meet system to link failure response time for principle), when master node link-layer does not receive the Diagnosis of Links message from node within the time set, diagnose and there is fault for this from node communication。Now host node communication link layer sends information and informs the upper strata of communications protocol, and is eventually transferred to application layer, and host node system can carry out self-defining action or response according to application;This is no longer carried out normal data transmission by simultaneous communications link layer from node, but the transmission of the diagnosis link packet of this node is not interrupted, until receiving this to proceed the transmission of normal data from the diagnosis link packet of node
In the method for the present invention, wherein host node is independent calculating for each timing from node。It addition, host node to fault from while node reporting fault information, stopping this transmission from node normal data, but do not stop this being sent from the Diagnosis of Links message of node, until solving this transmission just carrying out normal data after node failure。
Present invention additionally comprises and actively judge step from node failure: in the time arranging timing receipt host node Diagnosis of Links message from node, when not receiving the Diagnosis of Links message of host node within the setting time from node, namely judge that this link or host node exist fault and carry out indicating fault and fault reports。
After starting from node, link layer uses the Diagnosis of Links timer from node to carry out timing, and (time of setting is according to link communication speed, the system requirement self-defining to link failure response time, to meet system to link failure response time for principle), the Diagnosis of Links message that or can not receive host node within the time namely set from the link layer of node is overflowed at timer, then there is fault for host node in diagnosis, send information from node communication link layer and inform the upper strata of communications protocol, and it is eventually transferred to application layer, self-defining action or response can be carried out according to application from node system;If do not overflowing the Diagnosis of Links message being previously received host node from the Diagnosis of Links timer of the link layer of node, this timer resets, and re-starts timing diagnosis。
In the present invention Diagnosis of Links message of host node include purpose from node address information, send the source address information of diagnosis message, the data type distinguished mutually with normal data formulated according to communications protocol and data check information。Include purpose host node address information from the Diagnosis of Links message of node, send diagnosis message from node address information, the data type distinguished mutually with normal data formulated according to communications protocol and data check information。Particular content is as follows:
Receive from node after the Diagnosis of Links message of host node and to send with from the Diagnosis of Links message of node address information to host node immediately。In the present invention, the form of host node transmission Diagnosis of Links message is as follows:
| DA | SA | Type | CRC |
Wherein: address for the purpose of DA, namely to diagnose from node address;SA is source address, i.e. host node address;Type data type, it is necessary to set Type according to the Diagnosis of Links message that is established as of communications protocol, as: during normal data transfer, Type value is 0X55AA, and host node Diagnosis of Links message Type value is 0X8855;CRC is data check。
Sending Diagnosis of Links message format from node is:
| DA | SA | Type | CRC |
Wherein: address for the purpose of DA, i.e. host node address;SA is source address, namely from node address;Type data type needs
The Diagnosis of Links message that is established as according to communications protocol sets Type, as: during normal data transfer, Type value is 0X55AA, and diagnosing message Type value from node link is 0XAA88;CRC is data check。
The transmission time of link of the present invention diagnosis message carries out when link data normal communication and during link idle all in real time, during the link data normal communication of wherein host node Diagnosis of Links message in the way of inserting normal data queue with normal data transmission。Diagnosis of Links message and normal data message use data type to make a distinction in data transmission format。
The above is only presently preferred embodiments of the present invention, not the present invention is done any pro forma restriction, although the present invention is disclosed above with preferred embodiment, but it is not limited to the present invention, any technical staff being familiar with this patent is without departing within the scope of technical solution of the present invention, when the technology contents of available above-mentioned prompting is made a little change or is modified to the Equivalent embodiments of equivalent variations, in every case it is the content without departing from technical solution of the present invention, according to any simple modification that above example is made by the technical spirit of the present invention, equivalent variations and modification, all still fall within the scope of the present invention program。
Claims (6)
1. the fault monitoring method based on RS485 bus communication link, it is characterised in that comprise the steps:
Step 1, sent with each from the host node Diagnosis of Links message of nodal information from node to each by the timing of host node in the data link layer of RS485 bus communication link;
Step 2, respectively receive corresponding host node Diagnosis of Links message from node after send with diagnosing message from nodal information from node link to host node immediately;
Step 3, when host node do not receive within the setting time corresponding from node diagnose message from node link after, namely judge this link or this there is fault from node and carry out indicating fault and fault reports;
The transmission time of described host node Diagnosis of Links message carries out when link data normal communication and during link idle all in real time, and during the link data normal communication of wherein host node, host node Diagnosis of Links message sends with normal data in the way of inserting normal data queue;
Described host node Diagnosis of Links message is produced by the automatic trigger link layer of the diagnosis message intervalometer of link layer, and intervalometer was timed according to the setting time;
Described host node to fault from while node reporting fault information, stopping this transmission from node normal data, but do not stop this being sent from the host node Diagnosis of Links message of node, until solving this transmission just carrying out normal data after node failure。
2. fault monitoring method as claimed in claim 1, it is characterised in that wherein host node is independent calculating for each timing from node。
3. fault monitoring method as claimed in claim 1, it is characterized in that, also include actively judging step from node failure: in the time arranging timing receipt host node Diagnosis of Links message from node, from node within the setting time, do not receive host node Diagnosis of Links message time, namely judge that this link or host node exist fault and carry out indicating fault and fault reports。
4. the fault monitoring method as described in any one of claim 1-3, it is characterized in that, described host node Diagnosis of Links message include purpose from node address information, send the source address information of diagnosis message, the data type distinguished mutually with normal data formulated according to communications protocol and data check information。
5. fault monitoring method as claimed in claim 4, it is characterized in that, described from node link diagnose message include purpose host node address information, send diagnosis message from node address information, the data type distinguished mutually with normal data formulated according to communications protocol and data check information。
6. fault monitoring method as claimed in claim 5, it is characterised in that described host node Diagnosis of Links message, diagnose message from node link and normal data message uses data type to make a distinction data transmission format。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210483566.5A CN103023715B (en) | 2012-11-23 | 2012-11-23 | A kind of fault monitoring method based on RS485 bus communication link |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210483566.5A CN103023715B (en) | 2012-11-23 | 2012-11-23 | A kind of fault monitoring method based on RS485 bus communication link |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103023715A CN103023715A (en) | 2013-04-03 |
| CN103023715B true CN103023715B (en) | 2016-06-22 |
Family
ID=47971867
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210483566.5A Active CN103023715B (en) | 2012-11-23 | 2012-11-23 | A kind of fault monitoring method based on RS485 bus communication link |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103023715B (en) |
Families Citing this family (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103475508A (en) * | 2013-08-29 | 2013-12-25 | 东方电气集团东方汽轮机有限公司 | Method for detecting fault points of wind field single-loop communication network |
| CN104954216A (en) * | 2014-03-31 | 2015-09-30 | 奇点新源国际技术开发(北京)有限公司 | 485 bus fault self-processing method and device |
| CN104104542B (en) * | 2014-07-16 | 2017-11-03 | 深圳市海亿达能源科技股份有限公司 | RS 485-based real-time intelligent obstacle removing method |
| CN104166391A (en) * | 2014-08-14 | 2014-11-26 | 成都联星微电子有限公司 | Cooperative multipoint industrial control acquisition fault monitoring system and method |
| CN104378275B (en) * | 2014-11-20 | 2017-10-10 | 中国船舶重工集团公司第七二六研究所 | Daisy chain type annular is without main communication system |
| CN105656656A (en) * | 2014-11-26 | 2016-06-08 | 上海协同科技股份有限公司 | RS485 communication circuit and fault detection method of nodes applying the circuit |
| CN104780064A (en) * | 2015-03-31 | 2015-07-15 | 北京航天发射技术研究所 | Fault detection method of dual-redundancy-channel hot-switching CAN bus |
| CN104866399B (en) * | 2015-04-03 | 2019-07-09 | 张家祺 | UM-BUS bus run Failure Detection Controller and detection method |
| CN106154071B (en) * | 2015-04-08 | 2018-12-11 | 国网安徽省电力公司 | A kind of device and method detecting intelligent electric energy meter RS485 bus failure |
| CN106162707A (en) * | 2015-04-10 | 2016-11-23 | 富士通株式会社 | The monitoring method of aggregation node state, device and system |
| CN105099506A (en) * | 2015-08-21 | 2015-11-25 | 江阴长仪集团有限公司 | Electric energy meter RS485 communication failure detecting and self-healing device and method |
| CN106254196A (en) * | 2016-08-31 | 2016-12-21 | 四川新环佳科技发展有限公司 | CAN safety monitoring method |
| CN107766200A (en) * | 2017-09-22 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of I2C monitoring bus system and monitoring method |
| CN109840235B (en) * | 2017-11-27 | 2023-06-23 | 中国航空工业集团公司西安航空计算技术研究所 | Method for receiving data of RS422 bus of airborne computer |
| CN110430107A (en) * | 2019-07-29 | 2019-11-08 | 珠海格力电器股份有限公司 | Communication reply rate display method and device |
| CN112566307B (en) * | 2019-09-10 | 2022-11-04 | 酷矽半导体科技(上海)有限公司 | Safety display system and safety display method |
| CN112241157A (en) * | 2020-09-04 | 2021-01-19 | 北京新能源汽车技术创新中心有限公司 | Loopback testing device and method for diagnosing communication link fault of vehicle central gateway |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217402A (en) * | 2008-01-15 | 2008-07-09 | 杭州华三通信技术有限公司 | A method to enhance the reliability of the cluster and a high reliability communication node |
| CN102752194A (en) * | 2012-06-12 | 2012-10-24 | 黄程云 | Frame structure-based forwarding method and RS-485 bus hub |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7861110B2 (en) * | 2008-04-30 | 2010-12-28 | Egenera, Inc. | System, method, and adapter for creating fault-tolerant communication busses from standard components |
-
2012
- 2012-11-23 CN CN201210483566.5A patent/CN103023715B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217402A (en) * | 2008-01-15 | 2008-07-09 | 杭州华三通信技术有限公司 | A method to enhance the reliability of the cluster and a high reliability communication node |
| CN102752194A (en) * | 2012-06-12 | 2012-10-24 | 黄程云 | Frame structure-based forwarding method and RS-485 bus hub |
Non-Patent Citations (1)
| Title |
|---|
| 基于RS485总线的网络控制通讯软件设计及应用;曹志凯等;《计算机工程与应用》;20021231;正文第1-4部分 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103023715A (en) | 2013-04-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103023715B (en) | A kind of fault monitoring method based on RS485 bus communication link | |
| CN103516571B (en) | A kind of dual CAN bus ensures system architecture and the method thereof of data communication reliability | |
| CN102664719B (en) | Distributed secure transmission method applied to distributed control system (DCS) | |
| CN101783759B (en) | A bus error recovery processing method | |
| CN105354159A (en) | RS485 distributed bus system based control method | |
| CN106452870A (en) | Redundancy control method for primary device of CANopen network | |
| CN102970157A (en) | Link failure processing method, intelligent resilient framework (IRF) member device and data communication device | |
| CN104753749B (en) | A kind of multi-host communication method and communication system | |
| CN104052579A (en) | Automatic MODBUS-RTU communication baud rate matching method | |
| CN105183687B (en) | A kind of timesharing serial port communication method and system | |
| CN107567107A (en) | A kind of method and device for transmitting data | |
| CN105553685B (en) | A kind of system and method whether the monitoring network equipment is online | |
| CN103067237B (en) | Electric bag or sack cleaner based on CAN communication agreement control system and communication adjustment method | |
| CN106100955A (en) | A kind of industry internet field layer wideband bus data depth detection implementation method | |
| CN103997436A (en) | Link maintaining method and gateway in internet of things of elevator | |
| CN101547526A (en) | Fault handling method, wireless device and communication system | |
| CN102263683B (en) | Secure communication method for double loop field bus in numerical control system | |
| CN104300681B (en) | A kind of station level device node state monitoring method of intelligent substation | |
| CN106713012A (en) | Communication anomaly detection method and apparatus | |
| CN104243189B (en) | A kind of more equipment communication means and its communication system based on same channel | |
| CN102043397A (en) | Network communication method for building automation system | |
| CN112929329B (en) | A kind of cluster control system based on Ethernet/IP protocol and its communication method | |
| CN210609160U (en) | Power tunnel monitoring RS485 bus multi-host communication device | |
| CN103391223A (en) | Rapid automatic detection method of IEC101 (international electrotechnical commission 101) protocol messages | |
| CN115866079A (en) | Device for realizing CAN-Ethernet XCP gateway |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C53 | Correction of patent for invention or patent application | ||
| CB02 | Change of applicant information |
Address after: 100094 Yongfeng Road, Beijing, No., building 5, building 5 Applicant after: Beijing Guangli Nuclear Power Co., Ltd. Applicant after: China General Nuclear Power Corporation Address before: 100094 Yongfeng Road, Beijing, No., building 5, building 5 Applicant before: Beijing Guangli Nuclear Power Co., Ltd. Applicant before: China Guangdong Nuclear Power Group Co., Ltd. |
|
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |