SG174690A1 - Communication control method, communication control program and master communication system - Google Patents

Communication control method, communication control program and master communication system Download PDF

Info

Publication number
SG174690A1
SG174690A1 SG2011017142A SG2011017142A SG174690A1 SG 174690 A1 SG174690 A1 SG 174690A1 SG 2011017142 A SG2011017142 A SG 2011017142A SG 2011017142 A SG2011017142 A SG 2011017142A SG 174690 A1 SG174690 A1 SG 174690A1
Authority
SG
Singapore
Prior art keywords
master
slave
communication device
communication
communication system
Prior art date
Application number
SG2011017142A
Inventor
Fukumoto Yohei
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Publication of SG174690A1 publication Critical patent/SG174690A1/en

Links

Landscapes

  • Small-Scale Networks (AREA)
  • Communication Control (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

OF THE DISCLOSUREA communica on control method of a master-slavecommunication s tern which is configured in such a manner that5 a plurality of sl e communication devices are connected to a master communicatio system through a communication network, in which the master co unication system repeatedly executes: communication device as Ignment processing that the master communication system assl ns one slave communication devicelo among the plurality of the save communication devices; query transmission processing that ansmits a query to the assigned slave communication device; and esponse reception processing that receives a response from the slave communication device to which the query is transmitted, s a series of a15 communication processing unit. The ster communicationsystem comprises: a timeout error monito ng timer that detects whether or not the response to the trans itted query isreceived; and a timeout error counter that unts a number of detections of successive timeout errors for e h of the slave20 communication devices. In the response recepti processing,when the response is received from the slave co nication device assigned in the communication device assign entprocessing, the master communication system executes a tep of resetting a count value of the timeout error counter25 corresponding to the slave communication device to zero, n when a timeout error is detected based on a notification fr the t meout error monitoring timer, the master communication system xecutes steps of: increasing the count value of the timeout e ror counter corresponding to the slave communication device by o e; terminating the communication processing unit5 immediately; tetermining whether or not a count value of the error counter rr.ached a predetermined count value, while terminating the ci unication processing unit; and outputting error information i dicating that the slave communication device is in failure •f the count value of the error counter COMMUNICATION CONTROL METHOD, COMMUNICATION CONTROL PROGRAM AND MASTER COMMUNICATION SYSTEM OF THE DISCLOSUREA master communication system 2 repeatedly executes assigning one of slave communication devices 4, transmittinga query to the assigned slave communication device 4 and10 receiving a response to the query, as a series of acommunication processing unit. The master communication system 2 includes a timeout error counter 24 for counting a number of times that failed to receive the response for each of the slave communication devices, and when the response to15 the transmitted query is received, resets a count value of the timeout error counter, and when failed to receive the response within a predetermined time, increases the count value of the timeout error counter 24, while terminating the communication processing unit, and if the count value of the timeout error20 counter 24 reached the predetermined count vale, the master communication system 2 determines that the slave communication device is in failure (permanent error).Fig. 1

Description

COMMUNICATION CONTROL METHOD, COMMUNICATION CONTROL PROGRAM
AND MASTER COMMUNICATION SYSTEM
CROSS REFERENCE TO RELATED APPLICATIONS
This application claims the foreign priority benefit under
Title 35, United States Code, §119(a)~{d) of Japanese Patent
Application No. 2010-052562, filed on March 10, 2010, the contents of which are hereby incorporated by reference. [FIELD OF THE INVENTION]
The present invention relates to a communication control method, communication control programs and a master communication system used for a master-slave communication system which is configured in such a manner that a plurality 16 of slave communication devices are connected to the master communication system through a communication network. [RELATED PRICR ART]
A master-slave communication system is often used for monitoring and controlling a plant. The master-slave communication system is configured, for example, in such a manner that a plurality of slave communication devices which are disposed at distant places are connected to a master communication system installed in a monitoring center. In the master-slave communication system, for example, MODBUS (registered trade mark) protocol is used. According to the communication method of the MODBUS protocol, functions of the master communication system and the slave communication devices are defined as follows. (1) A master communication system has functions to assign a slave communication device and to transmit a query to the assigned slave communication device for controlling a surveillance device and for collecting data from the survelllance device. (2) A slave communication device has functions to receive a query from a master communication system, and after executing a predetermined processing indicated by the query, to transmit information of the processing result to the master communication system as a response. However, the slave communication device has no function to autonomously transmit a query to the master communication system.
Conventionally, in the foregoing master-slave communication system, the master communication system cyclically assigns a slave communication device to which a query is transmitted in a predetermined seguence at predetermined time intervals with respect to a plurality of slave communication devices, transmits the query to the assigned slave communication device and receives a response returned from the slave communication device to which the query was transmitted. In a series of the foregoing processing, if the response is not returned from the slave communication device within a predetermined time, the master communication system retransmits a query identical fo the query transmitted in the previous round and waits the response from the slave communication device. When the response is not returned from the slave communication device even if the same query is transmitted more than a predetermined number of times, the master communication system determines that the slave communication device is in failure (error).
The foregoing conventional method for determining the error of the slave communication device has the following problems. In the conventional error determination method described above, first, if the response is not returned from a slave communication device, the master communication system is required to repeat retransmission of the same query and to wait for reception of the response to the retransmitted query, several times. Therefore, this might cause a transmission delay of a query to each of the other slave communication devices in some cases. As a result, a processing delay and a shortage of processing time might be caused in each of the other slave communication devices in some cases.
Second, in the conventional error determination method, since the master communication system executes the error determination within a relatively short time, there is a possibility to misjudge a temporary error (errors that recover naturally, for example, communication error due to noises and an incidental processing delay in the slave communication device) of the slave communication device as a permanent error (all errors other than the temporary error). If the error is a permanent error, some work by a maintainer is required.
However, if the error is a temporary error, it may be left as it is. Therefore, if a temporary error is misjudged as a permanent errcr, a workload of the maintainer increases due to the maintenance work of the slave communication device that is not in failure (error).
Japanese Patent Publication No. 2002-26908 discloses a technology for shortening a waiting time of the master communication system waiting for the response after the second round, in order to solve the first problem described above. [SUMMARY OF THE INVENTION]
However, the technology disclosed in Japanese Patent
Publication No. 2002-26908 is not a solution of the foregoing second problem. Since an error of the slave communication device is determined in a shorter time in the technology, a possibility to misjudge a temporary error as a permanent error may rather increases.
Therefore, it is an object of the present invention to provide a communication control method, a communication control program and a master communication system which are capable of error determination that prevent the master communication system from misjudging a temporary error of a slave communicaticn device as a permanent error in a 26 master-slave communication system.
The present invention is inventions of a communication control method, a communication control program and a master communication system of a master-slave communication system which is configured in such a manner that a plurality of slave communication devices are connected to the master communication system through a communication network, and the master communication system repeatedly executes communication apparatus assignment processing for assigning one slave communication device among the plurality of the slave communication devices, query transmission processing for transmitting a query to the assigned slave communication device and response reception processing for receiving a response from the slave communication device to which the query was transmitted, in the master-slave communication system as a series of a communication processing unit.
The master communication system is characterized as follows. (1) The master communication system includes a timeout error monitoring timer that detects whether or not a response to the transmitted query is received and a timeout error counter that counts a number of detection times of successive timeout errors for each of the slave communication devices. {2) When the master communication system receives a response from a slave communication device assigned in the previous communication apparatus assignment processing, the master communication system resets a timeout error counter corresponding to the slave communication device to zero, and when a timeout error is detected based on a notification from the timeout error monitoring timer, the master communication system: increases a count value of the timeout error counter corresponding to the slave communication device by one; then, terminates the communication processing unit immediately; determines whether or not the error count of the errcr counter reaches a predetermined count value concurrently with the termination; and outputs error information that indicates a error of the slave communication device if the count value of the error counter reaches the predetermined count value.
Bccording to the present invention, in a master-slave communication system, an error determination that prevents a master communication system from misjudging a temporary error of a slave communication device as a permanent error may be achieved. [BRIEF DESCRIPTION OF THE DRAWINGS]
FIG. 1 is an illustration showing an example of a configuration of a master-slave network system according to an embodiment of the present invention;
FIG. 2 is an illustration showing transmission and reception of a query and a response between a master communication system and four slave communication devices according to the embodiment;
FIG. 3 is an iilustration cf a COMPARATIVE EXAMPLE showing transmission and reception of a query and a response between a master communication system and four slave communication devices according to a conventional technology;
FIG. 4 is an example of a flowchart of a communication control processing to be executed by a communication control processor of a master communication system according to the embodiment;
FIG. 5 is an illustration showing an example of a configuration of a master-slave network system according to a modified example of the embodiment; and
FIG. & is an example of a flowchart of a communication control processing to be executed by a communication control processor of a master communication system according to a modified example of the embodiment. [DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT]
Hereinafter, explanations will be given of an embodiment of the present invention in detail by referring to drawings.
FIG. 1 is an illustration showing an example of a configuration of a master-slave network system according to an embodiment of the present invention. As shown in FIG. 1, a master-slave network system 10 is configured in such a manner that a plurality of slave communication devices 4 are connected to a master communication system 2 through a communication network 3. In addition, a master processing device 1 configured with, for example, a general personal computer and a workstation is connected to the master communication system 2.
Furthermore, various devices are connected to the slave communication device 4. When the master-slave network system 10 is, for example, a plant supervisory system, a surveillance device 5 consisting of various kinds of sensors and the like is connected to the slave communication device 4.
Here, as the network 3, for example, Ethernet {registered trade mark) or RS485 is used, and as a communication method thereof, generally, a communication method, a so-called master-slave communication such as MODBUS (registered trade mark} protocel is used. Meanwhile, the MODBUS protocol mounted on TCP/IP protocol of Ethernet is called as MODUBUS-TCP, however, a basic communication method thereof is sorted into the master-slave communication.
A communication between the master communication system 2 and the slave communication device 4 in the master-slave communication proceeds according to a communication control processing that is executed by the initiative of the master communication system 2. Namely, the communication control of the master communication system 2 is achieved by repeatedly executing the following three-step processing as a processing unit. (1) Processing for assigning a destination siave communication device 4. (2) Processing for transmitting a query, which is information instructing a processing to be executed by the assigned slave communication device 4, to the assigned slave communication device 4. (3) Processing for receiving information of results of the processing executed by the assigned slave communication device 4, since the slave communication device 4 received the query executes the processing instructed by the query and transmits the information of the processing results to the master communication system 2 as a response.
Here, a query to be transmitted to the slave communication device 4 by the master communication system 2 is, for example, the query to instruct acquiring data of a temperature of a boiler by the surveillance device 5, or to instruct reducing a flow rate of a gas by throttling a valve in the surveillance device 5. On the other hand, for example, information of the temperature of the boiler and information that a gate opening 16 of the valve was lowered from 4 te 3 are included in the response in response to the query. In addition, error information such as a failure in acquiring data of the temperature of the boiler may be included in the response.
The master communication system 2 that executes a communication control of the foregoing master-slave communication includes a communication control processor 21, a network interface 22, a timeout error monitoring timer 23, and a timeout error counter 24 which is disposed corresponding to each of a plurality of slave communication devices 4.
Eere, the communication control processor 21 includes CPU (Central Processing Unit), which is not shown, and a memory,
and programs for actualizing a communication control function of the master communication system 2, as well as a query and a response transmitted and received between the master communication system 2 and the slave communication device 4 are stored in the memory. In addition, the network interface 22 is connected to the communication network 3 and interfaces electrically between the master communication system 2 and the communication network 3, while generating/delivering a transmission frame and detecting a reception frame.
It is noted that address information assigning a destination slave communication device 4 is included in the transmission frame which is generated by the network interface 22, and that a processing that the master communication system 2 (that is, the communication control processor 21) assigns a slave communication device 4 is the processing to set the address information of the slave communication device 4 included in the transmissicn frame.
The timeout error monitoring timer 23 is a timer for monitoring a time until the communication control processor 21 receives a response to be transmitted from a slave communication device 4 after the network interface 22 delivered a query. Namely, when the query is transmitied to the slave communication device 4 through the network interface 22, the timeout error monitoring timer 23 starts monitoring the time and stops the monitoring when the communication control processor 21 received the response to the query. If the communication control processor 21 does not receive the response within a predetermined time, that is, if the monitoring time of the timeout error monitoring timer 23 is not stopped beyond the predetermined time, a timeout error indicating no reception of the response is notified to the communication control processor 21.
The timeout error counter 24 is disposed corresponding to each of a plurality of slave communication devices 4, and in the embodiment, the timeout error counter 24 is disposed in a memory, not shown, within the master communication system 2.
Namely, when the communication control processor 21 receives a response from a slave communicaticn device 4, the communication contrel processor 21 resets a timecut error counter 24 corresponding to the slave communication device 4 to zero, and when the communication control processor 21 is waiting for reception of the response from the slave communication device 4, if a timeout error is notified from the timeout error monitoring timer 23, the communication control processor 21 increases a count value of the timeout error counter 24 corresponding to the slave communication device 4 by one.
FIG. 2 is an illustration showing an example of transmission and reception of a query and a response between a master communication system and four slave communication devices according to the embodiment of the present invention.
In FIG. 2, the left half indicates contents of a communication control processing of the master communication system 2, and the right half indicates a slave communication device 4 corresponding to a destination slave communication device 4 of 2 query and an originating slave communication device 4 of a response by a direction of an arrow.
As shown in FIG. 2, the master communication system 2 assigns (circled 1) a slave communication device 4 (#1) in the first block, transmits (circled 2) a query (1, 1) prepared in advance to the assigned slave communication device 4 (#1), and receives (circled 3} a response (1, 1) returned from the slave communication device 4 (#1) to which the query was transmitted.
Similarly, in the next block, the master communication system 2 assigns (circled 1) a slave communication device 4 (#2), transmits (circled 2) a query (2, 1) prepared in advance to the assigned slave communication device 4 (#2), and receives (circled 3) a response (2, 1) returned from the slave communication device 4 (#2) to which the query was transmitted.
In addition, the master communication system 2 assigns a slave communication device 4 (#3) and a slave communication device 4 (#4), and executes similar processing.
As described above, in the master-slave network system 10, the master communication system 2 repeatedly executes the following processing as a series of a processing unit. Namely, the master communication system 2 assigns one by one a plurality of slave communication devices 4 connected to the communication network 3, transmits a query prepared in advance to the assigned slave communication device 4, and receives a response returned from the assigned slave communication device 4. Meanwhile, in the example in FIG. 2, a number of slave communication device 4 connected to the communication network 3 is four, however, the number is not limited to four.
When the master communication system 2 completes a round of processing of transmission of the query and recepticn of the response for the four slave communication devices 4 connected to the communication network 3, subsequently, the master communication system 2 executes the second round of the communication control processing. It is noted that in the first round of the communication control processing, since the master communication system 2 received the responses (1, 1), (2, 1}, (3, 1) and (4, 1) from the respective slave communication devices 4, the timeout error counters 24 (#1), {#2), (#3) and (#4) are reset to zero.
As shown in FIG. 2, in the second round of the communication control processing, the transmission and the reception of the query and the response are also executed between the master communication system 2 and the slave communication devices 4 (#1), (#2), (#3) and (#4), as with the first round of the communication control processing. However, in the example of FIG. 2, the master communication system 2 failed to receive a response (2, 2) fromthe siave communication device 4 (#2) within a predetermined time (the master communication system 2 received a timeout notification from the timeout error monitoring timer 23). Then, a count value of the timeout error counter 24 (#2) corresponding to the slave communication device 4 (#2) is increased by one, and the count value is set to 1. This is indicated by “EC=1"” in FIG. 2.
In the following third round of the communication control processing, the transmission and the reception of the query and the response are also executed between the master communication system 2 and the slave communication devices 4 (#1), (#2), (#3) and (#4), as with the second round of the communication control processing. In this case, however, the query transmitted to the slave communication device 4 (#2) from the master communication system 2 is the query (2, 2). This means that the query (2, 2) identical to the query (2, 2) in the second round 1s transmitted to the slave communication device 4 (#2).
Namely, since the master communication system 2 failed to receive the response (2, 2) from the slave communication device 4 (#2) in the second round, the master communication system 2 retransmitted (retried to transmit) the query (2, 2) which is identical to that in the second round.
Meanwhile, in the example of FIG. 2, the master communication system 2 failed again to receive the response (2, 2) from the slave communication device 4 (#2) in the third round cf the communication control processing. Therefore, the count value of the timeout error counter 24 (#2) is increased again by one, and the count value becomes 2. This is indicated by
WEC=2" in FIG. 2.
Furthermore, in the fourth round of the communication control processing, the transmission and the reception of the query and the response are also executed between the master communication system 2 and the slave communication devices 4 (#1), (#2), (#3) and (#4), as with the third round of the communication control processing. However, since the master communication system 2 failed to receive the response (2, 2) from the slave communication device 4 (#2) in the previous round, the master communication system 2 transmitted the query (2, 2) which is identical to those in the second round and the third round.
In the example of FIG. 2, the master communication system 2 failed again to receive the response (2, 2) from the slave communication device 4 (#2) even in the fourth round. Therefore, the count value of the timeout error counter 24 (#2) was increased again, and this is indicated by “EC=3" in FIG. 2. As described above, if the master communication system 2 failed to receive the response more than a predetermined number of times (for example, not less than three) in spite of transmission of the same query to the same slave communication device 4, the master communication system 2 determines that the slave communication device 4 is in failure {error).
Meanwhile, in the foregecing explanation, queries to be transmitted in the third round and the fourth round are identical to the query (2, 2) in the second round where the master communication system 2 failed to receive the response for the first time. However, the query may not be always limited to the same query. Namely, in FIG. 2, the communication contzol processing of the master communication system 2 may be described as “transmits a query (2, 3) to the slave § communication device 4 (#2), and failed to receive a response (2, 3)” for the third round and “transmits a query (2, 4) to the slave communication device 4 (#2), and failed to receive a response (2, 4)” for the fourth round, respectively.
Meanwhile, in the example such as a plant supervisory system to which the master-slave network system 10 is applied, it is not always uncommon that a query which instructs “acquire a temperature of the boiler” is transmitted every time to a slave communication device 4. In this case, it is unnecessary that the master communication system 2 retransmits a query identical to that of the previcus round in the next round even if the master communication system 2 failed to receive a response from the slave communication device 4 in some round.
The query to be transmitted in the next round is “acquire a temperature of the boiler (at the time)”, which was prepared in advance.
Therefore, for example, when it is planned that a query which instructs “acquire a temperature of the boiler” is transmitted to a slave communication device 4 in odd round and a guery which instructs “acquire a pressure of the boiler” is transmitted in even round to the slave communication device 4, the master communication system 2 may transmit the query which instructs “acquire a pressure of the boiler” that was planned to transmit in advance in the next round, instead of retransmission of the query which instructs “acguire a temperature of the boiler” even if the master communication system Z failed to receive a response to the guery which instructs “acquire a temperature of the boiler” in some round.
As described above, the error of the slave communication device 4 that is detected by a count value beyond a predetermined value by counting a number of rounds that successively failed to receive a response for each of the slave communication devices 4 may be caused by an error that the slave communication device 4 is unable to receive a query or transmit a response since the slave communication device 4 is not operated normally by some reasons. However, the case that the query does not reach the slave communication device 4 due to a trouble of the communication network 3 and a communication trouble that the response transmitted from the slave communication device 4 does not reach the master communication system 2 are alsc detected as the error. Generally, a communication trouble in the communication network 3 is a temporary error in most cases.
FIG. 3 is an illustration of a COMPARATIVE EXAMPLE showing transmission and reception of a query and a response between a master communication system and four slave communication devices according to a conventional technology.
As shown in FIG. 3, the transmission and the reception of the query and the response between the master communication system 2 and the slave communication devices 4 (#1), (#2), (#3) and {#4) are executad almost in a similar manner to the embodiment of the present invention shown in FIG. 2. The difference from the embodiment is a processing to be executed when the master communication system 2 fails to receive a response from the slave communication device 4.
In the example of FIG. 3, the master communication systen 2 failed to receive a response (2, 2) to a query (2, 2) which was transmitted to the slave communication device 4 (#2) in the second round. Then, in this case, the master communication system 2 immediately retries to receive the response (2, 2) by retransmitting the same query (2, 2) to the slave communication device 4 (#2). The master communication system 2 repeats the #5 retry a predetermined number of times (for example, three times). If the master communication system 2 is unable to receive the response (2, 2) in spite of the retry of the predetermined number of times, the master communication system 2 determines that the slave communication device 4 (#2) is in failure (error).
Comparing the example of FIG. 3 with the example of FIG. 2, the following difference can be seen between the two samples.
Namely, in FIG. 3 (COMPARATIVE EXAMPLE), when the master communication system 2 failed to receive a response froma slave communication device 4, the master communication system 2 immediately retries a predetermined number of times. On the other hand, in FIG. 2 (embodiment of the present invention), the master communication system 2 does not retry the predetermined number of times immediately, but reties once in the next round of the transmission and the reception between the master communication system 2 and the slave communication device 4 and reties once again in the round after the next, and
So on.
Therefore, a time from the first reception error of a response of the master communication system 2 to the determination of error of a slave communication device 4, which is the slave communication device 4 to transmit the response, through a predetermined number of retries in the case of FIG. 3 (COMPARATIVE EXAMPLE) is shorter than that in the case of FIG. 2 {embodiment of the present invention). Assuming that a timeout error time of a response reception in a slave communication device 4 (for example, #2) is two seconds and a time interval for repeating a processing of the transmission and the reception of a query and a response between the master communication system 2 and the slave communication device 4 is one minute, a time until the determination of the error of the slave communication device 4 in the case of FIG. 3 (COMPARATIVE
EXAMPLE) is six seconds, and the time in the case of FIG. 2 {embodiment of the present invention) is three minutes.
In this case, in the case of FIG. 3 (COMPARATIVE EXAMPLE), the master communication system 2 can detect the error of the slave communication device 4 in a shorter time, and for this reason, there is a possibility to misjudge a temporary error as a permanent error. On the other hand, in the case of FIG. 2 (embodiment of the present invention), a time until detection of the error of the slave communication device 4 is longer than that in the case of FIG. 3. However, the possibility to misjudge a temporary error as a permanent error becomes to be small. For example, even if there is the case that a temporary error continues six seconds, a possibility that the temporary error continues three minutes is very small.
In addition, if a timeout error of a response reception in the master communication system 2 is caused by a transmission delay due to an incidental processing congestion in the slave communication device 4, in the case of FIG. 3 {COMPARATIVE
EXAMPLE), the slave communication device 4 is immediately requested to transmit a reply by the retry of query transmission of the master communication system 2. Then, the processing congestion in the slave communication device 4 may become worse.
In this case, even if the query is transmitted the predetermined number of times from the master communication system 2, the slave communication device 4 is unable to transmit a response, and finally, the slave communication device 4 is misjudged as “the slave communication 4 is in permanent error”.
On the other hand, in the case of FIG. 2 (embodiment of the present invention), the query is not retransmitted immediately, and the query is retransmitted to the slave communication device 4 in the next round. Therefore, since a possibility that the incidental processing congestion in the slave communication device 4 disappears until the next round is large, the slave communication device 4 is able to transmit the response within a predetermined time. As a result, a possibility that the slave communication device 4 is misjudged as “the slave communication device 4 is in permanent error” becomes very small. In addition, a delay of processing of transmission and reception of a query and a response for the following slave communication devices 4 also becomes very rare.
FIG. 4 is an example of a flowchart of a communication control processing to be executed by a2 communication control processor 21 of a master communication system according to the embodiment of the present invention. The communication control processor 21 can achieve, for example, a communication control processing of the master communication system 2 shown in FIG. 2 by executing the communication control processing.
Hereinafter, explanations will be given of the communication control processing to be executed by the communication control processor 21 in reference to FIG. 4 and FIG. 1.
The communication control processor 21 of the master communication system 2: first assigns (step $11) a slave communication device 4 to communicate with; acquires (step S12) a count value of a timeout error counter 24 corresponding to the assigned slave communication device 4; and determines (step
S13) whether or not the count value is “0”. Meanwhile, an initial count value of a timeout error counter 24 corresponding to each of the slave communication devices 4 is set to “07,
Next, if the count value of the timeout error counter 24 is “0” in the step S13 (step S13: Yes), that is, when a response to the query transmission was successfully received in the previous round, the communication control processor 21 transmits a predetermined query to a slave communication device 4 assigned in the step S11 (step S14). On the other hand, if the count value is not “0” (step S13: No), that is, when the response to the query transmissicn in the previous round was not received, the communication control processor 21 transmits a query identical to the query transmitted in the previous round to the slave communication device 4 assigned in the step S11 {step S15).
Meanwhile, as described above, in the application to, for example, a plant supervisory system, an originally predetermined query may be transmitted instead of the query identical to the query transmitted in the previous round.
Therefore, in this case, since the processing in the step S15 becomes identical to the step S14, the processing of the steps
S12, S13 and S15 may be omitted from the flowchart of FIG. 4.
Meanwhile, in the foregoing processing, information for indicating a slave communication device 4 and a query to be transmitted to the slave communication device 4 depending on the assigned slave communication device 4 may be stored in advance in a memory, not shown, of the communication control processor 21, or may be supplied in each case from the master processing device 1.
Subsequently, the communication control processor 21 determines whether or not a response transmitted from the slave communication device 4 is received in response to the query transmitted in the step $14 or S15 {step S16). According to a result of the determination, when the response is received (step S16: Yes), a timeout error counter 24 corresponding to the slave communication device 4 assigned in the step S11 is reset to zero (step S17). The response received in the step
S16 is, for example, transmitted to the master processing device 1 after the response is once temporarily stored in the memory, not shown, of the communication control processor 21.
After the step S17, the processing returns to the step S11, and the communication control processor 21 executes again the processing following the step S11.
Next, according to the result of the determination in the step S16, when the response is not received (step S16: No), the communication control processor 21 determines whether or not a timeout error is notified from the timeout error monitoring timer 23 (step S18), and if the timeout error is not notified (step S18: No), the processing returns to the step S16 that determines whether or not the response is received. On the other hand, if the timeout error is notified (step S18: Yes), a count number of a timeout error counter 24 corresponding to the slave communication device 4 assigned in the step S11 is increased by one (step S519).
Next, the communication control processor 21 determines (step S20) whether or not the count value of the timeout error counter 24 reached a predetermined value N (for example, N=3), and 1£f the count value is not reached the predetermined value
N (step S20: No), the processing returns to the step S11 and the processing following the step S11 is executed again. On the other hand, if the count value reached the predetermined value N in the step S20 (step $20: Yes), the communication control processor 21 determines that the slave communication device 4 assigned in the step 511 is in failure (error), and outputs error information that indicates to be in error (step 521). The output destination of the error information may be, for example, the master processing device 1, or may be a display 1f the master communication system 2 is provided with some kind of display.
After the step 521, the processing returns to the step 511, and the communication contrel processor 21 executes again the processing following the step S11.
Meanwhile, in the step $13 of the communication control processing which was explained using FIG. 4, the communication control processor 21 determines whether or not the response to the previous query transmission is successfully received by determining whether or not the count value of the timeout error counter 24 is “0”. However, the method for the determination 1s not limited to this. For example, a timeout error flag corresponded to each of the slave communication devices 4 may be disposed in the master communication system 2 independently from the timeout error counter 24, and success and failure of reception of the response may be determined by the timeout error flag.
In this case, if the timeout error flag is set to “0” when the communication control processor 21 of the master communication system 2 successfully received the response and if the timeout error flag is set to “1” when the communication control processor 21 failed to receive the response, the “0” of the timeout error flag means “success” of the reception of the response and the “1” means failure of the reception of the response. (Modified Example of the Embodiment)
FIG. 5 is an illustration showing an example of a configuration of a master-slave network system according to a modified example of embodiment of the present invention. It is noted that in FIG. 5, a constituent identical to that in FIG. 1 is given the same reference number, and the explanation thereof will be omitted.
Differences between a master-slave network system 10A according to a modified example of the embodiment shown in FIG. 5 and the master-slave network system 10 according to the original embodiment shown in FIG. 1 are that configurations of the communication network 3 are different to each other and that an exception error counter 25 is added in a master communication system 2A.
In the modified example of the embodiment, the communication network 3 is divided into two communication networks 3a, 3b by a network gateway 6. Here, the communication network 3a is, for example, a MODBUS-TCP network, and the § communication network 3b is, for example, a RS-485 standard network cof MODBUS protocol.
In FIG. 5, a slave communication device 4 is connected to each of the communication networks 3a, 3b. If necessary in the following descriptions of the specification, a slave communication device 4 connected to the communication network 3a is called an upper slave communication device 4a, and a slave communication device 4 connected to the communication network 3b is called a lower slave communication device 4b. In addition, as shown in FIG. 1, various kinds of surveillance devices are connected to each ¢f the slave communication devices 4. However, drawing of the surveillance devices is omitted here.
The transmission and the reception of a query and a response between the master communication system 2A and the lower slave communication device 4b are executed through the network gateway 6. The network gateway 6 has a function, for example, to transform a protocol and an electric signal between the communication network 3a and the communication network 3b.
The function is basically a simple transformation. Therefore, when the lower slave communication device 4b is normally operated, the network gateway 6 looks as 1f it is not existed when the network gateway 6 is seen from the side of the master communication system 2A.
Bowever, if the lower slave communication device 4b is in failure (error) and when the lower slave communication device 4b is unable to return a response to the query from the master communication system 2A, a timeout error due to the not-returned response is detected by the network gateway 6. At this time, the network gateway 6 transmits information containing a timeout error (hereinafter, this timeout error is called as exception error) indicating that the response from the lower slave communication device 4b was not received to the master communication system 2A.
Therefore, the communication controcl processor 21 of the master communication system 2A is notified that the response was not transmitted from the lower slave communication device 4b by the exception error transmitted from the network gateway 6 instead of notification from the timeout error monitoring timer 23. Meanwhile, after a query is transmitted to the lower slave communication device 4b, if the master communication system 2A is unable to receive any response including an exception error from the network gateway 6 within a predetermined time, the master communication system 2A determines that the network gateway 6 itself is in failure (error).
In FIG. 5, the exception error counter 25 added to the master communication system 2A is disposed corresponded to each of the lower slave communication devices 4b, and counts a number of the exception errors transmitted from the network gateway 6 with respect to the each of the slave communication devices 4b. Meanwhile, the exception error counter 25 is also disposed in the memory within the communication control processor 21 as § with the timecut error counter 24.
FIG. 6 is an example of a flowchart of a communication control processing to be executed by a communication control processor 21 of a master communication system 2A according to a modified example of the embodiment of the present invention.
A basic configuration of the communication control processing is identical to the flowchart shown in FIG. 4. However, in the modified example of the embodiment, with respect to reception of a response from a lower slave communication device 4b, a timeout error is monitored by the network gateway 6, and the timeout error is reported to the master communication system as an exception error. Therefore, in FIG. 6, a processing step (step S31-step S35) corresponding to the reception of the exception error is added to the flowchart of FIG. 4.
Below, explanations will be given of the flowchart of FIG. 6. A processing step identical to that of FIG. 4 is given the same step number, and the explanation of the same step will be omitted.
In the flowchart of FIG. 6, the processing of step S1l-step
Sle is identical to that of the flowchart of FIG. 4 except for step S51Z2a. In the step S12a, the communication control processor 21 acguires a count value of an error counter corresponding to the slave communication device 4 assigned in the step S11. Here, the error counter indicates a timeout error counter 24 when the slave communication device 4 is an upper slave communication device 4a, and an exception error counter 25 when the slave communication device 4 is a lower slave communication device 4b.
In addition, as with the case of FIG. 4, in the application to, for example, a plant supervisory system, an originally predetermined query may be transmitted in the step S15 instead of a query identical to the query transmitted in the previous round. In this case, since the processing in the step S15 becomes identical to that of the step S14, the processing of steps S12, S13 and S15 may be omitted from the flowchart of FIG. 6.
In addition, the communication control processor 21 determines whether or not a response from the slave communication device 4 is received in the step S16. If the response is not received (step $16: No), the processing to be executed in the following steps {step S18-step S21) is identical to that of the flowchart of FIG. 4. In addition, according to a result of the determination in the step S16, if the response is received (step S16: Yes), the communication control processor 21 executes the processing following the step
S17 because there is a possibility that an exception error is included in the response.
Namely, the communication control processor 21 first resets a count value of a timeout error counter 24 corresponding to the slave communication device 4 assigned in the step S11 to zero (step S17). Meanwhile, in this case, when the slave communication device 4 assigned in the step S11 is a lower slave communication device 4, since a timeout error counter 24 corresponding to the lower slave communication device 4b is not disposed, substantive processing is not executed.
Next, the communication control processor 21 determines whether or not an exception error is included in the response from the slave communication device 4 assigned in the step S11 (step 831). Then, according to the result of the determination, when the exception error is not included in the response (step
S31: No), the communication control processor 21 resets an exception error counter corresponding to the lower slave 16 communication device 4b to zero (step $32), then, the processing returns to the step 11, and the communication control processor 21 executes again the processing following the step S11.
On the other hand, according to the result of the determination in the step S31, when the exception error is included in the response from the slave communication device 4 assigned in the step S11 (step $31: Yes), the slave communication device £4 1s a lower slave communication device 4b, then, the communication control processor 21 increases a count value of the exception error counter corresponding to the lower slave communication device 4b by one (step S33).
Next, the communication control processor 21 determines (step S34) whether or not a count value of the exception error counter reached a predetermined value N (for example, N=3). If the count value is not reached the predetermined value N (step
S34: No), the processing returns to the step S11 and the communication control processor 21 executes again the processing following the step 11. In addition, in the step $34, if the count value of the exception error counter reached the predetermined value N (step S534: Yes), the communication control processor 21 determines that the lower slave communication device 4b is in failure (error) and outputs error information indicating that the lower slave communication device 4b is in failure (error) (step S35). Meanwhile, the output destination of the error information may be, for example, 16 the master processing device 1, or may be a display if the master communication system 2 is provided with some kind of display.
Subsequent to the step 535, the processing returns to the step S11 and the communication control processor 21 executes again the processing following the step S11.
As described above, since a basic configuration of the communication network 3 and processing contents of the communication control processor 21 in the modified example of the embodiment are identical to those in the original embodiment, when the master communication system 2A determines whether or not a slave communication device 4 is in failure (error), the master communication system 2A hardly misijudges a temporary error as a permanent error, as with the original embodiment.

Claims (3)

WHEAT IS CLAIMED IS;
1. A communication control method of a master-slave communication system which is configured in such a manner that § a plurality of slave communication devices are connected to a master communication system through a communication network, wherein the master communication system repeatedly executes: communication device assignment processing that the master communication system assigns one slave communication device among the plurality of the slave communication devices; query transmission processing that transmits a query to the assigned slave communication device; and response reception processing that receives a response 16 from the slave communication device to which the query is transmitted, as a series of a communication processing unit, wherein the master communication system comprises: a timeout error monitoring timer that detects whether or not the response to the transmitted query is received; and a timeout error counter that counts a number of detections of successive timeout errors for each of the slave communication devices; and wherein in the response reception processing, when the response is received from the slave communication device assigned in the communication device assignment processing, the master communication system executes a step of: resetting a count value of the timeout error counter corresponding to the slave communication device to zero; and when a timeout error is detected based on a notification from the timeout error monitoring timer, the master communication system executes steps of: increasing the count value of the timeout error counter corresponding to the slave communication device by one; terminating the communication processing unit immediately; determining whether or not a count value of the error counter reached a predetermined count value, while terminating the communication processing unit; and outputting error information indicating that the slave 16 communication device is in failure when the count value of the error counter reached the predetermined count vale.
2. A medium storing communication control programs for having a computer function as a master communicaiion system of a master-slave communication system which is configured in such a manner that a plurality of slave communication devices are connected to the master communication system through a communication network, wherein the respective programs having the master communication system repeatedly execute: communication device assignment processing that the master communication system assigns one slave communication device among the plurality of the slave communication devices; query transmission processing that transmits a query to the assigned slave communication device; and response reception processing that receives a response from the slave communication device to which the query is transmitted, as a series of a communication processing unit, wherein the master communication system comprises:
a timeout error monitoring timer that detects whether or not the response to the transmitted query is received; and a timeout error counter that counts a number of detections of successive timeout errors for each of the slave cemmunication devices, and wherein in the response reception processing, when the response is received from the slave communication device assigned in the communication device assignment processing, the respective programs have the master communication system execute a step of:
resetting a count value of the timeout error counter corresponding to the slave communication device to zero; and when a timeout error is detected based on a notification from the timeout error monitoring timer, the respective programs have the master communication system execute steps of:
increasing the count value of the timeout error counter corresponding to the slave communication device by one;
terminating the communication processing unit immediately; determining whether or not a count value of the error counter reached a predetermined count value, while terminating the communication processing unit; and outputting error information indicating that the slave communication device is in failure when the count value of the error counter reached the predetermined count vale.
3. A master communication system of a master-slave communication system which is configured in such a manner that a plurality of slave communication devices are connected to the master communication system through a communication network, wherein the master communication system repeatedly executes: communication device assignment processing that the master communication system assigns one slave communication device among the plurality of the slave communication devices; guery transmission processing that transmits a query to the assigned slave communication device; and response reception processing that receives a response from the slave communication device to which the query is transmitted, as a series of a communication processing unit; wherein the master communication system comprises: a timeout error monitoring timer that detects whether or not the response to the transmitted query is received; and a timeout error counter that counts a number of detections of successive timeout errors for each of the slave communication devices; and wherein in the response reception processing, when the response is received from the slave communication device assigned in the communication device assignment processing, the master communication system resets a count value of the timeout error counter corresponding to the slave 16 communication device to zero, and when a timeout error is detected based on a notification from the timeout error monitoring timer, the master communication system: increases the count value of the timeout error counter corresponding to the slave communication device by one; then, terminates the communication processing unit immediately; determines whether or not a count value of the error counter reached a predetermined count value, while terminating the communication processing unit; and outputs error information indicating that the slave communication device is in failure when the count value of the error counter reached the predetermined count vale.
SG2011017142A 2010-03-10 2011-03-09 Communication control method, communication control program and master communication system SG174690A1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010052562A JP5123968B2 (en) 2010-03-10 2010-03-10 Communication control method, communication control program, and master communication device

Publications (1)

Publication Number Publication Date
SG174690A1 true SG174690A1 (en) 2011-10-28

Family

ID=44794050

Family Applications (1)

Application Number Title Priority Date Filing Date
SG2011017142A SG174690A1 (en) 2010-03-10 2011-03-09 Communication control method, communication control program and master communication system

Country Status (2)

Country Link
JP (1) JP5123968B2 (en)
SG (1) SG174690A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020214405A1 (en) * 2019-04-15 2020-10-22 Microsoft Technology Licensing, Llc Detecting malfunction of mobile broadband modems based on response patterns

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6551259B2 (en) * 2016-02-26 2019-07-31 オムロン株式会社 Master device, slave device, error monitoring system, master device control method, and control program
JP7420761B2 (en) * 2021-04-02 2024-01-23 ソフトバンク株式会社 Monitoring devices, monitoring methods, programs and monitoring systems

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04100441A (en) * 1990-08-20 1992-04-02 Fujitsu Ltd Communication fault processing system
JPH06276202A (en) * 1993-03-18 1994-09-30 Fuji Xerox Co Ltd No-answer fault monitoring device
JPH1013970A (en) * 1996-06-20 1998-01-16 Meidensha Corp Automatic life detecting method of sequencer remote i/o transmitter
JP3821711B2 (en) * 2001-12-27 2006-09-13 株式会社神戸製鋼所 Communication management device, communication management program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020214405A1 (en) * 2019-04-15 2020-10-22 Microsoft Technology Licensing, Llc Detecting malfunction of mobile broadband modems based on response patterns
US10826754B1 (en) 2019-04-15 2020-11-03 Microsoft Technology Licensing, Llc Detecting malfunction of mobile broadband modems based on response patterns

Also Published As

Publication number Publication date
JP5123968B2 (en) 2013-01-23
JP2011188322A (en) 2011-09-22

Similar Documents

Publication Publication Date Title
US10003525B2 (en) Methods and apparatus to provide redundancy in a process control system
CN101056194B (en) A SNMP message transfer method and device
US11063855B2 (en) Monitoring of the data transmission in a client/server-based device access system
JP3454297B2 (en) Method and apparatus for testing a link between network switches
SG174690A1 (en) Communication control method, communication control program and master communication system
US20030084384A1 (en) Residual error handling in a can network
US8676930B2 (en) System and method for multiport automation
US8923138B2 (en) Packet relay device, packet relay system, and fault detection method
WO2017001281A1 (en) A power supply and a power supply method
JP6225462B2 (en) Disaster prevention reception system
JP4710719B2 (en) Retransmission device when communication is abnormal
JPH05225161A (en) Network monitoring system
JP3419979B2 (en) Device state management method and data communication system
JP2937871B2 (en) Polling monitoring method
JPH09261374A (en) Multiple dwelling house centralized monitoring system
JP2007046400A (en) Control system for electrically driven switching devices
JP5240285B2 (en) Retransmission device when communication is abnormal
JP2003179612A (en) Highly reliable transmission line control system
JPH04329737A (en) Mutual supervisory unit for communication system
JPH01183937A (en) Network supervising system
JPH0795218A (en) Data transmitting device and method
JPS63296422A (en) Detecting system for abnormal transmission state
JPH03255745A (en) Loop-shaped signal communication system
JPH09319683A (en) Socket device with line monitoring function
JPH0522298A (en) Polling control system