This application claims the priority benefit of Japan application serial no. 2017-027955, filed on Feb. 17, 2017. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
The disclosure relates to a control device having a function of storing designated data in a time series manner.
Factory automation (FA) technologies using control devices such as programmable logic controllers (PLCs) have become widespread in various production fields. There is demand for subsequent analysis of data handled by such control devices.
Patent Document 1, for example, discloses a data collection device which can collect data reliably at a high speed from a CPU unit of a PLC. To be more specific, Patent Document 1 discloses the data collection device which collects I/O data from the CPU unit connected to a PCL bus of the PLC. In addition, Patent Document 2 discloses a data collection device which is connected to a programmable logic controller to collect and hold data stored in a memory of the programmable logic controller.
Patent Document 3 discloses a configuration in which data trace information is provided from a tool device to a CPU unit with respect to collection of data of a programmable logic controller.
Due to the advancement of information and communication technology, collection and storage of a large volume of data have become possible even for control devices. Patent Document 4, for example, discloses a programmable logic controller in which a database is constructed on a non-volatile memory which is a non-volatile storage device having no limitation on the number of data write operations.
[Patent Document 1] Japanese Patent Application Laid-Open (JP-A) No. 2004-199670
[Patent Document 2] Japanese Patent Application Laid-Open (JP-A) No. 2007-219920 [Patent Document 3] Japanese Patent Application Laid-Open (JP-A) No.
2012-194683
[Patent Document 4] Japanese Patent Application Laid-Open (JP-A) No. 2015-005062.
Data collected in a database is normally used in subsequent analysis, interpretation, and the like. Thus, even when a configuration in which a large volume of data is collected from a database built in such a control device described above is employed, a mechanism which facilitates subsequent analysis and interpretation is necessary.
A control device according to one or some exemplary embodiments of the invention includes a time series data storage unit that stores designated data in a time series manner, a chapter information storage unit that stores chapter information for associating a designated timing with data stored in the time series data storage unit, and a data storage processing unit that controls storage of data in the time series data storage unit and storage of chapter information in the chapter information storage unit. When receiving an instruction to register chapter information, the data storage processing unit stores information indicating a type of chapter information included in the instruction and information for specifying the latest data stored in the time series data storage unit at a timing at which the instruction is received in the chapter information storage unit as chapter information.
The disclosure relates to a mechanism which facilitates subsequent analysis and interpretation in a control device having a data collection function to satisfy the above-described demand.
A control device according to one or some exemplary embodiments of the invention includes a time series data storage unit that stores designated data in a time series manner, a chapter information storage unit that stores chapter information for associating a designated timing with data stored in the time series data storage unit, and a data storage processing unit that controls storage of data in the time series data storage unit and storage of chapter information in the chapter information storage unit. When receiving an instruction to register chapter information, the data storage processing unit stores information indicating a type of chapter information included in the instruction and information for specifying the latest data stored in the time series data storage unit at a timing at which the instruction is received in the chapter information storage unit as chapter information.
According to one or some exemplary embodiments of the invention, the time series data storage unit stores a record in which an indicator including information specifying a timing or a time point is associated with data including an observation value corresponding to the information in a time series manner.
According to one or some exemplary embodiments of the invention, the chapter information storage unit stores a record in which an indicator including information indicating a type of chapter information is associated with an indicator of a record of the time series data storage unit serving as a reference target.
According to one or some exemplary embodiments of the invention, an indicator of each record stored in the chapter information storage unit includes identification information sequentially updated in accordance with a prescribed rule, identification information for specifying chapter information, and information indicating a type of chapter information.
According to one or some exemplary embodiments of the invention, the type of chapter information defines that the corresponding chapter information indicates one of a start of a chapter section and an end of a chapter section.
According to one or some exemplary embodiments of the invention, the control device further includes a data search processing unit that searches for specific chapter information from the chapter information stored in the chapter information storage unit when an instruction to search for the specific chapter information is received, and searches for data corresponding to the specific chapter information among the data stored in the time series data storage unit based on the searched one or a plurality of pieces of chapter information.
According to one or some exemplary embodiments of the invention, the control device further includes an application that issues an instruction for the specific chapter information to the data search processing unit.
According to one or some exemplary embodiments of the invention, the data search processing unit receives an instruction for the specific chapter information from outside of the control device.
According to one or some exemplary embodiments of the invention, a mechanism which enables subsequent analysis and interpretation to be easily performed can be provided in a control device having a data collection function.
An embodiment of the invention will be described in detail with reference to the drawings. Note that the same reference signs are given to the same or equivalent parts of the drawings, and description thereof will not be repeated.
First, an example of an overall configuration of a control system 1 that includes a control device according to the embodiment will be described.
The control device 10 may be realized by a kind of computer such as a programmable logic controller (PLC). The control device 10 is connected to a field device group 6 via a first field network 2 and to one or a plurality of display devices 300 via a second field network 4. The control device 10 exchanges data with the devices connected via the respective networks.
The control device 10 has a control logic (which will also be referred to as a “PLC engine” below) for executing various kinds of arithmetic operation for controlling facilities and machines. In addition to the PLC engine, the control device 10 has a collection function of collecting data measured by the field device group 6 and transferred to the control device 10 (which will also be referred to as “input data” below). Furthermore, the control device 10 also has a monitoring function of monitoring collected input data.
The first field network 2 and the second field network 4 may employ a network on which periodical communication is performed to guarantee data arrival times. As networks on which such periodical communication is performed, EtherCAT (registered trademark), EtherNet/IP (registered trademark), DeviceNet (registered trademark), CompoNet (registered trademark), and the like are known.
The field device group 6 includes a device which collects input data from a control target or a manufacturing device, a production line, and the like related to control (which will also be referred to as a “field” below). As such devices which collect input data, an input relay, various sensors, and the like are assumed. The field device group 6 further includes a device having any type of influence on the field based on commands generated by the control device 10 (which will also be referred to as “output data” below). As such devices having any type of influence on the field, an output relay, a contactor, a servo driver and a servo motor, and any type of actuator are assumed. The field device group 6 exchanges data including input data and output data with the control device 10 via the first field network 2.
In the example of the configuration shown in
The remote I/O device 12 includes a communication unit which performs communication via the first field network 2 and an input and output unit (which will also be referred to as an “I/O unit” below) for acquiring input data and outputting output data. The control device 10 and the field exchange input data and output data with each other via the I/O unit.
The I/O unit may be connected directly to the field network.
The image sensor 18 performs an image measurement process such as pattern matching on image data obtained through imaging of the camera 20 and transmits a result of the process to the control device 10.
The servo drivers 22 drive the servo motors 24 in accordance with data (e.g., a position command, etc.) output from the control device 10.
As described above, although data is exchanged between the control device 10 and the field device group 6 via the first field network 2, the exchanged data is updated in short cycles of an order of hundreds of μsec to dozens of msec. Note that an updating process of data exchanged as described above can also be referred to as an “I/O refresh process.”
In addition, the display devices 300 connected to the control device 10 via the second field network 4 receive operations from a user, transmit commands and the like in accordance with user operations to the control device 10, and graphically display results of arithmetic operations of the control device 10.
The support device 200 is a device which supports preparation necessary for the control device 10 to control control targets. Specifically, the support device 200 provides an environment for developing a program to be executed by the control device 10 (a program production/editing tool, a parser, a complier, or the like), a setting environment for setting parameters (or configurations) of the control device 10 and various devices connected to the control device 10, a function of transmitting a generated user program to the control device 10, a function of modifying and changing online a user program and the like to be executed in the control device 10, and the like.
Next, an example of a hardware configuration of the control device 10 constituting the control system 1 according to the present embodiment will be described.
The CPU unit 100 includes a processor 102, a chipset 104, a main memory device 106, a secondary memory device 108, an upper network controller 110, a Universal Serial Bus (USB) controller 112, a memory card interface 114, an internal bus controller 122, and field bus controllers 118 and 120.
The processor 102 is configured by a central processing unit (CPU), a micro-processing unit (MPU), or the like, reads various programs stored in the secondary memory device 108 and develops the programs in the main memory device 106 to be executed, thereby performing control on control targets and realizing various kinds of processes as will be described below. The chipset 104 realizes overall processes of the control device 10 by controlling the processor 102 and devices.
The secondary memory device 108 stores not only a system program for realizing the PLC engine but also a user program to be executed using the PLC engine. Furthermore, the secondary memory device 108 also stores a time series database which will be described below.
The upper network controller 110 controls exchange of data with other devices via an upper network. The USB controller 112 controls exchange of data with the support device 200 using USB connection.
The memory card interface 114 is configured to have a memory card 116 attachable thereto and enables data to be written on the memory card 116 and various kinds of data (a user program, trace data, and the like) to be read from the memory card 116.
The internal bus controller 122 is an interface which enables data to be exchanged with the I/O units 124-1, 124-2, and the like mounted in the control device 10.
The field bus controller 118 controls exchange of data with other devices via the first field network 2. Likewise, the field bus controller 120 controls exchange of data with other devices via the second field network 4.
Although
Next, an overview of a time series database provided by the control device 10 according to the present embodiment will be described. In this specification, “time series database” means a database that deals with time series data and also means a memory function of storing a series of values obtained by observing a temporal change of an arbitrary target continuously (or discontinuously with a fixed time interval) (the values are also collectively referred to as “time series data”).
The time series database provided by the control device 10 according to the present embodiment collects data in a time series manner and stores information of indices or chapters in addition to collection of time series data. By storing the information of indices or chapters together, availability of stored time series data in subsequent access can be improved. For the sake of convenience in description, the information of indices or chapters will be referred to as “chapter information” below. The term “chapter information” is only for convenience, and an arbitrary data structure can be employed for the stored data structure in accordance with the time series database.
If the chapter information is used in the above-described form, a start and an end of each manufacturing lot can be recorded. That is, the above-described form of use is effective when time series data is collected for each manufacturing lot.
As a specific example for implementing this form, an instruction for recording chapter information is described in a user program to be executed by the control device 10, and a flag indicating a start or an end of a manufacturing lot or the like is defined as a condition for executing the instruction. A “lot number” in the form of a sequence of letters may be designated in the instruction at a time of a start or an end of a manufacturing lot as chapter information.
Since the time series data can be divided based on the chapter information by using the chapter information in the above-described form, the collected time series data can be searched for or processed for a predetermined number of pieces of the data. That is, this method is effective when arbitrary observation values are continuously collected.
Thus, by adding a time point corresponding to a prescribed interval or occurrence of an arbitrary event as chapter information, it is possible to search for the chapter information from the time series data using the time point as a search key, and thus time series data to be searched for can be acquired based on the searched-for chapter information. As a more specific data use procedure, pieces of time series data located before and after chapter data extracted using a time point as a search key, and the like are extracted as targets.
Note that, although
Next, an example of a software configuration of the CPU unit 100 constituting the control system 1 according to the present embodiment will be described.
The PLC engine 150 is realized typically by the processor 102 of the CPU unit 100 executing various programs. More specifically, the PLC engine 150 is constituted by a control program 160 and a system program 170.
The control program 160 can be arbitrarily configured in accordance with a use or the like of the control device 10 including the CPU unit 100, and is constituted typically by a user program 162, a database write program 164, and a serialized communication program 166.
The user program 162 is a program arbitrarily produced in accordance with performance, control, and the like required for the control device 10 and can be provided using, for example, a ladder logic using function blocks or the like.
The database write program 164 is called out with a command defined within the user program 162 to write data designated for the time series database 180. The database write program 164 can not only write designated data but can also add the chapter information described with reference to
The serialized communication program 166 performs a serialization process on data written in the time series database 180 by the database write program 164. More specifically, the serialized communication program 166 executes a process (serialization) of converting time series data into a byte sequence that can be stored. The target data is converted into a predetermined byte sequence in the serialization process and then stored in the time series database 180.
The system program 170 provides a function of managing a process, task, and the like to be executed by the CPU unit 100. The system program 170 typically provides a function of writing a scheduler that manages execution timings and the like and data in the time series database 180 or an external file.
The time series database 180 is typically disposed in the main memory device 106 or the secondary memory device 108 (refer to
More specifically, the time series database 180 includes the data storage processing unit 182, a time series data storage unit 184, a chapter information storage unit 186, and a data search processing unit 188.
The data storage processing unit 182 controls storage of data by the time series data storage unit 184 and storage of chapter information by the chapter information storage unit 186. That is, the data storage processing unit 182 performs a process of storing the time series data and the chapter information in the time series database 180. More specifically, the data storage processing unit 182 adds records of the time series data to the time series data storage unit 184 in accordance with various commands, data, and the like from the database write program 164, or appropriately updates chapter information stored in the chapter information storage unit 186.
The time series data storage unit 184 stores designated data in a time series manner. More specifically, the time series data storage unit 184 stores arbitrary observation values such as input values, computed values, output values, manufacturing information, and the like to be held in the control device 10 (the CPU unit 100) in a time series manner. These observation values sequentially stored in a time series manner correspond to time series data. The time series data storage unit 184 may be realized as a file of the database. Data stored in the time series data storage unit 184 is designated using the user program 162 or the like which will be described below. More specifically, the time series data storage unit 184 stores each piece of the data in the form of a record. A data structure of each record will be described below.
The chapter information storage unit 186 stores chapter information for associating designated timings and the data stored in the time series data storage unit 184. The chapter information storage unit 186 manages registration of the chapter information related to the time series data, searches using the chapter information, and the like. The chapter information storage unit 186 may be realized as a file of the database including the chapter information.
The data search processing unit 188 searches for data stored in the time series database 180 and outputs a result of the search. More specifically, the data search processing unit 188 acquires time series data designated from the time series data storage unit 184 in response to a request (query) from the application 190 executed on the CPU unit 100, an application 210 executed on the support device 200, and the like with the time series data while referring to the chapter information stored in the chapter information storage unit 186. As described above, when an instruction for specific chapter information is received, the data search processing unit 188 searches for the specific chapter information from the chapter information stored in the chapter information storage unit 186 and searches for data corresponding to the specific chapter information among the data stored in the time series data storage unit 184 based on the searched one or a plurality pieces of chapter information.
The application 190 is an arbitrary program executed on the CPU unit 100, and typically, a program using the time series data stored in the time series database 180 is assumed. For example, an application in which machine learning is performed on the time series data stored in the time series database 180 as learning data and then any kind of determination is made may be assumed. As described above, the application 190 issues an instruction for specific chapter information to the data search processing unit 188.
The application 210 is an arbitrary program executed on the support device 200 and typically, a program using the time series data stored in the time series database 180 is assumed. For example, so-called data mining in which the CPU unit 100 analyzes the time series data stored in the time series database 180 to discover any trend, a feature amount associated with a trend, or the like may be assumed. Alternatively, an application in which various statistical processes are executed on the time series data stored in the time series database 180, or an application in which numerical values of the time series data stored in the time series database 180 are displayed or graphs indicating visual data and the like are displayed may be assumed. As described above, the data search processing unit 188 receives an instruction for specific chapter information from outside of the control device 10 and executes the above-described search process.
Next, an example of a data structure for realizing the time series database 180 will be described.
(e1: Time Series Database 180)
The time series observation value database stores time series data. The chapter information database stores index information for referring to chapter information to be given to time series data and the like.
The time series observation value database stores time series data in units of a record which is a minimum unit of data. Each record may employ a key-value store type. If the key-value store type is employed for records, data to be stored (values) and unique indicators (keys) corresponding to the data are associated and stored. That is, each record includes a key and a value of the key-value store type.
More specifically, a time series key indicating an indicator of time series data and a time series value indicating a value of the time series data are stored in each record constituting the time series observation value database.
With respect to a time series according to the present embodiment, a gap between adjacent pieces of chapter information on a time axis thereof to which chapter information is added is also referred to as a “chapter section” for the sake of convenience in description. A length of a “chapter section” on the time axis, however, is not necessarily fixed, and may be arbitrarily set by a user, an external factor, or the like. A chapter section may be associated with a unit of a lot or a unit of tact as described above.
In addition, the chapter information database may store one or a plurality of records of the key-value store type, similarly to the time series observation value database.
(e2: Time Series Observation Value Database)
Next, an example of a data structure of each record constituting the time series observation value database shown in
The time series data storage unit 184 stores each record associated with an indicator (key) including information for specifying a timing or a time point and data (a value) including an observation value corresponding thereto in a time series manner.
Arbitrary identification information associated with data to be stored may be used as the ID 1841. The time stamp 1842 corresponds to information for specifying a timing or a time point, and for example, counter information or time point information managed by the CPU unit 100 for storing arbitrary data is used.
The record of the time series observation value database includes an index 1843 and an observation value 1844 as a value. The index 1843 is a value that increments or decrements by a predetermined value in accordance with a data storage operation. Typically, a value that increments by one each time an observation value is stored is used. With regard to the observation value 1844, the database write program 164 is called out by a command defined by the user program 162 and records including an observation value designated by the database write program 164 are sequentially written in the time series observation value database.
(e3: Chapter Information Database)
Next, an example of a data structure of a record constituting the chapter information database shown in
The chapter information storage unit 186 stores a record associated with an indicator (a key) including information indicating a type of chapter information and an indicator (a value) of a record of the time series data storage unit 184 serving as a reference target.
The AutoID 1861 corresponds to identification information sequentially updated according to a prescribed rule, and a value that increments or decrements by a predetermined value in accordance with registration of chapter information is used. Typically, a value that increments by one each time chapter information is registered is used.
The chapter information identifier 1862 corresponds to identification information for specifying chapter information, and an arbitrary value to be used in a data search performed with reference to the chapter information is used. For example, a sequence of letters, a numeral value, date information, time point information, and the like may be used as the chapter information identifier 1862. A value stored as the chapter information identifier 1862 may be defined by the user program 162.
The chapter information type 1863 corresponds to information indicating a type of chapter information, and a value indicating a type or a meaning of chapter information to be added is used. For example, a value indicating a start of a certain chapter section, a value indicating an end of a certain chapter section, a value indicating that a certain chapter section is further divided, or the like may be used. That is, the chapter information type 1863 may define that corresponding chapter information indicates one of a start of a chapter section and an end of a chapter section.
In addition, the record of the chapter information database includes key content 1864 corresponding to the time series observation value database as a value. That is, the value of the record of the chapter information database includes the corresponding indicator (the key) of the record of a reference target in the time series data storage unit 184. For the key content 1864 corresponding to the time series observation value database, information (a key) for specifying each record of the time series observation value database of which chapter information is to be registered is stored. As described above, the value of the record of the chapter information database is used as a search key for searching for a target record among a plurality of records included in the time series observation value database. A search method using the chapter information database and the time series observation value database will be described below.
Next, chapter information according to the present embodiment will be described in detail.
(f1: Registration of Chapter Information)
First, a process of registering chapter information will be described.
The data storage processing unit 182 (see
A key of a record registered in the chapter information database includes an Auto ID 1861, a chapter information identifier 1862, and a chapter information type 1863 as described above. In the example shown in
Meanwhile, the key content 1864 corresponding to the time series observation value database is registered as a value of the record registered in the chapter information database. Note that registered pieces of key content 1864 may be differently handled in accordance with meanings of corresponding chapter information. Specifically, in a case in which a target record indicates a start position of a chapter section, the next record after a record of the time series observation value database referred to by the target record becomes a leading position of a corresponding chapter section. On the other hand, in a case in which a target record indicates a dividing position of a chapter section, the next record after a record of the time series observation value database referred to by the target record becomes a leading position of a new corresponding chapter section.
By repeating the registration procedure as described above, one or a plurality of records corresponding to a chapter section set for the time series observation value database are registered in the chapter information database as shown in
As described above, upon receiving an instruction to register chapter information, the data storage processing unit 182 stores information indicating a type of the chapter information (the chapter information type 1863) included in the instruction and information for specifying the latest data stored in the time series data storage unit 184 at the timing at which the instruction is received (the key content 1864) in the chapter information storage unit 186 as chapter information.
(f2: Data Search Using Chapter Information)
Next, a process of searching for time series data using chapter information will be described.
It is assumed in the example shown in
The time series observation value database is referred to based on values of the searched records. That is, keys of the time series observation value database are acquired from the values of the searched records ((2) keys of the time series observation value database are acquired).
In the example shown in
The time series observation value database is searched with the time stamp values being set as search keys. In the example shown in
A range of a chapter section set for the time series observation value database is specified based on the searched first record 1848 and second record 1849 as described above ((3) acquisition of a chapter section).
In the series of data search processes described above, a record having designated chapter information and/or a chapter section defined by two records can be acquired from records included in the time series observation value database.
Next, several application examples with respect to collection, searching, and the like of time series data using chapter information in the control system 1 according to the present embodiment will be introduced.
By adding chapter information as shown in
By adding the chapter information as shown in
By adding the chapter information in accordance with an event as described above, analysis of data before and after a device failure or abnormality occurrence (statistical analysis or data mining) can be facilitated and failure factors or characteristics thereof can be specified. In other words, the system can be applied to analysis of failure factors and abnormal factors.
Next, an example in which collection of time series data and setting of chapter information are performed as described above will be described.
(h1: Method Using User Program)
As a typical method, collection of time series data and setting of chapter information may be performed in the user program 162. In this case, commands for using the time series database 180 are available in the user program 162 executed in the control device 10.
A user describes commands necessary for the user program 162 in accordance with a collection cycle, a collection timing, and the like of the observation values desired to be collected. An arbitrary description format can be used without being limited to the description format of the program as shown in
(h2: Method Using Embedded Program)
A method using an embedded program may be employed, rather than a method in which necessary commands are described in the user program 162. In that case, the database write program 164 (refer to
If such an embedded program is used, a configuration for collecting time series data with a simple setting can be realized for users who do not want to make a change in the existing user program 162 or do not want to create a new user program while wanting to use the time series database 180, and the like.
Although a form of the above-described control system 1 shown in
According to the control device of the above-described embodiment, a large volume of time series data including logging data can be efficiently managed by adding chapter information to the time series data. That is, by designating arbitrary chapter information, time series data corresponding thereto can be searched and extracted from a large volume of time series data. In particular, since a unit of a cycle in which the control device collects observation values is in an order of msec, efficient management of data is effectively realized by adding chapter information. Since time series data can be efficiently managed, satisfactory data processing can be realized in data mining, statistical processes, machine learning, and the like.
For example, since a chapter of a manufacturing lot or a tact time (a start and an end) and an event such as occurrence of a failure can be associated with time series data such as logging data, necessary data can be extracted from a large volume of time series data.
In a time series database in which chapter info′ nation is not added as described above, there is no other means for users or the like to sequentially search for sections to be searched for using a sliding window in order to search for the target time series data, but this problem can be solved with the control device of the above-described embodiment.
The embodiments disclosed herein should be considered to be illustrative, not limitative. The scope of the invention is defined by the claims, not the above description, and all types of modifications made within the intention and scope of the claims are understood as being included in the invention.
Number | Date | Country | Kind |
---|---|---|---|
2017-027955 | Feb 2017 | JP | national |