Communication system, master device, slave device, and control method of communication system

By using a counter synchronization mechanism between master and slave devices, unnecessary data transmission in the communication system is reduced, the problem of increased network bandwidth is solved, and precise synchronization of time information and effective bandwidth management are achieved.

CN117157937BActive Publication Date: 2026-08-25PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202280026098.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-04-09
Filing Date
2022-02-15
Publication Date
2026-08-25
Estimated Expiration
2042-02-15

AI Technical Summary

Technical Problem

In existing communication systems, the periodic sending and receiving of large amounts of time information leads to increased network bandwidth usage.

Method used

The master and slave devices use counters to count, and synchronize the time by sending timing information, reducing unnecessary data transmission. By using different accumulation and reset mechanisms of the counters, the timing information can be accurately obtained without increasing the amount of communication data.

Benefits of technology

It effectively suppressed the increase in network bandwidth usage and reduced the deviation of time information between master and slave devices, especially significantly reducing network bandwidth requirements in nanosecond-level notifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117157937B_ABST
    Figure CN117157937B_ABST
Patent Text Reader

Abstract

A network of a communication system is inhibited from using a bandwidth. The communication system (10) has a master device (12) and a slave device (14). The master device (12) has a first counter (24) that increments a first count value each time a first unit of time elapses, a second counter (26) that updates a second count value each time a second unit of time elapses, and a master transmission section (18) that transmits timing information indicating a timing at which the second count value is updated to the slave device (14). The slave device (14) has a third counter (36) that increments a third count value each time the first unit of time elapses, a fourth counter (38) that increments a fourth count value each time a third unit of time shorter than the first unit of time elapses, the fourth counter (38) resetting the fourth count value at a timing at which the third count value is incremented, and a slave reception section (32) that receives the timing information from the master transmission section (18).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a communication system, a master device, a slave device, and a control method for the communication system. Background Technology

[0002] Previously, a communication system having a master device and a slave device was known. For example, Patent Document 1 discloses a communication system having a time master node as an example of a master device and a time slave node as an example of a slave device.

[0003] Existing technical documents

[0004] Patent documents

[0005] Patent Document 1: Japanese Patent No. 5377663 Summary of the Invention

[0006] However, the communication system in Patent Document 1 has the following problem: due to the periodic sending and receiving of time information from the master node, which involves a large amount of information, the network bandwidth usage increases.

[0007] This disclosure was made to solve such problems, and its purpose is to provide a communication system, etc., that can suppress the increase in network bandwidth usage.

[0008] One aspect of the communication system disclosed herein includes a master device and one or more slave devices communicating with the master device. The master device includes: a first counter that increments a first count value every first unit of time; a second counter that updates a second count value every second unit of time; and a master transmitter that transmits timing information indicating the timing of the update of the second count value to each of the one or more slave devices. Each of the one or more slave devices includes: a third counter that increments a third count value every first unit of time; a fourth counter that increments a fourth count value every third unit of time shorter than the first unit of time, and resets the fourth count value at the timing when the third counter increments the third count value; and a slave receiver that receives the timing information transmitted from the master transmitter.

[0009] Another aspect of this disclosure relates to a master device comprising: a first counter that increments a first count value each time a first unit of time elapses; a second counter that updates a second count value each time a second unit of time elapses; and a master transmitter that transmits timing information indicating that the second count value has been updated to one or more slave devices communicating with the master device.

[0010] Another aspect of this disclosure relates to a slave device communicating with a master device. The master device includes: a first counter that increments a first count value every first unit of time; a second counter that updates a second count value every second unit of time; and a master transmitter that sends timing information to the slave device indicating that the second count value has been updated. The slave device includes: a third counter that increments a third count value every first unit of time; a fourth counter that increments a fourth count value every third unit of time shorter than the first unit of time, and resets the fourth count value at the time the third counter increments the third count value; and a slave receiver that receives the timing information sent from the master transmitter.

[0011] Another aspect of this disclosure relates to a control method for a communication system comprising a master device and one or more slave devices communicating with the master device. The master device performs the following processing: incrementing a first count value every first unit of time; updating a second count value every second unit of time; and sending timing information indicating that the second count value has been updated to one or more slave devices. Each of the one or more slave devices performs the following processing: incrementing a third count value every first unit of time; incrementing a fourth count value every third unit of time shorter than the first unit of time; resetting the fourth count value at the time the third count value is incremented; and receiving the timing information sent from the master device.

[0012] According to this disclosure, a communication system that can suppress the increase in network bandwidth usage can be provided. Attached Figure Description

[0013] Figure 1 This is a block diagram illustrating the functional structure of the communication system according to the first embodiment.

[0014] Figure 2 It is used to explain by Figure 1 The diagram shows the counting performed by the first and second counters of the main device of the communication system.

[0015] Figure 3 It is used to explain by Figure 1 The diagram shows the counting performed by the third and fourth counters of the slave device in the communication system.

[0016] Figure 4 It means Figure 1 A flowchart illustrating an example of the operation of the main device in a communication system.

[0017] Figure 5 It means Figure 1 A flowchart illustrating an example of the operation of a slave device in a communication system.

[0018] Figure 6 It means Figure 1 A flowchart illustrating an example of the operation of a slave device in a communication system.

[0019] Figure 7 It is used for explanation Figure 1 A diagram illustrating an example of the operation of a slave device in a communication system.

[0020] Figure 8 It is used for explanation Figure 1 A diagram illustrating an example of the operation of a slave device in a communication system.

[0021] Figure 9 This is a flowchart illustrating an example of the operation of a slave device in the communication system according to the second embodiment.

[0022] Figure 10 It is used for explanation Figure 9 A diagram illustrating an example of the operation of a slave device in a communication system. Detailed Implementation

[0023] The embodiments of this disclosure will now be described. Furthermore, the embodiments described below are all intended to illustrate a specific example of this disclosure. Therefore, the numerical values, structural elements, the arrangement and connection methods of structural elements, and the processes and their order shown in the following embodiments are examples, and are not intended to limit the invention. Therefore, structural elements in the following embodiments that are not described in the independent claims representing the highest-level concept of this disclosure will be described as arbitrary structural elements.

[0024] In addition, the figures are schematic diagrams and are not necessarily strictly illustrated. Furthermore, in each figure, structures that are substantially the same as those in other figures are labeled with the same reference numerals, and repeated descriptions are omitted or simplified.

[0025] (First Implementation)

[0026] Figure 1 This is a block diagram illustrating the functional structure of the communication system 10 according to the first embodiment. Figure 2 It is used to explain by Figure 1 The diagram shows the counting performed by the first counter 24 and the second counter 26 of the main device 12 of the communication system 10. Figure 3 It is used to explain by Figure 1 A diagram showing the counting performed by the third counter 36 and the fourth counter 38 of the slave device 14 in the communication system 10. (Refer to...) Figures 1 to 3 To illustrate communication system 10.

[0027] like Figure 1 As shown, the communication system 10 includes a master device 12 and multiple slave devices 14 that communicate with the master device 12. The communication system 10 is a system that communicates in a master-slave manner. For example, the master device 12 and the multiple slave devices 14 constitute an industrial network, and each slave device in the master device 12 and the multiple slave devices 14 is an industrial device. For example, the network topology in this industrial network is a ring or a linear network. Alternatively, the communication system 10 may not have multiple slave devices 14 and may have only one slave device 14.

[0028] The master device 12 is a communication device that functions as a master device in master-slave communication (e.g., industrial equipment). The master device 12 is capable of wired communication with multiple slave devices 14 via communication lines. The master device 12 includes a master control unit 16, a master transmitter 18, a master receiver 20, and a master storage unit 22. Furthermore, the master device 12 may also be configured to wirelessly communicate with multiple slave devices 14.

[0029] The main control unit 16 is a control unit that performs information processing and other functions for controlling the main device 12. For example, the main control unit 16 is implemented by a microcomputer or processor. Furthermore, the functions of the main control unit 16 are implemented by executing computer programs stored in the main storage unit 22 using the microcomputer or processor constituting the main control unit 16. The main control unit 16 has a first counter 24 and a second counter 26.

[0030] like Figure 2 As shown, the first counter 24 is a counter that increments a first count value every first unit of time. For example, the first unit of time is preset to 1 millisecond. For example, the first counter 24 is based on an internal clock C12 built into the main device 12, and increments the first count value every first unit of time. For example, the first count value represents the time in the communication system 10. For example, the first counter 24 is sometimes also referred to as a minimum time measurement counter. For example, the first counter 24 is implemented by a circuit (hereinafter simply referred to as a circuit) equipped with electronic components.

[0031] The second counter 26 is a counter that updates its second count value every second unit of time. For example, the second unit of time is preset to 2 milliseconds. For example, the second counter 26 updates its second count value every second unit of time based on the internal clock C12 built into the main device 12. That is, the second counter 26 updates its second count value every second unit of time based on the same internal clock C12 as the first counter 24. For example, the second counter 26 is sometimes also referred to as a TMG (timer) counter. For example, the second counter 26 is implemented by circuitry, etc.

[0032] In this embodiment, the second unit time is longer than the first unit time and is an integer multiple of the first unit time. Specifically, in this embodiment, the second unit time is twice the first unit time. Alternatively, the second unit time could be three or four times the first unit time, etc. Furthermore, the second unit time may not be an integer multiple of the first unit time. Also, although details will be described later, in this embodiment, the second unit time is an integer multiple of the third unit time.

[0033] For example, the first counter 24 begins accumulating a first count value from the moment the master transmitter 18 sends a timestamp command to the plurality of slave devices 14, and the second counter 26 begins updating a second count value from that moment. Therefore, in this embodiment, the first counter 24 accumulates the first count value at the moment the second counter 26 updates the second count value. In other words, the moment the second counter 26 updates the second count value is also the moment the first counter 24 accumulates the first count value.

[0034] like Figure 1 As shown, the main transmitter 18 is a transmitter used to send various types of information from the main device 12 to the multiple slave devices 14 respectively. For example, the main transmitter 18 is implemented by a communication circuit or the like. Specifically, for example, the main transmitter 18 is implemented by a wired communication circuit or the like that corresponding to a wired LAN (Local Area Network) or similar communication standard. Furthermore, in the case where the main device 12 and the multiple slave devices 14 communicate wirelessly respectively, the main transmitter 18 is implemented by a wireless communication circuit or the like that corresponding to a wireless LAN (Local Area Network) or similar communication standard.

[0035] The master transmitter 18 sends timing information indicating when the second count value has been updated to each of the multiple slave devices 14. For example, the timing information includes time-series data of the second count value. For example, the master transmitter 18 sends the timing information to each of the multiple slave devices 14 periodically by sending the second count value to each of them. In this case, for example, the timing indicating when the second count value is switched is the timing when the second count value is updated, as indicated by the time-series data of the second count value. Furthermore, the timing information may also include update information indicating that the second count value has been updated. For example, the master transmitter 18 may also send the timing information to each of the multiple slave devices 14 whenever the second count value is updated. In this case, for example, the timing indicating when the update information is sent is the timing when the second count value is updated.

[0036] Additionally, the master transmitter 18 sends a first count value to one of the plurality of slave devices 14, which serves as the source of a transmission request received by the master receiver 20. This transmission request is a transmission request for the first count value.

[0037] The main receiving unit 20 is a receiving unit of the main device 12 used to receive various types of information from multiple slave devices 14. For example, the main receiving unit 20 receives transmission requests sent from the slave transmitting units 30 of each of the multiple slave devices 14. For example, the main receiving unit 20 is implemented by a communication circuit or the like. Specifically, for example, the main receiving unit 20 is implemented by a wired communication circuit or the like that corresponding to a communication standard such as a wired LAN (Local Area Network). As a wired LAN, for example, is Ethernet (registered trademark).

[0038] The main storage unit 22 is a storage device that stores information required for the aforementioned information processing, as well as the aforementioned computer programs, etc. For example, the main storage unit 22 is implemented using a semiconductor memory or the like.

[0039] Each of the multiple slave devices 14 is a communication device (e.g., industrial equipment) that functions as a slave device in master-slave communication. Each of the multiple slave devices 14 is capable of wired communication with the master device 12. Each of the multiple slave devices 14 has a slave control unit 28, a slave transmitting unit 30, a slave receiving unit 32, and a slave storage unit 34.

[0040] The slave control unit 28 is a control unit that performs information processing and other functions for controlling the slave device 14. For example, the slave control unit 28 is implemented by a microcomputer or processor. Furthermore, the functions of the slave control unit 28 are implemented by executing a computer program stored in the slave storage unit 34 by the microcomputer or processor constituting the slave control unit 28. The slave control unit 28 includes a third counter 36, a fourth counter 38, and a determination unit 40.

[0041] like Figure 3 As shown, the third counter 36 is a counter that increments a third count value every time a first unit of time elapses. That is, the third counter 36 increments a third count value every unit of time that is the same as the unit of time during which the first counter 24 increments the first count value. For example, the third counter 36 is based on the internal clock C14 built into the slave device 14, and increments the third count value every time a first unit of time elapses. Furthermore, since an error may occur between the frequency of the internal clock C12 of the master device 12 and the frequency of the internal clock C14 of the slave device 14, a difference may occur between the actual accumulation period of the first count value and the actual accumulation period of the third count value. For example, the third count value represents the time in the communication system 10. For example, the third counter 36 is sometimes also referred to as a minimum time measurement counter. For example, the third counter 36 is implemented by circuitry, etc.

[0042] The fourth counter 38 is a counter that increments its fourth count value every time a third unit time shorter than the first unit time elapses, and resets its fourth count value at the time when the third counter 36 increments its third count value. In other words, the fourth counter 38 resets its fourth count value at the moment the third counter 36 increments its third count value. For example, the third unit time is preset to 31.25 microseconds. For example, the fourth counter 38 is based on an internal clock C14 built into the slave device 14, and increments its fourth count value every time a third unit time elapses. That is, the fourth counter 38 is based on the same internal clock C14 as the third counter 36, and increments its fourth count value every time a third unit time elapses. For example, the fourth counter 38 is sometimes referred to as an internal time measurement counter. For example, the fourth counter 38 is implemented by circuitry, etc.

[0043] The slave device 14, by having a fourth counter 38 that increments a fourth count value every time a third unit of time shorter than the first unit of time elapses, can obtain more refined time information than the time information (time information exchanged on the network) based on the first count value exchanged between the master device 12 and the slave device 14. In other words, by having the fourth counter 38, the time resolution of the time information possessed by the slave device 14 can be improved without increasing the amount of communication data exchanged between the master device 12 and the slave device 14.

[0044] In this embodiment, the third unit time is an integer fraction of the first unit time. Specifically, in this embodiment, the third unit time is one thirty-second of the first unit time. Alternatively, the third unit time could be, for example, one-half or one-third of the first unit time. Furthermore, the third unit time may not be an integer fraction of the first unit time.

[0045] Furthermore, as described above, in this embodiment, the second unit time is an integer multiple of the third unit time. Specifically, in this embodiment, the second unit time is 64 times the third unit time. Alternatively, the second unit time could be 1 or 2 times the third unit time, etc. Also, the second unit time may not be an integer multiple of the third unit time.

[0046] For example, the third counter 36 begins accumulating a third count value from the moment the receiver 32 receives a timestamp command sent from the master device 12, and the fourth counter 38 begins accumulating a fourth count value from that moment. Additionally, for example, the master device 12 periodically sends the second count value of the second counter 26 to each of the multiple slave devices 14, and updates the second count value based on the internal clock C12 of the master device 12.

[0047] The determination unit 40 determines, based on the timing information received from the receiving unit 32, whether at least one of the cumulative counts of the third count and the cumulative counts of the fourth count within the update period of the second count is normal. For example, the update period of the second count is the period from the timing of the previous update of the second count to the timing of the current update. That is, the update period of the second count is based on the internal clock C12 of the main device 12. For example, the determination unit 40 determines the timing of the previous update of the second count and the timing of the current update based on the timing information, and thereby determines whether at least one of the cumulative counts of the third count and the cumulative counts of the fourth count within the period from the timing of the previous update of the second count to the timing of the current update is normal.

[0048] like Figure 1 As shown, the transmitter 30 is a transmitter used to send various information from the slave device 14 to the master device 12. For example, the transmitter 30 is implemented by a communication circuit or the like. Specifically, for example, the transmitter 30 is implemented by a wired communication circuit or the like that corresponding to communication standards such as wired LAN (Local Area Network).

[0049] If, as determined by the determination unit 40, at least one of the number of times the third count value is accumulated or the number of times the fourth count value is accumulated is abnormal within the update cycle of the second count value, a transmission request for the first count value is sent from the transmission unit 30 to the main device 12.

[0050] The receiver 32 is a receiver unit of the slave device 14 used to receive various information from the master device 12. For example, the receiver 32 receives timing information transmitted from the master transmitter 18. For example, the receiver 32 is implemented by a communication circuit or the like. Specifically, for example, the receiver 32 is implemented by a wired communication circuit or the like that corresponding to communication standards such as wired LAN (Local Area Network).

[0051] The slave storage unit 34 is a storage device that stores information required for the aforementioned information processing, as well as the aforementioned computer programs, etc. For example, the slave storage unit 34 is implemented using a semiconductor memory or the like.

[0052] Figure 4 It is shown Figure 1 A flowchart illustrating an example of the operation of the main device 12 in the communication system 10. (Refer to...) Figure 4 Here is an example to illustrate the operation of the main device 12 of the communication system 10.

[0053] like Figure 4As shown, when the master device 12 establishes wired communication with the slave device 14, it initializes the first counter 24 and the second counter 26 (step S1). For example, the master device 12 initializes the first counter 24 by setting the first count value to 0, and initializes the second counter 26 by setting the second count value to 0.

[0054] When the master device 12 initializes the first counter 24 and the second counter 26, it sends an initial timestamp command (step S2). For example, the timestamp command is a command that writes a first count value, and the master device 12 sends the command with the first count value written. Here, the first count value is 0. Additionally, for example, the master device 12 also writes a second count value in the initial timestamp command. Here, the second count value is 1. That is, the second count value of the second counter 26 is updated from 0 to 1 at the timing of sending the initial timestamp command.

[0055] When the main device 12 sends the initial timestamp command, it determines whether it is the timer for updating the first count value (step S3).

[0056] For example, the master device 12 starts accumulating the first count value from the moment the initial timestamp command is sent, and determines that it is time to update the first count value if a first unit of time has elapsed since the moment the initial timestamp command was sent. Alternatively, if the first count value has already been updated, the master device 12 determines that it is time to update the first count value if a first unit of time has elapsed since the moment immediately preceding the previous update of the first count value.

[0057] On the other hand, for example, if no first unit of time has elapsed since the initial timestamp command was sent, the master device 12 determines that it is not the timing for updating the first count value. Additionally, for example, if the first count value has already been updated, and no first unit of time has elapsed since the moment immediately preceding the previous update of the first count value, the master device 12 determines that it is not the timing for updating the first count value.

[0058] When it is the time to update the first count value (step S3: "Yes"), the master device 12 increments the first count value (step S4).

[0059] If it is not the update timing of the first count value (step S3: "No"), and if the first count value has been accumulated (step S4), the main device 12 determines whether it is the update timing of the second count value (step S5).

[0060] For example, the master device 12 starts updating the second count value from the moment the initial timestamp command is sent, and determines that the second count value update timing has elapsed after the moment the initial timestamp command was sent. Alternatively, if the second count value has already been updated, and a second unit of time has elapsed immediately following the moment the second count value was updated, the master device 12 determines that the second count value update timing has elapsed.

[0061] On the other hand, for example, if no second unit of time has elapsed since the initial timestamp command was sent, the master device 12 determines that it is not the timing for updating the second count value. Additionally, for example, if the second count value has already been updated, and no second unit of time has elapsed since the moment immediately preceding the previous update of the second count value, the master device 12 determines that it is not the timing for updating the second count value.

[0062] When the timing for updating the second count value is (step S5: "Yes"), the main device 12 updates the second count value (step S6). For example, when the second count value is 0, the main device 12 updates the second count value from 0 to 1, and when the second count value is 1, the main device 12 updates the second count value from 1 to 0.

[0063] If the update timing for the second count value is not met (step S5: "No") or if the second count value has been updated (step S6), the master device 12 determines whether a transmission request for the first count value has been received (step S7). Specifically, for example, the master device 12 determines whether a corresponding transmission request has been received from multiple slave devices 14.

[0064] If the master device 12 does not receive a request to send the first count value (step S7: "No"), it sends other commands to the multiple slave devices 14 respectively (step S8) and determines again whether it is time to update the first count value (step S3). For example, the master device 12 sends a command to write the second count value.

[0065] Upon receiving a request to send the first count value (step S7: "Yes"), the master device 12 sends a timestamp command that has written the first count value (step S9) and then determines again whether it is time to update the first count value (step S3). For example, the master device 12 sends the first count value to one of the multiple slave devices 14 that is the source of the received sending request, i.e., the slave device 14 that sent the sending request.

[0066] Figure 5 and Figure 6 It means Figure 1 A flowchart illustrating an example of the operation of the slave device 14 in the communication system 10. Figure 7 and Figure 8 It is used for explanation Figure 1 A diagram illustrating an example of the operation of the slave device 14 in the communication system 10. (Refer to...) Figures 5 to 8 Here is an example of the operation of the slave device 14 of the communication system 10. Furthermore, in the following description, only one example of the operation of one of the multiple slave devices 14 is described; however, since the other slave devices 14 also perform the same operation, details of the description of an example of the operation of the other slave devices 14 are omitted.

[0067] like Figure 5 As shown, when the slave device 14 establishes wired communication with the master device 12, it receives an initial timestamp command (step S11). For example, the slave device 14 receives a command that writes a first count value and a second count value. Here, the first count value is 0 and the second count value is 1.

[0068] When the slave device 14 receives the initial timestamp command, it initializes the third counter 36 and the fourth counter 38 (step S12). For example, the slave device 14 initializes the third counter 36 by setting the third counter value to 0, and initializes the fourth counter 38 by setting the fourth counter value to 0.

[0069] When the third counter 36 and the fourth counter 38 are initialized by the device 14, it is determined whether it is time to update the fourth counter value (step S13).

[0070] For example, if device 14 starts accumulating the fourth count value from the moment it receives the initial timestamp command, and a third unit of time has elapsed since the moment the initial timestamp command was received, it determines that the fourth count value is due for an update. Alternatively, if the fourth count value has already been updated, and a third unit of time has elapsed since the moment immediately preceding the previous update, device 14 determines that the fourth count value is due for an update.

[0071] On the other hand, for example, if no third unit of time has elapsed since the moment the initial timestamp command was received, the device 14 determines that it is not the timing for updating the fourth count value. Additionally, for example, if the fourth count value has already been updated, if no third unit of time has elapsed since the moment immediately preceding the previous update of the fourth count value, the device 14 determines that it is not the timing for updating the fourth count value.

[0072] If it is the timing for updating the fourth count value (step S13: "Yes"), the fourth count value is updated from device 14 (step S14). Here, the fourth count value is incremented.

[0073] If it is not the update timing of the fourth count value (step S13: "No"), and if the fourth count value has been accumulated (step S14), the device 14 determines whether it is the update timing of the third count value (step S15).

[0074] For example, device 14 starts accumulating the third count value from the moment it receives the initial timestamp command, and determines that it is time for the third count value to be updated if a first unit of time has elapsed since the moment the initial timestamp command was received. Alternatively, if the third count value has already been updated, device 14 determines that it is time for the third count value to be updated if a first unit of time has elapsed since the moment immediately preceding the last update of the third count value.

[0075] On the other hand, for example, if no first unit of time has elapsed since the moment the initial timestamp command was received, the device 14 determines that it is not the timing for updating the third count value. Additionally, for example, if the third count value has already been updated, if no first unit of time has elapsed since the moment immediately preceding the last update of the third count value, the device 14 determines that it is not the timing for updating the third count value.

[0076] When the timing for updating the third count value is (step S15: "Yes"), the device 14 updates the third count value (step S16), resetting the fourth count value (step S17). For example, the device 14 increments the third count value from 0 to 1, resetting the fourth count value to 0.

[0077] If the update timing is not the third count value (step S15: "No"), and if the fourth count value is reset (step S17), the slave device 14 determines whether a timestamp command has been received (step S18). For example, the slave device 14 periodically receives commands from the master device 12. If the command received from the master device 12 is a timestamp command, it is determined that a timestamp command has been received; if the command received from the master device 12 is not a timestamp command, it is determined that a timestamp command has not been received. Here, the timestamp command is a command with the first count value written to it.

[0078] If the slave device 14 does not receive a timestamp command (step S18: "No"), it determines whether the second count value has been updated (step S19). As described above, for example, the slave device 14 receives timing information from the master device 12 and determines whether the second count value has been updated based on the timing information.

[0079] For example, the slave device 14 periodically receives commands from the master device 12 and writes a second count value into those commands. That is, the slave device 14 periodically receives the second count value. If the slave device 14 determines that the second count value has not been updated if the second count value received this time is not updated compared to the previously received second count value, then the slave device 14 determines that the second count value has been updated if the second count value received this time is updated compared to the previously received second count value.

[0080] If the second count value is not updated (step S19: "No"), the device 14 determines again whether it is time to update the fourth count value (step S13).

[0081] If the second count value is updated (step S19: "Yes"), the device 14 determines whether the cumulative count of the third count value within the update cycle of the second count value is normal (step S20). For example, the device 14 sets the update cycle of the second count value as the time from the last time the second count value was updated to the current time. Moreover, if the cumulative count of the third count value within this update cycle is the same as the quotient of (second unit time ÷ first unit time), the device 14 determines it to be normal; if it is not the same as the quotient of (second unit time ÷ first unit time), the device 14 determines it to be abnormal.

[0082] For example, Figure 7 As shown, when (second unit time ÷ first unit time) = 2, if the number of times the third count value is accumulated within the update cycle is 2, then the device 14 determines it to be normal; if it is not 2, then the device 14 determines it to be abnormal.

[0083] If the number of times the third count is accumulated within the update cycle of the second count is normal (step S20: "Yes"), the device 14 determines again whether it is the update time for the fourth count (step S13).

[0084] If the number of times the third count is accumulated during the update cycle of the second count is abnormal (step S20: "No"), the slave device 14 generates an alarm (step S21), sends a request to send the first count to the master device 12 (step S22), and determines again whether it is the update time for the fourth count (step S13).

[0085] The device 14 determines whether a timestamp command has been received (step S18). If a timestamp command has been received (step S18: "Yes"), it determines whether the third count value is different from the first count value written to the timestamp command (step S23).

[0086] If the third count value is no different from the first count value written to the timestamp command (step S23: "No"), the device 14 determines whether the second count value has been updated (step S19).

[0087] If the third count value is different from the first count value written to the timestamp command (step S23: "Yes"), the device 14 causes an alarm to be generated (step S24) and corrects the third count value (step S25).

[0088] For example, Figure 8 As shown, when the third count value is 2 and the first count value of the command to write to the timestamp is 3, the device 14 causes an alarm to be generated and corrects the third count value from 2 to 3.

[0089] The above describes the communication system 10 according to the first embodiment.

[0090] The communication system 10 according to the first embodiment includes a master device 12 and one or more slave devices 14 communicating with the master device 12. The master device 12 includes: a first counter 24, which increments a first count value every first unit time; a second counter 26, which updates a second count value every second unit time; and a master transmitter 18, which sends timing information indicating that the second count value has been updated to each of the one or more slave devices 14. Each of the one or more slave devices 14 includes: a third counter 36, which increments a third count value every first unit time; a fourth counter 38, which increments a fourth count value every third unit time shorter than the first unit time, and resets the fourth count value when the third counter 36 increments the third count value; and a slave receiver 32, which receives the timing information sent from the master transmitter 18.

[0091] Therefore, by sending timing information (not time information) indicating that the second count value has been updated to one or more slave devices 14, it is possible to suppress the increase in network bandwidth usage and to suppress the deviation between the time information held by the master device 12 and the time information held by the slave devices 14. Furthermore, the increase in network bandwidth usage can be suppressed because the 1-bit information of the second count value being 0 / 1 is smaller than the amount of data related to time information. In particular, the effect of suppressing network bandwidth usage is significant in notifications from the master device 12 to the slave devices 14, which are performed in nanosecond units.

[0092] Furthermore, in the communication system 10 according to the first embodiment, each of the more than one slave device 14 also has a determination unit 40 and a slave transmission unit 30. The determination unit 40 determines, based on timing information received by the slave receiving unit 32 of the slave device 14, whether at least one of the accumulation count of the third count value and the accumulation count of the fourth count value within the update cycle of the second count value is normal. If the determination unit 40 determines that at least one of the accumulation count of the third count value and the accumulation count of the fourth count value within the update cycle is abnormal, the slave transmission unit 30 sends a transmission request for the first count value to the master device 12. The master device 12 also has a master receiving unit 20, which receives transmission requests sent from the slave transmission units 30 of each of the more than one slave device 14. The master transmission unit 18 sends the first count value to the slave device 14 among the more than one slave device 14 that serves as the transmission source of the transmission request received by the master receiving unit 20.

[0093] Therefore, the first count value can be sent and received only if at least one of the accumulation counts of the third count value and the accumulation counts of the fourth count value within the update cycle of the second count value is abnormal. Thus, it is possible to suppress the increase in network bandwidth usage and suppress the deviation between the time information of the master device 12 and the time information of the slave device 14.

[0094] Furthermore, in the communication system 10 according to the first embodiment, the second unit time is an integer multiple of the first unit time.

[0095] Therefore, it is easy to determine whether the number of times the third count is accumulated within the update cycle of the second count is normal.

[0096] Furthermore, in the communication system 10 according to the first embodiment, the second unit time is an integer multiple of the third unit time.

[0097] Therefore, it is easy to determine whether the number of times the fourth count is accumulated within the update cycle of the second count is normal.

[0098] Furthermore, in the communication system 10 according to the first embodiment, the third unit time is an integer fraction of the first unit time.

[0099] Therefore, it is easy to grasp the time information based on the third and fourth count values.

[0100] (Second Implementation)

[0101] Figure 9 This is a flowchart illustrating an example of the operation of a slave device in the communication system according to the second embodiment. Figure 10 It is used for explanation Figure 9 A diagram illustrating an example of the operation of a slave device in a communication system. (Refer to...) Figure 9 and Figure 10 The communication system involved in the second embodiment will be explained.

[0102] like Figure 9 As shown, in the communication system according to the second embodiment, when the second count value is updated (step S19: "Yes"), the slave device determines whether the cumulative number of times the fourth count value is accumulated within the update cycle of the second count value is normal (step S31). That is to say, the communication system according to the second embodiment differs from the communication system 10 according to the first embodiment in that it does not determine whether the cumulative number of times the third count value is accumulated within the update cycle of the second count value is normal, but rather determines whether the cumulative number of times the fourth count value is accumulated within the update cycle of the second count value is normal.

[0103] For example, if the number of times the fourth count is accumulated within the update cycle of the second count is the same as the quotient of (second unit time ÷ third unit time), then the slave device of the communication system according to the second embodiment is determined to be normal; if the number of times the fourth count is accumulated within the update cycle of the second count is not the same as the quotient of (second unit time ÷ third unit time), then the slave device of the communication system according to the second embodiment is determined to be abnormal.

[0104] like Figure 10 As shown, in the second embodiment, the second unit time is shorter than the first unit time, and is an integer fraction of the first unit time. Furthermore, in the second embodiment, the second unit time is an integer multiple of the third unit time.

[0105] For example, if (second unit time ÷ third unit time) = 64, and the number of times the fourth count value is accumulated within the update cycle is 64, then the slave device of the communication system according to the second embodiment is determined to be normal; if the number of times the fourth count value is accumulated within the update cycle is not 64, then the slave device of the communication system according to the second embodiment is determined to be abnormal.

[0106] The above describes the communication system involved in the second embodiment.

[0107] In the communication system 10 according to the second embodiment, the second unit time is shorter than the first unit time.

[0108] Therefore, even when the second unit time is shorter than the first unit time, by determining whether the number of times the fourth count value is accumulated within the update cycle of the second count value is normal, it is possible to suppress the increase in network bandwidth usage and suppress the deviation between the time information of the master device 12 and the time information of the slave device 14.

[0109] Furthermore, in the communication system 10 according to the second embodiment, the second unit time is an integer multiple of the third unit time.

[0110] Therefore, it is easy to determine whether the number of times the fourth count is accumulated within the update cycle of the second count is normal.

[0111] (Other implementation methods, etc.)

[0112] As described above, the embodiments have been presented as examples of the technology disclosed in this application. However, the technology disclosed herein is not limited to these examples, and can be applied to embodiments or variations obtained by making appropriate changes, substitutions, additions, omissions, etc., as long as they do not depart from the spirit of this disclosure.

[0113] In the above embodiment, it was described that the determination unit 40 determines whether one of the cumulative count of the third count value and the cumulative count of the fourth count value within the update cycle of the second count value is normal, but it is not limited to this. For example, the determination unit 40 may also determine whether both the cumulative count of the third count value and the cumulative count of the fourth count value within the update cycle of the second count value are normal.

[0114] Furthermore, the information transmission path in the above embodiments is just one example and is not particularly limited. In the above embodiments where two devices communicate to send and receive information, a relay device (not shown) may also be installed between the two devices.

[0115] Furthermore, in the above embodiments, the processes performed by the specific processing unit can also be executed by other processing units. Additionally, the order of multiple processes can be changed, and multiple processes can be executed in parallel.

[0116] Furthermore, in the above embodiments, each structural element can also be implemented by executing a software program applicable to each structural element. Each structural element can also be implemented by reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory by a program execution unit such as a CPU (Central Processing Unit) or processor.

[0117] Furthermore, the structural elements can also be implemented in hardware. For example, the structural elements can be circuits (or integrated circuits). These circuits can be used as a whole to form a single circuit, or they can be different circuits. In addition, each of these circuits can be a general-purpose circuit or a special-purpose circuit.

[0118] Furthermore, the present disclosure, in its entirety or in specific form, may also be implemented by a system, apparatus, method, integrated circuit, computer program, or a recording medium such as a computer-readable CD-ROM (Compact Disk-Read Only Memory). Additionally, the present disclosure, in its entirety or in specific form, may also be implemented by any combination of systems, apparatus, methods, integrated circuits, computer programs, and recording media.

[0119] For example, this disclosure can be implemented as a method executed by a computer such as a communication system, or as a program for causing a computer to execute such a method. This disclosure can also be implemented as a non-transient recording medium readable by a computer that records such a program.

[0120] Industrial availability

[0121] The communication system disclosed herein can be used in communication systems that have master and slave devices.

[0122] Explanation of reference numerals in the attached figures

[0123] 10: Communication system; 12: Master device; 14: Slave device; 16: Master control unit; 18: Master transmitter; 20: Master receiver; 22: Master storage unit; 24: First counter; 26: Second counter; 28: Slave control unit; 30: Slave transmitter; 32: Slave receiver; 34: Slave storage unit; 36: Third counter; 38: Fourth counter; 40: Decision unit; C12, C14: Internal clocks.

Claims

1. A communication system comprising: Main unit; and One or more slave devices, which communicate with the master device. in, The main device has: A first counter increments a first count value every first unit of time. The second counter updates its second count value every second unit of time. as well as The main transmitter sends timing information indicating that the second count value has been updated to one or more of the slave devices. Each of the more than one slave device has: A third counter increments the third count value each time the first unit of time has elapsed; A fourth counter increments its fourth count value every third unit of time shorter than the first unit of time; and resets its fourth count value at the time when the third counter increments its third count value. The receiving unit receives the timing information sent from the main transmitting unit. Each of the one or more slave devices further comprises: The determination unit determines, based on the timing information received from the receiving unit, whether at least one of the cumulative counts of the third count value and the cumulative counts of the fourth count value within the update period of the second count value is normal. as well as If, as determined by the determination unit, at least one of the accumulated counts of the third count value and the accumulated counts of the fourth count value within the update cycle is abnormal, the sending unit sends a request to the master device to transmit the first count value. The master device further includes a master receiving unit, which receives transmission requests sent from the slave transmitting units of one or more slave devices. The master transmitter sends the first count value to one or more slave devices that are the source of the transmission request received by the master receiver.

2. The communication system according to claim 1, characterized in that, The second unit of time is an integer multiple of the first unit of time.

3. The communication system according to claim 1, characterized in that, The second unit of time is shorter than the first unit of time.

4. The communication system according to claim 1, characterized in that, The second unit of time is an integer multiple of the third unit of time.

5. The communication system according to any one of claims 1 to 4, characterized in that, The third unit of time is an integer fraction of the first unit of time.

6. A slave device that communicates with a master device, wherein, The master device includes: a first counter that increments a first count value every first unit of time; a second counter that updates a second count value every second unit of time; and a master transmitter that sends timing information to the slave device indicating that the second count value has been updated. The slave device includes: A third counter increments the third count value each time the first unit of time has elapsed; A fourth counter increments its fourth count value every third unit of time shorter than the first unit of time; and resets its fourth count value at the time when the third counter increments its third count value. The receiving unit receives the timing information sent from the main transmitting unit. The slave device further comprises: The determination unit determines, based on the timing information received from the receiving unit, whether at least one of the cumulative counts of the third count value and the cumulative counts of the fourth count value within the update period of the second count value is normal. as well as If, as determined by the determination unit, at least one of the accumulated counts of the third count value and the accumulated counts of the fourth count value within the update cycle is abnormal, the sending unit sends a request to the master device to transmit the first count value. The master device further includes a master receiving unit, which receives the transmission request sent from the slave transmitting unit of the slave device. The master transmitter sends the first count value to one or more slave devices that are the source of the transmission request received by the master receiver.

7. A control method for a communication system, the communication system comprising a master device and one or more slave devices communicating with the master device, wherein in the control method of the communication system, The main device performs the following processing: Each time the first unit of time elapses, the first count value is incremented. Update the second count value every second unit of time. Timing information indicating that the second count value has been updated is sent to one or more of the slave devices respectively. Each of the above slave devices performs the following processing: Each time the first unit of time elapses, the third count value is incremented. Each time a third unit of time shorter than the first unit of time elapses, the fourth count value is incremented. At the same time the third count value is incremented, the fourth count value is reset. Receive the timing information sent from the master device. Based on the received timing information, it is determined whether at least one of the cumulative counts of the third count and the cumulative counts of the fourth count within the update period of the second count is normal. If it is determined that at least one of the cumulative counts of the third count value and the cumulative counts of the fourth count value within the update cycle is abnormal, a request to send the first count value is sent to the master device. The master device receives the transmission request sent from the slave device and sends the first count value to one or more slave devices that is the source of the received transmission request.

Citation Information

Patent Citations

  • Operating staff having thread part

    JP1978077663A

  • Time synchronizing method for process monitoring apparatus

    JP1993134062A

  • Synchronizing multiple time stamps distributed within a computer system

    US20030065963A1