Patent Description:
With recent advance of information and communication technology (ICT), such a system as integrally networking also production lines of factory automation (FA) ranging from manufacturing equipment in a field to programmable logic controllers (PLCs) has been realized. In realizing such networking, for example, PTL <NUM> (<CIT>) discloses a configuration for reliable communication among units implementing a PLC, in which a master unit transmits in a batch, a plurality of transmission frames addressed to different slave units successively a plurality of times (for example, three times) without waiting for reception of response from the slave units.

European patent application <CIT> relates to a communication controller and control devices that are connected to each other via a network.

In PTL <NUM>, the master unit transmits the plurality of transmission frames addressed to different slave units successively a plurality of times regardless of whether or not a frame has arrived at a slave unit, and hence an amount of transfer of frames is large. Therefore, an environment in which reliable communication among units can efficiently be realized has been demanded.

One of objects of the present disclosure is to provide a control system, an apparatus, and a method that allow efficient communication.

According to one aspect of this disclosure, a control system in which a plurality of apparatuses in time synchronization with one another are connected to a network is provided, the control system being according to claim <NUM>.

According to the disclosure described above, the apparatus transmits the resend request only when a frame does not arrive at the defined time and when the condition associated with the cycle is satisfied. Therefore, even when the resend request is transmitted in the event of non-arrival, increase in consumption of a communication band of the network can be limited and reliable communication among apparatuses can efficiently be realized.

In the disclosure described above, the cycle includes a time period for exchange of the frame by the plurality of apparatuses and a time period for a control operation performed by the at least one control device based on data in the exchanged frame, and the condition includes a condition based on an allowance time calculated by subtracting the time period for exchange of the frame and the time period for the control operation from the cycle and a time period for response to the resend request.

According to the disclosure described above, the condition on which determination as to transmission of the resend request is based can be set based on the allowance time within the cycle and the time period for response to the resend request.

In the disclosure described above, when the condition associated with the cycle is not satisfied, the at least one control device is configured to perform the control operation based on data in a frame that arrived in a previous cycle or to use a value calculated in the previous cycle for control.

In the disclosure described above, when the resend request cannot be transmitted, control can be based on data in the frame that arrived in the previous control cycle or the calculated value.

In the disclosure described above, when the at least one apparatus transfers the resend request to the first apparatus over the network, the at least one apparatus is configured to transfer a frame non-arrival notification to the second apparatus over the network.

According to the disclosure described above, an apparatus at which the frame does not arrive can transmit the resend request and can also transfer, instead of the frame, the non-arrival notification to an apparatus to which the frame is to be transferred. Therefore, by transmitting the non-arrival notification to the apparatus which is a transfer destination, transmission of the resend request by the apparatus which is the transfer destination can be suppressed. As set forth above, increase in consumption of the communication band can thus be suppressed.

In the disclosure described above, the frame transferred by the network includes a frame of control-oriented data used for the control and a frame of non-control-oriented data, and the at least one apparatus is configured to transmit the resend request only for the frame of the control-oriented data, of the frame of the control-oriented data and the frame of the non-control-oriented data.

According to the disclosure described above, the resend request is transmitted only for control-oriented data. Therefore, even when the resend request is transmitted, increase in consumption of the communication band can be suppressed as set forth above.

In the disclosure described above, the at least one apparatus is connected to a plurality of first apparatuses over the network, and the at least one apparatus includes a resend processing unit configured to detect an apparatus capable of responding to the resend request among the plurality of first apparatuses and to transmit the resend request to the detected apparatus.

According to the disclosure described above, the resend request can be transmitted only to the apparatus capable of responding to the resend request. Therefore, even when the resend request is transmitted, increase in consumption of the communication band can be suppressed as set forth above.

In the disclosure described above, a protocol for network communication between the control devices and a protocol for network communication between the control device and the controlled apparatus are identical.

According to the disclosure described above, the protocol is common to the apparatuses. Therefore, since protocol conversion among the apparatuses due to difference in protocol in frame transfer can be obviated and communication can accordingly be faster.

According to one aspect of the disclosure described above, an apparatus included in a control system is provided, the apparatus being according to claim <NUM>.

According to one aspect of this disclosure, a method of controlling communication of an apparatus included in a control system is provided, the method being according to claim <NUM>.

According to the present disclosure, a control system, an apparatus, and a method that allow efficient communication are provided.

The present embodiment will be described in detail with reference to the drawings. The same or corresponding elements in the drawings have the same reference characters allotted and description thereof will not be repeated.

An exemplary scene to which the present invention is applied will initially be described. <FIG> is a diagram schematically showing an exemplary configuration of a control system <NUM> according to the present embodiment. Referring to <FIG>, control system <NUM> that can be applied to FA includes, for example, a PLC 100A, a PLC 100B, and a field apparatus group that represent one example of an "apparatus" that is connected to a network <NUM> and exchanges data over network <NUM>. Control system <NUM> includes a master <NUM> that can provide master clock for time synchronization. Master clock for time synchronization provided by master <NUM> may be provided instead, for example, by a switch with a time master function or any PLC.

In the present embodiment, time synchronization can be achieved, for example, by establishing data communication in conformity with time-sensitive networking (TSN) over network <NUM>. "Timing" represents a concept of a time point, a time period, or a time of day when some kind of instance occurs.

PLC 100A and PLC 100B represent one example of the "control device" that performs a control operation, and perform similar functions in the present embodiment. When PLC 100A and PLC 100B are not distinguished from each other, they are collectively referred to as a PLC <NUM>. A support apparatus <NUM> can be connected to PLC <NUM>. The field apparatus group includes various field apparatuses 90A to 90F. Field apparatuses 90A to 90F are each connected to an "object to be controlled" in accordance with reception data from PLC <NUM> over a network <NUM>, however, field apparatus <NUM> may be provided as being integrally configured with the object to be controlled. Therefore, in the present embodiment, field apparatus <NUM> corresponds to an apparatus controlled by PLC <NUM>. Since field apparatuses 90A to 90F are basically similar to one another in function in the present embodiment, they are collectively referred to as a "field apparatus <NUM>" when they are not distinguished from one another.

The object to be controlled described above may include an actuator that applies some physical action onto a manufacturing apparatus or a production line (which is also collectively referred to as a "field" below) and an input and output apparatus such as a sensor that exchanges information with the field.

Field apparatuses 90A, 90B, and 90C are sequentially connected in a daisy chain to PLC 100A over network <NUM>, and field apparatuses 90D, 90E, and 90F are sequentially connected in a daisy chain to PLC 100B over network <NUM>.

In the present embodiment, a field value sensed in the object to be controlled is transferred over network <NUM>. A concept of the "field value" may also encompass a series of values obtained by continuous (or intermittent at certain intervals) sensing of change over time in data (value) on any object to be controlled.

The "field value" herein refers to a concept to collectively refer to values (actual values) available in a control operation in PLC <NUM> and may typically encompass an output from a sensor obtained from an object to be controlled and provided to a control operation. A value calculated in a control operation based on the field value may include an instruction value and a control amount for controlling the "object to be controlled. " PLC <NUM> transfers "control-oriented data" including such a field value, an instruction value, and a control amount over network <NUM>. The "control-oriented data" should be updated in PLC <NUM> or field apparatus <NUM> every predetermined cycle (for example, every control cycle <NUM> which will be described later) for use in control of an object to be controlled in a manufacturing apparatus or a production facility. Since the control-oriented data is thus used for control of an object to be controlled, it should cyclically be transferred over network <NUM> and this communication cycle should reliably be guaranteed. Control-oriented data exchanged between PLC <NUM> and field apparatus <NUM> over network <NUM> is updated in very short cycles from the order of several hundred microseconds to the order of several ten milliseconds.

Non-control-oriented data different from control-oriented data may also be transferred over network <NUM> shown in <FIG>. Non-control-oriented data includes, for example, "information-oriented data" or "control information-oriented data. " Though they do not require cyclic transfer in a control cycle as that for control-oriented data, they require regularity in terms of time to some extent. Information-oriented data includes data on management of the control system. Control information-oriented data includes data on setting and management of an apparatus or an object to be controlled included in control system <NUM>.

A bus or a network which allows guaranteed time of arrival of data in conformity with TSN standards and through which communication is cyclically established is preferably adopted for network <NUM>. For example, a network associated with a known protocol such as EtherNet/IP™ as a protocol higher in order than TSN may be adopted as network <NUM>. EtherNet/IP™ represents such an industrial open network that a control protocol is implemented on general-purpose Ethernet™.

Control system <NUM> shown in <FIG> requires guaranteed time of arrival of data (control-oriented data) sent from a sender to a destination (an addressee) as set forth above. Therefore, control system <NUM> makes scheduling for data transfer so as to secure a communication band for control-oriented data in a communication band of network <NUM> while it maintains a predetermined control cycle (control cycle <NUM> which will be described later). More specifically, scheduling for data transfer is made such that control-oriented data is transferred preferentially over control information-oriented data and information-oriented data.

In order to perform a scheduling function while time of arrival at an addressee is guaranteed, in control system <NUM>, each of a plurality of apparatuses (PLC <NUM> and field apparatus <NUM>) in time synchronization with each other includes a timer in time synchronization (or a counter incremented or decremented in synchronization) and each apparatus determines timing of transmission or reception of data in accordance with the timer or the counter.

In <FIG>, PLCs 100A and 100B include timers 160A and 160B, respectively, and field apparatuses 90A to 90F include timers 99A to 99F, respectively. For example, in control system <NUM>, a timer 200A of master <NUM> functions as a grand master and the timer of PLC <NUM> and the timer of field apparatus <NUM> are synchronized in timing with the grand master being defined as the reference. Owing to such synchronization among the timers, data transfer timing can match or can be synchronized among apparatuses in control system <NUM>.

Network <NUM> transfers communication frame <NUM> in which data is stored. A cycle of transfer of communication frame <NUM> in which control-oriented data is stored is in synchronization with control cycle <NUM>. Therefore, in each apparatus, arrival of control-oriented data for each control cycle is basically guaranteed for each control cycle.

Each apparatus is connected over network <NUM>, to a first apparatus that transmits communication frame <NUM> that arrives at each apparatus and a second apparatus that receives communication frame <NUM> transmitted from each apparatus. Each apparatus includes an area where path information representing a path for transfer of communication frame <NUM> and timing information representing transfer timing based on synchronous time are stored and communication frame <NUM> that arrives at each apparatus or communication frame <NUM> transmitted from each apparatus is held (stored).

When at least one of a plurality of apparatuses connected to network <NUM> determines that communication frame <NUM> does not arrive over network <NUM> at time defined based on timing information and when a condition associated with the cycle is satisfied, it transmits over network <NUM>, a resend request <NUM> to resend communication frame <NUM> that does not arrive. Thus, even when the communication frame does not arrive, arrival of control-oriented data described above can be guaranteed.

Transmission of resend request <NUM> will be described with reference to <FIG>. For example, in one control cycle, communication frame <NUM> of a field value of field apparatus 90C is transferred over network <NUM>, and arrives at PLC 100A through field apparatus 90B and field apparatus 90A. When frame loss <NUM> occurs during transfer, lost communication frame <NUM> does not arrive at PLC 100A. When PLC 100A senses that communication frame <NUM> from field apparatus 90C does not arrive at defined time based on timing information and when it determines that a condition that there is allowance time for performing frame resend processing within the cycle is satisfied, it transmits resend request <NUM> to network <NUM>.

PLC 100A can determine an addressee of resend request <NUM>. For example, PLC 100A determines the first apparatus that transmits communication frame <NUM> that arrives at PLC 100A as the addressee. Alternatively, when a plurality of first apparatuses are connected to network <NUM>, PLC 100A determines as the addressee, an apparatus with a function to respond to resend request <NUM> among the plurality of first apparatuses. Alternatively, PLC 100A determines as the addressee, an apparatus connected closest to PLC 100A among apparatuses with the response function. Each apparatus transmits requested communication frame <NUM> to a requesting apparatus in response to received resend request <NUM>.

Thus, in control system <NUM>, each apparatus connected to network <NUM> determines failure (frame loss <NUM>) or success of arrival of communication frame <NUM> from a point of view of time based on synchronous time, and when determination as frame loss <NUM> is made, each apparatus transmits resend request <NUM>. Therefore, probability of arrival of a frame at each apparatus can be enhanced by efficient communication, without relying on a plurality of times of successive transmission as in PTL <NUM>. A more specific application of the present embodiment will be described below.

<FIG> is a schematic diagram showing a configuration of a main part of PLC <NUM> according to the present embodiment. Referring to <FIG>, PLC <NUM> includes a computing processing unit <NUM>, a communication circuit <NUM>, a direct memory access (DMA) controller <NUM>, a highly accurate timer <NUM>, a universal serial bus (USB) controller <NUM>, communication ports <NUM> and <NUM> for connection to network <NUM>, and a memory card interface <NUM>.

Computing processing unit <NUM> includes a processor <NUM>, a storage unit <NUM>, and a storage <NUM>. For the sake of convenience of description, PLC <NUM> includes only a single processor <NUM>, however, a plurality of processors may be mounted. Each processor may include a plurality of cores. In computing processing unit <NUM>, processor <NUM> periodically performs one or more tasks. When computing processing unit <NUM> performs a plurality of tasks, different priority may be set for the plurality of tasks.

Processor <NUM> transfers communication frame <NUM> (for example, input data <NUM> or output data <NUM>) stored in a later-described buffer <NUM> of communication circuit <NUM> to storage unit <NUM>. Storage unit <NUM> is implemented by a dynamic random access memory (DRAM) or a static random access memory (SRAM) and provides a work area necessary for execution of a program in processor <NUM>.

Storage <NUM> is implemented by a flash memory or a hard disk, and a peripheral processing program <NUM>, a time synchronization program <NUM> for setting time synchronization, an IO refresh program <NUM>, a system program <NUM>, a scheduler <NUM>, a user program (UPG) <NUM>, a communication program <NUM>, and a configuration <NUM> are stored therein.

System program <NUM> includes an operating system (OS) for executing user program <NUM> in processor <NUM> and a library. IO refresh program <NUM> transmits a field value (input data) included in communication frame <NUM> received through communication circuit <NUM> to computing processing unit <NUM>. IO refresh program <NUM> transmits an instruction value and a control amount (output data) calculated in PLC <NUM> to field apparatus <NUM>. IO refresh program <NUM> thus performs processing (IO refresh processing which will be described later) for transferring at least any of input data and output data.

User program <NUM> is a program for "control operation processing" arbitrarily created depending on a machine or a facility to be controlled. Specifically, user program <NUM> includes a control operation program for performing an operation based on input data <NUM> in storage unit <NUM> for "sequence control" of an object to be controlled and a motion program for performing an operation based on input data <NUM> for "motion control. " In motion control, an instruction value including a numerical value of a position, a speed, an acceleration, and an angle for an actuator such as a servo motor to be controlled is calculated. A calculated value such as a control amount or an instruction value resulting from control operation processing by user program <NUM> is stored as output data <NUM> in storage unit <NUM>.

Communication program <NUM> controls communication circuit <NUM> to generate communication frame <NUM> based on output data <NUM> in storage unit <NUM> and to transmit and receive communication frame <NUM>. Communication program <NUM> includes a resend program <NUM> for resend processing involved with resend of communication frame <NUM>. Resend program <NUM> controls communication circuit <NUM> to generate communication frame <NUM> for resend request <NUM> and to transmit communication frame <NUM> over network <NUM> when communication frame <NUM> does not arrive. Resend program <NUM> includes a notification program <NUM>. When resend request <NUM> is transmitted, notification program <NUM> controls communication circuit <NUM> to generate communication frame <NUM> for a non-arrival notification <NUM> to the effect that communication frame <NUM> does not arrive at (reach) PLC <NUM> and to transmit communication frame <NUM> over network <NUM>.

Peripheral processing program <NUM> is processing that is different from control operation processing performed by user program <NUM> and is performed on a periphery of control operation processing. The peripheral processing program includes, for example, processing for logging communication frame <NUM> exchanged over network <NUM>.

Scheduler <NUM> is a program configured to manage allocation of a resource or execution timing in accordance with priority for a process or a task of PLC <NUM>. Such a process or task includes a process or a task that may be generated as a result of execution by processor <NUM>, of peripheral processing program <NUM>, user program <NUM>, IO refresh program <NUM>, time synchronization program <NUM>, or communication program <NUM>. Scheduler <NUM> adjusts based on timer <NUM> in time synchronization, timing of execution of each program, for example, in a cycle based on a predetermined control cycle. PLC <NUM> can thus cyclically perform control operation processing and IO refresh processing in a cycle based on time in synchronization with field apparatus <NUM>.

Configuration <NUM> includes various set values necessary for execution of a program in PLC <NUM> or various set values that define a network configuration. Configuration <NUM> includes, for example, a later-described connection information table <NUM> which is exemplary "information on a transfer path" and later-described schedule information <NUM> which is exemplary "information on transfer timing.

USB controller <NUM> allows detachable connection of support apparatus <NUM> to PLC <NUM>. Memory card interface <NUM> is constructed such that a memory card <NUM> is attachable thereto and detachable therefrom, and allows writing of data into memory card <NUM> and reading of various types of data (the user program or data) from memory card <NUM>. Data in configuration <NUM> may be loaded from memory card <NUM> or support apparatus <NUM> into storage <NUM>.

Communication circuit <NUM> is connected to communication ports <NUM> and <NUM> for physical connection to network <NUM>. For example, network <NUM> connected to a side of another PLC <NUM> is connected to communication port <NUM>, and network <NUM> connected to a side of field apparatus <NUM> is connected to communication port <NUM>, although limitation as such is not intended. Communication circuit <NUM> exchanges communication frame <NUM> with another apparatus through communication ports <NUM> and <NUM>. Communication circuit <NUM> includes buffer <NUM> in which communication frame <NUM> transmitted and received over network <NUM> is temporarily stored. Communication frame <NUM> temporarily stored in buffer <NUM> includes, for example, input data <NUM> and output data <NUM>. Communication port <NUM> connected to network <NUM> connected to the side of PLC <NUM> is also called a "first port" below and communication port <NUM> connected to network <NUM> connected to the side of field apparatus <NUM> (a non-PLC <NUM> side) is also called a "second port" below.

Communication frame <NUM> is transmitted and received by communication circuit <NUM>, for example, as below. In response to an instruction from processor <NUM>, communication circuit <NUM> copies communication frame <NUM> based on output data <NUM> from storage unit <NUM> through DMA controller <NUM>, stores the copy in buffer <NUM> as output data <NUM>, and transmits communication frame <NUM> over network <NUM>.

In response to an instruction from processor <NUM>, communication circuit <NUM> copies communication frame <NUM> that arrives (is received) from network <NUM>, stores the copy in buffer <NUM> as input data <NUM>, and provides communication frame <NUM> to computing processing unit <NUM>. This communication frame <NUM> is stored in storage unit <NUM> as the input data.

Data in transmitted and received communication frame <NUM> may be accumulated in storage unit <NUM> over a period longer than control cycle <NUM>, or only data in communication frame <NUM> in latest control cycle <NUM> may be accumulated therein.

In the present embodiment, "IO refresh processing" by PLC <NUM> includes at least one of transmission of output data <NUM> (communication frame <NUM>) to another apparatus and reception of input data <NUM> from another apparatus. In "IO refresh processing," input data <NUM> corresponds to communication frame <NUM> for a field value collected and transferred by field apparatus <NUM>, and output data <NUM> corresponds to communication frame <NUM> for an instruction value or a control amount calculated in control operation processing by user program <NUM> of PLC <NUM>.

DMA controller <NUM> is connected to computing processing unit <NUM> and communication circuit <NUM>, and performs a function to accelerate data access between computing processing unit <NUM> and communication circuit <NUM>. DMA controller <NUM> transfers communication frame <NUM> (for example, input data <NUM>) stored in buffer <NUM> of communication circuit <NUM> to storage unit <NUM>. DMA controller <NUM> gives an instruction to communication circuit <NUM>, for example, in response to a communication request from processor <NUM>, and transmits input data <NUM> stored in buffer <NUM> of communication circuit <NUM> to storage unit <NUM>. DMA controller <NUM> transmits output data <NUM> stored in storage unit <NUM> to communication circuit <NUM> in response to a communication request from processor <NUM>. With a hard-wired configuration of at least a main part of DMA controller <NUM>, processing faster than processing by processor <NUM> can be achieved. Transfer of communication frame <NUM> between communication circuit <NUM> and computing processing unit <NUM> through such DMA controller <NUM> (DMA processing shown with a dashed ellipse in the figure) can be achieved in IO refresh processing by an IO refreshing unit <NUM> which will be described later. A case for realizing this transfer may also include a case in which, in reception of input data <NUM> by communication circuit <NUM>, DMA processing is performed within IO refresh processing, and in transmission of output data <NUM> by communication circuit <NUM>, output data <NUM> is transferred to buffer <NUM> of communication circuit <NUM> in DMA processing before IO refresh processing (at a time point when output data <NUM> is ready), and transmission of communication frame <NUM> of output data <NUM> from communication circuit <NUM> is started immediately after start of IO refresh processing. By thus transferring output data <NUM> to buffer <NUM> of communication circuit <NUM> before IO refresh processing, a time period for IO refresh processing can be shortened and jitter of transmission timing can be lessened.

Timer <NUM> is a kind of clock for determining timing between PLC <NUM> and another apparatus connected to PLC <NUM>, and implemented by a counter or the like that counts up in prescribed cycles.

Though a configuration in which computing processing unit <NUM>, communication circuit <NUM>, and DMA controller <NUM> are distinguished from one another is depicted in the configuration shown in <FIG> for the sake of convenience of description, any form of implementation can be adopted without being limited as such. For example, a system on chip (SoC) in which the entirety or a part of computing processing unit <NUM> and the entirety or a part of communication circuit <NUM> are mounted on an identical chip may be configured. Alternatively, an SoC in which processor <NUM> of computing processing unit <NUM> and main functions of DMA controller <NUM> are mounted on an identical chip may be employed. Selection from these forms of implementation can be made as appropriate.

<FIG> is a diagram schematically showing a configuration of a main part of field apparatus <NUM> according to an embodiment of the present invention. Referring to <FIG>, field apparatus <NUM> includes a processor <NUM>, a memory <NUM>, a communication interface (I/F) <NUM> to which network <NUM> is connected, a communication circuit <NUM> to which network <NUM> is connected, a timer <NUM> configured similarly to timer <NUM> of PLC <NUM>, and a memory card interface <NUM> to which a memory card <NUM> is detachably attached. Field apparatus <NUM> may include also a device such as an input/output (IO) unit or a servo. Such a device may include no function and no circuitry for handling memory card <NUM>. Therefore, field apparatus <NUM> may include also an apparatus without a function and circuitry relating to memory card <NUM>.

Communication I/F <NUM> receives a field value from an object to be controlled over network <NUM> and transmits an instruction value or a control amount from processor <NUM> to an object to be controlled in response to an instruction from processor <NUM>. The object to be controlled is thus controlled in accordance with the instruction value or the control amount and provides a field value resulting therefrom.

Communication circuit <NUM> includes communication ports <NUM> and <NUM> to which network <NUM> is physically connected. Communication circuit <NUM> exchanges communication frame <NUM> with another apparatus through communication ports <NUM> and <NUM>. Network <NUM> connected to the side of PLC <NUM> is connected to communication port <NUM> and network <NUM> connected to the side of field apparatus <NUM> is connected to communication port <NUM>, although limitation as such is not intended. Therefore, communication port <NUM> corresponds to the "first port" and communication port <NUM> corresponds to the "second port.

Communication circuit <NUM> includes a buffer <NUM> in which communication frame <NUM> transmitted and received over network <NUM> is temporarily stored. Communication frame <NUM> is temporarily stored in buffer <NUM>, for example, as input data <NUM> or output data <NUM>.

Memory <NUM> is implemented by a DRAM or an SRAM and provides a work area necessary for execution of a program in processor <NUM>. Memory <NUM> is further implemented by a flash memory or a hard disk, and a system program <NUM>, a time synchronization program <NUM> for setting time synchronization, a communication program <NUM>, a configuration <NUM>, output data <NUM>, and input data <NUM> are stored therein. Output data <NUM> and input data <NUM> correspond to communication frame <NUM>. A program or data is stored in memory <NUM> from support apparatus <NUM> through PLC <NUM> or from memory card <NUM> through memory card interface <NUM>.

Communication program <NUM> is a program for controlling communication I/F <NUM> and communication circuit <NUM>. Communication program <NUM> includes a resend program <NUM> for resend processing and a notification program <NUM> in connection with control of communication circuit <NUM>. Resend program <NUM> controls communication circuit <NUM> to transmit resend request <NUM> over network <NUM> when communication frame <NUM> does not arrive (reach). Notification program <NUM> controls communication circuit <NUM> to transmit communication frame <NUM> for non-arrival notification <NUM> to another apparatus when resend request <NUM> is transmitted.

Configuration <NUM> includes various set values necessary for execution of a program in field apparatus <NUM> or various set values that define a network configuration. Configuration <NUM> includes, for example, a later-described connection information table <NUM> which represents exemplary "information on a transfer path" and later-described schedule information <NUM> which represents exemplary "information on transfer timing. " Configuration <NUM> further includes information on trigger time <NUM>. Trigger time <NUM> indicates time at which field apparatus <NUM> controls an object to be controlled in accordance with an instruction value or a control amount received from PLC <NUM>. Each field apparatus <NUM> detects arrival of trigger time <NUM> based on timer <NUM>. Timers <NUM> of field apparatuses <NUM> are in time synchronization thereamong. Therefore, when trigger time <NUM> comes, objects to be controlled by field apparatuses <NUM> can be controlled in synchronization.

In response to an instruction from processor <NUM>, communication circuit <NUM> copies communication frame <NUM> of output data <NUM> in memory <NUM>, stores the copy in buffer <NUM> as output data <NUM>, and transmits communication frame <NUM> over network <NUM>. In response to an instruction from processor <NUM>, communication circuit <NUM> receives communication frame <NUM> that arrives from network <NUM>, copies communication frame <NUM>, and stores the copy in buffer <NUM> as input data <NUM>. Processor <NUM> has input data <NUM> in communication frame <NUM> stored in memory <NUM>.

<FIG>, <FIG>, and <FIG> are each a diagram schematically showing an exemplary configuration of communication frame <NUM> according to the present embodiment. <FIG> shows exemplary basic communication frame <NUM> and <FIG> and <FIG> each show exemplary communication frame <NUM> of resend request <NUM>.

Referring to <FIG>, communication frame <NUM> exchanged between apparatuses basically includes an area <NUM> as a preamble area where a preamble is stored, an area <NUM> where an addressee of a frame is stored, an area <NUM> where a sender of a frame is stored, an area <NUM> for a tag, an area <NUM> where a type of a network is stored, and an area <NUM> for error correction, and further includes an area <NUM> where a payload which is a data main body to be transferred is stored. An addressee in area <NUM> and a sender in area <NUM> in communication frame <NUM> include information for uniquely identifying each apparatus, such as a media access control (MAC) address. In the case of basic communication frame <NUM> in <FIG>, the payload includes, for example, input data <NUM> or <NUM> or output data <NUM> or <NUM> which is control-oriented data.

Area <NUM> further includes a stream identifier (ID) <NUM> for managing transfer of communication frame <NUM>. <FIG> is a diagram for illustrating stream ID <NUM> according to the present embodiment. In the present embodiment, communication frame <NUM> transferred over network <NUM> is managed in a unit of a flow <NUM>. As shown in <FIG>, an apparatus connected to network <NUM> can be a sender (TALKER) or a destination (LISTENER) of communication frame <NUM>. A stream ID defined by a set of a MAC address of a sender apparatus which is TALKER and a MAC address of a destination apparatus which is LISTENER is allocated to each flow <NUM>. Therefore, each apparatus can uniquely identify each exchanged communication frame <NUM> based on that stream ID <NUM>.

For example, control-oriented data may be stored as the payload in area <NUM> of communication frame <NUM> in <FIG>. Area <NUM> includes an area where a field value of control-oriented data is stored and an area where an instruction value or a control amount is stored.

When each field apparatus <NUM> reads data from area <NUM> or writes data in area <NUM>, for example, it specifies a position within area <NUM> based on offset (for example, offset from the top of communication frame <NUM>) individually allocated to that apparatus and reads data from and writes data into the specified position. Specifically, communication program <NUM> reads an instruction value or a control amount (input data <NUM> or output data <NUM>) from a position based on offset of the field apparatus in area <NUM> of communication frame <NUM> that arrives, or writes a field value (output data <NUM> or input data <NUM>) into a position based on offset in area <NUM> of communication frame <NUM> to be transmitted.

Offset information allocated to each field apparatus <NUM> has been stored in PLC <NUM>. Therefore, PLC <NUM> can read a field value (output data <NUM> or input data <NUM>) of each field apparatus <NUM> from area <NUM> of communication frame <NUM> that arrives based on this offset information, or can write an instruction value or a control amount (input data <NUM> or output data <NUM>) into an offset position in each field apparatus <NUM> within area <NUM> of communication frame <NUM> to be transmitted based on this offset information.

PLC <NUM> can thus read or write control-oriented data of each field apparatus <NUM> from or into area <NUM> of communication frame <NUM>, and each field apparatus <NUM> can read or write control-oriented data of the field apparatus from or into area <NUM> of communication frame <NUM>.

Referring to <FIG>, in a resend request frame which is communication frame <NUM> for transmitting resend request <NUM>, for example, a MAC address of an apparatus which is a sender (TALKER) of resend request <NUM> is stored in area <NUM>, a MAC address <NUM> of an apparatus which is a destination (LISTENER) of resend request <NUM> is stored in area <NUM>, and the payload including a flag <NUM> representing resend request <NUM> and stream ID <NUM> of communication frame <NUM> resend of which is requested is stored in area <NUM>. When the resend request frame in <FIG> is transmitted, only an apparatus having an address matching with MAC address <NUM> in area <NUM> can receive the resend request frame.

A configuration of the resend request frame is not limited to the configuration in <FIG>, and for example, a destination of the resend request frame may be designated with a stream ID as in <FIG>. Referring to <FIG>, a MAC address of an apparatus as a sender of resend request <NUM> is stored in area <NUM> of the resend request frame, a stream ID <NUM> of the resend request frame is stored in area <NUM> of the addressee, and stream ID <NUM> of communication frame <NUM> resend of which is requested is stored in area <NUM>. According to the configuration in <FIG>, only an apparatus having an address matching with MAC address <NUM> of the destination (LISTENER) indicated by stream ID <NUM> in area <NUM> can receive the resend request frame.

<FIG> is a diagram schematically showing an exemplary configuration of connection information table <NUM> according to the present embodiment. Referring to <FIG>, connection information table <NUM> included in PLC <NUM> includes port information <NUM> on the first port and port information <NUM> on the second port.

Port information <NUM> and port information <NUM> each include apparatus information <NUM> and able/unable-to-respond information <NUM>. Apparatus information <NUM> includes a MAC address for identification of an each apparatus connected to network <NUM> connected to a corresponding communication port, in correspondence with that apparatus. In apparatus information <NUM>, for example, MAC addresses are aligned sequentially from a MAC address of an apparatus which is closer to PLC <NUM> in position of connection to network <NUM>. Able/unable-to-respond information <NUM> includes a MAC address which is an identifier of each apparatus without a function to respond to resend request <NUM> among apparatuses indicated in corresponding apparatus information <NUM>. The MAC address in able/unable-to-respond information <NUM> may be a MAC address of each apparatus with a function to respond to resend request <NUM>.

In the present embodiment, connection information table <NUM> included in field apparatus <NUM> is also configured similarly to connection information table <NUM> in <FIG>. Therefore, description of connection information table <NUM> will not be repeated.

<FIG> is a diagram schematically showing exemplary schedule information <NUM> according to the present embodiment. Referring to <FIG>, schedule information <NUM> includes for each stream of communication frame <NUM> of control-oriented data, a stream ID <NUM>, arrival time <NUM> which is time of arrival of communication frame <NUM> in that stream to an apparatus, output synchronization <NUM>, and a port ID <NUM> for identification of a communication port of arrival. Output synchronization <NUM> indicates whether or not data in communication frame <NUM> in that stream (for example, control-oriented data) is a synchronous processing target to be processed in synchronization with data in another communication frame <NUM> that arrives. Output synchronization <NUM> being set to "<NUM>" indicates that communication frame <NUM> in a corresponding stream is a synchronous processing target, and output synchronization being set to "<NUM>" indicates that communication frame <NUM> in a corresponding stream is not a synchronous processing target. Schedule information <NUM> may include MAC addresses of an apparatus as a sender and an apparatus as an addressee that define stream ID <NUM>, in correspondence with stream ID <NUM> as shown in <FIG>.

In the present embodiment, schedule information <NUM> included in field apparatus <NUM> is also configured similarly to schedule information <NUM> in <FIG>. Therefore, description of schedule information <NUM> will not be repeated.

<FIG> is a diagram schematically showing a function of PLC <NUM> according to the present embodiment. <FIG> schematically shows a main function provided by execution by processor <NUM>, of each program in PLC <NUM> shown in <FIG>. Specifically, PLC <NUM> includes IO refreshing unit <NUM> provided by execution of IO refresh program <NUM>, a control operation unit <NUM> provided by execution of user program <NUM>, a peripheral processing unit <NUM> provided by execution of peripheral processing program <NUM>, and a communication processing unit <NUM> provided by execution of communication program <NUM>. Communication processing unit <NUM> includes a resend processing unit <NUM> provided by execution of resend program <NUM>. Resend processing unit <NUM> includes a notification processing unit <NUM> provided by execution of notification program <NUM>. Each processing unit is provided by execution by processor <NUM>, of the program of that processing unit in cooperation with the OS of system program <NUM> and various libraries.

<FIG> is a diagram schematically showing a function of field apparatus <NUM> according to the present embodiment. <FIG> schematically shows a main function provided by execution by processor <NUM>, of each program in field apparatus <NUM> shown in <FIG>. Specifically, field apparatus <NUM> includes a communication processing unit <NUM> provided by execution of communication program <NUM> and an input and output processing unit <NUM> for input and output to and from an object to be controlled over network <NUM>. Communication processing unit <NUM> includes a resend processing unit <NUM> provided by execution of resend program <NUM>. Resend processing unit <NUM> includes a notification processing unit <NUM> provided by execution of a notification program <NUM>. Input and output processing unit <NUM> is provided by execution of an input and output program for control of communication I/F <NUM> by system program <NUM>. These processing units are provided by execution by processor <NUM>, of the program for the processing unit in cooperation with the OS of system program <NUM> and various libraries.

<FIG> is a diagram schematically showing an exemplary basic timing chart in control system <NUM> according to the present embodiment. With lapse of time shown on the abscissa of the timing chart, timing of start and end of processing including communication between PLCs 100A and 100B and each field apparatus <NUM> and a duration of performed processing are shown. The duration of performed processing is represented by a length of a band extending in a direction in which a time axis extends. Though three field apparatuses <NUM> are connected to each PLC <NUM> in <FIG>, limitation to three connected field apparatus <NUM> is not intended.

Initially, in PLC <NUM>, scheduler <NUM> makes scheduling such that IO refresh processing by IO refreshing unit <NUM> and control operation processing by control operation unit <NUM> requested to be completed within control cycle <NUM> are performed with the highest priority being placed thereon and then peripheral processing by peripheral processing unit <NUM> is performed with the second highest priority being placed thereon. Control cycle <NUM> is an exemplary time period shared between PLC <NUM> and field apparatus <NUM> in time synchronization with each other. The peripheral processing is lower in priority of execution than other processing. Therefore, when the control operation takes time, scheduler <NUM> may allow peripheral processing to be performed every N (N > <NUM>) control cycles <NUM>.

In field apparatus <NUM>, in control cycle <NUM>, a trigger <NUM> is issued when trigger time <NUM> in common comes, and an object to be controlled is controlled in response to trigger <NUM>. Specifically, field apparatus <NUM> controls an object to be controlled based on an instruction value or a control amount received from PLC <NUM> by means of IO refreshing unit <NUM> in control cycle <NUM>.

Basically, in control cycle <NUM>, at the end of control cycle <NUM>, field apparatus <NUM> makes preparation for transmission ("Snd") of a field value to network <NUM>. As IO refresh processing in next control cycle <NUM> is started, field apparatus <NUM> transmits communication frame <NUM> of the prepared field value over network <NUM> and PLC <NUM> receives (collects) communication frame <NUM> of the field value of each field apparatus <NUM> transferred over network <NUM>. In control operation processing by control operation unit <NUM> in control cycle <NUM>, PLC <NUM> performs the control operation based on the field value received in IO refresh processing in control cycle <NUM>. PLC <NUM> transmits communication frame <NUM> of the instruction value or the control amount calculated in previous control cycle <NUM> over network <NUM> at the time of start of IO refresh processing in control cycle <NUM>. Each field apparatus <NUM> can thus receive ("Rcv") communication frame <NUM> of the instruction value and the control amount transferred over network <NUM> at the time of start of IO refresh processing in control cycle <NUM>, and controls an object to be controlled in response to trigger <NUM> based on the received instruction value or the control amount.

<FIG> shows that, when each field apparatus <NUM> prepares for transmission "Snd", (t)th (t = <NUM>, <NUM>, <NUM>,. ) control cycle <NUM> ends and (t+<NUM>)th control cycle <NUM> starts.

For example, <FIG> shows a sequence <NUM> of end-to-end (E2E). In sequence <NUM>, for example, communication frame <NUM> transmitted from field apparatus 90F is transferred over the entire network <NUM> as being transferred in a direction of field apparatus 90F → field apparatus 90E → field apparatus 90D → PLC 100B → PLC 100A → field apparatus 90A → field apparatus 90B → field apparatus 90C. As each field apparatus <NUM> performs the sequence of E2E similar to that of field apparatus 90F, communication frames <NUM> for field values from all field apparatuses <NUM> are transferred over network <NUM>.

PLC 100A and PLC 100B can thus each receive the field values from all field apparatuses <NUM> transferred over network <NUM> in IO refresh processing within a single control cycle <NUM> and can also receive a field value in communication frame <NUM> designated with a prescribed stream ID, that is, of at least one prescribed field apparatus <NUM>.

Therefore, in control operation processing in control cycle <NUM>, PLC 100A or PLC 100B can calculate an instruction value or a control amount based on field values of all field apparatuses <NUM> or can calculate an instruction value or a control amount based on a field value of at least one prescribed field apparatus <NUM>. Thus, user program <NUM> for control operation processing based on the field value of field apparatus <NUM> may be arranged in any of PLC 100A and PLC 100B, and a degree of freedom in arranging user program <NUM> in control system <NUM> is enhanced.

Though E2E in sequence <NUM> is in a direction of field apparatus 90F → field apparatus 90C in <FIG>, E2E may be in a reverse direction of field apparatus 90C → field apparatus 90F. In <FIG>, field apparatus <NUM> and PLC <NUM> can arbitrarily set (modify) stream ID <NUM> of communication frame <NUM> in <FIG> based on a set of MAC addresses of field apparatuses <NUM> that configure E2E.

In the present embodiment, in transfer of communication frame <NUM>, communication processing unit <NUM> of field apparatus <NUM> performs transfer processing. Specifically, in transfer processing, communication processing unit <NUM> sets a MAC address of the field apparatus in area <NUM> of received communication frame <NUM> and sets a MAC address of an addressee apparatus based on connection information table <NUM> in area <NUM>. Communication processing unit <NUM> detects the MAC address of an apparatus connected closest (field apparatus <NUM> or PLC <NUM>) in apparatus information <NUM> corresponding to the communication port in connection information table <NUM> at which communication frame <NUM> is received, and sets the detected MAC address as the MAC address of the addressee apparatus.

At the end of control cycle <NUM>, in transmission preparation "Snd" communication frame <NUM>, communication processing unit <NUM> sets a field value from an object to be controlled accepted through input and output processing unit <NUM> in area <NUM> of communication frame <NUM>. Thereafter, communication processing unit <NUM> controls communication circuit <NUM> to transmit communication frame <NUM> over network <NUM>.

When communication processing unit <NUM> receives reception "Rcv" communication frame <NUM> exchanged at the beginning of control cycle <NUM>, it reads a corresponding instruction value or control amount from area <NUM> of communication frame <NUM>, provides the instruction value or the control amount to input and output processing unit <NUM>, and controls communication circuit <NUM> to transmit communication frame <NUM> over network <NUM>.

When field apparatus <NUM> determines that stream ID <NUM> of received communication frame <NUM> indicates the MAC address of the field apparatus, it transfers communication frame <NUM> to PLC <NUM> connected to the field apparatus.

In the present embodiment, in transfer of communication frame <NUM>, communication processing unit <NUM> of PLC <NUM> performs transfer processing. Specifically, when communication processing unit <NUM> receives communication frame <NUM> that arrives at PLC <NUM>, it sets the MAC address of the PLC in area <NUM> of the sender and sets the MAC address of the addressee apparatus in area <NUM> of communication frame <NUM> based on connection information table <NUM>. At this time, communication processing unit <NUM> detects the MAC address of the apparatus (field apparatus <NUM> or PLC <NUM>) connected closest from apparatus information in connection information table <NUM>, about apparatuses on the side of the communication port where communication frame <NUM> is received, and sets the detected MAC address as the MAC address of the addressee apparatus. Thereafter, communication processing unit <NUM> controls communication circuit <NUM> to transmit communication frame <NUM> over network <NUM>.

When communication processing unit <NUM> receives transmission preparation "Snd" communication frame <NUM>, it controls communication circuit <NUM> to transmit the communication frame over network <NUM>. When reception "Rcv" communication frame <NUM> exchanged at the beginning of control cycle <NUM> arrives, communication processing unit <NUM> controls communication circuit <NUM> to transmit communication frame <NUM> over network <NUM>.

In control cycle <NUM>, transmission preparation "Snd" communication frame <NUM> and reception "Rcv" communication frame <NUM> which are communication frames <NUM> of control-oriented data are cyclically exchanged. Therefore, field apparatus <NUM> can predict a time point of arrival of communication frame <NUM> based on timer <NUM> in time synchronization and PLC <NUM> can predict a time point of arrival of communication frame <NUM> based on timer <NUM>.

In transfer processing described above, communication frame <NUM> is transferred over network <NUM> and a copy thereof is temporarily stored in the buffer of each of communication circuits <NUM> and <NUM> in each apparatus. Communication frame <NUM> stored in the buffer can be held therein at least until IO refresh processing by IO refreshing unit <NUM> is performed in next control cycle <NUM>.

<FIG> is a diagram schematically showing an exemplary timing chart on the occurrence of communication abnormality in control system <NUM> according to the present embodiment. <FIG> is a diagram schematically showing a case in which sharing of data is difficult on the occurrence of communication abnormality according to the present embodiment.

In <FIG>, as sequence <NUM> is performed, PLC 100A and PLC 100B can share control-oriented data represented as a field value. In contrast, when communication abnormality such as frame loss <NUM> occurs somewhere in sequence <NUM> of communication, for example, on network <NUM> between PLC 100A and PLC 100B as in <FIG>, it is difficult to share data at the timing when each PLC <NUM> performs the control operation, and an appropriate instruction value or control amount may not be calculated. <FIG> shows a specific example of this case. In <FIG>, for example, a plurality of PLCs <NUM> are connected in a daisy chain to exchange data with one another over network <NUM>. Each PLC <NUM> is connected to at least one field apparatus <NUM> in the daisy chain over network <NUM>. In <FIG>, the plurality of PLCs <NUM> are distinguished as a PLC(O) connected to field apparatus 90F, a PLC(S), a PLC(R1), and a PLC(R2) connected to field apparatus 90C.

In <FIG>, when sequence <NUM> of E2E in <FIG> is performed, without communication abnormality, in IO refresh processing by IO refreshing unit <NUM> in one control cycle <NUM>, communication frame <NUM> from field apparatus 90F arrives at field apparatus 90C through all apparatuses on network <NUM>. In contrast, for example, it is assumed that frame loss <NUM> occurs in transfer between the PLC(S) and the PLC(R1) in IO refresh processing by IO refreshing unit <NUM> in t-th control cycle <NUM>. In this case, communication frames <NUM> held in buffer <NUM> of field apparatus 90F, buffer <NUM> of the PLC(O), and buffer <NUM> of the PLC(S) are control-oriented data in t-th control cycle <NUM>, whereas communication frames <NUM> held in buffers <NUM> of the PLC(R1) and the PLC(R2) at which communication frame <NUM> has not yet arrived due to frame loss <NUM> remain as in previous control cycle <NUM> (t-<NUM>-th control cycle <NUM>). Therefore, data cannot be shared at the timing when each PLC performs the control operation after IO refresh processing, and it is difficult to calculate an appropriate instruction value or control amount.

When communication abnormality such as frame loss <NUM> occurs and PLC <NUM> detects the fact that communication frame <NUM> does not arrive at defined time, for example, within a certain time period after start of control cycle <NUM> (that is, after start of IO refresh processing by IO refreshing unit <NUM>), resend processing unit <NUM> performs resend processing. Resend processing unit <NUM> transmits over network <NUM>, a resend request frame including resend request <NUM> that requests for resend of communication frame <NUM> that does not arrive.

Whether or not communication frame <NUM> has arrived is determined based on arrival time <NUM> in schedule information <NUM>. Specifically, in each control cycle <NUM>, each PLC <NUM> determines arrival time <NUM> based on timer <NUM> for each stream ID <NUM> in incoming communication frame <NUM>, and has determined arrival time <NUM> stored in schedule information <NUM>. In other words, since communication frame <NUM> of control-oriented data is cyclically transferred in synchronization with control cycle <NUM>, it can be predicted that communication frame <NUM> of control-oriented data will probably arrive at PLC <NUM> within a certain time period after start of control cycle <NUM>. Therefore, PLC <NUM> detects a communication port where communication frame <NUM> that will arrive within this certain time period arrives based on timer <NUM>, and determines arrival time <NUM>. Information on the detected communication port and determined arrival time <NUM> are set as port ID <NUM> and arrival time <NUM> for each stream ID <NUM> in schedule information <NUM>. In schedule information <NUM>, the communication port where communication frame <NUM> of control-oriented data will arrive can thus be set for each stream ID <NUM> and arrival time <NUM> can be maintained at a latest value.

<FIG> is a diagram schematically showing an exemplary communication sequence in resend processing according to the present embodiment. Referring to <FIG>, resend processing in the case in <FIG> will be described. Initially, resend processing unit <NUM> of the PLC(R1) predicts time of arrival of communication frame <NUM> of control-oriented data as described above, for example, every control cycle <NUM>, and updates corresponding arrival time <NUM> for each stream ID <NUM> in schedule information <NUM> (step S1).

Resend processing unit <NUM> of the PLC(R1) compares stream ID <NUM> in schedule information <NUM> with stream ID <NUM> in communication frame <NUM> that will arrive within a certain time period after start of (t)th control cycle <NUM>, and detects presence of communication frame <NUM> with a stream ID that has not arrived within the certain time period based on a result of comparison (step S2). In other words, among stream IDs <NUM>, presence of stream ID <NUM>, communication frame <NUM> corresponding to which has not arrived within the certain time period, is detected. In step S2, resend processing unit <NUM> generates the resend request frame in <FIG> or <FIG> and transmits the resend request frame over network <NUM> through communication circuit <NUM>. In step S2, notification processing unit <NUM> generates communication frame <NUM> in which non-arrival notification <NUM> is stored and transmits the communication frame over network <NUM> through communication circuit <NUM>. In resend processing, resend request <NUM> is transmitted when a condition involved with control cycle <NUM> is satisfied. Contents of the resend request frame transmitted in step S2, transmission of non-arrival notification <NUM>, and resend processing based on the condition will be described later in detail.

In <FIG>, non-arrival notification <NUM> is transmitted to the PLC(R2). When resend processing unit <NUM> of the PLC(R2) receives non-arrival notification <NUM>, it transfers non-arrival notification <NUM> to another PLC <NUM> connected to the PLC(R2) (step S3). Such another PLC <NUM> is also called a "subsequent-stage PLC. " The PLC(R2) and subsequent-stage PLC <NUM> can thus expect arrival of control-oriented data and can wait for arrival.

Within (t)th control cycle <NUM>, the PLC(S) is defined as an apparatus that receives resend request <NUM>. When resend processing unit <NUM> of the PLC(S) receives resend request <NUM>, it transmits over network <NUM> through communication circuit <NUM>, communication frame <NUM> matching with a stream ID that has not yet arrived and is designated in the resend request frame among communication frames <NUM> held in buffer <NUM> (step S4). Communication frame <NUM> in response to resend request <NUM> is thus sent again to the PLC(R1) that has issued the request.

When the PLC(R1) receives re-sent communication frame <NUM>, it performs transfer processing for transmitting received communication frame <NUM> to the PLC(R2). The PLC(R2) which is the subsequent-stage PLC that has received non-arrival notification <NUM> can thus receive communication frame <NUM> of control-oriented data that has not arrived.

A resend request frame transmitted in step S2 will be described. When the resend request frame is generated in a form in <FIG>, resend processing unit <NUM> has the MAC address of the PLC(R1) which is the sender of resend request <NUM> stored in area <NUM>. The MAC address of an apparatus connected closest to the PLC(R1) is set as the MAC address of the addressee apparatus in area <NUM>. Specifically, resend processing unit <NUM> specifies the MAC address of the apparatus connected closest to the PLC(R1), in port information <NUM> (or <NUM>) on the communication port specified by port ID <NUM> corresponding to stream ID <NUM> that has not yet arrived. In this case, the MAC address of the PLC(S) is specified. Flag <NUM> for resend request <NUM> and stream ID <NUM> non-arrival of which is detected in step S2 are stored in area <NUM>.

When resend processing unit <NUM> generates the resend request frame in the form in <FIG>, resend processing unit <NUM> has the MAC address of the apparatus which is the sender of resend request <NUM> stored in area <NUM>, has stream ID <NUM> of the resend request frame stored in area <NUM> of the addressee, and has stream ID <NUM> (stream ID <NUM> that has not yet arrived) of communication frame <NUM> resend of which is requested stored in area <NUM>.

<FIG> is a schematic diagram illustrating a condition for performing resend processing according to the present embodiment. In the present embodiment, when relation between a resend processing time period <NUM> and an allowance time within control cycle <NUM> satisfies a condition (resend processing time period <NUM> < allowance time), resend processing unit <NUM> determines to perform resend processing. Therefore, resend processing unit <NUM> can also determine not to perform resend processing when the condition is not satisfied.

The allowance time is calculated as the allowance time = (duration of control cycle <NUM> - time period required for processing (IO refresh processing, control operation processing, etc.) necessary for control). Processing necessary for control does not include processing in connection with a user program allocated to a task of low priority or the peripheral processing program and information-oriented processing. Resend processing time period <NUM> refers to a response time period required until reception of response to resend request <NUM>, and it is calculated as resend processing time period <NUM> = (time period for communication of resend request <NUM> to the PLC(S) + time period for resend processing within the PLC(S) + communication time period for resend in the PLC(S)). The time period for communication of resend request <NUM> and the communication time period for resend are calculated based on (size of communication frame <NUM>/(communication band) + cable delay time). The time period for resend processing within the PLC(S) refers to a time period for preparation for transmission (data reading, data copying, etc.) for control-oriented data resend request <NUM> for which has been received.

The response time period is more preferably calculated for each apparatus based on configuration <NUM> thereof. In other words, the response time period is dependent on a distance of communication of information resend request <NUM>. Therefore, resend processing unit <NUM> determines whether or not there is an apparatus for which able/unable-to-respond information <NUM> indicates "unable to respond" in a path for transfer of resend request <NUM> or the number of such apparatuses based on connection information table <NUM> in configuration <NUM>, and changes a parameter value involved with the communication time period for calculating resend processing time period <NUM> based on a result of determination. Each apparatus can thus more accurately calculate resend processing time period <NUM> based on connection information table <NUM> specific to each apparatus.

<FIG> is a flowchart showing exemplary resend processing according to the present embodiment. Resend processing by resend processing unit <NUM> of the PLC(R1) in <FIG> will be described with reference to <FIG>. Initially, resend processing unit <NUM> determines whether or not communication frame <NUM> including stream ID <NUM> registered in schedule information <NUM> arrives at corresponding arrival time <NUM> (step S11). When resend processing unit <NUM> determines that communication frame <NUM> including stream ID <NUM> arrives at corresponding arrival time <NUM> (YES in step S11), resend processing unit <NUM> determines whether or not received communication frame <NUM> is communication frame <NUM> for non-arrival notification <NUM> (step S13). When resend processing unit <NUM> determines that it has received communication frame <NUM> for non-arrival notification <NUM> (YES in step S13), notification processing unit <NUM> transmits communication frame <NUM> for non-arrival notification <NUM> to the subsequent-stage PLC (step S15). Thereafter, the process returns to step S11. When non-arrival notification <NUM> is received in step S15, resend processing unit <NUM> can determine not to transmit resend request <NUM>.

When resend processing unit <NUM> determines that received communication frame <NUM> is not communication frame <NUM> for non-arrival notification <NUM> (NO in step S13), control operation unit <NUM> performs control operation processing based on data (that is, control-oriented data) in received communication frame <NUM> (step S23).

When resend processing unit <NUM> determines in step S11 that communication frame <NUM> including stream ID <NUM> does not arrive at corresponding arrival time <NUM>, that is, non-arrival (NO in step S11), notification processing unit <NUM> transmits communication frame <NUM> for non-arrival notification <NUM> to the subsequent-stage PLC (step S17).

Resend processing unit <NUM> determines whether or not a condition for performing resend processing (allowance time > resend processing time period <NUM>) is satisfied (step S19), and when it determines that the condition is satisfied (YES in step S19), it transmits communication frame <NUM> for resend request <NUM> (step S21). Thereafter, the process returns to step S11.

When resend processing unit <NUM> determines that the condition for performing resend processing is not satisfied (NO in step S19), it determines whether or not determination as non-arrival has consecutively been made over at most N (N > <NUM>) control cycles (step S25). When resend processing unit <NUM> determines that determination as non-arrival has been made consecutively over at most N (N > <NUM>) control cycles <NUM> (YES in step S25), control operation unit <NUM> of the PLC(R1) performs the control operation based on control-oriented data in latest control cycle <NUM> among data in communication frames <NUM> accumulated in storage unit <NUM>, and calculates the instruction value or the control amount (step S27). When resend processing unit <NUM> determines that determination as non-arrival has been made consecutively over more than N (N > <NUM>) control cycles <NUM> (NO in step S25), it transmits an abnormality notification to the subsequent-stage PLC (the PLC(R2)) (step S29). When the subsequent-stage PLC receives the abnormality notification after reception of non-arrival notification <NUM>, it performs prescribed processing for addressing abnormality. For example, the subsequent-stage PLC performs processing as in step S27.

A value for a variable N in step S25 can be determined, for example, depending on characteristics of an object to be controlled connected to the PLC(R1). In step S27, PLC <NUM> may determine the instruction value or the control amount (output data <NUM> in storage unit <NUM>) already calculated in the previous control cycle as control-oriented data calculated in present control cycle <NUM>, instead of performing the control operation based on control-oriented data in the previous control cycle.

<FIG> is a flowchart showing exemplary processing in step S19 in <FIG>. Details of determination (step S19) as to the condition for performing resend processing will be described with reference to <FIG>. Initially, resend processing unit <NUM> determines whether or not output synchronization <NUM> of stream ID <NUM> determined as not having arrived has been set, that is, whether or not stream ID <NUM> indicates "<NUM>" (step S191).

When resend processing unit <NUM> determines that output synchronization <NUM> has been set (YES in step S191), resend processing unit <NUM> determines whether or not the condition (allowance time until synchronous timing > resend processing time period <NUM>) is satisfied (step S192). When resend processing unit <NUM> determines that the condition is not satisfied (NO in step S192), it does not transmit resend request <NUM> and the process makes transition to step S25. When resend processing unit <NUM> determines that the condition has been satisfied (YES in step S192), it transmits resend request <NUM> (step S21).

When the process returns to step S191 and resend processing unit <NUM> determines that output synchronization <NUM> corresponding to stream ID <NUM> that has not arrived has not been set, that is, the stream ID indicates "<NUM>" (NO in step S191), resend processing unit <NUM> determines whether or not the condition (allowance time > resend processing time period <NUM>) is satisfied (step S193), and when the condition is satisfied (YES in step S193), the process makes transition to step S21, and when the condition is not satisfied (NO in step S193), the process makes transition to step S25.

Though setting is dynamically made in step S191 such that output synchronization <NUM> is different for each stream ID <NUM> that has not arrived, setting may statically be made to determine in advance whether or not to set output synchronization for each PLC <NUM>.

When data for which output synchronization should be set has not arrived, the "allowance time until synchronous timing" set as the condition in step S192 may be calculated as (time of output synchronization - time of detection of non-arrival), and when communication frame <NUM> corresponding to the stream ID that has not arrived is received, it may be calculated as (time of output synchronization - time of reception of frame that has not arrived). Time of output synchronization corresponds to predetermined time of output of trigger <NUM>.

In the present embodiment, both of PLC <NUM> and field apparatus <NUM> can perform resend processing. Resend processing by PLC <NUM> described above can similarly be performed by resend processing unit <NUM> of field apparatus <NUM>. <FIG> is a diagram schematically showing exemplary resend processing by field apparatus <NUM> according to the present embodiment.

In <FIG>, in a case in which field apparatus 90A does not include resend processing unit <NUM>, frame loss <NUM> occurs during transfer of communication frame <NUM> from field apparatus 90C to the PLC(O). Therefore, communication frame <NUM> does not arrive at field apparatus 90A and the PLC(O). Since field apparatus 90A does not include resend processing unit <NUM>, it does not transmit resend request <NUM>, however, the PLC(O) transmits resend request <NUM>.

In this case, resend processing unit <NUM> of the PLC(O) transmits resend request <NUM> to an apparatus located closest (in <FIG>, field apparatus 90B) among apparatuses not falling under able/unable-to-respond information <NUM>, that is, among apparatuses including resend processing unit <NUM>, in port information <NUM> (or <NUM>) specified by port ID <NUM> corresponding to stream ID <NUM> that has not arrived. When resend processing unit <NUM> of field apparatus 90B receives resend request <NUM>, it performs re-transmission of communication frame <NUM> corresponding to stream ID <NUM> that has been requested. Field apparatus 90A and the PLC(O) can thus receive communication frame <NUM> that has not arrived.

<FIG> is a diagram showing the configuration of control system <NUM> according to the present embodiment in comparison with another configuration. An advantage achieved by control system <NUM> will be described with reference to <FIG> shows control system <NUM> using one identical protocol (for example, TSN) for communication among apparatuses and a control system <NUM> using a plurality of types of protocols (for example, TSN and EtherCAT®) for communication among apparatuses. In control system <NUM>, TSN is used for communication between PLCs <NUM> and EtherCAT® (abbreviated as ECAT in the figure) is used for communication between PLC <NUM> and field apparatus <NUM> and between field apparatuses <NUM>.

In <FIG>, in a case in which a frame including information on a position of a robot representing an exemplary field value is transmitted from field apparatus 90A to field apparatus 90D by E2E, an identical protocol is used in control system <NUM>, and hence conversion of the protocol is not required in transfer of the frame from a communication layer between field apparatuses to a communication layer between PLCs <NUM>. In contrast, in control system <NUM>, (<NUM>) and (<NUM>) protocol conversion in a communication path should be performed in such a manner as (<NUM>) ECAT communication → (<NUM>) ECAT/TSN protocol conversion → (<NUM>) TSN communication → (<NUM>) TSN/ECAT protocol conversion → (<NUM>) ECAT communication.

Thus, in control system <NUM>, apparatuses can share data with one another without requiring protocol conversion even for communication across layers. Since control system <NUM> does not require protocol conversion, communication between layers can be faster in control system <NUM> than in control system <NUM>. Therefore, the apparatuses provided in control system <NUM> can share data with one another within a relatively short communication cycle, for example, a cycle of IO refresh processing within control cycle <NUM>. Since PLC <NUM> can thus obtain all values (field values) to be operated prior to start of control operation processing by user program <NUM>, user program <NUM> can also be designed without taking communication delay into account.

Though communication frame <NUM> of control-oriented data and communication frame <NUM> of non-control-oriented data (information-oriented and control information-oriented) are transferred over network <NUM>, resend request <NUM> is transmitted only for communication frame <NUM> of control-oriented data. Therefore, since resend request <NUM> only for control-oriented data, cyclic arrival of which should be guaranteed, is transmitted, consumption of a communication band in network <NUM> can be suppressed even though resend request <NUM> is transmitted.

Claim 1:
A control system (<NUM>) in which a plurality of apparatuses (<NUM>, <NUM>) in time synchronization with one another are connected to a network (<NUM>), wherein
the network is configured to transfer a frame (<NUM>) periodically exchanged by the plurality of apparatuses,
the plurality of apparatuses include at least one control device (<NUM>) and an apparatus (<NUM>) controlled by the control device,
each of the plurality of apparatuses is connected over the network, to a first apparatus configured to transmit a frame that arrives at each of the plurality of apparatuses and a second apparatus configured to receive a frame transmitted from each of the plurality of apparatuses, and
each of the apparatuses includes information on a frame transfer path (<NUM>, <NUM>) and transfer timing (<NUM>, <NUM>) based on synchronous time,
characterized in that:
when a frame does not arrive at defined time through the transfer path and when a condition associated with a cycle (<NUM>) is satisfied, at least one of the plurality of apparatuses is configured to transmit a resend request (<NUM>) through the transfer path to the first apparatus connected to the network.