Migration destination control device, control migration method, and control migration program
Patent Information
- Application Number
- JP2024560292
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-03-06
- Estimated Expiration
- 2043-03-24
AI Technical Summary
Existing techniques for transferring control of production equipment fail to synchronize the processing states of destination and source control devices efficiently, leading to incomplete synchronization when data transfer time exceeds the arithmetic processing cycle, resulting in production disruptions.
A control transfer system that includes an initial synchronization unit to acquire and transfer information about the source control device's arithmetic processing, allowing the destination control device to execute arithmetic processing based on this information, ensuring synchronization even if data transfer time exceeds the processing cycle.
Enables seamless replacement of control devices without stopping production equipment by synchronizing the arithmetic processing states of source and destination control devices, ensuring continuous operation.
Abstract
Description
Control device of transfer destination, control transfer method, and control transfer program
[0001] The present disclosure relates to a technique for transferring control of a control target.
[0002] Production equipment may be controlled using a control system in which a control device that performs periodic calculation processing and an input / output device that performs input / output control for a control object are connected via a network. Specific examples of the control object include sensors or actuators within the production equipment. Input / output control by the input / output device involves control of the output of measured values from the control object, or the input of the calculation results of the control device to the control object.
[0003] For purposes such as replacement or inspection, a control device in operation may be replaced with another control device. In this case, it is desirable to be able to replace the control device without stopping the production equipment that is the controlled object in order to prevent a decrease in productivity. To achieve this, it is necessary to synchronize and transfer the arithmetic processing state of the other control device to the arithmetic processing state of the control device that is the source of the transfer while not affecting the controlled object.
[0004] Related prior art includes recovery techniques for multiplexed systems. Patent Document 1 describes a recovery technique for multiplexed systems that matches the internal states of tasks in the active and standby systems. The active system corresponds to the migration source. The standby system corresponds to the migration destination. Patent Document 1 describes selecting either a first means or a second means. The first means is a means for transferring differential data of the internal state from the active system to the standby system and reflecting it in the standby system. The second means is a means for transferring an input log from the active system to the standby system, and the standby system replays the processing of the active system based on the input log. In this way, Patent Document 1 aims to shorten the recovery time of multiplexed systems.
[0005] Japanese Patent Application Laid-Open No. 2016-206865
[0006] In the technology of Patent Document 1, the time required to transfer data for state synchronization from the active system to the standby system may always be longer than the cycle in which the task is executed. The data for state synchronization is differential data or an input log. In this case, the processing in the standby system cannot keep up with the processing in the active system. As a result, synchronization of the internal states of the tasks in the active and standby systems is never completed. The present disclosure aims to enable the replacement of a control device without stopping the controlled object, even when the time required to transfer data for state synchronization is longer than the cycle in which the arithmetic processing is executed.
[0007] The destination control device according to the present disclosure is a destination control device to which control of a control object is transferred from a source control device that periodically executes calculation processing to control the control object, and comprises: an initial synchronization unit that acquires information relating to the calculation processing of the source control device in a specific period as initial synchronization information; a calculation reproduction unit that executes the calculation processing to be executed in the source control device from the calculation period next to the specific period to the transition period to which control is transferred, based on the initial synchronization information acquired by the initial synchronization unit; and a calculation execution unit that executes the calculation processing after the transition period using the result of the calculation processing executed by the calculation reproduction unit, thereby controlling the control object.
[0008] In the present disclosure, the destination control device executes the arithmetic processing that is executed by the source control device from the arithmetic processing period following the specific period until the transition period in which control is transferred, based on information about the arithmetic processing of the source control device in the specific period. This makes it possible to synchronize the state of the arithmetic processing of the source control device with the state of the arithmetic processing of the destination control device in the transition period, even if the data transfer time for state synchronization is longer than the period in which the arithmetic processing is executed. As a result, it is possible to replace the control device without stopping the controlled object.
[0009] 1 is a configuration diagram of a control transfer system 100 according to a first embodiment. FIG. 1 is a data flow diagram in a pre-transfer start state according to the first embodiment. FIG. 2 is a data flow diagram in a transition state according to the first embodiment. FIG. 3 is a data flow diagram in a transition state according to the first embodiment. FIG. 4 is a data flow diagram in a post-transfer completion state according to the first embodiment. FIG. 5 is a hardware configuration diagram of a transfer source control device 10 and a transfer destination control device 20 according to the first embodiment. FIG. 6 is a hardware configuration diagram of an input / output device 30 according to the first embodiment. FIG. 7 is a flowchart showing the operation of an operation execution unit 111 of a transfer source control device 10 according to the first embodiment. FIG. 8 is a flowchart showing the operation of an input / output control unit 31 of an input / output device 30 according to the first embodiment. FIG. 9 is a flowchart showing the operation of a transfer execution unit 241 according to the first embodiment. FIG. 10 is a flowchart showing the operation of a periodic calculation unit 21 according to the first embodiment. FIG. 11 is a flowchart showing the operation of a calculation reproducing unit 212 according to the first embodiment. FIG. 12 is a flowchart showing the operation of an initial synchronization unit 242 according to the first embodiment. FIG. 13 is a flowchart showing the operation of a transition assistance unit 14 according to the first embodiment. FIG. 14 is a flowchart showing the operation of a transition assistance unit 34 according to the first embodiment. FIG. 15 is an explanatory diagram of an example of the state of an operation data unit 22 in a transition state according to the first embodiment. FIG. 16 is a configuration diagram of a control transfer system 100 according to a second embodiment. 1. A flowchart showing the operation of a migration execution unit 241 according to embodiment 2. A flowchart showing the operation of a migration assistance unit 14 according to embodiment 2. A flowchart showing the operation of a matching information transfer unit 15 according to embodiment 2. A flowchart showing the operation of a computation reproduction unit 212 according to embodiment 2. A flowchart showing the operation of a matching acquisition unit 26 according to embodiment 2. A flowchart showing the operation of a matching execution unit 27 according to embodiment 2. A configuration diagram of a control migration system 100 according to embodiment 3. A flowchart showing the operation of an order determination unit 29 according to embodiment 3. An explanatory diagram of a specific example of a method for determining a migration order according to embodiment 3. An explanatory diagram of a specific example of a method for determining a migration order according to embodiment 3.
[0010] First Embodiment *** Description of Configuration *** The configuration of a control transfer system 100 according to the first embodiment will be described with reference to Figures 1 to 5. The control transfer system 100 includes a source control device 10, a destination control device 20, and an input / output device 30. The source control device 10, the destination control device 20, and the input / output device 30 are connected via a network 91. The input / output device 30 is connected to a control target 40 via a transmission path 92.
[0011] Next, the states of the control transfer system 100 will be explained, and then the functions of the control transfer system 100 will be explained.
[0012] **States of the Control Transfer System 100** The control transfer system 100 has three states: a pre-transfer state, a transition state, and a post-transfer completion state. The pre-transfer state is a state in which the transfer source control device 10 cooperates with the input / output device 30 via the network 91 to control the control target 40. FIG. 2 shows the data flow in the pre-transfer state. The transition state is a state in which information that needs to be synchronized in the transfer source control device 10 is synchronized with the transfer destination control device 20, and the control device with which the input / output device 30 cooperates is switched from the transfer source control device 10 to the transfer destination control device 20. In the transition state, the state in which the transfer source control device 10 cooperates with the input / output device 30 via the network 91 to control the control target 40 in the pre-transfer state continues. At the end of the transition state, the state before the transition starts, in which the transition source control device 10 continues to cooperate with the I / O device 30 via the network 91 to control the control object 40, switches to a state in which the transition destination control device 20 cooperates with the I / O device 30 via the network 91 to control the control object 40. Figures 3 and 4 show the data flow of the transition state. The post-transition state is a state in which the transition destination control device 20 cooperates with the I / O device 30 via the network 91 to control the control object 40. Figure 5 shows the data flow of the post-transition state.
[0013] The transition state is classified into an initial synchronization state, a reproduction calculation state, and a switch control state. The initial synchronization state is a state from the start of processing by the transition execution unit 241 (described later) to the end of processing by the initial synchronization unit 242 (described later). The reproduction calculation state is a state from the completion of the initial synchronization state to the end of processing by the calculation reproduction unit 212 (described later). The switch control state is a state from the completion of the reproduction calculation state to the end of processing by the transition execution unit 241 (described later).
[0014] **Functions of Control Transfer System 100** The following describes the functions of each of the control source control device 10, the control destination control device 20, and the input / output device 30 provided in the control transfer system 100. Note that each device may include an operating system or hypervisor for managing the execution of functions installed in the device in addition to the functional components described below.
[0015] Any means may be used for notification or status confirmation between functions within the same device. For example, notification or status confirmation between functions within the same device may be achieved using a shared memory or an inter-task communication function provided by the operating system.
[0016] The execution timing or core allocation within the processor of the functions within each device is controlled so as to satisfy the following conditions 1 and 2. Condition 1 is a condition that the calculation execution unit 111 (or calculation execution unit 211) described below can receive measurement value information 621 (or measurement value information 624) once within the calculation cycle T_cyc [ms]. Condition 2 is a condition that the input / output control unit 31 can receive calculation result information 622 (or calculation result information 627) once within the calculation cycle T_cyc [ms].
[0017] *Functions of Transfer Source Control Device 10* The transfer source control device 10 includes, as functional components, a period calculation unit 11, a calculation data unit 12, a communication control unit 13, and a transfer assistance unit 14.
[0018] The periodic calculation unit 11 performs one execution unit of calculation processing in a calculation period T_cyc [ms]. A specific example of the calculation processing is a task or a set of tasks controlled by a periodic handler or an operating system. Furthermore, if the calculation processing is processing that runs on a virtual machine, the periodic calculation unit 11 uses the virtual machine. Specifically, the calculation execution unit 111 included in the periodic calculation unit 11 executes calculations using measurement value information 621 received from the input / output device 30 and information from the calculation data unit 12 as inputs, every calculation period T_cyc [ms], to generate calculation result information 622. The calculation execution unit 111 transmits the calculation result information 622 to the input / output device 30. Furthermore, the calculation execution unit 111 updates part of the contents of the calculation data unit 12 during execution of the calculation processing. The measurement value information 621 includes the measurement value and the measurement number of the control data unit 32. The calculation result information 622 includes the calculation result. The calculation result information 622 may further include the calculation number of the calculation data unit 12.
[0019] The calculation data unit 12 manages data necessary for the calculation processing of the periodic calculation unit 11 and data necessary for managing the execution of the calculation processing. In the first embodiment, the calculation data unit 12 manages a used measurement number, a calculation number, a start timestamp, an end timestamp, and internal data. The used measurement number is a measurement number included in the measurement value information 621 used in the most recent calculation. The calculation number is a number that is incremented for each calculation. The start timestamp is the value of the synchronization time counter when the periodic calculation processing of the periodic calculation unit 11 is started or when the standby state is released. The end timestamp is the value of the synchronization time counter when the periodic calculation processing of the periodic calculation unit 11 goes into standby state. The internal data is data that needs to be held internally for the calculation processing. The internal data also includes the generated calculation results.
[0020] The communication control unit 13 transmits and receives information to and from functions within other devices. The communication control unit 13 buffers information received from the network 91 and allows other functions within the device to acquire the information. The communication control unit 13 also buffers information requested for transmission by other functions within the device and transmits the information to the network 91 at specific timing. Real-time communication of measurement value information 621, calculation result information 622, and the like is required. Therefore, the communication control unit 13 adjusts the transmission timing to ensure real-time communication of these data. For example, a communication method compliant with the IEEE 802.1 TSN standard is adopted, and control is performed so that transmission and reception of these data are completed within a certain time period. TSN stands for Time Sensitive Networking. The communication control unit 13 has a time synchronization function for synchronizing time between devices. This function is realized based on a high-precision time synchronization method, such as IEEE 802.1AS or IEEE 1588, which are part of the IEEE 802.1 TSN standard. The result of the time synchronization function is reflected in a synchronization time counter built into the communication control unit 13 .
[0021] The migration assistance unit 14 assists the migration execution unit 241 and the initial synchronization unit 242 in the migration control unit 24 of the migration destination control device 20. When the migration assistance unit 14 receives an initial synchronization request 625 from the initial synchronization unit 242, it generates initial synchronization information 626 and transmits it to the initial synchronization unit 242. The initial synchronization information 626 is information that needs to be synchronized among the contents of the calculation data unit 12 at the time of calculation execution of a calculation number (referred to as a starting calculation number) in a specific period for the calculation execution unit 111 of the periodic calculation unit 11. The initial synchronization information 626 always includes a usage measurement number, a calculation number, a start timestamp, and an end timestamp. The initial synchronization information 626 includes internal data, but if unnecessary data is included in the internal data, it does not need to include the unnecessary data. After receiving switching timing information 629 from the migration execution unit 241, the migration assistance unit 14 stops the periodic calculation unit 11 when the conditions of the switching timing information 629 are met. Thereafter, the migration support unit 14 transmits a switching completion 6211 to the migration execution unit 241. The switching timing information 629 is information indicating the conditions for switching from the source control device 10 to the destination control device 20. The switching timing information 629 specifies an arbitrary condition based on the information in the source control device 10. Specific examples of this condition include "when the value of the synchronization time counter reaches or exceeds a certain value" or "when the calculation number in the calculation data unit 12 reaches or exceeds a certain value."
[0022] *Functions of the destination control device 20* The destination control device 20 has, as functional components, a period calculation unit 21, a calculation data unit 22, a communication control unit 23, a migration control unit 24, and a reproduction data unit 25. The calculation data unit 22 and the communication control unit 23 are the same as the calculation data unit 12 and the communication control unit 13 of the source control device 10.
[0023] The periodic calculation unit 21 includes a calculation execution unit 211 and a calculation reproducing unit 212. The calculation execution unit 211 is the same as the calculation execution unit 111 included in the periodic calculation unit 11 of the source control device 10. After the processing of the initial synchronization unit 242 is completed, the calculation reproducing unit 212 executes a reproduction calculation that reproduces the calculation executed by the calculation execution unit 111 of the periodic calculation unit 11, based on the contents of the calculation data unit 22 and the reproduction data unit 25. In this way, the calculation reproducing unit 212 synchronizes information that requires synchronization in the calculation data unit 22 with information in the calculation data unit 12. The calculation reproducing unit 212 sends a measurement value information request 623 to the transition assistance unit 34, and stores the measurement value information 624 in a measurement value information buffer in the reproduction data unit 25 each time it receives it.
[0024] The migration control unit 24 controls the migration. The migration control unit 24 includes a migration execution unit 241 and an initial synchronization unit 242. The migration execution unit 241 is responsible for the overall execution of the migration. The migration execution unit 241 starts the execution of the initial synchronization unit 242 and the periodic calculation unit 21. After the processing of the calculation reproducing unit 212 is completed, the migration execution unit 241 waits until it receives a switching preparation completion 628 from the migration assistance unit 34. The migration execution unit 241 then generates switching timing information 629 and transmits it to the migration assistance unit 14, and generates switching timing information 6210 and transmits it to the migration assistance unit 34. The migration execution unit 241 ends the migration when it receives a switching completion 6211 from the migration assistance unit 14 and a switching completion 6212 from the migration assistance unit 34. The initial synchronization unit 242 transmits an initial synchronization request 625 to the migration assistance unit 14 when the calculation reproducing unit 212 starts receiving measurement value information 624 for the first time. The initial synchronization unit 242 receives initial synchronization information 626 as a response to the initial synchronization request 625. The initial synchronization unit 242 stores the initial synchronization information 626 in the calculation data unit 22. The initial synchronization unit 242 also reflects part of the initial synchronization information 626 in the starting calculation number, starting start timestamp, and starting end timestamp managed by the reproduction data unit 25.
[0025] The reproduction data unit 25 manages information necessary to reproduce the operations executed by the operation execution unit 111. In the first embodiment, the reproduction data unit 25 manages a measurement value information buffer, a starting operation number, a starting start timestamp, a starting end timestamp, and an estimated source operation number. The measurement value information buffer is set with measurement value information received by the operation reproduction unit 212. The starting operation number is set with the operation number in the initial synchronization information 626 received by the initial synchronization unit 242. The starting start timestamp is set with the start timestamp in the initial synchronization information 626 received by the initial synchronization unit 242. The starting end timestamp is set with the end timestamp in the initial synchronization information 626 received by the initial synchronization unit 242. The estimated source operation number is set with the operation number of the operation data unit 12 set in the current operation period, estimated by the operation reproduction unit 212.
[0026] *Functions of I / O device 30* The I / O device 30 has, as functional components, an I / O control unit 31, a control data unit 32, a communication control unit 33, and a migration support unit 34. The communication control unit 33 is the same as the communication control unit 13 of the control device 10 from which the migration is performed.
[0027] The input / output control unit 31 updates the contents of the control data unit 32 based on the measurement value 601. The input / output control unit 31 generates measurement value information 621 or measurement value information 624 from the measurement value 601 and transmits it to one of the control device 10 from the source of transfer and the control device 20 to whichever is designated as the communication destination. The input / output control unit 31 extracts the calculation result 602 from the calculation result information 622 or calculation result information 627 received from the control device designated as the communication destination and outputs it to the control target 40. Note that, when both the calculation result information 622 and the calculation result information 627 can be received, either one may be used. Furthermore, the control device to be the communication destination is set externally. In the first embodiment, the control device to be the communication destination is set by the migration support unit 34.
[0028] The control data unit 32 manages data necessary for the input / output control processing of the input / output control unit 31 and data necessary for managing the execution of the input / output control processing. In the first embodiment, the control data unit 32 manages at least a measurement number. The control data unit 32 may also manage other necessary internal data. The measurement number is a number that is incremented each time a measurement value 601 is input.
[0029] The migration assistance unit 34 assists the operation of the migration execution unit 241. When the migration assistance unit 34 receives a measurement value information request 623 from the calculation reproduction unit 212, it sets the destination control device 20 as the communication destination of the input / output control unit 31. When the input / output control unit 31 starts receiving calculation result information 627, the migration assistance unit 34 sends a switching preparation completion message 628 to the migration execution unit 241. After receiving switching timing information 6210 from the migration execution unit 241, the migration assistance unit 34 deletes the source control device 10 from the communication destination of the input / output control unit 31 when the conditions of the switching timing information 6210 are met. Then, the migration assistance unit 34 sends a switching completion message 6212 to the migration execution unit 241. Here, the switching timing information 6210 is information indicating the conditions for switching from the source control device 10 to the destination control device 20. The switching timing information 6210 specifies arbitrary conditions based on information in the input device 3. Specific examples of this condition include "when the value of the synchronization time counter reaches a certain value" or "when the measurement number in the control data section 32 reaches a certain value."
[0030] With reference to Fig. 6 , the hardware configurations of the source control device 10 and the destination control device 20 according to the first embodiment will be described. The source control device 10 and the destination control device 20 are computers. The source control device 10 includes hardware such as a processor 101, a memory 102, a storage 103, and a communication interface 104. The processor 101 is connected to other hardware via signal lines and controls the other hardware. The destination control device 20 includes hardware such as a processor 201, a memory 202, a storage 203, and a communication interface 204. The processor 201 is connected to other hardware via signal lines and controls the other hardware.
[0031] The hardware configuration of the input / output device 30 according to the first embodiment will be described with reference to Fig. 7. The input / output device 30 is a computer. The input / output device 30 includes the following hardware components: a processor 301, a memory 302, a storage 303, a communication interface 304, and an input / output interface 305. The processor 301 is connected to other hardware components via signal lines and controls the other hardware components.
[0032] The processors 101, 201, and 301 are ICs that perform processing. IC stands for Integrated Circuit. Specific examples of the processors 101, 201, and 301 are a CPU, a DSP, and a GPU. CPU stands for Central Processing Unit. DSP stands for Digital Signal Processor. GPU stands for Graphics Processing Unit.
[0033] The memories 102, 202, and 302 are storage devices that temporarily store data. Specific examples of the memories 102, 202, and 302 include SRAM and DRAM. SRAM stands for Static Random Access Memory. DRAM stands for Dynamic Random Access Memory.
[0034] The storages 103, 203, and 303 are storage devices that store data. Specific examples of the storages 103, 203, and 303 are HDDs. HDD stands for Hard Disk Drive. The storages 103, 203, and 303 may also be portable recording media such as an SD (registered trademark) memory card, CompactFlash (registered trademark), NAND flash, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, or a DVD. SD stands for Secure Digital. DVD stands for Digital Versatile Disk.
[0035] The communication interfaces 104, 204, and 304 are interfaces for communicating with external devices via the network 91. A specific example of the communication interfaces 104, 204, and 304 is an Ethernet (registered trademark) port.
[0036] The input / output interface 305 is an interface for performing input / output with the outside via the transmission path 92. Specific examples of the input / output interface 305 include USB and HDMI (registered trademark) ports. USB is an abbreviation for Universal Serial Bus. HDMI is an abbreviation for High-Definition Multimedia Interface.
[0037] The functions of each functional component of the source control device 10 are realized by software. Storage 103 stores a program that realizes the function of each functional component of the source control device 10. This program is loaded into memory 102 by processor 101 and executed by processor 101. As a result, the functions of each functional component of the source control device 10 are realized. Similarly, the functions of each functional component of the destination control device 20 are realized by software. Storage 203 stores a program that realizes the function of each functional component of the destination control device 20. This program is loaded into memory 202 by processor 201 and executed by processor 201. As a result, the functions of each functional component of the destination control device 20 are realized. Similarly, the functions of each functional component of the input / output device 30 are realized by software. Storage 303 stores a program that realizes the function of each functional component of the input / output device 30. This program is loaded into memory 302 by processor 301 and executed by processor 301. As a result, the functions of each functional component of the input / output device 30 are realized.
[0038] The function of the communication control unit 13 is realized by utilizing the communication interface 104. Similarly, the function of the communication control unit 23 is realized by utilizing the communication interface 204. Similarly, the function of the communication control unit 33 is realized by utilizing the communication interface 304. Furthermore, the calculation data unit 12 manages data by utilizing the memory 102. Similarly, the calculation data unit 22 and the reproduction data unit 25 manage data by utilizing the memory 202. Similarly, the control data unit 32 manages data by utilizing the memory 302. Furthermore, the input / output control unit 31 receives input of a measurement value 601 via the input / output interface 305 and outputs a calculation result 602.
[0039] ***Description of Operation*** The operation of the control transfer system 100 according to the first embodiment will be described. The operating procedure of the control transfer system 100 according to the first embodiment corresponds to the control transfer method according to the first embodiment. Furthermore, the program that realizes the operation of the control transfer system 100 according to the first embodiment corresponds to the control transfer program according to the first embodiment.
[0040] As described above, the control transition system 100 has three states: a pre-transition state, a transition state, and a post-transition completion state. Here, the operation will be explained separately for the pre-transition state, the transition state, and the post-transition completion state.
[0041] 2, 8, and 9, the operation of the control transfer system 100 in the pre-transfer state according to the first embodiment will be described. The pre-transfer state is a state in which the transfer source control device 10 cooperates with the input / output device 30 via the network 91 to control the control target 40. At this time, in the transfer source control device 10, the calculation execution unit 111 executes calculation processing, and the control target 40 is controlled based on the calculation results of the calculation processing. At this time, the transfer source control device 10 is set as the communication destination of the input / output control unit 31.
[0042] 2 and 8, the operation of the calculation execution unit 111 of the transfer source control device 10 according to the first embodiment will be described. In step S11, the calculation execution unit 111 acquires the value of the synchronization time counter of the communication control unit 13 and stores it in the start timestamp of the calculation data unit 12. In step S12, the calculation execution unit 111 acquires the measurement value information 621 received by the communication control unit 13. In step S13, the calculation execution unit 111 executes calculation processing based on the measurement value information 621 acquired in step S12 and the contents of the internal data of the calculation data unit 12, updates the usage measurement number, calculation number, and internal data managed by the calculation data unit 12, and generates calculation result information 622. In step S14, the calculation execution unit 111 notifies the communication control unit 13 of a request to send the calculation result information 622 generated in step S13 to the input / output control unit 31. In step S15, the calculation execution unit 111 acquires the value of the synchronization time counter of the communication control unit 13 and stores it in the end timestamp of the calculation data unit 12. The calculation execution unit 111 then waits until the next execution timing. Here, the next execution timing is the time when the calculation cycle T_cyc [ms] has elapsed since the current startup. Any waiting method can be used, and for example, it is possible to calculate the waiting time until the next startup using the start timestamp or end timestamp and wait for that time.
[0043] 2 and 9, the operation of the input / output control unit 31 of the input / output device 30 according to the first embodiment will be described. In step S21, the input / output control unit 31 receives an input of a measurement value 601 from the control target 40 via the input / output interface 304. In step S22, the input / output control unit 31 updates the measurement number managed by the control data unit 32 and generates measurement value information 621. The input / output control unit 31 then notifies the communication control unit 33 of a transmission request to transmit the measurement value information 621 to the source control device 10, which is the control device designated as the communication destination. In step S23, the input / output control unit 31 acquires, from the communication control unit 33, calculation result information 622 received from the source control device 10, which is the control device designated as the communication destination. In step S24, the input / output control unit 31 extracts the calculation result 602 from the calculation result information 622 acquired in step S23. The input / output control unit 31 then outputs the calculation result 602 to the control target 40 via the input / output interface 304. In step S25, the input / output control unit 31 waits until the next execution timing.
[0044] **Transition State** The operation of the control transfer system 100 in the transition state according to the first embodiment will be described with reference to FIGS. 3 and 4 and FIGS. 10 to 15. The transition state is a state in which information requiring synchronization in the transfer source control device 10 is synchronized with the transfer destination control device 20, and the control device with which the input / output device 30 cooperates is switched from the transfer source control device 10 to the transfer destination control device 20. In the transition state, the state in which the transfer source control device 10 cooperates with the input / output device 30 via the network 91 and controls the control object 40 in the pre-transition state continues. At the end of the transition state, the state in which the transfer source control device 10 cooperates with the input / output device 30 via the network 91 and controls the control object 40 in the pre-transition state continues is switched to a state in which the transfer destination control device 20 cooperates with the input / output device 30 via the network 91 and controls the control object 40 in the pre-transition state. The transition state is classified into an initial synchronization state, a reproduction calculation state, and a switching control state. Here, the operation will be explained separately for the initial synchronization state, the reproduction calculation state, and the switching control state.
[0045] *Initial Synchronizing State* The initial synchronizing state is the state from the start of processing by the transition execution unit 241 to the end of processing by the initial synchronization unit 242. When control transition is initiated, the operational flow of the transition execution unit 241 of the transition destination control device 20 (see FIG. 10) is initiated. Also, the operational flow of the transition assistance unit 14 of the transition source control device 10 (see FIG. 14) is initiated. Also, the operational flow of the transition assistance unit 34 of the input / output device 30 (see FIG. 15) is initiated.
[0046] The operation of the transition execution unit 241 according to the first embodiment will be described with reference to FIG. 10 . In step S31, the transition execution unit 241 instructs the execution of the operation flow of the period calculation unit 21 (see FIG. 11 ) and the operation flow of the initial synchronization unit 242 (see FIG. 13 ). The operation flow of the period calculation unit 21 and the operation flow of the initial synchronization unit 242 are executed in parallel. For example, the operation flow of the period calculation unit 21 and the operation flow of the initial synchronization unit 242 are executed as separate tasks. In step S32, the transition execution unit 241 waits until the processing of the calculation reproduction unit 212 of the period calculation unit 21 is completed. This wait state is released in the switching control state. Therefore, the processing from step S33 onward will be described later.
[0047] The operation of the periodic calculation unit 21 according to the first embodiment will be described with reference to Fig. 11. In step S41, the periodic calculation unit 21 instructs the calculation reproducing unit 212 to execute the operation flow (see Fig. 12). Step S42 is executed after the operation flow of the calculation reproducing unit 212 has finished, and therefore the processing from step S42 onwards will be described later.
[0048] The operation of the calculation reproducing unit 212 according to the first embodiment will be described with reference to FIGS. 3 and 12 . In step S51, the calculation reproducing unit 212 executes initialization processing required to initialize the periodic calculation unit 21. Specifically, the calculation reproducing unit 212 initializes a portion of the internal data managed by the calculation data unit 22 that is not subject to synchronization by the initial synchronization unit 242. The calculation reproducing unit 212 also aligns the phase at which the calculation period T_cyc [ms] is started with the phase of the periodic calculation unit 11 of the transfer source control device 10. The calculation reproducing unit 212 also notifies the communication control unit 23 of a transmission request for a measurement value information request 623 to the transfer support unit 34 of the input / output device 30. In step S52, the calculation reproducing unit 212 acquires the value of the synchronization time counter from the communication control unit 23 and stores it in the start timestamp managed by the calculation data unit 22. In step S53, if the communication control unit 23 has already received the measurement value information 624, the calculation reproducing unit 212 acquires it. The calculation reproducing unit 212 then stores the measurement value information 624 in a measurement value information buffer managed by the reproduction data unit 25. In step S54, if the operation flow (see FIG. 13) of the initial synchronization unit 242 has been completed, the calculation reproducing unit 212 proceeds to step S56. On the other hand, if the operation flow (see FIG. 13) of the initial synchronization unit 242 has not been completed, the calculation reproducing unit 212 proceeds to step S55. In step S55, the calculation reproducing unit 212 acquires the value of the synchronization time counter from the communication control unit 23 and stores it in the end timestamp of the calculation data unit 22. Then, the calculation reproducing unit 212 waits until the next execution timing of the periodic calculation unit 21, and then returns the process to step S52. When the operation flow of the initial synchronization unit 242 has been completed, the initial synchronization state ends. Therefore, the processes from step S56 onwards will be described later.
[0049] The operation of the initial synchronization unit 242 according to the first embodiment will be described with reference to FIGS. 3 and 13 . In step S71, the initial synchronization unit 242 waits until the calculation reproduction unit 212 starts receiving the measurement value information 624 for the first time in step S53 of FIG. 12 . In step S72, the initial synchronization unit 242 notifies the communication control unit 23 of a request to transmit an initial synchronization request 625 to the transition support unit 14 of the source control device 10. In step S73, the initial synchronization unit 242 waits until the communication control unit 23 receives initial synchronization information 626 from the transition support unit 14 of the source control device 10. In step S74, the initial synchronization unit 242 acquires the initial synchronization information 626 from the communication control unit 23. The initial synchronization unit 242 then reflects the information in the initial synchronization information 626 in the calculation data unit 22 and the reproduction data unit 25, and ends the process. Here, the initial synchronization information 626 is information that needs to be synchronized among the contents of the calculation data unit 12 at the time of calculation execution of a calculation number (called a starting calculation number) in a specific cycle for the calculation execution unit 111. Here, the initial synchronization information 626 includes a usage measurement number, a calculation number, a start timestamp, and an end timestamp. The initial synchronization information 626 may also include internal data.
[0050] The operation of the transition support unit 14 according to the first embodiment will be described with reference to FIGS. 3 and 14 . In step S81, the transition support unit 14 waits until the communication control unit 13 receives an initial synchronization request 625 from the initial synchronization unit 242. When the communication control unit 13 receives the initial synchronization request 625, the transition support unit 14 acquires the initial synchronization request 625. In step S82, the transition support unit 14 waits until the calculation execution unit 111 of the periodic calculation unit 11 enters a next standby state. In step S83, the transition support unit 14 generates initial synchronization information 626 by setting the calculation period at the time of execution of the process as the specific period. Then, the transition support unit 14 notifies the communication control unit 13 of a request to send the initial synchronization information 626 to the initial synchronization unit 242. In step S84, the transition support unit 14 waits until the communication control unit 13 receives switching timing information 629 from the transition execution unit 241. When the communication control unit 13 receives the switching timing information 629, the transition support unit 14 acquires the switching timing information 629. Note that, since the reception of the switching timing information 629 puts the device in a switching control state, the processing from step S85 onwards will be described later.
[0051] 3 and 15 , the operation of the transition support unit 34 according to the first embodiment will be described. In step S91, the transition support unit 34 waits until the communication control unit 33 receives a measurement value information request 623 from the calculation reproduction unit 212. When the communication control unit 33 receives the measurement value information request 623, the transition support unit 34 acquires the measurement value information request 623. In step S92, the transition support unit 34 adds the transition destination control device 20 to the communication destinations of the input / output control unit 31. This causes the input / output control unit 31 to notify a transmission request for the measurement value information 624 and acquire the calculation result information 627. In step S93, the transition support unit 34 waits until the communication control unit 33 starts receiving the calculation result information 627 from the calculation execution unit 211 of the transition destination control device 20. Note that the calculation result information 627 is received during the switching control state, and therefore, the processing from step S94 onward will be described later.
[0052] *Reproduction Calculation In Progress State* The reproduction calculation in progress state is the state from the completion of the initial synchronization in progress state to the end of processing by the calculation reproduction unit 212. When the operation flow of the initial synchronization unit 242 shown in Figure 13 ends, the initial synchronization in progress state ends. Then, the process proceeds from step S54 in Figure 12 to step S56.
[0053] The operation of the calculation reproducing unit 212 will be described with reference to FIGS. 3 and 12. In step S56, the calculation reproducing unit 212 acquires the value of the synchronization time counter from the communication control unit 23 and stores it in the end timestamp managed by the calculation data unit 22. Then, the calculation reproducing unit 212 waits until the next execution timing. Here, the next execution timing is the time when the calculation period T_cyc [ms] has elapsed since the current startup. In step S57, the calculation reproducing unit 212 acquires the value of the synchronization time counter from the communication control unit 23 and stores it in the start timestamp managed by the calculation data unit 22. In step S58, if the communication control unit 23 has already received the measurement value information 624, the calculation reproducing unit 212 acquires the measurement value information 624. Then, the calculation reproducing unit 212 stores it in the measurement value information buffer managed by the reproduction data unit 25. In step S59, the calculation reproducing unit 212 estimates the calculation number of the calculation execution unit 111 of the source control device 10 in the calculation period at the time of executing the process. Then, the operation reproducing unit 212 stores the estimated operation number in the estimated source operation number managed by the reproduction data unit 25 .
[0054] The calculation reproducing unit 212 estimates the calculation number of the calculation execution unit 111 in the following procedure. First, the calculation reproducing unit 212 obtains a synchronization time counter from the communication control unit 23. From the difference between the synchronization time counter and the value of the starting point start timestamp or the value of the starting point end timestamp managed by the reproduction data unit 25, the calculation reproducing unit 212 calculates the elapsed time since the calculation execution unit 111 executed the calculation indicated by the starting point calculation number managed by the reproduction data unit 25. In other words, the calculation reproducing unit 212 calculates the elapsed time from the start or end time of the calculation process in the specific period to the time when the current process is being executed. The calculation period in which the current process is being executed is set as the transition period at this time. From the calculated elapsed time and the calculation period T_cyc [ms], the calculation reproducing unit 212 estimates the number of times the calculation process has been or will be executed by the calculation execution unit 111 from the calculation period next to the specific period to the calculation period in which the current process is being executed. The calculation reproducing section 212 estimates the sum of the number of executions and the starting calculation number managed by the reproduction data section 25 as the calculation number of the calculation executing section 111 in the calculation cycle in which the processing is being executed.
[0055] Note that once a value has been set for the estimated source operation number, the operation number is estimated every operation cycle T_cyc [ms] thereafter. Therefore, instead of the above process, the operation reproducing unit 212 may estimate a value obtained by adding 1 to the current value of the estimated source operation number as the operation number of the operation executing unit 111 in the operation cycle in which the process is being executed.
[0056] In step S60, the calculation reproducing unit 212 determines whether the value of the calculation number managed by the calculation data unit 22 is less than the value of the estimated source calculation number managed by the reproduction data unit 25. If the value of the calculation number is less than the value of the estimated source calculation number, the calculation reproducing unit 212 proceeds to step S61. On the other hand, if the value of the calculation number is not less than the value of the estimated source calculation number, the calculation reproducing unit 212 proceeds to step S64. In step S64, the calculation reproducing unit 212 obtains the value of the synchronization time counter, stores it in the end timestamp managed by the calculation data unit 22, and ends the process.
[0057] In step S61, if the processing of steps S62 and S63 has not been performed the limit number C_max times within the calculation cycle T_cyc [ms], the calculation reproducing unit 212 proceeds to step S62. On the other hand, if the processing has been performed the limit number C_max times, the calculation reproducing unit 212 returns to step S56. Here, the limit number C_max is a natural number determined within the range that satisfies d [ms] * C_max <= D_max, where d [ms] is the maximum value of the total value of the processing time from step S60 to step S63 and the margin time. D_max [ms] is the maximum time that the processing of the cycle calculation unit 21 can be executed with priority over other processing until the next execution timing of the calculation processing, and is ensured so that at least C_max >= 2 holds.
[0058] In step S62, the calculation reproducing unit 212 obtains the value obtained by adding 1 to the used measurement number managed by the calculation data unit 22, and measurement value information including the same number, from the measurement value information buffer managed by the reproduction data unit 25. In step S63, the calculation reproducing unit 212 executes a reproduction calculation based on the measurement value information obtained in step S62 and the contents of the internal data managed by the calculation data unit 22. The reproduction calculation is a calculation that reproduces the calculation processing by the calculation execution unit 111. The calculation reproducing unit 212 generates the calculation result of the reproduction calculation, and updates the used measurement number, calculation number, and contents of the internal data managed by the calculation data unit 22.
[0059] *Switching Controlling State* The switching controlling state is a state from the completion of the reproducing calculation state to the end of the processing of the transition executing unit 241. When the operation flow of the calculation reproducing unit 212 shown in Fig. 12 ends, the processing of step S42 in Fig. 11 is started. Also, the standby state of step S32 in Fig. 10 is released, and the processing of step S33 is started.
[0060] The operation of the periodic calculation unit 21 will be described with reference to FIGS. 4 and 11 . In step S42, the periodic calculation unit 21 waits until the next execution timing, and then proceeds to step S43. In step S43, the periodic calculation unit 21 causes the calculation execution unit 211 to start calculation processing. This causes the calculation execution unit 211 to start transmitting calculation result information 627 to the input / output device 30. The control target 40 can then be controlled using the results of the calculation processing executed by the calculation execution unit 211. In other words, after the transition period last set in step S59 of FIG. 12 , the control target 40 can be controlled using the results of the calculation processing executed by the calculation execution unit 211. The operation flow and description of the calculation execution unit 211 are essentially the same as those of the calculation execution unit 111 shown in FIG. 8 . However, it is necessary to replace the wording in the description with the wording for the transition source control device 10 with the wording for the transition destination control device 20.
[0061] 4 and 10 , the operation of the migration execution unit 241 will be described. In step S33, the migration execution unit 241 waits until the communication control unit 23 receives the switching preparation complete signal 628 from the migration assistance unit 34. When the communication control unit 23 receives the switching preparation complete signal 628, the migration execution unit 241 acquires the switching preparation complete signal 628. In step S34, the migration execution unit 241 generates switching timing information 629 and switching timing information 6210. Then, the migration execution unit 241 notifies the communication control unit 23 of a request to send the switching timing information 629 to the migration assistance unit 14 and a request to send the switching timing information 6210 to the migration assistance unit 34. In step S35, the migration execution unit 241 waits until the communication control unit 23 receives the switching completion signal 6211 from the migration assistance unit 14 and the switching completion signal 6212 from the migration assistance unit 34. When the communication control unit 23 receives the switching completion 6211 and the switching completion 6212, the transition execution unit 241 acquires the switching completion 6211 and the switching completion 6212 and ends the process.
[0062] The operation of the transition support unit 14 will be described with reference to Figures 4 and 14. In step S84, the transition support unit 14 completes the standby state by transmitting the switching timing information 629 in step S34. Then, the transition support unit 14 proceeds to step S85. In step S85, the transition support unit 14 waits until the conditions of the switching timing information 629 are met. In step S86, the transition support unit 14 stops the operation of the periodic calculation unit 11. In step S87, the transition support unit 14 notifies the communication control unit 13 of a request to transmit a switching completion 6211 to the transition execution unit 241.
[0063] The operation of the transition support unit 34 will be described with reference to FIGS. 4 and 15 . In step S93, the transition support unit 34 starts receiving the computation result information 627 when the computation execution unit 211 starts computation processing in step S43 of FIG. 11 , and the standby state is completed. The transition support unit 34 then proceeds to step S94. In step S94, the transition support unit 34 notifies the communication control unit 33 of a transmission request for the transition execution unit 241 of a switching preparation completion 628. In step S95, the transition support unit 34 waits until the communication control unit 33 receives the switching timing information 6210 from the transition execution unit 241. When the communication control unit 33 receives the switching timing information 6210, the transition support unit 34 acquires the switching timing information 6210. In step S96, the transition support unit 34 waits until the condition of the switching timing information 6210 is satisfied. In step S97, the migration support unit 34 deletes the migration source control device 10 from the communication destination of the input / output control unit 31. As a result, the input / output control unit 31 will no longer issue a transmission request for the measurement value information 621 or acquire the calculation result information 622. In step S98, the migration support unit 34 notifies the communication control unit 33 of a transmission request for the migration execution unit 241 to transmit a switching completion 6212.
[0064] **Post-migration completion state** The post-migration completion state is a state in which the destination control device 20 cooperates with the input / output device 30 via the network 91 to control the control target 40. At this time, in the destination control device 20, the calculation execution unit 211 executes calculation processing, and the control target 40 is controlled based on the calculation results of the calculation processing. At this time, the destination control device 20 is set as the communication destination of the input / output control unit 31 by the processing in the transition state described above.
[0065] The operation of the control transfer system 100 in the post-transfer completion state is the same as the pre-transfer state, except that the transfer-destination control device 20 controls the control target 40 instead of the transfer-source control device 10. In other words, as shown in Fig. 5 , in the post-transfer completion state, the calculation execution unit 211 performs calculation processing instead of the calculation execution unit 111, and measurement value information 624 and calculation result information 627 are transmitted and received between the calculation execution unit 211 and the input / output control unit 31.
[0066] *Example of the state of the calculation data unit 22* An example of the state of the calculation data unit 22 in the transition state according to the first embodiment will be described with reference to Fig. 16. In the example of Fig. 16, the reproduction calculation is performed with the starting calculation number = N and C_max = 3. That is, the calculation number in the specific cycle in which the transition support unit 14 generates the initial synchronization information 626 in step S83 of Fig. 14 is N.
[0067] By the time the initial synchronizing state is completed, the initial synchronization unit 242 acquires initial synchronization information 626 from the source control device 10, including information that requires synchronization until the calculation processing of the starting calculation number N by the calculation execution unit 111 managed by the calculation data unit 12 is completed. The initial synchronization unit 242 then synchronizes with the calculation data unit 22 and reflects it in the reproduction data unit 25. In FIG. 16, when the calculation number N+10 is reached at the time the initial synchronizing state is completed, synchronization of the information that requires synchronization until the calculation processing of the starting calculation number N is completed is completed. In other words, this represents a situation in which the transfer time for information that requires synchronization is longer than the calculation cycle T_cyc [ms]. Furthermore, by the time the initial synchronizing state is completed, the calculation reproduction unit 212 sets measurement value information 624 obtained from the input / output device 30 in the measurement value information buffer managed by the reproduction data unit 25.
[0068] In the reproduction calculation state, the calculation reproduction unit 212 performs reproduction calculation of the calculation execution unit 111 of the transfer source control device 10 based on the information managed by the calculation data unit 22 and the reproduction data unit 25 and the value of the synchronization time counter. At this time, the calculation reproduction unit 212 does not need to transfer information that requires synchronization from the transfer source control device 10. In FIG. 16, the reproduction calculation starts when the calculation execution unit 111's calculation number is N+11. First, the calculation reproduction unit 212 sets N+11 as the estimated transfer source calculation number in step S59 of FIG. 12. Then, since C_max = 3, the calculation reproduction unit 212 executes three calculation processes, N+1, N+2, and N+3. Even after executing three calculation processes, the calculation number "N+3" of the calculation process executed by the calculation reproduction unit 212 is less than the estimated transfer source calculation number "N+11." Therefore, in step S61 of FIG. 12, the process returns to step S56. Then, in the next calculation cycle, the calculation reproducing unit 212 sets N+12 as the estimated source calculation number in step S59 of FIG. 12. Then, because C_max = 3, the calculation reproducing unit 212 executes three calculation processes, N+4, N+5, and N+6. Even after executing three calculation processes, the calculation number "N+6" of the calculation process executed by the calculation reproducing unit 212 is less than the estimated source calculation number "N+12". Therefore, in step S61 of FIG. 12, the process returns to step S56. In a calculation cycle after repeating the same process several times, the calculation reproducing unit 212 sets N+15 as the estimated source calculation number in step S59 of FIG. 12. Then, the calculation reproducing unit 212 executes calculation processes for N+13, N+14, and N+15. Then, the calculation number "N+15" of the calculation process executed by the calculation reproducing unit 212 is no longer less than the estimated source calculation number "N+15". Therefore, data synchronization is completed between the calculation data unit 12 of the source control device 10 and the calculation data unit 22 of the destination control device 20. In this way, even if the transfer time of information requiring synchronization is longer than the calculation cycle T_cyc [ms], it is possible to synchronize the calculation data unit 22 with the calculation data unit 12.
[0069] In the switching control state, the execution of the calculation execution unit 211 is started, and the same calculation result as that of the calculation execution unit 111 is generated. Therefore, even in the calculation cycles for calculation numbers N+16 and later, the calculation data unit 22 is synchronized with the calculation data unit 12. In this state, the transition control unit 24, the transition assistance unit 14, and the transition assistance unit 34 cooperate to switch from the source control device 10 to the destination control device 20, completing the transition. As described above, the state of the calculation processing of the source control device 10 can be synchronized with the state of the destination control device 20, and the transition can be completed, without affecting the production equipment, which is the control target 40.
[0070] ***Effects of First Embodiment*** As described above, in the control transfer system 100 according to the first embodiment, the initial synchronization unit 242 synchronizes information that requires synchronization of the source control device 10 in a specific period with the destination control device 20. Thereafter, the calculation reproducing unit 212 executes a reproduction calculation of the calculation processing by the calculation execution unit 111 without requiring the transfer of content that requires synchronization of the source control device 10, thereby causing the destination control device 20 to be synchronized with the source control device 10. This makes it possible to synchronize the calculation data unit 22 with the calculation data unit 12 even when the transfer time of information that requires synchronization is longer than the calculation period T_cyc [ms]. As a result, the state of the calculation processing of the source control device 10 can be synchronized with the state of the destination control device 20, and the transfer can be completed, without affecting the production equipment that is the controlled object 40.
[0071] ***Other Configurations*** <Modification 1> In the first embodiment, each functional component is realized by software. However, in Modification 1, each functional component may be realized by hardware. The differences between Modification 1 and the first embodiment will be described below.
[0072] When each functional component is realized by hardware, the control device 10 of the transfer source has an electronic circuit in place of the processor 101, the memory 102, and the storage 103. The electronic circuit is a dedicated circuit that realizes the functions of each functional component, the memory 102, and the storage 103.
[0073] When each functional component is realized by hardware, the destination control device 20 includes an electronic circuit instead of the processor 201, the memory 202, and the storage 203. The electronic circuit is a dedicated circuit that realizes the functions of each functional component, the memory 202, and the storage 203.
[0074] When each functional component is realized by hardware, the input / output device 30 includes an electronic circuit instead of the processor 301, the memory 302, and the storage 303. The electronic circuit is a dedicated circuit that realizes the functions of each functional component, the memory 302, and the storage 303.
[0075] Possible electronic circuits include a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, a logic IC, a GA, an ASIC, and an FPGA. GA stands for Gate Array. ASIC stands for Application Specific Integrated Circuit. FPGA stands for Field-Programmable Gate Array. Each functional component may be realized by a single electronic circuit, or each functional component may be distributed across multiple electronic circuits.
[0076] <Modification 2> As a modification 2, some of the functional components may be realized by hardware, and other functional components may be realized by software.
[0077] The processor 51, the memory 52, the storage 53, and the electronic circuitry are collectively referred to as a processing circuit. In other words, the functions of the respective functional components are realized by the processing circuit.
[0078] Embodiment 2. Embodiment 2 differs from embodiment 1 in that the content of the calculation data section 22 updated by the reproduction calculation by the calculation reproduction section 212 is compared with the content of the calculation data section 12 updated by the calculation processing by the calculation execution section 111. In embodiment 2, this difference will be explained, and explanation of the same points will be omitted.
[0079] ***Description of Configuration*** The configuration of the control transfer system 100 according to the second embodiment will be described with reference to Fig. 17. The functions of each device of the control transfer system 100, namely, the transfer source control device 10, the transfer destination control device 20, and the input / output device 30, will be described.
[0080] *Functions of Transfer Source Control Device 10* The transfer source control device 10 differs from the transfer source control device 10 shown in FIG. 1 in that it includes a matching information transfer unit 15 as a functional component.
[0081] The transition support unit 14 has the function of starting the execution of the matching information transfer unit 15 in addition to the functions described in the first embodiment.
[0082] The matching information transfer unit 15 transfers the source matching information 6213 to the destination control device 20. The source matching information 6213 is information managed by the calculation data unit 12 that should be matched with the processing results for each calculation. For example, the source matching information 6213 is a usage measurement number, a calculation number, and part of the internal data such as the calculation result.
[0083] *Functions of the destination control device 20* The destination control device 20 differs from the destination control device 20 shown in Figure 1 in that it has a matching acquisition unit 26, a matching execution unit 27, and a matching data unit 28 as functional components.
[0084] In addition to the functions described in the first embodiment, the calculation reproduction unit 212 has a function of generating reproduction collation information and storing it in a reproduction collation information buffer of the collation data unit 28. The reproduction collation information is configured to have the same configuration as the source collation information 6213.
[0085] The matching acquisition unit 26 acquires the source matching information 6213 transferred from the matching information transfer unit 15 and stores it in the source matching information buffer of the matching data unit 28 .
[0086] The matching execution unit 27 compares the information in the source matching information buffer in the matching data unit 28 with the information in the reproduced matching information buffer, and determines whether they match. If they do not match, the matching execution unit 27 performs any error processing to improve reliability. For example, the matching execution unit 27 performs a retry process or a migration interruption process. If they match, the matching execution unit 27 sends a matching completion 6214 to the matching information transfer unit 15. Note that the matching completion 6214 is not sent each time a match is confirmed, but is sent after matching of all data is completed.
[0087] The matching data unit 28 manages information for matching. Specifically, the matching data unit 28 manages the source matching information 6213 acquired by the matching acquisition unit 26 using the source matching information buffer. The matching data unit 28 also manages the reproduction matching information generated by the calculation reproduction unit 212 using the reproduction matching information buffer.
[0088] The transition execution unit 241 has a function of starting the execution of the matching execution unit 27 and the matching acquisition unit 26, and a function of waiting for the matching execution unit 27 to complete its execution.
[0089] ***Explanation of Operation*** The operation of the control transfer system 100 according to the second embodiment will be described. The operation procedure of the control transfer system 100 according to the second embodiment corresponds to the control transfer method according to the second embodiment. Furthermore, the program that realizes the operation of the control transfer system 100 according to the second embodiment corresponds to the control transfer program according to the second embodiment.
[0090] Of the three states, namely, the pre-transition state, the transition-in-progress state, and the transition-completed state, the operation in the transition-in-progress state differs from that in the first embodiment.
[0091] **Transitioning State** The operation of the control transfer system 100 in the transitioning state according to the second embodiment will be described with reference to Figures 17 to 23. When control transfer is initiated, the operation flow of the transfer execution unit 241 of the transfer-destination control device 20 (see Figure 18) is initiated. Also, the operation flow of the transition assistance unit 14 of the transfer-source control device 10 (see Figure 19) is initiated. Also, the operation flow of the transition assistance unit 34 of the input / output device 30 (see Figure 15) is initiated.
[0092] The operation of the transition execution unit 241 according to the second embodiment will be described with reference to FIG. 18 . The processing from step S103 to step S105 is the same as the processing from step S33 to step S35 in FIG. 10 . In step S101, the transition execution unit 241 starts executing the operation flow of the matching acquisition unit 26 (see FIG. 22 ) and the operation flow of the matching execution unit 27 (see FIG. 23 ), in addition to the operation flow of the periodic calculation unit 21 and the operation flow of the initial synchronization unit 242. Note that the operation flow of the periodic calculation unit 21, the operation flow of the initial synchronization unit 242, the operation flow of the matching acquisition unit 26, and the operation flow of the matching execution unit 27 are executed in parallel. In step S102, the transition execution unit 241 waits until the processing of the matching execution unit 27 is completed, in addition to the processing of the calculation reproduction unit 212.
[0093] The operation of the transition support unit 14 according to the second embodiment will be described with reference to Fig. 19. The processes from step S111 to step S112 are the same as the processes from step S81 to step S82 in Fig. 14. The processes from step S114 to step S118 are the same as the processes from step S83 to step S87 in Fig. 14. In step S113, the transition support unit 14 starts executing the operation flow of the matching information transfer unit 15 (see Fig. 20). The operation flow of the matching information transfer unit 15 is executed in parallel with other operation flows.
[0094] The operation of the matching information transfer unit 15 according to the second embodiment will be described with reference to FIG. 20 . In step S121, if the periodic calculation unit 11 of the periodic calculation unit 11 is in a standby state and the source matching information 6213 for the current calculation number managed by the calculation data unit 12 has not yet been generated, the matching information transfer unit 15 proceeds to step S122. On the other hand, if this is not the case, the matching information transfer unit 15 returns to step S121. Note that if the current calculation number matches the calculation number included in the initial synchronization information 626, the matching information transfer unit 15 may return to step S121 without proceeding to step S122. In step S122, if the communication control unit 13 has not yet received the matching completion 6214 from the matching acquisition unit 26, the matching information transfer unit 15 proceeds to step S123. On the other hand, if the matching completion 6214 has already been received, the matching information transfer unit 15 proceeds to step S124. In step S124, the matching information transfer unit 15 acquires a matching completion 6214 from the communication control unit 13 and ends the processing. In step S123, the matching information transfer unit 15 generates source matching information 6213. Then, the matching information transfer unit 15 notifies the communication control unit 13 of a request to send the source matching information 6213 to the matching acquisition unit 26. Note that the matching information transfer unit 15 needs to perform the processing of step S123 for each calculation number. Therefore, the execution timing and the core allocation of the processor 101 are controlled so that the processing of step S123 can be performed at least once between the time when the calculation execution unit 111 of the periodic calculation unit 11 enters a standby state and the time when it is next started up.
[0095] The operation of the calculation reproducing unit 212 according to the second embodiment will be described with reference to Fig. 21. The processes from step S131 to step S144 are the same as the processes from step S51 to step S64 in Fig. 12. In step S145, the calculation reproducing unit 212 generates reproduction collation information from the information managed by the calculation data unit 22 and stores it in the reproduction collation information buffer. The reproduction collation information generated here is information corresponding to the calculation number in step S143 that was most recently executed.
[0096] The operation of the matching acquisition unit 26 according to the second embodiment will be described with reference to FIG. 22 . In step S151, if the operation flow of the matching execution unit 27 has not been completed, the matching acquisition unit 26 proceeds to step S2. On the other hand, if the operation flow of the matching execution unit 27 has been completed, the matching acquisition unit 26 terminates the process. In step S152, the matching acquisition unit 26 waits until the communication control unit 23 receives the source matching information 6213. When the communication control unit 23 receives the source matching information 6213, the matching acquisition unit 26 acquires the source matching information 6213 and stores it in a source matching information buffer managed by the matching data unit 28. Note that the matching acquisition unit 26 may set a waiting time limit, and may return the process to step S151 if the source matching information 6213 cannot be acquired within the time limit.
[0097] The operation of the matching execution unit 27 according to the second embodiment will be described with reference to FIG. 23 . In step S161, if there is unmatched reproduction matching information in the reproduction matching information buffer managed by the matching data unit 28, the matching execution unit 27 proceeds to step S162. On the other hand, if there is no unmatched reproduction matching information in the reproduction matching information buffer, the matching execution unit 27 proceeds to step S166. In step S166, if the operation flow of the calculation reproducing unit 212 has not been completed, the matching execution unit 27 returns the process to step S161. On the other hand, if the operation flow of the calculation reproducing unit 212 has been completed, the matching execution unit 27 proceeds to step S167. In step S167, the matching execution unit 27 notifies the communication control unit 23 of a request to send a matching completion 6214 to the matching information transfer unit 15, and ends the process. In step S162, the matching execution unit 27 acquires unmatched reproduction matching information from the reproduction matching information buffer managed by the matching data unit 28. In step S163, if the source collation information buffer managed by the collation data unit 28 contains collation information with the same operation number as the reproduced collation information acquired in step S162, the collation execution unit 27 proceeds to step S164. On the other hand, if the source collation information 6213 with the same operation number as the reproduced collation information is not found, the collation execution unit 27 returns to step S163. Note that, in consideration of cases where the reproduction computation process generates reproduced collation information containing an incorrect operation number, the collation execution unit 27 may set a time limit for the continuation of a state in which source collation information 6213 with the same operation number as the reproduced collation information is not found. If the state in which source collation information 6213 with the same operation number as the reproduced collation information is not found exceeds the time limit, the collation execution unit 27 may perform error processing similar to that described in S168 below. In step S164, the collation execution unit 27 acquires source collation information 6213 with the same operation number as the reproduced collation information from the source collation information buffer managed by the collation data unit 28. Then, the matching execution unit 27 compares the acquired source matching information 6213 with the reproduced matching information acquired in step S162. In step S165, if the acquired source matching information 6213 and the reproduced matching information acquired in step S162 match, the matching execution unit 27 returns the process to step S161.On the other hand, if the acquired source matching information 6213 does not match the reproduction matching information acquired in step S162, the matching execution unit 27 proceeds to step S168. In step S168, the matching execution unit 27 performs any error processing and ends the processing.
[0098] ***Effects of Embodiment 2*** As described above, the control transition system 100 according to the second embodiment compares the contents of the operation data section 22 updated by the reproduction operation performed by the operation reproduction section 212 with the contents of the operation data section 12 updated by the operation processing performed by the operation execution section 111. This makes it possible to obtain the effects of the first embodiment while increasing the reliability of the reproduction operation.
[0099] Embodiment 3. Embodiment 3 differs from Embodiments 1 and 2 in that the order of transfer of arithmetic processes is determined when a plurality of arithmetic processes are being executed in the control device 10 from which the process is transferred. In Embodiment 3, this difference will be explained, and explanation of the same points will be omitted. In Embodiment 3, a case where a function is added to Embodiment 1 will be explained. However, it is also possible to add a function to Embodiment 2.
[0100] Consider a case where multiple arithmetic processes are executed on the same core in the processor 101 in the transfer source control device 10, and all of the multiple arithmetic processes are transferred to the transfer destination control device 20 and executed on the same core in the processor 201. In this case, the value of the limit number C_max that can be set for each calculation reproducing unit 212 may differ depending on the transfer order in which the control processes are transferred. Therefore, the processing time of the calculation reproducing unit 212 may differ depending on the transfer order in which the control processes are transferred. Therefore, the total time required for the transfer may change depending on the transfer order. In the second embodiment, when the processing time of the calculation reproducing unit 212 can be estimated in advance, the order that minimizes the total time required for the transfer is estimated, and the transfer is performed in that order.
[0101] ***Description of Configuration*** The configuration of a control transfer system 100 according to the third embodiment will be described with reference to FIG. 24 . The control transfer system 100 includes a source control device 10, a destination control device 20, and a plurality of input / output devices 30. The source control device 10, the destination control device 20, and each input / output device 30 are connected via a network 91. Each input / output device 30 is connected to a corresponding control target 40 via a transmission path 92. Each input / output device 30 is controlled independently of the other input / output devices 30. In FIG. 24 , the control transfer system 100 includes two input / output devices 30, input / output device 30A and input / output device 30B. The input / output device 30A is connected to the control target 40A. The input / output device 30B is connected to the control target 40B. Note that the control transfer system 100 may include three or more input / output devices 30.
[0102] The functions of the control source control device 10, the control destination control device 20, and the input / output device 30 included in the control transfer system 100 will be described.
[0103] *Functions of the transfer source control device 10* The transfer source control device 10 differs from the transfer source control device 10 shown in FIG. 1 in that it includes a set of a period calculation unit 11, a calculation data unit 12, and a transition support unit 14 for each of a plurality of calculation processes. A calculation process is provided for each input / output device 30. In FIG. 24, the transfer source control device 10 includes a set A of a period calculation unit 11A, a calculation data unit 12A, and a transition support unit 14A for calculation process A corresponding to input / output device 30A. Furthermore, the transfer source control device 10 includes a set B of a period calculation unit 11B, a calculation data unit 12B, and a transition support unit 14B for calculation process B corresponding to input / output device 30B.
[0104] *Functions of the Destination Control Device 20* The destination control device 20 differs from the destination control device 20 shown in FIG. 1 in that it includes an order determination unit 29. Furthermore, the destination control device 20 also differs from the destination control device 20 shown in FIG. 1 in that it includes a set of a period calculation unit 21, a calculation data unit 22, a migration control unit 24, and a reproduction data unit 25 for each of a plurality of calculation processes. Calculation processes are provided for each input / output device 30. In FIG. 24 , the destination control device 20 includes a set A of a period calculation unit 21A, a calculation data unit 22A, a migration control unit 24A, and a reproduction data unit 25A for calculation process A corresponding to input / output device 30A. Furthermore, the destination control device 20 includes a set B of a period calculation unit 21B, a calculation data unit 22B, a migration control unit 24B, and a reproduction data unit 25B for calculation process B corresponding to input / output device 30B.
[0105] The order determination unit 29 determines the order in which the plurality of arithmetic processes are transferred so that the total time required for the transfer of each arithmetic process is shortest.
[0106] *Functions of Input / Output Device 30* The functional configuration of each input / output device 30 is the same as that in the first embodiment.
[0107] ***Description of Operation*** The operation of the control transfer system 100 according to the third embodiment will be described. The operation procedure of the control transfer system 100 according to the third embodiment corresponds to the control transfer method according to the third embodiment. Furthermore, the program that realizes the operation of the control transfer system 100 according to the third embodiment corresponds to the control transfer program according to the third embodiment.
[0108] Of the three states, namely, the pre-transition state, the transition state, and the post-transition completion state, the operation in the pre-transition state differs from that in the first embodiment.
[0109] **State before transition starts** In the state before transition starts, the operation flow of the order determination unit 29 (see FIG. 25) is started. With reference to FIG. 25, the operation of the order determination unit 29 according to the third embodiment will be described. In step S171, the order determination unit 29 estimates the processing time of each calculation reproducing unit 212 in each order in which a plurality of calculation processes are transitioned. The order determination unit 29 calculates the total processing time of each calculation reproducing unit 212 for each order. Then, the order determination unit 29 determines the order in which the total processing time is shortest as the transition order. The method of identifying the order in which the total processing time is shortest is arbitrary, and may be realized, for example, by exhaustive search.
[0110] In step S172, the order determination unit 29 instructs each transition control unit 24 to transition the arithmetic processing in the transition order determined in step S171.
[0111] In the case of Fig. 24, in step S171, the order determination unit 29 estimates the processing time of the calculation reproducing unit 212A and the processing time of the calculation reproducing unit 212B for the order of calculation processing A and calculation processing B, and the order of calculation processing B and calculation processing A. Then, the order determination unit 29 calculates the sum of the processing time of the calculation reproducing unit 212A and the processing time of the calculation reproducing unit 212B for the order of calculation processing A and calculation processing B. Furthermore, the order determination unit 29 calculates the sum of the processing time of the calculation reproducing unit 212A and the processing time of the calculation reproducing unit 212B for the order of calculation processing B and calculation processing A. Then, the order determination unit 29 determines the order with the shorter total processing time as the transition order.
[0112] A specific example of a method for determining the transition order according to the third embodiment will be described with reference to FIGS. 26 and 27 . In FIGS. 26 and 27 , the order in which the period calculation units 11A and 11B transition to the period calculation units 21A and 21B, respectively, is determined. Here, the calculation periods T_cyc [ms] of the period calculation units 11A and 11B are the same. It is also assumed that the startup timings of the calculation reproducing units 212A and 212B are adjusted so that at least the calculation period C_max>=2 can be achieved. It is also assumed that the processing time required for the calculation reproducing units 212A and 212B to determine whether the Yes condition is met in step S54 of the operation flow (see FIG. 12 ) is constant regardless of the transition order. The estimated values of the processing time, in units of the calculation cycle T_cyc [ms] after the Yes condition in step S54 is satisfied and the initial execution of step S57 is started, are assumed to be t_a [ms] for the calculation reproducing unit 212A and t_b [ms] for the calculation reproducing unit 212B. It is also assumed that the processing times of the other elements are constant regardless of the transition order.
[0113] Here, the value of t_a + t_b will be estimated for the following two transition orders. <Transition Order 1> When transitioning to the periodic calculation unit 11A the first time and the periodic calculation unit 11B the second time (see FIG. 26). It is assumed that the calculation reproducing unit 212A of the periodic calculation unit 21A can set the limit number of times C_max = 11, and the difference between the estimated transition source calculation number at the start of the first reproduction calculation and the calculation number managed by the calculation data unit 22A after the first reproduction calculation is 480. It is also assumed that t_a = 48 ms * T_cyc [ms] is estimated. It is also assumed that the calculation reproducing unit 212B of the periodic calculation unit 21B can set the limit number of times C_max = 4, and the difference between the estimated transition source calculation number at the start of the first reproduction calculation and the calculation number managed by the calculation data unit 22B after the first reproduction calculation is 30. It is also assumed that t_b = 10 ms * T_cyc [ms] is estimated. In this case, t_a+t_b=58*T_cyc [ms].
[0114] <Transition Order 2> When transitioning first to periodic calculation unit 11B and then to periodic calculation unit 11A (see FIG. 27) Let us assume that the calculation reproducing unit 212B of periodic calculation unit 21B can set the limit number of times C_max = 6, and the difference between the estimated transition source calculation number at the start of the first reproduction calculation and the calculation number managed by calculation data unit 22B after the first reproduction calculation is 30. Let us also assume that t_a = 6 ms * T_cyc [ms] is estimated. Let us also assume that the calculation reproducing unit 212A of periodic calculation unit 21A can set C_max = 9, and the difference between the estimated transition source calculation number at the start of the first reproduction calculation and the calculation number managed by calculation data unit 22A after the first reproduction calculation is 480, and that t_b = 60 ms * T_cyc [ms] is estimated. In this case, t_a + t_b = 66 * T_cyc [ms].
[0115] In this case, the value of t_a+t_b is smaller in transition order 1. Therefore, the order of period calculation units 21A and 22B is determined as the transition order.
[0116] ***Effects of Embodiment 3*** As described above, the control transfer system 100 according to Embodiment 3 determines the order in which the arithmetic processes are transferred in order of shortest processing time when multiple arithmetic processes are being executed in the transfer source control device 10. This makes it possible to shorten the time required for transfer while obtaining the effects of Embodiment 1.
[0117] In addition, the word "unit" in the above description may be read as a "circuit," "step," "procedure," "process," or "processing circuit."
[0118] The embodiments and modifications of the present disclosure have been described above. Some of these embodiments and modifications may be combined and implemented. Furthermore, one or more of them may be implemented partially. Note that the present disclosure is not limited to the above embodiments and modifications, and various modifications are possible as needed.
[0119] 100 control transfer system, 10 transfer source control device, 11 periodic calculation unit, 111 calculation execution unit, 12 calculation data unit, 13 communication control unit, 14 transfer assistance unit, 15 verification information transfer unit, 20 transfer destination control device, 21 periodic calculation unit, 211 calculation execution unit, 212 calculation reproduction unit, 22 calculation data unit, 23 communication control unit, 24 transfer control unit, 241 transfer execution unit, 242 initial synchronization unit, 25 reproduction data unit, 26 verification acquisition unit, 27 verification execution unit, 28 verification data unit, 29 order determination unit, 30 input / output device, 31 input / output control unit, 32 control data unit, 33 communication control unit, 34 transfer assistance unit, 40 control target, 601 measurement value, 602 calculation result, 621 measurement value information, 622 calculation result information, 623 measurement value information request, 624 Measurement value information, 625 initial synchronization request, 626 initial synchronization information, 627 calculation result information, 628 switch preparation completion, 629 switch timing information, 6210 switch timing information, 6211 switch completion, 6212 switch completion, 6213 transfer source matching information, 6214 matching completion, 91 network, 92 transmission path.
Claims
1. a destination control device to which control of a control object is transferred from a source control device that periodically executes arithmetic processing to control the control object, an initial synchronization unit that acquires information regarding the arithmetic processing of the control device from which the transition occurs in a specific period as initial synchronization information; a calculation reproducing unit that executes the calculation process executed in the control device from the calculation period next to the specific period to a transition period to which control is transferred based on the initial synchronization information acquired by the initial synchronization unit; and a calculation execution unit that uses a result of the calculation process executed by the calculation reproduction unit to execute the calculation process after the transition period, thereby controlling the control target; A destination control device comprising:
2. The calculation reproducing unit estimates the number of times that the calculation process has been or will be executed in the control device from the calculation cycle next to the specific cycle to the transition cycle, based on an elapsed time that is the time from the specific cycle to the transition cycle and a time required for one cycle of the calculation process in the control device from the transition, and executes the calculation process the number of times. The destination control device according to claim 1 .
3. The calculation reproducing unit sets the calculation cycle in which the process is being performed as the transition cycle, and if the calculation process is not completed for the number of executions before the calculation process of the next calculation cycle is started in the control device from which the process is being performed, resets the calculation cycle in which the process is being performed to the transition cycle and adds 1 to the number of executions. The destination control device according to claim 2 .
4. The destination control device further includes: A matching acquisition unit that acquires, from the control device of the transfer source, matching information that is information for matching a processing result among information regarding the arithmetic processing executed in the control device of the transfer source from a calculation period next to the specific period to the transfer period; a collation execution unit that compares the collation information acquired by the collation acquisition unit with a result of the arithmetic processing executed by the calculation reproduction unit; The destination control device according to claim 1 .
5. the source control device periodically executes a plurality of arithmetic operations to control the controlled object; The destination control device further includes: an order determination unit that determines an order in which the plurality of arithmetic processes are transferred so that a total time required for the transfer of each arithmetic process is shortest; a transition control unit that controls the initial synchronization unit, the operation reproducing unit, and the operation executing unit so that the plurality of operation processes are transitioned one by one in accordance with the transition order determined by the order determination unit; The destination control device according to claim 1 .
6. A control transfer method for transferring control of a control object from a source control device that periodically executes a calculation process to a destination control device, The destination control device acquires information regarding the arithmetic processing of the source control device in a specific period as initial synchronization information, the destination control device executes the arithmetic processing to be executed in the source control device from the period next to the specific period to a transition period to which control is transferred, based on the initial synchronization information; A control transfer method in which the transfer destination control device uses the result of the calculation process executed based on the initial synchronization information to execute the calculation process after the transfer period, thereby controlling the controlled object.
7. a control transfer program for transferring control of a control object from a source control device that periodically executes a calculation process to control the control object to a destination control device, An initial synchronization process of acquiring information regarding the arithmetic processing of the control device from which the transition occurs in a specific period as initial synchronization information; a computation reproduction process for executing the computation process executed in the control device from the period next to the specific period to a transition period to which control is transferred, based on the initial synchronization information acquired by the initial synchronization process; and a calculation process of controlling the control target by executing the calculation process after the transition period using a result of the calculation process executed by the calculation reproduction process; A control transfer program that causes a computer to execute the above.