Control system

By synchronizing the counters used for controlling the first unit and the second unit in the FA control system and sharing the conversion information, the problem of inaccurate time management in the prior art is solved, and high-precision time management and system coordination are achieved.

CN114761889BActive Publication Date: 2025-07-22OMRON CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202080082096.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-12-25
Filing Date
2020-12-01
Publication Date
2025-07-22
Estimated Expiration
2040-12-01

AI Technical Summary

Technical Problem

In the FA control system, it is difficult for the prior art to effectively utilize the counters for high-precision control, resulting in inaccurate time management and affecting the synchronization and coordination of the system.

Method used

By introducing a synchronization unit into the FA control system, the counters used for control of the first unit and the second unit are synchronized, and information related to conversion is shared by the information storage unit, and time is calculated using external or internal clocks to ensure synchronization of the counter and time accuracy.

Benefits of technology

The use of previous control counters in the FA control system is realized, providing high-precision time management, improving the system's time synchronization and coordination capabilities, and reducing the calculation load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114761889B_ABST
    Figure CN114761889B_ABST
Patent Text Reader

Abstract

The present invention provides a structure that can utilize time using a conventional control counter. A control system for factory automation includes: a first unit (100) and a second unit (200) that exchange data; and a synchronization unit that uses a clock (191A) to synchronize a control counter (126) included in the first unit with a control counter (213) included in the second unit. Each unit stores information (30) related to conversion that is shared between the units, and the conversion calculates time based on the counter value of the counter of the unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a control system for FA (Factory Automation). Background Art

[0002] In various production sites, FA technology using control devices such as PLCs (Programmable Logic Controllers) has been widely popularized. Conventionally, in the control system of FA, the accuracy of the clock for managing the actual time has been low, so a control counter has been installed separately from the clock, but a highly accurate clock for managing the actual time has gradually become available. As such a utilization method, a structure for synchronizing the control counter with the actual time has been proposed.

[0003] For example, Japanese Patent Application Laid-Open No. 2018-190216 (Patent Document 1) discloses a structure in which a PLC has an internal clock, acquires the global time from a time server, and synchronizes the internal clock with the acquired global time.

[0004] Prior Art Documents

[0005] Patent Documents

[0006] Patent Document 1: Japanese Patent Application Laid-Open No. 2018-190216 Summary of the Invention

[0007] Problems to be Solved by the Invention

[0008] In the control system, the accuracy of the actual time that can be managed is gradually increasing. On the other hand, for the control counter, it is desired to use the conventional counter, and in the control system, it is desired to use a highly accurate time.

[0009] An object of the present disclosure is to provide a time with an accuracy that can be utilized in the environment or operation of a control system using a conventional control counter.

[0010] Means for Solving the Problems

[0011] The control system of the present disclosure is a control system for factory automation, which includes: a first unit and a second unit that exchange data; and a synchronization unit that uses a clock to synchronize the control counter included in the first unit with the control counter included in the second unit. Each unit has an information storage unit for storing information related to conversion that is shared between the units, and the conversion calculates the time based on the counter value of the counter of the unit.

[0012] According to the above disclosure, by using information related to conversion and calculating time based on the counter value, it is possible to use a conventional control counter and provide a time with an accuracy that can be utilized in the environment or operation of the control system.

[0013] In the above disclosure, the clock includes an external clock outside the unit or an internal clock possessed by one of the first unit and the second unit.

[0014] According to the above disclosure, as the clock for synchronizing the counters between units, an external clock or the internal clock of the unit can be utilized. Thereby, the control system can provide a time with the accuracy of the external clock or the internal clock of the unit, that is, with an accuracy that can be utilized in the environment or operation of the control system.

[0015] In the above disclosure, when the accuracy of the time managed by the external clock satisfies the specified conditions, the synchronization unit aligns with the time of the external clock to adjust the values of the mutually synchronized counters of the first unit and the second unit.

[0016] According to the above disclosure, when the accuracy of the external clock satisfies the specified conditions, for example, when the accuracy is high, by aligning with the time of the external clock to adjust the values of the mutually synchronized counters of the first unit and the second unit, it is possible to synchronize the counter values of the counters with the external clock.

[0017] In the above disclosure, when the accuracy of the time managed by the external clock does not satisfy the specified conditions, the synchronization unit synchronizes the counters of the first unit and the second unit based on the time managed by the internal clock.

[0018] According to the above disclosure, when the accuracy of the external clock does not satisfy the specified conditions, for example, when the accuracy is low, the values of the mutually synchronized counters of the first unit and the second unit can be synchronized based on the time of the internal clock possessed by the unit.

[0019] In the above disclosure, the information related to conversion includes a conversion formula for converting the actual time based on the difference between the counter value of each unit and the reference counter value and the reference time corresponding to the reference counter value, and the reference time includes the time of the clock.

[0020] According to the above disclosure, each unit can use the reference counter value, the time of the corresponding clock, and the counter value of the unit to calculate the time according to the conversion formula.

[0021] In the above disclosure, one unit has a management unit that manages information related to conversion shared with other units, and the management unit updates the shared information related to conversion according to the clock used in the synchronization of the control counter.

[0022] According to the above disclosure, the management unit can update the conversion-related information shared among units based on the clock used in the synchronization of the counter. For example, if the clock is an external clock, i.e., when the accuracy of the time management by the external clock meets the specified conditions, the conversion-related information is not updated and remains fixed. However, when this accuracy does not meet the specified conditions, the conversion-related information is updated based on the time of the internal clock.

[0023] In the above disclosure, when the accuracy of the time managed by the external clock does not meet the specified conditions, the management unit updates the conversion formula in the following manner: Set the counter value of one unit and the time of the internal clock corresponding to this counter value for the reference counter value and the reference time respectively.

[0024] According to the above disclosure, the conversion formula can be updated by setting the counter value corresponding to the time of the internal clock used in the synchronization of the counter.

[0025] In the above disclosure, the first unit exchanges data with the second unit via the data bus. The control system has a third unit that is network-connected to one unit. The synchronization unit further synchronizes the counter of one unit with the control counter of the third unit. The third unit stores the conversion-related information shared among units.

[0026] According to the above disclosure, the synchronization structure of the counter and the time conversion structure based on the conversion-related information can also be deployed in the units on the network.

[0027] In the above disclosure, the conversion-related information includes information related to the accuracy of the time managed by the clock used in the synchronization of the counter.

[0028] According to the above disclosure, information related to the accuracy of the time managed by the clock used in the synchronization of the counter can be provided to each unit via the conversion-related information.

[0029] In the above disclosure, each unit calculates the time according to the shared conversion-related information based on the counter value of the counter. Each unit outputs a response containing the calculated time for the time query received from the application program.

[0030] According to the above disclosure, a structure can be provided in which the application program in the unit refers to (queries) the converted time.

[0031] In the above disclosure, the conversion is performed when the query is received.

[0032] According to the above disclosure, as a structure for providing the converted time to the application program, a structure that performs the conversion at each query can be provided. Therefore, the application program can obtain the latest conversion value (time).

[0033] In the above disclosure, each unit stores the converted time, and the response includes the stored converted time.

[0034] According to the above disclosure, instead of performing the conversion every time there is an inquiry from the application, it is possible to provide the time stored (already converted) at this time. Therefore, there is no need to perform the conversion every time there is an inquiry, so the load of the conversion can be reduced.

[0035] Effects of the Invention

[0036] According to the present disclosure, it is possible to use a conventional control counter to provide a time with an accuracy that can be utilized in the environment or operation of the control system. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a diagram schematically showing an example of the overall structure of the control system of the present embodiment.

[0038] Figure 2 It is a schematic diagram showing an example of the network structure of the control system 1 of the present embodiment.

[0039] Figure 3 It is a schematic diagram showing the data communication process of the control system 1 of the present embodiment.

[0040] Figure 4 It is a schematic diagram showing an example of the structure of the units of the control device 2 of the present embodiment.

[0041] Figure 5 It is a block diagram showing an example of the hardware structure of the CPU unit 100 included in the control device 2 of the present embodiment.

[0042] Figure 6 It is a block diagram showing an example of the hardware structure of the functional unit 200 included in the control device 2 of the present embodiment.

[0043] Figure 7 It is a block diagram showing an example of the hardware structure of the functional unit 300 included in the control device 2 of the present embodiment.

[0044] Figure 8 It is a block diagram showing an example of the software structure of the CPU unit 100 of the present embodiment.

[0045] Figure 9 It is a diagram schematically showing an example of the structure for time synchronization managed by the control device 2 of the present embodiment.

[0046] Figure 10 It is a diagram schematically showing an example of the time conversion information 30 of the present embodiment.

[0047] Figure 11It is a diagram schematically showing an example of the structure of the shared time conversion information 30 of the present embodiment.

[0048] Figure 12 It is a diagram schematically showing another example of the structure of the shared time conversion information 30 of the present embodiment.

[0049] Figure 13 It is a diagram schematically showing the situation where the application program of the functional unit 200 of the present embodiment refers to the current time.

[0050] Figure 14 It is a diagram schematically showing the situation where the application program of the functional unit 200 of the present embodiment refers to the current time.

[0051] Figure 15 It is a diagram schematically showing the situation where the application program of the functional unit 200 of the present embodiment refers to the current time.

[0052] Figure 16 It is a diagram schematically showing the structure of the shared time conversion information 30 according to the accuracy of the reference clock in the present embodiment.

[0053] Figure 17 It is a flowchart of the processing when the accuracy of the reference clock of the present embodiment satisfies the specified conditions.

[0054] Figure 18 It is a flowchart of the processing when the accuracy of the reference clock of the present embodiment does not satisfy the specified conditions.

[0055] Figure 19 It is a diagram showing an example of the structure of the manufacturing execution system 400 of the present embodiment.

[0056] Figure 20 It is shown by executing Figure 19 The diagram of the DB manager provided by the DB management program 411.

[0057] Figure 21 It is a schematic diagram showing an example of the processing when the control device 2 of the present embodiment sends time series data to the manufacturing execution system 400.

[0058] Figure 22 It is a schematic diagram showing an example of the processing when the control device 2 of the present embodiment sends time series data to the manufacturing execution system 400.

[0059] Figure 23 It is a diagram schematically showing the frame of the time series data generated in the control device 2 of the present embodiment.

[0060] Figure 24It is a diagram schematically showing a frame of time series data generated in the control device 2 of the present embodiment.

[0061] Figure 25 It is a diagram schematically showing an example of the time series DB 450 of the present embodiment. Detailed Embodiment

[0062] Embodiments of the present invention will be described in detail with reference to the accompanying drawings. In addition, the same or corresponding parts in the drawings are denoted by the same reference numerals and their description will not be repeated.

[0063] <A. Application Example>

[0064] First, an example of a scenario to which the present invention is applied will be described. Figure 9 It is a diagram schematically showing an example of a structure for time synchronization managed by the control device 2 of the present embodiment. The control system for factory automation has a plurality of control devices. The control device corresponds to a PLC, for example. The control device has a first unit (CPU unit 100) and a second unit (function unit 200) that exchange data. The control system has a synchronization processing unit (synchronization processing unit 216, synchronization processing unit 114) that synchronizes a control counter 126 of the first unit with a control counter 213 of the second unit using a clock. Each unit stores time conversion information 30 related to conversion that is shared between the units and is used to convert time based on the counter value of the counter of the unit. For the time conversion information 30, the conversion information management unit 115 (conversion information management unit 215) distributes the time conversion information 30 in a manner shared between the units.

[0065] Therefore, the control system has a structure for synchronizing control counters with each other between the units and a structure for sharing time conversion information 30 related to conversion for calculating time based on the counter values of the synchronized counters between the units. By having these two structures, in the control system, the control counters of each unit can use the conventional counters to provide a structure for providing synchronized time between the units.

[0066] Among the clocks used for the synchronization of the counters, the master clock 191A as an external clock outside the unit or an internal clock of one of the first unit and the second unit (for example, the RTC (Real Time Clock) 128 of the CPU unit 100) can be included. Therefore, in the control system, time using a clock that the system can utilize, that is, time having an available environment and accuracy during operation, can be provided. Thus, the control system can provide time that can flexibly respond to the environment or operation of the system.

[0067] Hereinafter, more specific application examples of the present embodiment will be described.

[0068] In the following description, as a typical example of the "control device", a PLC will be described, but it is not limited to the name of the PLC. The technical idea disclosed in this specification can be applied to any control device. In addition, hereinafter, the entire system including the PLC (control device) will also be referred to as the "control system".

[0069] <B. Overall Structure of the Control System>

[0070] First, the overall structure of the control system applicable to FA in the present embodiment will be described. Figure 1 It is a diagram schematically showing an example of the overall structure of the control system 1 of the present embodiment.

[0071] Refer to Figure 1 , in the control system 1, the network connection has multiple levels, and different functions are assigned to each level of the network. There is no specific limitation. For example, four levels of networks 11 to 14 are provided.

[0072] The network 11 is a control-level network. The network 11 is connected to a plurality of control devices 2A, 2B, and 2C (hereinafter, sometimes also collectively referred to as "control device 2"), a device / production line management device 190, and a display device 280 that provides SCADA (Supervisory Control And Data Acquisition) function. A data link capable of exchanging data between devices is formed in the network 11. The device / production line management device 190 and the display device 280 are equivalent to the devices and equipment that manage the network connection and the production line. The main function of the network 11 is to provide the transmission of information related to the control system.

[0073] Various field devices 90 such as sensors and actuators are connected to the control device 2, for example. These field devices 90 may sometimes be directly connected to the control device 2 via the input / output unit installed in the control device 2, but may also be connected to the control device 2 via the network 110. In Figure 1 , the control device 2 is connected to one or more networks 110. One or more field devices 90 are connected to each network 110. Each of the one or more field devices 90 includes an actuator that gives a certain physical effect to a manufacturing device or a production line, etc. (hereinafter, also collectively referred to as "the field"), and an input / output device that exchanges information with the field. Therefore, in Figure 1 the control system 1 shown, in addition to the four levels of networks 11 to 14, a field-level network 110 is added.

[0074] Via the network 110, the data exchanged between the control device 2 and the field device 90 is updated in an extremely short cycle of several hundred μsec to several tens of msec. In addition, the update process of such exchanged data is also referred to as the input / output refresh process.

[0075] The network 12 is provided as a management-level network. Connected to the network 12 are a device / production line management device 190 that manages devices and production lines, and manufacturing management devices 380 and 390 that manage manufacturing plans and the like. The device / production line management device 190, the manufacturing management devices 380 and 390 exchange management information such as manufacturing plans and information on devices or production lines via the network 12.

[0076] The network 13 is provided as a computer-level network. Connected to the network 13 are the manufacturing management devices 380 and 390, and a manufacturing execution system (MES: Manufacturing Execution System) 400 that manages a time series DB (short for database) 450. The manufacturing management devices 380 and 390 and the manufacturing execution system 400 exchange production management and information system data via the network 13.

[0077] The manufacturing execution system 400 saves the input values, i.e., observed values, from the field device 90 collected via the network 13 as time series data in the order of observation into the time series DB 450.

[0078] Specifically, in the present embodiment, the control device 2 has a function of generating a frame including the specified observed value. The control device 2 transmits the generated frame to the manufacturing execution system 400 via the networks 11, 12, and 13. The manufacturing execution system 400 stores the frame of the observed value received from the control device 2 in the time series DB 450 in time series.

[0079] In the present embodiment, the data stored in the time series DB 450 is also referred to as "time series data". In the present embodiment, "time series data" refers to a series of values obtained by continuously (or discontinuously at a certain interval) observing the temporal change of data (observed values) regarding an arbitrary object.

[0080] In this specification, "observed value" is a concept that collectively refers to values (actual values) that can be used in the control operation of the control device 2. Typically, it can include values obtained from the controlled object and input into the control operation (measurement values obtained from the field, etc.), output values for the controlled object determined based on the obtained input values through the control operation (command values given to the field, etc.), arithmetic values calculated during the control operation (arbitrary variable values), etc. That is, "observed value" includes any value that can be stored as data in the control device 2 or can be output as data from the control device 2 to the outside.

[0081] The network 14 includes an external network such as the Internet. A manufacturing execution system 400 and external devices on the cloud, etc. are connected to the network 14. The manufacturing execution system 400 transfers the data in the time series DB 450 to the devices on the cloud by exchanging data with the devices on the cloud.

[0082] The control device 2 can be connected to a support device 500. The support device 500 is a device that assists the control device 2 in preparing for controlling the controlled object. The support device 500 can also be connected to the device / production line management device 190.

[0083] The control devices 2A, 2B, and 2C connected to the network 11 of the control system 1 are respectively used for different processes 3A, 3B, and 3C. Although not limited, for example, process 3A represents the assembly process of a product (workpiece), process 3B represents the painting process of the assembled product, and process 3C represents the inspection process of the painted product.

[0084] In Figure 1 In the shown control system 1, the network 12 and the networks 11 and 110 at levels below it are also called "factory networks", which provide control system communication for exchanging data used to actually control equipment (hereinafter, sometimes collectively referred to as "control system data"). On the other hand, the network 13 and the networks 14 at levels above it are also called "company networks", which provide information system communication for exchanging data used to monitor, manage, and control production activities in the production line / factory, etc. (hereinafter, sometimes collectively referred to as "information system data").

[0085] In networks 11 to 14 and network 110, protocols and architectures corresponding to such required characteristic differences are adopted. For example, as the protocol of networks 11 and 12 belonging to the factory network, EtherNet / IP (registered trademark), an industrial open network in which a control protocol is installed on the general Ethernet (registered trademark), may be used. In addition, as the protocol of network 110, EtherCAT (registered trademark), which is an example of a network for machine control, may also be adopted. In addition, the protocol of network 11 (first protocol) and the protocol of network 110 (second protocol) may be the same or different. By adopting a network technology suitable for such machine control, it is possible to provide real-time performance that guarantees the time required for transmission between devices.

[0086] On the other hand, as the protocol of the networks 13 and 14 belonging to the company network, in order to ensure the diversity of connection destinations, general-purpose Ethernet or the like is used. By adopting general-purpose Ethernet, it is possible to eliminate restrictions such as the amount of data that can be transmitted.

[0087] <C.控制系统1中的时刻同步>

[0088] exist Figure 1 In the factory network shown, a plurality of control devices 2A, 2B, and 2C connected to the network 11 respectively transmit and receive data with one or more field devices 90 connected via the network 110. Specifically, the control device 2 performs processing (input processing) of collecting data (input data) collected or generated in the field device 90, processing (calculation processing) of generating data (output data) such as instructions for the field device 90, and processing (output processing) of sending the generated output data to the target field device 90.

[0089] The arrival time of data needs to be guaranteed in the network 110. Therefore, the control device 2 has a timer that regulates the timing of data transmission and synchronizes the time between the entities that transmit and receive data (that is, one or more field devices 90).

[0090] However, when time synchronization is not achieved between the plurality of control devices 2, for example, the field device 90 connected to one control device 2 cannot be synchronized with the field device 90 connected to another control device 2. As a result, the timing of input / output refresh processing may be inconsistent, making it difficult to operate the plurality of field devices 90 connected to different control devices 2 in a coordinated manner.

[0091] Therefore, in the control system 1 of the present embodiment, the timers of the plurality of control devices 2 are synchronized with each other, thereby realizing cooperative control of the plurality of field devices 90 connected to different control devices 2, that is, between different processes.

[0092] Hereinafter, the time synchronization function provided by the control system 1 of the present embodiment will be described.

[0093] (c1. Example of network structure)

[0094] Next, an example of the network structure of the control system 1 of the present embodiment will be described. Figure 2 It is a schematic diagram showing an example of the network structure of the control system 1 of the present embodiment.

[0095] Figure 2 The control system 1 shown has a plurality of control devices 2A, 2B, and 2C and a plurality of field devices 90A to 90I. As an example, at least a part of the control devices of the control system 1 adopt a network connected in a daisy chain. The control devices 2A, 2B, and 2C each function as a master device for managing data transmission within the corresponding network 110. The field devices 90A to 90I function as slave devices that perform data transmission according to instructions from the corresponding master device.

[0096] The control devices 2A, 2B, and 2C are connected to the network 11 (upper-level network) of the control level. The network 11 is connected to, for example, the device / production line management device 190.

[0097] On the network 110 connected to the control device 2A, the field devices 90A, 90B, and 90C are sequentially connected in a daisy chain. On the network 110 connected to the control device 2B, the field devices 90D, 90E, and 90F are sequentially connected in a daisy chain. On the network 110 connected to the control device 2C, the field devices 90G, 90H, and 90I are sequentially connected in a daisy chain.

[0098] Within the network 110, the control device 2 and one or more field devices 90 can both be regarded as communication devices having a data transmission function. In Figure 2 the example shown, the control device 2 and one or more field devices 90 each have the following function: when receiving data transmitted on the network from a certain communication device connected adjacent to it, the data is transmitted to other communication devices connected adjacent to it as needed.

[0099] In the control system 1 of the present embodiment, between the plurality of communication devices connected to the network 110, that is, the control device 2 and one or more field devices 90, transmission and reception timing synchronization (corresponding to time synchronization (3) in the figure) is performed. Specifically, the control device 2 and one or more field devices 90 each have a timer (or a counter that increments or decrements synchronously) that are mutually time-synchronized. The control device 2 and one or more field devices 90 each determine the timing of data transmission or reception according to their time-synchronized timers or counters.

[0100] In addition, in the present embodiment, "timing" represents the concept of a period, time, or moment when a certain phenomenon occurs. In addition, "time synchronization" means synchronizing timers, time data, etc. that each has.

[0101] Referring to Figure 2 , the control device 2A has a timer 102A, and the field devices 90A, 90B, and 90C each have timers 91A, 91B, and 91C, respectively. The timer 102A of the control device 2A functions as a master device, and the timers 91A, 91B, and 91C of the field devices 90A, 90B, and 90C synchronize their timings based on this master device. For example, values based on the timer value of the timer 102A are set in the timers 91A, 91B, and 91C.

[0102] The control device 2B has a timer 102B, and the field devices 90D, 90E, and 90F each have timers 91D, 91E, and 91F, respectively. The timer 102B of the control device 2B functions as a master device, and the timers 91D, 91E, and 91F of the field devices 90D, 90E, and 90F synchronize their timings based on this master device. For example, values based on the timer value of the timer 102B are set in the timers 91D, 91E, and 91F.

[0103] The control device 2C has a timer 102C, and the field devices 90G, 90H, and 90I each have timers 91G, 91H, and 91I, respectively. The timer 102C of the control device 2C functions as a master device, and the timers 91G, 91H, and 91I of the field devices 90G, 90H, and 90I synchronize their timings based on this master device. For example, values based on the timer value of the timer 102C are set in the timers 91G, 91H, and 91I.

[0104] That is, the control devices 2A, 2B, and 2C each function as a master device that manages data transmission within the corresponding network 110, and the field devices 90 connected to each control device 2 function as slave devices that perform data transmission according to instructions from the master device. By making the timers mutually time-synchronized between the master device and the slave device, it is possible to make the transmission timings of data, etc. mutually consistent between the control device 2 and the field device 90 that constitute the network 110.

[0105] In Figure 2In the example shown, the control device 2A also has a timer 101A synchronized with the time of the timer 102A. The control device 2B also has a timer 101B synchronized with the time of the timer 102B. The control device 2C also has a timer 101C synchronized with the time of the timer 102C (equivalent to time synchronization (2) in the figure). In the control system 1, for example, any one of the timers 101A, 101B, and 101C can function as the master device for the entire control system 1.

[0106] As an example, in Figure 2 , the timer 101A of the control device 2A is set as the master device, and the timers of the control devices 2B and 2C are synchronized with this master device in terms of time. Thereby, time synchronization can be performed mutually among the plurality of control devices 2A, 2B, and 2C (equivalent to time synchronization (1) in the figure).

[0107] In this way, the plurality of control devices 2A, 2B, and 2C respectively have inter-device timers (timers 101A, 101B, and 101C) that are mutually time-synchronized among the plurality of control devices 2A, 2B, and 2C, and device-to-device timers (timers 102A, 102B, and 102C) that are time-synchronized with one or more field devices 90 connected via the network 110. The inter-device timers and the device-to-device timers are mutually time-synchronized. As a result, the device-to-device timers (timer 102A) that are time-synchronized between the control device 2A and the field devices 90A, 90B, and 90C, the device-to-device timers (timer 102B) that are time-synchronized between the control device 2B and the field devices 90D, 90E, and 90F, and the device-to-device timers (timer 102C) that are time-synchronized between the control device 2C and the field devices 90G, 90H, and 90I are mutually time-synchronized.

[0108] In addition, in Figure 2 , a structural example in which the timer of any one of the control devices 2 is set as the master device has been described, but the time obtained from the outside via the network 11 can also be used as the master device, or the timer of an external device such as the device / line management device 190 can also be used as the master device.

[0109] (c2. Data communication for time synchronization)

[0110] Figure 3 is a schematic diagram showing the data communication process of the control system 1 of the present embodiment. Referring to Figure 3 , data is exchanged between the control device 2A connected to the network 110 and the plurality of field devices 90A, 90B, and 90C at a predetermined system cycle.

[0111] Data is also exchanged between the control device 2B and the plurality of field devices 90D, 90E, and 90F, and between the control device 2C and the plurality of field devices 90G, 90H, and 90I according to the system cycle. Through such data exchange, control actions of the control device 2 and the field devices 90 are realized. In the following description, communication on the network 110 is also referred to as "lower network (NW) communication".

[0112] The control devices 2A, 2B, and 2C connected to the upper network 11 exchange data collected from the field devices 90 by input processing, output data generated by calculation processing, and the like according to a predetermined system cycle. Through such data exchange, the field devices 90 connected to the control device 2A, the field devices 90 connected to the control device 2B, and the field devices 90 connected to the control device 2C can be operated in a linked manner. In other words, the field devices 90 can be operated in a linked manner between different processes. In the following description, communication on the network 11 is also referred to as "upper network (NW) communication".

[0113] In the control system 1 of the present embodiment, the timing at which data transmission in the lower network communication should be started is determined based on the timers that are constantly synchronized between the plurality of control devices 2A, 2B, and 2C. As a result, the timing of data exchange with the field device 90 can be made consistent between the plurality of control devices 2A, 2B, and 2C, and as a result, the control timing of the field device 90 can be synchronized between different processes.

[0114] <D.控制装置2的结构和时刻同步>

[0115] Figure 4 Schematic diagram showing a configuration example of a unit of the control device 2 of the present embodiment. Figure 4 The control device 2 of the control system 1 includes a CPU (Central Processing Unit) unit 100 (hereinafter referred to as the CPU unit 100), one or more functional units 200, and one or more functional units 300. Figure 4 In the embodiment, the number of the functional units 300 included in the control device 2 is set to four, but the number is not limited to four as long as the number is one or more. In addition, the number of the functional units 200 included in the control device 2 is set to two, but the number is not limited to two as long as the number is one or more. The CPU unit 100 connects one or more functional units 200 to the data bus 111 via the signal line 113. In addition, the CPU unit 100 connects one or more functional units 300 via the data bus 112.

[0116] The data bus 111 is not limited and is, for example, a bus of an I / O serial interface that follows PCIe (PCI Express (Peripheral Component Interconnect Express)). The signal line 113 is an optical fiber cable or an electrical signal cable and transmits a time synchronization signal 130, which will be described later, as a trigger signal.

[0117] The CPU unit 100 has a program execution unit that executes a program created according to a control target. More specifically, the CPU unit 100 corresponds to an arithmetic processing unit that executes a system program and various user programs.

[0118] The function unit 200 performs communication processing or information processing. The function unit 200 has an interface connected to the data bus 111 and a signal port 212P connected to the signal line 113. The function unit 200 is arranged in an intermediary manner between the network 11 and the control device 2, whereby the CPU unit 100 can perform data communication with devices connected to the network 11 via the function unit 200. In addition, by connecting the signal line 113 between the signal port 110P of the CPU unit 100 and the signal port 212P of the function unit 200, the CPU unit 100 and the function unit 200 receive the time synchronization signal 130 via the signal line 113.

[0119] In the present embodiment, the function unit 200 monitors access to the CPU unit 100 from the Internet such as the network 14 and access to the CPU unit 100 from other devices within the network 11, and when detecting the occurrence of certain security events, notifies the inside or outside of the control device 2 of the detected security events. In addition, the information processing performed by the function unit 200 is not limited to security monitoring processing.

[0120] The function unit 300 has the function of a so-called I / O unit that exchanges signals with control target devices and apparatuses such as the field device 90 and various devices (sensors, actuators, etc.) arranged thereon. Specifically, the function unit 300 outputs an instruction value calculated in the CPU unit 100 to the field or collects an input value from the field. As the function unit 300, for example, it has one or more of a DI (Digital Input) module that receives a digital signal from a control target, a DO (Digital Output) module that outputs a digital signal to a control target, an AI (Analog Input) module that receives an analog signal from a control target, and an AO (Analog Output) module that outputs an analog signal to a control target. And, as the function unit 300, it may include a controller equipped with special functions such as PID (Proportional Integral Derivative) control or motion control.

[0121] The functional unit 200 or the functional unit 300 can be provided as an expansion unit that can be detachably externally mounted on the CPU unit 100.

[0122] (d1. Structure of the CPU unit 100)

[0123] Figure 5 It is a block diagram showing an example of the hardware structure of the CPU unit 100 included in the control device 2 of the present embodiment.

[0124] The CPU unit 100 includes a processor 102, a chipset 104, a main storage device 106, a secondary storage device 108, an upper network controller 105, a USB (Universal Serial Bus) controller 107, a memory card interface 109, local bus controllers 120, 122, a field network controller 118, a counter 126, an RTC (Real Time Clock) 128, and a signal port 110P.

[0125] The processor 102 is composed of a CPU, an MPU (microprocessor unit), a GPU (Graphics Processing Unit), etc., reads various programs stored in the secondary storage device 108, expands and executes them in the main storage device 106, thereby realizing control corresponding to the control object and various processes as described later. The secondary storage device 108 is composed of a non-volatile storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), etc. The main storage device 106 is composed of a volatile storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory), etc.

[0126] The chipset 104 realizes the processing of the entire CPU unit 100 by controlling the processor 102 and each device.

[0127] In the secondary storage device 108, in addition to the system program for implementing basic functions, a user program created according to the manufacturing device or equipment to be controlled is also stored. Further, time conversion information 30 is stored in the secondary storage device 108. The time conversion information 30 represents information related to conversion for calculating the time (actual time) based on the values of the counters provided in respective units. Further, a time series database as described later is also stored in the secondary storage device 108. Note that the device storing the time conversion information 30 is not limited to the secondary storage device 108, and it may be stored in the main storage device 106.

[0128] The upper network controller 105 exchanges data with the manufacturing execution system 400 or a device on the cloud (refer to Figure 1 ) etc. via the upper network 11. The USB controller 107 controls data exchange with the support device 500 via a USB connection.

[0129] The memory card interface 109 is configured to be able to attach and detach the memory card 116, write data to the memory card 116, and read various data (user program, trace data, etc.) from the memory card 116.

[0130] The counter 126 serves as a time reference for managing the execution timing of various processes in the CPU unit 100. Typically, the counter 126 increments or decrements the counter value at each specified cycle. As the counter 126, a high-precision event timer (HPET: High Precision Event Timer) which is a hardware timer configured on the system bus of the drive processor 102 or the like can be used for installation, or a dedicated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array) can also be used for installation.

[0131] The RTC 128 is a type of counter having a timekeeping function and provides the current time to the processor 102 and the like.

[0132] The local bus controller 122 is an interface for exchanging data between the function units 300-1, 300-2, … that can be connected to the CPU unit 100. The local bus controller 122 has a counter 124, and the counter 124 is used as a time reference for managing timing between other devices, namely the function units 300-1, 300-2, … connected via the data bus 112. Similarly, the function units 300-1, 300-2, … also each have a counter 125, and the counter 125 is used as a time reference for managing timing between the local bus controller 122 and other function units 300. Regarding the counter 124 and the counter 125, the same structure as the above-mentioned counter 126 can be adopted.

[0133] The field network controller 118 controls data exchange with other devices including the field device 90 via the network 110. The field network controller 118 has a counter 119, and the counter 119 is used as a time reference for managing timing between other devices. In Figure 5 it, the timers 91 of the field device 90 are represented by counters 91A, 91B, ….

[0134] The local bus controller 120 is an interface for exchanging data between the function units 200-1, 200-2, … that can be connected to the CPU unit 100. The local bus controller 120 has a counter 121, and the counter 121 is used as a time reference for managing timing between other devices, namely the function units 200-1, 200-2, … connected via the data bus 111. Similarly, the function units 200-1, 200-2, … also each have a counter 213, and the counter 213 is used as a time reference for managing timing between the local bus controller 120. The counter 121 and the counter 213 can adopt the same structure as the above-mentioned counter 126.

[0135] In addition, each device on the network 110 also has a counter used as a time reference for managing timing between the field network controller 118.

[0136] Regarding the counter 119 and the counters (counters 91) of devices such as the field device 90, the same structure as the above-mentioned counter 126 can be adopted.

[0137] The on-site network controller 118 functions as a communication master device for performing constant-cycle communication via the network 110, successively monitors the difference between the counter value indicated by the counter of each device connected to the field bus and the counter value indicated by the counter 119, and outputs a synchronization signal for indicating correction to the device with a deviation in the counter value as needed. In this way, the on-site network controller 118 has a synchronization management function of providing an instruction to the device to make the counter value indicated by the counter of the device consistent with the counter value indicated by the counter 119.

[0138] The signal port 110P is connected to the signal line 113 of the transmission time synchronization signal 130.

[0139] In Figure 5 the CPU unit 100, the counter 119, the counter 121, and the counter 124 are synchronized with the counter 126.

[0140] In Figure 5 a structural example of providing the required functions by executing a program by the processor 102 is shown, but a dedicated hardware circuit (for example, an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array), etc.) can also be used to install a part or all of these provided functions. Alternatively, hardware following a general architecture (for example, an industrial personal computer based on a general personal computer) can also be used to implement the main part of the CPU unit 100. In this case, virtualization technology can also be used to execute multiple operating systems (OSs) with different uses in parallel, and execute the required application programs on each OS.

[0141] In the control system 1 of the present embodiment, the CPU unit 100 and the support device 500 are configured separately, but a structure in which all or a part of these functions are integrated into a single device can also be adopted.

[0142] (d2. Structure of the functional unit 200)

[0143] Figure 6 is a block diagram showing a hardware structure example of the functional unit 200 included in the control device 2 of the present embodiment. Referring to Figure 6 , the functional unit 200 includes a processor 202, a chipset 204, a main memory 206, a storage 208, an inter-unit interface 210, a network interface 220, and a signal port 212P. The signal port 212P is connected to the signal line 113 of the transmission time synchronization signal 130.

[0144] The processor 202 is composed of a CPU, an MPU, a GPU, etc. Similar to the above CPU unit 100, the functional unit 200 includes one or more processors 202 and / or a processor 202 having one or more cores. The chipset 204 realizes the processing of the entire functional unit 200 by controlling the processor 202 and peripheral components. The chipset 204 includes a signal generator 205 which is a circuit element for generating the time synchronization signal 130. The time synchronization signal 130 from the signal generator 205 is sent to the signal line 113 via the signal port 212P. The main memory 206 is composed of volatile storage devices such as DRAM and SRAM. The storage 208 is composed of non-volatile storage devices such as flash memory, etc.

[0145] The processor 202 reads various programs stored in the storage 208, expands and executes them in the main memory 206, thereby realizing processing such as monitoring of security events. In the storage 208, a system program 22 including an OS (Operating System) 27 for realizing basic processing and a user program 20 are stored. In addition, the storage 208 stores time conversion information 30 which is information related to the conversion for calculating the actual time based on the counter value of the counter 213, and has a storage area 21 for storing the time series data of the observed values collected by the functional unit 200. In addition, the storage device storing the time conversion information 30 is not limited to the storage 208, and may also be the main memory 206.

[0146] The user program 20 includes a time management program 26 for managing the time processed by the functional unit 200 and a security program 24 for security monitoring processing. The time management program 26 includes a counter synchronization program 23 for synchronizing the counters between units and a correction program 25 for correcting the counter value during execution. When the security program 24 is executed, it performs security monitoring processing based on the security settings determined in advance by a predetermined rule, etc. of the user or manager of the specified control device 2, collects the observed values based on the processing results, and stores them as time series data in the storage area 21. The counter value correction processing is implemented by executing the correction program 25, and the correction processing will be described later.

[0147] The inter-unit interface 210 connects to the data bus 111. The inter-unit interface 210 exchanges data with the CPU unit 100 or other functional units 200 via the data bus 111.

[0148] The inter-unit interface 210 has: a data communication circuit 211 which has a controller (denoted as Tx / Rx CTRL in the figure) and a buffer for transmitting and receiving data between the CPU unit 100 or other functional units 200; and a counter 213.

[0149] The network interface 220 includes a controller (denoted as Tx / Rx CTRL in the figure) 222 and a buffer 226 for exchanging data via the network 11.

[0150] The buffers included in the inter-unit interface 210 and the network interface 220 are equivalent to storage units that temporarily store data to be transmitted, received data, etc. The counter 213 has the same structure as the counter 126 (refer to Figure 5 ) included in the CPU unit 100.

[0151] The network interface 220 and the inter-unit interface 210 of the functional unit 200 have, for example, a NIC (Network Interface Card). Additionally, Figure 6 a structural example is shown in which the required processing is implemented by the processor 202 executing a program, but a dedicated hardware circuit (such as an ASIC or FPGA, etc.) can also be used to install a part or all of the provided processing.

[0152] (d3. Structure of the functional unit 300)

[0153] Figure 7 is a block diagram showing a hardware structure example of the functional unit 300 included in the control device 2 of the present embodiment. Referring to Figure 7 , the functional unit 300 provides various functions required to implement the control of the control system 1 over various machines or devices, etc. More specifically, each functional unit 300 includes a functional module 157, an I / O (input / output) interface 159, and a communication circuit 161.

[0154] The functional module 157 is the part that performs the main processing of each functional unit 300 and is responsible for collecting on-site information from the controlled machine or device, etc., and outputting command signals to the controlled machine or device, etc.

[0155] The I / O interface 159 is a circuit that mediates the signal exchange with the controlled machine or device, etc.

[0156] The communication circuit 161 processes the data sequentially transmitted on the data bus 112. That is, when the communication circuit 161 receives certain data via the data bus 112, after processing the received data, it sends the communication data to the functional unit 300 located at the next position on the data bus 112. The communication circuit 161 provides such a function of relaying data.

[0157] More specifically, the communication circuit 161 includes transceiver ports 162, 164, a controller for transceiver (denoted as Tx / Rx CTRL in the figure) 166, and a counter 168.

[0158] The transceiver ports 162 and 164 are parts physically connected to the data bus 112, and perform processes such as receiving and reproducing the data transmitted on the data bus 112 according to instructions from the controller 166, thereby realizing the sequential transmission of data.

[0159] The controller 166 performs data processing such as reading out the data transmitted on the data bus 112 and changing the data.

[0160] The counter 168 generates a clock serving as a timing reference for the instruction output of the controller 166 or the execution of processing in the function module 157, etc. The counter 168 can also adopt, for example, a counter based on a real-time clock, but in this embodiment, a free-running counter that performs increment counting (increment) at a specified cycle can be applied.

[0161] (d4. Software structure example of the CPU unit 100)

[0162] Next, a software structure example of the CPU unit 100 constituting the control system 1 of this embodiment will be described.

[0163] Figure 8 is a block diagram showing a software structure example of the CPU unit 100 of this embodiment. Refer to Figure 8 , the CPU unit 100 includes a PLC engine 150, a time series database 180, an upper layer connection program 192, and a gateway program 194.

[0164] The PLC engine 150 executes various programs in various program execution environments. Typically, this execution environment is provided by the processor 102 of the CPU unit 100 reading out the system program stored in the secondary storage device 108 and expanding and executing it in the main storage device 106.

[0165] More specifically, the PLC engine 150 includes a control program 152, a variable management program 160, a scheduler 170, an input program 172, an output program 174, a time synchronization program 177, and a conversion information management program 179. Regarding the variable management program 160, the scheduler 170, the input program 172, and the output program 174, they can also be installed as part of the system program. In this case, the respective functions provided by these programs can also be provided by a single system program.

[0166] The control program 152 typically consists of a user program 154, a database write program 156, and a serialization communication program 158. The user program 154 corresponds to the main part providing the control operation function and can be arbitrarily configured according to manufacturing devices, equipment, etc. that are the control objects of the CPU unit 100. The user program 154 can be defined, for example, by ladder logic using function blocks, etc.

[0167] The database writing program 156 is called by a command specified within the user program 154 and writes the specified data to the time-series database 180.

[0168] The serialization communication program 158 performs serialization processing on the data written from the database writing program 156 to the time-series database 180. More specifically, the serialization communication program 158 executes processing (serialization) for converting time-series data into a byte string that can be saved. After the target data is converted into a specified byte string through the serialization processing, it is saved in the time-series database 180. Additionally, it is not necessary to perform serialization processing according to the data writing speed and data volume to the time-series database 180, etc. That is, the serialization communication program 158 is an optional structure.

[0169] The variable management program 160 manages values that can be utilized in the PLC engine 150 in the form of variables. More specifically, the variable management program 160 manages system variables representing the status of the CPU unit 100, etc., device variables representing values held by various devices connected to the CPU unit 100 via the local bus or field bus, and user variables representing values held by the user program 154 executed by the CPU unit 100.

[0170] The input program 172 provides a function for acquiring input data from various devices connected to the CPU unit 100 via the local bus or field bus.

[0171] The output program 174 outputs the command value (output data) calculated by the user program 154 executed in the CPU unit 100 to the target device connected via the data bus 112 or network 110.

[0172] The time synchronization program 177 achieves time synchronization among the execution cycle of the control program within the CPU unit 100, the functional unit 200 connected to the data bus 112, and the field device 90 connected to the network 110. The time synchronization program 177 has a calibration program 178 for appropriately calibrating the timer managed for achieving time synchronization. The calibration processing described later is implemented by executing the calibration program 178, and the calibration processing will be described later.

[0173] The conversion information management program 179 realizes the management of conversion information related to the conversion for calculating time based on the counter value. The management of the conversion information realized by the conversion information management program 179 includes the sharing of conversion information between units. The sharing of conversion information is achieved, for example, by distributing the time conversion information 30 to other units.

[0174] The scheduler 170 manages resource allocation, execution timing, etc. for processes or tasks of the CPU unit 100. Such processes or tasks include processes or tasks that can be generated by executing the control program 152, variable management program 160, input program 172, output program 174, time synchronization program 177, and conversion information management program 179, etc. by the CPU unit 100.

[0175] The time series database 180 is typically configured in the main storage device 106 or the secondary storage device 108, equipped with the function of storing data, and equipped with the retrieval function of responding to a specified data in response to a request (query) from the outside. The time series database 180 stores the time series data 182 written by the database writing program 156. That is, the time series database 180 stores at least a part of the input data, output data, operation data calculated in the control operation of the control program 152, manufacturing data, and event data in time series. Such input data and output data include the data received by the CPU unit 100 from the functional unit 300, and the data sent by the CPU unit 100 to the functional unit 300. In addition, the event data may include the data related to safety monitoring received by the CPU unit 100 from the functional unit 200.

[0176] The upper connection program 192 exchanges data with an external device connected to the manufacturing execution system 400, etc. and the upper network 13. In the CPU unit 100 of the present embodiment, it is possible to output input data or operation data from the CPU unit 100 to the manufacturing execution system 400, and receive manufacturing information from the manufacturing execution system 400. In this way, the upper connection program 192 provides a manufacturing data acquisition function for acquiring manufacturing data from the manufacturing execution system 400 associated with the control object.

[0177] In the present embodiment, the manufacturing execution system 400 has a time series DB 450. In this case, it is possible to set the database connection program 193 (represented by "DB" in the figure) instead of the upper connection program 192, or as a part of the upper connection program 192. The database connection program 193 can also execute processes such as sending a query such as SQL to a relational database and receiving a response, for example. By executing the database connection program 193, the time series data 182 of the time series database 180 in the CPU unit 100 can be transmitted to the manufacturing execution system 400 and stored in the time series DB 450. The detailed content of the time series data output to the manufacturing execution system 400 through the database connection program 193 will be described later.

[0178] The gateway program 194 communicates with the devices on the cloud. For example, it provides the time series data 182 of the time series database 180 to the devices providing IoT services on the cloud. Specifically, the gateway program 194 acquires the specified type of data from the time series database 180 at a specified cycle and outputs it as time series data. The time series data output to the IoT service providing device by the gateway program 194 can, for example, have the same structure as the time series data output to the manufacturing execution system 400 by the database connection program 193.

[0179] The input program 172 of the CPU unit 100 acquires input data from field devices 90 such as sensors via the data buses 111, 112 and / or the network 110.

[0180] The upper connection program 192 of the CPU unit 100 acquires manufacturing data from the manufacturing execution system 400. The variable management program 160 manages these acquired input data and manufacturing data as variables.

[0181] The user program 154 executes a pre-specified control operation while referring to the system variables, device variables, and user variables managed by the variable management program 160, and outputs the execution result (output data) to the variable management program 160.

[0182] The output program 174 outputs the output data calculated by the control operation of the user program 154 as a control output, and outputs it to field devices 90 such as actuators via the data bus 112 and / or the network 110.

[0183] The database write program 156 writes the specified observed values of the variables managed by the variable management program 160 to the time series database 180.

[0184] The upper connection program 192 outputs the values of the specified variables among the variables managed by the variable management program 160 and / or the specified data in the time series data 182 stored in the time series database 180 as time series data to the manufacturing execution system 400.

[0185] The gateway program 194 outputs the values of the specified variables among the variables managed by the variable management program 160 and / or the specified data in the time series data 182 stored in the time series database 180 as time series data to the IoT service. The device providing the IoT service provides services such as behavior analysis based on the time series data from the CPU unit 100 and predictive maintenance of devices or apparatuses to be controlled, etc.

[0186] <Structure of time synchronization>

[0187] First, the control device 2 of the present embodiment has a function of synchronizing time and a counter (hereinafter, also referred to as "time synchronization" and "counter synchronization", respectively).

[0188] In this specification, "time" refers to a moment indicating a certain point in the time flow, and is defined using units such as hours, minutes, and seconds. The "counter" includes a value for controlling timing in the control device 2 and associated devices, and basically represents a value that is successively increased or decreased by a specified value every predetermined unit time (hereinafter, the value indicated by the counter is also referred to as "counter value"). In the present embodiment, although not limited, the counter value corresponds to the value of a timer, and represents, for example, a 64-bit integer value that can represent nanosecond-level.

[0189] In the present embodiment, time synchronization using the counter value is adopted between the units constituting the control device 2 and between each unit and other devices including the field device 90.

[0190] Refer to again Figure 9 , the structure of each control device 2 for receiving (acquiring) the counter value of the master clock that is the reference clock for managing the actual time from the network 11, and the structure for achieving time synchronization triggered by the time synchronization signal 130 will be described. In Figure 9 , the time synchronization signal 130 is generated by the signal generator 205 shown in the Figure 6 of the functional unit 200 and transmitted to the signal line 113.

[0191] Structures for achieving such time synchronization can include, for example, the case where the network 11 performs data communication according to TSN (Time-Sensitive Networking); and the case where the network 11 performs data communication according to EtherCAT (registered trademark: Ethernet for Control Automation Technology). In addition, the standard applied to the network 11 is not limited to this, and for example, it can also be IEEE1588.

[0192] Refer to Figure 9 , the master clock 191A for managing time is provided by, for example, the device / line management device 190 on the network 11. The master clock 191A represents, for example, the absolute time (actual time) managed by the time synchronization server configured on the Internet. The master clock 191A can be used as a reference clock for counter synchronization, and the master clock 191A as the reference clock can also be set in other devices on the network 11.

[0193] The CPU unit 100 has a synchronization processing unit 114 by executing a timing synchronization program 177. The synchronization processing unit 114 communicates with the device / production line management device 190 via the upper network controller 105 and refers to the master clock 191A. The synchronization processing unit 114 uses the function of the device / production line management device 190 as a timing synchronization server to correct the transmission delay of the network 11, etc. when obtaining the time of the master clock 191A. Thus, the synchronization processing unit 114 can obtain a more accurate time from the master clock 191A. In addition, when obtaining the time using the timing synchronization protocol, the synchronization processing unit 114 latches the counter value of the counter 126 at the timing when the timing synchronization protocol is executed. Thus, the association between the time obtained from the master clock 191A and the counter value is obtained. The result of such an association becomes the "time conversion information 30". Maintaining the association is equivalent to the synchronization between the master clock 191A and the CPU unit 100. In addition, when maintaining this association, it is possible to update the "time conversion information 30", update the time within the unit (the time of the RTC 128), and correct the counter.

[0194] The functional unit 200 has a synchronization processing unit 216 implemented by executing a counter synchronization program 23. The synchronization processing unit 216 of the functional unit 200, for example, receives the counter value of the counter 126 from the CPU unit 100 via the data bus 111 at startup and sets the received counter value in the counter 213. After that, the synchronization processing unit 216 periodically updates (increments or decrements) the counter value of the counter 213 in synchronization with the output from the internal hardware circuit and sets the updated value in the control counter 213. Thus, the counter value of the counter 213 is periodically updated.

[0195] In the CPU unit 100, the scheduler 170 performs scheduling of the control program 152, etc. based on the control counter 126. In addition, the input program 172 and the output program 174 perform timing synchronization with each device based on the counters 119 and 124 synchronized with the counter 126. Thus, it is possible to perform scheduling of the control program 152, etc. within the CPU unit 100 and timing synchronization between each device connected to the control device 2 and the control device 2 based on the master clock 191A. As a result, it is possible to perform scheduling of the control program, etc. within the CPU unit 100 and input / output between each device (field device 90, etc.) connected to the control device 2 and the control device 2 in synchronization with the master clock 191A.

[0196] (e1. Counter adjustment process performed by the synchronization processing unit)

[0197] In the present embodiment, for example, the update of the counter value of the counter 126 is performed in synchronization with the output signal of the hardware circuit inside the CPU unit 100. Therefore, there is a possibility that the difference (hereinafter, also referred to as the synchronization deviation) between the counter value of the counter 213 of the functional unit 200 and the counter value of the counter 126 of the CPU unit 100 becomes large due to errors in the hardware circuit or the like. If the synchronization deviation becomes large, it may become impossible to schedule the control program inside the CPU unit 100 and perform input / output between each device connected to the control device 2 and the control device 2 in synchronization with the main clock 191A. In addition, the main cause of the above difference is not limited to errors in the hardware circuit or the like.

[0198] To prevent such a situation, the synchronization processing unit 216 of the functional unit 200 and the synchronization processing unit 114 of the CPU unit 100 perform a correction process for reducing the synchronization deviation. This correction process is achieved by executing the correction program 178 in the synchronization processing unit 114 and by executing the correction program 25 in the synchronization processing unit 216. The synchronization processing unit 114 and the synchronization processing unit 216 use the time synchronization signal 130 from the signal line 113 as a trigger and perform a correction process including a latching process.

[0199] In the latching process, when the synchronization processing unit 114 and the synchronization processing unit 216 receive (input) the time synchronization signal 130, they latch (acquire) the counter values of the counter 126 and the counter 213, and store the latched counter values in a specified storage area. Then, the synchronization processing unit 114 and the synchronization processing unit 216 exchange and compare the latched counter values with each other via the data bus 111, derive the difference between the counter values (hereinafter, also referred to as the synchronization deviation) based on the comparison result, and adjust the counter value of the corresponding counter using an adjustment value based on the difference so as to make the derived difference smaller. This adjustment includes, for example, a counter value correction process of adding or subtracting the adjustment value to / from the counter value.

[0200] In addition, the timing for performing the adjustment of the synchronization deviation may be the time point when the time synchronization signal 130 is received, or may be after a specified time has elapsed since the time synchronization signal 130 was received.

[0201] In addition, the transmission source unit of the time synchronization signal 130 is not limited to the functional unit 200, and may be other units included in the control system 1. In the present embodiment, the time synchronization signal 130 is output periodically, for example, every 1 msec, but is not limited to the periodically output manner. For example, the functional unit 200 may also output the time synchronization signal 130 when the counter value of the counter 213 becomes equal to a certain indicated value.

[0202] (e2. Switching of the clock providing the actual time)

[0203] In the above-described embodiment, the master clock 191A is used as the reference clock for synchronizing the counters, but the reference clock for time synchronization can be switched.

[0204] Specifically, the synchronization processing unit 114 (or the synchronization processing unit 216) determines whether the accuracy of the time (e.g., milliseconds, microseconds, etc.) received from the master clock 191A satisfies a specified condition. In addition, the index of the time accuracy is not limited to milliseconds, microseconds, etc. For example, the index may include information such as the accuracy of the server (server name, etc.) that is the supply source (time source) of the master clock 191A, the synchronization protocol, and the timezone indicated by the master clock 191A. Therefore, the specified condition may include the condition that the value indicated by the time accuracy index is a specified value. When it is determined that the accuracy of the time supplied by the master clock 191A satisfies the specified condition, in the above-described time synchronization, the counter values of the counters 126 and 213 are adjusted to align with the time received from the master clock 191A.

[0205] On the other hand, when the synchronization processing unit 114 (or the synchronization processing unit 216) determines that the accuracy of the time received from the master clock 191A does not satisfy the specified condition, the counters 126 of the CPU unit 100 and the counter 213 of the functional unit 200 are synchronized based on the time managed by the internal clock of one of the CPU unit 100 and the functional unit 200. In the present embodiment, the RTC 128 is used as this internal clock, but in the case where the functional unit 200 has an internal clock corresponding to the RTC, the internal clock of the functional unit 200 may also be used as the reference clock.

[0206] In the present embodiment, the synchronization processing unit 114 (or the synchronization processing unit 216) does not limit the accuracy of the time managed by the master clock 191A, and can be obtained from the configuration information indicating the structure of the control system 1, for example.

[0207] (e3. Another installation example of time synchronization)

[0208] Refer to Figure 9 , the control system 1 may also have a unit 370 different from the CPU unit 100 and the functional unit 200, and cause the unit 370 to perform the above-described time synchronization processing.

[0209] Unit 370 can be connected to signal line 113 and data bus 111. Unit 370 has a hardware processor. By executing a program through the hardware processor, the counter 126 of CPU unit 100 and the counter 213 of function unit 200 are synchronized. Specifically, when the time synchronization signal 130 is detected in signal line 113, unit 370 reads out the counter values from counter 126 and counter 213 via data bus 111. Unit 370 uses the read counter values to correct the counter values of counter 126 and 213 in a manner that reduces the synchronization deviation as described above. Unit 370 sets the corrected counter values for each counter via data bus 111.

[0210] As described above, in each control device 2, using the time of the master clock 191A, (i) time synchronization is achieved between units, and (ii) time synchronization is achieved between each unit and the device connected to that unit, and (iii) in CPU unit 100, time synchronization related to the execution of control program 152, input program 172, and output program 174 is achieved through scheduler program 170. Also, by implementing time synchronization using the common master clock 191A in each control device 2, (iv) time synchronization can be achieved between different control devices 2. Additionally, in the case where there is a control device 2 for each different process, time synchronization can be implemented between different processes.

[0211] <F. Time conversion information and examples of conversion>

[0212] Figure 10 is a diagram schematically showing an example of the time conversion information 30 of the present embodiment. The time conversion information 30 is shared between units and contains information related to the conversion for calculating the actual time based on the value of the counter. For example, the time conversion information 30 includes a conversion formula 36 and a conversion table 35 shared between units. In the present embodiment, the sharing of the conversion formula between units is achieved using Figure 10 the conversion table 35 shown.

[0213] The conversion formula 36 is, for example, currentTOD = baseTOD + (currentCount - baseCount). The conversion formula 36 is as follows: By using (currentCount - baseCount) of the control counter value to calculate the elapsed time from the reference time (baseTOD) and adding this calculated value to the reference time (baseTOD), the current actual time (currentTOD) is obtained.

[0214] Refer to Figure 10, the conversion table 35 and the elements 31 of the table respectively contain the description 32 of the element, an example of the model / unit 33, and an example of the value 34. The element 31 includes, for example, "baseCount", "baseTOD", "timezone", and "timeSource". "baseCount" and "baseTOD" represent the operands of the conversion formula 36. Specifically, "baseCount" is the control counter value as a reference, and in the present embodiment, it represents the counter value of the counter 126 of the CPU unit 100. In addition, "baseTOD" is a value paired with the value of "baseCount", and in the present embodiment, it represents the clock value of the RTC 128 of the CPU unit 100, that is, the TOD value.

[0215] of the CPU unit 100 Figure 11 The time management unit 117 shown sets the values read from the element 31 of the conversion table 35 for the operands (baseCount) and (baseTOD) of the conversion formula 36 respectively, and sets the current counter value of the control counter 126 as the operand (currentCount), thereby calculating the value of (currentTOD) representing the current actual time according to the conversion formula 36. Similarly, the conversion information management unit 215 described later of the functional unit 200 sets the values read from the element 31 of the conversion table 35 for the operands (baseCount) and (baseTOD) of the conversion formula 36 respectively, and sets the current counter value of the control counter 213 as the operand (currentCount), thereby calculating the value of (currentTOD) representing the current actual time according to the conversion formula 36. In addition, during the operation, appropriate conversion of the unit is performed.

[0216] As an example of the conversion, in the case of the conversion table 35 and currentCount = 333444555666, the current actual time is converted as follows.

[0217] currentTOD = {seconds = 1558436425, nanoseconds = 849614166} (= May 21 20:00:25 2019 (JST))

[0218] In addition, "timezone" and "timeSource" in the element 31 of the conversion table 35 are an example of information related to the accuracy of the time managed by the clock used in the synchronization of the counter, and can also be processed as option information during the conversion.

[0219] <G. Sharing of the time conversion information 30>

[0220] In the present embodiment, for example, a master device (e.g., the CPU unit 100) distributes the time conversion information 30 to slave devices (e.g., the functional unit 200) so that the time conversion information 30 is shared among the units.

[0221] Figure 11 FIG. is an example of a diagram schematically showing the structure for sharing the time conversion information 30 of the present embodiment. In Figure 11 this figure, for example, two slave devices (functional units 200) are connected to the master device (CPU unit 100). In addition, the number of slave devices connected to the master device is one or more.

[0222] The conversion information management unit 115 of the master device distributes (sends) the time conversion information 30 stored in the secondary storage device 108 to each slave device (equivalent to the (1) distribution in the figure). This distribution is performed, for example, via the data bus 111. The slave device has a conversion information management unit 215 implemented by executing the time management program 26. The conversion information management unit 215 receives the time conversion information 30 sent from the master device, stores it in the memory 208, and uses the time conversion information 30 to calculate the above-mentioned current time (currentTOD). In addition, the conversion information management unit 215 adjusts the current time managed by the time manager 214 of the OS 27 with the calculated current time (equivalent to the (2) adjustment in the figure). As a result, in each slave device, the current time managed by the OS 27 can be updated to the current time (currentTOD) calculated based on the time conversion information 30 shared among the units, and thus the current time managed by the units can be synchronized with each other among the units.

[0223] In addition, when the functional unit 200 has an internal clock corresponding to the RTC 128 and synchronizes the main clock 191A with this internal clock, the conversion information management unit of the functional unit 200 becomes the master device, manages the time conversion information 30, and distributes it to the CPU unit 100 as a slave device.

[0224] (g1. Other examples of sharing the time conversion information 30)

[0225] In the present embodiment, for example, in order to share the time conversion information 30 among the units, the slave devices to which the master device distributes the time conversion information 30 are not limited to the functional unit 200. Among such slave devices, for example, the functional unit 300 or the field device 90 may be included. Figure 12 FIG. is a diagram schematically showing another example of the structure for sharing the time conversion information 30 of the present embodiment.

[0226] In Figure 12 this figure, for example, a field device 90 connected to the network 110 is shown as a unit sharing the time conversion information 30 with the master device.

[0227] The CPU unit 100 synchronizes time with the field devices 90A, 90B, and 90C connected via the network 110 (e.g., EtherCAT (registered trademark)). More specifically, the control counter 119 of the CPU unit 100 synchronizes time with the counters 91A, 91B, and 91C of the field devices 90A, 90B, and 90C. In Figure 12 this case, the time conversion information 30 from the master device is issued to the field device 90B, but it can also be issued to other field devices.

[0228] In addition, in Figure 12 this case, the "baseCount" and "baseTOD" of the element 31 of the shared conversion table 35 become the pair of the clock (e.g., DistributedClock (DC) in EtherCAT) value synchronized between devices by the protocol of the network 110 and the corresponding TOD value.

[0229] According to Figure 12 this, the CPU unit 100 transmits and receives data to and from the functional unit 200 via the data bus 111, and communicates with the third unit connected to the network 110. The synchronization processing unit synchronizes the counter 126 of the CPU unit 100 with the control counter 91 of the field device 90. In Figure 12 this case, as the counter 126 of the CPU unit 100, the counter 119 synchronized with this counter 126 is shown. The field device 90 stores the time conversion information 30 issued from the CPU unit 100. Thus, it is possible to synchronize the control counters between the CPU unit 100, the functional unit 200, and the field device 90, and it is possible to share the time conversion information 30 between the units.

[0230] <H. Structure for Referring to the Current Time>

[0231] Figure 13 、 Figure 14 and Figure 15 are diagrams schematically showing the case where the application program of the functional unit 200 of the present embodiment refers to the current time. The application program of the functional unit is not limited, and may include, for example, the security program 24. Figure 13 represents the case where the application program asks the OS 27 about the current time, Figure 14 and Figure 15 represent the case where the application program asks the conversion information management unit 215 about the current time.

[0232] Refer to Figure 13, when the application asks the OS 27 for the current time (step (1)), the time manager 214 of the OS 27 responds by sending the managed current time back to the application (step (2)). In Figure 13 this case, the existing application can obtain the current time at the normal interface, that is, the current time calculated according to the time conversion information 30 shared among units by the conversion information management unit 215.

[0233] Refer to Figure 14 , when the application asks the conversion information management unit 215 for the current time (step (1)), the conversion information management unit 215 refers to (reads out) the current counter value from the control counter 213 (step (2)), uses this counter value as (currentCount), calculates the current time according to the conversion table 35 and the conversion formula 36 (step (3)), and sends the calculated current time back to the application as a response (step (4)). In Figure 14 this case, when the conversion information management unit 215 receives the query, it uses the counter value (currentCount) shown by the counter 213 to calculate the current time, so the application can obtain the current time with high precision.

[0234] In Figure 15 this case, the conversion information management unit 215 internally holds the current counter value of the counter 213 and the current time calculated according to the time conversion information 30, and appropriately updates the held current time (step (1)). When the conversion information management unit 215 receives a query about the current time from the application (step (2)), it sends the calculated current time held as a response back to the application (step (3)). In Figure 15 this case, even if the application makes queries at a high frequency, the conversion information management unit 215 only returns the held current time (that is, it is not necessary to calculate the current time every time a query is made), so it is possible to avoid high-frequency access of the conversion information management unit 215 to the hardware (for example, the counter 213).

[0235] In addition, each unit can provide one of the methods according to the Figures 13 - 15 shown cases, or can also provide multiple methods.

[0236] <I. Sharing of the time conversion information 30 corresponding to the reference clock accuracy>

[0237] Figure 16 is a diagram schematically showing the structure of sharing the time conversion information 30 according to the accuracy of the reference clock in this embodiment. In Figure 16 , for example, two functional units 200 connected to the CPU unit 100 via the data bus 111 are shown. The two functional units 200 are inFigure 16 It is divided into a functional unit 200A and a functional unit 200B, but these functional units have the same structure. In Figure 16 this, the functional unit 200A among these functional units 200 communicates with an external time server that provides the main clock 191A. Figure 17 It is a flowchart of the process when the accuracy of the reference clock in this embodiment satisfies the specified conditions. Figure 18 It is a flowchart of the process when the accuracy of the reference clock in this embodiment does not satisfy the specified conditions. This reference clock corresponds to, for example, the main clock 191A, and the main clock 191A is, for example, the highest-level main clock of TSN provided by the device / production line management device 190.

[0238] Refer to Figure 17 , and appropriately refer to Figure 9 to describe the process when the accuracy of the time managed by the main clock 191A satisfies the specified conditions. In this case, the time conversion information 30 is fixed. First, Figure 16 the synchronization processing unit 216 of the functional unit 200A ( Figure 9 ) implements a time synchronization protocol with the device / production line management device 190 (step S1). For example, in step S1, the synchronization processing unit 216 inquires about the current time (actual time) of the main clock 191A (step S3) and receives the current time of the main clock 191A from the device / production line management device 190 (step S5).

[0239] The synchronization processing unit 216 obtains the synchronization result 261 ( Figure 16 ) (step S7) and sends the obtained synchronization result 261 to the CPU unit 100 (step S9). This synchronization result 261 includes (the counter value of the counter 213 corresponding to the actual time of the main clock 191A).

[0240] The synchronization processing unit 114 of the CPU unit 100 ( Figure 9 ) receives the synchronization result 261 from the functional unit 200A (step S11) and analyzes the received synchronization result (step S13). In the analysis, the synchronization processing unit 114 compares the actual time and the counter value of the synchronization result 261 with the values of "baseTOD" and "baseCount" in the conversion table 35 respectively, and based on the comparison result, adjusts (corrects) the counter value of the counter 126 ( Figure 9 ) to synchronize with the passage of the external actual time (step S15). The corrected (added or subtracted) counter value is set in the counter 126.

[0241] Specifically, the synchronization processing unit 114 calculates the differences between the elements 31 (baseCount, baseTOD) of the currently held conversion table 35 and the result 261 of the synchronization obtained this time for the time of day (TOD) and the counter value, respectively.

[0242] The calculated difference in TOD and the difference between the differences of the counter values (= the difference in the elapsed time on TOD and the elapsed time on the counter) become the difference (advance, delay) of the progress of the control counter 126 with respect to the master clock 191A as the external clock. The synchronization processing unit 114 corrects the control counter of the controller to cancel out the calculated difference in the progress of the control counter 126. During the correction, subtraction or addition operations are performed little by little each time, taking time in a manner that does not affect the control being executed. In addition, the correction may also include the correction of the speed itself of the control counter 126.

[0243] After that, triggered by the time synchronization signal 130 ( Figure 9 ), the synchronization processing unit 114 and the synchronization processing unit 216 perform the above-described time synchronization processing (steps S17, S19). The time synchronization processing triggered by this time synchronization signal 130 is also similarly performed between the synchronization processing unit 216 of the functional unit 200B and the synchronization processing unit 114 of the CPU unit 100.

[0244] In addition, the processing of step S15 is not performed when the control system 1 is started and at the time of execution of the first time synchronization protocol. That is, this is because the time conversion information 30 including the conversion formula 36 for calculating the difference has not yet been stored in each unit. At this time, the CPU unit 100 uses the result 261 of the synchronization to update the time conversion information 30 including the conversion formula 36 and publishes the updated time conversion information 30 to the unit group, thereby sharing it among the units.

[0245] In Figure 17 , by correcting the control counter 126 of the CPU unit 100 using the result 261 of the synchronization, that is, by synchronizing the counter 126 with the master clock 191A, the control counters of the respective units can be synchronized with the master clock 191A. By periodically performing the processing of step S1, the control counters of the respective units can be synchronized with the master clock 191A with high precision (reducing the synchronization deviation). The control system 1 can obtain the actual time from an external high-precision clock (master clock 191A) and operate the time of the entire system and the control counter in synchronization therewith.

[0246] In contrast, in Figure 18 's processing, the correction of the control counter 126 using the result 261 of the synchronization is not performed, and the conversion information management unit 115 ( Figure 9Update (change) the conversion table 35 based on the synchronization result 261.

[0247] Refer to Figure 18 , appropriately refer to Figure 9 Describe the processing in the case where the accuracy of the time managed by the master clock 191A does not meet the specified conditions. In this case, the time conversion information 30 is updated according to the synchronization result 261. First, Figure 16 The synchronization processing unit 216 of the functional unit 200A ( Figure 9 ) implements a time synchronization protocol (steps S1, S3, S5) with the device / production line management device 190. The synchronization processing unit 216 obtains the synchronization result 261 ( Figure 16 )(step S7), and sends the obtained synchronization result 261 to the CPU unit 100 (step S9). The synchronization processing unit 114 of the CPU unit 100 ( Figure 9 ) receives the synchronization result 261 from the functional unit 200A (step S11).

[0248] The conversion information management unit 115 updates the time conversion information 30 based on the received synchronization result 261 (step S21), and sends (publishes) the updated time conversion information 30 to the functional unit 200A (step S23). The conversion information management unit 215 of the functional unit 200 receives the time conversion information 30 (step S25), and uses the received updated time conversion information 30 to update (overwrite) the original time conversion information 30 in the memory 208 (step S27).

[0249] Then, the synchronization processing unit 114 and the synchronization processing unit 216 synchronize the counter 126 of the CPU unit 100 with the counter 213 of the functional unit 200 (steps S24, S28).

[0250] In step S21 above, the conversion information management unit 115 analyzes the synchronization result 261, updates the conversion table 35 based on the analysis result, and updates the current time of the RTC 128. For example, this update is repeatedly performed (performed over time) using a small adjustment amount so as not to cause a large time change. Here, when the synchronization result 261 is in the form of only time, the conversion information management unit 115 changes the synchronization result 261 to (time, the counter value corresponding to that time) using the current counter value of the counter 126. The conversion information management unit 115 sets the time represented by the synchronization result 261 and the counter value corresponding to that time as "baseTOD" and "baseCount" respectively in the conversion table 35, and updates the conversion table 35.

[0251] In addition, in Figure 18In this case, the synchronization process of the counter is performed after the release of the time conversion information 30, but the timing of performing the synchronization process is not limited to this. Between the functional unit 200B and the CPU unit 100, the processes related to the update and sharing of the time conversion information 30 (steps S23, S25, S27) and the time synchronization process triggered by the time synchronization signal 130 (steps S24, S28) are similarly performed.

[0252] In Figure 18 this case, using the synchronization result 261, the RTC 128 of the CPU unit 100 is time-synchronized with the main clock 191A, that is, the counter 126 is synchronized with the main clock 191A. Thus, through the time conversion process using the time conversion information 30 in each unit, the time obtained from the main clock 191A can be shared between the units.

[0253] In addition, the functional unit 200B can communicate with an external server having a main clock 191. In this case, the same processes as those performed in the functional unit 200A ( Figure 17 and Figure 18 ) can also be performed in the functional unit 200B.

[0254] <J. Processing of Time-Series Data>

[0255] Figure 19 FIG. is a diagram showing a structural example of the manufacturing execution system 400 of the present embodiment. As an example, the manufacturing execution system 400 is implemented using hardware conforming to a general architecture (for example, a general personal computer).

[0256] Referring to Figure 19 , the manufacturing execution system 400 includes a processor 402, a main memory 404, an input unit 406, an output unit 408, a storage 410, an optical drive 415, a USB controller 420 for communicating with an external device, and a network interface 413 connecting to networks 13 and 14. These components are connected via a processor bus 418.

[0257] The processor 402 is composed of a CPU, a GPU, etc., reads the program stored in the storage 410, expands and executes it in the main memory 404, thereby implementing various processes described later.

[0258] The main memory 404 is composed of a volatile storage device such as a DRAM or an SRAM. The storage 410 is composed of a non-volatile storage device such as an HDD or an SSD, for example.

[0259] In the memory 410, in addition to the OS 412 for implementing basic functions, various programs for providing the functions of the manufacturing execution system 400 are also stored. The various programs include a DB management program 411. In addition, the memory 410 has an area for storing the time series DB 450.

[0260] The input unit 406 is composed of a keyboard, a mouse, etc., and accepts user operations on the manufacturing execution system 400. The output unit 408 is composed of a display, various indicators, a printer, etc., and outputs the processing results from the processor 402.

[0261] The manufacturing execution system 400 has an optical drive 415, reads the program stored in a recording medium 414 (such as an optical recording medium such as a DVD (Digital Versatile Disc)) that non-volatilely stores computer-readable programs, and installs it in the memory 410, etc.

[0262] In Figure 19 shows a structural example of providing the functions required for the manufacturing execution system 400 by executing a program by the processor 402, but a dedicated hardware circuit (such as an ASIC or an FPGA, etc.) can also be used to install a part or all of these provided functions.

[0263] Figure 20 represents Figure 19 a diagram of the DB manager provided by executing the Figure 20 DB management program 411. Referring to

[0264] (J1. Synchronization of Observation Value Time)

[0265] Figure 21 and Figure 22 are schematic diagrams showing an example of the processing when the control device 2 of the present embodiment sends time series data to the manufacturing execution system 400. Figure 21 represents the case where the time synchronization process is not implemented, Figure 22 represents the case where the time synchronization process is implemented. Figure 23 and Figure 24 are schematic diagrams showing the frames of the time series data generated in the control device 2 of the present embodiment. Figure 25 is a schematic diagram showing an example of the time series DB 450 of the present embodiment.

[0266] Figure 21The structure in which the control devices 2A and 2B are connected to the manufacturing execution system 400 via the upper-level network 13 is shown. In Figure 21 the structure shown, it is assumed that time synchronization is not performed between the control device 2A and the control device 2B.

[0267] Each time-series data includes the observed values collected by the control devices 2A and 2B and the time corresponding to each observed value. Conversely, in Figure 21 the structure shown, the control devices 2A and 2B can only attach the time as information indicating the collection timing of each observed value. The time is managed separately by the control devices 2A and 2B, and the time synchronization is incomplete.

[0268] As a result, the times are not completely consistent among the time-series data collected by the manufacturing execution system 400, so the DB manager 451 cannot accurately align the timing to summarize (i.e., merge) each time-series data.

[0269] In contrast, in Figure 22 the structure shown, the control device 2A and the control device 2B have the above-mentioned time-synchronized counters and the time calculated based on the time conversion information 30. As a result, in the frames of the time-series data respectively sent from the control devices 2A and 2B, the time (e.g., the time calculated based on the time conversion information 30) indicating the collection timing of each observed value and the counter value can be included corresponding to the observed values collected in the processes 3A and 3B. An example of these frames is as shown in Figure 23 and Figure 24 shown. In Figure 23 , the frame of the time-series data sent from the control device 2A to the time-series DB 450 is shown, and in Figure 24 , the frame of the time-series data sent from the control device 2B to the time-series DB 450 is shown.

[0270] The DB manager 451 can use the counter value or time of the time-series data of the frames respectively received from the control devices 2A and 2B to make the timing of the observed values included in the time-series data consistent. That is, the DB manager 451 summarizes the observed values collected by different control devices 2 (different processes) so that the time axes are substantially completely consistent, and as shown in Figure 25 , saves the summarized data as row data in the time-series DB 450. The row data saved in the time-series DB 450 is used for the analysis of the observed values, for example.

[0271] <K. Advantages>

[0272] In the present embodiment, each unit (functional unit 200, CPU unit 100, functional unit 300, field device 90) can use the existing control counter of the unit to achieve time synchronization with the main clock 191A and time synchronization between units. In this case, each unit does not need to install and execute a special time reference protocol (for example, a costly protocol having a structure for compensating for fluctuations in the required time for communication).

[0273] Regarding the above time synchronization, as Figure 16 shown, any one of the units in the unit group in which the control counters are synchronized with each other establishes a time synchronization relationship with the external main clock 191A, whereby all the mutually time-synchronized units can share the same time (the time of the main clock 191A).

[0274] If the control counter of each unit is temporarily synchronized with the main clock 191A, then the "counter value" can be made independent of the time of the main clock 191A thereafter. Thus, even in the presence of changes in the structure and environment related to the control system 1, such as the presence or absence of an external time server, low management accuracy of the time of the time server, and discontinuous changes in the time provided by the time server, in the control system 1, the control counters of each unit can be maintained in a mutually time-synchronized state. This can maintain a stable control operation in the control system 1.

[0275] <L. Note>

[0276] The present embodiment as described above includes the following technical ideas.

[0277] [Structure 1]

[0278] A control system (1), which is a control system for factory automation, the control system (1) having:

[0279] a first unit (100) and a second unit (200) that exchange data; and

[0280] synchronization units (115, 215, 370) that use clocks (191A, 128) to synchronize the control counter (126) of the first unit with the control counter (213) of the second unit,

[0281] each unit has an information storage unit (108, 208), and the information storage unit (108, 208) is used to store conversion-related information (30) shared between units, and the conversion is to calculate time based on the counter value of the counter of the unit.

[0282] [Structure 2]

[0283] In the control system described in Structure 1,

[0284] The clock includes an external clock (191A) outside the unit, or an internal clock (128) possessed by one of the first unit and the second unit.

[0285] [Structure 3]

[0286] In the control system described in Structure 2,

[0287] When the accuracy of the time managed by the external clock satisfies the specified conditions, the synchronization unit aligns with the time of the external clock to adjust the values of the counters for mutual synchronization of the first unit and the second unit.

[0288] [Structure 4]

[0289] In the control system described in Structure 2 or 3,

[0290] When the accuracy of the time managed by the external clock does not satisfy the specified conditions, the synchronization unit synchronizes the counters of the first unit and the second unit based on the time managed by the internal clock.

[0291] [Structure 5]

[0292] In the control system described in any one of Structures 2 to 4,

[0293] The information related to the conversion includes a conversion formula (36) for converting the actual time based on the difference between the counter value of each unit and the reference counter value, and the reference time corresponding to the reference counter value.

[0294] The reference time includes the time of the clock.

[0295] [Structure 6]

[0296] In the control system described in Structure 5,

[0297] One unit has a management unit (115, 215) that manages information related to the conversion shared with other units.

[0298] The management unit updates the shared information related to the conversion according to the clock used in the synchronization of the control counters.

[0299] [Structure 7]

[0300] In the control system described in Structure 6,

[0301] When the accuracy of the time managed by the external clock does not meet the specified conditions, the management unit updates the conversion formula in the following manner: the counter value of the one unit and the time of the internal clock corresponding to the counter value are respectively set for the reference counter value and the reference time.

[0302] [Structure 8]

[0303] In the control system described in any one of Structures 2 to 7,

[0304] The first unit exchanges data with the second unit via the data bus (111).

[0305] The control system has a third unit (90) connected to the network (110) with the one unit.

[0306] The synchronization unit further synchronizes the counter of the one unit with the control counter (91) of the third unit.

[0307] The third unit stores the conversion-related information shared among the units.

[0308] [Structure 9]

[0309] In the control system described in any one of Structures 1 to 8,

[0310] The conversion-related information includes the information related to the accuracy of the time managed by the clock used in the synchronization of the counter.

[0311] [Structure 10]

[0312] In the control system described in any one of Structures 1 to 9,

[0313] Each unit converts the time according to the shared conversion-related information based on the counter value of the counter.

[0314] Each unit outputs a response including the converted time for the time inquiry received from the application program.

[0315] [Structure 11]

[0316] In the control system described in Structure 10,

[0317] The conversion is performed when the inquiry is received.

[0318] [Structure 12]

[0319] In the control system described in Structure 10 or 11,

[0320] Each of the units stores the calculated time.

[0321] The response includes the stored calculated time.

[0322] The embodiments disclosed herein should be considered illustrative in all respects and not restrictive. The scope of the present invention is represented by the claims, not by the above description, and is intended to include the equivalents of the claims and all modifications within the scope.

[0323] Reference Signs Explanation

[0324] 1: Control system; 2: Control device; 11, 12, 13, 14, 110: Network; 23: Counter synchronization program; 24: Security program; 25, 178: Calibration program; 26: Time management program; 30: Time conversion information; 35: Conversion table; 36: Conversion formula; 90: Field device; 91A, 119, 121, 124, 125, 126, 168, 213: Counter; 100: CPU unit; 370: Unit; 111, 112: Data bus; 113: Signal line; 114, 216: Synchronization processing unit; 115, 215: Conversion information management unit; 130: Time synchronization signal; 177: Time synchronization program; 179: Conversion information management program; 200: Functional unit; 205: Signal generator; 261: Result of synchronization.

Claims

1. A control system, which is a control system for factory automation, wherein, The control system has multiple units, and the multiple units include: The first unit, which has a counter for first control; and The second unit, which has a counter for second control and exchanges data with the first unit, The control system further has a synchronization unit that uses a reference clock to synchronize the counter for first control with the counter for second control, The first unit has a first information storage unit for storing conversion information used to calculate a time based on the time managed by the reference clock and the counter value of the counter for first control, The second unit has a second information storage unit for storing conversion information used to calculate a time based on the time managed by the reference clock and the counter value of the counter for second control, The conversion information is shared between the first unit and the second unit, The synchronization unit determines whether the accuracy of the time managed by an external clock in a network outside the control system meets a specified condition. When the accuracy of the time managed by the external clock meets the specified condition, the external clock is used as the reference clock, and the counter values of the counter for first control of the first unit and the counter for second control of the second unit are adjusted according to the time managed by the reference clock. When the accuracy of the time managed by the external clock does not meet the specified condition, an internal clock included in one of the first unit and the second unit is used as the reference clock, and the counter for first control of the first unit and the counter for second control of the second unit are synchronized according to the time managed by the reference clock, Each of the multiple units converts the counter value of the corresponding counter into the time according to the shared conversion information, and outputs a response including the converted time in response to an inquiry about the time received from an application program.

2. The control system according to claim 1, wherein, Each of the conversion information includes a conversion formula for converting an actual time based on the difference between the counter value of each unit including the first unit and the second unit and a reference counter value, and a reference time representing each of the reference counter values, The reference time is the time of the reference clock.

3. The control system according to claim 2, wherein, One of the first unit and the second unit has a management unit for managing the conversion information shared with the other unit of the first unit and the second unit, The management unit updates the shared conversion information according to the reference clock used in the synchronization of the counter for first control and the counter for second control.

4. The control system according to claim 3, wherein, When the accuracy of the management unit at the time managed by the external clock does not meet the specified conditions, the conversion formula is updated in the following manner: for the reference counter value and the reference time, the counter value of one of the first unit and the second unit and the time of the internal clock corresponding to the counter value are respectively set.

5. The control system according to claim 3, wherein The management unit publishes the updated conversion information of one of the first unit and the second unit to the other units.

6. The control system according to any one of claims 1 to 5, wherein The first unit exchanges data with the second unit via a data bus. The plurality of units further include a third unit that is network-connected to one of the first unit and the second unit. The synchronization unit further synchronizes the counter of one of the first unit and the second unit with the control counter of the third unit. The third unit stores the conversion information shared among the units.

7. The control system according to any one of claims 1 to 5, wherein The conversion information includes information related to the accuracy of the time managed by the reference clock used in the synchronization of the counters.

8. The control system according to claim 1, wherein The conversion is performed when the inquiry is received.

9. The control system according to claim 1, wherein Each unit stores the calculated time. The response includes the stored calculated time.

Citation Information

Patent Citations

  • Control device, time stamp correction method, program, and data structure

    JP2018190216A

  • Apparatus and method for controlling an automated installation

    CN107395304A

  • Control apparatus and information processing method

    CN108572613A