Control device and program

The control device and program efficiently store and analyze data by constructing reference and differential records in chronological order, addressing the inefficiencies in existing control devices, enabling effective data management and analysis in Factory Automation systems.

WO2024224962A1PCT designated stage expired Publication Date: 2024-10-31OMRON CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/013743
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2024-04-03
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Existing control devices in Factory Automation, such as PLCs, face inefficiencies in data storage and post-mortem analysis due to the lack of mechanisms for efficient data management and synchronization, particularly in storing data in chronological order according to the execution cycle of control calculations.

Method used

A control device and program that utilize a processing unit for cyclic execution, a database for storing data in chronological order, and a data writing mechanism to construct reference and differential records based on predetermined conditions, ensuring efficient data storage and synchronization with field devices, allowing for efficient data storage and reproduction of time-series data.

Benefits of technology

This solution enables more efficient data storage and analysis by constructing delta records based on changes, reducing storage capacity and facilitating post-mortem analysis with high time accuracy, thus improving the scalability and performance of control systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024013743_31102024_PF_FP_ABST
    Figure JP2024013743_31102024_PF_FP_ABST
Patent Text Reader

Abstract

This control device comprises: a processing unit that cyclically executes, at a predetermined execution cycle, control operations including the collection of input data from a field device, the calculation of output data based on the input data according to a predetermined user program, and the output of calculated output data; a database that stores, in time series, designated data from among data managed by the processing unit; and a data writing means for executing data writing to the database at the same cycle as the execution cycle at which the control operations are cyclically executed. The data writing means includes a means for constructing a reference record for designated data, and a means for constructing a difference record for the designated data when a prescribed condition is satisfied.
Need to check novelty before this filing date? Find Prior Art

Description

Control device and program

[0001] The present disclosure relates to a control device having a database that stores data in chronological order, and a program for realizing the control device.

[0002] Factory automation (FA) technology using control devices such as programmable controllers (PLCs) is becoming widespread in various production sites, and there is a need for retrospective analysis of data handled by such control devices.

[0003] In particular, advances in ICT (Information and Communication Technology) have made it possible for control devices to collect and store large amounts of data.

[0004] Even when a configuration is adopted in which a large amount of data is collected in a database built into the control device as described above, a mechanism is needed to facilitate subsequent analysis and interpretation.

[0005] In this regard, Japanese Patent Laid-Open Publication No. 2018-151726 (Patent Document 1) discloses a control device capable of storing data in accordance with the execution cycle of control calculations.

[0006] JP 2018-151726 A

[0007] On the other hand, it is necessary to store data more efficiently in order to store data in accordance with the execution cycle of the control calculation.

[0008] The present disclosure is intended to solve the above-mentioned problems, and has an object to provide a control device and a program that enable more efficient data storage.

[0009] A control device according to an example of the present disclosure includes a processing unit that cyclically executes control operations at a predetermined execution period, the control operations including collecting input data from field devices, calculating output data based on the input data in accordance with a predetermined user program, and outputting the calculated output data, a database that chronologically stores specified data from among the data managed by the processing unit, and data writing means for writing data to the database at the same execution period as the cyclic execution period of the control operations. The data writing means includes means for constructing a reference record of the specified data and means for constructing a difference record of the specified data when a predetermined condition is met.

[0010] The means for constructing a reference record constructs a reference record of the specified data for each first timing, and the means for constructing a differential record constructs a differential record of the specified data when a predetermined condition is satisfied for each second timing different from the first timing.

[0011] The means for constructing a difference record constructs a difference record of the specified data when there is a change based on a comparison between the previously specified data and the currently specified data as a predetermined condition.

[0012] The control device is connected to field devices that are time-synchronized with each other, and data stored in the database is provided with time information indicating when the data was collected by the field device.

[0013] The database stores records of a Key-Value store type, with time information as the Key and the value of the corresponding data and quality information of the data as the Value.

[0014] The system further comprises a reproducing means for reproducing the time-series data stored in the database, and the reproducing means reconstructs, based on the reference record, differential records among the corresponding data stored in the database during reproduction, and outputs the reconstructed records.

[0015] A program for realizing a control device according to an example of the present disclosure, the program causes a computer to execute a step of cyclically executing a control operation at a predetermined execution period, the control operation including collecting input data from field devices, calculating output data based on the input data according to a predetermined user program, and outputting the calculated output data, the computer having a database that stores specified data from among the data managed by the control operation in chronological order, the program causes the computer to execute a step of writing data to the database at the same period as the execution period in which the control operation is cyclically executed, the step of writing data including a step of constructing a reference record of the specified data and a step of constructing a difference record of the specified data if a predetermined condition is satisfied.

[0016] The control device and program of the present disclosure can achieve more efficient data storage.

[0017] FIG. 1 is a schematic diagram showing an example of the overall configuration of a control system 1 according to the present embodiment. FIG. 2 is a block diagram showing an example of the hardware configuration of a control device 100 constituting the control system 1 according to the present embodiment. FIG. 3 is a block diagram showing an example of the software configuration of the control device 100 constituting the control system 1 according to the present embodiment. FIG. 4 is a schematic diagram outlining the data structure of a time series database 180 implemented in the control device 100 according to the present embodiment. FIG. 5 is a schematic diagram for explaining cyclic execution processing and writing processing to the time series database in the control device 100 according to the present embodiment. FIG. 6 is a diagram explaining a specific example of data stored in the time series database 180 according to the embodiment and a comparative example. FIG. 7 is a flow diagram explaining processing of a data writing program according to the embodiment. FIG. 8 is a diagram explaining playback processing according to data in the time series database based on the embodiment.

[0018] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail with reference to the accompanying drawings, in which the same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated.

[0019] <A. Example of Overall Configuration of Control System> First, an example of the overall configuration of a control system 1 including a control device according to this embodiment will be described.

[0020] 1 is a schematic diagram showing an example of the overall configuration of a control system 1 according to the present embodiment. Referring to FIG. 1, control system 1 according to the present embodiment includes, as main components, a control device 100 that controls a control target, and a support device 200 that is connected to control device 100.

[0021] The control device 100 may be embodied as a type of computer, such as a programmable logic controller (PLC). The control device 100 is connected to a group of field devices 6 via a first field bus 2, and is connected to one or more display devices 300 via a second field bus 4. The control device 100 exchanges data with the connected devices via each bus or network.

[0022] The control device 100 has a control and calculation function that executes various calculations to control manufacturing devices and facilities. In addition to the control and calculation function, the control device 100 has an input / output function that acquires data (hereinafter also referred to as "input data") measured by the field device group 6 and transferred to the control device 100, as well as various data calculated by the control and calculation function, and a time-series database 180. In the following description, "database" will also be referred to as "DB." The time-series database 180 stores various data acquired by the input / output function in chronological order, as will be described later.

[0023] It is preferable to adopt a bus or network that performs periodic communication and guarantees data arrival time as the first field bus 2 and the second field bus 4. Known examples of such periodic communication buses or networks include EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), and CompoNet (registered trademark).

[0024] The field device group 6 includes devices that collect input data from controlled objects or control-related manufacturing equipment, production lines, etc. (hereinafter collectively referred to as "fields"). Possible devices for collecting such input data include input relays and various sensors (e.g., analog sensors, temperature sensors, vibration sensors, etc.). The field device group 6 further includes devices that perform some kind of action on the field based on commands (hereinafter also referred to as "output data") generated by the control device 100. Possible devices for performing some kind of action on the field include output relays, contactors, servo drivers and servo motors, and any other actuators.

[0025] In this way, the control calculation function of the control device 100 acquires input data from the controlled object, and determines output data for the controlled object by executing control calculations based on the acquired input data.

[0026] The field devices 6 exchange data including input data and output data with the control device 100 via the first field bus 2. In the configuration example shown in Fig. 1, the field devices 6 include a remote I / O (Input / Output) device 12, a relay group 14, an image sensor 18, a camera 20, a servo driver 22, and a servo motor 24. The field devices 6 are not limited to these, and any devices that can collect input data or perform some action based on output data may be used.

[0027] The remote I / O device 12 includes a communication unit that communicates via the first field bus 2 and an input / output unit (hereinafter also referred to as an "I / O unit") for acquiring input data and outputting output data. Input data and output data are exchanged between the control device 100 and the field via such an I / O unit. Figure 1 shows an example in which digital signals are exchanged as input data and output data via a relay group 14.

[0028] The I / O unit 16 may be directly connected to the field bus or field network. 1 shows an example in which the I / O unit 16 is directly connected to the first field bus 2.

[0029] The image sensor 18 performs image measurement processing such as pattern matching on the image data captured by the camera 20 and outputs the processing results to the control device 100 .

[0030] The servo driver 22 drives the servo motor 24 in accordance with output data (for example, a position command, a speed command, etc.) from the control device 100 .

[0031] As described above, data is exchanged between the control device 100 and the field device group 6 via the first field bus 2, and this exchanged data is updated at extremely short intervals of the order of several hundred microseconds to several tens of milliseconds. Note that this updating process of exchanged data is sometimes referred to as "I / O refresh processing."

[0032] In addition, the display device 300, which is connected to the control device 100 via the second field bus 4, receives operations from the user and outputs commands to the control device 100 in response to the user operations, and also graphically displays the calculation results, etc., of the control device 100.

[0033] The support device 200 is a device that supports the preparations required for the control device 100 to control the control target. Specifically, the support device 200 provides a development environment (program creation and editing tools, parsers, compilers, etc.) for programs executed by the control device 100, a setting environment for setting parameters (configurations) for the control device 100 and various devices connected to the control device 100, a function for outputting generated user programs to the control device 100, a function for online correction and modification of user programs executed on the control device 100, etc.

[0034] The control device 100 further has a gateway function that outputs data acquired by the input / output function and / or data stored in the time-series database 180 to an external device.

[0035] 1 shows a typical example of an external device, such as a host system 400, such as a manufacturing execution system, connected to the control device 100 via a host / controller communication network 8. The manufacturing execution system acquires information from the manufacturing devices and facilities to be controlled, monitors and manages the entire production, and can also handle order information, quality information, shipping information, and the like.

[0036] <B. Example of Hardware Configuration of Control Device> Next, an example of the hardware configuration of the control device 100 constituting the control system 1 according to this embodiment will be described.

[0037] 2 is a block diagram showing an example of a hardware configuration of control device 100 constituting control system 1 according to the present embodiment. Referring to FIG. 2, control device 100 includes a processing unit and one or more I / O units 124-1, 124-2, ...

[0038] The control device 100 includes a processor 102, a chipset 104, a main memory device 106, a secondary memory device 108, a network controller 110, a USB (Universal Serial Bus) controller 112, a memory card interface 114, a local bus controller 122, and field bus controllers 118 and 120.

[0039] The processor 102 is composed of a CPU (Central Processing Unit), an MPU (Micro-Processing Unit), etc., and reads various programs stored in the secondary storage device 108, deploys them in the main storage device 106, and executes them to perform control according to the control target and various processes described below. The chipset 104 controls the processor 102 and each device to perform processing for the control device 100 as a whole.

[0040] In addition to system programs for realizing basic functions, user programs created according to the manufacturing devices and facilities to be controlled are stored in the secondary storage device 108. Furthermore, the secondary storage device 108 and the like are used to configure a time-series database 180, which will be described later.

[0041] The network controller 110 exchanges data with the host system 400 (see FIG. 1) and the like via the host / controller communication network 8. The USB controller 112 controls the exchange of data with the support device 200 via a USB connection.

[0042] The memory card interface 114 is configured to allow a memory card 116 to be attached and detached, and is capable of writing data to the memory card 116 and reading various data from the memory card 116. The memory card 116 can also be used to configure a time-series database 180, as described below.

[0043] The local bus controller 122 is an interface for exchanging data with the I / O units 124-1, 124-2, . . . mounted on the control device 100.

[0044] The field bus controller 118 controls the exchange of data with the field device group 6 and the like via the first field bus 2. Similarly, the field bus controller 120 exchanges data with the display device 300 and the like via the second field bus 4.

[0045] FIG. 2 shows an example of a configuration in which the processor 102 executes a program to provide required functions. However, some or all of these provided functions may be implemented using dedicated hardware circuits (e.g., an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array)). Alternatively, the main parts of the control device 100 may be realized using hardware that conforms to a general-purpose architecture (e.g., an industrial PC based on a general-purpose PC). In this case, virtualization technology may be used to run multiple operating systems (OSs) for different purposes in parallel, and required applications may be executed on each OS.

[0046] <C. Software Configuration Example of Control Device> Next, a software configuration example of the control device 100 constituting the control system 1 according to this embodiment will be described.

[0047] 3 is a block diagram showing an example of a software configuration of the control device 100 constituting the control system 1 according to the present embodiment. Referring to FIG. 3, the control device 100 includes a PLC engine 150, an input / output processing unit 170, and a time-series database 180.

[0048] The PLC engine 150 typically corresponds to a processing unit that can execute various programs in an execution environment provided by the processor 102 of the control device 100 executing a system program. More specifically, the PLC engine 150 includes a control program 152, a system program 160, and a time management unit 168.

[0049] The control program 152 is a program for providing various applications according to the control target, and typically includes a user program 154 , a database writing program 156 , and a serialized communication program 158 .

[0050] The user program 154 corresponds to the main part that provides the control calculation function, and can be configured as desired depending on the manufacturing device or facility that is the control target of the control device 100. The user program 154 can be defined by ladder logic using function blocks or the like. In the example shown in FIG. 3 , the user program 154 includes a sequence calculation 1541 and a motion calculation 1542. The motion calculation 1542 generates an output value for the actuator by referencing input data from sensors, actuators, etc., as well as instructions included in the user program 154.

[0051] In this way, the user program 154 references the state values ​​in the control device 100, including the observation values ​​updated by the input program 164, and updates the state values ​​in the control device 100 as outputs. The updated state values ​​may be referenced by other functions executed in the control device 100, such as the output program 166 or the database writing program 156. Generally, the user program 154 is created by a user of the control device 100 (such as a device developer) using a programming tool.

[0052] The database writing program 156 is called by an instruction defined in the user program 154, and writes specified data to the time-series database 180 via the input / output processing unit 170. The database writing program 156 may be executed as a high-priority program.

[0053] More specifically, the database writing program 156 collects data and requests storage in the time-series database 180. The database writing program 156 can be executed in synchronization with the user program 154. The database writing program 156 can assign time information to the data, synchronized between devices by the time management unit 168. A specific example of the time information may be the time at which the sensor, which is the data input source, inputs the data. The database writing program 156 can also additionally include various processes, such as processing the collected data, such as unit conversion, and deriving some information from multiple data. The database writing program 156 can request storage of the data to be processed in the time-series database 180, just like the collected data. The database writing program 156 can be created using the same tool as the user program 154. Alternatively, it may be created as part of the user program 154. The database writing program 156 may also be created using a different tool, independent of the user program 154.

[0054] The serialized communication program 158 performs serialization processing on data written from the database writing program 156 to the time-series database 180. More specifically, the serialized communication program 158 executes processing (serialization) to convert time-series data into a byte sequence that can be stored. The serialized communication program 158 converts a group of data that the database writing program 156 has requested to be stored in the time-series database 180 into a format suitable for storing and referencing in the database. Depending on the speed and data volume of data written to the time-series database 180, serialization processing is not necessarily required. In other words, the serialized communication program 158 is an optional component.

[0055] The system programs 160 include a scheduler program 162 , an input program 164 , and an output program 166 .

[0056] The scheduler program 162 schedules each program executed by the control device 100 based on its execution conditions. That is, the scheduler program 162 manages the execution order and execution timing of one or more tasks or processes constituting the control program 152. The input program 164 provides a function for acquiring input data (e.g., sensor observation values, equipment status values, etc.) from various devices (field device group 6) connected to the control device 100 via a local bus or a field bus. The output program 166 outputs command values ​​(output data) calculated by the user program 154 executed in the control device 100 to the target devices (field device group 6) connected via the local bus or the field bus.

[0057] The time management unit 168 is a main body that manages synchronization timing in the control device 100 and is realized, for example, by using a counter or timer that counts up / down at a predetermined interval. The time management unit 168 may have a function for synchronizing with another counter or timer. In this case, it can synchronize with a counter or timer on a device on the local bus, field bus, or field network. The time management unit 168 shares time with high precision (e.g., on the order of microseconds) not only with devices on the local bus, field bus, or field network, but also with other network-connected devices. This time serves as a reference for the execution timing of input / output of sensors / actuators and the execution timing of programs in the control device 100.

[0058] The input / output processing unit 170 processes a data write request from the PLC engine 150 to the time-series database 180. The input / output processing unit 170 accepts and accumulates data write requests from the database write program 156 to the time-series database 180, and stores the data sequentially in the time-series database 180. The input / output processing unit 170 operates so as not to affect the processing in the control cycle executed by the system program 160 and the control program 152.

[0059] As an example of a control cycle, the database writing program 156 may be executed for each control cycle to sequentially store time-series data in the time-series database 180. Furthermore, data can be flexibly supplied to other databases or applications, or input can be received from applications other than the control program. The detailed processing of the input / output processing unit 170 will be described later.

[0060] The time series database 180 is typically located in the main storage device 106 or the secondary storage device 108 (see FIG. 2) and stores time series data. The time series database 180 stores the time series data written by the database writing program 156.

[0061] More specifically, the time-series database 180 includes a data storage processing unit 184 , an internal storage 188 , and an external storage 189 .

[0062] The data storage processing unit 184 adds the input time-series data to a specified record in the internal storage 188 or the external storage 189 in accordance with a data write request to the database via the input / output processing unit 170. The data storage processing unit 184 can also use multiple storages as storage destinations for the time-series data. The data storage processing unit 184 can also set a ring operation that keeps the amount of data in the database (storage usage) below a certain level by deleting old data. The data storage processing unit 184 can also write to the database in a way that does not damage the database when the power to the control device 100 is shut off.

[0063] The internal storage 188 is a data storage unit that uses the secondary storage device 108 ( FIG. 2 ) or the like that is built into the control device 100. The internal storage 188 may include non-volatile memory such as flash memory in addition to volatile memory such as DRAM (Dynamic Random Access Memory) and SRAM (Statistical Random Access Memory). The external storage 189 is a non-volatile data storage unit that uses the memory card 116 ( FIG. 2 ) or an external hard disk (not shown).

[0064] An arbitrary application 210 may also be executed in the support device 200 connected to the control device 100. An example of the application 210 is a program that utilizes the time-series data stored in the time-series database 180. For example, so-called data mining, which analyzes the time-series data stored in the time-series database 180 of the control device 100 to find trends or feature quantities associated with those trends, is conceivable. Alternatively, an application that performs various statistical processes on the time-series data stored in the time-series database 180, or an application that displays the numerical values ​​of the time-series data stored in the time-series database 180 or a visual graph is also conceivable.

[0065] <D. Time Series Database> Next, the data structure of the time series database 180 implemented in the control device 100 according to this embodiment will be described.

[0066] 4 is a schematic diagram outlining the data structure of the time series database 180 implemented in the control device 100 according to this embodiment. Referring to FIG. 4A, the concept of time series data handled by the time series database 180 is also referred to as a "time series." One time series may be composed of multiple levels of databases.

[0067] Multiple time series can be created in the time series database 180, for example, a time series may be created for each application. Each database file may have its own attributes, such as version.

[0068] The time-series database 180 stores data groups. The data groups may store time-series data in units of records, which are the smallest units of data. A Key-Value store type may be adopted for each record. When a Key-Value store type record is adopted, the data to be stored (Value) and a unique identifier (Key) corresponding to that data are stored in association with each other. In other words, each record includes a Key-Value store type Key and Value.

[0069] More specifically, each record may store a time-series key indicating an indicator of the time-series data and a time-series value indicating a value of the time-series data.

[0070] 4B, the time series Key may store, for example, time information (Timestamp) or information indicating timing (Counter). The time series Value may store the values ​​(actual values) of the corresponding input data, output data, and calculation data. In this example, as an example, a case is shown in which the actual values ​​associated with the IDs of the variable data are stored. As will be described later, the length of the time series Value is not constant but is set variably.

[0071] <E. Time-series data storage process> Next, the time-series data storage process in the control device 100 according to this embodiment will be described. In the control device 100, an I / O refresh process is repeatedly executed at predetermined intervals. At least a part of the user program 154 is executed at the same interval as this I / O refresh process. In this embodiment, writing of time-series data to the time-series database 180 is executed by the database writing program 156, and the database writing program 156 is called from the user program 154.

[0072] In the control device 100 according to this embodiment, the on-the-fly input / output processing provided by the input / output processing unit 170 enables writing of time series data to the time series database 180 without interfering with the repeated execution (cyclic execution) of a series of programs including I / O refresh processing.

[0073] The time-series database 180 may be configured to store multiple independent time-series data. One or multiple storages may be used depending on the size of the time-series database 180. Furthermore, in addition to the function of storing continuous and steady time-series data in the time-series database 180, a ring function may be added to keep storage usage to a certain amount by discarding past time-series data.

[0074] Fig. 5 is a schematic diagram for explaining the cyclic execution process and the write process to the time-series database in the control device 100 according to this embodiment. Fig. 5 shows, as an example, an example in which an output program 166, an input program 164, and a user program 154 are cyclically executed. The execution period (the interval between execution start timings) of the cyclic execution shown in Fig. 5 may also be referred to as a "control cycle."

[0075] A database writing program 156 is executed, which is called from the user program 154. The database writing program 156 includes a variable reading process 1562, a reference record construction process 1564, a differential record construction process 1565, and a database storage process 1566.

[0076] As shown in FIG. 5 , the control calculations cyclically executed at a predetermined execution period include collection of input data from field devices (input program 164), calculation of output data based on the input data in accordance with a predetermined user program 154, and output of the calculated output data (output program 166).

[0077] 5, when the database writing program 156 is called from the user program 154, the database writing program 156 is executed in synchronization with the control cycle. At that time, the user program 154 requests the database writing program 156 to write data. In other words, the cyclically executed control computation includes a process of issuing a data write request to the database writing program 156. When the user program 154 issues a data write request to the database writing program 156, the user program 154 is cyclically executed as the next process without waiting for the database writing program 156 to complete.

[0078] In the control device 100 according to this embodiment, the control program 152 can behave in a manner that does not wait for the database writing program 156 to be completed.

[0079] As described above, from the perspective of the user program 154, after issuing a data write request, the user program is processed so as not to wait for the completion of the database write program 156. The database write program 156 is processed in the background asynchronously with the control calculations executed in the control cycle. Such asynchronous and background execution can reduce the impact on the control cycle.

[0080] Such cyclic execution is managed by the scheduler program 162. That is, in the user program 154, processing can be completed as long as a data write request is issued, and it is possible to guarantee that the cyclic execution shown in Fig. 5 is executed in a predetermined control cycle. That is, when the database write program 156 is executed in synchronization with a control cycle, it can accept a new data write request even if the data write process issued in the previous control cycle has not been completed.

[0081] Note that Figure 5 only shows one example of cyclic execution, and the programs to be executed are not limited to those shown in Figure 5. Other programs may be cyclically executed, or some of the programs shown in Figure 5 may be omitted.

[0082] The variable reading process 1562 aggregates data that has been specified in advance by the sampling process, from among the input values ​​obtained by the input program 164, the internal state values ​​indicating the internal state of the control program 152 or the control device 100, and the output values ​​output from the output program 166.

[0083] The base record construction process 1564 is a process for constructing the aggregated data as a base record.

[0084] The differential record construction process 1565 is a process for constructing a differential record for the aggregated data. The differential record is created by comparing the aggregated data acquired last time with the aggregated data acquired this time, and includes only data that has changed based on the comparison result.

[0085] The database storage process 1566 issues a data write request to the time-series database 180. The data write request is sent to the input / output processing unit 170.

[0086] The time-series database 180 stores designated data in chronological order from among the data managed by the PLC engine 150 (processing unit). The input / output processing unit 170 processes data write requests from the database writing program 156 on the fly. Therefore, the database writing program 156 does not need to wait for the input / output processing unit 170 to complete storing of data in the time-series database 180. In other words, the database writing program 156 can complete processing by simply issuing a data write request.

[0087] In this way, in the control device 100 according to this embodiment, the database writing program 156 can behave without waiting for the completion of storing the time-series data in the time-series database 180 .

[0088] The data to be stored in the time-series database 180 and the acquired values ​​may be subjected to pre-processing such as scaling or statistical processing to compress the amount of information.

[0089] The database writing program 156 itself may be created using the same programming tool as that used to create the user program 154. In this case, the database writing program 156 may be configured as a part of the user program 154, or may be configured as a program independent of the user program 154. Furthermore, multiple database writing programs 156 may be executed using the same processor 102.

[0090] Furthermore, the database writing program 156 may be configured to allow editing operations (addition or deletion of target variables) even during execution (cyclic execution) of the control program 152 in the control device 100 .

[0091] The description format or description style of the database writing program 156 is not limited to code that describes a series of commands, and a dedicated tool or dedicated application may be provided for specifying necessary information (for example, a list of variables to be collected or a list of operations for transforming the variables). To realize such a dedicated tool or dedicated application, an interface that accepts various settings may be provided on the control device 100 side or the support device 200 side.

[0092] Furthermore, rather than an explicit database writing program 156 , the database writing program 156 may be implemented as part of a system task executed within the controller 100 .

[0093] In response to a data write request from the database write program 156 , the input / output processor 170 stores the specified time series data in the time series database 180 .

[0094] As described above, from the perspective of the database write program 156, after issuing a data write request, the input / output processing unit 170 processes the data write request so as not to wait for the storage of the time-series data to be completed. The storage of the time-series data by the input / output processing unit 170 is performed in the background asynchronously with the control calculations executed in the control cycle. Such asynchronous and background execution can reduce the impact on the control cycle.

[0095] If a multi-core or multi-processor configuration is adopted as the processor 102, a core or processor responsible for processing to realize the input / output processing unit 170 may be assigned separately from the core or processor that cyclically executes the control calculations.

[0096] As an example of an implementation form for storing data asynchronously with such a control cycle, the input / output processing unit 170 may be provided with a buffer for queuing write requests. That is, the input / output processing unit 170 may include a buffer for receiving data write requests and queuing the data write requests. Alternatively, a buffer that performs a similar function may be provided in the data storage processing unit 184 of the time-series database 180. Furthermore, a configuration may be adopted in which a buffer is provided in each of the input / output processing unit 170 and the data storage processing unit 184.

[0097] By employing such a configuration, when a sampling request is issued in the control calculation, the next process is executed without waiting for the completion of data writing.

[0098] In the control device 100, the scheduler program 162 manages the execution timing, and the output program 166, input program 164, and user program 154 (and may include a database writing program, not shown) are cyclically executed.

[0099] The control device 100 is connected to a group of field devices 6 (for example, output devices 61 such as actuators and input devices 62 such as sensors) via a local bus, a field bus, a field network, etc. The control device 100 and the group of field devices 6 connected via the local bus, field bus, field network, etc. have synchronized timers to realize synchronized communication processing. That is, the time management unit 168 of the control device 100 is synchronized with the time management unit of the output device 61 and / or the time management unit of the input device 62.

[0100] Therefore, by adding time information managed by the time management unit of each device to the data transmitted from the output device 61 and the input device 62 to the control device 100 and sending it, it is possible to ensure time consistency between the data handled by the output program 166 and the input program 164 of the control device 100.

[0101] The field device group 6 transmits collected observation values ​​and the like together with time information managed by a time management unit to the control device 100. When the control device 100 receives the time information and the observation values ​​from the field device group 6, the control device 100 stores the time information as at least a part of a key and the observation values ​​as values ​​in the time series database 180.

[0102] In this way, the control device 100 is connected to field devices that are time-synchronized with each other, and time information when the data was collected by the field device may be added to the data stored in the time-series database 180 of the control device 100. In this case, the time-series database 180 may store records of a key-value store type in which the time information is used as the key and the value of the corresponding data is used as the value.

[0103] By adding time information managed by the time management units 168 that are synchronized with each other, it is possible to synchronize the time series data collected in the time series database 180 with each other. In other words, it becomes possible to compare the time series data on a common time axis.

[0104] In this way, in the control device 100 according to this embodiment, by using time information managed by time management units 168 that are synchronized with each other, it is possible to integrate, store, and analyze time series data with high time accuracy on the control device 100 connected to one or more field device groups 6.

[0105] Furthermore, it is possible for multiple control devices 100 to synchronize their time with each other. In such a case, by integrating the time series data stored in the time series databases 180 of each of the multiple control devices 100 in one of the control devices 100, the support device 200, or the upper system 400, even time series data collected from field device groups 6 connected to different control devices 100 can be integrated with each other and analyzed.

[0106] Time synchronization is established between the control devices 100 connected via such a bus or network, and each device maintains a common time. By using such time-synchronized time information when registering time series data in the time series database 180, the time series data stored in each time series database 180 can share a common time axis.

[0107] The control device 100 may aggregate data stored in the time-series database 180 of each of the one or more other control devices 100 connected thereto.

[0108] By implementing the data aggregation function described above, even if multiple control devices 100 are distributed to meet required system specifications, the time axis can be made common between the time series data collected by each control device 100, making it easier to perform post-hoc integrated analysis of the time series data.

[0109] As described above, by connecting multiple control devices 100 to each other via a time-synchronized network or the like and collecting time-series data with time-synchronized time stamps, it is possible to integrate and analyze this time-series data after the fact. By adopting such a configuration, it is possible to easily realize a scalable configuration that allows the system to be expanded according to the required performance, number of measurement points, etc.

[0110] FIG. 6 is a diagram illustrating a specific example of data stored in the time-series database 180 according to the embodiment and the comparative example.

[0111] Referring to FIG. 6A, conventional records stored in the time-series database 180 are shown as a comparative example.

[0112] As a comparative example, a conventional record stores all time-series data for each control cycle.

[0113] Therefore, there has been a tendency for the data volume of the time series database 180 to increase considerably. Referring to Fig. 6(B), records stored in the time series database 180 according to an embodiment are shown.

[0114] In this embodiment, a case is shown in which a base record and a difference record are stored.

[0115] The reference record stores data sampled at timing intervals of a predetermined period ΔT. The difference record stores data at timing intervals equal to the control cycle, which is shorter than the predetermined period ΔT. The predetermined period ΔT can be designed as appropriate.

[0116] A differential record is constructed when there is a change based on a comparison between the previously sampled data and the currently sampled data. Specifically, only data that has changed based on the comparison is stored as a differential record.

[0117] Specifically, a buffer is provided to store the previously sampled data, and the data stored in the buffer is compared with the currently sampled data, and any variable data that has changed is constructed as a differential record.

[0118] The variable data that has changed is stored as updated data in a buffer. The difference record can be reconstructed into the original sampling data based on the base record.

[0119] FIG. 7 is a flow diagram illustrating processing of a data writing program according to an embodiment.

[0120] Referring to FIG. 7, control device 100 determines whether or not there is a data write request (step S2).

[0121] In step S2, if it is determined that there is a data write request (YES in step S2), control device 100 executes a variable data read process (step S4).

[0122] The control device 100 then aggregates the data designated in advance by the sampling process. Next, the control device 100 determines whether it is time for the reference record (step S6). Specifically, it determines whether it is time for a predetermined period ΔT.

[0123] In step S6, if the control device 100 determines that it is time for a reference record (YES in step S6), it creates a reference record (step S8).

[0124] All the sampling data is constructed as a reference record, and the control device 100 then executes a process of storing the reference record in the time-series database 180 (step S10).

[0125] Then, the process returns to step S2. On the other hand, if the control device 100 determines in step S6 that it is not time for the reference record (NO in step S6), it compares the data with the previous value (step S12). Specifically, a buffer is provided to store the previously sampled data, and the data stored in the buffer is compared with the currently sampled data.

[0126] Next, the control device 100 determines whether there is any changed data (step S14). Based on the comparison result, the changed data is constructed as a difference record. The changed data is stored in the buffer as updated data.

[0127] In step S14, if the control device 100 determines that there is changed data (YES in step S14), it constructs a difference record (step S16). The difference record is constructed based only on the changed data.

[0128] Then, the control device 100 executes a process of storing the data in the time-series database 180 (step S10).

[0129] Then, the process returns to step S2 again. On the other hand, if control device 100 determines in step S14 that there is no changed data (NO in step S14), the process returns to step S2 again and repeats the above process.

[0130] This process stores the record described in Fig. 6B. Fig. 8 is a diagram illustrating a playback process according to data in a time-series database based on an embodiment.

[0131] 8A shows a case where base records and differential records are collected and stored in the time-series database 180. Also shown is a case where an abnormality occurs between the start and end of collection.

[0132] FIG. 8B shows a case where only records before and after the occurrence of an abnormality are extracted, with the time point at which the abnormality occurred as a reference.

[0133] 8C shows a case where variable data is reconstructed from information in differential records based on reference data among the extracted records. The differential records are data based on the differences from previously stored reference data, so they can be reconstructed based on this information.

[0134] Referring to FIG. 8D, a case is shown in which the reproduction process is performed based on the reference data and the variable data reconstructed in accordance with the difference record.

[0135] Therefore, it is possible to visually display time-series data by performing a playback process according to the application 210 .

[0136] Furthermore, in the playback process, for example, when extracting records before and after the occurrence of an abnormality based on the time point at which the abnormality occurred, conventional methods required acquiring and playing back all of the sampling data. However, with this method, it is possible to reduce the amount of data acquired from the time series database 180 because the reference data and differential data are acquired and played back.

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

[0138] 1 Control system, 2 First field bus, 4 Second field bus, 6 Field device group, 8 Inter-controller communication network, 12 Remote I / O device, 14 Relay group, 16, 124 I / O unit, 18 Image sensor, 20 Camera, 22 Servo driver, 24 Servo motor, 61 Output device, 62 Input device, 100 Control device, 102 Processor, 104 Chip set, 106 Main memory device, 108 Secondary memory device, 110 Network controller, 112 Controller, 114 Memory card interface, 116 Memory card, 118, 120 Field bus controller, 122 Local bus controller, 150 PLC engine, 152 Control program, 154 User program, 156 Database writing program, 158 Serialized communication program, 160 System program, 162 Scheduler program, 164 Input program.

Claims

1. A control device comprising: a processing unit that cyclically executes control operations at a predetermined execution period, including collecting input data from field devices, calculating output data based on the input data in accordance with a predetermined user program, and outputting the calculated output data; a database that chronologically stores specified data from among the data managed by the processing unit; and data writing means for writing data to the database at the same period as the execution period in which the control operations are cyclically executed, wherein the data writing means includes means for constructing a reference record of the specified data, and means for constructing a difference record of the specified data when predetermined conditions are satisfied.

2. The control device according to claim 1, wherein the means for constructing a reference record constructs a reference record of the specified data for each first timing, and the means for constructing a differential record constructs a differential record of the specified data when the specified condition is satisfied for each second timing different from the first timing.

3. The control device according to claim 1, wherein the means for constructing the difference record constructs a difference record of the specified data when a change is found based on a comparison between the previous specified data and the current specified data as the specified condition.

4. The control device according to claim 1, wherein the control device is connected to field devices that are time-synchronized with each other, and the data stored in the database is provided with time information indicating when the data was collected by the field device.

5. The control device according to claim 1, wherein the database stores records of a Key-Value store type in which time information is used as a Key and the value of the corresponding data and quality information of the data are used as Values.

6. The control device according to claim 1, further comprising a reproduction means for reproducing the time-series data stored in said database, said reproduction means reconstructing said differential records of the corresponding data stored in said database based on said reference records during reproduction and outputting the same.

7. A program for realizing a control device, the program causing a computer to execute a step of cyclically executing a control calculation at a predetermined execution period, the control calculation including collecting input data from a field device, calculating output data based on the input data in accordance with a predetermined user program, and outputting the calculated output data, the computer having a database that stores specified data among the data managed by the control calculation in chronological order, the program causing the computer to execute a step of writing data to the database at the same period as the execution period in which the control calculation is cyclically executed, the step of writing data including a step of constructing a reference record of the specified data, and a step of constructing a difference record of the specified data when a predetermined condition is satisfied.

Citation Information

Patent Citations

  • Saving method for time-series data, time-series database system, method and system for processing time-series data, time-series data display system, and recording medium

    JP2004030599A

  • Congestion information providing device, congestion information display device, and its program

    JP2007122397A

  • Control apparatus and program

    JP2018151726A