Communication device and communication method

A communication device which has a frame reception unit to separate a frame received from one device into a relay sub-payload that is not addressed to the device itself, and an own-device addressed sub-payload that is addressed to the device itself, an error detection unit to perform error detection based on the error-detection code within the own-device addressed sub-payload, a relay sub-payload storage unit to store the relay sub-payload, a communication-start notification unit to notify a communication-start timing to start communication simultaneously with other devices, and a frame transmission unit to start transmitting to another device the frame including a preamble and the relay sub-payload upon being notified of the communication-start timing, and to add the relay sub-payload to an end of the frame currently being transmitted, so as to continue transmission of the frame, when the relay sub-payload is stored in the relay sub-payload storage unit.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a National Stage of International Application No. PCT/JP2015/059198 filed Mar. 25, 2015, the contents of all of which are incorporated herein by reference in their entirety.

FIELD

The present invention relates to a communication device and a communication method.

BACKGROUND

In an FA (factory automation) network system, for the purpose of wire-saving, a single master device and a plurality of slave devices are connected with a daisy chain in some cases. In the system with a daisy-chain connection, communication between a first device and a second device that are not adjacent to each other is performed by relaying the communication by a device positioned between the first device and the second device.

The master device and the slave devices communicate with each other repeatedly in the same cycle. The mater device transmits command data to the slave devices. The slave devices transmit response data to the master device. As the communication time of the command data and the response data becomes shorter, the master device and the slave devices can exchange these command data and response data more closely and frequently. Therefore, the system can improve the control accuracy.

As a method for reducing the communication time, it is common to reduce the volume of communication data, or reduce the number of frames needed for communication. In the method for reducing the number of frames needed for communication, the volume of data needed for each frame can be reduced. Therefore, the communication time is reduced. As the data needed for each frame, a preamble that indicates the start of a frame, or a frame check sequence (FCS) that is a code to be added for performing error detection and correction on the frame, is exemplified.

As a related technique, Patent Literature 1 has described a communication system in which a master node and a plurality of terminal nodes are connected with a daisy chain. In this system, each of the terminal nodes relays and forwards the control data, transmitted from the master node, to the subsequent downstream node after the terminal node deletes a command field for its own node in the control data, and then shifts the second and subsequent command fields one by one to shorten the control data (paragraph [0029]).

Further, Patent Literature 2 has described a system in which a controller and a plurality of servo amplifiers are connected in a line. In this system, each of the amplifiers receives a frame from a higher amplifier, which includes command-data areas transmitted from the controller to the amplifiers, and then transmits the frame, from which a command-data area addressed to the amplifier of its own has been removed, to a lower amplifier (paragraphs [0039] to [0040]).

Furthermore, Patent Literature 3 has described a system in which a numerical control device and a plurality of amplifiers are connected with a daisy chain. In this system, each of the amplifiers transmits a transmission-start code to an upstream amplifier, and then transmits its own amplifier data, and subsequently the downstream amplifier data, received from the downstream amplifier, to the upstream amplifier (paragraph [0013]). When each of the amplifiers cannot receive the downstream amplifier data before it has completely transmitted its own amplifier data, the amplifier transmits idle-time data to the upstream amplifier after the transmission of its own amplifier data and until the reception of the amplifier data from the downstream amplifier, and thereafter transmits this downstream amplifier data to the upstream amplifier (paragraph [0028]).

CITATION LIST

Patent Literatures

SUMMARY

Technical Problem

According to the techniques described in Patent Literatures 1 and 2, because the frame size is reduced, the communication time can be reduced. However, in these techniques described in Patent Literatures 1 and 2, each device removes the data addressed to the device of its own, from the frame received from the upstream device. Therefore, the contents and the length of the frame are changed. However, these techniques described in Patent Literatures 1 and 2 do not consider error detection in a frame obtained after each device has removed the data addressed to the device of its own, from the frame received from the upstream device. Therefore, in the techniques described in Patent Literatures 1 and 2, the system cannot detect a data error attributable to a transmission error, and accordingly may not be capable of executing a normal control.

Further, in the technique described in Patent Literature 3, because the idle-time data is transmitted, this makes the communication time longer. Furthermore, in the technique described in Patent Literature 3, each of the amplifiers transmits its own amplifier data, and subsequently the idle-time data and the downstream amplifier data. However, the technique described in Patent Literature 3 does not consider error detection in the own amplifier data, the idle-time data, or the downstream amplifier data. Therefore, in the technique described in Patent Literature 3, the system cannot detect a data error attributable to a transmission error, and accordingly may not be capable of executing a normal control.

The present invention has been achieved to solve the above problems, and an object of the present invention is to provide a communication device that can reduce the communication time and perform error detection.

Solution to Problem

In order to solve the above-mentioned problems and achieve the object, there is provided a communication device to transmit and receive a frame including a preamble and a payload, where the payload includes one or a plurality of sub-payloads, each of which includes a main portion including an address portion for storing therein a value that indicates a target-address device, a data portion for storing therein data to be transmitted to the target-address device, and a data-length portion for storing therein a value that indicates a length of the data portion, and an error-detection code portion for storing therein an error-detection code for performing error detection attributable to a transmission error, the communication device including: a frame reception unit to separate the frame received from one device into a relay sub-payload that is the sub-payload not addressed to a device of its own, and an own-device addressed sub-payload that is the sub-payload addressed to a device of its own; an error detection unit to perform error detection on the own-device addressed sub-payload based on the error-detection code within the own-device addressed sub-payload; a relay sub-payload storage unit to store therein the relay sub-payload; a communication-start notification unit to notify a communication-start timing to start communication simultaneously with other devices; and a frame transmission unit to start transmitting to another device the frame including the preamble and the relay sub-payload upon being notified of the communication-start timing, when the frame is not being transmitted, and to add the relay sub-payload to an end of the frame being transmitted, so as to continue transmission of the frame, when the relay sub-payload is stored in the relay sub-payload storage unit while the frame is being transmitted.

Advantageous Effects of Invention

The communication device according to the present invention has an effect where the communication device can reduce the communication time and perform error detection.

DESCRIPTION OF EMBODIMENTS

A communication device and a communication method according to an embodiment of the present invention will be described below in detail with reference to the accompanying drawings. The present invention is not limited to the embodiment.

First Embodiment

FIG. 1is a diagram illustrating a configuration of a communication system according to a first embodiment. A communication system1includes control devices M, S1, S2, and S3. The control device M is connected to the control device S1through a cable C1. The control device S1is connected to the control device S2through a cable C2. The control device S2is connected to the control device S3through a cable C3. That is, the control devices M, S1, S2, and S3are connected with a daisy chain.

The control devices M, S1, S2, and S3have a period of performing communication in a direction of an arrow15from the control device M toward the control device S3, and a period of performing communication in a direction of an arrow16from the control device S3toward the control device M. In the first embodiment, the direction of the arrow15is sometimes referred to as “downstream direction”, and the direction of the arrow16is sometimes referred to as “upstream direction”.

The respective transmission-start timings in the control devices M, S1, S2, and S3are synchronized with each other. The control devices M, S1, S2, and S3simultaneously start transmission in the downstream direction15at their transmission-start timing during the period of performing communication in the downstream direction15. In contrast, the control devices M, S1, S2, and S3simultaneously start transmission in the upstream direction16at their transmission-start timing during the period of performing communication in the upstream direction16.

The control device M is a master control device that controls the control devices S1, S2, and S3. As the control device M, a programmable controller (JIS B 3502:2011 (PLC)) is exemplified. The control device M includes a communication unit Ma that communicates with the control devices S1, S2, and S3, and a control unit Mb that performs control calculation to control the control devices S1, S2, and S3.

The control device S1is a slave control device that operates under control of the control device M. As the control device S1, a servo amplifier is exemplified. The control device S1includes a communication unit S1athat communicates with the control devices M, S2, and S3, and a drive unit S1bthat drives a motor11.

The control device S2is a slave control device that operates under control of the control device M. As the control device S2, a servo amplifier is exemplified. The control device S2includes a communication unit S2athat communicates with the control devices M, S1, and S3, and a drive unit S2bthat drives a motor12.

The control device S3is a slave control device that operates under control of the control device M. As the control device S3, a servo amplifier is exemplified. The control device S3includes a communication unit S3athat communicates with the control devices M, S1, and S2, and a drive unit S3bthat drives a motor13.

FIG. 2is a diagram illustrating a frame to be transmitted and received in the communication system according to the first embodiment. A frame20includes a preamble21that is a bit sequence in a predetermined pattern, and that indicates the start of the frame20, and a payload22in which data is stored.

In the first embodiment, the payload22is constituted by one or a plurality of blocks. In the first embodiment, the one block that constitutes the payload22, or the blocks that constitute the payload22are referred to as “sub-payload23”.

FIG. 3is a diagram illustrating a sub-payload to be transmitted and received in the communication system according to the first embodiment. The sub-payload23includes a main portion24, and an error-detection code portion25for storing therein an error-detection code for performing error detection on the sub-payload23attributable to a transmission error. As the error-detection code, a check sum or a cyclic redundancy check (CRC) is exemplified. The error detection code can be an error-correction code for performing error correction in addition to the error detection. As the error-correction code, a cyclic code or a convolutional code is exemplified.

The main portion24includes an address portion26, a data-length portion27, and a data portion28. The address portion26stores therein the value that indicates a device to which the sub-payload23is addressed. The data portion28stores therein the data to be transmitted to the device to which the sub-payload23is addressed. The data-length portion27stores therein the value that indicates the length of the data portion28. The sub-payload23is a unit of the signal to be addressed to a certain device.

Each of the address portion26, the data-length portion27, and the error-detection code portion25is fixed in length, while the data portion28is variable in length. The length of the data portion28is stored in the data-length portion27. Therefore, by referring to the data-length portion27, the communication units Ma, S1a, S2a, and S3acan obtain the length of the sub-payload23.

Referring back toFIG. 2, the payload22includes one or a plurality of sub-payloads23. It is possible that the one sub-payload23included in a single payload22, or the sub-payloads23included in a single payload22have a target address identical to or different from each other.

FIG. 4is a diagram illustrating a configuration of the communication unit in the control device according to the first embodiment. In the first embodiment, the communication units Ma, S1a, S2a, and S3ahave an identical configuration.

Each of the communication units Ma, S1a, S2a, and S3aincludes a frame reception unit31that separates the frame20received from one device into a relay sub-payload23and an own-device addressed sub-payload23. The relay sub-payload23is a sub-payload that is not addressed to the device of its own. The own-device addressed sub-payload23is a sub-payload that is addressed to the device of its own.

The frame reception unit31stores one or a plurality of relay sub-payloads23in a relay sub-payload storage unit33.

Each of the communication units Ma, S1a, S2a, and S3aincludes an error detection unit32that performs error detection on the own-device addressed sub-payload23based on an error-detection code within the own-device addressed sub-payload23. The error detection unit32transmits a result of the error detection, and the main portion24within the own-device addressed sub-payload23, to the control unit Mb, or to the drive unit S1b, S2b, or S3b.

Each of the communication units Ma, S1a, S2a, and S3aincludes the relay sub-payload storage unit33that stores therein the relay sub-payload23.

Each of the communication units Ma, S1a, S2a, and S3aincludes a communication-start notification unit34that notifies the communication-start timing to start communication simultaneously with other devices.

Each of the communication units Ma, S1a, S2a, and S3aincludes a preamble storage unit35that stores therein the preamble21.

Each of the communication units Ma, S1a, S2a, and S3aincludes a transmission-data storage unit36that stores therein the main portion24created by the control unit Mb or the drive unit S1b, S2b, or S3bof the device of its own.

It is preferable for the control unit Mb or the drive unit S1b, S2b, or S3bto store one or a plurality of main portions24in the transmission-data storage unit36in the order of the furthest address to the closest address from the device of its own. Due to this operation, only by reading the data in the transmission-data storage unit36sequentially from the beginning, a frame transmission unit38can create an own-device issued sub-payload23that is issued by the device of its own to another device in the order of the furthest address to the closest address from the device of its own.

Each of the control devices M, S1, S2, and S3transmits the frame20in which the own-device issued sub-payloads23are combined in the order of the furthest address to the closest address from the device of its own. Therefore, the following effects are obtained.

It is assumed that the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S1, the own-device issued sub-payload23addressed to the control device S3, and the own-device issued sub-payload23addressed to the control device S2, are combined in the described order. Under this assumption, the control device S1cannot immediately transmit the relay sub-payload23addressed to the control device S3. That is, the control device S1cannot start transmitting the relay sub-payload23addressed to the control device S3until the control device S1has received this relay sub-payload23. Therefore, completion of the communication among the control devices M, S1, S2, and S3is delayed, and this increases the communication time.

Meanwhile, the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the described order.

Therefore, upon receiving the relay sub-payload23issued by the control device M and addressed to the control device S3, the control device S1can transmit to the control device S2this relay sub-payload23issued by the control device M and addressed to the control device S3. Due to this operation, the completion of the communication among the control devices M, S1, S2, and S3can be advanced forward, and this can reduce the communication time.

Each of the communication units Ma, S1a, S2a, and S3aincludes an error-detection-code generation unit37that generates the error-detection code portion25to be added to the main portion24. After the main portion24is stored in the transmission-data storage unit36, the error-detection-code generation unit37refers to the stored main portion24to generate the error-detection code portion25.

Each of the communication units Ma, S1a, S2a, and S3aincludes the frame transmission unit38. When the frame transmission unit38is notified of the communication-start timing, and when the frame20is not being transmitted, this frame transmission unit38starts transmitting to another device the frame20including the preamble21and the relay sub-payload23. When the relay sub-payload23is stored in the relay sub-payload storage unit33while the frame20is being transmitted, the frame transmission unit38adds this relay sub-payload23to the end of the frame20being transmitted, so as to continue the transmission of the frame20.

FIG. 5is a flowchart illustrating processing at the time of reception in the communication unit in the control device according to the first embodiment. At Step S100, the frame reception unit31separates one or a plurality of sub-payloads23within the payload22of a received frame20into the own-device addressed sub-payload23that is addressed to the device of its own, and the relay sub-payload23that is not addressed to the device of its own.

By referring to the address portion26of the one sub-payload23or each of the sub-payloads23, the frame reception unit31can obtain a target address of the one sub-payload23or each of the sub-payloads23. Further, by referring to the data-length portion27of the one sub-payload23or each of the sub-payloads23, the frame reception unit31can obtain the length of the one sub-payload23or each of the sub-payloads23.

Therefore, based on the address portion26and the data-length portion27of the one sub-payload23or the sub-payloads23, the frame reception unit31can separate the one sub-payload23or the sub-payloads23into the own-device addressed sub-payload23and the relay sub-payload23. The frame reception unit31transmits the own-device addressed sub-payload23to the error detection unit32, and stores the relay sub-payload23in the relay sub-payload storage unit33.

Each of the control devices M, S1, S2, and S3transmits the frame20in which the own-device issued sub-payloads23are combined in the order of the furthest address to the closest address from the device of its own. Therefore, the following effects are obtained.

It is assumed that the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S1, the own-device issued sub-payload23addressed to the control device S3, and the own-device issued sub-payload23addressed to the control device S2, are combined in the described order. Under this assumption, the control device S1cannot immediately transmit the relay sub-payload23addressed to the control device S3. That is, the control device S1cannot start transmitting the relay sub-payload23addressed to the control device S3until the control device S1has received this relay sub-payload23. Therefore, completion of the communication among the control devices M, S1, S2, and S3is delayed, and this increases the communication time.

Meanwhile, the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the described order.

Therefore, upon receiving the relay sub-payload23issued by the control device M and addressed to the control device S3, the control device S1can transmit to the control device S2this relay sub-payload23issued by the control device M and addressed to the control device S3. Due to this operation, the completion of the communication among the control devices M, S1, S2, and S3can be advanced forward, and this can reduce the communication time.

At Step S102, the error detection unit32performs error detection on the own-device addressed sub-payload23. The error detection unit32transmits a result of the error detection, and the main portion24within the own-device addressed sub-payload23, to the control unit Mb, or to the drive unit S1b, S2b, or S3b.

FIG. 6is a flowchart illustrating processing at the time of transmission in the communication unit in the control device according to the first embodiment. The flowchart inFIG. 6illustrates the processing at the time of transmission in the communication units Ma, S1a, S2a, and S3ain the control devices M, S1, S2, and S3when each of the control devices M, S1, S2, and S3transmits the own-device issued sub-payload23issued by the device of its own to another device.

Upon receiving a notification of the communication-start timing from the communication-start notification unit34, the frame transmission unit38performs the processing illustrated inFIG. 6if the main portion24has been stored in the transmission-data storage unit36.

At Step S200, the frame transmission unit38determines whether the frame20is being transmitted. When the frame transmission unit38determines that the frame20is not being transmitted at Step S200(NO), the frame transmission unit38advances the process to Step S202. When the frame transmission unit38determines that the frame20is being transmitted at Step S200(YES), the frame transmission unit38advances the process to Step S204.

It is also possible that the frame transmission unit38determines whether the frame20is being transmitted, based on the remaining length of the sub-payload23being transmitted. The frame transmission unit38reads the main portion24from the transmission-data storage unit36, and reads the error-detection code portion25from the error-detection-code generation unit37, to create the own-device issued sub-payload23. The processing time required for the frame transmission unit38to create the own-device issued sub-payload23is represented as T0. When a transmission remaining time T1is longer than the processing time T0, where the transmission remaining time T1is obtained by dividing the remaining length of the sub-payload23being transmitted by a predetermined communication speed, the frame transmission unit38can determine that the frame20is being transmitted. Due to this operation, the frame transmission unit38can determine that the frame20is being transmitted, taking into account the processing time required to create the own-device issued sub-payload23.

It is also possible that the frame transmission unit38determines whether the frame20is being transmitted, based on the transmission-start time-point and the length of the sub-payload23being transmitted. The frame transmission unit38can determine that the frame20is being transmitted when a scheduled transmission-completion time-point T4is later than the time-point obtained by adding the processing time T0to the present time-point, where the scheduled transmission-completion time-point T4is obtained by adding a transmission time T2to a transmission-start time-point T3for the sub-payload23being transmitted, and where the transmission time T2is obtained by dividing the length of the sub-payload23being transmitted by the communication speed. Due to this operation, the frame transmission unit38can determine that the frame20is being transmitted, taking into account the processing time required to create the own-device issued sub-payload23.

At Step S202, the frame transmission unit38performs a first transmission-process sub-routine.

FIG. 7is a flowchart illustrating a first transmission process in the communication unit in the control device according to the first embodiment.

At Step S210, the frame transmission unit38reads the preamble21from the preamble storage unit35.

At Step S212, the frame transmission unit38reads one or a plurality of main portions24from the transmission-data storage unit36, and reads one or a plurality of error-detection code portions25from the error-detection-code generation unit37, sequentially in the order of the furthest address to the closest address from the device of its own. The frame transmission unit38then creates one or a plurality of own-device issued sub-payloads23in the order of the furthest address to the closest address from the device of its own.

It is preferable for the control unit Mb or the drive unit S1b, S2b, or S3bto store one or a plurality of main portions24in the transmission-data storage unit36in the order of the furthest address to the closest address from the device of its own. Due to this operation, only by reading the data in the transmission-data storage unit36sequentially from the beginning, the frame transmission unit38can create the own-device issued sub-payload23that is issued by the device of its own to another device in the order of the furthest address to the closest address from the device of its own.

Each of the control devices M, S1, S2, and S3transmits the frame20in which the own-device issued sub-payloads23are combined in the order of the furthest address to the closest address from the device of its own. Therefore, the following effects are obtained.

It is assumed that the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S1, the own-device issued sub-payload23addressed to the control device S3, and the own-device issued sub-payload23addressed to the control device S2, are combined in the described order. Under this assumption, the control device S1cannot immediately transmit the relay sub-payload23addressed to the control device S3. That is, the control device S1cannot start transmitting the relay sub-payload23addressed to the control device S3until the control device S1has received this relay sub-payload23. Therefore, completion of the communication among the control devices M, S1, S2, and S3is delayed, and this increases the communication time.

Meanwhile, the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the described order.

Therefore, upon receiving the relay sub-payload23issued by the control device M and addressed to the control device S3, the control device S1can transmit to the control device S2this relay sub-payload23issued by the control device M and addressed to the control device S3. Due to this operation, the completion of the communication among the control devices M, S1, S2, and S3can be advanced forward, and this can reduce the communication time.

At Step S214, the frame transmission unit38transmits the frame20in which the preamble21is combined with one or a plurality of own-device issued sub-payloads23in the order of the furthest address to the closest address from the device of its own.

Referring back toFIG. 6, the frame transmission unit38performs a second transmission-process sub-routine at Step S204.

FIG. 8is a flowchart illustrating a second transmission process in the communication unit in the control device according to the first embodiment.

At Step S220, the frame transmission unit38reads one or a plurality of main portions24from the transmission-data storage unit36, and reads one or a plurality of error-detection code portions25from the error-detection-code generation unit37, sequentially in the order of the furthest address to the closest address from the device of its own. The frame transmission unit38then creates one or a plurality of own-device issued sub-payloads23in the order of the furthest address to the closest address from the device of its own.

At Step S222, the frame transmission unit38adds one or a plurality of own-device issued sub-payloads23to the end of the frame20being transmitted in the order of the furthest address to the closest address from the device of its own, so as to continue the transmission of the frame20. This increases the length of the frame20being transmitted.

FIG. 9is a flowchart illustrating processing at the time of transmission in the communication unit in the control device according to the first embodiment. The flowchart inFIG. 9illustrates the processing at the time of transmission in the communication units Ma, S1a, S2a, and S3ain the control devices M, S1, S2, and S3when each of the control devices M, S1, S2, and S3forwards the relay sub-payload23.

Upon receiving a notification of the communication-start timing from the communication-start notification unit34, the frame transmission unit38performs the processing illustrated inFIG. 9if one or a plurality of relay sub-payloads23have been stored in the relay sub-payload storage unit33.

At Step S230, the frame transmission unit38determines whether the frame20is being transmitted. When the frame transmission unit38determines that the frame20is not being transmitted at Step S230(NO), the frame transmission unit38advances the process to Step S232. When the frame transmission unit38determines that the frame20is being transmitted at Step S230(YES), the frame transmission unit38advances the process to Step S234.

At Step S232, the frame transmission unit38performs a third transmission-process sub-routine.

FIG. 10is a flowchart illustrating a third transmission process in the communication unit in the control device according to the first embodiment.

At Step S240, the frame transmission unit38reads the preamble21from the preamble storage unit35.

At Step S242, the frame transmission unit38reads one or a plurality of relay sub-payloads23from the relay sub-payload storage unit33.

At Step S244, the frame transmission unit38transmits the frame20in which the preamble21is combined with one or a plurality of relay sub-payloads23in the order of the furthest address to the closest address from the device of its own.

Referring back toFIG. 9, the frame transmission unit38performs a fourth transmission-process sub-routine at Step S234.

FIG. 11is a flowchart illustrating a fourth transmission process in the communication unit in the control device according to the first embodiment.

At Step S250, the frame transmission unit38reads one or a plurality of relay sub-payloads23from the relay sub-payload storage unit33.

At Step S252, the frame transmission unit38adds one or a plurality of relay sub-payloads23to the end of the frame20being transmitted in the order of the furthest address to the closest address from the device of its own, so as to continue the transmission of the frame20. This increases the length of the frame20being transmitted.

FIG. 12is a sequence diagram illustrating a communicating operation of the communication system according to the first embodiment. The sequence diagram inFIG. 12illustrates the operation of the communication system1during the period of performing the communication in the downstream direction15.

At a timing t0, the control devices M, S1, S2, and S3simultaneously start the communication in the downstream direction15.

At the timing t0, the control device M starts transmitting the frame20to the control device S1, where the frame20includes the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1.

The control device M transmits the frame20to the control device S1, in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the order of the furthest address to the closest address from the control device M, that is, in the order of the control device S3, the control device S2, and the control device S1.

At the timing t0, the control device S1starts transmitting to the control device S2the frame20including the own-device issued sub-payload23addressed to the control device S2.

At the timing t0, the control device S2starts transmitting to the control device S3the frame20including the own-device issued sub-payload23addressed to the control device S3.

At a timing t1, the control device S1finishes transmitting the own-device issued sub-payload23addressed to the control device S2. At this point in time, the control device S1has started receiving the main portion24of the relay sub-payload23issued by the control device M and addressed to the control device S3. Therefore, the control device S1adds this relay sub-payload23, issued by the control device M and addressed to the control device S3, to the end of the frame20being transmitted, so as to increase the length of the frame20being transmitted, thereby continuing the transmission of the frame20.

At a timing t2, the control device S1finishes transmitting the relay sub-payload23issued by the control device M and addressed to the control device S3. At this point in time, the control device S1has started receiving the main portion24of the relay sub-payload23issued by the control device M and addressed to the control device S2. Therefore, the control device S1adds this relay sub-payload23, issued by the control device M and addressed to the control device S2, to the end of the frame20being transmitted, so as to increase the length of the frame20being transmitted, thereby continuing the transmission of the frame20.

At a timing t3, the control device S2finishes transmitting the own-device issued sub-payload23addressed to the control device S3. At this point in time, the control device S2has not yet finished receiving the main portion24of the relay sub-payload23issued by the control device M and addressed to the control device S3. Therefore, the control device S2does not perform the communication until it finishes receiving the main portion24of the relay sub-payload23issued by the control device M and addressed to the control device S3. It is also possible that while not performing the communication, the control device S2transmits a low-level or high-level signal to the control device S3.

At a timing t4, the control device S2starts receiving the main portion24of the relay sub-payload23issued by the control device M and addressed to the control device S3. Therefore, at a timing t5, the control device S2starts transmitting the frame20including the relay sub-payload23issued by the control device M and addressed to the control device S3.

As described above, according to the first embodiment, the control device S1can transmit a single frame20including the own-device issued sub-payload23addressed to the control device S2, the relay sub-payload23issued by the control device M and addressed to the control device S3, and the relay sub-payload23issued by the control device M and addressed to the control device S2. That is, the control device S1can reduce the number of frames20to be transmitted. In other words, the control device S1can reduce the number of preambles. Therefore, the control device S1can reduce the communication time by an amount corresponding to the reduction in number of preambles.

Further, according to the first embodiment, the control device M transmits the frame20to the control device S1, in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the order of the furthest address to the closest address from the control device M, that is, in the order of the control device S3, the control device S2, and the control device S1. Therefore, the following effects are obtained.

It is assumed that the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S1, the own-device issued sub-payload23addressed to the control device S3, and the own-device issued sub-payload23addressed to the control device S2, are combined in the described order. Under this assumption, the control device S1cannot transmit the relay sub-payload23addressed to the control device S3at the timing t1. That is, the control device S1cannot start transmitting the relay sub-payload23addressed to the control device S3until the control device S1has received this relay sub-payload23. Therefore, completion of the communication among the control devices M, S1, S2, and S3is delayed, and this increases the communication time.

Meanwhile, according to the first embodiment, the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the described order.

Therefore, according to the first embodiment, upon receiving the relay sub-payload23issued by the control device M and addressed to the control device S3, at the timing t1, the control device S1can transmit to the control device S2this relay sub-payload23issued by the control device M and addressed to the control device S3. Due to this operation, the completion of the communication among the control devices M, S1, S2, and S3can be advanced forward, and this can reduce the communication time.

Further, it is assumed that the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S2, the own-device issued sub-payload23addressed to the control device S3, and the own-device issued sub-payload23addressed to the control device S1, are combined in the described order. Under this assumption, the control device S2cannot transmit the relay sub-payload23addressed to the control device S3at the timing t4. That is, the control device S2cannot start transmitting the relay sub-payload23addressed to the control device S3until the control device S2has received this relay sub-payload23. Therefore, the completion of the communication among the control devices M, S1, S2, and S3is delayed, and this increases the communication time.

Meanwhile, according to the first embodiment, the control device M transmits to the control device S1the frame20in which the own-device issued sub-payload23addressed to the control device S3, the own-device issued sub-payload23addressed to the control device S2, and the own-device issued sub-payload23addressed to the control device S1are combined in the described order. The control device S1then transmits to the control device S2the frame20including the own-device issued sub-payload23addressed to the control device S2, the relay sub-payload23addressed to the control device S3, and the relay sub-payload23addressed to the control device S2.

Therefore, according to the first embodiment, upon receiving the relay sub-payload23issued by the control device M and addressed to the control device S3, at the timing t4, the control device S2can transmit to the control device S3this relay sub-payload23issued by the control device M and addressed to the control device S3. Due to this operation, the completion of the communication among the control devices M, S1, S2, and S3can be advanced forward, and this can reduce the communication time.

Further, according to the first embodiment, the control devices M, S1, S2, and S3add the error-detection code portion25within the own-device issued sub-payload23, thereby obtaining the following effects.

When the control devices S1and S2receive the relay sub-payload23from another device, while transmitting the frame20including the own-device issued sub-payload23, the control devices S1and S2add this relay sub-payload23to the end of the frame20being transmitted. That is, the contents and the length of the frame20are dynamically changed.

In order to detect an error attributable to a transmission error, it is common to add a frame check sequence to the end of a frame at the time of creating the frame. However, before a certain device receives the frame to the end, this device completes transmission of the frame from its own station. Therefore, even though there is an error in the frame check sequence of the received frame, the device cannot notify the error.

Meanwhile, according to the first embodiment, the control devices M, S1, S2, and S3add the error-detection code portion25within the own-device issued sub-payload23. Therefore, a target-address device can refer to the error-detection code portion25, and detect an error in the own-device addressed sub-payload23.

It is also possible that the frame transmission unit38determines whether the frame20is being transmitted, based on the remaining length of the sub-payload23being transmitted. The frame transmission unit38reads the main portion24from the transmission-data storage unit36, and reads the error-detection code portion25from the error-detection-code generation unit37, to create the own-device issued sub-payload23. The processing time required for the frame transmission unit38to create the own-device issued sub-payload23is represented as T0. When the transmission remaining time T1is longer than the processing time T0, where the transmission remaining time T1is obtained by dividing the remaining length of the sub-payload23being transmitted by a predetermined communication speed, the frame transmission unit38can determine that the frame20is being transmitted. Due to this operation, the frame transmission unit38can determine that the frame20is being transmitted, taking into account the processing time required to create the own-device issued sub-payload23.

It is also possible that the frame transmission unit38determines whether the frame20is being transmitted, based on the transmission-start time-point and the length of the sub-payload23being transmitted. The frame transmission unit38can determine that the frame20is being transmitted when the scheduled transmission-completion time-point T4is later than the time-point obtained by adding the processing time T0to the present time-point, where the scheduled transmission-completion time-point T4is obtained by adding the transmission time T2to the transmission-start time-point T3for the sub-payload23being transmitted, and where the transmission time T2is obtained by dividing the length of the sub-payload23being transmitted by the communication speed. Due to this operation, the frame transmission unit38can determine that the frame20is being transmitted, taking into account the processing time required to create the own-device issued sub-payload23.

Further, according to the first embodiment, the frame transmission unit38can determine whether the frame20is being transmitted, based on the remaining length of the sub-payload23being transmitted, or based on the transmission-start time-point and the length of the sub-payload23being transmitted.

When the transmission remaining time T1is longer than the processing time T0for creating the own-device issued sub-payload23, where the transmission remaining time T1is obtained by dividing the remaining length of the sub-payload23being transmitted by the communication speed, the frame transmission unit38can determine that the frame20is being transmitted.

Further, the frame transmission unit38can determine that the frame20is being transmitted when the scheduled transmission-completion time-point T4is later than the time-point obtained by adding the processing time T0to the present time-point, where the scheduled transmission-completion time-point T4is obtained by adding the transmission time T2to the transmission-start time-point T3for the sub-payload23being transmitted, and where the transmission time T2is obtained by dividing the length of the sub-payload23being transmitted by the communication speed.

Due to this operation, the frame transmission unit38can appropriately determine whether to add the sub-payload23to the end of the frame20being transmitted, taking into account the processing time for creating the own-device issued sub-payload23.

FIG. 13is a sequence diagram illustrating a communicating operation of the communication system according to the first embodiment. The sequence diagram inFIG. 13illustrates the operation of the communication system1during the period of performing the communication in the upstream direction16.

At a timing t10, the control devices S1, S2, and S3simultaneously start the communication in the upstream direction16.

At the timing t10, the control device S1starts transmitting to the control device M the frame20including the own-device issued sub-payload23addressed to the control device M.

At the timing t10, the control device S2starts transmitting to the control device S1the frame20including the own-device issued sub-payload23addressed to the control device M.

At the timing t10, the control device S3starts transmitting to the control device S2the frame20including the own-device issued sub-payload23addressed to the control device M.

At a timing t11, the control device S1finishes transmitting the own-device issued sub-payload23addressed to the control device M. At this point in time, the control device S1has started receiving the main portion24of the relay sub-payload23issued by the control device S2and addressed to the control device M. Therefore, the control device S1adds this relay sub-payload23issued by the control device S2and addressed to the control device M, to the end of the frame20being transmitted, so as to increase the length of the frame20being transmitted, thereby continuing the transmission of the frame20.

At a timing t12, the control device S2finishes transmitting to the control device S1the frame20including the own-device issued sub-payload23addressed to the control device M.

At a timing t13, the control device S1finishes transmitting the frame20to the control device M, where the frame20includes the own-device issued sub-payload23addressed to the control device M, and the relay sub-payload23issued by the control device S2and addressed to the control device M.

At a timing t14, the control device S2starts receiving the relay sub-payload23issued by the control device S3and addressed to the control device M. At a timing t15, the control device S2starts transmitting a new frame20to the control device S1, where the frame20includes this relay sub-payload23issued by the control device S3and addressed to the control device M.

At a timing t16, the control device S1starts receiving the relay sub-payload23issued by the control device S3and addressed to the control device M. At a timing t17, the control device S1starts transmitting a new frame20to the control device M, where the frame20includes this relay sub-payload23issued by the control device S3and addressed to the control device M.

As described above, according to the first embodiment, the following effects are obtained.

It is common that the maximum frame length is defined with respect to the communication physical layer. It is assumed that the control device S1combines the own-device issued sub-payload23addressed to the control device M, the relay sub-payload23issued by the control device S2and addressed to the control device M, and the relay sub-payload23issued by the control device S3and addressed to the control device M, into a single frame20. Under this assumption, the length of the frame20may exceed the maximum frame length.

Meanwhile, according to the first embodiment, when the control device S1receives the relay sub-payload23issued by the control device S2and addressed to the control device M, while transmitting the frame20including the own-device issued sub-payload23addressed to the control device M, the control device S1adds this relay sub-payload23issued by the control device S2and addressed to the control device M, to the end of the frame20being transmitted, so as to increase the length of the frame20being transmitted, thereby continuing the transmission of the frame20.

On the other hand, even if the control device S1receives the frame20including the relay sub-payload23issued by the control device S3and addressed to the control device M, while transmitting the relay sub-payload23issued by the control device S2and addressed to the control device M and when this length of the frame20being transmitted exceeds the maximum frame length, the control device S1does not increase the length of the frame20being transmitted, but the control device S1transmits a new frame20to the control device M, where the frame20includes the relay sub-payload23issued by the control device S3and addressed to the control device M.

Therefore, according to the first embodiment, the control device S1can achieve both reduction in the communication time by an amount corresponding to the reduction in number of preambles, and prevention of the frame20from exceeding the maximum frame length. The reduction in the communication time is achieved by means of adding the relay sub-payload23issued by the control device S2and addressed to the control device M, to the end of the frame20including the own-device issued sub-payload23addressed to the control device M. The prevention of the frame20from exceeding the maximum frame length is achieved by means of transmitting a new frame20including the relay sub-payload23issued by the control device S3and addressed to the control device M.

Further, according to the first embodiment, the control device S1does not transmit the idle-time data from the timing t13to a timing t17, differently from the technique described in Patent Literature 3. Therefore, an effect is obtained where the control device S1does not need to be configured to create the idle-time data.

The configuration described in the embodiment described above is an example of the contents of the present invention. The configuration can be combined with other publicly known techniques, and a part of the configuration can be omitted or modified without departing from the scope of the present invention.

REFERENCE SIGNS LIST