CN104301179B - Sensor data transmission system failure monitoring method based on Ethernet - Google Patents

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

Info

Publication number
CN104301179B
CN104301179B CN201410542675.9A CN201410542675A CN104301179B CN 104301179 B CN104301179 B CN 104301179B CN 201410542675 A CN201410542675 A CN 201410542675A CN 104301179 B CN104301179 B CN 104301179B
Authority
CN
China
Prior art keywords
data
host computer
trap
controller
server
Prior art date
Application number
CN201410542675.9A
Other languages
Chinese (zh)
Other versions
CN104301179A (en
Inventor
孙以泽
卢伟
孟婥
朱荷蕾
李培兴
Original Assignee
东华大学
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 东华大学 filed Critical 东华大学
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

Links

Abstract

The present invention relates to sensor data transmission failure monitoring method, more particularly to the sensor data transmission system failure monitoring method based on Ethernet.For host computer in a transmission cycle, point five stages judge transmission fault.Trap routine is devised in host computer and judges whether host computer connects with the foundation of each server;Whether host computer detects data beating scope before data are sent to PLC excessive;The design software house dog program in PLC, monitoring data transmission failure, and fault-tolerance design is carried out in time to data transmission failure.This method can timely and effectively detect data transmission failure, substantially increase the reliability of data transfer.

Description

Sensor data transmission system failure monitoring method based on Ethernet

Technical field

The present invention relates to a kind of sensor data transmission failure monitoring method, more particularly to the sensor based on Ethernet Data transmission system failure monitoring method, host computer and multi-data acquisition module and PLC are controlled suitable for Complex Industrial Systems The monitoring of data transmission failure between device processed.

Background technology

In the data acquisition and Transmission system being made up of host computer, data acquisition module and PLC, host computer is based on ether Net ICP/IP protocol, using response mode, the data in data acquisition module or PLC A/D modules are read, carry out data processing After send PLC to.In data transmission procedure, the failure that may much occur be present.Generally, according to the return of slave computer Code judge whether data transfer normal, but netting twine connection go wrong, slave computer communication module failure etc. extreme case Under, host computer just can not receive return code.Can the reliability of sensor data transmission is also not only embodied in host computer read data Acquisition module or data in PLC A/D modules, re-send to after processing in the controllers such as PLC, it is also contemplated that the number transmitted The physical signalling detected according to can truly reflect sensor.If the power supply of sensor it is unstable or it is live accidentally occur Strong electromagnetic etc. can result in the data distortion that data acquisition module etc. collects.For the security of system, host computer Sensor data transmission state should be informed PLC, so that PLC takes counter-measure, but if the number between host computer and PLC Out of joint according to transmitting, failure can not just be informed PLC by host computer.

The content of the invention

It is an object of the invention to provide the sensor data transmission system failure monitoring method based on Ethernet, this method pin The various failures being likely to occur in data transmission procedure are taken with counter-measure, monitoring data transmission failure, improves data transfer Reliability.

In order to achieve the above object, passed the technical scheme is that providing a kind of sensing data based on Ethernet Defeated system failure monitoring method, the sensor data transmission system include the host computer as client computer, and host computer reads conduct Data in the data acquisition module or A/D modules of server, re-send to the controller as server, its feature after processing It is, takes triple surveillance and control measures:For each server connecting fault, design trap routine judges that host computer is in host computer No established with each server connects;For data distortion failure, the design detection data beating scope Programmable detection in host computer Whether host computer data streams read beating scope excessive, judge data whether distortion;For data transmission failure, in the controller House dog program is designed, monitoring data transmission state, in a transmission cycle, is embodied as:

During host computer reads each server data, successively:On being judged by the trap routine that is designed in host computer Whether position machine is established with each server connects, if reads the data of each server designated space;Pass through what is designed in host computer Detect the threshold value whether data beating scope Programmable detection host computer data streams read beating scope exceedes setting;Host computer to Controller is sent in data procedures, successively:Judge whether host computer is built with controller by the trap routine designed in host computer Vertical connection;By the house dog program designed in controller judge host computer whether to controller designated space write data.

Preferably, the specific implementation step of the trap routine is:

Definition Socket sockets corresponding with connecting each server process and trap tag, in connection server sentence Trap tag is arranged to state A by previous sentence, and trap tag is arranged into state B in the latter sentence of connection server sentence; In trap routine implementation procedure, if connection server success, after having performed connection server sentence, trap tag will be set to For state B;If connection server is unsuccessful, connection server sentence can not be performed normally, and trap tag then remains shape State A, and trap process part is jumped to, in trap handler, if trap tag is state A, output can not connect clothes Business device failure warning.

Preferably, the specific steps whether its data streams read beating scope exceedes given threshold are detected in host computer For:

By the sampled value after currently-read data filtering compared with the filter value of last time, it is higher than setting when detecting When the filtered sampled value of current data of ratio is away from last filter value, then judge that data beating scope is excessive, occurs The failure such as power supply shakiness or electromagnetic interference;Host computer once detects that data beating scope is excessive, just stops sending to controller Data, the sampled value after currently-read data filtering, output warning are abandoned, and re-read data.

Preferably, the specific implementation step of the house dog program is:

From a register in controller data holding register area as status register, host computer is to controller Send in data procedures, the data of a multi-embedding word are sent to status register in a data frame, and the status register is two Alternate change between individual different state, according to two different states, two timers, the timing of timer is respectively started More than the cycle of a data transfer;In data transfer under normal circumstances, the state alternate change of status register, two timings Device also alternately will be started and be stopped therewith, and because the timing of timer is more than the cycle of a data transfer, two fixed When device will not reach its timing;If the timing of any one timer arrives, all illustrate the state length of status register Time does not change, and controller does not receive data from host computer for a long time, you can judges that data transfer breaks down, control Device connects a data transmission failure flag bit, and carries out corresponding actions.The status register in the timing of timer State change, controller still normal work, ensure that controller has fault-tolerance to data transmission failure in time.

Present invention the advantages of using above technical scheme for:

(1) main program flow is monitored according to designed data transmission failure, it is ensured that host computer complete monitoring data Transmission state.

(2) trap routine is set for connection server process, according to trap tag state, can determine whether out that clothes can not be connected Business device failure simultaneously exports warning.Due to being respectively provided with trap tag for connecting each server process, when there is connecting fault When, program can be accurately positioned to connecting fault.

(3) before host computer sends data to controller, the beating scope of host computer data streams read is detected, once data are jumped Dynamic scope is excessive, just stops sending data to controller, avoids controller from being caused according to wrong data progress malfunction great Accident.

(4) in controller software watchdog program design, it is ensured that identification of the controller to data transmission failure, and There is fault-tolerance to data transmission failure on time, avoiding each data transmission failure controller will shut down.

(5) use of triple surveillance and control measures, data transmission failure can be timely and effectively detected, substantially increases data The reliability of transmission.

Brief description of the drawings

Fig. 1 is the system global structure figure of the present invention;

Fig. 2 is that data transmission failure monitors main program flow chart;

Fig. 3 is house dog program ladder diagram.

Embodiment

To become apparent the present invention, hereby with preferred embodiment, and accompanying drawing is coordinated to be described in detail below.

The system global structure of the present invention is as shown in figure 1, the host computer reading controller such as data acquisition module or PLC carries A/D modules in data, re-send to after processing in the controllers such as PLC.

Data transmission failure monitoring main program flow is as shown in Fig. 2 host computer in a transmission cycle, divides five stages Judge transmission fault.Read in data procedures, first determine whether host computer is successfully connected with each data acquisition module and PLC, Next judges whether the data for reading designated space;After data processing, judge whether data beating scope is normal;Send data mistake Cheng Zhong, first determine whether host computer is established with PLC and connect, next judges whether to write data to designated space.In any rank Duan Faxian failures, host computer all export warning, and return to initial position and re-read data.

Under VB environment, trap routine is designed, definition is with being connected each server (including data acquisition module and PLC) first The corresponding Socket sockets of process and trap tag, then socket connection server sentence Connect (" IP address ", end Slogan) previous sentence trap tag is set into a state, such as set to 0, followed by connection server sentence latter sentence by trap Mark is modified as another state, such as puts 1.In program process, if connection server success, has performed connection server After sentence, trap tag will be set to 1;If connection server is unsuccessful, connection server sentence can not be performed normally, trap mark Will is put 1 sentence and will not be performed, and trap tag state will stay in that 0.On Error GoTo languages are used in program the beginning part , connection server mistake is unable in program process, program will jump to the trap process part specified, in trap In processing routine, according to trap tag state, output is unable to connection server failure warning.For connecting each server process point Trap tag is not set, when there is connecting fault, program can be accurately positioned to connecting fault.

Power supply is unstable or electromagnetic interference can make multiple sensing data distortions simultaneously, detects data beating scope program foundation This feature detection.The data processing of main program includes data filtering, by the sampled value after currently-read data filtering with Last filter value compares, when detecting the filtered sampled value of current data higher than 70% away from last filter value When, judge that data beating scope is excessive, the failures such as power supply shakiness or electromagnetic interference occur.Host computer once detects that data are jumped Dynamic scope is excessive, just stops sending data to PLC, abandons the sampled value after currently-read data filtering, and output warns, and Return to main program initial position and re-read data.

Software watchdog programming ladder diagram from a register in plc data holding register area as shown in figure 3, made For status register, D1 has been selected in figure 3, logical condition of its state as PLC identification data transmission faults.Host computer to PLC is sent in data procedures, and the data of a multi-embedding word are sent to status register selected in PLC in a data frame, The state of the alternate change register, such as alternately send 0000 and FFFF.PLC is respectively started according to two different states Two timers, the timing of timer are more than the cycle of a data transfer.Data transfer under normal circumstances, post by the state The state alternate change of storage, two timers also alternately will be started and be stopped therewith, because the timing of timer is big In the cycle of a data transfer, two timers will not reach its timing.Any one timer timing arrives, all Illustrate that the state for extended periods of status register does not change, PLC does not receive data from host computer for a long time, you can judges number Broken down according to transmission, PLC connects a data transmission failure flag bit, and carries out corresponding actions.In the timing of timer The state of interior status register is changed, even if occurring data transmission failure in this process, PLC will not also carry out phase It should act, but normal work, ensure that PLC has fault-tolerance to data transmission failure in time, avoid each data transfer Failure PLC will be shut down.

Claims (1)

1. a kind of sensor data transmission system failure monitoring method based on Ethernet, the sensor data transmission system include As the host computer of client computer, host computer is read as the data in the data acquisition module or A/D modules of server, after processing Re-send to the controller as server, it is characterised in that take triple surveillance and control measures:For each server connecting fault, Trap routine is designed in host computer and judges whether host computer connects with the foundation of each server;For data distortion failure, upper Whether design detection data beating scope Programmable detection host computer data streams read beating scope is excessive in the machine of position, judges that data are No distortion;For data transmission failure, house dog program, monitoring data transmission state, in a transmission are designed in the controller In cycle, it is embodied as:
During host computer reads each server data, successively:Host computer is judged by the trap routine designed in host computer Whether establish and connect with each server, if read the data of each server designated space;Pass through the detection designed in host computer Whether data beating scope Programmable detection host computer data streams read beating scope exceedes the threshold value of setting;In host computer to control Device is sent in data procedures, successively:Judge whether host computer is established with controller by the trap routine designed in host computer to connect Connect;By the house dog program designed in controller judge host computer whether to controller designated space write data;
The specific implementation step of the trap routine is:
Definition Socket sockets corresponding with connecting each server process and trap tag, in the previous of connection server sentence Trap tag is arranged to state A by sentence, and trap tag is arranged into state B in the latter sentence of connection server sentence;In trap In program process, if connection server success, after having performed connection server sentence, trap tag will be set to shape State B;If connection server is unsuccessful, connection server sentence can not be performed normally, and trap tag then remains state A, And trap process part is jumped to, in trap handler, if trap tag is state A, output is unable to connection server Failure warning;
The specific implementation step of the house dog program is:
Sent from a register in controller data holding register area as status register, host computer to controller In data procedures, the data of a multi-embedding word are sent to status register in a data frame, the status register at two not Alternate change between same state, according to two different states, is respectively started two timers, the timing of timer is more than The cycle of one data transfer;In data transfer under normal circumstances, the state alternate change of status register, two timers Alternately it will be started and be stopped therewith, because the timing of timer is more than the cycle of a data transfer, two timers Its timing will not be reached;If the timing of any one timer arrives, all illustrate the state for extended periods of status register Do not change, controller does not receive data from host computer for a long time, you can judge that data transfer breaks down, controller connects Lead to a data transmission failure flag bit, and carry out corresponding actions, the state of status register in the timing of timer Change, controller still normal work, ensure 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 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 CN104301179A (en) 2015-01-21
CN104301179B true CN104301179B (en) 2017-12-22

Family

ID=52320757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410542675.9A 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)

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)

Also Published As

Publication number Publication date
CN104301179A (en) 2015-01-21

Similar Documents

Publication Publication Date Title
TWI229796B (en) Method and system to implement a system event log for system manageability
JP4307776B2 (en) Safety network for industrial controllers with reduced bandwidth requirements
CN102158527B (en) Household electrical appliance maintenance system and household electrical appliance with self-checking function
EP1573407B1 (en) Method to increase the safety integrity level of a control system
CN104345717B (en) Intelligent remote data acquisition system based on Internet of Things
EP1477952B1 (en) Data transmission method for a multiprotocol handheld field maintenance tool
JP2010258990A (en) Control system and control program updating method
WO2003079125A2 (en) Hand held diagnostic and communication device with automatic bus detection
CN1704763A (en) Electronic device diagnostic methods and systems
CN105700491A (en) Input module for an industrial controller
JP5348489B2 (en) Controller
JP2006323831A (en) Input device of safety unit
JP3962956B6 (en) Information processing apparatus and information processing method
JP3962956B2 (en) Information processing apparatus and information processing method
CN102929157B (en) A kind of dynamic positioning of vessels computer for controlling system of triple redundance
US5590278A (en) Method for detecting addressing errors in an electrical unit
US20070124115A1 (en) Safety-oriented control system
CN102644545B (en) Method and system for processing faults of wind generating set
CN103365279A (en) State detecting device and system and method for feeding back states of intelligent home system
DE102007033346A1 (en) Method and device for administration of computers
US8352651B2 (en) Devices, systems, and methods regarding programmable logic controller communications
CN103592880B (en) For the smart controller system of heavy construction kind equipment
CN1280754C (en) Embedded and networked remote input and output system
ES2385195T3 (en) I / O unit and industrial controller
US20160085237A1 (en) Information controller, information control system, and information control method

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