CN107479539A - PLC and monitoring software Communications failure a kind of detection method - Google Patents
PLC and monitoring software Communications failure a kind of detection method Download PDFInfo
- Publication number
- CN107479539A CN107479539A CN201710834359.2A CN201710834359A CN107479539A CN 107479539 A CN107479539 A CN 107479539A CN 201710834359 A CN201710834359 A CN 201710834359A CN 107479539 A CN107479539 A CN 107479539A
- Authority
- CN
- China
- Prior art keywords
- plc
- communication
- monitoring
- state
- time
- 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
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0259—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
- G05B23/0262—Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24065—Real time diagnostics
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Programmable Controllers (AREA)
Abstract
The invention provides a kind of PLC and monitoring software Communications failure detection method, it comprises the following steps:Step 1, PLC and PC monitoring softwares are initialized, reset Communication diagnostic relay;The Communication diagnostic relay is auxiliary reclay M12 selected inside the PLC;Step 2, the PC monitoring softwares send detection enabled instruction to the PLC, inform the PLC entry communications detection pattern;Step 3, the PC monitoring softwares periodically set the state of the Communication diagnostic relay as True according to setting time A;The PLC periodically sets the state of the Communication diagnostic relay as False according to setting time B;Step 4, the PLC monitors the state of the Communication diagnostic relay according to the monitoring cycle timing of the plc communication of setting, judges whether the communication state between the PC monitoring softwares and the PLC fails.The present invention has the advantages of design science, practical, easy to operate and detection efficiency is high.
Description
Technical field
The present invention relates to PLC communication detection technical fields, specifically, relate to a kind of PLC and are lost with monitoring software communication
The detection method lost.
Background technology
Programmable logic controller (PLC)(Abbreviation PLC)It is exclusively for the digital operation applied and designed in industrial settings
Electronic system, the functions such as logic operation, sequential control, calculating can be carried out.Monitoring software is installed on PC ends, is communicated with PLC,
Control manages various types of plant equipment or production process.
In PLC and PC communication process, Communications failure problem is difficult to avoid that.PLC brands, the type used in view of user
Number or communications protocol it is different, the mode that PLC obtains Communications failure information is different.For programming person, symbol is called
Its brand, model Communication diagnostic are closed, call format is strict and relatively complicated, or even low side PLC is without Communications failure diagnosis work(
Energy.Once PLC can not obtain the control instruction of monitoring software, there is a kind of secret worry of out-of-control condition in PLC, and this certainly will turn into one kind
The potential risk of control system.
In order to solve the problem present on, people are seeking a kind of preferable technical solution always.
The content of the invention
The purpose of the present invention is in view of the shortcomings of the prior art, so as to provide a kind of design science, practical, operation letter
Just the PLC high with detection efficiency and monitoring software Communications failure detection method.
To achieve these goals, the technical solution adopted in the present invention is:A kind of PLC and monitoring software Communications failure
Detection method, comprise the following steps:
Step 1, PLC and PC monitoring softwares are initialized, reset Communication diagnostic relay;The Communication diagnostic relay is described
Selected auxiliary reclay M12 inside PLC;
Step 2, the PC monitoring softwares send detection enabled instruction to the PLC, inform the PLC entry communications detection mould
Formula;
Step 3, the PC monitoring softwares periodically set the state of the Communication diagnostic relay as True according to setting time A;
The PLC periodically sets the state of the Communication diagnostic relay as False according to setting time B;
Step 4, the PLC monitors the state of the Communication diagnostic relay according to the monitoring cycle timing of the plc communication of setting, sentences
Whether disconnected communication state between the PC monitoring softwares and the PLC fails.
Based on above-mentioned, in the step 2:The time B is more than the time A, and the time B is not equal to the time
A multiple.
Based on above-mentioned, in the step 4, the plc communication monitoring cycle is more than the time B and the time A sums.
Based on above-mentioned, in the step 4, the PLC timings monitor the state of the Communication diagnostic relay, refer to from
Receive M12=True communication instructions that the PC monitoring softwares are sent starts timing to the PLC for the first time, every a plc communication
Monitor cycle detection once.
Based on above-mentioned, the time B refers to receiving M12=True communications that the PC monitoring softwares send from the PLC
Instruction starts timing, and the state of the Communication diagnostic relay is set as False to the PLC.
Based on above-mentioned, the step 3 specifically includes:
Step 3.1, PC monitoring softwares are every time A, to PLC transmissions M12=True communication instruction;
Step 3.2, the PLC, after receiving the communication instruction that the PC monitoring softwares are sent, timing stand-by period B;
Step 3.3, the PLC, the state of the Communication diagnostic relay is arranged to False.
Based on above-mentioned, the step 4 specifically includes:
Step 4.1, after the PLC settings M12=False, the PLC timings monitor the state of the Communication diagnostic relay, sentence
Whether the state of the disconnected Communication diagnostic relay is False;
Step 4.2, if the state of the Communication diagnostic relay is False, can determine whether between PLC the and PC monitoring softwares
Communications failure, the PLC entry communications failure handling flow, otherwise goes to step 4.3;
Step 4.3, judge that the PLC and the communication of PC monitoring softwares are normal, continue to detect communication state.
The present invention has prominent substantive distinguishing features and progress compared with the prior art, specifically:
1)The invention provides a kind of PLC and monitoring software Communications failure detection method, the PC monitoring softwares are according to setting
Time A periodically sets the state of the Communication diagnostic relay as True;The PLC is according to setting time B periodically settings
The state of Communication diagnostic relay is False;The PLC is judged by regularly monitoring the state of the Communication diagnostic relay
Whether the communication state between the PC monitoring softwares and the PLC fails, the present invention realize to PLC and PC monitoring softwares it
Between communication detection so that PLC obtains communication state in time;
2)The present invention is when PLC and PC monitoring softwares are communicated, by carrying out operational control, solution to PLC general datas point position
Determine when PC bitcoms and PLC disconnect communication connection, the problem of PLC can not obtain Communications failure in time;
3)User is different without the PLC brands, model or communications protocol for considering to use, or PLC obtains Communications failure information
Mode it is different, it is simple to operate, easy to use;
In summary, the present invention has the advantages of design science, practical, easy to operate and detection efficiency is high.
Brief description of the drawings
Fig. 1 is the flow chart of the present invention.
Fig. 2 is the communication check position state timing chart of the present invention.
Fig. 3 is the plc data communication detection ladder diagram of the present invention.
Embodiment
Below by embodiment, technical scheme is described in further detail.
As shown in Figures 1 and 2, a kind of PLC and monitoring software Communications failure detection method, it includes following step
Suddenly:
Step 1, PLC and PC monitoring softwares are initialized, reset Communication diagnostic relay;The Communication diagnostic relay is described
Selected auxiliary reclay M12 inside PLC.
Step 2, the PC monitoring softwares send detection enabled instruction to the PLC, inform the PLC entry communications detection
Pattern.
Step 3, the PC monitoring softwares according to setting time A periodically set the state of the Communication diagnostic relay as
True;The PLC periodically sets the state of the Communication diagnostic relay as False according to setting time B.
The step 3 specifically includes:
Step 3.1, PC monitoring softwares are every time A, to PLC transmissions M12=True communication instruction;
Step 3.2, the PLC, after receiving M12=True communication instructions that the PC monitoring softwares are sent, timing stand-by period B;
Step 3.3, the PLC, the state of the Communication diagnostic relay is arranged to False.
The timing since first time sends M12=True communication instruction of PC monitoring softwares, one is sent every a time A
Secondary M12=True communication instruction.The time B refer to from the PLC receive that the PC monitoring softwares send " M12=
True " communication instructions start timing, and the state of the Communication diagnostic relay is set as False to the PLC.The time B
More than the time A, and the time B is not equal to the multiple of the time A.The time B is more than the PLC scan periods.
Step 4, the PLC timings monitor the state of the Communication diagnostic relay, judge the PC monitoring softwares and institute
State whether the communication state between PLC fails.
The plc communication monitoring cycle is time C;The time C is more than the time B and the time A sums.It is described
PLC timings monitor the state of the Communication diagnostic relay, refer to receiving the PC monitoring softwares hair for the first time from the PLC
Come " M12=True " communication instructions start timing, every plc communication monitoring cycle detection once.
The step 4 specifically includes:
Step 4.1, after the PLC settings M12=False, the PLC timings monitor the state of the Communication diagnostic relay, sentence
Whether the state of the disconnected Communication diagnostic relay is False;
Step 4.2, if the state of the Communication diagnostic relay is False, can determine whether between PLC the and PC monitoring softwares
Communications failure, the PLC entry communications failure handling flow, otherwise goes to step 4.3;
Step 4.3, judge that the PLC and the communication of PC monitoring softwares are normal, continue to detect communication state.
It is the Communication diagnostic relay that the PLC, which specifies bosom relay M12,.PC monitoring softwares and described
PLC is manipulated by M12 state, realizes detections of the PLC to communication state.PC monitoring softwares periodically set M12=
True, the PLC periodically set M12=False.The programmable logic controller (PLC) PLC can monitor M12 by timing, so as to
Judge communication state.
" PLC setting M12=False " after, in the time C-B of wait, PC monitoring softwares have time enough setting M12=
True.If after time C-B, M12=False, then illustrate the instruction of PC monitoring softwares without the arrival PLC, that is to say, that
If within the C-B times, PLC does not receive the instruction for M12=True that PC monitoring softwares are sent successfully, therefore can assert logical
News failure.
Setting time A=600ms;Setting time B=1000ms.Set plc communication and monitor the cycle as 2000ms.The PC prisons
Software is controlled, every 600ms, " M12=True " communication instructions is sent to the PLC by communication instruction.Described in the PLC receives
PC monitoring softwares send " after M12=True " communication instructions, timing wait 1000ms after, by the Communication diagnostic relay
State is arranged to False.
The workflow of the present invention is as follows:
(1)The PLC program operation, the operation of PC monitoring softwares.PLC the and PC monitoring softwares are initialized, reset the communication
Relay;In order that M12=True, turn into a trigger event, need first to set before PLC carries out communication detection M12=
False;
(2).PC monitoring software starts communication detection function, sends instructions to the PLC, informs the PLC entry communications detection
Pattern;Meanwhile send M12=True instructions;PC monitoring softwares send M12=True by communication instruction every 600ms to PLC;
(3)What the PLC received that PC monitoring softwares send " after M12=True " communication instructions, sets M12=True;Calendar scheduling
After 1000ms, the PLC sets M12=False automatically;
(4)The PLC settings M12=False, after timing waits 1000ms, the PLC judges whether M12 is False;If
M12=False, then judge Communications failure between PLC the and PC monitoring softwares, the PLC entry communications failure handling flow;
(5)Otherwise, if M12=True, it can determine whether that the PLC and the communication of PC monitoring softwares are normal, continue to detect communication state.
During communication detection, PLC communication detections ladder diagram as shown in Figure 3, the Communication diagnostic relay M12's
When opened point turns on, entry communication testing process;B timers start timing, when B timers are equal to 10*100ms, B timers
Node turns on, and M12 opened points disconnect, and B timers reset.When the normally closed point conductings of M12, ' C-B ' timer starts timing, when
When ' C-B ' timer is equal to 10*100ms, ' C-B ' timer contact conducting set M478 flag bits, prompt PLC and PC that monitoring is soft
Communications failure between part.If when ' C-B ' timer is less than 10*100ms, PC monitoring softwares send M12=True instructions, then M12
Normally-closed contact disconnects, then is communicated normally between PLC and PC monitoring softwares, reenter first instruction.The unit of timer is
100ms。
When PLC and PC monitoring softwares are communicated, PLC can not obtain its master with PC monitoring software Communications failures in time
Wanting factor, data keep its standing state when register or the renewal of relay data no data change;The present invention is by PLC
General data point position carries out operational control, and general data point position is auxiliary reclay M12 state, solves when PC communications are soft
The problem of part and PLC disconnections are communicated when connecting, and PLC can not obtain Communications failure in time.
Using the inventive method, user is different without the PLC brands, model or communications protocol for considering to use, or PLC
It is different to obtain the mode of Communications failure information, there is the advantages of design science, simple to operate, practical and detection efficiency is high.
Finally it should be noted that:The above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof;To the greatest extent
The present invention is described in detail with reference to preferred embodiments for pipe, those of ordinary skills in the art should understand that:Still
The embodiment of the present invention can be modified or equivalent substitution is carried out to some technical characteristics;Without departing from this hair
The spirit of bright technical scheme, it all should cover among the claimed technical scheme scope of the present invention.
Claims (7)
1. a kind of PLC and monitoring software Communications failure detection method, it is characterised in that:Comprise the following steps:
Step 1, PLC and PC monitoring softwares are initialized, reset Communication diagnostic relay;The Communication diagnostic relay is described
Selected auxiliary reclay M12 inside PLC;
Step 2, the PC monitoring softwares send detection enabled instruction to the PLC, inform the PLC entry communications detection mould
Formula;
Step 3, the PC monitoring softwares periodically set the state of the Communication diagnostic relay as True according to setting time A;
The PLC periodically sets the state of the Communication diagnostic relay as False according to setting time B;
Step 4, the PLC monitors the state of the Communication diagnostic relay according to the monitoring cycle timing of the plc communication of setting, sentences
Whether disconnected communication state between the PC monitoring softwares and the PLC fails.
2. a kind of PLC according to claim 1 and monitoring software Communications failure detection method, it is characterised in that:It is described
In step 2:The time B is more than the time A, and the time B is not equal to the multiple of the time A.
3. a kind of PLC according to claim 1 or 2 and monitoring software Communications failure detection method, it is characterised in that:Institute
State in step 4, the plc communication monitoring cycle is more than the time B and the time A sums.
4. a kind of PLC according to claim 3 and monitoring software Communications failure detection method, it is characterised in that:It is described
In step 4, the PLC timings monitor the state of the Communication diagnostic relay, refer to from described in the PLC for the first time receiving
M12=True communication instructions that PC monitoring softwares are sent start timing, every a plc communication monitoring cycle detection once.
5. a kind of PLC according to claim 1 and monitoring software Communications failure detection method, it is characterised in that:It is described
Time B refers to the timing since M12=True communication instructions that the PLC receiving PC monitoring softwares are sent, described in
PLC sets the state of the Communication diagnostic relay as False.
6. a kind of PLC according to claim 1 and monitoring software Communications failure detection method, it is characterised in that:It is described
Step 3 specifically includes:
Step 3.1, PC monitoring softwares are every time A, to PLC transmissions M12=True communication instruction;
Step 3.2, the PLC, after receiving the communication instruction that the PC monitoring softwares are sent, timing stand-by period B;
Step 3.3, the PLC, the state of the Communication diagnostic relay is arranged to False.
7. a kind of PLC according to claim 1 and monitoring software Communications failure detection method, it is characterised in that:It is described
Step 4 specifically includes:
Step 4.1, after the PLC settings M12=False, the PLC timings monitor the state of the Communication diagnostic relay, sentence
Whether the state of the disconnected Communication diagnostic relay is False;
Step 4.2, if the state of the Communication diagnostic relay is False, can determine whether between PLC the and PC monitoring softwares
Communications failure, the PLC entry communications failure handling flow, otherwise goes to step 4.3;
Step 4.3, judge that the PLC and the communication of PC monitoring softwares are normal, continue to detect communication state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710834359.2A CN107479539B (en) | 2017-09-15 | 2017-09-15 | A kind of detection method of PLC and monitoring software Communications failure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710834359.2A CN107479539B (en) | 2017-09-15 | 2017-09-15 | A kind of detection method of PLC and monitoring software Communications failure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107479539A true CN107479539A (en) | 2017-12-15 |
CN107479539B CN107479539B (en) | 2019-09-03 |
Family
ID=60585062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710834359.2A Active CN107479539B (en) | 2017-09-15 | 2017-09-15 | A kind of detection method of PLC and monitoring software Communications failure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107479539B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110205479A (en) * | 2019-06-13 | 2019-09-06 | 浦项(张家港)不锈钢股份有限公司 | A kind of stainless steel annealing pickling line PLC network communication diagnosis and processing method |
CN112671929A (en) * | 2021-01-04 | 2021-04-16 | 薛金山 | Time-sharing multiplexing method for communication interfaces of old secondary water supply equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103472776A (en) * | 2013-08-26 | 2013-12-25 | 株洲南车时代电气股份有限公司 | Safety control method and safety control system for communication interruption of upper computer and lower computer |
US20150378340A1 (en) * | 2014-06-27 | 2015-12-31 | Omron Corporation | Programmable indicator |
CN105353715A (en) * | 2015-09-23 | 2016-02-24 | 上海大学 | Realization method of logic control of VB/VC (Microsoft Visual Basic 6.0/Microsoft Visual C++) and PLC (Programmable Logic Controller) on the basis of serial communication |
CN106444620A (en) * | 2016-12-08 | 2017-02-22 | 中国石油天然气集团公司 | Method for monitoring oil-gas pipeline SCADA system data communication on-off |
-
2017
- 2017-09-15 CN CN201710834359.2A patent/CN107479539B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103472776A (en) * | 2013-08-26 | 2013-12-25 | 株洲南车时代电气股份有限公司 | Safety control method and safety control system for communication interruption of upper computer and lower computer |
US20150378340A1 (en) * | 2014-06-27 | 2015-12-31 | Omron Corporation | Programmable indicator |
CN105353715A (en) * | 2015-09-23 | 2016-02-24 | 上海大学 | Realization method of logic control of VB/VC (Microsoft Visual Basic 6.0/Microsoft Visual C++) and PLC (Programmable Logic Controller) on the basis of serial communication |
CN106444620A (en) * | 2016-12-08 | 2017-02-22 | 中国石油天然气集团公司 | Method for monitoring oil-gas pipeline SCADA system data communication on-off |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110205479A (en) * | 2019-06-13 | 2019-09-06 | 浦项(张家港)不锈钢股份有限公司 | A kind of stainless steel annealing pickling line PLC network communication diagnosis and processing method |
CN112671929A (en) * | 2021-01-04 | 2021-04-16 | 薛金山 | Time-sharing multiplexing method for communication interfaces of old secondary water supply equipment |
CN112671929B (en) * | 2021-01-04 | 2022-07-01 | 薛金山 | Time-sharing multiplexing method for communication interfaces of old secondary water supply equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107479539B (en) | 2019-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105703917B (en) | Bluetooth low-power consumption broadcasting device and broadcasting method | |
CN108766422B (en) | Voice equipment response method and device, storage medium and computer equipment | |
EP2704365B1 (en) | Method for establishing control relationships, configuration device, networked device and computer program product | |
CN107358954A (en) | It is a kind of to change the device and method for waking up word in real time | |
CN103716901B (en) | Method, system and the relevant device connected between equipment | |
CN109297154A (en) | Air conditioner alarm method and device, storage medium and air conditioner | |
CN103595768B (en) | A kind of method that realizes configuration synchronization between virtual equipment | |
WO2022227820A1 (en) | Method and apparatus for sleep environment control in home system, and device and system | |
CN107479539A (en) | PLC and monitoring software Communications failure a kind of detection method | |
CN105812504B (en) | A kind of intelligent mailing address coding method | |
CN110427220A (en) | Configuration method, device, electronic equipment and the storage medium of device command | |
CN110176233A (en) | The method, apparatus and computer storage medium of air-conditioning voice control | |
CN109887143A (en) | For the control method of intelligent door lock, device and intelligent door lock | |
CN103986588B (en) | Computer system and far-end remote control method of computer device | |
CN108289030A (en) | A kind of base station fault identifying processing method and device | |
CN101431445B (en) | Network awakening test system and method | |
CN109212978A (en) | Bathroom system, bathroom mirror and its control method | |
CN105100125A (en) | Sleep control method, sleep control device and sleep control system for virtual desktop | |
CN112888052B (en) | Wireless fire alarm system with terminal awakening function and implementation method | |
CN105722198A (en) | Communication power consumption reducing method for low-rate wireless network | |
CN103365754A (en) | Method and device of updating nonvolatile memory item information | |
CN109395418A (en) | Bus master-slave equipment determines method and system and its medium and bus apparatus | |
CN105933134A (en) | Wireless AP default resetting method and system | |
CN101615336A (en) | Gas alarm method, device and home gateway based on home gateway | |
CN103368791B (en) | A kind of IEC104 protocol massages fast automatic detecting method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |