CN102271060B - Automatic communication state detection method of real-time control system - Google Patents

Automatic communication state detection method of real-time control system Download PDF

Info

Publication number
CN102271060B
CN102271060B CN201010191454.3A CN201010191454A CN102271060B CN 102271060 B CN102271060 B CN 102271060B CN 201010191454 A CN201010191454 A CN 201010191454A CN 102271060 B CN102271060 B CN 102271060B
Authority
CN
China
Prior art keywords
communication state
state detection
module
real
picture
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
CN201010191454.3A
Other languages
Chinese (zh)
Other versions
CN102271060A (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.)
Shanghai Baosight Software Co Ltd
Original Assignee
Shanghai Baosight Software 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 Shanghai Baosight Software Co Ltd filed Critical Shanghai Baosight Software Co Ltd
Priority to CN201010191454.3A priority Critical patent/CN102271060B/en
Publication of CN102271060A publication Critical patent/CN102271060A/en
Application granted granted Critical
Publication of CN102271060B publication Critical patent/CN102271060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention discloses an automatic communication state detection method of a real-time control system. The method comprises the following steps of: step 1, executing communication state query commands of the system and an external system to extract normal and standard keywords of the communication state; step 2, automatically detecting the communication state; and step 3, outputting a detection result. According to the invention, the automatic communication state detection of the real-time control system is realized; and the automatic communication state detection method is simple in design, real-time and reliable and applicable to a computer application system.

Description

The method of real-time control system automatic communication state detection
Technical field
The present invention relates to a kind of method of real-time control system automatic communication state detection, particularly relate to a kind ofly to carry out simply at computer application layer, the method for automatic communication state detection reliably.
Background technology
A real-time control system will carry out exchanges data fast with external system usually, and for realizing such function, real-time control system needs to set up static logic with external system and is connected.This logic connects once set up, and just remains under normal circumstances until receive out code and just can close always.But in physical connection, the other side's system exception situation, this logic connects also can close.And if at this moment do not carry out communication state detection, real-time control system can not epistemic losic connect time of day.If at this moment there is material process, control system can be caused because can not get production status and measured data and becoming blind person, and external system is acted blindly, and may cause out waste product in this case until go out the consequence of production accident because can not get the setting instruction of control system.
Current real-time control system solution to this problem has two, and one is that communication one side sets up life cycle text at application, and both sides are by checking whether the transmitting-receiving of life cycle text normally judges whether communication connects normal.Two is that the software interface that real-time control system is provided by calling system development platform detects communication connection status.First method cycle on interface channel transmits a large amount of life cycle text, sometimes multiple interface channel is set up with an external system, when the external system that control system connects is many, so much interface channel will transmit life cycle text periodically certainly will increase System and Network burden.Second method is often subject to the restriction of system development platform software reliability, and testing result is incorrect sometimes.
At present, publication number is had to be CN101242618, the prior art that name is called " a kind of real-time detection method of communication status in communication channel ".Its summary is as follows: " a kind of real-time detection method of communication status in communication channel; on a certain communication channel; communication two party periodically sends status frames to the other side; carry moment and the last time difference received between the data moment of this passage that transmit leg sends this status frames in described status frames; after communication side receives described status frames; the time difference carried in described status frames and the time threshold threshold value preset are compared, determine the communication state of this communication channel sending direction according to comparative result.Present invention achieves communication two party to the real-time detection receiving and send both direction break-make.After the detection method adopting the present invention to propose, by checking the channel status information that communication side preserves, data link layer can be real-time the two-way break-make situation and selecting of each physical channel of the understanding physical channel that will use, detect even if the multiple passage single-passes under there is single-pass or multichannel situation can be real-time.”
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of method of real-time control system automatic communication state detection, and the communication state that it reliably can realize computer application system detects automatically.
In order to solve above technical problem, the invention provides a kind of method of real-time control system automatic communication state detection; Comprise the following steps: step one, execution native system and external system communication state querying command extract the keyword of communication state arm's length standard; Step 2, automatic communication state detection; Step 3, testing result export.
Described step 2 comprises the following steps:
The first step, foundation perform native system and external communication status inquiry command, result leaves in text;
Second step, row dividing processing is carried out to destination file be put in character string sequence;
3rd step, travel through this character string sequence, check that whether each interface channel is normal, and mark is set;
Described step 3 comprises the following steps:
The first step, on picture, design communication state display position;
Second step, call in frame updating process automatic communication state detection functional module or the functional module that clock fixed cycle calls automatic communication state detection is set;
3rd step, renewal picture;
The functional module calling automatic communication state detection in frame updating process comprises following steps:
Display unit sends picture handover information to picture hand-off process module;
Picture hand-off process module sends communication state and detects request to automatic communication state detection module;
Testing result is returned to picture hand-off process module by automatic communication state detection module;
Picture hand-off process module shows communication state on a display screen;
The functional module that fixed cycle calls automatic communication state detection comprises following steps:
Timing Processing module send the cycle then information to automatically detecting communications status module;
Automatic detection communications status module sends communication state display request to frame updating processing module;
Frame updating processing module shows communication state on a display screen.
Beneficial effect of the present invention is: achieve real-time control system communication state and automatically detect.It is a kind of simplicity of design, in real time the reliable communication state automatic testing method for computer application system.
Accompanying drawing explanation
Below in conjunction with accompanying drawing and concrete real-time mode, the present invention is described in further detail.
Fig. 1 is automatic communication state detection handling process schematic diagram;
The flow chart of automatic communication state detection when Fig. 2 is picture switching;
Fig. 3 is the flow chart of fixed cycle automatic communication state detection;
Fig. 4 is the communication state arm's length standard schematic diagram extracted;
Fig. 5 is the flow chart of the method for the invention.
Concrete real-time mode
The automatic testing method of real-time control system communication state of the present invention, comprises a kind of extracting method of communication state arm's length standard, the functional module of an automatic communication state detection and a kind of testing result way of output.As shown in Figure 5, its process comprises the following steps: the first step, and execution native system and external system communication state querying command extract the keyword of communication state arm's length standard.The functional module of second step, automatic communication state detection.3rd step, the testing result way of output.
Wherein second step comprises the steps: the first step, and set up and perform native system and external system communication state querying command, result leaves in text.Second step, carries out row dividing processing to destination file and is put in character string sequence.3rd step, travels through this character string sequence, checks that whether each interface channel is normal, and arranges mark.
Wherein the 3rd step comprises the steps: the first step, and picture designs communication state display position, preferably the public area that all shows of every width picture.Second step calls the functional module (recommendation) of automatic communication state detection or arranges the functional module that the clock cycle calls automatic communication state detection in frame updating process.3rd step upgrades picture.
Real-time control system communication state automatic testing method of the present invention, comprises and performs the keyword that native system and external communication status inquiry command extract communication state arm's length standard.As shown in Figure 4, its operating system command adopted: netstat-n|find " xxx.xxx.xxx.xxx "; Wherein xxx.xxx.xxx.xxx is the IP address of real-time control system place machine.List the criterion of all passage connection state normal conditions of main frame 192.168.100.1 and external equipment 192.168.100.92 in figure, xxxx represents variable.
The process of described automatic communication state detection functional module is as follows:
1, native system is set up and external communication status inquiry command is put in character group.Such as: char [50]=" netstat-n|find " xxx.xxx.xxx.xxx " >netstatus.txt ", wherein xxx.xxx.xxx.xxx is the IP address of real-time control system place machine; Netstatus.txt is the filename putting lookup result.
2, take character group as parameter call system command.
3, netstatus.txt file is read in document flow mode
4, the capable segmentation of file content is obtained to each PORT COM current connection state that will check.
5, check that every a line is seen and whether meet communication state arm's length standard, normal or abnormality mark are set.
6, check result is returned.
The described design testing result way of output is as follows:
1, on picture, design communication state display position, preferably in the public area that every width picture all shows, display format is eye-catching, obviously indicative.
2, call the functional module (recommendation) of automatic communication state detection or the functional module that the clock cycle (be advisable with a minute level, otherwise can increase system burden) calls automatic communication state detection is set in the process of picture switching.
3, according to the communication state mark obtained, result is outputted to display position.Such as adopt signal lamp form, redness represents access failure; Yellow representative and external equipment have the passage of connection, but not all passage connects all; It is good etc. that green represents all expanding channels.
In real-time control system, the handling process of automatic communication state detection as shown in Figures 2 and 3.
Real-time control system communication state automatic testing method of the present invention, achieves real-time control system communication state and automatically detects.It is a kind of simplicity of design, in real time the reliable communication state automatic testing method for computer application system.May be used for based on the operating systems such as Windows and Renix, the real-time control system adopting the senior language platform design such as VC, VB.The body matter that the present invention realizes is embedded in the HMI service routine of real-time control system.If place it in one independently to realize or be embedded into other programs in program to realize certainly be also feasible.
The present invention's result compared with patent described in background technology is as follows: 1. accuracy: the accuracy of two kinds of methods should be the same.2. convenience: " a kind of real-time detection method of communication status in communication channel " is owing to relating to the programming technique of data link layer, the time threshold threshold value also will preset, thus implement more complicated, compare, we propose real time automatic detection and directly detect communication state by system command, effectively simple, and use in practical engineering project, be worthy to be popularized.
The present invention is not limited to real-time mode discussed above.Above the description of concrete real-time mode is intended to describe and the technical scheme that the present invention relates to being described.Based on the present invention enlightenment apparent conversion or substitute also should be considered to fall into protection scope of the present invention.Above concrete real-time mode is used for disclosing best real-time method of the present invention, can apply multiple real-time mode of the present invention and multiple alternative to reach object of the present invention to make those of ordinary skill in the art.

Claims (2)

1. the method for a real-time control system automatic communication state detection; It is characterized in that, comprise the following steps:
Step one, execution native system and external system communication state querying command extract the keyword of communication state arm's length standard;
Step 2, automatic communication state detection;
Step 3, testing result export;
Described step 2 comprises the following steps:
The first step, foundation perform native system and external communication status inquiry command, result leaves in text;
Second step, row dividing processing is carried out to destination file be put in character string sequence;
3rd step, travel through this character string sequence, check that whether each interface channel is normal, and mark is set;
Described step 3 comprises the following steps:
The first step, on picture, design communication state display position;
Second step, call in frame updating process automatic communication state detection functional module or the functional module that clock fixed cycle calls automatic communication state detection is set;
3rd step, renewal picture;
The functional module calling automatic communication state detection in frame updating process comprises following steps:
Display unit sends picture handover information to picture hand-off process module;
Picture hand-off process module sends communication state and detects request to automatic communication state detection module;
Testing result is returned to picture hand-off process module by automatic communication state detection module;
Picture hand-off process module shows communication state on a display screen;
The functional module that fixed cycle calls automatic communication state detection comprises following steps:
Timing Processing module send the cycle then information to automatically detecting communications status module;
Automatic detection communications status module sends communication state display request to frame updating processing module;
Frame updating processing module shows communication state on a display screen.
2. the method for real-time control system automatic communication state detection as claimed in claim 1, it is characterized in that, picture designs communication state display position, every width picture is all presented at public area.
CN201010191454.3A 2010-06-03 2010-06-03 Automatic communication state detection method of real-time control system Active CN102271060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010191454.3A CN102271060B (en) 2010-06-03 2010-06-03 Automatic communication state detection method of real-time control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010191454.3A CN102271060B (en) 2010-06-03 2010-06-03 Automatic communication state detection method of real-time control system

Publications (2)

Publication Number Publication Date
CN102271060A CN102271060A (en) 2011-12-07
CN102271060B true CN102271060B (en) 2015-04-29

Family

ID=45053229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010191454.3A Active CN102271060B (en) 2010-06-03 2010-06-03 Automatic communication state detection method of real-time control system

Country Status (1)

Country Link
CN (1) CN102271060B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254136A (en) * 2016-08-29 2016-12-21 钛能科技股份有限公司 A kind of indicating means of equipment communications status based on animation
CN106254140A (en) * 2016-08-29 2016-12-21 钛能科技股份有限公司 A kind of indicating means of equipment communications status based on symbol
CN110726614A (en) * 2019-10-23 2020-01-24 泰坦(天津)工业技术有限公司 Carbon black particle strength testing system and carbon black particle strength testing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1735047A (en) * 2004-08-12 2006-02-15 华为技术有限公司 Fault self-diagnosis method and device
CN101110642A (en) * 2006-07-19 2008-01-23 中兴通讯股份有限公司 System fault detecting method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090316572A1 (en) * 2008-06-20 2009-12-24 Chengdu Huawei Symantec Technologies Co., Ltd. Method and system for managing port statuses of a network device and relay device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1735047A (en) * 2004-08-12 2006-02-15 华为技术有限公司 Fault self-diagnosis method and device
CN101110642A (en) * 2006-07-19 2008-01-23 中兴通讯股份有限公司 System fault detecting method and device

Also Published As

Publication number Publication date
CN102271060A (en) 2011-12-07

Similar Documents

Publication Publication Date Title
CN106102141B (en) A kind of processing method and processing device based on packet
CN100571173C (en) A kind of detection method of network node abnormality
CN102271060B (en) Automatic communication state detection method of real-time control system
CN104044969A (en) Elevator fault early warning method and system
CN104580695B (en) Card missing recovery method for SIM (subscriber identity module) card
CN102223655A (en) Underlying multi-thread data transmission method of mobile communication
CN102325036A (en) Fault diagnosis method for network system, system and device
CN105512171A (en) Database synchronizing method and apparatus
CN104866421A (en) Testing method and testing system of POS terminal
CN102929224A (en) Condition acquisition controller (CAC) for power transformer equipment and system control method
CN103024058A (en) Method and system for invoking web services
CN101676908A (en) Method and device for detecting integrity of database objects
CN105930392A (en) Cross-domain IFRAME height adaption method based on message transmission and system thereof
CN105391737B (en) A kind of load balancing main frame group's file synchronization processing method
CN101018113A (en) The method for synchronizing data and obtaining the data synchronization result and its system and HLR
EP2654278A1 (en) Network maintenance system, method and device
CN103235728B (en) The installation method of preset third-party application and device in Android terminal
CN203101932U (en) Power transformation equipment condition acquisition controller
CN103178997B (en) Detection method that a kind of MAC Address based on LLDP agreement is identical and equipment
CN101945413B (en) Alarm information processing method and device
CN101466165B (en) Method for restarting mobile communication terminal remotely
CN105988882A (en) Application software fault recovery method and terminal equipment
CN111431788B (en) High-reliability network communication system and method
TW200740145A (en) Network device and subscribers' states synchronizing method thereof
CN102591688B (en) Electrocardiograph plug-in access method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant