WO2022113383A1 - 制御装置、通信制御方法、および制御プログラム - Google Patents

制御装置、通信制御方法、および制御プログラム Download PDF

Info

Publication number
WO2022113383A1
WO2022113383A1 PCT/JP2021/008911 JP2021008911W WO2022113383A1 WO 2022113383 A1 WO2022113383 A1 WO 2022113383A1 JP 2021008911 W JP2021008911 W JP 2021008911W WO 2022113383 A1 WO2022113383 A1 WO 2022113383A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication frame
communication
input data
received
transmitted
Prior art date
Application number
PCT/JP2021/008911
Other languages
English (en)
French (fr)
Inventor
健一 岩見
泰士 福田
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2022113383A1 publication Critical patent/WO2022113383A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration

Definitions

  • the present invention relates to a control device that can be connected to a network, a communication control method in the control device, and a control program for realizing the control device.
  • a communication frame transmitted by a communication master (hereinafter, also simply referred to as “master”) circulates all communication slaves (hereinafter, also simply referred to as “slave”). Then, return to the master.
  • master a communication master
  • slave all communication slaves
  • the port of the slave existing on the path is used for receiving and transmitting the communication frame. It is possible to adopt a form in which only one is performed.
  • the former is referred to as a "non-ring configuration" and the latter is also referred to as a "ring configuration".
  • the communication frame is transmitted in one direction on each of the cables connected to the slave.
  • Patent Document 1 discloses a master device capable of easily knowing an illegal route in a network including a ring topology.
  • round trip time the time required for the communication frame transmitted from the master to make a round and return to the master. More specifically, as the round trip time increases, the update cycle of the data exchanged between the communication master and the communication slave becomes long, and the control performance may deteriorate.
  • the round trip time increases as the number of communication slaves increases, but by adopting the ring configuration, it is possible to suppress the increase in the round trip time as compared with the case of adopting the non-ring configuration.
  • the ring configuration is a kind of redundant network, and if any failure occurs in the network, the non-ring configuration network is automatically reconfigured and the transmission of communication frames is continued. However, as the network configuration changes, the round trip time may change in the direction of becoming longer.
  • An object of a certain aspect of the present invention is to provide a new mechanism capable of both shortening the round trip time obtained by the ring configuration and stabilizing control when some kind of failure occurs in the ring configuration.
  • a control device includes a communication unit connected to a network configured to make a cycle of communication frames, and a control operation based on input data included in the communication frame received via the communication unit. It also includes an arithmetic processing unit that repeatedly executes transmission of a communication frame including output data determined by the control operation every execution cycle. If the arithmetic processing unit does not receive the transmitted communication frame by the first threshold time after transmitting the communication frame, it is a backup data included in the communication frame received before the transmission. The transmitted communication frame must be received by the first operation mode in which the control operation is executed based on the input data and the second threshold time shorter than the first threshold time after the communication frame is transmitted.
  • the second operation mode for executing the control operation based on the preliminary input data which is the input data included in the communication frame received before the transmission can be selected. If the arithmetic processing unit receives the transmitted communication frame by the first threshold time in the first operation mode, the arithmetic processing unit updates the preliminary input data with the input data included in the received communication frame, and the second If the transmitted communication frame is received by the third threshold time longer than the second threshold time in the operation mode of, the preliminary input data is updated with the input data included in the received communication frame.
  • the input data to be used for the control calculation is determined and the preliminary input data is determined based on whether or not the communication frame transmitted by the first threshold time can be received. Judge the update of.
  • the input data used for the control calculation is determined based on whether or not the communication frame transmitted by the second threshold time can be received, but the update of the preliminary input data is performed.
  • Communication frames received by the third threshold time which is longer than the second threshold time, can be targeted. Therefore, in the second operation mode, even if the time from the transmission of the communication frame to the start of the execution of the control operation is set shorter than that in the first operation mode, the third threshold is set. If the communication frame can be received by the time, the preliminary input data can be updated appropriately. Therefore, it is possible to stabilize the control.
  • the network may include a ring configuration configured such that the communication frame is transmitted in only one direction on each of the cables connected to the communication slave.
  • the arithmetic processing unit may be able to enable the second operation mode when the network includes a ring configuration. According to these configurations, it is possible to provide an operation mode suitable for the ring configuration.
  • the network may include a daisy-chained configuration.
  • the second threshold time may be determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit in the ring configuration.
  • the third threshold time is determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit when any of the cables included in the ring configuration cannot transmit the communication frame. You may. According to this configuration, it is possible to predict changes in the network configuration and determine an appropriate threshold time.
  • the ring configuration may include a communication unit and a relay device connected to a plurality of communication slaves. According to this configuration, a ring configuration having Junction Redundancy can be realized.
  • the communication unit may have a plurality of ports connected to different communication slaves. According to this configuration, a ring configuration having cable redundancy (Cable Redundancy) can be realized.
  • the execution cycle in the second operation mode may be set shorter than the execution cycle in the first operation mode. According to this configuration, it is possible to shorten the execution cycle of control operations and / or increase the amount of operations that can be executed.
  • the operation mode of the arithmetic processing unit can be referred to by an instruction included in the user program executed by the arithmetic processing unit. According to this configuration, the processing can be easily different depending on the operation mode in the arithmetic processing unit.
  • a communication control method executed by a control device including a communication unit connected to a network configured to make a cycle of communication frames.
  • the communication control method is a step of executing input processing according to the operation mode selected from the first operation mode and the second operation mode, and control based on the input data included in the communication frame received via the communication unit. It includes a step of executing an operation and a step of transmitting a communication frame containing output data determined by a control operation.
  • the step of executing the input process in the first operation mode, if the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the communication frame received before the transmission is received.
  • the transmitted communication frame is received by the step of using the preliminary input data, which is the input data included in the above, for the control calculation and the first threshold time, the input data included in the received communication frame is used as a backup. Includes steps to update the input data.
  • the step of executing the input process is such that if the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the transmitted communication frame is not received.
  • the step of using the preliminary input data which is the input data included in the communication frame received before the transmission, for the control calculation, and the transmitted communication frame by the third threshold time longer than the second threshold time. If received, it includes a step of updating the preliminary input data with the input data included in the received communication frame.
  • a control program executed by a computer including a communication unit connected to a network configured to make a cycle of communication frames.
  • the control program is based on a step of executing input processing to the computer according to the operation mode selected from the first operation mode and the second operation mode, and input data included in the communication frame received via the communication unit.
  • the step of executing the control operation and the step of transmitting the communication frame including the output data determined by the control operation are executed.
  • the step of executing the input process in the first operation mode, if the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the communication frame received before the transmission is received.
  • the transmitted communication frame is received by the step of using the preliminary input data, which is the input data included in the above, for the control calculation and the first threshold time, the input data included in the received communication frame is used as a backup. Includes steps to update the input data.
  • the step of executing the input process is such that if the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the transmitted communication frame is not received.
  • the step of using the preliminary input data which is the input data included in the communication frame received before the transmission, for the control calculation, and the transmitted communication frame by the third threshold time longer than the second threshold time. If received, it includes a step of updating the preliminary input data with the input data included in the received communication frame.
  • FIG. 1 is a schematic diagram showing an example of a control system according to the present embodiment.
  • the control system 1 shown in FIGS. 1A to 1C is an example of a control device that functions as a communication master (master), a PLC100, and a device 200 such as an input / output device that functions as a communication slave (slave).
  • master a communication master
  • PLC100 a PLC100
  • device 200 such as an input / output device that functions as a communication slave (slave).
  • -1 to 200-5 hereinafter, also collectively referred to as "device 200"
  • a relay device 300 are included.
  • the "ring configuration" in the present specification means a network configured so that a communication frame is transmitted in only one direction in each of the cables connected to the slave.
  • each of the slaves has a plurality of ports, and one port means a "ring configuration" in which only one of transmission and reception of a communication frame is performed.
  • the "non-ring configuration" in the present specification means a network configured so that a communication frame is transmitted in both directions in any of the cables connected to the slave.
  • a configuration in which one of the ports of the slave performs both transmission and reception of communication frames means a "non-ring configuration”.
  • the PLC 100 has a port 151 for transmitting and receiving communication frames.
  • Each of the devices 200-1 to 200-5 has a first port 251 and a second port 252 for transmitting and receiving communication frames.
  • the first port 251 is a port (IN port) to which a communication frame is input
  • the second port 252 is a port (OUT port) to which a communication frame is output.
  • the relay device 300 has a first port 351 and a second port 352 and a third port 353 for transmitting and receiving communication frames.
  • the relay device 300 receives a communication frame at a certain port, the relay device 300 transmits the received frame from another port determined according to a predetermined rule.
  • a predetermined rule the first port 351 ⁇ the second port 352 ⁇ the third port 353 ⁇ the first port 351 ⁇ ... may be determined cyclically.
  • FIG. 1 (A) shows an example of a ring configuration.
  • the communication frame transmitted from the port 151 of the PLC 100 is the cable 20, the first port 351 of the relay device 300, the second port 352 of the relay device 300, the cable 21, the first port 251 of the device 200-1, and the device 200-1.
  • 2nd port 252 cable 22, 1st port 251 of device 200-2, 2nd port 252 of device 200-2, cable 23, 1st port 251 of device 200-3, 2nd port of device 200-3 252, cable 24, first port 251 of device 200-4, second port 252 of device 200-4, cable 25, first port 251 of device 200-5, second port 252 of device 200-5, cable 26 ,
  • the third port 353 of the relay device 300 and the cable 20 make a round in this order, and return to the port 151 of the PLC 100.
  • the number of passages of the communication frame port transmitted from the port 151 of the PLC 100 is 14.
  • FIG. 1B shows a case where the cable 24 connecting the device 200-3 and the device 200-4 is broken for some reason.
  • the device 200-3 since the communication frame cannot be transmitted from the second port 252 of the device 200-3, the device 200-3 transmits the communication frame from the first port 251. That is, the device 200-3 returns the communication frame by the same route.
  • the communication frame includes the cable 23, the second port 252 of the device 200-2, the first port 251 of the device 200-2, the cable 22, the second port 252 of the device 200-1, and the first port of the device 200-1.
  • the number of passages of the communication frame port transmitted from the port 151 of the PLC 100 is 22.
  • FIG. 1 (C) shows an example of a non-ring configuration.
  • the communication frame transmitted from the port 151 of the PLC 100 is the cable 20, the first port 351 of the relay device 300, the second port 352 of the relay device 300, the cable 21, the first port 251 of the device 200-1, and the device 200-1.
  • the round trip time is determined by the total of the port transit time and the cable transit time, but the port transit time is the dominant factor. Therefore, as the number of ports through which the communication frame passes increases, the round trip time increases.
  • the round trip time Tr2 (Tr2> Tr1) in the configuration shown in FIG. 1B is longer than the round trip time Tr1 in the ring configuration shown in FIG. 1 (A). Since the number of passing ports is the same, the round trip time Tr2 in the configuration shown in FIG. 1 (B) is substantially the same as the round trip time Tr3 in the configuration shown in FIG. 1 (C) (Tr2 ⁇ Tr3).
  • the round trip time may be extended and the system may not operate as designed. There is also sex.
  • control system provides a mechanism capable of suppressing the influence on the control performance even when the ring configuration is changed to the non-ring configuration.
  • the communication control method provided by the control system according to the present embodiment is not applied only when the ring configuration is changed to the non-ring configuration, but can be applied to various network configurations.
  • FIG. 2 is a schematic diagram showing an example of processing in PLC100 of the control system 1 according to the present embodiment.
  • the PLC 100 periodically executes a series of processes including a control operation 160, an output process 162, and an input process 164.
  • a series of processes including a control operation 160, an output process 162, and an input process 164.
  • the cycle in which a series of processes are executed is also referred to as a “task execution cycle”.
  • the input process 164 is a process of collecting input data such as measured values from the device 200.
  • the control operation 160 performs an operation for controlling a control target based on the input data collected by the input process 164, and determines output data such as a command value to the device 200.
  • the output process 162 is a process of transmitting the output data determined by the control operation 160 to the target device 200.
  • the arithmetic processing unit (processor 102 shown in FIG. 5) of the PLC 100 is determined by the control arithmetic 160 and the control arithmetic 160 based on the input data included in the communication frame received via the field network controller 112. The transmission of the communication frame including the output data is repeatedly executed every task execution cycle.
  • the output process 162 and the input process 164 are realized by using a communication frame. Therefore, the time from the end of the output process 162 to the start of the input process 164 depends on the time from the transmission of the communication frame by the PLC 100 to the return of the communication frame, that is, the round trip time.
  • FIGS. 2 (A) to 2 (C) a non-ring configuration is premised.
  • FIG. 2A shows a time chart when the number of devices 200 connected to the PLC 100 and the calculation amount of the control calculation 160 are both relatively small.
  • FIG. 2B shows a time chart when the number of devices 200 connected to the PLC 100 increases as compared with FIG. 2A.
  • FIG. 2C shows a time chart when the amount of operation of the control operation 160 is increased as compared with FIG. 2B.
  • a task execution cycle Tc2 longer than the task execution cycle Tc1 is required. That is, as the number of connected devices 200 and the amount of calculation of the control calculation 160 increase, the task execution cycle is extended by ⁇ Tc.
  • the communication time it is preferable to shorten the communication time as much as possible.
  • the number of passages through the ports can be reduced, so that the round trip time, that is, the communication time can be shortened.
  • FIG. 3 is a schematic diagram showing another example of the processing of the control system 1 according to the present embodiment in the PLC100.
  • FIG. 3A shows a time chart when a non-ring configuration is adopted
  • FIG. 3B shows a time chart when a ring configuration is adopted, as in FIG. 2B.
  • the communication time Tt2 is shortened to the communication time Tt3 ( ⁇ communication time Tt2), and when the task execution cycle Tc1 is set to be the same, the shortened communication is performed.
  • the minute of time becomes the spare time 166, and more operations can be executed as the control operation 160.
  • the communication time can be shortened, which can improve the control performance such as shortening the task execution cycle and executing more control operations.
  • the ring configuration changes to the non-ring configuration, and the communication time becomes long.
  • FIG. 4 is a schematic diagram showing still another example of the processing of the control system 1 according to the present embodiment in the PLC100.
  • FIG. 4A shows a time chart when the ring configuration is adopted as in FIG. 3B
  • FIG. 4B shows a time chart when the ring configuration is changed to the non-ring configuration. Is shown.
  • the communication time Tt3 can be shortened, and even if the calculation amount of the control calculation 160 is relatively large, the control calculation 160, the output process 162, and the input A series of processes including the process 164 can be periodically executed in the task execution cycle Tc1.
  • the system may be designed as shown in FIG. 4C on the premise of the communication time in the non-ring configuration. That is, in the time chart shown in FIG. 4C, the task execution cycle Tc3 is set with a certain time margin.
  • the system design shown in FIG. 4C although it is robust, the merit of shortening the round trip time by adopting the ring configuration cannot be utilized.
  • FIG. 5 is a schematic diagram showing a hardware configuration example of the PLC100 of the control system 1 according to the present embodiment.
  • the PLC 100 includes, as main hardware components, a processor 102, a main memory 104, a storage 110, a field network controller 112, and a local bus controller 114. These hardware components are electrically connected via the internal bus 118.
  • the processor 102 corresponds to an arithmetic processing unit that executes control operations, and is composed of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), and the like. Specifically, the processor 102 reads out the program stored in the storage 110, expands it in the main memory 104, and executes it to realize control operations according to the control target and various processes as described later. do.
  • a CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the main memory 104 is composed of a volatile storage device such as a DRAM (Dynamic Random Access Memory) or a SRAM (Static Random Access Memory).
  • the storage 110 is composed of, for example, a non-volatile storage device such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive).
  • the storage 110 stores a system program 1102 for realizing basic functions, a user program 1104 created according to a control target, a system setting information 1106 for determining a process as described later, and the like.
  • the system program 1102 can be regarded as at least a part of the control program in order to realize the basic functions in the PLC 100.
  • the field network controller 112 corresponds to a communication unit and is connected to a network configured so that communication frames make a round. More specifically, the field network controller 112 has a port 151 and is in charge of transmission / reception processing of communication frames.
  • the field network controller 112 of the PLC 100 functions as a communication master (master).
  • the field network controller 112 may have a synchronization counter for periodically transmitting and receiving communication frames.
  • the local bus controller 114 is electrically connected to one or more functional units 116 via the internal bus 118.
  • the functional unit 116 includes a function of exchanging various signals with a controlled object.
  • the functional unit 116 has, for example, a DI (Digital Input) function that receives a digital signal from a controlled object, a DO (Digital Output) function that outputs a digital signal to the controlled object, and an AI (Analog) that receives an analog signal from the controlled object. It has one or more of the Input) function and the AO (Analog Output) function that outputs an analog signal to the controlled object.
  • the functional unit 116 may include a controller equipped with special functions such as PID (Proportional Integral Derivative) control and motion control.
  • FIG. 5 shows a configuration example in which the necessary functions are provided by the processor 102 executing a program, and some or all of these provided functions are provided by a dedicated hardware circuit (for example, ASIC). It may be implemented using (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array). Alternatively, the main part of the PLC 100 may be realized by using hardware that follows a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer). In this case, a virtualization technique may be used to execute a plurality of OSs (Operating Systems) having different uses in parallel, and to execute necessary applications on each OS.
  • OSs Operating Systems
  • a configuration in which functions such as a display device and a support device are integrated into the PLC 100 may be adopted.
  • FIG. 6 is a schematic diagram showing a hardware configuration example of the device 200 of the control system 1 according to the present embodiment.
  • the device 200 includes, as main hardware components, a control circuit 206, a field network controller 212, and a functional module 220.
  • the control circuit 206 is an arithmetic processing unit that proactively executes processing in the device 200.
  • the control circuit 206 typically includes a processor 202, a main memory 204, and a storage 210.
  • the processor 202 is composed of a CPU, a GPU, and the like.
  • the main memory 204 is composed of a volatile storage device such as DRAM or SRAM.
  • the storage 210 is composed of, for example, a non-volatile storage device such as an SSD.
  • a ROM (Read Only Memory) may be adopted as the storage 210.
  • the control circuit 206 may be mounted using a dedicated hardware circuit (for example, ASIC or FPGA).
  • the field network controller 212 has a first port 251 and a second port 252, and is in charge of transmission / reception processing of communication frames.
  • the field network controller 212 of the device 200 functions as a communication slave (slave).
  • the field network controller 212 may have a synchronization counter for periodically transmitting and receiving communication frames.
  • the functional module 220 is in charge of processing for exchanging various signals with the controlled object.
  • FIG. 7 is a schematic diagram showing a hardware configuration example of the relay device 300 of the control system 1 according to the present embodiment.
  • the relay device 300 includes a control circuit 306 and a field network interface 312 as main hardware components.
  • the control circuit 306 is an arithmetic processing unit that independently executes the transfer processing of the communication frame in the relay device 300.
  • the control circuit 306 typically includes a processor 302, a main memory 304, and a storage 310.
  • the processor 302 is composed of a CPU, a GPU, and the like.
  • the main memory 304 is composed of a volatile storage device such as DRAM or SRAM.
  • the storage 310 is composed of, for example, a non-volatile storage device such as an SSD. A ROM may be adopted as the storage 310.
  • the control circuit 306 may be mounted using a dedicated hardware circuit (for example, ASIC or FPGA).
  • the field network interface 312 has a first port 351 and a second port 352 and a third port 353, and includes a receiving circuit and a transmitting circuit (not shown) of the communication frame.
  • the behavior of the communication frame transmitted from the master is as follows: (1) the communication frame returns to the master within a predetermined time, and (2) the communication frame is lost and the master. Two types are assumed, one that does not return to.
  • the behavior of the communication frame transmitted from the master is as follows: (1) the communication frame returns to the master within a predetermined time, and (2) the communication frame changes to a non-ring configuration. Three types are assumed: the communication frame returns to the master after a predetermined time, and (3) the communication frame is lost and does not return to the master.
  • FIG. 8 is a diagram for explaining a process related to communication time in the control system 1 according to the present embodiment.
  • FIG. 8A shows an example of a non-ring configuration
  • FIG. 8B shows an example of a ring configuration.
  • the input process 164 starts from the end of the output process 162 regardless of whether the ring configuration is normal or not.
  • the time until is set relatively long.
  • the threshold time Th1 is set with reference to the end timing T0 of the output process 162.
  • the threshold time Th2 and the threshold time Th3 are set with reference to the end timing T0 of the output process 162.
  • the threshold time Th1 and the threshold time Th3 correspond to the communication timeout time
  • the threshold time Th2 corresponds to the threshold time for determining that some kind of failure has occurred in the ring configuration.
  • the threshold time Th1 and the threshold time Th3 are determined based on the round trip time of the non-ring structure, and the threshold time Th2 is determined based on the round trip time of the ring configuration.
  • the threshold time Th1 and the threshold time Th3 may have the same value or different values.
  • the processing is different for each of the three types of normal, delayed, and frame lost.
  • FIG. 9 is a diagram for explaining an example of the input process 164 in the PLC 100 of the control system 1 according to the present embodiment.
  • the data (hereinafter referred to as input data) from the device 200 or the like included in the communication frame returned to the PLC 100 is the current cycle input data 170 and the preliminary input data 172, which are independent of each other. It is held in the main memory 104.
  • the current cycle input data 170 is input data included in the communication frame received in the current task execution cycle.
  • the preliminary input data 172 is input data included in the newest and appropriately received communication frame other than the current task execution cycle.
  • the current cycle input data 170 is used as input data in the control operation 160.
  • the preliminary input data 172 is used as input data in the control operation 160. That is, in “delay” and "frame lost", the communication frame of the current task execution cycle cannot be used, so the control operation 160 is executed by using the communication frame received before that.
  • the input data included in the communication frame received in the current task execution cycle is held as the current cycle input data 170 and also as the preliminary input data 172. That is, if it is "normal”, the current cycle input data 170 and the preliminary input data 172 are the same input data.
  • the current cycle input data 170 is not updated, but since the communication frame itself is received, it is used as the preliminary input data 172. Can be retained. Therefore, in the case of "delay”, the input data included in the received communication frame is held as the preliminary input data 172 after the execution of the control operation 160.
  • the input process 164 can be executed using the input data included in the communication frame received in each task execution cycle as long as the frame lost does not occur. Therefore, there is no time lag between the timing at which the input data is acquired and the execution timing of the input process 164. Focusing on such an advantage, the operation mode of the PLC100 in this case is referred to as a "data synchronization priority mode".
  • the PLC 100 In the data synchronization priority mode, if the PLC 100 does not receive the transmitted communication frame by the threshold time Th1 (first threshold time) after the communication frame is transmitted, the PLC 100 receives the communication frame before the transmission.
  • the control operation 160 is executed based on the preliminary input data 172 which is the input data included in the communication frame. With respect to the preliminary input data 172, if the PLC 100 receives the communication frame transmitted by the threshold time Th1, the PLC 100 updates the preliminary input data 172 with the input data included in the received communication frame.
  • the system can be designed on the premise of the round trip time obtained by the ring configuration.
  • the ring configuration is changed to the non-ring configuration, the input data used in the input process 164 is included in the communication frame received in the previous task execution cycle. That is, even if the ring configuration is changed to the non-ring configuration, the time lag between the timing at which the input data is acquired and the execution timing of the input process 164 can be suppressed to only one cycle of the task execution cycle.
  • the control performance can be improved from the viewpoint of the input / output response performance and the calculation amount of the control calculation 160. Focusing on such an advantage, the operation mode of the PLC100 in this case is referred to as a "control performance priority mode".
  • the PLC 100 In the control performance priority mode, if the PLC 100 does not receive the transmitted communication frame by the threshold time Th2 (second threshold time) after the communication frame is transmitted, the communication received before the transmission.
  • the control operation 160 is executed based on the preliminary input data 172 which is the input data included in the frame.
  • the preliminary input data 172 if the PLC100 receives a communication frame transmitted by a threshold time Th3 (third threshold time) longer than the threshold time Th2, the PLC100 reserves the input data included in the received communication frame.
  • the input data 172 is updated.
  • the execution cycle in the control performance priority mode can be set shorter than the execution cycle in the data synchronization priority mode.
  • the control performance priority mode may be enabled when the network includes a ring configuration.
  • the PLC 100 periodically executes a process including an input process as described later according to an operation mode selected from the data synchronization priority mode and the control performance priority mode.
  • FIG. 10 is a flowchart showing a processing procedure in the data synchronization priority mode by the PLC 100 of the control system 1 according to the present embodiment. Each step shown in FIG. 10 is typically realized by the processor 102 of the PLC 100 executing the system program 1102 and the user program 1104 (see FIG. 5).
  • the PLC 100 determines whether or not the task execution cycle has arrived (step S100).
  • the PLC 100 generates and transmits a communication frame including the output data calculated by the previous control operation (step S102). That is, the PLC 100 transmits a communication frame including output data determined by a control operation.
  • the PLC 100 determines whether or not a communication frame that has circled the network has been received (step S104).
  • step S104 the PLC 100 stores the input data included in the received communication frame as the current cycle input data 170 (step S106), and uses the current cycle input data 170. And execute the control operation (step S108). At the same time, the PLC 100 updates the preliminary input data 172 with the current cycle input data 170 (step S110). As described above, if the PLC 100 receives the communication frame transmitted by the threshold time Th1 (first threshold time), the PLC 100 updates the preliminary input data 172 with the input data included in the received communication frame. Then, the processing of step S100 or less is repeated.
  • Th1 first threshold time
  • step S104 determines whether or not the threshold time Th1 has elapsed since the communication frame was transmitted (step S112). If the threshold time Th1 has not elapsed (NO in step S112), the processing of step S104 or less is repeated.
  • the PLC 100 selects the preliminary input data 172 as input data to be used for the control operation (step S114), and executes the control operation using the preliminary input data 172. (Step S116). As described above, if the PLC 100 does not receive the transmitted communication frame by the threshold time Th1 (first threshold time) after the communication frame is transmitted, it is included in the communication frame received before the transmission. The preliminary input data, which is the input data that has been stored, is used for the control calculation. At this time, the preliminary input data 172 is not updated. Then, the processing of step S100 or less is repeated.
  • FIG. 11 is a flowchart showing a processing procedure in the control performance priority mode by the PLC 100 of the control system 1 according to the present embodiment. Each step shown in FIG. 11 is typically realized by the processor 102 of the PLC 100 executing the system program 1102 and the user program 1104 (see FIG. 5).
  • the PLC 100 determines whether or not the task execution cycle has arrived (step S200).
  • the PLC 100 generates and transmits a communication frame including the output data calculated by the previous control operation (step S202). That is, the PLC 100 transmits a communication frame including output data determined by a control operation.
  • the PLC 100 determines whether or not a communication frame that has circled the network has been received (step S204).
  • step S204 If the communication frame that has circled the network is received (YES in step S204), the PLC 100 stores the input data included in the received communication frame as the current cycle input data 170 (step S206), and uses the current cycle input data 170. And execute the control operation (step S208). At the same time, the PLC 100 updates the preliminary input data 172 with the current cycle input data 170 (step S210). Then, the process of step S200 or less is repeated.
  • step S204 determines whether or not the threshold time Th2 has elapsed since the communication frame was transmitted (step S212). If the threshold time Th2 has not elapsed (NO in step S212), the processing of step S204 or less is repeated.
  • the PLC 100 selects the preliminary input data 172 as input data to be used for the control operation (step S214), and executes the control operation using the preliminary input data 172. (Step S216). As described above, if the PLC 100 does not receive the transmitted communication frame by the threshold time Th2 (second threshold time) after the communication frame is transmitted, it is included in the communication frame received before the transmission. The preliminary input data, which is the input data that has been stored, is used for the control operation.
  • the PLC 100 determines whether or not a communication frame that has circled the network has been received by the time the threshold time Th3 elapses (step S218). If the communication frame that has circled the network has been received by the time when the threshold time Th3 elapses (YES in step S218), the PLC 100 updates the preliminary input data 172 with the input data included in the received communication frame (YES in step S218). Step S220). As described above, if the PLC 100 receives the communication frame transmitted by the threshold time Th3 (third threshold time), the PLC 100 updates the preliminary input data 172 with the input data included in the received communication frame. Then, the process of step S200 or less is repeated.
  • step S228 if the communication frame that has circled the network has not been received by the time when the threshold time Th3 elapses (NO in step S218), the preliminary input data 172 is not updated, and the processing of step S100 or less is repeated.
  • FIG. 12 is a time chart showing an operation example of the control system 1 according to the present embodiment.
  • FIG. 12A shows an operation example in the ring configuration.
  • the input data included in the communication frame 30 is the current cycle input data 170. Is stored as, and is used in the control operation 160 of the same task execution cycle.
  • FIG. 12B shows an operation example when the ring configuration is changed to the non-ring configuration.
  • the preliminary input data updated in the previous task execution cycle 172 is used in control operation 160.
  • the input data included in the communication frame 30 received in the same task execution cycle is stored as preliminary input data 172 and is used in the control calculation 160 of the next task execution cycle.
  • FIG. 12C shows an operation example when the non-ring configuration is restored to the ring configuration.
  • the communication frame 30 can make a round between the end of the output process 162 and the start of the input process 164.
  • the input data (current cycle input data 170) received in the communication frame 30 received in the same task execution cycle is in the control operation 160. Will be used.
  • control performance is improved. You can continue to execute control operations with the effect of.
  • the user program 1104 and system setting information 1106 stored in the PLC 100 can be created and set by using the support device 400 that can be connected to the PLC 100.
  • FIG. 13 is a schematic diagram showing a hardware configuration example of the support device 400 of the control system 1 according to the present embodiment.
  • the support device 400 is realized, for example, by using hardware (for example, a general-purpose personal computer) that follows a general-purpose architecture.
  • the support device 400 provides an integrated development environment in which the control system 1 can be set for the PLC 100 and the device 200, and the user program 1104 executed by the PLC 100 can be created in an integrated manner. In the integrated development environment, debugging and simulation may be possible.
  • the support device 400 has, as main hardware components, a processor 402, a main memory 404, an input unit 406, a display unit 408, a storage 410, a communication controller 412, and an optical drive 416. , USB controller 424 and so on. These hardware components are electrically connected via the internal bus 228.
  • the processor 402 is composed of a CPU, a GPU, or the like, and realizes a function as a support device 400 by reading a program stored in the storage 410, expanding it to the main memory 404, and executing the program.
  • the main memory 404 is composed of a volatile storage device such as DRAM or SRAM.
  • the storage 410 is composed of, for example, a non-volatile storage device such as an HDD or SSD.
  • the storage 410 stores an OS 4102 for realizing basic functions, a development program 4104 for realizing an integrated development environment, and the like.
  • the development program 4104 is executed by the processor 402 to provide an integrated development environment.
  • the input unit 406 is composed of a keyboard, a mouse, and the like, and receives user operations.
  • the display unit 408 is composed of a display, various indicators, and the like, and outputs a processing result from the processor 402 and the like.
  • the communication controller 412 exchanges data with an arbitrary information processing device via an arbitrary upper network.
  • the optical drive 416 reads arbitrary data from a storage medium 418 (for example, an optical storage medium such as a DVD) that non-transiently stores a computer-readable program, and writes arbitrary data to the storage medium 418. Can be done.
  • a storage medium 418 for example, an optical storage medium such as a DVD
  • the USB controller 424 exchanges data with any information processing device via a USB connection.
  • the program stored in the storage medium 418 that temporarily stores the computer-readable program may be read and installed in the storage 410 or the like.
  • various programs executed by the support device 400 may be installed by downloading from a server device or the like on the network.
  • the function provided by the support device 400 according to the present embodiment may be realized by using a part of the module provided by the OS 4102.
  • the support device 400 may be removed from the PLC 100 while the control system 1 is in operation.
  • the support device 400 may have a function of determining the above-mentioned threshold times Th1, Th2, Th3, respectively.
  • the threshold time Th1 (first threshold time) is the time for determining the frame lost, and is determined based on the round trip time in the target network.
  • the threshold time Th2 (second threshold time) is determined based on the round trip time in a state where no failure has occurred in the ring configuration. That is, the threshold time Th1 is determined based on the time required for the communication frame transmitted from the field network controller 112 (communication unit) of the PLC 100 to make a round and return to the field network controller 112 (communication unit) in the ring configuration. To.
  • the threshold time Th3 (third threshold time) is determined based on the round trip time in a state where no failure has occurred in the ring configuration. That is, in the threshold time Th3, the communication frame transmitted from the field network controller 112 (communication unit) goes around in a state where any of the cables included in the ring configuration cannot transmit the communication frame, and the field network controller 112 (communication). It is decided based on the time to return to the part).
  • the support device 400 may measure the time required for the communication frame in the network of the control system 1 to make a round, and determine the threshold time Th2 and / or the threshold time Th3 based on the measured time. good.
  • the support device 400 may determine the threshold time Th2 and / or the threshold time Th3 by simulation. For example, the support device 400 has a threshold time Th1 and / or a threshold according to a predetermined calculation formula based on the number of devices 200 connected to the network and the information of the network connection form (network topology). The time Th2 may be determined.
  • the user creates the user program 1104 by using the integrated development environment provided by the support device 400, and also makes various settings related to the control system 1.
  • the support device 400 can estimate the execution time of the user program 1104 by simulation according to the user operation. Then, the support device 400 can also give advice to the user, such as changing the operation mode, based on the simulation result.
  • FIG. 14 is a schematic diagram showing an example of a user interface screen 450 provided by the support device 400 of the control system 1 according to the present embodiment.
  • the user interface screen 450 shows a graph 452 showing the execution time of the user program 1104 calculated in the current setting, and a user in the case where the control performance priority mode is adopted after changing the network configuration.
  • the measured value measured by the PLC 100 may be adopted.
  • the user can grasp in advance how much the execution time (task execution cycle) of the user program 1104 can be shortened.
  • the user refers to message 460, changes the network configuration of the control system 1 from the non-ring configuration to the ring configuration, and then checks the check box 458 to enable the control performance priority mode.
  • the control performance priority mode is enabled, the user may be notified that data synchronization may be lost if any failure occurs in the network.
  • the check box 456 is checked, and it can be seen that the data synchronization priority mode is selected.
  • the operation mode of the PLC 100, the execution time of the user program 1104, and the like may be confirmed and acquired by any method.
  • the support device 400 is connected to the PLC 100, and the operation mode of the PLC 100 (whether the data synchronization priority mode or the control performance priority mode is k) and the execution of the user program 1104 are performed on the support device 400. It may be possible to monitor the time and the like.
  • an HMI Human Machine Interface
  • the control system 1 may be provided in the control system 1 so that the operation mode of the PLC 100 and the execution time of the user program 1104 may be displayed on the HMI.
  • the operation mode of the PLC 100 and the execution time of the user program 1104 can be acquired by the dedicated instruction included in the user program 1104. good.
  • the current operation mode may be referred to by the instruction included in the user program 1104 executed by the PLC 100.
  • FIG. 15 is a diagram showing an example of a ring configuration that can be adopted in the control system 1 according to the present embodiment.
  • FIG. 15A shows an example of a ring configuration using a relay device 300 having three or more ports.
  • the relay device 300 has three or more ports to provide Junction Redundancy.
  • the ring configuration shown in FIG. 15A includes a field network controller 112 (communication unit) of the PLC 100 and a relay device 300 connected to a plurality of devices 200 (slave).
  • FIG. 15B shows an example of a ring configuration using a PLC100 having two or more ports 151 and 152.
  • the PLC100 provides cable redundancy by having two or more ports.
  • the field network controller 112 (communication unit) of the PLC 100 has a plurality of ports connected to different devices 200 (slave).
  • relay device 300 shown in FIG. 15 (A) and the PLC 100 shown in FIG. 15 (B) may be arbitrarily combined to form a ring configuration.
  • the communication control method according to the present embodiment is applicable to any ring configuration, not limited to the configuration example described above.
  • the communication protocol is not limited to EtherCAT, and can be applied to various communication protocols for industrial networks having punctuality.
  • Th1 first threshold time
  • the arithmetic processing unit is If the transmitted communication frame is received by the first threshold time in the first operation mode, the preliminary input data is updated with the input data included in the received communication frame. In the second operation mode, if the transmitted communication frame is received by the third threshold time (Th3) longer than the second threshold time, the input data included in the received communication frame is used as the input data.
  • a control device (100) that updates the preliminary input data [Structure 2] The control device according to configuration 1, wherein the network includes a ring configuration configured such that a communication frame is transmitted in only one direction in each of the cables (21 to 26) connected to the communication slave. [Structure 3] The control device according to configuration 2, wherein the arithmetic processing unit can enable the second operation mode when the network includes the ring configuration. [Structure 4] The second threshold time is determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit in the ring configuration.
  • the third threshold time is the time until the communication frame transmitted from the communication unit makes a round and returns to the communication unit in a state where any of the cables included in the ring configuration cannot transmit the communication frame.
  • the step (S102, S202) for transmitting a communication frame including the output data determined by the control calculation is provided.
  • the step of executing the input process is In the first operation mode, If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission is controlled.
  • the second operation mode If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received.
  • Communication control methods including.
  • the step (S102, S202) of transmitting a communication frame including the output data determined by the control calculation is executed.
  • the step of executing the input process is In the first operation mode, If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission is controlled. Step (S114) used for calculation and If the transmitted communication frame is received by the first threshold time, the step (S110) of updating the preliminary input data with the input data included in the received communication frame is included. In the second operation mode, If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received.
  • a control program including.
  • the control system according to the present embodiment can achieve both shortening of the round trip time obtained by the ring configuration and stabilization of control when some kind of failure occurs in the ring configuration.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Small-Scale Networks (AREA)

Abstract

制御装置は、通信フレームが一巡するように構成されたネットワークに接続される通信部と演算処理部とを含む。演算処理部は、第1の動作モードと第2の動作モードとを選択可能に構成されている。演算処理部は、第1の動作モードにおいて、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新し、第2の動作モードにおいて、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新する。

Description

制御装置、通信制御方法、および制御プログラム
 本発明は、ネットワークに接続可能な制御装置、その制御装置における通信制御方法、およびその制御装置を実現するための制御プログラムに関する。
 例えば、EtherCAT(登録商標)に従うネットワークでは、通信マスタ(以下、単に「マスタ」とも称す。)が送信した通信フレームは、すべての通信スレーブ(以下、単に「スレーブ」とも称す。)を巡回した上で、マスタに戻る。
 通信フレームを巡回させるためのトポロジとして、経路上に、通信フレームを受信および送信するポートを有するスレーブが存在する形態に加えて、経路上に存在するスレーブのポートは、通信フレームの受信および送信の一方のみを行う形態を採用し得る。説明の便宜上、前者を「非リング構成」と称し、後者を「リング構成」とも称す。リング構成においては、スレーブに接続されたケーブルの各々では通信フレームが一方向に伝送されることになる。なお、リング構成と非リング構成との両方を含む態様も存在し得る。
 このようなリング構成に関して、特開2020-167554号公報(特許文献1)は、リングトポロジを含むネットワークにおける不正な経路を容易に知ることが可能なマスタ装置を開示する。
 また、EtherCATに従うネットワークにおいては、マスタから送信された通信フレームが一巡してマスタに戻るまでに要する時間(以下、「ラウンドトリップ時間」とも称す。)を設計上考慮する必要がある。より具体的には、ラウンドトリップ時間が増大することによって、通信マスタと通信スレーブとの間でやり取りされるデータの更新周期が長くなり制御性能が低下し得る。
 ラウンドトリップ時間は、通信スレーブの数が増加するにつれて大きくなるが、リング構成を採用することで、非リング構成を採用した場合よりラウンドトリップ時間の増大を抑制できる。
特開2020-167554号公報
 リング構成は一種の冗長化ネットワークであり、ネットワーク内で何らかの障害が発生すると、非リング構成のネットワークが自動的に再構成されて、通信フレームの伝送は継続される。しかしながら、ネットワーク構成が変化することに伴って、ラウンドトリップ時間はより長くなる方向に変化し得る。
 本発明のある局面の目的は、リング構成によって得られるラウンドトリップ時間の短縮化と、リング構成に何らかの障害が発生した場合の制御の安定化とを両立できる新たな仕組みを提供することである。
 本発明のある実施の形態に従う制御装置は、通信フレームが一巡するように構成されたネットワークに接続される通信部と、通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算、および、当該制御演算により決定された出力データを含む通信フレームの送信を、実行周期毎に繰返し実行する演算処理部とを含む。演算処理部は、通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第1の動作モードと、通信フレームを送信してから第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第2の動作モードとを選択可能に構成されている。演算処理部は、第1の動作モードにおいて、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新し、第2の動作モードにおいて、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新する。
 この構成によれば、第1の動作モードにおいては、第1のしきい時間までに送信した通信フレームを受信できるか否かに基づいて、制御演算に用いる入力データの決定、および、予備入力データの更新を判断する。一方、第2の動作モードにおいては、第2のしきい時間までに送信した通信フレームを受信できるか否かに基づいて、制御演算に用いる入力データを決定するものの、予備入力データの更新については、第2のしきい時間より長い第3のしきい時間までに受信された通信フレームを対象にして行うことができる。このため、第2の動作モードにおいては、第1の動作モードに比較して、通信フレームを送信してから制御演算の実行を開始するまでの時間を短く設定しても、第3のしきい時間までに通信フレームを受信できれば、予備入力データを適切に更新できる。そのため、制御の安定化を図ることができる。
 ネットワークは、通信スレーブに接続されたケーブルの各々において、通信フレームが一方向にのみ伝送されるように構成されたリング構成を含んでいてもよい。演算処理部は、ネットワークがリング構成を含む場合に、第2の動作モードを有効化可能になっていてもよい。これらの構成によれば、リング構成に適した動作モードを提供できる。なお、ネットワークは、デイジーチェーン接続された構成を含んでいてもよい。
 第2のしきい時間は、リング構成において、通信部から送信された通信フレームが一巡して通信部に戻るまでの時間に基づいて決定されてもよい。第3のしきい時間は、リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、通信部から送信された通信フレームが一巡して通信部に戻るまでの時間に基づいて決定されてもよい。この構成によれば、ネットワーク構成の変化を予測して、適切なしきい時間を決定できる。
 リング構成は、通信部および複数の通信スレーブに接続された中継装置を含んでいてもよい。この構成によれば、ジャンクション冗長性(Junction Redundancy)を有するリング構成を実現できる。
 通信部は、それぞれ異なる通信スレーブに接続された複数のポートを有していてもよい。この構成によれば、ケーブル冗長性(Cable Redundancy)を有するリング構成を実現できる。
 第2の動作モードにおける実行周期は、第1の動作モードにおける実行周期より短く設定されてもよい。この構成によれば、制御演算の実行周期の短縮化、および/または、実行可能な演算量の増大化を実現できる。
 演算処理部で実行されるユーザプログラムに含まれる命令により演算処理部の動作モードを参照できるように構成されてもよい。この構成によれば、演算処理部における動作モードに応じて、容易に処理を異ならせることができる。
 本発明の別の実施の形態によれば、通信フレームが一巡するように構成されたネットワークに接続される通信部を含む制御装置で実行される通信制御方法が提供される。通信制御方法は、第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、制御演算により決定された出力データを含む通信フレームを送信するステップとを含む。入力処理を実行するステップは、第1の動作モードにおいて、通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。入力処理を実行するステップは、第2の動作モードにおいて、通信フレームを送信してから第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。
 本発明のさらに別の実施の形態によれば、通信フレームが一巡するように構成されたネットワークに接続される通信部を含むコンピュータで実行される制御プログラムが提供される。制御プログラムはコンピュータに、第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、制御演算により決定された出力データを含む通信フレームを送信するステップとを実行させる。入力処理を実行するステップは、第1の動作モードにおいて、通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。入力処理を実行するステップは、第2の動作モードにおいて、通信フレームを送信してから第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。
 本発明のある実施の形態によれば、リング構成によって得られるラウンドトリップ時間の短縮化と、リング構成に何らかの障害が発生した場合の制御の安定化とを両立できる。
本実施の形態に従う制御システムの一例を示す模式図である。 本実施の形態に従う制御システムのPLCでの処理の一例を示す模式図である。 本実施の形態に従う制御システムのPLCでの処理の別の一例を示す模式図である。 本実施の形態に従う制御システムのPLCでの処理のさらに別の一例を示す模式図である。 本実施の形態に従う制御システムのPLCのハードウェア構成例を示す模式図である。 本実施の形態に従う制御システムのデバイスのハードウェア構成例を示す模式図である。 本実施の形態に従う制御システムの中継装置のハードウェア構成例を示す模式図である。 本実施の形態に従う制御システムにおける通信時間に関する処理を説明するための図である。 本実施の形態に従う制御システムのPLCにおける入力処理の例を説明するための図である。 本実施の形態に従う制御システムのPLCによるデータ同期性優先モードでの処理手順を示すフローチャートである。 本実施の形態に従う制御システムのPLCによる制御性能優先モードでの処理手順を示すフローチャートである。 本実施の形態に従う制御システムの動作例を示すタイムチャートである。 本実施の形態に従う制御システムのサポート装置のハードウェア構成例を示す模式図である。 本実施の形態に従う制御システムのサポート装置が提供するユーザインターフェイス画面の一例を示す模式図である。 本実施の形態に従う制御システムで採用可能なリング構成の一例を示す図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。
 <A.適用例>
 まず、図1~図3を参照して、本発明が適用される場面の一例について説明する。
 図1は、本実施の形態に従う制御システムの一例を示す模式図である。図1(A)~図1(C)に示す制御システム1は、通信マスタ(マスタ)として機能する制御装置の一例であるPLC100と、通信スレーブ(スレーブ)として機能する入出力装置などのデバイス200-1~200-5(以下、「デバイス200」とも総称する。)および中継装置300とを含む。
 本明細書における「リング構成」は、スレーブに接続されたケーブルの各々において、通信フレームが一方向にのみ伝送されるように構成されたネットワークを意味する。言い換えれば、スレーブの各々は、複数のポートを有しており、1つのポートは、通信フレームの送信および受信の一方のみを行う構成が「リング構成」を意味する。
 一方、本明細書における「非リング構成」は、スレーブに接続されたいずれかのケーブルにおいて、通信フレームが両方向に伝送されるように構成されたネットワークを意味する。言い換えれば、スレーブの有するいずれかのポートが、通信フレームの送信および受信の両方を行う構成が「非リング構成」を意味する。
 制御システム1のネットワークに関して、PLC100は、通信フレームの送受信を行うためのポート151を有している。デバイス200-1~200-5の各々は、通信フレームを送受信するための第1ポート251および第2ポート252を有している。基本的には、第1ポート251は、通信フレームが入力されるポート(INポート)であり、第2ポート252は、通信フレームが出力されるポート(OUTポート)である。
 中継装置300は、通信フレームを送受信するための第1ポート351、第2ポート352および第3ポート353を有している。中継装置300は、あるポートで通信フレームを受けると、所定規則に従って決定される別のポートから、当該受信したフレームを送信する。図1に示す例では、所定規則として、第1ポート351→第2ポート352→第3ポート353→第1ポート351→・・・といった循環的に決定されてもよい。
 図1(A)には、リング構成の一例を示している。PLC100のポート151から送信された通信フレームは、ケーブル20、中継装置300の第1ポート351、中継装置300の第2ポート352、ケーブル21、デバイス200-1の第1ポート251、デバイス200-1の第2ポート252、ケーブル22、デバイス200-2の第1ポート251、デバイス200-2の第2ポート252、ケーブル23、デバイス200-3の第1ポート251、デバイス200-3の第2ポート252、ケーブル24、デバイス200-4の第1ポート251、デバイス200-4の第2ポート252、ケーブル25、デバイス200-5の第1ポート251、デバイス200-5の第2ポート252、ケーブル26、中継装置300の第3ポート353、ケーブル20の順で一巡して、PLC100のポート151に戻る。この場合、PLC100のポート151から送信された通信フレームのポートの通過数は14となる。
 一方、図1(B)には、デバイス200-3とデバイス200-4とを接続するケーブル24が何らかの原因で断線した場合を示す。この場合、デバイス200-3の第2ポート252から通信フレームを送信することができないので、デバイス200-3は、第1ポート251から通信フレームを送信する。すなわち、デバイス200-3は、通信フレームを同じ経路で戻すことになる。その後、通信フレームは、ケーブル23、デバイス200-2の第2ポート252、デバイス200-2の第1ポート251、ケーブル22、デバイス200-1の第2ポート252、デバイス200-1の第1ポート251、中継装置300の第2ポート352、中継装置300の第3ポート353、ケーブル26、デバイス200-5の第2ポート252、デバイス200-5の第1ポート251、ケーブル25、デバイス200-4の第2ポート252、ケーブル25、デバイス200-5の第1ポート251、デバイス200-5の第2ポート252、ケーブル26、中継装置300の第3ポート353、ケーブル20の順でPLC100のポート151に戻る。この場合、PLC100のポート151から送信された通信フレームのポートの通過数は22となる。
 図1(C)には、非リング構成の一例を示している。PLC100のポート151から送信された通信フレームは、ケーブル20、中継装置300の第1ポート351、中継装置300の第2ポート352、ケーブル21、デバイス200-1の第1ポート251、デバイス200-1の第2ポート252、ケーブル22、デバイス200-2の第1ポート251、デバイス200-2の第2ポート252、ケーブル23、デバイス200-3の第1ポート251、デバイス200-3の第2ポート252、ケーブル24、デバイス200-4の第1ポート251、ケーブル24、デバイス200-3の第2ポート252、デバイス200-3の第1ポート251、ケーブル23、デバイス200-2の第2ポート252、デバイス200-2の第1ポート251、ケーブル22、デバイス200-1の第2ポート252、デバイス200-1の第1ポート251、ケーブル21、中継装置300の第2ポート352、中継装置300の第1ポート351、ケーブル20の順で一巡して、PLC100のポート151に戻る。この場合、PLC100のポート151から送信された通信フレームのポートの通過数は22となる。
 ラウンドトリップ時間は、ポートの通過時間と、ケーブルの通過時間との合計で定まることになるが、ポートの通過時間が支配的な要因になる。そのため、通信フレームが通過するポートの数が増加するほど、ラウンドトリップ時間は増大する。図1(A)に示すリング構成におけるラウンドトリップ時間Tr1に比較して、図1(B)に示す構成におけるラウンドトリップ時間Tr2(Tr2>Tr1)は長くなる。通過ポート数が同一であるので、図1(B)に示す構成におけるラウンドトリップ時間Tr2は、図1(C)に示す構成におけるラウンドトリップ時間Tr3とほぼ同じになる(Tr2≒Tr3)。
 すなわち、リング構成におけるラウンドトリップ時間を前提にして、システム設計を行うと、リング構成に何らかの障害が発生して非リング構成に変化すると、ラウンドトリップ時間が伸びて、システムが設計通りに動作しない可能性もある。
 そこで、本実施の形態に従う制御システムは、リング構成が非リング構成に変化した場合であっても、制御性能への影響を抑制できる仕組みを提供する。なお、本実施の形態に従う制御システムが提供する通信制御方法は、リング構成が非リング構成に変化した場合のみに適用されるものではなく、様々なネットワーク構成に対して適用可能である。
 先に、システム設計について説明する。図2は、本実施の形態に従う制御システム1のPLC100での処理の一例を示す模式図である。
 図2(A)~図2(C)を参照して、PLC100は、制御演算160と、出力処理162と、入力処理164とからなる一連の処理を周期的に実行する。以下では、一連の処理が実行される周期を「タスク実行周期」とも称す。
 入力処理164は、デバイス200から測定値などの入力データを収集する処理である。制御演算160は、入力処理164により収集された入力データに基づいて、制御対象を制御するための演算を行って、デバイス200への指令値などの出力データを決定する。出力処理162は、制御演算160により決定された出力データを対象のデバイス200へ送信する処理である。このように、PLC100の演算処理部(図5に示すプロセッサ102)は、フィールドネットワークコントローラ112を介して受信した通信フレームに含まれる入力データに基づく制御演算160、および、制御演算160により決定された出力データを含む通信フレームの送信を、タスク実行周期毎に繰返し実行する。
 出力処理162および入力処理164は、通信フレームを用いて実現される。そのため、出力処理162の終了から入力処理164の開始までの時間は、PLC100が通信フレームを送信してから当該通信フレームが戻ってくるまでの時間、すなわちラウンドトリップ時間に依存することになる。
 図2(A)~図2(C)においては、非リング構成を前提とする。図2(A)には、PLC100に接続されるデバイス200の数、および、制御演算160の演算量がいずれも相対的に少ない場合のタイムチャートを示す。図2(B)には、図2(A)に比較して、PLC100に接続されるデバイス200の数が増加した場合のタイムチャートを示す。
 図2(A)と図2(B)とを比較すると、接続されるデバイス200の数が増加することで、出力処理162の終了から入力処理164の開始までの時間、すなわち通信時間Tt1(図2(A)参照)は、通信時間Tt2(図2(B)参照)まで増加していることが分かる。これは、入出力の応答性能の低下を意味する。但し、制御演算160の演算量が相対的に少ないので、タスク実行周期Tc1は、いずれの場合においても維持されている。
 図2(C)には、図2(B)に比較して、制御演算160の演算量が増加した場合のタイムチャートを示す。図2(C)においては、演算量の増加に伴って、制御演算160の処理時間が増加するため、タスク実行周期Tc1より長いタスク実行周期Tc2が必要になっている。すなわち、接続されるデバイス200の数、および、制御演算160の演算量が増大することに伴って、タスク実行周期はΔTcだけ伸びることになる。
 したがって、通信時間を可能な限り短くすることが好ましい。ここで、非リング構成ではなく、リング構成を採用することで、ポートの通過数を低減できるので、ラウンドトリップ時間、すなわち通信時間を短縮できる。
 図3は、本実施の形態に従う制御システム1のPLC100での処理の別の一例を示す模式図である。図3(A)には、図2(B)と同様に、非リング構成を採用した場合のタイムチャートを示し、図3(B)には、リング構成を採用した場合のタイムチャートを示す。
 図3(A)と図3(B)とを比較すると、通信時間Tt2が通信時間Tt3(<通信時間Tt2)まで短縮されており、タスク実行周期Tc1を同一に設定すると、その短縮された通信時間の分が余裕時間166となり、制御演算160としてより多くの演算を実行できる。
 このように、リング構成を採用することで、通信時間を短縮でき、これによって、タスク実行周期の短縮化およびより多くの制御演算の実行といった、制御性能を高めることができる。しかしながら、断線などの障害がネットワークに発生すると、リング構成から非リング構成に変化し、通信時間は長くなる。
 図4は、本実施の形態に従う制御システム1のPLC100での処理のさらに別の一例を示す模式図である。図4(A)には、図3(B)と同様に、リング構成を採用した場合のタイムチャートを示し、図4(B)には、リング構成が非リング構成に変化した場合のタイムチャートを示す。
 図4(A)に示すように、リング構成を採用することで、通信時間Tt3を短縮でき、制御演算160の演算量が相対的に多くても、制御演算160と、出力処理162と、入力処理164とからなる一連の処理をタスク実行周期Tc1で周期的に実行できる。
 一方で、リング構成に断線などの障害が発生すると、非リング構成に変化し、図4(B)に示すように、通信時間Tt4(>通信時間Tt3)は伸びることになる。その結果、制御演算160と、出力処理162と、入力処理164とからなる一連の処理をタスク実行周期Tc1で周期的に実行できなくなる(この状態は、「タスク実行周期オーバ」などとも称される。)。
 このような通信時間が増加する事態を考慮して、非リング構成における通信時間を前提として、図4(C)に示すように、システム設計を行う場合もある。すなわち、図4(C)に示すタイムチャートでは、ある程度の時間余裕を見て、タスク実行周期Tc3が設定されている。但し、図4(C)に示すシステム設計では、ロバストではあるが、リング構成を採用したことによるラウンドトリップ時間の短縮のメリットは活かせていないことになる。
 このような背景技術を考慮して、本実施の形態に従う制御システムにおいては、以下のいずれの設計手法をも採用できる新たな仕組みを提供する。
 (1)図1(C)および図4(C)に示すような非リング構成におけるラウンドトリップ時間を前提としたシステム設計。
 (2)図1(A)および図4(B)に示すようなリング構成におけるラウンドトリップ時間を前提としたタスク実行周期を設定しつつ、図1(B)および図4(C)に示すような非リング構成に変化した場合でも、制御性能への影響を抑制するためのモードを有効化したシステム設計。
 以下、このような仕組みを実現するための構成、処理、機能などについて詳述する。
 <B.ハードウェア構成例>
 次に、本実施の形態に従う制御システム1を構成する各装置のハードウェア構成例について説明する。
 (b1:制御装置(PLC100))
 図5は、本実施の形態に従う制御システム1のPLC100のハードウェア構成例を示す模式図である。図5を参照して、PLC100は、主たるハードウェアコンポーネントとして、プロセッサ102と、メインメモリ104と、ストレージ110と、フィールドネットワークコントローラ112と、ローカルバスコントローラ114とを含む。これらのハードウェアコンポーネントは、内部バス118を介して電気的に接続される。
 プロセッサ102は、制御演算を実行する演算処理部に相当し、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)などで構成される。具体的には、プロセッサ102は、ストレージ110に格納されたプログラムを読出して、メインメモリ104に展開して実行することで、制御対象に応じた制御演算、および、後述するような各種処理を実現する。
 メインメモリ104は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成される。ストレージ110は、例えば、SSD(Solid State Drive)やHDD(Hard Disk Drive)などの不揮発性記憶装置などで構成される。
 ストレージ110には、基本的な機能を実現するためのシステムプログラム1102、制御対象に応じて作成されたユーザプログラム1104、および、後述するような処理を決定するためのシステム設定情報1106などが格納される。システムプログラム1102は、PLC100における基本的な機能を実現するため、制御プログラムの少なくとも一部とみなすことができる。
 フィールドネットワークコントローラ112は、通信部に相当し、通信フレームが一巡するように構成されたネットワークに接続される。より具体的には、フィールドネットワークコントローラ112は、ポート151を有しており、通信フレームの送受信処理を担当する。PLC100のフィールドネットワークコントローラ112は、通信マスタ(マスタ)として機能する。なお、フィールドネットワークコントローラ112は、通信フレームを周期的に送受信するための同期カウンタを有していてもよい。
 ローカルバスコントローラ114は、内部バス118を介して、1または複数の機能ユニット116と電気的に接続される。機能ユニット116は、制御対象との間で各種の信号をやり取りする機能などを含む。機能ユニット116は、例えば、制御対象からのデジタル信号を受取るDI(Digital Input)機能、制御対象に対してデジタル信号を出力するDO(Digital Output)機能、制御対象からのアナログ信号を受取るAI(Analog Input)機能、制御対象に対してアナログ信号を出力するAO(Analog Output)機能のうち1または複数の機能を有している。さらに、機能ユニット116としては、PID(Proportional Integral Derivative)制御やモーション制御といった特殊機能を実装したコントローラを含み得る。
 図5には、プロセッサ102がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。あるいは、PLC100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 さらに、PLC100に表示装置やサポート装置などの機能を統合した構成を採用してもよい。
 (b2:デバイス200)
 図6は、本実施の形態に従う制御システム1のデバイス200のハードウェア構成例を示す模式図である。図6を参照して、デバイス200は、主たるハードウェアコンポーネントとして、制御回路206と、フィールドネットワークコントローラ212と、機能モジュール220とを含む。
 制御回路206は、デバイス200における処理を主体的に実行する演算処理部である。制御回路206は、典型的には、プロセッサ202と、メインメモリ204と、ストレージ210とを含む。プロセッサ202は、CPUやGPUなどで構成される。メインメモリ204は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ210は、例えば、SSDなどの不揮発性記憶装置などで構成される。なお、ストレージ210として、ROM(Read Only Memory)を採用してもよい。
 なお、制御回路206は、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 フィールドネットワークコントローラ212は、第1ポート251および第2ポート252を有しており、通信フレームの送受信処理を担当する。デバイス200のフィールドネットワークコントローラ212は、通信スレーブ(スレーブ)として機能する。なお、フィールドネットワークコントローラ212は、通信フレームを周期的に送受信するための同期カウンタを有していてもよい。
 機能モジュール220は、図5に示す機能ユニット116と同様に、制御対象との間で各種の信号をやり取りする処理などを担当する。
 (b3:中継装置300)
 図7は、本実施の形態に従う制御システム1の中継装置300のハードウェア構成例を示す模式図である。図7を参照して、中継装置300は、主たるハードウェアコンポーネントとして、制御回路306と、フィールドネットワークインターフェイス312とを含む。
 制御回路306は、中継装置300における通信フレームの転送処理を主体的に実行する演算処理部である。制御回路306は、典型的には、プロセッサ302と、メインメモリ304と、ストレージ310とを含む。プロセッサ302は、CPUやGPUなどで構成される。メインメモリ304は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ310は、例えば、SSDなどの不揮発性記憶装置などで構成される。なお、ストレージ310として、ROMを採用してもよい。
 なお、制御回路306は、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 フィールドネットワークインターフェイス312は、第1ポート351、第2ポート352および第3ポート353を有しており、通信フレームの図示しない受信回路および送信回路を含む。
 <C.通信フレームの送受信処理>
 上述したように、リング構成を採用した場合には、断線などの障害により非リング構成に変化し、その結果、ラウンドトリップ時間が伸びる場合がある。また、ネットワークを伝送する通信フレームが破損や消滅することもある。そのため、マスタであるPLC100は、ある通信フレームを送信してから、所定時間内に当該通信フレームが戻ってこなければ、通信フレームが途中で破損や消滅した(以下、「フレームロスト」とも称す。)と判断する。
 したがって、非リング構成を採用している場合には、マスタから送信された通信フレームの挙動としては、(1)通信フレームが所定時間内にマスタに戻る、(2)通信フレームがロストしてマスタへ戻らない、の2種類が想定される。
 一方、リング構成を採用している場合には、マスタから送信された通信フレームの挙動としては、(1)通信フレームが所定時間内にマスタに戻る、(2)非リング構成に変化して、通信フレームが所定時間を超えてマスタに戻る、(3)通信フレームがロストしてマスタへ戻らない、の3種類が想定される。
 図8は、本実施の形態に従う制御システム1における通信時間に関する処理を説明するための図である。図8(A)には非リング構成の例を示し、図8(B)にはリング構成の例を示す。
 図8(A)を参照して、非リング構成を前提としたシステム設計を採用した場合には、リング構成が正常であるか否かにかかわらず、出力処理162の終了から入力処理164の開始までの時間は相対的に長く設定されている。
 図8(B)を参照して、正常なリング構成においては、出力処理162の終了直後にPLC100から送信された通信フレームは、入力処理164の開始までにPLC100に戻る(図8(B)の「正常」)。一方、リング構成に何らかの障害が発生して非リング構成に変化すると、ラウンドトリップ時間が増大し、通信フレームは、入力処理164の開始までにPLC100に戻ることができない(図8(B)の「遅延」)。
 また、通信フレームが途中で破損や消滅すると、通信フレームは、PLC100に戻ってこないことになる(図8(B)の「フレームロスト」)。なお、図8(B)の「遅延」より遅れて通信フレームが戻ってきた場合も、フレームロストと同様の取り扱いとしてもよい。
 このように、図8(A)に示す例では、図8(B)の「遅延」といった概念は存在せず、出力処理162の終了直後にPLC100から送信された通信フレームが入力処理164の開始までにPLC100に戻ってくる場合(図8(A)の「正常」)と、それ以外の場合(図8(A)の「フレームロスト」)とが存在することになる。
 したがって、図8(A)の非リング構成においては、出力処理162の終了タイミングT0を基準として、しきい時間Th1が設定されることになる。一方、図8(B)のリング構成においては、出力処理162の終了タイミングT0を基準として、しきい時間Th2およびしきい時間Th3が設定される。なお、しきい時間Th1およびしきい時間Th3は、通信タイムアウト時間に相当し、しきい時間Th2は、リング構成に何らかの障害が発生したことを判断するためのしきい時間に相当する。
 ここで、しきい時間Th1およびしきい時間Th3は、非リング構造のラウンドトリップ時間に基づいて決定され、しきい時間Th2は、リング構成のラウンドトリップ時間に基づいて決定される。なお、しきい時間Th1およびしきい時間Th3は、同じ値であってもよいし、異なる値であってもよい。
 本実施の形態に従う制御システム1においては、正常、遅延、フレームロストの3種類でそれぞれ処理を異ならせる。
 図9は、本実施の形態に従う制御システム1のPLC100における入力処理164の例を説明するための図である。図9を参照して、PLC100に戻ってきた通信フレームに含まれるデバイス200などからのデータ(以下、入力データ)は、現周期入力データ170および予備入力データ172という、互いに独立した形でPLC100のメインメモリ104に保持される。
 現周期入力データ170は、現在のタスク実行周期で受信された通信フレームに含まれる入力データである。予備入力データ172は、現在のタスク実行周期以外で、最も新しく適切に受信された通信フレームに含まれる入力データである。
 図8(A)および図8(B)に示す「正常」において、制御演算160では、現周期入力データ170が入力データとして用いられる。一方、図8(B)に示す「遅延」、ならびに、図8(A)および図8(B)に示す「フレームロスト」において、制御演算160では、予備入力データ172が入力データとして用いられる。すなわち、「遅延」および「フレームロスト」では、現在のタスク実行周期の通信フレームを利用できないので、それ以前に受信されていた通信フレームを利用して、制御演算160が実行される。
 「正常」であれば、現在のタスク実行周期で受信された通信フレームに含まれる入力データは、現周期入力データ170として保持されるとともに、予備入力データ172としても保持される。すなわち、「正常」であれば、現周期入力データ170および予備入力データ172は、同一の入力データとなる。
 一方、「フレームロスト」であれば、現在のタスク実行周期で通信フレームを受信できないので現周期入力データ170および予備入力データ172はいずれも更新されず、そのままとなる。
 これに対して、「遅延」であれば、現在のタスク実行周期で通信フレームは受信できないので、現周期入力データ170は更新されないが、通信フレーム自体は受信しているので、予備入力データ172として保持することはできる。そのため、「遅延」であれば、受信された通信フレームに含まれる入力データは、制御演算160の実行後に、予備入力データ172として保持される。
 以上説明したように、リング構成を採用できる制御システムにおいては、システム設計の1つとして、リング構成が非リング構成に変化してラウンドトリップ時間が伸びた場合(最悪値)を想定した設計が可能である(図1(C)および図4(C)など参照)。この場合には、図8(B)に示す「遅延」を考慮することなく、「正常」と「フレームロスト」とを考慮すればよい。このようなシステム設計においては、フレームロストが発生しない限り、各タスク実行周期で受信された通信フレームに含まれる入力データを用いて入力処理164を実行できる。そのため、入力データが取得されたタイミングと、入力処理164の実行タイミングとの間に時間的なズレは発生しない。このような利点に着目して、この場合のPLC100の動作モードを「データ同期性優先モード」と称す。
 データ同期性優先モードにおいては、PLC100は、通信フレームを送信してからしきい時間Th1(第1のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ172に基づいて制御演算160を実行する。予備入力データ172に関して、PLC100は、しきい時間Th1までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。
 一方、リング構成で得られるラウンドトリップ時間を前提としてシステム設計することもできる。この場合には、図8(B)に示す「遅延」を考慮する必要がある。リング構成が非リング構成に変化した場合には、入力処理164に用いられる入力データは、1つ前のタスク実行周期で受信された通信フレームに含まれるものとなる。すなわち、リング構成が非リング構成に変化しても、入力データが取得されたタイミングと入力処理164の実行タイミングとの間の時間的なズレは、タスク実行周期の1周期分だけに抑制できる。このとき、タスク実行周期自体を短縮できるので、入出力の応答性能や制御演算160の演算量の観点からは、制御性能を向上できる。このような利点に着目して、この場合のPLC100の動作モードを「制御性能優先モード」と称す。
 制御性能優先モードにおいては、PLC100は、通信フレームを送信してからしきい時間Th2(第2のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ172に基づいて制御演算160を実行する。予備入力データ172に関して、PLC100は、しきい時間Th2より長いしきい時間Th3(第3のしきい時間)までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。
 上述したように、制御性能優先モードにおける実行周期は、データ同期性優先モードにおける実行周期より短く設定することもできる。なお、PLC100では、ネットワークがリング構成を含む場合に、制御性能優先モードを有効化するようにしてもよい。
 <D.処理手順>
 次に、上述したデータ同期性優先モードおよび制御性能優先モードのそれぞれについてのPLC100における処理手順について説明する。PLC100は、データ同期性優先モードおよび制御性能優先モードのうち選択された動作モードに従って、後述するような入力処理を含む処理を周期的に実行する。
 (d1:データ同期性優先モード)
 図10は、本実施の形態に従う制御システム1のPLC100によるデータ同期性優先モードでの処理手順を示すフローチャートである。図10に示す各ステップは、典型的には、PLC100のプロセッサ102がシステムプログラム1102およびユーザプログラム1104(図5参照)を実行することで実現される。
 図10を参照して、PLC100は、タスク実行周期が到来したか否かを判断する(ステップS100)。タスク実行周期が到来すれば(ステップS100においてYES)、PLC100は、前回の制御演算によって算出された出力データを含む通信フレームを生成および送信する(ステップS102)。すなわち、PLC100は、制御演算により決定された出力データを含む通信フレームを送信する。
 その後、PLC100は、ネットワークを一巡した通信フレームを受信したか否かを判断する(ステップS104)。
 ネットワークを一巡した通信フレームを受信すれば(ステップS104においてYES)、PLC100は、受信した通信フレームに含まれる入力データを現周期入力データ170として格納し(ステップS106)、現周期入力データ170を用いて制御演算を実行する(ステップS108)。併せて、PLC100は、現周期入力データ170で予備入力データ172を更新する(ステップS110)。このように、PLC100は、しきい時間Th1(第1のしきい時間)までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。そして、ステップS100以下の処理が繰返される。
 一方、ネットワークを一巡した通信フレームを受信していなければ(ステップS104においてNO)、PLC100は、通信フレームを送信してから、しきい時間Th1が経過したか否かを判断する(ステップS112)。しきい時間Th1が経過していなければ(ステップS112においてNO)、ステップS104以下の処理が繰返される。
 しきい時間Th1が経過していれば(ステップS112においてYES)、PLC100は、予備入力データ172を制御演算に用いる入力データとして選択し(ステップS114)、予備入力データ172を用いて制御演算を実行する(ステップS116)。このように、PLC100は、通信フレームを送信してからしきい時間Th1(第1のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いる。このとき、予備入力データ172の更新は行われない。そして、ステップS100以下の処理が繰返される。
 (d2:制御性能優先モード)
 図11は、本実施の形態に従う制御システム1のPLC100による制御性能優先モードでの処理手順を示すフローチャートである。図11に示す各ステップは、典型的には、PLC100のプロセッサ102がシステムプログラム1102およびユーザプログラム1104(図5参照)を実行することで実現される。
 図11を参照して、PLC100は、タスク実行周期が到来したか否かを判断する(ステップS200)。タスク実行周期が到来すれば(ステップS200においてYES)、PLC100は、前回の制御演算によって算出された出力データを含む通信フレームを生成および送信する(ステップS202)。すなわち、PLC100は、制御演算により決定された出力データを含む通信フレームを送信する。
 その後、PLC100は、ネットワークを一巡した通信フレームを受信したか否かを判断する(ステップS204)。
 ネットワークを一巡した通信フレームを受信すれば(ステップS204においてYES)、PLC100は、受信した通信フレームに含まれる入力データを現周期入力データ170として格納し(ステップS206)、現周期入力データ170を用いて制御演算を実行する(ステップS208)。併せて、PLC100は、現周期入力データ170で予備入力データ172を更新する(ステップS210)。そして、ステップS200以下の処理が繰返される。
 一方、ネットワークを一巡した通信フレームを受信していなければ(ステップS204においてNO)、PLC100は、通信フレームを送信してから、しきい時間Th2が経過したか否かを判断する(ステップS212)。しきい時間Th2が経過していなければ(ステップS212においてNO)、ステップS204以下の処理が繰返される。
 しきい時間Th2が経過していれば(ステップS212においてYES)、PLC100は、予備入力データ172を制御演算に用いる入力データとして選択し(ステップS214)、予備入力データ172を用いて制御演算を実行する(ステップS216)。このように、PLC100は、通信フレームを送信してからしきい時間Th2(第2のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いる。
 さらに、PLC100は、しきい時間Th3が経過するまでに、ネットワークを一巡した通信フレームを受信したか否かを判断する(ステップS218)。しきい時間Th3が経過するまでに、ネットワークを一巡した通信フレームを受信していれば(ステップS218においてYES)、PLC100は、受信した通信フレームに含まれる入力データで予備入力データ172を更新する(ステップS220)。このように、PLC100は、しきい時間Th3(第3のしきい時間)までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。そして、ステップS200以下の処理が繰返される。
 一方、しきい時間Th3が経過するまでに、ネットワークを一巡した通信フレームを受信していなければ(ステップS218においてNO)、予備入力データ172の更新は行われず、ステップS100以下の処理が繰返される。
 <E.動作例>
 次に、本実施の形態に従う制御システム1における動作例について説明する。
 図12は、本実施の形態に従う制御システム1の動作例を示すタイムチャートである。
 図12(A)には、リング構成における動作例を示す。図12(A)に示す動作例においては、出力処理162の終了から入力処理164の開始までの間に、通信フレーム30が一巡するので、通信フレーム30に含まれる入力データが現周期入力データ170として格納され、同じタスク実行周期の制御演算160において用いられる。
 一方、図12(B)には、リング構成が非リング構成に変化している場合の動作例を示す。図12(B)に示す動作例においては、出力処理162の終了から入力処理164の開始までの間に、通信フレーム30が一巡できないので、1つ前のタスク実行周期において更新された予備入力データ172が制御演算160において用いられる。なお、同じタスク実行周期に受信された通信フレーム30に含まれる入力データは、予備入力データ172として格納され、次のタスク実行周期の制御演算160において用いられる。
 図12(C)には、非リング構成からリング構成に復帰した場合の動作例を示す。非リング構成からリング構成に復帰すると、出力処理162の終了から入力処理164の開始までの間に、通信フレーム30は一巡できるようになる。それに伴って、1つ前のタスク実行周期において更新された予備入力データ172ではなく、同じタスク実行周期において受信された通信フレーム30に含まれる入力データ(現周期入力データ170)が制御演算160において用いられるようになる。
 このように、本実施の形態に従う制御システム1においては、制御演算の実行中にリング構成が非リング構成に変化しても、あるいは、非リング構成がリング構成に変化したとしても、制御性能への影響を最小限にして、制御演算の実行を継続できる。
 <F.システム設計およびユーザ支援>
 次に、本実施の形態に従う制御システム1におけるシステム設計を行うための構成および処理などについて説明する。
 (f1:サポート装置)
 PLC100に格納されるユーザプログラム1104およびシステム設定情報1106は、PLC100に接続可能なサポート装置400を用いて作成および設定可能である。
 図13は、本実施の形態に従う制御システム1のサポート装置400のハードウェア構成例を示す模式図である。図13を参照して、サポート装置400は、一例として、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコン)を用いて実現される。
 サポート装置400は、制御システム1のPLC100およびデバイス200に対する設定、ならびに、PLC100で実行されるユーザプログラム1104の作成が統合的に可能な統合開発環境を提供する。統合開発環境においては、デバッグやシミュレーションなどが可能であってもよい。
 図13を参照して、サポート装置400は、主たるハードウェアコンポーネントとして、プロセッサ402と、メインメモリ404と、入力部406と、表示部408と、ストレージ410と、通信コントローラ412と、光学ドライブ416と、USBコントローラ424とを含む。これらのハードウェアコンポーネントは、内部バス228を介して電気的に接続される。
 プロセッサ402は、CPUやGPUなどで構成され、ストレージ410に格納されたプログラムを読出して、メインメモリ404に展開して実行することで、サポート装置400としての機能を実現する。
 メインメモリ404は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ410は、例えば、HDDやSSDなどの不揮発性記憶装置などで構成される。
 ストレージ410には、基本的な機能を実現するためのOS4102、および、統合開発環境を実現するための開発プログラム4104などが格納される。開発プログラム4104は、プロセッサ402により実行されることで、統合開発環境を提供する。
 入力部406は、キーボードやマウスなどで構成され、ユーザ操作を受け付ける。
 表示部408は、ディスプレイや各種インジケータなどで構成され、プロセッサ402からの処理結果などを出力する。
 通信コントローラ412は、任意の上位ネットワークを介して、任意の情報処理装置との間でデータをやり取りする。
 光学ドライブ416は、コンピュータ読取可能なプログラムを非一過的に格納する記憶媒体418(例えば、DVDなどの光学記憶媒体)から任意のデータを読み取り、および、任意のデータを記憶媒体418に書き込むことができる。
 USBコントローラ424は、USB接続を介して、任意の情報処理装置との間のデータをやり取りする。
 コンピュータ読取可能なプログラムを非一過的に格納する記憶媒体418から、その中に格納されたプログラムが読み取られてストレージ410などにインストールされてもよい。あるいは、サポート装置400で実行される各種プログラムは、ネットワーク上のサーバ装置などからダウンロードする形でインストールするようにしてもよい。また、本実施の形態に係るサポート装置400が提供する機能は、OS4102が提供するモジュールの一部を利用する形で実現される場合もある。
 なお、制御システム1の稼動中において、サポート装置400は、PLC100から取り外されていてもよい。
 (f2:しきい時間)
 サポート装置400は、上述したしきい時間Th1,Th2,Th3をそれぞれ決定する機能を有していてもよい。
 しきい時間Th1(第1のしきい時間)は、フレームロストを判定するための時間であり、対象のネットワークにおけるラウンドトリップ時間に基づいて決定される。
 しきい時間Th2(第2のしきい時間)は、リング構成に何らの障害も発生していない状態のラウンドトリップ時間に基づいて決定される。すなわち、しきい時間Th1は、リング構成において、PLC100のフィールドネットワークコントローラ112(通信部)から送信された通信フレームが一巡してフィールドネットワークコントローラ112(通信部)に戻るまでの時間に基づいて決定される。
 しきい時間Th3(第3のしきい時間)は、リング構成に何らの障害も発生していない状態のラウンドトリップ時間に基づいて決定される。すなわち、しきい時間Th3は、リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、フィールドネットワークコントローラ112(通信部)から送信された通信フレームが一巡してフィールドネットワークコントローラ112(通信部)に戻るまでの時間に基づいて決定される。
 例えば、サポート装置400は、制御システム1のネットワークにおける通信フレームが一巡するのに要する時間を測定し、測定された時間に基づいて、しきい時間Th2および/またはしきい時間Th3を決定してもよい。
 あるいは、サポート装置400は、シミュレーションによって、しきい時間Th2および/またはしきい時間Th3を決定してもよい。例えば、サポート装置400は、ネットワークに接続されるデバイス200の数、および、ネットワークの接続形態(ネットワークトポロジー)の情報に基づいて、予め定められた算出式に従って、しきい時間Th1および/またはしきい時間Th2を決定してもよい。
 (f3:ユーザインターフェイス画面)
 ユーザは、サポート装置400が提供する統合開発環境を利用して、ユーザプログラム1104を作成するとともに、制御システム1に係る各種設定も行う。このとき、サポート装置400は、ユーザ操作に応じて、ユーザプログラム1104の実行時間などをシミュレーションにより推定することができる。その上で、サポート装置400は、シミュレーション結果に基づいて、動作モードの変更などをユーザへアドバイスすることもできる。
 図14は、本実施の形態に従う制御システム1のサポート装置400が提供するユーザインターフェイス画面450の一例を示す模式図である。図14を参照して、ユーザインターフェイス画面450は、現在の設定において算出されたユーザプログラム1104の実行時間を示すグラフ452と、ネットワーク構成を変更した上で、制御性能優先モードを採用した場合におけるユーザプログラム1104の実行時間を示すグラフ454とを含む。なお、グラフ452に示される実行時間としては、PLC100で測定された計測値を採用してもよい。
 ユーザは、グラフ452とグラフ454とを比較することで、ユーザプログラム1104の実行時間(タスク実行周期)をどの程度短縮できるのかを事前に把握できる。
 図14に示すユーザインターフェイス画面450の例においては、シミュレーション結果に基づいて、「リング構成に変更して制御性能優先モードを選択することで、タスク実行周期を2msから1msに短縮できます」といったメッセージ460が表示されている。
 ユーザは、メッセージ460を参照して、制御システム1のネットワーク構成を非リング構成からリング構成に変更した上で、チェックボックス458をチェックすることで、制御性能優先モードが有効化される。制御性能優先モードが有効化された場合には、ネットワーク内で何らかの障害が発生すると、データの同期性が失われる可能性がある旨をユーザへ通知するようにしてもよい。
 なお、図14に示す例では、チェックボックス456がチェックされており、データ同期性優先モードが選択されていることが分かる。
 (f4:動作モードの確認・取得)
 PLC100の動作モードおよびユーザプログラム1104の実行時間などは、任意の方法で確認および取得できるようにしてもよい。
 典型的には、サポート装置400をPLC100に接続し、サポート装置400上で、PLC100の動作モード(データ同期性優先モードおよび制御性能優先モードのいずれkであるか)、ならびに、ユーザプログラム1104の実行時間などをモニターできるようにしてもよい。
 また、制御システム1にHMI(Human Machine Interface)を設け、PLC100の動作モード、およびに、ユーザプログラム1104の実行時間などを、HMI上に表示するようにしてもよい。
 さらに、PLC100が保持するシステム変数あるいは特殊イベントなどを利用することで、ユーザプログラム1104に含まれる専用命令によって、PLC100の動作モード、およびに、ユーザプログラム1104の実行時間などを取得できるようにしてもよい。このように、PLC100で実行されるユーザプログラム1104に含まれる命令により現在の動作モードを参照できるように構成されてもよい。例えば、PLC100の動作モードに応じて、入力処理を異ならせるようなユーザプログラム1104を作成することもできる。
 <G.リング構成のバリエーション>
 上述の説明では、中継装置300を用いたリング構成の例について説明したが、これに限らず他の構成を採用してもよい。
 図15は、本実施の形態に従う制御システム1で採用可能なリング構成の一例を示す図である。
 図15(A)には、3つ以上のポートを有する中継装置300を用いたリング構成の例を示す。中継装置300は、ポートを3つ以上有することで、ジャンクション冗長性(Junction Redundancy)を提供する。図15(A)に示すリング構成においては、PLC100のフィールドネットワークコントローラ112(通信部)および複数のデバイス200(スレーブ)に接続された中継装置300を含む。
 図15(B)には、2つ以上のポート151,152を有するPLC100を用いたリング構成の例を示す。PLC100は、ポートを2つ以上有することで、ケーブル冗長性(Cable Redundancy)を提供する。図15(B)に示すリング構成においては、PLC100のフィールドネットワークコントローラ112(通信部)は、それぞれ異なるデバイス200(スレーブ)に接続された複数のポートを有している。
 また、図15(A)に示す中継装置300、および、図15(B)に示すPLC100を任意に組み合わせてリング構成を構成してもよい。
 本実施の形態に従う通信制御方法は、上述した構成例に限らず任意のリング構成に対して適用可能である。また、通信プロトコルとしても、EtherCATに限らず、定時性を有する様々な産業用ネットワーク用の通信プロトコルに適用可能である。
 <H.付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
 通信フレーム(30)が一巡するように構成されたネットワークに接続される通信部(112)と、
 前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算(160)、および、当該制御演算により決定された出力データを含む通信フレームの送信(164)を、実行周期毎に繰返し実行する演算処理部(102)とを備え、
 前記演算処理部は、
  通信フレームを送信してから第1のしきい時間(Th1)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ(172)に基づいて制御演算を実行する第1の動作モードと、
  通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間(Th2)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ(172)に基づいて制御演算を実行する第2の動作モードとを選択可能に構成されており、
 前記演算処理部は、
  前記第1の動作モードにおいて、前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新し、
  前記第2の動作モードにおいて、前記第2のしきい時間より長い第3のしきい時間(Th3)までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新する、制御装置(100)。
[構成2]
 前記ネットワークは、通信スレーブに接続されたケーブル(21~26)の各々において、通信フレームが一方向にのみ伝送されるように構成されたリング構成を含む、構成1に記載の制御装置。
[構成3]
 前記演算処理部は、前記ネットワークが前記リング構成を含む場合に、前記第2の動作モードを有効化可能になっている、構成2に記載の制御装置。
[構成4]
 前記第2のしきい時間は、前記リング構成において、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定され、
 前記第3のしきい時間は、前記リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定される、構成2または3に記載の制御装置。
[構成5]
 前記リング構成は、前記通信部および複数の通信スレーブ(200)に接続された中継装置(300)を含む、構成2~4のいずれか1項に記載の制御装置。
[構成6]
 前記通信部は、それぞれ異なる通信スレーブに接続された複数のポート(151,152)を有している、構成2~4のいずれか1項に記載の制御装置。
[構成7]
 前記第2の動作モードにおける実行周期(Tc1)は、前記第1の動作モードにおける実行周期(Tc2)より短く設定される、構成1に記載の制御装置。
[構成8]
 前記演算処理部で実行されるユーザプログラム(1104)に含まれる命令により前記演算処理部の動作モードを参照できるように構成される、構成1~7のいずれか1項に記載の制御装置。
[構成9]
 通信フレームが一巡するように構成されたネットワークに接続される通信部(112)を含む制御装置(100)で実行される通信制御方法であって、
 第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップ(S104,S106,S110,S114;S204,S206,S210,S212,S214,S218,S220)と、
 前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップ(S108,S116;S208,S216)と、
 前記制御演算により決定された出力データを含む通信フレームを送信するステップ(S102,S202)とを備え、
 前記入力処理を実行するステップは、
  前記第1の動作モードにおいて、
   通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S114)と、
   前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S110)とを含み、
  前記第2の動作モードにおいて、
   通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S214)と、
   前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S220)とを含む、通信制御方法。
[構成10]
 通信フレームが一巡するように構成されたネットワークに接続される通信部(112)を含むコンピュータ(100)で実行される制御プログラム(1102)であって、前記制御プログラムは前記コンピュータに、
 第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップ(S104,S106,S110,S114;S204,S206,S210,S212,S214,S218,S220)と、
 前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップ(S108,S116;S208,S216)と、
 前記制御演算により決定された出力データを含む通信フレームを送信するステップ(S102,S202)とを実行させ、
 前記入力処理を実行するステップは、
  前記第1の動作モードにおいて、
   通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S114)と、
   前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S110)とを含み、
  前記第2の動作モードにおいて、
   通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S214)と、
   前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S220)とを含む、制御プログラム。
 <I.利点>
 本実施の形態に係る制御システムは、リング構成によって得られるラウンドトリップ時間の短縮化と、リング構成に何らかの障害が発生した場合の制御の安定化とを両立できる。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 1 制御システム、20,21,22,23,24,25,26 ケーブル、30 通信フレーム、100 PLC、102,202,302,402 プロセッサ、104,204,304,404 メインメモリ、110,210,310,410 ストレージ、112,212 フィールドネットワークコントローラ、114 ローカルバスコントローラ、116 機能ユニット、118,228 内部バス、151,152 ポート、160 制御演算、162 出力処理、164 入力処理、166 余裕時間、170 現周期入力データ、172 予備入力データ、200 デバイス、206,306 制御回路、220 機能モジュール、251,351 第1ポート、252,352 第2ポート、300 中継装置、312 フィールドネットワークインターフェイス、353 第3ポート、400 サポート装置、406 入力部、408 表示部、412 通信コントローラ、416 光学ドライブ、418 記憶媒体、424 USBコントローラ、450 ユーザインターフェイス画面、452,454 グラフ、456,458 チェックボックス、460 メッセージ、1102 システムプログラム、1104 ユーザプログラム、1106 システム設定情報、4102 OS、4104 開発プログラム、T0 終了タイミング、Tc1,Tc2,Tc3 タスク実行周期、Th1,Th2,Th3 しきい時間、Tr1,Tr2,Tr3 ラウンドトリップ時間、Tt1,Tt2,Tt3,Tt4 通信時間。

Claims (10)

  1.  通信フレームが一巡するように構成されたネットワークに接続される通信部と、
     前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算、および、当該制御演算により決定された出力データを含む通信フレームの送信を、実行周期毎に繰返し実行する演算処理部とを備え、
     前記演算処理部は、
      通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第1の動作モードと、
      通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第2の動作モードとを選択可能に構成されており、
     前記演算処理部は、
      前記第1の動作モードにおいて、前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新し、
      前記第2の動作モードにおいて、前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新する、制御装置。
  2.  前記ネットワークは、通信スレーブに接続されたケーブルの各々において、通信フレームが一方向にのみ伝送されるように構成されたリング構成を含む、請求項1に記載の制御装置。
  3.  前記演算処理部は、前記ネットワークが前記リング構成を含む場合に、前記第2の動作モードを有効化可能になっている、請求項2に記載の制御装置。
  4.  前記第2のしきい時間は、前記リング構成において、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定され、
     前記第3のしきい時間は、前記リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定される、請求項2または3に記載の制御装置。
  5.  前記リング構成は、前記通信部および複数の通信スレーブに接続された中継装置を含む、請求項2~4のいずれか1項に記載の制御装置。
  6.  前記通信部は、それぞれ異なる通信スレーブに接続された複数のポートを有している、請求項2~4のいずれか1項に記載の制御装置。
  7.  前記第2の動作モードにおける実行周期は、前記第1の動作モードにおける実行周期より短く設定される、請求項1に記載の制御装置。
  8.  前記演算処理部で実行されるユーザプログラムに含まれる命令により前記演算処理部の動作モードを参照できるように構成される、請求項1~7のいずれか1項に記載の制御装置。
  9.  通信フレームが一巡するように構成されたネットワークに接続される通信部を含む制御装置で実行される通信制御方法であって、
     第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、
     前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、
     前記制御演算により決定された出力データを含む通信フレームを送信するステップとを備え、
     前記入力処理を実行するステップは、
      前記第1の動作モードにおいて、
       通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
       前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含み、
      前記第2の動作モードにおいて、
       通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
       前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含む、通信制御方法。
  10.  通信フレームが一巡するように構成されたネットワークに接続される通信部を含むコンピュータで実行される制御プログラムであって、前記制御プログラムは前記コンピュータに、
     第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、
     前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、
     前記制御演算により決定された出力データを含む通信フレームを送信するステップとを実行させ、
     前記入力処理を実行するステップは、
      前記第1の動作モードにおいて、
       通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
       前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含み、
      前記第2の動作モードにおいて、
       通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
       前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含む、制御プログラム。
PCT/JP2021/008911 2020-11-24 2021-03-08 制御装置、通信制御方法、および制御プログラム WO2022113383A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-194427 2020-11-24
JP2020194427A JP2022083142A (ja) 2020-11-24 2020-11-24 制御装置、通信制御方法、および制御プログラム

Publications (1)

Publication Number Publication Date
WO2022113383A1 true WO2022113383A1 (ja) 2022-06-02

Family

ID=81754138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/008911 WO2022113383A1 (ja) 2020-11-24 2021-03-08 制御装置、通信制御方法、および制御プログラム

Country Status (2)

Country Link
JP (1) JP2022083142A (ja)
WO (1) WO2022113383A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0480149U (ja) * 1990-11-23 1992-07-13
JPH05219081A (ja) * 1991-10-04 1993-08-27 Internatl Business Mach Corp <Ibm> 2つのクラスのトラヒックの送信制御方法および装置
WO2015133175A1 (ja) * 2014-03-04 2015-09-11 オムロン株式会社 制御システム、制御装置および制御方法
JP2015210752A (ja) * 2014-04-30 2015-11-24 パナソニック デバイスSunx株式会社 プログラマブルコントローラ及び制御プログラム
WO2019087849A1 (ja) * 2017-10-31 2019-05-09 村田機械株式会社 通信システム、被制御機器、及び、通信システムの制御方法
JP2020167554A (ja) * 2019-03-29 2020-10-08 オムロン株式会社 マスタ装置、演算処理装置、プログラマブル・ロジック・コントローラ、ネットワーク、及び情報処理方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0480149U (ja) * 1990-11-23 1992-07-13
JPH05219081A (ja) * 1991-10-04 1993-08-27 Internatl Business Mach Corp <Ibm> 2つのクラスのトラヒックの送信制御方法および装置
WO2015133175A1 (ja) * 2014-03-04 2015-09-11 オムロン株式会社 制御システム、制御装置および制御方法
JP2015210752A (ja) * 2014-04-30 2015-11-24 パナソニック デバイスSunx株式会社 プログラマブルコントローラ及び制御プログラム
WO2019087849A1 (ja) * 2017-10-31 2019-05-09 村田機械株式会社 通信システム、被制御機器、及び、通信システムの制御方法
JP2020167554A (ja) * 2019-03-29 2020-10-08 オムロン株式会社 マスタ装置、演算処理装置、プログラマブル・ロジック・コントローラ、ネットワーク、及び情報処理方法

Also Published As

Publication number Publication date
JP2022083142A (ja) 2022-06-03

Similar Documents

Publication Publication Date Title
US8521332B2 (en) Actuator for HVAC systems and method for operating the actuator
JP6897494B2 (ja) 制御システム、制御システムの通信制御方法、および中継装置
US10429813B2 (en) Communication system, communication device, and communication program
US8977534B2 (en) Controller support apparatus, controller support program executed on the apparatus, storage medium storing the program, and method of estimating execution time of control program
JP6600518B2 (ja) バスシステム
JP6747525B2 (ja) セーフティシステムおよびセーフティコントローラ
CN108376111B (zh) 信息处理装置、信息处理方法和计算机可读取的存储介质
US10908583B2 (en) Safety control system and safety control unit
EP2533114B1 (en) Controller support device, controller support program to be executed in said device, recording medium storing said program, and method for estimating execution duration of control program
WO2007074905A1 (ja) ネットワーク機器システム
WO2022113383A1 (ja) 制御装置、通信制御方法、および制御プログラム
WO2020184035A1 (ja) 制御システム、サポート装置およびサポート装置用のプログラム
US10715396B2 (en) Support apparatus, non-transitory computer readable recording medium and setting method
JP6196505B2 (ja) クラウド制御システム、及びその制御プログラムの実行方法
JP6149393B2 (ja) 通信カプラ、情報処理装置、制御方法およびプログラム
US10627784B2 (en) Control system and control device
CN114245978B (zh) 主机装置、运算处理装置、控制器、网络系统以及方法
WO2023248548A1 (ja) 制御システム、中継装置および通信方法
WO2023248547A1 (ja) 制御システム、中継装置および通信方法
WO2022113384A1 (ja) 制御装置、通信制御方法、および制御プログラム
CN114443545B (zh) 一种接口拓展方法、装置、管理系统和相关设备
JP6915583B2 (ja) セーフティ制御システムおよびセーフティ制御システムにおける制御方法
JP6321393B2 (ja) マスタスレーブ相互間中継装置およびその中継方法
JP2023031106A (ja) 通信システム、通信制御方法および通信制御プログラム
KR20220086354A (ko) 차량 및 그 제어 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21897363

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21897363

Country of ref document: EP

Kind code of ref document: A1