CN104301179A - Sensor data transmission system fault monitoring method based on Ethernet - Google Patents

Sensor data transmission system fault monitoring method based on Ethernet Download PDF

Info

Publication number
CN104301179A
CN104301179A CN201410542675.9A CN201410542675A CN104301179A CN 104301179 A CN104301179 A CN 104301179A CN 201410542675 A CN201410542675 A CN 201410542675A CN 104301179 A CN104301179 A CN 104301179A
Authority
CN
China
Prior art keywords
data
host computer
controller
data transmission
trap
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
CN201410542675.9A
Other languages
Chinese (zh)
Other versions
CN104301179B (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.)
Donghua University
Original Assignee
Donghua University
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 Donghua University filed Critical Donghua University
Priority to CN201410542675.9A priority Critical patent/CN104301179B/en
Publication of CN104301179A publication Critical patent/CN104301179A/en
Application granted granted Critical
Publication of CN104301179B publication Critical patent/CN104301179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a sensor data transmission fault monitoring method, in particular to a sensor data transmission system fault monitoring method based on the Ethernet. An upper computer judges a transmission fault in five stages in a transmission cycle. A trap routine is designed in the upper computer to judge whether the upper computer establishes connection with a server or not; the upper computer detects whether the pulsating range of data is too wide before sending data to a PLC; a software watchdog program is designed in the PLC, the data transmission fault is monitored, and fault tolerance design is performed on the data transmission fault in terms of time. Through the method, the data transmission fault can be detected effectively in time, and the data transmission reliability is greatly improved.

Description

Based on the sensing data transmission system failure monitoring method of Ethernet
Technical field
The present invention relates to a kind of sensing data transmission fault method for supervising, particularly relate to the sensing data transmission system failure monitoring method based on Ethernet, be applicable to the monitoring to data transmission failure between host computer and many data acquisition modules and PLC in Complex Industrial Systems.
Background technology
In the Data acquisition and transmit system be made up of host computer, data acquisition module and PLC, host computer, based on Ethernet ICP/IP protocol, adopts response mode, reads the data in data acquisition module or PLC A/D module, sends PLC to after carrying out data processing.In data transmission procedure, there is a lot of contingent fault.Generally, judge that transfer of data is whether normal according to the return code of slave computer, but connect the extreme case such as to go wrong, slave computer communication module breaks down at netting twine under, host computer just can not receive return code.The reliability of sensing data transmission is also not only embodied in after can host computer read data in data acquisition module or PLC A/D module, process and re-sends in the controllers such as PLC, also will consider that can transmit data truly reflect the physical signalling that transducer detects.If the power supply of transducer is unstable or the data distortion that strong electromagnetic etc. can cause data acquisition module etc. to collect accidentally appears in scene.In order to the fail safe of system, sensing data transmission state should be informed PLC by host computer, so that PLC takes counter-measure, if but transfer of data between host computer and PLC is out of joint, and fault just cannot be informed PLC by host computer.
Summary of the invention
The object of this invention is to provide the sensing data transmission system failure monitoring method based on Ethernet, the method takes counter-measure for the various faults that may occur in data transmission procedure, monitoring data transmission fault, improves the reliability of transfer of data.
In order to achieve the above object, technical scheme of the present invention there is provided a kind of sensing data transmission system failure monitoring method based on Ethernet, this sensing data transmission system comprises the host computer as client computer, host computer reads as the data in the data acquisition module of server or A/D module, the controller as server is re-send to after process, it is characterized in that, take triple surveillance and control measure: connect fault for each server, in host computer, design trap routine judge whether host computer connects with each server; For data distortion fault, in host computer, design detects data and beats whether range program to detect host computer data streams read scope of beating excessive, judges data whether distortion; For data transmission failure, design house dog program in the controller, monitoring data transmission state, in a transmission cycle, is embodied as:
Read in each server data process at host computer, successively: judge whether host computer connects with each server, whether reads the data of each server designated space by the trap routine designed in host computer; The threshold value whether host computer data streams read scope of beating exceed setting is detected by the detection data designed in host computer range program of beating; Send in data procedures at host computer to controller, successively: judge whether host computer connects with controller by the trap routine designed in host computer; Host computer is judged whether to the designated space write data of controller by the house dog program designed in controller.
Preferably, the specific implementation step of described trap routine is:
Define the Socket socket corresponding to connecting each server process and trap tag, at the last sentence of connection server statement, trap tag is set to state A, trap tag is set to state B by latter one at connection server statement; In trap routine implementation, if connection server success, then, after executing connection server statement, trap tag will be set to state B; If connection server is unsuccessful, then connection server statement can not normally perform, and trap tag then remains state A, and jumps to trap dispose part, and in trap handler, if trap tag is state A, then exporting can not connection server failure warning.
Preferably, in host computer, detect the concrete steps whether its data streams read scope of beating exceed setting threshold is:
Sampled value after current read data filtering is compared with last filter value, when detect higher than setting ratio the filtered sampled value of current data away from last filter value time, then decision data scope of beating is excessive, has occurred the faults such as the unstable or electromagnetic interference of power supply; Host computer, once detect that data scope of beating is excessive, just stops sending data to controller, abandons the sampled value after current read data filtering, export warning, and again read data.
Preferably, the specific implementation step of described house dog program is:
Select a register in controller data holding register district as status register, host computer sends in data procedures to controller, the data of a multi-embedding word are sent to status register in a data frame, this status register alternately changes between two different states, according to two different states, start two timers respectively, the timing of timer is greater than the cycle of a transfer of data; In transfer of data under normal circumstances, the state of status register alternately changes, and two timers also will alternately be started and stop thereupon, and the timing due to timer is greater than the cycle of a transfer of data, and two timers can not arrive its timing; If the timing of any one timer arrives, all the state for extended periods of description status register does not change, and controller does not receive data from host computer for a long time, can judge that transfer of data breaks down, a transfer of data fault flag connected by controller, and carries out corresponding actions.In the timing of timer, the state of status register changes, and controller still normally works, and ensures that controller has fault-tolerance to data transmission failure in time.
The present invention adopts the advantage of above technical scheme to be:
(1) according to designed data transmission failure monitoring main program flow, host computer complete monitoring data transmission state can be ensured.
(2) arrange trap routine for connection server process, according to trap tag state, can judge can not connection server fault export warning.Owing to being provided with trap tag respectively for each server process of connection, when occurring connecting fault, program accurately can be located connection fault.
(3) before host computer sends data to controller, detect the scope of beating of host computer data streams read, once data are beated, scope is excessive, just stops sending data to controller, avoids controller to carry out malfunction according to misdata and causes a serious accident.
(4) design of software watchdog program in controller, ensure that the identification of controller to data transmission failure, and has fault-tolerance to data transmission failure in time, avoid each data transmission failure controller and all will shut down.
(5) employing of triple surveillance and control measure, can detect data transmission failure timely and effectively, substantially increases the reliability of transfer of data.
Accompanying drawing explanation
Fig. 1 is system global structure figure of the present invention;
Fig. 2 is data transmission failure monitoring main program flow chart;
Fig. 3 is house dog programming ladder diagram.
Embodiment
For making the present invention become apparent, hereby with preferred embodiment, and accompanying drawing is coordinated to be described in detail below.
As shown in Figure 1, the data in the A/D module that controller such as host computer reading data acquisition module or PLC etc. carries, re-send in the controllers such as PLC after process system global structure of the present invention.
As shown in Figure 2, host computer is in a transmission cycle, and a point double teacher judges transmission fault for data transmission failure monitoring main program flow.Read in data procedures, first judge whether host computer is successfully connected with each data acquisition module and PLC, next judges whether the data reading designated space; After data processing, judge that whether data scope of beating is normal; Send in data procedures, first judge whether host computer connects with PLC, next judges whether to designated space write data.Find fault in any stage, host computer all exports warning, and turns back to initial position and again read data.
Under VB environment, design trap routine, first define and be connected the corresponding Socket socket of each server (comprising data acquisition module and PLC) process and trap tag, then socket connection server statement Connect (" IP address ", port numbers) last sentence trap tag is arranged a state, as set to 0, then trap tag is modified as another state, as put 1 by latter one of then connection server statement.In program process, if connection server success, after executing connection server statement, trap tag will be set to 1; If connection server is unsuccessful, connection server statement can not normally perform, and trap tag is put 1 statement and can not be performed, and trap tag state will remain 0.On Error GoTo statement is used at program the beginning part, occurring in program process can not connection server mistake, and program will jump to the trap dispose part of specifying, in trap handler, according to trap tag state, output can not connection server failure warning.Arrange trap tag respectively for each server process of connection, when occurring connecting fault, program accurately can be located connection fault.
Power supply shakiness or electromagnetic interference can make multiple sensing data distortion simultaneously, detect data and beat range program according to this feature detection.The data processing of main program comprises data filtering, sampled value after current read data filtering is compared with last filter value, when detect higher than 70% the filtered sampled value of current data away from last filter value time, decision data scope of beating is excessive, has occurred the faults such as the unstable or electromagnetic interference of power supply.Host computer, once detect that data scope of beating is excessive, just stops sending data to PLC, abandons the sampled value after current read data filtering, export warning, and turns back to main program initial position and again read data.
As shown in Figure 3, select a register in plc data holding register district as status register, selected D1 in figure 3, its state is as the logical condition of PLC identification data transmission fault for software watchdog programming ladder diagram.Host computer sends in data procedures to PLC, and the data of a multi-embedding word are sent to status register selected in PLC in a data frame, alternately change the state of this register, such as, replace transmission 0000 and FFFF.PLC is according to two different states, and start two timers respectively, the timing of timer is greater than the cycle of a transfer of data.Under normal circumstances, the state of this status register alternately changes transfer of data, and two timers also will alternately be started and stop thereupon, and the timing due to timer is greater than the cycle of a transfer of data, and two timers can not arrive its timing.Any one timer arrives, all the state for extended periods of description status register does not change, and PLC does not receive data from host computer for a long time, can judge that transfer of data breaks down, PLC connects a transfer of data fault flag, and carries out corresponding actions.In the timing of timer, the state of status register is changed; even if there is data transmission failure in this process; PLC also can not carry out corresponding actions; but normally work; ensure that PLC has fault-tolerance to data transmission failure in time, avoid each data transmission failure PLC all will shut down.

Claims (4)

1. the sensing data transmission system failure monitoring method based on Ethernet, this sensing data transmission system comprises the host computer as client computer, host computer reads as the data in the data acquisition module of server or A/D module, the controller as server is re-send to after process, it is characterized in that, take triple surveillance and control measure: connect fault for each server, in host computer, design trap routine judge whether host computer connects with each server; For data distortion fault, in host computer, design detects data and beats whether range program to detect host computer data streams read scope of beating excessive, judges data whether distortion; For data transmission failure, design house dog program in the controller, monitoring data transmission state, in a transmission cycle, is embodied as:
Read in each server data process at host computer, successively: judge whether host computer connects with each server, whether reads the data of each server designated space by the trap routine designed in host computer; The threshold value whether host computer data streams read scope of beating exceed setting is detected by the detection data designed in host computer range program of beating; Send in data procedures at host computer to controller, successively: judge whether host computer connects with controller by the trap routine designed in host computer; Host computer is judged whether to the designated space write data of controller by the house dog program designed in controller.
2. a kind of sensing data transmission system failure monitoring method based on Ethernet as claimed in claim 1, it is characterized in that, the specific implementation step of described trap routine is:
Define the Socket socket corresponding to connecting each server process and trap tag, at the last sentence of connection server statement, trap tag is set to state A, trap tag is set to state B by latter one at connection server statement; In trap routine implementation, if connection server success, then, after executing connection server statement, trap tag will be set to state B; If connection server is unsuccessful, then connection server statement can not normally perform, and trap tag then remains state A, and jumps to trap dispose part, and in trap handler, if trap tag is state A, then exporting can not connection server failure warning.
3. a kind of sensing data transmission system failure monitoring method based on Ethernet as claimed in claim 1, is characterized in that, detects the concrete steps whether its data streams read scope of beating exceed setting threshold to be in host computer:
Sampled value after current read data filtering is compared with last filter value, when detect higher than setting ratio the filtered sampled value of current data away from last filter value time, then decision data scope of beating is excessive, has occurred the faults such as the unstable or electromagnetic interference of power supply; Host computer, once detect that data scope of beating is excessive, just stops sending data to controller, abandons the sampled value after current read data filtering, export warning, and again read data.
4. a kind of sensing data transmission system failure monitoring method based on Ethernet as claimed in claim 1, it is characterized in that, the specific implementation step of described house dog program is:
Select a register in controller data holding register district as status register, host computer sends in data procedures to controller, the data of a multi-embedding word are sent to status register in a data frame, this status register alternately changes between two different states, according to two different states, start two timers respectively, the timing of timer is greater than the cycle of a transfer of data; In transfer of data under normal circumstances, the state of status register alternately changes, and two timers also will alternately be started and stop thereupon, and the timing due to timer is greater than the cycle of a transfer of data, and two timers can not arrive its timing; If the timing of any one timer arrives, all the state for extended periods of description status register does not change, and controller does not receive data from host computer for a long time, can judge that transfer of data breaks down, a transfer of data fault flag connected by controller, and carries out corresponding actions.In the timing of timer, the state of status register changes, and controller still normally works, and ensures that controller has fault-tolerance to data transmission failure in time.
CN201410542675.9A 2014-10-15 2014-10-15 Sensor data transmission system failure monitoring method based on Ethernet Active CN104301179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410542675.9A CN104301179B (en) 2014-10-15 2014-10-15 Sensor data transmission system failure monitoring method based on Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410542675.9A CN104301179B (en) 2014-10-15 2014-10-15 Sensor data transmission system failure monitoring method based on Ethernet

Publications (2)

Publication Number Publication Date
CN104301179A true CN104301179A (en) 2015-01-21
CN104301179B CN104301179B (en) 2017-12-22

Family

ID=52320757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410542675.9A Active CN104301179B (en) 2014-10-15 2014-10-15 Sensor data transmission system failure monitoring method based on Ethernet

Country Status (1)

Country Link
CN (1) CN104301179B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130056A (en) * 2020-01-02 2020-05-08 天地(常州)自动化股份有限公司 Monitoring method and device
CN111865707A (en) * 2019-04-27 2020-10-30 北京初速度科技有限公司 Method and device for monitoring transmission time sequence of sensor data
CN112415168A (en) * 2020-12-31 2021-02-26 深圳万知达科技有限公司 Water quality monitoring management system based on internet

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060114660A (en) * 2005-05-02 2006-11-07 엘지전자 주식회사 System and method for scheduling device management
CN101105690A (en) * 2007-07-26 2008-01-16 武汉理工大学 Multiple sensor integrated method for city long tunnel monitoring system
CN101371243A (en) * 2006-01-23 2009-02-18 Lg电子株式会社 Performing scheduled device management
CN102375437A (en) * 2010-08-06 2012-03-14 欧阳光明 Device and method for data acquisition and transmission during wireless production process based on IEEE802.15.4 protocol and PLCs (programmable logic controllers)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060114660A (en) * 2005-05-02 2006-11-07 엘지전자 주식회사 System and method for scheduling device management
CN101371243A (en) * 2006-01-23 2009-02-18 Lg电子株式会社 Performing scheduled device management
CN101105690A (en) * 2007-07-26 2008-01-16 武汉理工大学 Multiple sensor integrated method for city long tunnel monitoring system
CN102375437A (en) * 2010-08-06 2012-03-14 欧阳光明 Device and method for data acquisition and transmission during wireless production process based on IEEE802.15.4 protocol and PLCs (programmable logic controllers)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865707A (en) * 2019-04-27 2020-10-30 北京初速度科技有限公司 Method and device for monitoring transmission time sequence of sensor data
CN111865707B (en) * 2019-04-27 2022-03-18 北京初速度科技有限公司 Method and device for monitoring transmission time sequence of sensor data
CN111130056A (en) * 2020-01-02 2020-05-08 天地(常州)自动化股份有限公司 Monitoring method and device
CN111130056B (en) * 2020-01-02 2022-03-01 天地(常州)自动化股份有限公司 Monitoring method and device
CN112415168A (en) * 2020-12-31 2021-02-26 深圳万知达科技有限公司 Water quality monitoring management system based on internet

Also Published As

Publication number Publication date
CN104301179B (en) 2017-12-22

Similar Documents

Publication Publication Date Title
CN107390511A (en) For the method for the automated system for running redundancy
CN105103061B (en) The method of control and data transmission set, processing unit and the process control for redundancy with dispersion redundancy
US9874869B2 (en) Information controller, information control system, and information control method
CN101807076B (en) Duplication redundancy fault-tolerant high-reliability control system having synergistic warm standby function based on PROFIBUS field bus
JP6772531B2 (en) Control systems, control methods, control programs, and recording media
CN104570721B (en) Redundant manipulator master slave mode determines method
CN103064382A (en) Optical proximity correction (OPC) embedded-type remote data collecting system and method based on ARM framework
US11016463B2 (en) Control and data-transfer system, gateway module, I/O module, and method for process control
US20160352565A1 (en) Measurement system having a plurality of sensors
CN102055633A (en) Satellite-borne double-CAN (Controller Area Network) bus node failure self-restoration system
CN107957692B (en) Controller redundancy method, device and system
CN103592880A (en) Intelligent controller system for large engineering equipment
CN102130784A (en) Communication error monitoring system of power device based on Ethernet and method thereof
EP3355144B1 (en) Collection, extraction and display of error event logs from a plurality of devices of a control system
CN104468176A (en) Method and apparatus for fault detection in a controller area network
JP2017151496A (en) Safety monitoring device, network system, and safety monitoring method
CN107544366B (en) Method for collecting and processing signals of redundant sensors in automatic control system
CN104135398B (en) Bus based on intelligent RS485 hubs locks detection method
CN104301179A (en) Sensor data transmission system fault monitoring method based on Ethernet
KR101178186B1 (en) Method of alarming abnormal situation of plc based manufacturing system using plc signal pattern in pc based system
CN105652726A (en) Robot safety control apparatus
CN106351743A (en) Method and device for detecting reverse connection of double-ECU (double electronic control units) engine timing signal sensors
JP6939085B2 (en) Communication equipment and communication system
CN202421854U (en) Triplex level redundancy switching value output module for DCS (data communication system)
CN109634175B (en) Method and system for controlling dynamic verification of configuration program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220127

Address after: 223010 No. 2, chaimi Road, Huai'an Economic and Technological Development Zone, Huai'an City, Jiangsu Province

Patentee after: Jiangsu Gaolu composite material Co.,Ltd.

Address before: 201620 No. 2999 North Renmin Road, Shanghai, Songjiang District

Patentee before: DONGHUA University

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230629

Address after: 200051 No. 1882, Changning District, Shanghai, West Yan'an Road

Patentee after: DONGHUA University

Address before: 223010 No. 2, chaimi Road, Huai'an Economic and Technological Development Zone, Huai'an City, Jiangsu Province

Patentee before: Jiangsu Gaolu composite material Co.,Ltd.

TR01 Transfer of patent right