FORM 2
THE PATENTS ACT, 1970 (39 of 1970)
& THE PATENTS RULES, 2003
COMPLETE SPECIFICATION
[See section 10, Rule 13]
COMMUNICATION APPARATUS AND NETWORK SYSTEM;
MITSUBISHI ELECTRIC
CORPORATION, A CORPORATION ORGANISED AND EXISTING UNDER THE LAWS OF JAPAN, WHOSE ADDRESS IS 7-3, MARUNOUCHI 2-CHOME, CHIYODA-KU, TOKYO 100-8310, JAPAN
THE FOLLOWING SPECIFICATION
PARTICULARLY DESCRIBES THE
INVENTION AND THE MANNER IN
WHICH IT IS TO BE PERFORMED.
DESCRIPTION
Field
[0001] The present invention relates to a communication apparatus and a network system that have a function of receiving a cyclically transmitted communication frame and relaying the communication frame to other apparatuses.
Background
[0002] Conventionally, in a motion control system required to perform a highly accurate motion operation using a number of axes, such as a machine tool, a semiconductor manufacturing apparatus, or an industrial robot, it has been necessary to mutually synchronize a motion controller and the axes controlled by the motion controller during operation. As a technique used in a conventional motion control system, there is a technique for making it possible to output a command to a servo drive in a desired control cycle even if the command is a multi-axis interpolation command that cannot be processed in the desired control cycle by a single motion controller, in which the same interpolation commands are inputted from a number of motion controllers, servo position commands or servo torque commands for a number of servo drives are produced while their production timings are shifted little by little, and these commands are transmitted to the servo drives. Because timings from issuance to execution of the commands are not constant for each axis, it is possible to match operations for the axes by shifting the issuance timings of the commands. [0003] As a conventional technique, there is known a
network system in which one motion controller and a number of servo drives are connected by a servo network. In the servo network, as in IEC (International Electrotechnical Commission) 61491 or IEEE (Institute of Electrical and Electronics Engineers) 1394, motion command data are transmitted cyclically and at the same timing from the motion controller to the plural servo drives using a network having a synchronous communication function of transmitting a given number of data sets in each cycle set in advance. Further, the network having such a synchronous communication function also has a function of causing, in each cycle, an activation interrupt to nodes connected to the network, and uses this function to cause the servo drives to execute servo control processing in the servo drives cyclically and at the same timing thereby to realize synchronization of the motion controller and a plurality of axes controlled by the motion controller.
[0004] Patent Literature 1 discloses an invention for solving a problem that a network suffers reduction of accuracy of a synchronization protocol to synchronize times among apparatuses due to fluctuation in a network delay. In this invention, when two apparatuses, which perform time synchronization, exchange timing packets to thereby calculate a time offset and adjust a local clock, a network delay related to the timing packets is measured and, when the measured network delay exceeds a threshold, the timing packets are discarded. Consequently, in time synchronization processing of the network, a markedly large network delay is not used. Therefore, it is possible to prevent the accuracy of the time synchronization protocol from being deteriorated.
Citation List
Patent Literature
[0005] Patent Literature 1: Japanese Patent Application
Laid-Open No. 2007-174676
Summary
Technical Problem
[0006] However, according to the above-mentioned conventional technique/ when another communication frame is being transmitted at the timing of when a cyclically transmitted frame is relayed for the purpose of the time synchronization of the network, the relay of the frame for the time synchronization is delayed until the transmission of the communication frame is completed. Therefore, there has been a problem that a delay time increases and synchronization accuracy is deteriorated. In the invention described in Patent Literature 1, when the network delay exceeds the threshold, the timing packet corresponding to the frame for the time synchronization is discarded to avoid unnecessary time adjustment. However, the timing packet is not discarded when the network delay does not exceed the threshold. Therefore, the synchronization accuracy is deteriorated when a delay of relay of the timing packet occurs in a range in which the network delay does not exceed the threshold.
[0007] The present invention has been devised in view of the above circumstances, and an object of the present invention is to provide a communication apparatus capable of preventing a delay time caused when a cyclically transmitted communication frame is relayed from increasing, and accordingly preventing synchronization accuracy from reducing.
Solution to Problem
[0008] In order to solve the above-mentioned problems and achieve the object, the present invention provides a communication apparatus comprising: a frame relaying unit to receive, among communication frames received by a reception port, a communication frame to be relayed to another apparatus, and output the received communication frame to a transmission port; a frame transmitting unit to generate the communication frame and output the communication frame to the transmission port; and a transmission-frame arbitrating unit to regulate output of the communication frame to the transmission port to be performed by the frame transmitting unit in a guard time that is a period including a time period in which arrival of the communication frame transmitted in a network in a fixed cycle is expected.
Advantageous Effects of Invention
[0009] The communication apparatus according to the present invention achieves an advantageous effect that it is possible to prevent a delay time from increasing when a cyclically transmitted communication frame is relayed.
Brief Description of Drawings [0010]
FIG. 1 is a diagram showing a configuration example of a network system to which a communication apparatus according to an embodiment of the present invention is applied.
FIG. 2 is a diagram showing a hardware configuration example for realizing a synchronization master.
FIG. 3 is a diagram showing a configuration example of a slave unit.
FIG. 4 is a chart showing a conflict example between a
relay operation for a synchronization frame and a transmission operation for a communication frame in the case where a guard time is not set.
FIG. 5 is a chart showing a conflict example between a relay operation for a synchronization frame and a transmission operation for a communication frame in the case where a guard time is set.
Description of Embodiments
[0011] A communication apparatus and a network system
according to an embodiment of the present invention are
described in detail below with reference to the drawings.
Note that the present invention is not limited by the
embodiment.
[0012] Embodiment.
FIG. 1 is a diagram showing a configuration example of a network system to which a communication apparatus according to an embodiment of the present invention is applied.
[0013] The network system shown in FIG. 1 is configured to include a synchronization master 10 operating as a synchronization master included in a general motion controller, and slave units 20]_, 202, 2O3, and 204 to which synchronization targets, which are synchronization control target apparatuses such as servo drives, are connected. The configurations of the slave units 20i, 202, 203, and 204 are the same. The synchronization master 10 and the slave units 20i, 202, 203, and 204 are communication apparatuses. Although this embodiment is directed to description of the case where the network system shown in FIG. 1 is a servo network that connects a motion controller and a plurality of servo drives, the communication apparatus according to the present invention is not limited to use in the servo
network. In the following explanation, when matters, that is, components, functions, operations, or the like, that are common to the slave units 20i, 202, 203, and 204, are explained, the slave units 20i, 2O2, 203, and 204 are collectively described as slave units 20.
[0014] Synchronization mentioned in this specification means that the synchronization master 10 cyclically transmits control data for performing axis control via a network to the slave units 20 to which amplifiers are connected and determines (corrects) timing for performing the axis control using the control data based on a synchronization frame. The synchronization master 10 transmits the control data necessary for the axis control between synchronization frames to be transmitted in a fixed cycle. When receiving control data created in the motion controller, the synchronization master 10 transmits the received control data to between the synchronization frames. [0015] The synchronization master 10 and the slave unit 20i are connected via a network 110. The slave unit 20i and the slave unit 202 are connected via a network 110a, the slave unit 202 and the slave unit 203 are connected via a network 110b, and the slave unit 203 and the slave unit 204 are connected via a network 110c.
[0016] The slave unit 20i, 202, 203, or 204 communicates with the other salve units in a fixed cycle through the networks 110a, 110b, and 110c. The networks 110a, 110b, and 110 are Ethernet (registered trademark), for example. [0017] A synchronization target 121 is connected to the slave unit 20i via a system bus 131, a synchronization target 122 is connected to the slave unit 202 via a system bus 132, a synchronization target 123 is connected to the slave unit 203 via a system bus 133, and a synchronization target 124 is connected to the slave unit 204 via a system
bus 134.
[0018] Note that, in the network system shown in FIG. 1, four slave units 20 are provided. However, the number of the slave units 20 is not limited to this example. One synchronization target is connected to one slave unit in this example, but two or more synchronization targets may be connected to one slave unit.
[0019] Next, the configuration of the synchronization master 10 is described. The synchronization master 10 includes: a synchronization-timing control unit 11 that transmits a synchronization frame and instructs the slave units 20 to execute synchronization processing; a parameter notifying unit 12 that notifies each of the slave units 20 of various parameters; a communication-delay measuring unit 13 that measures communication delay times between the synchronization master 10 and the slave units 20 and jitters that are fluctuations in the communication delay times; a synchronization-frame-reception-timing calculating unit 14 that calculates timings of when the slave units 20 receive the synchronization frame; a guard-time calculating unit 15 that calculates guard times for minimizing delay times that are caused when the slave units 20 relay the communication frames; and a communication interface unit 16 that transmits and receives the communication frames to and from the network 110. Note that, in this embodiment, the synchronization master 10 is configured to be connected with the network 110 and include the communication interface unit 16 for transmitting and receiving the communication frames, but the synchronization master 10 is not limited to this configuration. The synchronization master 10 may be configured to be connected with a system bus such as a serial bus or a parallel bus. The synchronization frame is a communication frame for
designating a synchronization timing of the entire system and realizing synchronization control among the apparatuses in the system.
[0020] In the synchronization master 10 shown in FIG. 1, for the sake of convenience of explanation, functional units are individually shown for their functions owned by the synchronization master 10. However, the present invention is not limited to such a configuration, and may have a configuration of one functional unit serving as two or more functional units. Note that, in FIG. 1, for the sake of preventing explanation from being complicated more than necessary, description is omitted concerning components related to processing for receiving a communication frame among the components of the synchronization master 10. The communication frame is used in transmission of control data for performing axis control. The synchronization frame is a kind of communication frame. The synchronization master generates the synchronization frame in a fixed cycle and transmits the synchronization frame to the slave units 20. When receiving control data generated in the motion controller, the synchronization master 10 generates a communication frame in which the received control data are stored, and transmits the communication frame to the slave units 20. [0021] A hardware configuration for realizing the synchronization master 10 is now explained. FIG. 2 is a diagram showing a hardware configuration example for realizing the synchronization master 10.
[0022] The synchronization master 10 can be realized by a processor 101, a memory 102 configured by a RAM (Random Access Memory), a ROM (Read Only Memory), and the like, and an input/output interface 103 for connection to various networks. The processor 101, the memory 102, and the
input/output interface 103 are connected to a bus 100, and can mutually perform exchange of data, control information, and the like via the bus 100.
[0023] When the synchronization master 10 is realized, a program for the synchronization master 10 is stored in the memory 102 and the processor 101 executes the program, whereby the synchronization-timing control unit 11, the parameter notifying unit 12, the communication-delay measuring unit 13, the synchronization-frame-reception-timing calculating unit 14, and the guard-time calculating unit 15, which are shown in FIG. 1, are realized. The communication interface unit 16 is realized by the input/output interface 103. Note that a plurality of processors and a plurality of memories may realize the units of the synchronization master 10 in cooperation with each other.
[0024] The configuration of the slave units 20i to 204 is explained. The slave units 20i to 204 have the same configuration. Therefore, the slave unit 20i is herein explained as an example.
[0025] FIG. 3 is a diagram showing a configuration example of the slave unit 20i. Note that, in FIG. 3, the other apparatuses connected to the slave unit 20i are also shown together.
[0026] The slave unit 20i includes: a frame relaying unit 21 that relays a communication frame that should be relayed to the other slave units, among communication frames received from the synchronization master 10, to the slave unit 202; a transmission-frame arbitrating unit 22 that arbitrates frame relay processing of the frame relaying unit 21 and transmission processing for a communication frame generated by the own apparatus; a transmission port 23 that transmits the communication frame
to the network 110a; a reception port 24 that receives the communication frame from the network 110; a synchronization-frame receiving unit 25 that receives a synchronization frame addressed to the own apparatus through the reception port 24; a window unit 2 6 that controls a time range in which the synchronization frame can be received; a delay counter 27 that counts an elapsed time from the reception of the synchronization frame; a synchronization-pulse output unit 28 that generates and outputs a synchronization pulse for synchronization control on the basis of a count value of the delay counter 27; a system-bus interface unit 29 that transmits and receives a command and the like to and from the system bus 131; a guard-time setting unit 30 that sets a guard time that is a period in which transmission of the communication frame is regulated; a guard time counter 31 that counts a setting timing and a release timing of the guard time; and a frame transmitting unit 32 that generates and transmits the communication frame. The communication frame is a frame for transmitting a message of cyclic communication and a message of acyclic communication. In the cyclic communication, the frame transmitting unit 32 generates and transmits a communication frame in which control data for controlling the apparatuses are stored. In the acyclic communication, the frame transmitting unit 32 generates and transmits a frame in which data indicating a status of the own apparatus, a request of writing data in a memory region of the other apparatus, a request of reading data from a memory region of the other apparatus, and the like are stored.
[0027] Now description is given for a reception operation for a communication frame performed by the slave unit 20i. When receiving a communication frame from the
synchronization master 10, the slave unit 20i checks a destination stored in a header of the communication frame, and determines whether the communication frame is a communication frame addressed to the own apparatus. When the communication frame is a communication frame addressed to another slave unit, the slave unit 20i transfers the communication frame to the - next slave unit 2O2. In this case, in the slave unit 20i, the communication frame is passed from the reception port 24 to the frame relaying unit 21, and transmitted from the transmission port 23 to the network 110a. On the other hand, when the received communication frame is a communication frame addressed to the own apparatus, the slave unit 20i checks type information stored in the header of the communication frame, and checks which of a synchronization frame, a control frame used in axis control and the like, and a message frame the received communication frame corresponds to. When the received communication frame is a synchronization frame, the slave unit 20i executes processing described later. When the received communication frame is a control frame, the slave unit 20i reads out control data from the control frame, and writes the control data in a control information storage region in a memory not shown in FIG. 3. When the received communication frame is a message frame, the slave unit 20i writes the message frame in a message frame storage region in the memory. The message frame written in the memory is read out by a message-frame processing unit not shown in FIG. 3, contents of a message thereof are analyzed, and processing according to the contents of the message is executed.
[0028] In this embodiment, since it is assumed that the network system is configured in a line type, the slave unit 2 0i is configured to include the transmission port 23 and
the reception port 24. However, the slave unit 20i may be configured to include a transmission and reception port having functions of both of the transmission port 23 and the reception port 24. In addition, an interface for transmission and reception only has to have a function of relay in a network, and topology of the network is not limited to specific topology. The present invention is applicable to any network as long as the network is directed to causing relay of a communication frame to another apparatus in apparatuses corresponding to the slave units 20, such as a tree type.
[0029] In FIG. 3, for the sake of preventing explanation from being complicated more than necessary, description is omitted concerning general components necessary to realize the slave unit 20i, specifically, a microcomputer, a memory, a clock, and the like. The slave unit 20i is characterized by a relay operation for a synchronization frame. Therefore, only components related to the relay operation for the synchronization frame are described, and description is omitted concerning components related to other proces-sing, or more specifically, processing in which the slave unit 20i transmits a communication frame to the synchronization master 10.
[0030] In FIG. 3, for convenience of explanation, functional units are separately shown for functions owned by the slave unit 20i, respectively. However, the present invention is not limited to such a configuration, and may have a configuration such that one functional unit serves as two or more of the functional units.
[0031] Like the synchronization master 10, some or all of the components of the slave unit 20i can be realized by hardware having the configuration shown in FIG. 2. [0032] In this embodiment, description is given for an
operation in which the slave units 20i, 202, 203, and 204 perform communication via the networks 110, 110a, 110b, and 110c to synchronize with the synchronization master 10. However, it is possible that the slave units 20i, 202, 203, and 204 perform the communication via the networks 110, 110a, 110b, and 110c for another purpose different from a purpose for realizing synchronization with the synchronization master 10. In addition, the slave units 20i, 202, 2O3, and 2O4 may be network repeaters such as switching hubs or routers.
[0033] Next, details of the units of the synchronization master 10 having the configuration shown in FIG. 1 are explained.
[0034] The synchronization-timing control unit 11 of the synchronization master 10 transmits a synchronization frame in a fixed cycle. The transmitted synchronization frame is received by the slave unit 20i via the network 110 and transferred to the network 110a. The synchronization frame transferred to the network 110a is received by the slave unit 202 and transferred to the network 110b. The synchronization frame transferred to the network 110b is received by the slave unit 203 and transferred to the network 110c. The synchronization frame transferred to the network 110c is received by the slave unit 204. In this way, the synchronization frame reaches the slave units 20i, 202, 203, and 204. Note that the synchronization frame is not limited in form. The synchronization frame only has to include information for informing a reception side that the received frame is a synchronization frame. As the synchronization frame, it is possible to use a frame in which flag information representing whether or not the frame is a one-bit synchronization frame is added to an Ethernet header or a data region. The synchronization
frame may have a form other than this form. [0035] The parameter notifying unit 12 notifies the slave units 20i, 202, 203, and 204 of a measurement result obtained by the communication-delay measuring unit 13, a calculation result obtained by the synchronization-frame-reception-timing calculating unit 14, and a calculation result obtained by the guard-time calculating unit 15. [0036] The communication-delay measuring unit 13 measures communication delay times, which are times from when the synchronization-timing control unit 11 outputs a synchronization frame to the network 110 until the synchronization frame is inputted to the respective slave units 20 to which the synchronization targets are connected, and measures jitters of the communication delay times. A manner of measuring the communication delay times and the jitters in the communication-delay measuring unit 13 is not particularly limited. The communication-delay measuring unit 13 only has to measure a communication delay time and its jitter using a method specified by the IEEE 1588 standard, or the like method.
[0037] In measurement of a communication delay time based on the method specified in the IEEE 1588 standard, one of two apparatuses that measure the communication delay time operates as a master and the other operates as a slave, and a specified message is transmitted and received between the master and the slave, whereby the slave calculates the communication delay time. Therefore, in the case where the communication delay time is measured in the method conforming to the IEEE 1588 standard, if the synchronization master 10 operates as the master in the processing for measuring the communication delay time, the communication-delay measuring unit 13 acquires, from the slave unit 20, the communication delay time calculated by
the slave unit 20 operating as the slave. In the case where the communication-delay measuring unit 13 is configured to directly measure the communication delay time, the communication-delay measuring unit 13 requests the slave unit 20 to operate as the master in the processing for measuring the communication delay time, while the communication-delay measuring unit 13 operates as the slave. The communication-delay measuring unit 13 executes the measurement of the communication delay time a number of times, and sets an average of a plurality of measurement results obtained as a result of the execution, as a final communication delay time. The communication-delay measuring unit 13 sets fluctuation in the measurement results as a jitter. The communication-delay measuring unit 13 measures communication delay times and jitters concerning the respective slave units 20i, 202, 203, and 204. [0038] The synchronization-frame-reception-timing calculating unit 14 calculates timings at which the respective slave units 20i to 204 receive the synchronization frame, on the basis of the communication delay times measured by the communication-delay measuring unit 13. The synchronization frame reception timings, which are calculation results obtained by the synchronization-frame-reception-timing calculating unit 14, are notified to the respective slave units 20i to 204 by the parameter notifying unit 12. As already described earlier, the synchronization frame is transmitted in a fixed cycle from the synchronization-timing control unit 11. Therefore, time when the synchronization-timing control unit 11 transmits the synchronization frame is also determined in advance. For this reason, the synchronization-frame-reception-timing calculating unit 14 adds the communication delay time for each of the slave
units 20, measured by the communication-delay measuring unit 13, to the time when the synchronization-timing control unit 11 transmits the synchronization frame, so as to calculate the synchronization frame reception timings of the slave units 20.
[0039] The guard-time calculating unit 15 calculates -guard times of the respective slave units 20i to 204 on the basis of the communication delay times and jitters measured by the communication-delay measuring unit 13. The guard time is information indicating a period. Although details are separately explained below, the respective slave units 20i to 204 perform processing for relaying communication frames received from the other apparatuses but does not perform normal frame transmission processing, in the periods indicated by the guard times.
[0040] When calculating the guard times, first, the guard-time calculating unit 15 adds the communication delay time for each of the slave units 20 measured by the communication-delay measuring unit 13 to the time of the transmission of the synchronization frame by the synchronization-timing control unit 11, and thereby calculates timings at which the synchronization frame reaches the respective slave units 20. The jitters are present in the communication delay times, and for this reason, the guard-time calculating unit 15' subsequently calculates a guard time such that a timing of when the synchronization frame reaches the slave unit 20 coincides with a center of the jitter of the communication delay time and a length of a period indicated by the guard time is equal to a length of the jitter or the length of the period indicated by the guard time is longer than the jitter. The guard time is desirably calculated taking into account a transmission required time estimated when a communication
frame having a maximum size allowed in the network system is transmitted. A reason why the guard time is desirably calculated taking into account the transmission required time when the communication frame having the maximum size is transmitted is separately explained later. If the time when the synchronization-timing control unit 11 transmits the synchronization frame is represented as T, the communication delay time between the synchronization master 10 and the slave unit 20i is represented as D, the jitter is represented as X, the transmission required time of the communication frame having the maximum size is represented as Y, a start time of the period indicated by the guard time is represented as ts, and an end time of the period is represented as te, then the guard-time calculating unit 15 calculates ts and te according to the following expression (1). Note that the guard-time calculating unit 15 may set a margin for the jitter and calculate ts and te according to the following expression (2). In the expression (2), a represents the margin and satisfies 0