CONTROL DEVICE, SYSTEM PROGRAM AND METHOD

JP7643213B2Active Publication Date: 2025-03-11OMRON CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021110651
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-07-02
Publication Date
2025-03-11
Estimated Expiration
2041-07-02

AI Technical Summary

Benefits of technology

【0018】 本技術によれば、制御装置を含む制御システムによるデータ収集をより確実に行うための解決手段を提供できる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007643213000001
    Figure 0007643213000001
  • Figure 0007643213000002
    Figure 0007643213000002
  • Figure 0007643213000003
    Figure 0007643213000003
Patent Text Reader

Abstract

To provide solution means for more reliably performing a data acquisition by a control system including a control device.SOLUTION: A control device comprises: a control calculation execution unit that executes a control calculation for a controlled object according to a user program; a data acquisition unit that acquires one or more data designated in advance and stores the acquired data in a storage designated in advance; and a data management unit that manages shared information which can be accessed by the control operation execution unit and the data acquisition unit. The data acquisition unit writes information indicating completion of saving data to the storage to the shared information. The shared information can be referenced in a user program executed by the control operation execution unit.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present technology relates to a control device for controlling a control device, a system program for implementing the control device, and a method executed by the control device. [Background technology]

[0002] In various production sites, there is a need to improve equipment operation rates through predictive maintenance, and there is also a need to collect the history of the manufacturing process for all products (to ensure traceability).

[0003] In response to these needs, a mechanism for collecting data collected and managed by a control device such as a PLC (Programmable Logic Controller) has been put to practical use. For example, Japanese Patent Application Laid-Open Publication No. 2007-249937 (Patent Document 1) discloses a method for monitoring collected data that allows a desired variable to be freely generated even after the PLC has entered an operating state. In this monitoring method, the collected data is saved in a CSV file format.

[0004] With the rapid advancement of information and communication technology in recent years, more data is being collected in shorter cycles. In addition to the data collected and managed by PLC, a system has been proposed that collects image data (still images and video). [Prior art documents] [Patent documents]

[0005] [Patent Document 1] JP 2007-249937 A Summary of the Invention [Problem to be solved by the invention]

[0006] As mentioned above, data collection at production sites is becoming increasingly important. Therefore, if any problem occurs in data collection, it may have an impact such as not being able to ship the manufactured product.

[0007] Therefore, the present technology provides a solution for more reliably collecting data by a control system including a control device. [Means for solving the problem]

[0008] A control device according to an example of the present technology includes a control calculation execution unit that executes a control calculation for a control target according to a user program, a data collection unit that collects one or more pieces of pre-specified data and stores them in a pre-specified storage, and a data management unit that manages shared information accessible to the control calculation execution unit and the data collection unit. The data collection unit writes information indicating completion of data storage in the storage to the shared information. The shared information is accessible to the user program executed by the control calculation execution unit. According to this configuration, the user program executed by the control calculation execution unit can refer to information indicating completion of data storage in the storage, so that control such as starting the next process on the condition that data storage in the storage is completed can be realized. This makes it possible to more reliably collect data.

[0009] The information indicating the completion of storing the data in the storage may include information indicating the date and time when storing the data in the storage is completed. According to this configuration, by monitoring the date and time included in the shared information, it is possible to determine whether storing the data in the storage is completed.

[0010] The control calculation execution unit may set a collection trigger to ON when a pre-specified condition is met, and the data collection unit may start data collection when the collection trigger is set to ON. With this configuration, the control calculation execution unit appropriately controls ON / OFF of the collection trigger, thereby controlling the start timing of data collection by the data collection unit.

[0011] The storage device may be connected to the control device via a network. According to this configuration, even if the storage device is connected via a network and cannot immediately complete data transmission, the completion of saving data to the storage device can be confirmed and monitored by using the above-mentioned mechanism.

[0012] The data collection unit may write information indicating whether or not data can be saved in the storage to the shared information. With this configuration, it is possible to determine whether or not data saving processing can be started before starting to save data in the storage.

[0013] The shared information may include information regarding the usage rate of the storage. With this configuration, it is possible to determine whether a state in which data storage processing can be started is available before starting to store data in the storage.

[0014] The data collection section may store in the storage information on a portion of the currently collected data that has changed from the data collected immediately before. With this configuration, the amount of data stored in the storage can be reduced.

[0015] The data collection unit may store in the storage, when the collected data is the same in multiple data collections, the contents of the same data and the number of times the same data has been collected repeatedly. With this configuration, even for control targets whose data does not change, necessary information can be collected without putting pressure on the storage capacity.

[0016] A system program according to another example of the present technology causes a computer to execute a step of executing a control calculation for a control target according to a user program, a step of collecting one or more pieces of pre-specified data and storing them in a pre-specified storage, and a step of writing information indicating completion of storing the data in the storage to shared information. The shared information is accessible in the user program.

[0017] According to yet another example of the present technology, there is provided a method executed by a control device. The method includes the steps of: executing a control operation for a control target according to a user program; collecting one or more pieces of pre-specified data and storing the data in a pre-specified storage; and writing information indicating completion of storing the data in the storage to shared information. The shared information is accessible in the user program. Effect of the Invention

[0018] According to the present technology, it is possible to provide a solution for more reliably collecting data by a control system including a control device. [Brief description of the drawings]

[0019] [Figure 1] FIG. 2 is a schematic diagram showing the main configuration of a control device of the control system according to the present embodiment. [Diagram 2] 1 is a schematic diagram showing an example of the overall configuration of a control system according to an embodiment of the present invention; [Diagram 3] 2 is a block diagram showing an example of a hardware configuration of a control device of the control system according to the present embodiment. FIG. [Figure 4] FIG. 2 is a schematic diagram showing an example of a functional configuration for realizing data collection provided by the control system according to the present embodiment. [Diagram 5] 4 is a time chart showing an example of data collection processing in the control system according to the present embodiment. [Figure 6] 2 is a schematic diagram showing an example of a data structure of status monitoring data managed by the control system according to the present embodiment; FIG. [Figure 7] 5 is a flowchart showing a processing procedure executed by a data collection module of the control device according to the present embodiment. [Figure 8] FIG. 4 is a diagram showing an example of a user program executed by the control device according to the present embodiment. [Figure 9] FIG. 11 is a diagram showing another example of a user program executed by the control device according to the embodiment. [Figure 10] It is a time chart showing an example of data collection processing by the control system according to the present embodiment. [Figure 11] It is a diagram showing an example of data compression by the control system according to the present embodiment. [Figure 12] It is a diagram showing another example of data compression by the control system according to the present embodiment.

Mode for Carrying Out the Invention

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

[0021] <A. Application Example> First, an example of a scenario to which the present invention is applied will be described.

[0022] FIG. 1 is a schematic diagram showing the main configuration of the control device 100 of the control system 1 according to the present embodiment. The control device 100 is a computer that controls a control target, and is typically implemented using a PLC (Programmable Logic Controller).

[0023] Referring to FIG. 1, the control device 100 includes, as a functional configuration, a PLC engine 150, a data collection module 160, and a data management unit 170.

[0024] The PLC engine 150 corresponds to a control operation execution unit that executes a control operation on a control target according to the user program 132.

[0025] In this specification, anything directly or indirectly related to the control operation executed by the control device is referred to as a "control target". The term "control target" is not limited to a single machine or device to which the control device gives a command, and a single machine or device from which the control device collects information, but may include a larger-scale facility or unit including those machines and devices.

[0026] The data collection module 160 corresponds to the data collection unit, collects one or more specified data, and stores it in a specified storage.

[0027] The data management unit 170 manages shared information accessible by the PLC engine 150 and the data collection module 160. Hereinafter, as an example of the shared information, the status monitoring data 178 will be described.

[0028] The data collection module 160 writes information indicating the completion of data storage to the storage into the shared information. Also, in the user program 132 executed by the PLC engine 150, the shared information can be referenced. That is, by including an instruction conditional on the shared information in the user program 132, control operations such as not starting a predetermined process if the data storage to the storage is not completed can be realized.

[0029] In this way, by sharing the shared information between the PLC engine 150 and the data collection module 160, data collection can be executed more reliably.

[0030] <B. Overall configuration example> FIG. 2 is a schematic diagram showing an overall configuration example of the control system 1 according to the present embodiment. Referring to FIG. 2, the control system 1 according to the present embodiment includes, as main components, a control device 100 for controlling a control target, a server device 200, and a network storage 250. These components are connected via a local network 2 and a global network 4. One or more network cameras 50-1, 50-2, 50-3 (hereinafter also collectively referred to as "network camera 50") are connected to the local network 2. A support device 300, which is an example of an information processing device, may be connected to the control device 100.

[0031] 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 the field device group 10 via a field network 6. The field network 6 preferably employs an industrial communication protocol. Known examples of such communication protocols include EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), and CompoNet (registered trademark).

[0032] The field devices 10 include devices that collect input data from controlled objects or manufacturing devices and production lines related to the control (hereinafter collectively referred to as "field"). Assumed devices for collecting such input data include input relays and various sensors. The field devices 10 further include 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. Assumed devices for performing some kind of action on such a field include output relays, contactors, servo drivers and servo motors, and any other actuators. These field devices 10 exchange data including input data and output data with the control device 100 via the field network 6.

[0033] In the configuration example shown in FIG. 2, the field device group 10 includes a remote I / O (Input / Output) device 12, a relay group 14, a servo driver 16, and a servo motor 18.

[0034] The remote I / O device 12 includes a communication unit that communicates via the field network 6, and an input / output unit (hereinafter also referred to as an "I / O unit") for collecting 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. Fig. 2 shows an example in which digital signals are exchanged as input data and output data via a relay group 14. The I / O unit may be directly connected to the field network 6.

[0035] The servo driver 16 drives the servo motor 18 in accordance with output data (eg, a position command) from the control device 100.

[0036] As described above, input data and output data are exchanged between the control device 100 and the field device group 10 via the field network 6. Usually, the exchanged data is updated at very short intervals of the order of several hundred μsec to several tens of msec.

[0037] The control device 100 transmits data (input data and / or output data) exchanged with the field device group 10, as well as data (internal data and / or working data) referenced or updated during the calculation processing of the control device 100, to the server device 200 and / or network storage 250.

[0038] In this way, the storage device of the transmission destination or the storage destination may be connected to the control device 100 via a network.

[0039] The network camera 50 transmits captured images (still images or moving images) to the server device 200 and / or the network storage 250 at any given time.

[0040] The server device 200 has storage for storing data, and stores data in response to requests from the control device 100 and / or the network camera 50. Similarly, the network storage 250 stores data in response to requests from the control device 100 and / or the network camera 50. Note that it is not necessary to provide both the server device 200 and the network storage 250, and only one of them may be provided. Alternatively, a plurality of server devices 200 or network storages 250 may be provided.

[0041] The support device 300 is an information processing device (an example of a computer) that supports the preparations necessary for the control device 100 to control a control target. Specifically, the support device 300 provides a development environment for user programs executed on the control device 100 (program creation / editing tools, parsers, compilers, etc.), a setting environment for setting parameters (configurations) of the control device 100 and various devices connected to the control device 100, a function of transmitting the generated user program to the control device 100, a function of online correcting / modifying the user program executed on the control device 100, and the like.

[0042] <C. Hardware Configuration Example> Next, a hardware configuration example of the main devices of the control system 1 according to the present embodiment will be described.

[0043] (c1: Hardware Configuration Example of Control Device 100) Fig. 3 is a block diagram showing an example of a hardware configuration of the control device 100 of the control system 1 according to the present embodiment. Referring to Fig. 3, the control device 100 includes a processor 102 such as a CPU (Central Processing Unit) or an MPU (Micro-Processing Unit), 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, an internal bus controller 122, a field network controller 118, and I / O units 124-1, 124-2, ....

[0044] The processor 102 reads out various programs stored in the secondary storage device 108, deploys them in the main storage device 106, and executes them to realize the processes and functions described below. The chipset 104 controls data transmission between the processor 102 and each component.

[0045] In addition to a system program 131, the secondary storage device 108 stores a user program 132 describing control operations, and a data collection setting 133 that specifies the target and period of data collection.

[0046] The network controller 110 controls data exchange with other devices via the local network 2. The USB controller 112 controls data exchange with the support device 300 via a USB connection.

[0047] 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 (such as the user program 132 and trace data) from the memory card 116.

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

[0049] The field network controller 118 controls data exchange with other devices via the field network 6 .

[0050] FIG. 3 shows an example of a configuration in which the necessary functions are provided by the processor 102 executing a program, but some or all of these provided functions may be implemented using a dedicated hardware circuit (e.g., an Application Specific Integrated Circuit (ASIC) or a Field-Programmable Gate Array (FPGA)). Alternatively, the main part 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) with different uses in parallel, and necessary applications may be executed on each OS.

[0051] (b2: Example of Hardware Configuration of Server Device 200) The server device 200 according to the present embodiment is realized, for example, by using hardware (for example, a general-purpose personal computer) that conforms to a general-purpose architecture. Since hardware that conforms to a general-purpose architecture is well known, detailed description thereof will not be provided here.

[0052] (b3: Example of hardware configuration for network storage 250) The network storage 250 according to this embodiment is realized, for example, by using hardware (for example, a general-purpose personal computer) that conforms to a general-purpose architecture. However, a configuration using fewer hardware resources than the server device 200 may be adopted. Since hardware that conforms to a general-purpose architecture is well known, a detailed description will not be provided here.

[0053] (b4: Hardware configuration example of support device 300) The support device 300 according to the present embodiment is realized, for example, by executing a program using hardware (for example, a general-purpose personal computer) that conforms to a general-purpose architecture. Since the hardware that conforms to the general-purpose architecture is well-known, detailed description thereof will not be given here.

[0054] <D. Data collection> Next, the data collection function and process provided by the control system 1 according to the present embodiment will be described.

[0055] FIG. 4 is a schematic diagram showing a functional configuration example for realizing data collection provided by the control system 1 according to the present embodiment.

[0056] Referring to FIG. 4, the control device 100 includes, as a functional configuration, a PLC engine 150, a data collection module 160, and a data management unit 170.

[0057] The data management unit 170 holds input data 172 collected from the field, output data 174 which is a command output to the field, and internal data 176 that is referred to and updated in the control calculation executed by the PLC engine 150 according to the user program 132. The data management unit 170 updates the input data 172, the output data 174, and the internal data 176 at a predetermined cycle (I / O refresh process).

[0058] The PLC engine 150 is a programmable execution entity that executes a control calculation for a control target according to the user program 132. More specifically, the PLC engine 150 refers to the input data 172 and the internal data 176 managed by the data management unit 170, executes the control calculation described in the user program 132, and outputs the calculation result calculated by the execution of the control calculation to the output data 174. In the execution of the control calculation, the internal data 176 is referred to and updated.

[0059] The data collection module 160 executes processing related to data collection. That is, the data collection module 160 collects one or more pieces of data designated in advance and stores them in a storage designated in advance. More specifically, the data collection module 160 collects one or more pieces of data designated from among the input data 172, the output data 174, and the internal data 176 at a designated period in accordance with the data collection setting 133. Then, the data collection module 160 transmits the collected data to a designated storage destination (for example, the server device 200 and / or the network storage 250).

[0060] Conditions for starting and ending data collection may also be specified in the data collection settings 133. In this case, the data collection module 160 determines whether one or more specified conditions are satisfied according to the data collection settings 133. Typically, the data collection module 160 starts data collection when a condition for starting data collection is satisfied, and ends data collection when a condition for ending data collection is satisfied. These conditions can be set based on any data managed by the data management unit 170.

[0061] The data collection module 160 can also transmit an image capture instruction (image capture trigger) to a specified network camera 50 in accordance with the data collection settings 133. The network camera 50 may capture images continuously, or may capture images in response to an image capture trigger from the control device 100 (data collection module 160). When capturing a moving image, an image capture start trigger and an image capture end trigger may be transmitted to the network camera 50.

[0062] The network camera 50 transmits image data generated by capturing an image to a specified storage destination (for example, the server device 200 and / or the network storage 250).

[0063] In the control system 1 according to the present embodiment, status information regarding data collection is shared between the PLC engine 150 and the data collection module 160. More specifically, the PLC engine 150 and the data collection module 160 share status monitoring data 178. That is, the data management unit 170 manages status monitoring data 178 (shared information) that can be accessed by the PLC engine 150 and the data collection module 160. In the functional configuration example shown in FIG. 4, the data management unit 170 manages the status monitoring data 178, but the status monitoring data 178 may be managed by any entity independent of the data management unit 170.

[0064] The control system 1 according to the present embodiment can execute processing while monitoring whether the processing related to data collection is appropriately executed by using the status monitoring data 178.

[0065] <E. Status Monitoring Data> Next, the data structure of the status monitoring data 178 and the processing using the status monitoring data 178 will be described.

[0066] FIG. 5 is a time chart showing an example of data collection processing in the control system 1 according to the present embodiment. Referring to FIG. 5, for example, processing related to production is executed for each workpiece (production process).

[0067] When the control device 100 starts processing related to production in the production process (time t1), it starts collecting production results (time t2). Subsequently, the control device 100 (and the network camera 50) starts storing the collected production results (collected data) in the storage (time t3).

[0068] Assume that the processing related to production ends at time t4. Along with the processing related to production, the collection of production results also ends. Finally, assume that the storage of the collected production results (collected data) is completed at time t5.

[0069] Here, the control device 100 (control calculation according to the user program 132) confirms that the collected production results (collected data) have been saved in the storage (time t7), and then starts processing related to production in the next production process (time t7).

[0070] In this way, in the control system 1 according to the present embodiment, the control device 100 can confirm the completion of saving the collected data in the storage, and can use the completion of saving in the storage as a condition to control the start of processing in the production process. For example, if the collected data cannot be saved in the storage for some reason, it is possible to prevent the production of the next workpiece. By adopting such control, it is possible to avoid a situation in which the production record of the produced workpiece cannot be saved, i.e., traceability cannot be guaranteed.

[0071] In this way, by starting the next cycle after the production process cycle is completed and the production results have been saved, highly reliable data collection can be achieved.

[0072] As shown in Fig. 5, the impact on takt time can be minimized by collecting production performance data in parallel with the production process. In addition, the impact on takt time can be minimized by collecting production performance data at high speed and in large volume.

[0073] 5 can be detected by, for example, updating the final output timestamp (see FIG. 6), as described below. In other words, by using the status monitoring data 178, the start timing of the production process can be appropriately controlled in the control calculation according to the user program 132 executed by the control device 100.

[0074] 6 is a schematic diagram showing an example of the data structure of status monitoring data 178 managed by the control system 1 according to the present embodiment. Referring to FIG. 6, the status monitoring data 178 includes a heartbeat 1781, error information 1782, warning information 1783, storage usage rate information 1784, and a final output timestamp 1785.

[0075] A timestamp indicating the date and time when it is determined that collected data can be saved normally, inquiring whether collected data can be saved normally, is stored in the heartbeat 1781. That is, the data collection module 160 writes the heartbeat 1781, which is information indicating whether data can be saved in storage, to the status monitoring data 178 (shared information).

[0076] If data collection is possible normally, the value of the timestamp will be updated at a predetermined interval. On the other hand, if data collection is not possible normally, the timestamp of the heartbeat 1781 will not be updated, and the value indicating the old date and time will be maintained as is. The interval at which the timestamp of the heartbeat 1781 is updated may be specified in the data collection setting 133.

[0077] Information about the most recent error related to storage is stored in the error information 1782. In the example shown in Fig. 6, the error information 1782 stores an error code indicating the type of error that occurred, an error message indicating the content of the error that occurred, and the date and time when the error occurred.

[0078] Information on the most recent storage-related warning (abnormal state before the error occurred) is stored in the warning information 1783. In the example shown in Fig. 6, a warning code indicating the type of the warning that occurred, a warning message indicating the content of the warning that occurred, and the date and time of the warning occurrence are stored in the warning information 1783.

[0079] Information relating to the usage rate of the storage at the destination is stored in the storage usage rate information 1784. In the example shown in Fig. 6, the storage usage rate information 1784 stores the usage rate (numerical value) of the storage at the destination, whether the usage rate of the storage has exceeded a predetermined warning threshold value (warning flag), and whether the usage rate of the storage has exceeded a predetermined abnormality threshold value (abnormality flag).

[0080] The timestamp of the most recent output process of collected data (process of saving to storage) is stored in the final output timestamp 1785. Therefore, when collected data is saved in storage, the timestamp stored in the final output timestamp 1785 is updated successively. On the other hand, when saving of collected data to storage is completed, the timestamp stored in the final output timestamp 1785 does not change.

[0081] For example, to confirm the completion of storing collected data over a certain period of time, the difference between the timestamp when the collected data was buffered before transmission and the timestamp stored in the final output timestamp 1785 (storage completion) can be evaluated.

[0082] The status monitoring data 178 shown in FIG. 6 is updated (written) by the data collection module 160 (FIG. 4) of the control device 100, and is referred to by the PLC engine 150 (FIG. 4) of the control device 100.

[0083] In this way, the data collection module 160 writes information indicating the completion of saving the data to the storage to the status monitoring data 178 (shared information). The status monitoring data 178 (shared information) can be referenced by the user program 132 executed by the PLC engine 150.

[0084] 6, information indicating the date and time when data storage in the storage is completed (final output timestamp 1785) is used as information indicating the completion of data storage in the storage. However, the information indicating the date and time when data storage in the storage is completed is not limited to a timestamp, and may be a counter that is incremented / decremented each time storage is completed, or may be a state value.

[0085] When a pre-specified data collection condition is met, the PLC engine 150 sets a collection trigger to ON. When the collection trigger is set to ON, the data collection module 160 starts collecting data and saving the collected data.

[0086] Fig. 7 is a flowchart showing a processing procedure executed by the data collection module 160 of the control device 100 according to this embodiment. Typically, each step shown in Fig. 7 is realized by the processor 102 of the control device 100 executing the system program 131 (Fig. 3).

[0087] 7, the control device 100 determines whether the collection trigger is set to ON (step S2). If the collection trigger is not set to ON (NO in step S2), the processes of steps S4 to S10 are skipped, and the processes of step S12 and after are repeated.

[0088] If the collection trigger is set to ON (YES in step S2), the control device 100 temporarily buffers the specified data or data sets (step S4). Then, when the buffering of the specified data or data sets is completed, the control device 100 starts transmitting the buffered data to the specified storage destination (step S6).

[0089] The control device 100 judges whether or not the transmission of the data to the storage destination is completed (step S8). If the transmission of the data to the storage destination is not completed (NO in step S8), the process of step S8 is repeated.

[0090] In this manner, the control device 100 executes the process (steps S4 to S8) of collecting one or more pieces of data designated in advance and storing them in a storage designated in advance.

[0091] If the transmission of the data to the storage destination has been completed (YES in step S8), the control device 100 updates the final output timestamp 1785 with a timestamp indicating the current date and time (step S10).

[0092] In this manner, the control device 100 executes the process of writing information indicating the completion of saving the data in the storage to the status monitoring data 178 (shared information) (steps S8 and S10).

[0093] Next, the control device 100 judges whether an error or warning event has occurred (step S12). If an error or warning event has occurred (YES in step S12), the control device 100 writes information about the error or warning that has occurred to the error information 1782 or warning information 1783 (step S14). Then, the processing from step S2 onwards is repeated.

[0094] If no error or warning event has occurred (NO in step S12), the control device 100 judges whether or not the update period for the storage usage rate information 1784 has arrived (step S16). If the update period for the storage usage rate information 1784 has arrived (YES in step S16), the control device 100 acquires the usage rate of the storage at the save destination, and updates the storage usage rate information 1784 with the acquired information (step S18).

[0095] If the update period for the storage usage rate information 1784 has not arrived (NO in step S16), the process of step S18 is skipped.

[0096] Next, the control device 100 judges whether the acquired storage usage rate exceeds a predetermined threshold value (step S20).

[0097] If the acquired storage usage rate does not exceed a predetermined threshold (NO in step S20), the control device 100 judges whether the update period of the heartbeat 1781 has arrived (step S22). If the update period of the heartbeat 1781 has arrived (YES in step S22), the control device 100 judges whether the storage at the storage destination is accessible (step S24). If the storage at the storage destination is accessible (YES in step S24), the control device 100 updates the heartbeat 1781 with a timestamp indicating the current date and time (step S26). Then, the process from step S2 onwards is repeated.

[0098] If the usage rate of the acquired storage exceeds a predetermined threshold value (YES in step S20), the processes of steps S22 to S26 are skipped. If the update period of the heartbeat 1781 has not arrived (NO in step S22), the processes of steps S24 and S26 are skipped. If the destination storage cannot be accessed (NO in step S24), the process of step S26 is skipped.

[0099] By the above-mentioned processing procedure, data collection and updating of the status monitoring data 178 are realized.

[0100] Fig. 8 is a diagram showing an example of the user program 132 executed by the control device 100 according to the present embodiment. Fig. 8 shows an example of code for confirming completion of saving of collected data to a save destination in the PLC engine 150 (user program 132).

[0101] 8, the code on the first line of user program 132 indicates a process in which data collection module 160 stores the date and time (timestamp) when data collection starts in variable 1322. More specifically, in the control cycle in which collection trigger 1320 changes from OFF to ON, data write command 1321 is executed. Data write command 1321 writes the value of final output timestamp 1785 into variable 1322. That is, the timestamp when data collection starts is set in variable 1322.

[0102] The code on the second line of the user program 132 indicates a process for determining whether or not there has been a change in the value of the final output timestamp 1785. More specifically, the comparison instruction 1324 outputs ON (TRUE) if the value of the final output timestamp 1785 is greater than the value of the variable 1322 (the timestamp when the collection trigger 1320 changed to ON).

[0103] The comparison command 1323 outputs ON (TRUE) when the value of the timestamp 1327 indicating the reference date and time is different from the value of the final output timestamp 1785. In other words, the comparison command 1323 is a start condition for preventing an erroneous judgment from being made by executing the comparison command 1324 in the second line in the same control cycle as the control cycle in which the data write command 1321 included in the code in the first line is executed.

[0104] When the comparison command 1324 outputs ON (TRUE), the completion flag 1325 is set to ON (TRUE) and the data write command 1326 is executed. The data write command 1326 writes the value of the timestamp 1327 indicating the reference date and time into the variable 1322. That is, the timestamp at the time when the data saving is completed is set in the variable 1322.

[0105] By using the code of the user program 132 as described above, it is possible to monitor the update (change) of the final output timestamp 1785, thereby detecting the completion of saving the collected data in the storage.

[0106] Fig. 9 is a diagram showing another example of the user program 132 executed by the control device 100 according to the present embodiment. Fig. 9 shows a code example for setting a condition for starting a cycle of a production process in the PLC engine 150 (user program 132).

[0107] 9, the user program 132 prescribes three conditions for starting a cycle of a production process. More specifically, the conditions are a ready flag 1330 indicating completion of preparations for starting the production process, a completion flag 1325 indicating completion of saving of previously executed collected data, and a heartbeat normal flag 1335 indicating that the heartbeat 1781 has been updated normally. The conditions are that the ready flag 1330, the completion flag 1325, and the heartbeat normal flag 1335 are all ON (TRUE). When all the conditions are met, a production process preparation complete flag 1336 is set to ON (TRUE).

[0108] A time difference command 1331 calculates the difference between the value of timestamp 1332 indicating the current date and time and the value of heartbeat 1781. A comparison command 1333 sets a heartbeat normal flag 1335 to ON (TRUE) if the difference between the value of timestamp 1332 indicating the current date and time and the value of heartbeat 1781 is equal to or less than the heartbeat update period cycle length 1334. In other words, if the timestamp of heartbeat 1781 is updated within the update period cycle length 1334 from the current time, it is determined that the collected data can be saved normally, and the next cycle can be started.

[0109] In this way, by including the heartbeat 1781 as the start condition of the production process cycle, it is possible to limit the start of the next cycle of the production process only when the collected data can be saved normally. By adopting such a condition, it is possible to avoid situations where the production process cycle is accidentally started in cases such as (1) a network failure between the control device 100 (or the network camera 50) and the storage (the server device 200 and / or the network storage 250), (2) a hardware failure of the control device 100 (or the network camera 50), (3) a decrease in the free capacity of the storage, and (4) a setting error in the collection conditions.

[0110] <F. Processing Example> Next, a processing example of data collection by the control system 1 according to the present embodiment will be described.

[0111] FIG. 10 is a time chart showing a processing example of data collection by the control system 1 according to the present embodiment.

[0112] FIG. 10(A) shows a processing example in which the collection trigger is set to ON only for one control cycle. In this example, data collection is executed in conjunction with the collection trigger. In response to the rising edge of the collection trigger (change from OFF to ON), storage saving is started with a delay of a predetermined time. When the storage saving is completed, the final output timestamp 1785 is updated. The next cycle is started on the condition that the final output timestamp 1785 has been updated.

[0113] FIG. 10(B) shows an example of a process in which the collection trigger is set ON multiple times. Also in this example, data collection is executed in conjunction with the collection trigger. Regarding storage saving, it is continuously executed according to the data that may sequentially occur due to data collection. In storage saving, each time the saving of data in a predetermined unit (for example, file unit) is sequentially completed, the final output timestamp 1785 is also sequentially updated. Note that the update of the value of the final output timestamp 1785 itself may be performed at regular intervals. When the value of the final output timestamp 1785 is updated at regular intervals, if the storage saving was not completed in the previous cycle, or if the storage saving was not executed in the previous cycle, the final output timestamp 1785 is not updated.

[0114] FIG. 10(C) shows an example of a process in which the collection trigger is maintained ON over a plurality of control cycles. Also in this example, data collection is executed in conjunction with the collection trigger. Regarding storage saving, it is continuously executed according to the data that may sequentially occur due to data collection. In storage saving, each time the saving of data in a predetermined unit (for example, file unit) is sequentially completed, the final output timestamp 1785 is also sequentially updated. Note that the update of the value of the final output timestamp 1785 itself may be performed at regular intervals. When the value of the final output timestamp 1785 is updated at regular intervals, if the storage saving was not completed in the previous cycle, or if the storage saving was not executed in the previous cycle, the final output timestamp 1785 is not updated.

[0115] As shown in FIG. 10, by utilizing the changes in the collection trigger and the value of the final output timestamp 1785, it is possible to realize arbitrary data collection and control of the production process according to the use and purpose.

[0116] <G. Data storage format> In the above-mentioned data storage, the data stored in the storage may be stored in a format with a reduced amount of data as follows. More specifically, the data collection module 160 of the control device 100 may compress the buffered data by the following process before transmitting it to the storage. The data compression processing method described below is suitable for information collected by the control device 100 from the production site.

[0117] FIG. 11 is a diagram showing an example of data compression by the control system 1 according to this embodiment. FIG. 11(A) shows an example of collected data 180 in an uncompressed state. The collected data 180 includes a plurality of records each consisting of a timestamp 181 indicating the collection timing and collected data 182. However, changes in the data 182 collected by the control device 100 occur sporadically compared to the collection cycle. Therefore, only the part where the value has changed may be extracted from the data arranged in time series and output as the collected data 180.

[0118] 11B shows an example of collected data 190 obtained by compressing collected data 180. Collected data 190 includes a time stamp 181 indicating the collection timing, an elapsed time 192, a change presence / absence flag 193, a variable state 194, and a storage area 195.

[0119] A timestamp indicating a reference date and time is stored in the timestamp 181 of a specific (usually the first) record. The elapsed time 192 stores the time elapsed from the reference date and time stored in the timestamp 181.

[0120] The change flag 193 stores a flag indicating whether the data stored in the storage area 195 of the corresponding record has changed from the data stored in the storage area 195 of the immediately preceding record. If the data has changed from the immediately preceding record, "1" (TRUE) is set, and if the data is the same as the immediately preceding record, "0" (FALSE) is set.

[0121] Variable status 194 stores a bit string having a length corresponding to the number of bits of data stored in storage area 195. The position of each bit corresponds to the position (column number) of data stored in storage area 195. The bit string stored in variable status 194 is set to "1" (TRUE) only for data that has changed from the previous record, and is set to "0" (FALSE) otherwise.

[0122] For example, "100000" means that only the first (column) data (corresponding to data1 in FIG. 11(A)) has changed, and one corresponding value has been stored in storage area 195. Also, "010100" means that only the second (column) and fourth (column) data (corresponding to data2 and data4 in FIG. 11(A)) have changed, and two corresponding values ​​have been stored in storage area 195.

[0123] In storage area 195, data that is set to "1" (TRUE) in the bit string of variable status 194 is stored.

[0124] In this way, the collected data 190 includes only data that has changed compared to the immediately preceding record by comparing the records arranged in chronological order. That is, the data collection module 160 of the control device 100 may store in storage information on the portion of the currently collected data that has changed from the immediately preceding data.

[0125] By employing such a data compression method, it is possible to efficiently collect time series data in which value changes occur sporadically compared to the collection period.

[0126] FIG. 12 is a diagram showing another example of data compression by the control system 1 according to the present embodiment. FIG. 12(A) shows an example of the collected data 180 in a state where the data is not compressed. In the collected data 180 shown in FIG. 12(A), the value of the data 182 does not change even as time elapses. In such collected data 180, it has not changed from the previous record (that is, the same value as the data 182 in the previous record is stored as the data 182). Therefore, it is sufficient to include in the collected data 180 the information that the values of the data 182 are the same.

[0127] FIG. 12(B) shows an example of the collected data 190A obtained by compressing the collected data 180. The collected data 190A further includes the number of repetitions 196 as compared with the collected data 190 shown in FIG. 11(B).

[0128] The number of repetitions 196 indicates how many records of the same data as the data stored in the corresponding record have been repeated. In the collected data 190A shown in FIG. 12(B), "8" is stored in the number of repetitions 196, indicating that the same data as the first record continues for another 8 records. That is, the data collection module 160 of the control device 100 may store, in the storage, the content of the same data and the number of times the same data has been repeatedly collected when the collected data is the same in multiple data collections.

[0129] In this way, when the same records arranged in time series are continuous, the collected data 190A can efficiently collect time series data by including only the number of times the records are continuous (the number of repetitions).

[0130] <H. Supplementary Note> The present embodiment as described above includes the following technical ideas.

[0131] [Configuration 1] A control operation execution unit (150) that executes a control operation on a control target according to a user program (132), A data collection unit (160) that collects one or more pieces of data designated in advance and stores them in a storage (200, 250) designated in advance; a data management unit (170) that manages shared information (178) accessible to the control operation execution unit and the data collection unit; The data collection unit writes information (1785) indicating completion of storing the data in the storage to the shared information, A control device, wherein the shared information is referable in the user program executed by the control operation execution unit.

[0132] [Configuration 2] 2. The control device according to claim 1, wherein the information indicating completion of storing the data in the storage includes information indicating a date and time when storing the data in the storage was completed.

[0133] [Configuration 3] The control calculation execution unit sets the collection trigger (1320) to ON when a pre-specified condition is met, 3. The control device according to configuration 1 or 2, wherein the data collection unit starts data collection when the collection trigger is set to ON.

[0134] [Configuration 4] 4. The control device according to any one of configurations 1 to 3, wherein the storage is connected to the control device via a network.

[0135] [Configuration 5] 5. The control device according to any one of configurations 1 to 4, wherein the data collection unit writes information indicating whether or not the data can be saved in the storage to the shared information (1781).

[0136] [Configuration 6] 5. The control device according to any one of configurations 1 to 4, wherein the shared information includes information (1784) relating to a usage rate of the storage.

[0137] [Configuration 7] The data collection unit stores, in the storage, information (190) on a portion that has changed from the data collected immediately before among the data collected this time, in the control device according to any one of Configurations 1 to 6.

[0138] [Configuration 8] In a plurality of data collections, when the collected data is the same, the data collection unit stores, in the storage, the content of the same data and the number of times (190A) that the same data has been repeatedly collected, in the control device according to any one of Configurations 1 to 7.

[0139] [Configuration 9] A system program (131) causes a computer (100) to execute a control operation on a control target according to a user program (132) (step (150)), collect one or a plurality of pre-specified data and store the data in a pre-specified storage (200, 250) (steps (S16 to S24)), and write information (1785) indicating completion of data storage in the storage into shared information (178) (steps (S26, S28)), wherein, in the user program, the shared information is made referable, in the system program.

[0140] [Configuration 10] A method executed by a control device, the method including executing a control operation on a control target according to a user program, collecting one or a plurality of pre-specified data and storing the data in a pre-specified storage (200, 250) (steps (S16 to S24)), and writing information (1785) indicating completion of data storage in the storage into shared information (178) (steps (S26, S28)), wherein, in the user program, the shared information is made referable, in the method.

[0141] <I. Advantages> According to a control system including a control device according to the present embodiment, a solution for more reliably collecting data can be provided.

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

[0143] 1 control system, 2 local network, 4 global network, 6 field network, 10 field devices, 12 remote I / O devices, 14 relays, 16 servo driver, 18 servo motor, 50 network camera, 100 control device, 102 processor, 104 chipset, 106 main memory device, 108 secondary memory device, 110 network controller, 112 USB controller, 114 memory card interface, 116 memory card, 118 field network controller, 122 internal bus controller, 124 I / O unit, 131 system program, 132 user program, 133 data collection setting, 150 PLC engine, 160 data collection module, 170 data management section, 172 input data, 174 output data, 176 internal data, 178 status monitoring data, 180, 190, 190A collected data, 181, 1327, 1332 time stamp, 182 data, 192 elapsed time, 193 change / non-change flag, 194 variable state, 195 storage area, 196 number of repetitions, 200 server device, 250 network storage, 300 support device, 1320 collection trigger, 1321, 1326 data write command, 1322 variable, 1323, 1324, 1333 comparison command, 1325 completion flag, 1330 ready flag, 1331 time difference command, 1334 update period cycle length, 1335 heartbeat normal flag, 1336 preparation completion flag, 1781 heartbeat, 1782 error information, 1783 warning information, 1784 storage utilization rate information, 1785 last output timestamp.

Claims

1. A control device comprising: a control calculation execution unit that executes a control calculation for a control object in accordance with a user program; a data collection unit that collects one or more pieces of data designated in advance and stores the collected data in a storage device designated in advance; a data management unit that manages shared information accessible to the control operation execution unit and the data collection unit, the storage is connected to the control device via a network, the data collection unit writes information indicating completion of storing the data in the storage to the shared information; A control device, wherein the shared information is referable in the user program executed by the control operation execution unit.

2. The control device according to claim 1 , wherein the information indicating the completion of storing the data in the storage includes information indicating a date and time when the storing of the data in the storage was completed.

3. The control operation execution unit sets a collection trigger to ON when a pre-specified condition is satisfied, The control device according to claim 1 , wherein the data collection unit starts data collection when the collection trigger is set to ON.

4. 4. The control device according to claim 1, wherein the data collection unit writes information indicating whether or not data can be saved in the storage to the shared information.

5. 4. The control device according to claim 1, wherein the shared information includes information regarding a usage rate of the storage.

6. 6. The control device according to claim 1, wherein the data collection unit stores in the storage information on a portion of the currently collected data that has changed from the data collected immediately before.

7. The control device according to any one of claims 1 to 6, wherein, when the collected data is the same during multiple data collections, the data collection unit stores in the storage the contents of the same data and the number of times the same data has been repeatedly collected.

8. A system program for a computer, comprising: Executing a control operation for a control target in accordance with a user program; A step of collecting one or more pieces of pre-specified data and storing them in a pre-specified storage; and writing information indicating completion of storing the data in the storage device into shared information; the storage is connected to the computer via a network; A system program in which the shared information is accessible to the user program.

9. A method implemented in a controller, comprising: Executing a control operation for a control target in accordance with a user program; A step of collecting one or more pieces of pre-specified data and storing them in a pre-specified storage; writing information indicating completion of storing the data in the storage device to shared information; the storage is connected to the control device via a network, The method, wherein the shared information is accessible in the user program.

Citation Information

Patent Citations

  • Method for synchronizing module type programmable controller and programmable controller

    JP2006079480A

  • Monitor method and device for collection data

    JP2007249937A

  • Programmable logic controller, and expansion unit, control method, and control program of the same

    JP2016110459A

  • Control system and controller therefor

    JP2017021498A

  • Controller

    JP2020149477A