COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, CONTROL CIRCUIT AND STORAGE MEDIUM

DE112020007723B4Active Publication Date: 2024-10-10MITSUBISHI ELECTRIC CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
DE112020007723
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-12-22
Publication Date
2024-10-10
Estimated Expiration
2040-12-22

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Communication system (100) comprising: a main device (12); an auxiliary device (14) for time synchronization with the main device (12); and a relay device (13-1, 13-2) for forwarding a signal between the main device (12) and the auxiliary device (14), wherein the relay device (13-1, 13-2) comprises an information setting unit (35) for setting characteristic information about the priority of the frame in a frame, wherein the frame is received from the main device (12) or the auxiliary device (14), and a time synchronization management unit (37) for storing a dwell time of a first time synchronization frame that occurs during the forwarding of the first time synchronization frame, in order to store the dwell time of the first time synchronization frame that is stored,to add to a correction field of a second time synchronization frame and to write the stored residence time of the first time synchronization frame to the second time synchronization frame as a device-specific residence time when the second time synchronization frame is forwarded, to store a residence time of a third time synchronization frame that occurs during the forwarding of the third time synchronization frame, and to add the residence time of the third time synchronization frame that is stored to a correction field of a fourth time synchronization frame, and to write the residence time of the third time synchronization frame that is stored in the fourth time synchronization frame as a device-specific residence time when the fourth time synchronization frame is forwarded, wherein the first time synchronization frame is a frame,the second time synchronization frame is a frame sent from the main device (12) to the auxiliary device (14), the third time synchronization frame is a frame sent from the auxiliary device (14) to the main device (12), the fourth time synchronization frame is a frame sent from the main device (12) to the auxiliary device (14), the auxiliary device (14) comprises a transmit delay time collection unit (45) to associate a value in the correction field of the second time synchronization frame received by the relay device (13-1, 13-2) with characteristic information set in the second time synchronization frame, and to store the value and characteristic information of the second time synchronization frame in association, and to associate a value in the correction field of the fourth time synchronization frame,to assign characteristic information received by the relay device (13-1, 13-2) that is set in the fourth time synchronization frame, and to store the value and characteristic information of the fourth time synchronization frame in assignment, and the auxiliary device (14) notifies another connected device of a device-specific dwell time written in the second time synchronization frame received by the relay device (13-1, 13-2), and of a device-specific dwell time written in the fourth time synchronization frame received by the relay device (13-1, 13-2).
Need to check novelty before this filing date? Find Prior Art

Description

Area The present disclosure relates to a communication system, a communication device, a communication method, a control circuit and a storage medium. background In a factory automation system, multiple machine components (e.g., sensors, actuators, etc.) operate in a manner that ensures control. When machine components communicate with each other, for example, through a wired or wireless communication medium, the machine components must be precisely synchronized with each other using a method described in Non-Patent Literature 1, a method described in Non-Patent Literature 2, and / or the like. In addition, for the construction of a network, it is important to measure the transmission delay time that occurs during communication between the machine components in order to perform a verification during the design and operation or functioning of a system in which the above-mentioned multiple machine components cooperate with each other. A frame traversing a network may contain a priority identifier to offer transmission of certain communication data with high priority, and is processed in a queue in each device in that network according to the priority. An elapsed time of frame transmission, i.e., a transmission delay time, depends partly on the queue waiting situation, but a frame with a priority identifier indicating high priority tends to be transmitted with a shorter transmission delay time due to the selection of a queue dedicated to high-priority processing in each device. Conversely, a frame with a priority identifier indicating low priority is transmitted with a longer transmission delay time. As described above, the transmission delay time depends on the queue used to enqueue the frame into a device. Therefore, to enable high-precision control, it is necessary to know the relationship between the queue to be used among multiple queues in the device and the resulting transmission delay time. This means that the transmission delay time of the frame must be measured for each assigned priority level. For example, Patent Literature 1 discloses a technology for measuring transmission delay time by transmitting and receiving frames intended for delay measurement between nodes in a network. With this technology, the transmission delay time can be measured for each frame priority. Patent Literature 2 also describes a network synchronization method that includes transmitting and receiving synchronization frames at a relay node. The relay node detects and stores the dwell time of the synchronization frame, and inserts it into a subsequent forwarded synchronization frame. At the receiving node, the dwell time inserted into the synchronization frame is extracted and used for synchronization. List of cited sources Patent literature Patent Literature 1: Japanese Patent No. 5779664 B2 Patent Literature 2: US 2017 / 0 324 497 A1 Non-patent literature Non-Patent Literature 1: IEEE Std. 1588-2008, "IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems." Non-Patent Literature 2: IEEE Std. 802.1AS-2020, "IEEE Standard for Local and Metropolitan Area Networks - Timing and Synchronization for Time-Sensitive Applications." demolition Technical problem However, the technology described in Patent Literature 1 requires that all master and slave nodes in a system can transmit and receive not only the time synchronization frames defined in Non-Patent Literature 1, but also frames used for delay measurement. Therefore, the use of the technology described in Patent Literature 1 requires extensive modification of the communication functionality of machine components, resulting in significant modification effort. This leads to increased workload for operational verification and / or similar tasks. The present disclosure has been made in view of the above, and it is an object of the present disclosure to provide a communication system capable of measuring a transmission delay time of a frame for each priority level without using a corresponding frame. Solution to the task This object is achieved by a communication system according to claim 1, a communication device according to claim 9, a communication method according to claim 18, a control circuit according to claim 19, and a storage medium storing a program for controlling a communication device according to claim 20. To solve the above-mentioned problems and achieve the object, a communication system according to the present disclosure specifically comprises: a master device; a slave device for time synchronization with the master device; and a relay device for relaying a signal between the master device and the slave device. The relay device includes an information setting unit for setting, in a frame, characteristic information about the priority of the frame received by the master device or the slave device, and a time synchronization management unit.to store a dwell time of a first time synchronization frame caused during forwarding of the first time synchronization frame, to add the dwell time of the first time synchronization frame that is stored to a correction field of a second time synchronization frame when forwarding the second time synchronization frame, to store a dwell time of a third time synchronization frame that occurs during forwarding of the third time synchronization frame, and to add the dwell time of the third time synchronization frame that is stored to a correction field of a fourth time synchronization frame when forwarding the fourth time synchronization frame, wherein the first time synchronization frame is a frame sent from the master device to the slave device, the second time synchronization frame is a frame,which is sent from the master device to the slave device, the third time synchronization frame is a frame sent from the slave device to the master device, the fourth time synchronization frame is a frame sent from the master device to the slave device. The slave device includes a transmission delay time collecting unit for associating a value in the correction field of the second time synchronization frame received by the relay device with characteristic information set in the second time synchronization frame, and storing the value and characteristic information of the second time synchronization frame in association, and for associating a value in the correction field of the fourth time synchronization frame received by the relay device with characteristic information set in the fourth time synchronization frame,and to store the value and characteristic information of the fourth time synchronization frame in association., Advantageous effects of the invention A communication system according to the present disclosure has the advantage of being able to measure the transmission delay time of a frame for each priority level without using a separate frame. Brief description of the drawings Fig. 1 is a block diagram showing an example configuration of a communication system according to a first embodiment. Fig. 2 is a block diagram showing an example configuration of a master device according to the first embodiment. Fig. 3 is a diagram showing example structures of transmitted and received frames in the communication system according to the first embodiment. Fig. 4 is a diagram showing the structure of the common header of the PTP message shown in Fig. 3. Fig. 5 is a block diagram showing an example configuration of relay devices according to the first embodiment. Fig. 6 is a block diagram showing an example configuration of a slave device according to the first embodiment.7 is a sequence diagram illustrating an operational example of measuring the transmission delay time of a frame that occurs in the communication system according to the first embodiment. FIG. 8 is a flowchart showing an operational example of forwarding a Sync message performed by the relay devices according to the first embodiment. FIG. 9 is a flowchart showing an operational example of forwarding a Follow_Up message performed by the relay devices according to the first embodiment. FIG. 10 is a flowchart showing an operational example of forwarding a Delay_Req message performed by the relay devices according to the first embodiment.11 is a flowchart showing an operational example of forwarding a Delay_Resp message performed by the relay devices according to the first embodiment. FIG. 12 is a block diagram showing an example of the hardware for implementing the master device. FIG. 13 is a block diagram showing an example configuration of a communication system according to a second embodiment. FIG. 14 is a block diagram showing an example configuration of relay devices according to the second embodiment. FIG. 15 is a block diagram showing an example configuration of a slave device according to the second embodiment. FIG. 16 is a sequence diagram illustrating an operational example of measuring the transmission delay time of a frame occurring in the communication system according to the second embodiment.17 is a flowchart showing an operational example of forwarding a Sync message performed by the relay devices according to the second embodiment. 18 is a flowchart showing an operational example of forwarding a Follow_Up message performed by the relay devices according to the second embodiment. 19 is a flowchart showing an operational example of forwarding a Delay_Req message performed by the relay devices according to the second embodiment. 20 is a flowchart showing an operational example of forwarding a Delay_Resp message performed by the relay devices according to the second embodiment. Description of implementation examples A communication system, a communication device, a communication method, a control circuit, and a storage medium according to embodiments of the present disclosure will be described in detail below with reference to the drawings. Although the following explanations are described in the context of a system using the technology described in Non-Patent Literature 1, namely, IEEE 1588, the system may also conform to IEEE 802.1AS as described in Non-Patent Literature 2. First embodiment. Fig. 1 is a block diagram showing an example configuration of a communication system 100 according to a first embodiment. As shown, the communication system 100 according to the first embodiment includes a time receiving device 11, a master device 12, relay devices 13-1 and 13-2, and a slave device 14. The devices of the communication system 100 are connected to each other via a LAN (Local Area Network) line. Furthermore, the devices of the communication system 100 each have a clock and are configured to be time-synchronized with each other by transmitting and receiving PTP (Precision Time Protocol) messages according to Non-Patent Literature 1. The PTP messages used for time synchronization will be described later. The communication system 100 is used, for example, in factory automation. When the communication system 100 is used in factory automation, the main device 12 is connected to or incorporated into, for example, a control device that controls machine components in the production facility. The slave device 14 is connected to or incorporated into a machine component in the production facility, i.e., a machine component to be controlled. The relay devices 13-1 and 13-2 are each configured as a communication device for relaying data, control information, and the like sent and received between the main device 12 and the slave device 14.Furthermore, the communication system 100 has a function for measuring a transmission delay time by the main device 12, the relay devices 13-1 and 13-2, and the slave device 14 by performing the operation described later. Note that the example shown in Fig. 1 assumes that two relay devices are provided between the main device 12 and the slave device 14, but the number of relay devices is not limited thereto. The time receiving device 11 receives time information from a time source (not shown) that generates accurate time information using a global positioning system (GPS) or the like. Fig. 2 is a block diagram showing an example configuration of the main device 12 according to the first embodiment. The main device 12 includes a time receiving unit 21, a time synchronization management unit 22, a control unit 23, a receiving unit 24, and a transmitting unit 25. The time receiving unit 21 receives time information from the time receiving device 11. The time synchronization management unit 22 manages an internal clock of the main device 12. When the time receiving unit 21 receives the time information from the time receiving device 11, the time synchronization management unit 22 adjusts the time of the internal clock it manages based on this time information. That is, the time synchronization management unit 22 adjusts the time of the internal clock to the time represented by the time information received by the time receiving unit 21 from the time receiving device 11. The control unit 23 controls the entire part of the main device 12. Furthermore, the control unit 23 generates a frame and outputs it to the transmitting unit 25. The control unit 23 generates, for example, a frame in which a PTP message is stored. Furthermore, the control unit 23 analyzes a frame received from the receiving unit 24 and performs processing based on the analysis result. The receiving unit 24 receives a frame via the LAN line and outputs the received frame to the control unit 23. When the transmitting unit 25 receives a frame from the controlling unit 23, the transmitting unit 25 transmits this frame to the LAN line. An example of frames transmitted from and received by the master device 12 to and from the slave device 14 via the relay devices 13-1 and 13-2 will now be described in connection with a frame storing a PTP message. Figure 3 is a diagram showing example structures of transmitted and received frames in the communication system 100 according to the first embodiment. Specifically, Figure 3 shows the format of each frame encapsulating a PTP message according to Non-Patent Literature 1. Fig. 3 shows two types of frames 210 and 220, each containing a VLAN (Virtual Local Area Network) tag. Frame 210, shown in part (a), is used when the PTP message is to be sent and received over the User Datagram Protocol (UDP). Frame 220, shown in part (b), is used when the PTP message is to be sent and received over an Ethernet frame (registered trademark). A PTP message 230 encapsulated in each of frames 210 and 220 contains a common header 231 and a message field 232. Message field 232 includes, for example, fields that depend on the message Sync, Delay_Req, Follow_Up, or Delay_Resp. The common message header 231 has a structure as shown in Fig. 4 and includes a correction field, the correctionField 2311. Note that Fig. 4 is a diagram showing the structure of the common message header 231 of the message shown in Fig.3 shows the PTP message. The master device 12, the relay devices 13-1 and 13-2, and the slave device 14 send and receive PTP messages using frame 210 ((a) PTP over IPv4 / v6 UDP (including VLAN tag)) or frame 220 ((b) PTP over IEEE 802.3 / Ethernet (including VLAN tag)) with the structures shown in Fig. 3. Fig. 5 is a block diagram showing an example configuration of the relay devices 13-1 and 13-2 according to the first embodiment. The relay devices 13-1 and 13-2 have the same structure and each include a first receiving unit 31, a first transmitting unit 32, a second receiving unit 33, a second transmitting unit 34, an information setting unit 35, a control unit 36, and a time synchronization management unit 37. The relay devices 13-1 and 13-2 each store information about the neighboring devices, which is set in advance. The control unit 36 of each of the relay devices 13-1 and 13-2 thus detects the neighboring devices. That is, the control unit 36 of the relay device 13-1 detects that the first receiving unit 31 and the first transmitting unit 32 are also connected to the master device 12, and that the second receiving unit 33 and the second transmitting unit 34 are also connected to the relay device 13-2. The control unit 36 of the relay device 13-2 detects that the first receiving unit 31 and the first transmitting unit 32 are also connected to the relay device 13-1, and that the second receiving unit 33 and the second transmitting unit 34 are also connected to the slave device 14. The first receiving unit 31 receives a frame via the LAN line on the main device 12 side and outputs the received frame to the control unit 36. That is, the first receiving unit 31 receives a frame transmitted from the main device 12 to the slave device 14 via the LAN line and outputs the received frame to the control unit 36. When the first transmission unit 32 receives a frame from the control unit 36, the first transmission unit 32 sends this frame to the LAN line on the main device 12 side. That is, the first transmission unit 32 receives from the control unit 36 a frame sent from the slave device 14 to the main device 12 and sends the frame to the LAN line on the main device 12 side. The second receiving unit 33 receives a frame via the LAN line on the side of the slave device 14 and outputs the received frame to the control unit 36. That is, the second receiving unit 33 receives a frame sent from the slave device 14 to the master device 12 via the LAN line and outputs the received frame to the control unit 36. When the second transmission unit 34 receives a frame from the control unit 36, the second transmission unit 34 transmits this frame to the LAN line provided on the side of the slave device 14. That is, the second transmission unit 34 receives a frame sent from the master device 12 to the slave device 14 from the control unit 36 and transmits the frame to the LAN line on the side of the slave device 14. When the frame received by the first receiving unit 31 or the frame received by the second receiving unit 33 satisfies a certain condition, the information setting unit 35 changes the setting in the VLAN tag added to the corresponding one or both frames. The control unit 36 controls the entire part of the relay device 13-1 or 13-2. Furthermore, the control unit 36 receives and analyzes the frame received by the first receiving unit 31 and performs processing based on the analysis result, and receives and analyzes the frame received by the second receiving unit 33 and performs processing based on the analysis result. The time synchronization management unit 37 manages an internal clock of the relay device 13-1 or 13-2. In addition, the time synchronization management unit 37 performs a process of storing a reception time of a frame of a specific type and a time at which the second transmission unit 34 transmitted this frame in a case where the first reception unit 31 has received such a frame; a process of storing a reception time of a frame of a specific type and a time at which the first transmission unit 32 transmitted this frame in a case where the second reception unit 33 has received such a frame; a process of determining a transmission delay time of the frame from the stored times and providing notification of the transmission delay time to the external device; and the like. Figure 6 is a block diagram showing an example configuration of the slave device 14 according to the first embodiment. The slave device 14 includes a receiving unit 41, a transmitting unit 42, a control unit 43, a time synchronization management unit 44, and a transmission delay time collection unit 45. The receiving unit 41 receives a frame via the LAN line and outputs the received frame to the control unit 43. When the transmission unit 42 receives a frame from the control unit 43, the transmission unit 42 sends this frame to the LAN line. The control unit 43 controls the entire part of the slave device 14. In addition, the control unit 43 analyzes the frame received from the receiving unit 41 and performs processing based on an analysis result. The time synchronization management unit 44 manages an internal clock of the slave device 14. The time synchronization management unit 44 adjusts the time of the internal clock managed by it if necessary in order to synchronize the time of the internal clock managed by it with the time of the internal clock of the master device 12. The transmission delay time collecting unit 45 collects information about the transmission delay time occurring in the relay devices 13-1 and 13-2, and calculates the transmission delay time of the frame occurring along the communication path from the master device 12 to the slave device 14 based on the collected information. A method for measuring the transmission delay time of a frame transmitted in the communication system 100 for each frame priority is described below. Fig. 7 is a sequence diagram illustrating an operational example of measuring the transmission delay time of a frame occurring in the communication system 100 according to the first embodiment. As shown in Fig. 7, the communication system 100 causes four types of PTP messages, ie, a Sync message, a Follow_Up message, a Delay_Req message, and a Delay_Resp message, to be sent and received between the master device 12 and the slave device 14 to measure the transmission delay time. The following describes the processes involved in sending and receiving the four types of PTP messages mentioned above. Note that each message is encapsulated in a frame and is sent and received as a frame. However, for simplicity, the sending and receiving of a frame containing an encapsulated message can be referred to here as "sending and receiving a message." [Process of sending and receiving sync messages] A frame with a sync message encapsulated therein, which is a first time synchronization frame, is transmitted from the main device 12. To transmit a sync message, the main device 12 operates such that the time synchronization management unit 22 instructs the control unit 23 to generate a sync message. During this process, the time synchronization management unit 22 also informs the control unit 23 of information about the structure of the frame to be used for transmitting the sync message. This information is specifically information about an instruction to generate a frame with a VLAN tag (VID value=101 and the priority code point (PCP) value=no setting (e.g.,PCP value = 0)) with the correction field value = 0 and time = T1, where the VID value is a VID value assigned to the PTP, the time T1 is the time specified by the internal clock managed by the time synchronization management unit 22 of the main device 12, and the PCP value represents a priority level of the frame, which can take a value from 0 to 7. A higher PCP value means a higher priority. The PCP value is an example of characteristic information about the priority level of a frame. The correction field is the correctionField 2311 shown in Fig. 4. The control unit 23, having received the command from the time synchronization management unit 22, generates a sync message corresponding to the command and outputs the sync message to the transmitting unit 25. The transmitting unit 25 transmits the sync message received from the control unit 23 to the relay device 13-1 (step S61 in Fig. 7). When the sync message sent from the master device 12 arrives at the relay device 13-1, the relay device 13-1 sets a PCP value in the frame that stores the sync message and transmits the resulting frame to the relay device 13-2 (step S62 of Fig. 7). Although the PCP value can be set to any value within a settable range, an example in which the PCP value in the frame is set to "7" will be described below. The operations for transmitting and receiving a Follow_Up message, a Delay_Req message, and a Delay_Resp message will be described later, also assuming that the PCP value in the frame is set to "7". In Fig. 8, the PCP value is represented as "n" to generalize the description. Next, the operation of the relay device 13-1 for transmitting the frame in which a sync message is stored will be described. Fig. 8 is a flowchart showing an operational example of the forwarding of a sync message performed by the relay devices 13-1 according to the first embodiment. Note that an example of the forwarding of a sync message performed by the relay device 13-2 is also shown in the flowchart of Fig. 8. In the relay device 13-1, the first receiving unit 31 receives the sync message (step S11), and the time synchronization management unit 37 stores a current time τ1 as the time of reception of the sync message (step S12). In the example shown in Fig. 7, the first receiving unit 31 of the relay device 13-1 receives the sync message at time t1. Thus, the time synchronization management unit 37 stores τ1=t1 in step S12. Next, the information setting unit 35 checks whether the source of the sync message is the master device 12 (step S13). If the source is not the master device 12, that is, if the source is the other relay device (step S13: No), the process proceeds to step S15. If the source of the sync message is the master device 12 (step S13: Yes), the information setting unit 35 sets the PCP value in the VLAN tag of the frame storing the sync message to "7" (step S14). In the case of the relay device 13-1, the source of the sync message is the master device 12, and therefore, the relay device 13-1 executes step S14 after step S13 to cause the information setting unit 35 to set the PCP value to "7." If the PCP value is to be set to a value other than 7, the relay devices 13-1 and 13-2 also follow a functional sequence that corresponds to the operating or de-energising status.The functional sequence for setting the PCP value to "7" is identical. To generalize the description, the PCP value to be set is represented as "n" in Fig. 8. If the source of the sync message is not the master device 12 (step S13: No), or if the PCP value has been set in the VLAN tag in step S14, the time synchronization management unit 37 stores a current time τ2 as the time of sending the sync message (step S15), and the second transmission unit 34 transmits the sync message (step S16). The process is then terminated. In the example shown in Fig. 7, the second transmission unit 34 of the relay device 13-1 transmits the sync message at time t2. Thus, the time synchronization management unit 37 of the relay device 13-1 stores τ2=t2 in step S15. When the sync message sent from the relay device 13-1 arrives at the relay device 13-2, the relay device 13-2 transmits the sync message to the slave device 14 (step S63 in Fig. 7). The operation of the relay device 13-2 to perform this operation will be described below. When the sync message arrives from the relay device 13-1, the relay device 13-2 executes steps S11 to S13, S15, and S16 of Fig. 8. That is, the relay device 13-2 operates such that the first receiving unit 31 receives the sync message, the time synchronization management unit 37 stores the current time τ1 of receiving the sync message, the time synchronization management unit 37 stores the current time τ2 of transmitting the sync message, and the second transmitting unit 34 transmits the sync message. In the example shown in Fig. 7, the relay device 13-2 receives the sync message at time t3 and transmits the sync message at time t4. Accordingly, the time synchronization management unit 37 of the relay device 13-2 stores τ1=t3 as the time of receiving the sync message and τ2=t4 as the time of transmitting the sync message. When the sync message sent from the relay device 13-2 arrives at the slave device 14, the slave device 14 stores the time of receipt of the sync message. Specifically, the receiving unit 41 in the slave device 14 receives the sync message, and the control unit 43 notifies the time synchronization management unit 44 of the receipt of the sync message. The time synchronization management unit 44 stores as T2 the time indicated by the internal clock upon receipt of the notification from the control unit 43, that is, the time of receipt of the sync message. In addition, the time synchronization management unit 44 stores the value of T1 indicated in the sync message. As described above, T1 represents the time at which the master device 12 transmitted the sync frame. [Process of sending and receiving the Follow_Up message] A frame encapsulated with a Follow_Up message, which is a second time synchronization frame, is transmitted from the master device 12. To transmit a Follow_Up message, the master device 12 operates such that the time synchronization management unit 22 instructs the control unit 23 to generate a Follow_Up message. During this process, the time synchronization management unit 22 also informs the control unit 23 of information about the structure of the frame to be used for transmitting the Follow_Up message. Specifically, this information is information about an instruction to generate a frame with a VLAN tag (VID value=101 and PCP value=no setting (e.g., PCP value=0)) with the correction field value=0. The control unit 23, having received the command from the time synchronization management unit 22, generates a Follow_Up message corresponding to the command and outputs the Follow_Up message to the transmitting unit 25. The transmitting unit 25 transmits the Follow_Up message received from the control unit 23 to the relay device 13-1 (step S64 in Fig. 7). When the Follow_Up message sent from the master device 12 arrives at the relay device 13-1, the relay device 13-1 sets a PCP value in the frame that stores the Follow_Up message, updates the value of the correction field, and transmits the resulting frame to the relay device 13-2 (step S65 of Fig. 7). The operation of the relay device 13-1 to perform this process is described below. Fig. 9 is a flowchart showing an operational example of the forwarding of a Follow_Up message performed by the relay devices 13-1 according to the first embodiment. Note that an example of the forwarding of a Follow_Up message performed by the relay device 13-2 is also shown in the flowchart of Fig. 9. In the relay device 13-1, the first receiving unit 31 receives the Follow_Up message (step S21), and the time synchronization management unit 37 adds the sync message dwell time (τ2-τ1) that occurs during the forwarding of the sync message to the value in the Follow_Up message correction field (step S22). In the example shown in Fig. 7, the relay device 13-1 is subjected to a sync message dwell time of t2-t1. Thus, in step S22, the time synchronization management unit 37 adds a value of t2-t1 to the value in the correction field.Next, the information setting unit 35 checks whether the source of the Follow_Up message is the master device 12 (step S23). If the source is not the master device 12, that is, if the source is the other relay device (step S23: No), the process proceeds to step S25. Alternatively, if the source of the Follow_Up message is the master device 12 (step S23: Yes), the information setting unit 35 sets the PCP value in the VLAN tag of the frame storing the Follow_Up message to "7" (step S24). In the case of the relay device 13-1, the source of the Follow_Up message is the master device 12, and therefore, the relay device 13-1 executes step S24 after step S23 to cause the information setting unit 35 to set the PCP value to "7." If the PCP value is to be set to a value other than 7, the relay devices 13-1 and 13-2 also follow a functional sequence that corresponds to the operating or de-energising status.The functional sequence for setting the PCP value to "7" is identical. To generalize the description, the PCP value to be set is represented as "n" in Fig. 9. If the source of the Follow_Up message is not the master device 12 (step S23: No), or if the PCP value in the VLAN tag was set in step S24, the second transmitting unit 34 transmits the Follow_Up message (step S25). The process is then terminated. The second transmitting unit 34 of the relay device 13-1 transmits the Follow_Up message to the relay device 13-2 in step S25. When the Follow_Up message sent from the relay device 13-1 arrives at the relay device 13-2, the relay device 13-2 transmits the Follow_Up message to the slave device 14 (step S66 in Fig. 7). The operation of the relay device 13-2 to perform this operation is described below. When the Follow_Up message arrives from the relay device 13-1, the relay device 13-2 executes steps S21 to S23 and S25 of Fig. 9. That is, the relay device 13-2 operates such that the first receiving unit 31 receives the Follow_Up message, and the time synchronization management unit 37 adds the dwell time (τ2-τ1) of the sync message to the correction field value of the Follow_Up message. The second transmitting unit 34 transmits the Follow_Up message. In the example shown in Fig. 7, the relay device 13-2 is subject to a sync message dwell time of t4-t3. Therefore, the time synchronization management unit 37 adds a value of t4-t3 to the value in the correction field. When the Follow_Up message sent from the relay device 13-2 arrives at the slave device 14, the slave device 14 stores the value in the correction field specified in the Follow_Up message. Specifically, the time synchronization management unit 44 maps the value in the correction field ((t2-t1)+(t4-t3)) to the PCP value (n=7) in the Follow_Up message and stores these values in the map. [Process of sending and receiving the Delay_Req message] A frame encapsulated with a Delay_Req message, which is a third time synchronization frame, is transmitted from the slave device 14. To transmit a Delay_Req message, the slave device 14 operates such that the time synchronization management unit 44 instructs the control unit 43 to generate a Delay_Req message. During this process, the time synchronization management unit 44 also informs the control unit 43 of information about the structure of the frame to be used to transmit the Delay_Req message. Specifically, this information is information about an instruction to generate a frame with a VLAN tag (VID value=101 and PCP value=no setting (e.g., PCP value=0)).In addition, the time synchronization management unit 44 stores the time T3 indicated by the internal clock at the time the command to generate the Delay_Req message is given to the control unit 43. The control unit 43, having received the instruction from the time synchronization management unit 44, generates a Delay_Req message according to the instruction and outputs the Delay_Req message to the transmission unit 42. The transmission unit 42 transmits the Delay_Req message received from the control unit 43 to the relay device 13-2 (step S67 in Fig. 7). When the Delay_Req message sent from the slave device 14 arrives at the relay device 13-2, the relay device 13-2 sets a PCP value in the frame that stores the Delay_Req message and transmits the resulting frame to the relay device 13-1 (step S68 of Fig. 7). The operation of the relay device 13-2 to perform this operation is described below. Fig. 10 is a flowchart showing an operational example of the forwarding of a Delay_Req message performed by the relay devices 13-2 according to the first embodiment. Note that an example of the forwarding of a Delay_Req message performed by the relay device 13-1 is also shown in the flowchart of Fig. 10. In the relay device 13-2, the second receiving unit 33 receives the Delay_Req message (step S31), and the time synchronization management unit 37 stores a current time τ3 as the time of reception of the Delay_Req message (step S32). In the example shown in Fig. 7, the second receiving unit 33 of the relay device 13-2 receives the Delay_Req message at time t5. Thus, the time synchronization management unit 37 stores τ3=t5 in step S32. Subsequently, the information setting unit 35 checks whether the source of the Delay_Req message is the slave device 14 (step S33). If the source is not the slave device 14, that is, if the source is the other relay device (step S33: No), the process proceeds to step S35. Alternatively, if the source of the Delay_Req message is the slave device 14 (step S33: Yes), the information setting unit 35 sets the PCP value in the VLAN tag of the frame storing the Delay_Req message to "7" (step S34). In the case of the relay device 13-2, the source of the Delay_Req message is the slave device 14, and therefore, the relay device 13-2 executes step S34 after step S33 to cause the information setting unit 35 to set the PCP value to "7."If the PCP value is to be set to a value other than 7, the relay devices 13-1 and 13-2 also follow an operational sequence identical to the operation or functional sequence for setting the PCP value to "7." Therefore, in Fig. 10, the PCP value to be set is represented as "n" to generalize the description. If the source of the Delay_Req message is not the slave device 14 (step S33: No), or if the PCP value has been set in the VLAN tag in step S34, the time synchronization management unit 37 stores a current time τ4 as the time of sending the Delay_Req message (step S35), and the first transmission unit 32 transmits the Delay_Req message (step S36). The process is then terminated. The first transmission unit 32 of the relay device 13-2 transmits the Delay_Req message to the relay device 13-1 in step S36. In the example shown in Fig. 7, the first transmission unit 32 of the relay device 13-2 transmits the Delay_Req message at time t6. Thus, the time synchronization management unit 37 stores τ4=t6 in step S35. When the Delay_Req message sent from the relay device 13-2 arrives at the relay device 13-1, the relay device 13-1 transmits the Delay_Req message to the main device 12 (step S69 in Fig. 7). The operation of the relay device 13-1 to perform this process is described below. When the Delay_Req message arrives from the relay device 13-2, the relay device 13-1 executes steps S31 to S33, S35, and S36 of Fig. 10. That is, the relay device 13-1 operates such that the second receiving unit 33 receives the Delay_Req message, the time synchronization management unit 37 stores the current time τ3 of receiving the Delay_Req message, the time synchronization management unit 37 stores the current time τ4 of transmitting the Delay_Req message, and the first transmitting unit 32 transmits the Delay_Req message. In the example shown in Fig. 7, the relay device 13-1 receives the Delay_Req message at time t7 and transmits the Delay_Req message at time t8. Accordingly, the time synchronization management unit 37 of the relay device 13-1 stores τ3=t7 as the time of receiving the Delay_Req message and τ4=t8 as the time of sending the Delay_Req message. When the Delay_Req message sent from the relay device 13-1 arrives at the main device 12, the main device 12 stores the time of receipt of the Delay_Req message. In the main device 12, the receiving unit 24 receives the Delay_Req message, and the control unit 23 notifies the time synchronization management unit 22 of the receipt of the Delay_Req message. The time synchronization management unit 22 stores as T4 the time indicated by the internal clock upon receipt of the notification from the control unit 23—that is, the time of receipt of the Delay_Req message. [Process of sending and receiving the Delay_Resp message] A frame encapsulated with a Delay_Resp message, which is a fourth time synchronization frame, is transmitted from the master device 12. To transmit a Delay_Resp message, the master device 12 operates such that the time synchronization management unit 22 instructs the control unit 23 to generate a Delay_Resp message. During this process, the time synchronization management unit 22 also informs the control unit 23 of information about the structure of the frame to be used for transmitting the Delay_Resp message. Specifically, this information is information about an instruction to generate a frame with a VLAN tag (VID value=101 and PCP value=no setting (e.g., PCP value=0)), the correction field value=0, and the time=T4. The control unit 23, having received the command from the time synchronization management unit 22, generates a Delay_Resp message corresponding to the command and outputs the Delay_Resp message to the transmission unit 25. The transmission unit 25 transmits the Delay_Resp message received from the control unit 23 to the relay device 13-1 (step S70 in Fig. 7). When the Delay_Resp message sent from the master device 12 arrives at the relay device 13-1, the relay device 13-1 sets a PCP value in the frame that stores the Delay_Resp message, updates the value of the correction field, and transmits the resulting frame to the relay device 13-2 (step S71 of Fig. 7). The operation of the relay device 13-1 to perform this process is described below. Fig. 11 is a flowchart showing an operational example of the forwarding of a Delay_Resp message performed by the relay devices 13-1 according to the first embodiment. Note that an example of the forwarding of a Delay_Resp message performed by the relay device 13-2 is also shown in the flowchart of Fig. 11. In the relay device 13-1, the first receiving unit 31 receives the Delay_Resp message (step S41), and the time synchronization management unit 37 adds the delay time (τ4-τ3) of the Delay_Req message, which occurs during the forwarding of the Delay_Req message, to the value in the correction field of the Delay_Resp message (step S42). In the example shown in Fig. 7, the relay device 13-1 is subject to a delay time of the Delay_Req message of t8-t7. Therefore, in step S42, the time synchronization management unit 37 adds a value of t8-t7 to the value in the correction field. Next, the information setting unit 35 checks whether the source of the Delay_Resp message is the master device 12 (step S43). If the source is not the master device 12, that is, if the source is the other relay device (step S43: No), the process proceeds to step S45. Alternatively, if the source of the Delay_Resp message is the master device 12 (step S43: Yes), the information setting unit 35 sets the PCP value in the VLAN tag of the frame storing the Delay_Resp message to "7" (step S44). In the case of the relay device 13-1, the source of the Delay_Resp message is the master device 12, and therefore, the relay device 13-1 executes step S44 after step S43 to cause the information setting unit 35 to set the PCP value to "7."If the PCP value is to be set to a value other than 7, the relay devices 13-1 and 13-2 also follow a functional sequence identical to the operation or functional sequence for setting the PCP value to "7." To generalize the description, the PCP value to be set is represented as "n" in Fig. 11. If the source of the Delay_Resp message is not the master device 12 (step S43: No), or if the PCP value was set in the VLAN tag in step S44, the second transmitting unit 34 transmits the Delay_Resp message (step S45). The second transmitting unit 34 of the relay device 13-1 transmits the Delay_Resp message to the relay device 13-2 in step S45. Next, the information setting unit 35 subtracts "1" from the PCP value (n) (step S46). If the value of n resulting from the subtraction of "1" is not less than 0 (step S47: No), the process is aborted. If the value of n resulting from the subtraction of "1" is less than 0 (step S47: Yes), the information setting unit 35 changes the value of n to "7" (step S48), and the process is then terminated. Since it is assumed that the PCP value = 7 in this example, the relay devices 13-1 terminate the process without executing step S48. When the Delay_Resp message sent from the relay device 13-1 arrives at the relay device 13-2, the relay device 13-2 transmits the Delay_Resp message to the slave device 14 (step S72 in Fig. 7). The operation of the relay device 13-2 to perform this operation will be described below. When the Delay_Resp message arrives from the relay device 13-1, the relay device 13-2 executes steps S41 to S43 and S45 of Fig. 11. That is, the relay device 13-2 operates such that the first receiving unit 31 receives the Delay_Resp message, and the time synchronization management unit 37 adds the retention time (τ4-τ3) of the Delay_Req message to the correction field value of the Delay_Resp message. The second transmitting unit 34 transmits the Delay_Resp message. In the example shown in Fig. 7, the relay device 13-2 is subject to a retention time of the Delay_Req message of t6-t5. Therefore, the time synchronization management unit 37 adds a value of t6-t5 to the value in the correction field. When the Delay_Resp message sent from the relay device 13-2 arrives at the slave device 14, the slave device 14 stores the value in the correction field and the time information (T4) specified in the Delay_Resp message. Specifically, the receiving unit 41 in the slave device 14 receives the Delay_Resp message, and the control unit 43 notifies the time synchronization management unit 44 of the receipt of the Delay_Resp message. The time synchronization management unit 44 stores the value in the correction field ((t8-t7)+(t6-t5)) and the time information (T4) specified in the Delay_Resp message. In addition, the transmission delay time collecting unit 45 associates the value in the correction field ((t8-t7)+(t6-t5)) with the PCP value (n=7) in the Delay_Resp message and stores these values in association. The aforementioned processes of sending and receiving a Sync message, a Follow_Up message, a Delay_Req message, and a Delay_Resp message enable the calculation of an average path delay. The average path delay is the transmission delay along the communication path from the master device 12 to the slave device 14. The average path delay is calculated in the time synchronization management unit 44 of the slave device 14 based on Equation (1). In Equation (1), "correction field of Sync" refers to the value set in the correction field of the Sync message received from the slave device 14; "correction field of Follow_Up" refers to the value set in the correction field of the Follow_Up message received from the slave device 14; and "correction field of Delay_Resp" refers to the value set in the correction field of the Delay_Resp message received from the slave device 14. The time synchronization management unit 44 of the slave device 14 calculates a slave time difference based on equation (2) using the average path delay calculated according to equation (1). The slave time difference is the offset of the time in the slave device 14 from the time in the master device 12. The slave device 14 can be time-synchronized with the master device 12 by calculating the slave time difference and then correcting the clock of the time synchronization management unit 44 of the slave device 14. The dwell time of a Sync message can be considered the dwell time of a frame in the downstream direction (i.e., from the master device 12 to the slave device 14). The dwell time of a Delay_Req message can be considered the dwell time of a frame in the upstream direction (i.e., from the slave device 14 to the master device 12). The above sequence of operations means that the transmission delay time collecting unit 45 of the slave device 14 stores the total value of the residence times ((t2-t1)+(t4-t3)) of the respective relay devices 13-1 and 13-2 of one frame in the downlink direction when the PCP value=7, and the total value of the residence times ((t8-t7)+(t6-t5)) of the respective relay devices 13-1 and 13-2 of one uplink frame when the PCP value=7. By performing the above series of operations while changing the PCP value to be set upon transmission of a frame by the relay device 13-1 or 13-2, the transmission delay time collecting unit 45 of the slave device 14 can calculate and store, for each PCP value, the transmission delay time of the frame in the uplink direction and the downlink direction. The above series of operations can be performed repeatedly while changing the PCP value from 0 to 7 (in ascending order) or randomly to queue a corresponding task in a measurement queue. Furthermore, the above sequence of operations can be performed to assign a PCP value to the Sync message and the Delay_Resp message in a different order. The Follow_Up message is assigned a PCP value identical to the PCP value immediately preceding the Sync message, and the Delay_Resp message is assigned a PCP value identical to the PCP value immediately preceding the Delay_Req message. The measurement can be performed multiple times for a single PCP value. If a measurement is performed multiple times, the representative value of the results of the multiple measurements can be an average value, a maximum or minimum value of the results, or a weighted average determined by applying a greater or lesser weight to a more recent measurement result. The transmission delay time in the above sequence of operations can be combined with another element (e.g., the ToS (Type of Service) value in the IPv4 header, the traffic class in the IPv6 header, the frame length, the frame payload content, or similar) that indicates a characteristic of the frame as characteristic information of the frame, instead of or in addition to the PCP value in the VLAN tag. In this case, a similar result is obtained (the transmission delay time of the frame in each of the two directions, i.e., uplink and downlink). Each PTP message has an extension field. When sending each PTP message, each relay device can write the retention time of that relay device into this extension field and then send the resulting PTP message. This allows the master device, the other relay device, the slave device, or any other connected device to be informed not only of the total retention time, but also of the retention time of each relay device. As described above, in the communication system 100 according to the present embodiment, each of the relay devices (relay devices 13-1 and 13-2) that relays a frame between the master device 12 and the slave device 14 sets a priority level in frames containing PTP messages intended for time synchronization (ie, Sync message, Follow_Up message, Delay_Req message, and Delay_Resp message) during the relaying process to calculate the residence time of a frame in each of the relay devices for each priority level. Each of the relay devices then sends the calculated value of the residence time to the slave device 14. In this way, the slave device 14 can summarize the residence time of a frame in each of the relay devices for each priority level and calculate the transmission delay time of the frame in each priority level.Furthermore, the transmission delay time of a frame can be measured for each priority level using time synchronization frames. This means that the transmission delay time of a frame can be measured for each priority level without using a separate frame. The following describes a hardware configuration for implementing the main device 12, the relay devices 13-1 and 13-2, and the sub device 14. The main device 12 is described below. The main device 12 consists of, for example, a processor 101, a main memory 102, a transmitting circuit 103, and a receiving circuit 104, which are shown in Fig. 12. Note that Fig. 12 is a block diagram showing an example of the hardware for implementing the main device 12. The processor 101 is a central processing unit (CPU) (also known as a processing unit, arithmetic unit, microprocessor, microcomputer, and digital signal processor (DSP)), an LSI (System Large Scale Integration), or the like. The main memory 102 is a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) (registered trademark), or the like. The transmitting circuit 103 is an electronic circuit that transmits a signal to a communication line. The receiving circuit 104 is an electronic circuit that receives a signal from a communication line. The time receiving unit 21, the time synchronization management unit 22, and the control unit 23 of the main device 12 can be implemented by the processor 101 and the main memory 102. That is, the time receiving unit 21, the time synchronization management unit 22, and the control unit 23 of the main device 12 can be implemented by storing a program for providing the operation of the time receiving unit 21, the time synchronization management unit 22, and the control unit 23 of the main device 12 in advance in the main memory 102, and by reading and executing this program by the processor 101.It should be noted that the program to be stored in the main memory 102 for operating the time receiving unit 21, the time synchronization managing unit 22, and the control unit 23 may be provided to a user or the like by storing it in, for example, a storage medium such as a compact disc (CD)-ROM or a digital versatile disc (DVD)-ROM, or via a network. In contrast to the hardware example in Fig. 12, in which the main device 12 is implemented by the general-purpose processor 101 and the main memory 102, the main device 12 may also be implemented by a dedicated processing circuit instead of the combination of the processor 101 and the main memory 102. That is, the time receiving unit 21, the time synchronization management unit 22, and the control unit 23 of the main device 12 may be implemented in a dedicated processing circuit. In this regard, the dedicated processing circuit is a single circuit, a set of multiple circuits, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a combination thereof.It should be noted that the time receiving unit 21, the time synchronization managing unit 22, and the control unit 23 may be implemented such that part thereof is implemented by the processor 101 and the main memory 102, and the rest thereof is implemented by special processing circuits. In the main device 12, the receiving unit 24 is implemented in the receiving circuit 104 and the transmitting unit 25 is implemented in the transmitting circuit 103. Note that main memory 102 is also used as temporary storage by processor 101 to perform various calculation tasks. Receiving circuit 104 is also used by time receiving unit 21 to receive time information. The relay devices 13-1 and 13-2 and the slave device 14 can also be implemented by hardware similar to the hardware for the main device 12. That is, the relay devices 13-1 and 13-2 and the slave device 14 can also be implemented by hardware similar to the set of the processor 101, the main memory 102, the transmitting circuit 103, and the receiving circuit 104 shown in Fig. 12. The information setting unit 35, the control unit 36, and the time synchronization management unit 37 of each of the relay devices 13-1 and 13-2 can be implemented by having the processor 101 execute a program to provide the operation of these components. These components can be implemented in dedicated processing circuits, such as a single circuit, a set of multiple circuits, or an ASIC, as described above. In each of the relay devices 13-1 and 13-2, the first receiving unit 31 and the second receiving unit 33 are implemented in the receiving circuit 104, and the first transmitting unit 32 and the second transmitting unit 34 are implemented in the transmitting circuit 103. The control unit 43, the time synchronization management unit 44, and the transmission delay time collection unit 45 of the slave device 14 can be implemented by the processor 101 executing a program for the operation of these components. These components can be implemented, as described above, in dedicated processing circuits, e.g., in a single circuit, a set of multiple circuits, or an ASIC. In the slave device 14, the receiving unit 41 is implemented in the receiving circuit 104, and the transmitting unit 42 is implemented in the transmitting circuit 103. Second embodiment. In the first embodiment, the slave device 14 associates a transmission delay time with a priority level and stores these values in association to calculate the transmission delay time of a frame at each priority level. In contrast, in a second embodiment, the relay devices associate a transmission delay time with a priority level and store these values in association to calculate the transmission delay time of a frame at each priority level. In the description of the present embodiment, a description applicable to the first embodiment will be omitted. Fig. 13 is a block diagram showing an example configuration of a communication system 100a according to the second embodiment. As shown, the communication system 100a according to the second embodiment includes the time receiving device 11, the master device 12, the relay devices 13a-1 and 13a-2, and a slave device 14a. Similar to the first embodiment, the devices comprising the communication system 100a are connected to each other via a LAN line. That is, the communication system 100a includes the relay device 13a-1, the relay device 13a-2, and the slave device 14a instead of the relay device 13-1, the relay device 13-2, and the slave device 14 of the communication system 100 described in the first embodiment. In the description of the present embodiment, a description applicable to the first embodiment will be omitted.The devices belonging to the communication system 100a each have a clock and are configured to be time-synchronized with each other by transmitting and receiving frames each storing a PTP message, similar to the first embodiment. Similar to the first embodiment, the time receiving device 11, the master device 12, the relay devices 13a-1 and 13a-2, and the slave device 14a transmit and receive PTP messages using the frame 210 or the frame 220 having the structure shown in Fig. 3. The main device 12 is configured the same as the main device 12 in the first embodiment. Fig. 14 is a block diagram showing an example configuration of the relay devices 13a-1 and 13a-2 according to the second embodiment. The relay devices 13a-1 and 13a-2 are each configured to include an information setting unit 35a and a control unit 36a instead of the information setting unit 35 and the control unit 36 of the relay device 13-1 or 13-2 according to the first embodiment, and additionally include a transmission delay time collecting unit 38. Components other than the information setting unit 35a, the control unit 36a, and the transmission delay time collecting unit 38 will not be described here. The information setting unit 35a and the control unit 36a generally operate similarly to the information setting unit 35 and the control unit 36 of each of the relay devices 13-1 and 13-2 according to the first embodiment, but some specific operations are different. The operation of the information setting unit 35a and the control unit 36a will be described in detail later. The transmission delay time collecting unit 38 collects information about the transmission delay time occurring in the relay devices 13a-1 and 13a-2, and calculates the transmission delay time of the frame occurring along the communication path from the main device 12 to the slave device 14a based on the collected information. Fig. 15 is a block diagram showing an example configuration of the slave device 14a according to the second embodiment. The slave device 14a is configured so that the transmission delay time collecting unit 45 according to the first embodiment can be removed from the slave device 14 and includes a control unit 43a instead of the control unit 43. Descriptions of components other than the control unit 43a will be omitted. The control unit 43a generally operates similarly to the control unit 43 of the slave device 14 according to the first embodiment, but some specific operations are different. The operation of the control device 43a will be described in detail later. A method for measuring the transmission delay time of a frame transmitted in the communication system 100a for each frame priority will be described below. Fig. 16 is a sequence diagram illustrating an operational example of measuring the transmission delay time of a frame occurring in the communication system 100a according to the second embodiment. As shown in Fig. 16, the communication system 100a also causes the transmission and reception of four types of PTP messages, ie, a Sync message, a Follow_Up message, a Delay_Req message, and a Delay_Resp message, between the master device 12 and the slave device 14a in a similar manner to the communication system 100 according to the first embodiment, in order to measure the transmission delay time. [Process of sending and receiving sync messages] To send a sync message, the main device 12 operates such that the time synchronization management unit 22 instructs the control unit 23 to generate a sync message. During this process, the time synchronization management unit 22 also informs the control unit 23 about the structure of the frame to be used for sending the sync message. Specifically, this information is information about an instruction to generate a frame without a VLAN tag, with the correction field value = 0 and the time = T1. The control unit 23, having received the command from the time synchronization management unit 22, generates a sync message corresponding to the command and outputs the sync message to the transmitting unit 25. The transmitting unit 25 transmits the sync message received from the control unit 23 to the relay device 13a-1 (step S131 in Fig. 16). When the sync message sent from the master device 12 arrives at the relay device 13a-1, the relay device 13a-1 adds a VLAN tag in which a PCP value has been set to the frame in which the sync message is stored, and transmits the resulting frame to the relay device 13a-2 (step S132 in Fig. 16). Although the PCP value can be set to any value within a settable range, an example in which the PCP value in the frame is set to "7" will be described below. The operations for transmitting and receiving a Follow_Up message, a Delay_Req message, and a Delay_Resp message will be described later, also assuming that the PCP value in the frame is set to "7." Note that in Fig. 16, the PCP value is represented as "n" to generalize the description. The operation of the relay device 13a-1 for transmitting the frame in which a sync message is stored will be described below. Fig. 17 is a flowchart showing an operational example of the forwarding of a sync message performed by the relay devices 13a-1 according to the second embodiment. Note that an example of the forwarding of a sync message performed by the relay device 13a-2 is also shown in the flowchart of Fig. 17. Fig. 17 uses the same step numbers as the step numbers of the common process assigned in the flowchart of Fig. 8 showing an exemplary operation of the relay devices 13-1 and 13-2 according to the first embodiment. In the relay device 13a-1, the first receiving unit 31 receives the sync message (step S11), and the time synchronization management unit 37 stores a current time τ1 as the time of reception of the sync message (step S12). In the example shown in Fig. 16, the first receiving unit 31 of the relay device 13a-1 receives the sync message at time t1. Thus, the time synchronization management unit 37 stores τ1=t1 in step S12. Next, the information setting unit 35a checks whether the source of the sync message is the master device 12 (step S13). If the source is not the master device 12, that is, if the source is the other relay device (step S13: No), the process proceeds to step S85. If the source of the sync message is the master device 12 (step S13: Yes), the information setting unit 35a adds a VLAN tag with a PCP value of "7" to the frame in which the sync message is stored (step S84). In the case of the relay device 13a-1, the source of the sync message is the master device 12, and therefore, the relay device 13a-1 executes step S84 after step S13 to cause the information setting unit 35a to add a VLAN tag containing a PCP value of "7" to the frame. If the PCP value is to be set to a value other than "7," the relay devices 13a-1 and 13a-2 also follow an operation flow identical to the operation flow for setting the PCP value to "7." Therefore, in Fig. 17, the PCP value to be set is represented as “n” to generalize the description. If the source of the sync message is not the master device 12 (step S13: No), or if a VLAN tag was added to the frame in step S84, the information setting unit 35a checks whether the destination of the sync message is the slave device 14a (step S85). The term "destination" used in this context refers to the device to which the sync message is sent. Thus, in the case of the relay device 13a-1, the destination is the relay device 13a-2, while in the case of the relay device 13a-2, the destination is the slave device 14a. If the destination is not the slave device 14a, that is, if the destination is the other relay device (step S85: No), the process proceeds to step S15. Alternatively, when the destination of the sync message is the slave device 14a (step S85: Yes), the information setting unit 35a removes the VLAN tag from the frame in which the sync message is stored (step S86). If the destination of the sync message is not the slave device 14a (step S85: No), or if the VLAN tag was removed in step S86, the time synchronization management unit 37 stores a current time τ2 as the time of sending the sync message (step S15), and the second transmission unit 34 transmits the sync message (step S16). The process is then terminated. In the case of the relay device 13a-1, the destination of the sync message is not the slave device 14a, so the process proceeds to step S15 after step S85. In the example shown in Fig. 16, the second transmission unit 34 of the relay device 13a-1 transmits the sync message at time t2. Thus, the time synchronization management unit 37 of the relay device 13a-1 stores τ2=t2 in step S15. When the sync message sent from relay device 13a-1 arrives at relay device 13a-2, relay device 13a-2 removes the VLAN tag from the frame in which the sync message is stored and transmits the resulting frame to slave device 14a (step S133 in Fig. 16). The operation of relay device 13a-2 to perform this method is described below. When the sync message arrives from the relay device 13a-1, the relay device 13a-2 executes steps S11 to S13, S85, S86, S15, and S16 of Fig. 17. That is, the relay device 13a-2 operates such that the first receiving unit 31 receives the sync message, the time synchronization management unit 37 stores the current time τ1 of receiving the sync message, and the information setting unit 35a removes the VLAN tag from the frame in which the sync message is stored. Then, the time synchronization management unit 37 stores the current time τ2 of transmitting the sync message, and the second transmitting unit 34 transmits the sync message. In the example shown in Fig. 16, the relay device 13a-2 receives the sync message at time t3 and sends the sync message at time t4.Accordingly, the time synchronization management unit 37 of the relay device 13a-2 stores τ1=t3 as the time of receiving the sync message and τ2=t4 as the time of sending the sync message. When the sync message sent from the relay device 13a-2 arrives at the slave device 14a, the slave device 14a stores the time of receipt of the sync message. Specifically, the receiving unit 41 in the slave device 14a receives the sync message, and the control unit 43a notifies the time synchronization management unit 44 of receipt of the sync message. The time synchronization management unit 44 stores, as T2, the time indicated by the internal clock upon receipt of the notification from the control unit 43a, that is, the time of receipt of the sync message. In addition, the time synchronization management unit 44 stores the value of T1 indicated in the sync message. As described above, T1 represents the time at which the master device 12 transmitted the sync frame. [Process of sending and receiving the Follow_Up message] To send a Follow_Up message, the master device 12 operates such that the time synchronization management unit 22 instructs the control unit 23 to generate a Follow_Up message. During this process, the time synchronization management unit 22 also informs the control unit 23 about the structure of the frame to be used for sending the Follow_Up message. Specifically, this information is information about an instruction to generate a frame without a VLAN tag with the correction field value = 0. The control unit 23, having received the command from the time synchronization management unit 22, generates a Follow_Up message corresponding to the command and outputs the Follow_Up message to the transmission unit 25. The transmission unit 25 transmits the Follow_Up message received from the control unit 23 to the relay device 13a-1 (step S134 in Fig. 16). When the Follow_Up message sent from the master device 12 arrives at the relay device 13a-1, the relay device 13a-1 updates the value of the correction field in the Follow_Up message, adds a VLAN tag in which a PCP value has been set to the frame in which the Follow_Up message is stored, and transmits the resulting frame to the relay device 13a-2 (step S135 in Fig. 16). The operation of the relay device 13a-1 to perform this method is described below. Fig. 18 is a flowchart showing an operational example of the forwarding of a Follow_Up message performed by the relay devices 13a-1 according to the second embodiment. Note that an example of the forwarding of a Follow_Up message performed by the relay device 13a-2 is also shown in the flowchart of Fig. 18. Fig. 18 uses the same step numbers as the step numbers of the common operation assigned in the flowchart of Fig. 9 illustrating an example operation of the relay devices 13-1 and 13-2 according to the first embodiment. In the relay device 13a-1, the first receiving unit 31 receives the Follow_Up message (step S21), and the time synchronization management unit 37 adds the sync message dwell time (τ2-τ1) that occurs during the forwarding of the sync message to the value in the Follow_Up message correction field (step S22). In the example shown in Fig. 16, the relay device 13a-1 is subject to a sync message dwell time of t2-t1. Thus, in step S22, the time synchronization management unit 37 adds a value of t2-t1 to the value in the correction field. Next, the transmission delay time collecting unit 38 associates the PCP value (n=7) in the VLAN tag with the value in the correction field (t2-t1) of the Follow_Up message as the total value of the dwell time of a downlink frame and stores these values in the map (step S93). When the PCP value is to be set to a value other than "7," the relay devices 13a-1 and 13a-2 also follow an operation sequence identical to the operation sequence for setting the PCP value to "7." Therefore, in Fig. 18, the PCP value in the VLAN tag is represented as "n" for generalization of the description. Next, the information setting unit 35a checks whether the source of the Follow_Up message is the master device 12 (step S94). If the source is not the master device 12, that is, if the source is the other relay device (step S94: No), the process proceeds to step S96. If the source of the Follow_Up message is the master device 12 (step S94: Yes), the information setting unit 35a adds a VLAN tag with a PCP value of "7" to the frame in which the Follow_Up message is stored (step S95). In the case of the relay device 13a-1, the source of the Follow_Up message is the master device 12, and the relay device 13a-1 therefore executes step S95 after step S94 to cause the information setting unit 35a to add a VLAN tag containing a PCP value of "7" to the frame. If the source of the Follow_Up message is not the master device 12 (step S94: No), or if a VLAN tag was added to the frame in step S95, the information setting unit 35a checks whether the destination of the Follow_Up message is the slave device 14a (step S96). The term "destination" used in this context refers, similarly to the destination of the Sync message described above, to the device to which the Follow_Up message is sent. If the destination is not the slave device 14a, that is, if the destination is the other relay device (step S96: No), the process proceeds to step S98. Alternatively, if the destination of the Follow_Up message is the slave device 14a (step S96: Yes), the information setting unit 35a removes the VLAN tag from the frame in which the Follow_Up message is stored (step S97).In the case of the relay device 13a-1, the destination of the Follow_Up message is not the slave device 14a, and the process therefore proceeds to step S98 after step S96. If the destination of the Follow_Up message is not the slave device 14a (step S96: No), or if the VLAN tag was removed from the frame in step S97, the second transmitting unit 34 transmits the Follow_Up message (step S98). The process is then terminated. In the case of the relay device 13a-1, step S97 is not executed, and the second transmitting unit 34 transmits the Follow_Up message to the relay device 13a-2 in step S98. When the Follow_Up message sent by the relay device 13a-1 arrives at the relay device 13a-2, the relay device 13a-2 updates the value of the correction field in the Follow_Up message, removes the VLAN tag from the Follow_Up message, and transmits the resulting frame to the slave device 14a (step S136 of Fig. 16). The operation of the relay device 13a-2 for performing this method is described below. When the Follow_Up message arrives from the relay device 13a-1, the relay device 13a-2 executes steps S21, S22, S93, S94, and S96 to S98 of Fig. 18. That is, the relay device 13a-2 operates such that the first receiving unit 31 receives the Follow_Up message, and the time synchronization management unit 37 adds the residence time (τ2-τ1) of the sync message to the correction field value of the Follow_Up message. In the example shown in Fig. 16, the relay device 13a-2 is subject to a sync message residence time of t4-t3. Therefore, the time synchronization management unit 37 adds a value of t4-t3 to the value in the correction field. Next, the transmission delay time collecting unit 38 assigns the correction field value ((t2-t1)+(t4-t3)) of the Follow_Up message to the PCP value (n=7) as the total value of the dwell times of a subsequent frame and stores these values in the map.Then, the information setting unit 35a removes the VLAN tag from the Follow_Up message, and the second transmitting unit 34 transmits the Follow_Up message to the slave device 14a. When the Follow_Up message sent from the relay device 13a-2 arrives at the slave device 14a, the receiving unit 41 receives the Follow_Up message. [Process of sending and receiving the Delay_Req message] To send a Delay_Req message, the slave device 14a operates such that the time synchronization management unit 44 instructs the control unit 43a to generate a Delay_Req message. During this process, the time synchronization management unit 44 also informs the control unit 43a of information about the structure of the frame to be used to send the Delay_Req message. Specifically, this information is information about an instruction to generate a frame without a VLAN tag. Furthermore, the time synchronization management unit 44 stores the time T3 indicated by the internal clock at the time the command to generate the Delay_Req message is issued to the control unit 43a. The control unit 43a, which has received the command from the time synchronization management unit 44, generates a delay message (Delay_Req) corresponding to the command and outputs the delay message (Delay_Req) to the transmission unit 42. The transmission unit 42 transmits the Delay_Req message received from the control unit 43a to the relay device 13a-2 (step S137 in Fig. 16). When the Delay_Req message sent from the slave device 14a arrives at the relay device 13a-2, the relay device 13a-2 adds a VLAN tag in which a PCP value has been set to the frame in which the Delay_Req message is stored and transmits the resulting frame to the relay device 13a-1 (step S138 in Fig. 16). The operation of the relay device 13a-2 for performing this method is described below. Fig. 19 is a flowchart showing an operational example of the forwarding of a Delay_Req message performed by the relay devices 13a-2 according to the second embodiment. Note that an example of the forwarding of a Delay_Req message performed by the relay device 13a-1 is also shown in the flowchart of Fig. 19. Fig. 19 uses the same step numbers as the step numbers of the common operation assigned in the flowchart of Fig. 10 illustrating an example operation of the relay devices 13-1 and 13-2 according to the first embodiment. In the relay device 13a-2, the second receiving unit 33 receives the Delay_Req message (step S31), and the time synchronization management unit 37 stores a current time τ3 as the time of receipt of the Delay_Req message (step S32). In the example shown in Fig. 16, the second receiving unit 33 of the relay device 13a-2 receives the Sync message at time t5. Thus, the time synchronization management unit 37 stores τ3=t5 in step S32. Next, the information setting unit 35a checks whether the source of the Delay_Req message is the slave device 14a (step S33). If the source is not the slave device 14a, that is, if the source is the other relay device (step S33: No), the process proceeds to step S105. Alternatively, if the source of the Delay_Req message is the slave device 14a (step S33: Yes), the information setting unit 35a adds a VLAN tag with a PCP value of "7" to the frame in which the Delay_Req message is stored (step S104). In the case of the relay device 13a-2, the source of the Delay_Req message is the slave device 14a, and the relay device 13a-2 therefore executes step S104 after step S33 to cause the information setting unit 35a to add a VLAN tag containing a PCP value of "7" to the frame.If the PCP value is to be set to a value other than "7," the relay devices 13a-1 and 13a-2 also follow a functional sequence identical to the functional sequence for setting the PCP value to "7." Therefore, in Figure 19, the PCP value in the VLAN tag is represented as "n" to generalize the description. If the source of the Delay_Req message is not the slave device 14a (step S33: No), or if a VLAN tag was added to the frame in step S104, the information setting unit 35a checks whether the destination of the Delay_Req message is the master device 12 (step S105). The term "destination" used in this context refers, similar to the destination of the Sync message described above, to the device to which the Delay_Req message is sent. In the case of the relay device 13a-2, the destination is the relay device 13a-1, while in the case of the relay device 13a-1, the destination is the master device 12. If the destination is not the master device 12 (step S105: No), the process proceeds to step S35.Alternatively, if the destination of the Delay_Req message is the master device 12 (step S105: Yes), the information setting unit 35a removes the VLAN tag from the frame in which the Delay_Req message is stored (step S106). In the case of the relay device 13a-2, the destination of the Delay_Req message is not the master device 12, so the process proceeds to step S35 after step S105. If the destination of the Delay_Req message is not the master device 12 (step S105: No), or if the VLAN tag was removed from the frame in step S106, the time synchronization management unit 37 stores a current time τ4 as the time of sending the Delay_Req message (step S35), and the first transmission unit 32 transmits the Delay_Req message (step S36). The process is then terminated. The first transmission unit 32 of the relay device 13a-2 transmits the Delay_Req message to the relay device 13a-1 in step S36. In the example shown in Fig. 16, the first transmission unit 32 of the relay device 13a-2 transmits the Delay_Req message at time t6. Thus, the time synchronization management unit 37 stores τ4=t6 in step S35. When the Delay_Req message sent from the relay device 13a-2 arrives at the relay device 13a-1, the relay device 13a-1 removes the VLAN tag from the Delay_Req message and transmits the resulting frame to the main device 12 (step S139 of Fig. 16). The operation of the relay device 13a-1 to perform this method is described below. When the Delay_Req message arrives from the relay device 13a-2, the relay device 13a-1 executes steps S31 to S33, S105, S106, S35, and S36 of Fig. 19. That is, the relay device 13a-1 operates such that the second receiving unit 33 receives the Delay_Req message, and the time synchronization management unit 37 stores the current time τ3 of reception of the Delay_Req message. Next, the information setting unit 35a removes the VLAN tag from the Delay_Req message, the time synchronization management unit 37 stores the current time τ4 of transmission of the Delay_Req message, and the first transmitting unit 32 transmits the Delay_Req message. In the example shown in Fig. 16, the relay device 13a-1 receives the Delay_Req message at time t7 and sends the Delay_Req message at time t8.Accordingly, the time synchronization management unit 37 of the relay device 13a-1 stores τ3=t7 as the time of receiving the Delay_Req message and τ4=t8 as the time of sending the Delay_Req message. When the Delay_Req message sent from the relay device 13a-1 arrives at the main device 12, the main device 12 stores the time of receipt of the Delay_Req message. In the main device 12, the receiving unit 24 receives the Delay_Req message, and the control unit 23 notifies the time synchronization management unit 22 of receipt of the Delay_Req message. The time synchronization management unit 22 stores as T4 the time indicated by the internal clock upon receipt of the notification from the control unit 23—that is, the time of receipt of the Delay_Req message. [Process of sending and receiving the Delay_Resp message] To send a Delay_Resp message, the main device 12 operates such that the time synchronization management unit 22 instructs the control unit 23 to generate a Delay_Resp message. During this process, the time synchronization management unit 22 also informs the control unit 23 about the structure of the frame to be used for sending the Delay_Resp message. Specifically, this information is information about an instruction to generate a frame without a VLAN tag, with the correction field value = 0, and the time T4. The control unit 23, having received the command from the time synchronization management unit 22, generates a Delay_Resp message corresponding to the command and outputs the Delay_Resp message to the transmission unit 25. The transmission unit 25 transmits the Delay_Resp message received from the control unit 23 to the relay device 13a-1 (step S140 in Fig. 16). When the Delay_Resp message sent from the master device 12 arrives at the relay device 13a-1, the relay device 13a-1 updates the value of the correction field in the Delay_Resp message, adds a VLAN tag in which a PCP value has been set to the frame in which the Delay_Resp message is stored, and transmits the resulting frame to the relay device 13a-2 (step S141 in Fig. 16). The operation of the relay device 13a-1 to perform this method is described below. Fig. 20 is a flowchart showing an operational example of the forwarding of a Delay_Resp message performed by the relay device 13a-1 according to the second embodiment. Note that an example of the forwarding of a Delay_Resp message performed by the relay device 13a-2 is also shown in the flowchart of Fig. 20. In the relay device 13a-1, the first receiving unit 31 receives the Delay_Resp message (step S41), and the time synchronization management unit 37 adds the delay time (τ4-τ3) of the Delay_Req message, which occurs during the forwarding of the Delay_Req message, to the value in the correction field of the Delay_Resp message (step S42). In the example shown in Fig. 16, the relay device 13a-1 is subject to a delay time of the Delay_Req message of t8-t7. Therefore, in step S42, the time synchronization management unit 37 adds a value of t8-t7 to the value in the correction field. Next, the time synchronization management unit 37 maps the value in the correction field (t8-t7) of the Delay_Resp message to the PCP value (n=7) in the VLAN tag as the total value of the uplink frame's dwell time and stores these values in the map (step S113). When the PCP value is to be set to a value other than "7," the relay devices 13a-1 and 13a-2 also follow an operation sequence identical to the operation sequence for setting the PCP value to "7." Therefore, in Fig. 20, the PCP value in the VLAN tag is represented as "n" for generalization. Next, the information setting unit 35a checks whether the source of the Delay_Resp message is the master device 12 (step S114). If the source is not the master device 12, that is, if the source is the other relay device (step S114: No), the process proceeds to step S116. Alternatively, if the source of the Delay_Resp message is the master device 12 (step S114: Yes), the information setting unit 35a adds a VLAN tag with the PCP value "7" to the frame in which the Delay_Resp message is stored (step S115). In the case of the relay device 13a-1, the source of the Delay_Resp message is the main device 12, and the relay device 13a-1 therefore executes step S115 after step S114 to cause the information setting unit 35a to add a VLAN tag containing a PCP value of “7” to the frame. If the source of the Delay_Resp message is not the master device 12 (step S114: No), or if a VLAN tag was added to the frame in step S115, the information setting unit 35a checks whether the destination of the Delay_Resp message is the slave device 14a (step S116). The term "destination" used in this context refers to the device to which the Delay_Resp message is sent, similar to the destination of the Sync message described above. If the destination is not the slave device 14a, that is, if the destination is the other relay device (step S116: No), the process proceeds to step S118. Alternatively, when the destination of the Delay_Resp message is the slave device 14a (step S116: Yes), the information setting unit 35a removes the VLAN tag from the frame in which the Delay_Resp message is stored (step S117).In the case of the relay device 13a-1, the destination of the Delay_Resp message is not the slave device 14a, and the process therefore proceeds to step S118 after step S116. If the destination of the Delay_Resp message is not the slave device 14a (step S116: No), or if the VLAN tag was removed from the frame in step S117, the second transmitting unit 34 transmits the Delay_Resp message (step S118). The second transmitting unit 34 of the relay device 13a-1 transmits the Delay_Resp message to the relay device 13a-2 in step S118. Next, the information setting unit 35a subtracts "1" from the PCP value (n) (step S119). If the value of n resulting from the subtraction of "1" is not less than 0 (step S120: No), the process is aborted. If the value of n resulting from the subtraction of "1" is less than 0 (step S120: Yes), the information setting unit 35a changes the value of n to "7" (step S121), and the process is then terminated. Since the PCP value is assumed to be 7 in this example, the relay device 13a-1 terminates the process without executing step S121. When the Delay_Resp message sent from the relay device 13a-1 arrives at the relay device 13a-2, the relay device 13a-2 updates the value of the correction field in the Delay_Resp message, removes the VLAN tag from the Delay_Resp message, and transmits the resulting frame to the slave device 14a (step S142 of Fig. 16). The operation of the relay device 13a-2 to perform this method is described below. When the Delay_Resp message arrives from the relay device 13a-1, the relay device 13a-2 executes steps S41, S42, S113, S114, and S116 to S120 of Fig. 20. That is, the relay device 13a-2 operates such that the first receiving unit 31 receives the Delay_Resp message, and the time synchronization management unit 37 adds the retention time (τ4-τ3) of the Delay_Req message to the correction field value of the Delay_Resp message. In the example shown in Fig. 16, the relay device 13a-2 is subject to a retention time of the Delay_Req message of t6-t5. Therefore, the time synchronization management unit 37 adds a value of t6-t5 to the value in the correction field. Next, the time synchronization management unit 37 assigns the correction field value ((t8-t7)+(t6-t5)) of the Delay_Resp message to the PCP value (n=7) as the total value of the dwell times of an upstream frame and stores these values in mapping.Then, the information setting unit 35a removes the VLAN tag from the Delay_Resp message, and the second transmitting unit 34 transmits the Delay_Resp message to the slave device 14a. Furthermore, the information setting unit 35a subtracts "1" from the PCP value (n). When the Delay_Resp message sent from the relay device 13a-2 arrives at the slave device 14a, the slave device 14a stores the value in the correction field and the time information (T4) specified in the Delay_Resp message. Specifically, the receiving unit 41 in the slave device 14a receives the Delay_Resp message, and the control unit 43a notifies the time synchronization management unit 44 of the receipt of the Delay_Resp message. The time synchronization management unit 44 stores the value in the correction field ((t8-t7)+(t6-t5)) and the time information (T4) specified in the Delay_Resp message. The aforementioned operations of sending and receiving a Sync message, a Follow_Up message, a Delay_Req message, and a Delay_Resp message enable the calculation of an average path delay. The average path delay is the transmission delay along the communication path from the master device 12 to the slave device 14a. The average path delay is calculated in the time synchronization management unit 44 of the slave device 14a. The average path delay is calculated in a manner similar to the first embodiment. Furthermore, the time synchronization management unit 44 calculates a slave time difference using the average path delay. The slave time difference is the offset of the time in the slave device 14a from the time in the master device 12. The slave time difference is calculated in a manner similar to the first embodiment. Thus, the transmission delay time collecting unit 38 of the relay device 13a-2 adjacent to the slave device 14a stores the total value of the dwell times ((t2-t1)+(t4-t3)) of the respective relay devices 13a-1 and 13a-2 of a downlink frame when the PCP value=7, and the total value of the dwell times ((t8-t7)+(t6-t5)) of the respective relay devices 13a-1 and 13a-2 of an uplink frame when the PCP value=7. By performing the above series of operations while changing the PCP value to be set upon transmission of a frame by the relay device 13a-1 or 13a-2, the transmission delay time collecting unit 38 of the relay device 13a-2 can calculate and store, for each PCP value, the transmission delay time of the frame in the uplink direction and the downlink direction. The above series of operations can be performed repeatedly, changing the PCP value from 0 to 7 (in ascending order) or randomly to queue a corresponding task in a measurement queue. Furthermore, the above sequence of operations can be performed to assign a PCP value to the Sync message and the Delay_Resp message in a different order. The Follow_Up message is assigned a PCP value identical to the PCP value immediately preceding the Sync message, and the Delay_Resp message is assigned a PCP value identical to the PCP value immediately preceding the Delay_Req message. The measurement can be performed multiple times for a single PCP value. If a measurement is performed multiple times, the representative value of the results of the multiple measurements can be an average value, a maximum or minimum value of the results, or a weighted average determined by applying a greater or lesser weight to a more recent measurement result. The transmission delay time in the above series of operations can be combined with another element (e.g., the ToS value in the IPv4 header, the traffic class in the IPv6 header, the frame length, the payload content of the frame, or similar) that indicates a characteristic of the frame, instead of or in addition to the PCP value in the VLAN tag. In this case, a similar result (the transmission delay time of the frame in each of the two directions, i.e., uplink and downlink) is obtained. Each PTP message has an extension field. When each PTP message is sent from a relay device, the relay device can set the dwell time of that relay device in that extension field and then send the resulting PTP message. This allows the master device, the other relay device, the slave device, or any other device connected to that relay device to be informed not only of the total dwell time, but also of the dwell time in each relay device. The configuration described in connection with the present embodiment is also advantageous in a similar manner to the first embodiment. The configurations described in the aforementioned embodiments are merely examples. These configurations may be combined with other known technologies, and configurations of different embodiments may be combined with each other. Furthermore, some of these configurations may be omitted and / or changed without departing from the spirit of the present invention. List of reference symbols 11 Time receiving device; 12 Main device; 13-1, 13-2, 13a-1, 13a-2 Relay device; 14, 14a Subdevice; 21 Time receiving unit; 22, 37, 44 Time synchronization management unit; 23, 36, 36a, 43, 43a Control unit; 24, 41 Receiving unit; 25, 42 Transmitting unit; 31 First receiving unit; 32 First transmitting unit; 33 Second receiving unit; 34 Second transmitting unit; 35, 35a Information setting unit; 38, 45 Transmission delay time collecting unit; 100, 100a Communication system.

Claims

A communication system (100) comprising: a main device (12); a slave device (14) for time synchronization with the main device (12); and a relay device (13-1, 13-2) for forwarding a signal between the main device (12) and the slave device (14), wherein the relay device (13-1, 13-2) comprises an information setting unit (35) for setting, in a frame, characteristic information about the priority of the frame, the frame being received by the main device (12) or the slave device (14), and a time synchronization management unit (37) for storing a residence time of a first time synchronization frame that occurs during the forwarding of the first time synchronization frame, in order to store the residence time of the first time synchronization frame that is stored,to add to a correction field of a second time synchronization frame and to write the stored dwell time of the first time synchronization frame into the second time synchronization frame as a device-specific dwell time when the second time synchronization frame is forwarded, to store a dwell time of a third time synchronization frame that occurs during forwarding of the third time synchronization frame, and to add the dwell time of the third time synchronization frame that is stored to a correction field of a fourth time synchronization frame, and to write the dwell time of the third time synchronization frame that is stored into the fourth time synchronization frame as a device-specific dwell time when the fourth time synchronization frame is forwarded, wherein the first time synchronization frame is a frame,which is sent from the main device (12) to the slave device (14), the second time synchronization frame is a frame sent from the main device (12) to the slave device (14), the third time synchronization frame is a frame sent from the slave device (14) to the main device (12), the fourth time synchronization frame is a frame sent from the main device (12) to the slave device (14), the slave device (14) comprises a transmission delay time collecting unit (45) for associating a value in the correction field of the second time synchronization frame received from the relay device (13-1, 13-2) with characteristic information set in the second time synchronization frame and storing the value and the characteristic information of the second time synchronization frame in association, and for associating a value in the correction field of the fourth time synchronization frame,received by the relay device (13-1, 13-2) with characteristic information set in the fourth time synchronization frame, and store the value and the characteristic information of the fourth time synchronization frame in association, and the slave device (14) notifies another connected device of a device-specific dwell time written in the second time synchronization frame received by the relay device (13-1, 13-2) and a device-specific dwell time written in the fourth time synchronization frame received by the relay device (13-1, 13-2). The communication system (100) according to claim 1, wherein the information setting unit (35) sets the characteristic information in a tag added to the frame received from the master device (12) or the slave device (14). The communication system (100a) according to claim 1, wherein the information setting unit (35a) adds a tag in which the characteristic information is set to the frame received from the main device (12) or the slave device (14a) and removes the tag from a frame to be sent to the main device (12) or the slave device (14a). Communication system (100) according to one of claims 1 to 3, wherein the characteristic information represents a priority level of a frame. The communication system (100) of claim 4, wherein the priority level is a priority code point (PCP) value in a VLAN (Virtual Local Area Network) tag. Communication system (100) according to claim 4, wherein the priority level is a service type value (ToS) of the Internet Protocol (IP). Communication system (100) according to one of claims 1 to 3, wherein the characteristic information represents a length of the frame. Communication system (100) according to one of claims 1 to 3, wherein the characteristic information represents a payload data content of the frame. A communication device (13-1, 13-2) for forwarding a signal between a master device (12) and a slave device (14) that are to be time-synchronized with each other, the communication device (13-1, 13-2) comprising: an information setting unit (35) for setting, in a frame, characteristic information about the priority of the frame, the frame being received by one of the master device (12) and the slave device (14); and a time synchronization management unit (37) for storing a dwell time of a first time synchronization frame that occurs during the forwarding of the first time synchronization frame, for adding the stored dwell time of the first time synchronization frame to a correction field of a second time synchronization frame,and to write the stored dwell time of the first time synchronization frame into the second time synchronization frame as a device-specific dwell time message, which is communicated either to the slave device (14) or to another device connected to the slave device (14) when the second time synchronization frame is forwarded, to store a dwell time of a third time synchronization frame that occurs during the forwarding of the third time synchronization frame, and to add the stored dwell time of the third time synchronization frame to a correction field of a fourth time synchronization frame, and to write the stored dwell time of the third time synchronization frame into the fourth time synchronization frame as a device-specific dwell time message,which is communicated either to the slave device (14) or to another device connected to the slave device (14) when the fourth time synchronization frame is forwarded, wherein the first time synchronization frame is a frame sent from the master device (12) to the slave device (14), the second time synchronization frame is a frame sent from the master device (12) to the slave device (14), the third time synchronization frame is a frame sent from the slave device (14) to the master device (12), the fourth time synchronization frame is a frame sent from the master device (12) to the slave device (14). A communication device (13-1, 13-2) according to claim 9, wherein the information setting unit (35) sets the characteristic information in a tag added to the frame received from the main device (12) or the sub-device (14). The communication device (13a-1, 13a-2) according to claim 9, wherein the information setting unit (35a) adds a tag in which the characteristic information is set to the frame received from the main device (12) or the slave device (14a) and removes the tag from a frame to be sent to the main device (12) or the slave device (14a). A communication device (13a-1, 13a-2) according to claim 11, comprising:a transmission delay time collecting unit (38) for associating a value in the correction field of a frame to be transmitted to the master device (12) or to the slave device (14a) with the characteristic information and storing the value and the characteristic information in association. Communication device (13-1, 13-2) according to one of claims 9 to 12, wherein the characteristic information represents a priority level of a frame. Communication device (13-1, 13-2) according to claim 13, wherein the priority level is a priority code point (PCP) value in a VLAN (Virtual Local Area Network) tag. Communication device (13-1, 13-2) according to claim 13, wherein the priority level is a service type value (ToS) of the Internet Protocol (IP). Communication device (13-1, 13-2) according to one of claims 9 to 12, wherein the characteristic information represents a length of the frame. Communication device (13-1, 13-2) according to one of claims 9 to 12, wherein the characteristic information represents a payload data content of the frame. A communication method for use in a communication device (13-1, 13-2) for relaying a signal between a master device (12) and a slave device (14) to be time-synchronized with each other, the communication method comprising:a step of setting characteristic information about the priority of the frame in a frame, the frame being received by one of the master device (12) and the slave device (14);a step of storing a residence time of a first time synchronization frame caused during relaying of the first time synchronization frame, the first time synchronization frame being a frame sent from the master device (12) to the slave device (14);a step of adding the dwell time of the first time synchronization frame stored in a correction field of a second time synchronization frame and writing the dwell time of the first time synchronization frame stored in the second time synchronization frame as a device-specific dwell time message, which is notified to either the slave device (14) or another device connected to the slave device (14) when the second time synchronization frame is forwarded, wherein the second time synchronization frame is a frame sent from the master device (12) to the slave device (14); a step of storing a dwell time of a third time synchronization frame that occurs during the forwarding of the third time synchronization frame, wherein the third time synchronization frame is a frame sent from the slave device (14) to the master device (12);anda step of adding the dwell time of the third time synchronization frame stored in a correction field of a fourth time synchronization frame and writing the dwell time of the third time synchronization frame stored in the fourth time synchronization frame as a device-specific dwell time message that is notified to either the slave device (14) or another device connected to the slave device (14) when the fourth time synchronization frame is forwarded, wherein the fourth time synchronization frame is a frame sent from the master device (12) to the slave device (14); A control circuit for controlling a communication device (13-1, 13-2) that relays a signal between a master device (12) and a slave device (14) to be time-synchronized with each other, the control circuit causing the communication device (13-1, 13-2) to perform: a step of setting characteristic information about the priority of the frame in a frame, the frame being received by one of the master device (12) and the slave device (14); a step of storing a residence time of a first time synchronization frame caused during relaying of the first time synchronization frame, the first time synchronization frame being a frame sent from the master device (12) to the slave device (14);a step of adding the dwell time of the first time synchronization frame stored in a correction field of a second time synchronization frame and writing the dwell time of the first time synchronization frame stored in the second time synchronization frame as a device-specific dwell time message, which is notified to either the slave device (14) or another device connected to the slave device (14) when the second time synchronization frame is forwarded, wherein the second time synchronization frame is a frame sent from the master device (12) to the slave device (14); a step of storing a dwell time of a third time synchronization frame that occurs during the forwarding of the third time synchronization frame, wherein the third time synchronization frame is a frame sent from the slave device (14) to the master device (12);anda step of adding the dwell time of the third time synchronization frame stored in a correction field of a fourth time synchronization frame and writing the dwell time of the third time synchronization frame stored in the fourth time synchronization frame as a device-specific dwell time message that is notified to either the slave device (14) or another device connected to the slave device (14) when the fourth time synchronization frame is forwarded, wherein the fourth time synchronization frame is a frame sent from the master device (12) to the slave device (14); A storage medium storing a program for controlling a communication device (13-1, 13-2) that relays a signal between a master device (12) and a slave device (14) to be synchronized in time with each other, the program causing the communication device (13-1, 13-2) to execute: a step of setting characteristic information about the priority of the frame in a frame, the frame being received by one of the master device (12) and the slave device (14); a step of storing a residence time of a first time synchronization frame caused during relaying of the first time synchronization frame, the first time synchronization frame being a frame sent from the master device (12) to the slave device (14);a step of adding the residence time of the first time synchronization frame stored in a correction field of a second time synchronization frame and writing the residence time of the first time synchronization frame stored in the second time synchronization frame as a specific residence time message, which is notified to either the slave device (14) or another device connected to the slave device (14) when the second time synchronization frame is forwarded, wherein the second time synchronization frame is a frame sent from the master device (12) to the slave device (14); a step of storing a residence time of a third time synchronization frame that occurs during the forwarding of the third time synchronization frame, wherein the third time synchronization frame is a frame sent from the slave device (14) to the master device (12);anda step of adding the dwell time of the third time synchronization frame stored in a correction field of a fourth time synchronization frame and writing the dwell time of the third time synchronization frame stored in the fourth time synchronization frame as a device-specific dwell time message that is notified to either the slave device (14) or another device connected to the slave device (14) when the fourth time synchronization frame is forwarded, wherein the fourth time synchronization frame is a frame sent from the master device (12) to the slave device (14);

Citation Information

Patent Citations

  • Automatic acquisition of network latency factors

    JP5779664B2

  • Transmitting residence time information in a network

    US20170324497A1