Data storage system, data storage method, and data storage program
The data storage system synchronizes time and associates variable and image data for reliable storage, addressing the challenge of data scattering and capacity limitations in existing technologies, facilitating accurate analysis of manufacturing site conditions.
Patent Information
- Application Number
- JP2023112303
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-01-20
AI Technical Summary
Existing technologies fail to reliably store large volumes of variable data and image data from manufacturing sites without loss, as they either scatter the data across different storage locations or use memory cards with insufficient capacity, making it difficult to associate and analyze these data sets effectively.
A data storage system comprising a control device, camera, and network storage that synchronizes time between the control device and camera, collects and transmits variable and image data to network storage, and associates them using time information for reliable storage.
Ensures reliable storage of variable and image data without loss, enabling accurate analysis of manufacturing site conditions by synchronizing time and securely transmitting data between devices.
Smart Images

Figure 2025009354000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a data storage system, a data storage method, and a data storage program. [Background technology]
[0002] 2. Description of the Related Art Technologies relating to control devices (eg, programmable logic controllers (PLCs), industrial personal computers (PCs), etc.) that control devices used in manufacturing sites and the like have been proposed.
[0003] For example, JP 2019-128702 A (Patent Document 1) discloses a method for transferring data (device values) acquired by a PLC when controlling production equipment to an external server (e.g., a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS), or a personal computer) at high speed and in real time.
[0004] JP 2020-13526 A (Patent Document 2) and JP 2021-36479 A (Patent Document 3) disclose that data (device values) acquired by a PLC when controlling production equipment and image data captured by a camera are associated with time information and stored on a memory card. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2019-128702 A [Patent Document 2] JP 2020-13526 A [Patent Document 3] Patent Publication No. 2021-36479 Summary of the Invention [Problem to be solved by the invention]
[0006] In order to monitor the situation of a site (e.g., a manufacturing site) where a device is installed, it is necessary to record both variable data of one or more variables managed by a control device that controls the device and image data of the situation of the site for a long period of time. However, Patent Document 1 does not disclose the storage of image data of the situation of the site. If the image data of the situation of the site is stored in a server other than an external server in which the device values (variable data) are stored, the variable data and the image data are scattered, making it difficult for a user to refer to them in association with each other. In Patent Documents 2 and 3, the device values and image data are stored in a memory card, but the capacity of the memory card is generally small. Both the variable data and the image data are large-capacity data. For example, one week's worth of variable data exceeds 1 TB, and one week's worth of video data exceeds 151 GB. Therefore, the method disclosed in Patent Documents 2 and 3 may not be able to store enough variable data and image data to monitor the situation of the site.
[0007] An object of the present disclosure is to reliably store variable data and image data without scattering them. [Means for solving the problem]
[0008] A data storage system according to an aspect of the present disclosure includes a control device, a camera that captures an area to be monitored, and a network storage. The control device includes a collection unit that collects variable data of one or more variables managed by the control device, a first extraction unit that extracts, when a storage trigger occurs, from the variable data, variable data to be stored during a period to be stored that is determined based on the time when the storage trigger occurs, and a transmission unit that transmits the variable data to be stored to the network storage. The camera transmits image data of the area to be monitored to the network storage. The network storage includes a second extraction unit that extracts, when a storage trigger occurs, image data to be stored during a period to be stored from the image data, and a storage unit that associates the variable data to be stored and the image data to be stored with time information and stores them.
[0009] According to this configuration, the variable data and image data can be stored reliably without being scattered or lost.
[0010] In the above disclosure, preferably, the control device further includes an adjustment unit that synchronizes the time between the control device and the camera.
[0011] With this configuration, the time of the control device and the camera can be synchronized.
[0012] In the above disclosure, preferably, the adjustment unit transmits a time adjustment command to the camera. When the camera receives the time adjustment command, the adjustment unit transmits a response command to the control device. When the adjustment unit receives the response command, the adjustment unit calculates a correction time to be transmitted to the camera based on the transmission time of the time adjustment command and the reception time of the response command, and transmits the correction time to the camera.
[0013] With this configuration, the time of the control device and the camera can be synchronized.
[0014] In the above disclosure, preferably, when the adjustment unit receives a response command, it calculates a communication delay time between the control device and the camera based on the sending time of the time adjustment command and the receiving time of the response command, and calculates a correction time based on the communication delay time.
[0015] With this configuration, the time of the control device and the camera can be synchronized.
[0016] A data storage method according to another aspect of the present disclosure is executed by one or more computers. The data storage method includes collecting variable data of one or more variables managed by a control device, extracting, when a storage trigger occurs, from the variable data, variable data to be stored for a period to be stored that is determined based on a time when the storage trigger occurs, transmitting the variable data to be stored to a network storage, transmitting image data of an area to be monitored to the network storage, extracting, when a storage trigger occurs, image data to be stored for a period to be stored from the image data, and storing the variable data to be stored and the image data to be stored in association with time information.
[0017] According to this configuration, the variable data and image data can be stored reliably without being scattered or lost.
[0018] A data storage program according to another aspect of the present disclosure causes one or more computers to execute the above data storage method.
[0019] According to this configuration, the variable data and image data can be stored reliably without being scattered or lost. Effect of the Invention
[0020] According to the present disclosure, variable data and image data can be reliably stored without being scattered or lost. [Brief description of the drawings]
[0021] [Figure 1] 1 is a diagram showing a data storage system according to an embodiment of the present invention; [Diagram 2] FIG. 2 is a diagram illustrating an example of a hardware configuration of a control device according to the present embodiment. [Diagram 3] FIG. 2 is a diagram illustrating an example of a hardware configuration of a camera according to the present embodiment. [Figure 4] 2 is a diagram illustrating an example of a hardware configuration of a NAS according to the present embodiment. [Diagram 5]FIG. 2 is a diagram illustrating an example of a task executed by the control device in the present embodiment. [Figure 6] 11 is a diagram showing an overview of a transmission process of transmitting variable data to be stored from a control device to a NAS, which is part of the data storage process in this embodiment. FIG. [Figure 7] FIG. 2 is a diagram showing a first method of collecting / saving variable data in the present embodiment. [Figure 8] FIG. 11 is a diagram showing a second method of collecting / saving variable data in the present embodiment. [Figure 9] FIG. 13 is a diagram showing an example of a setting screen for setting variable data collection / storage conditions in the present embodiment. [Figure 10] FIG. 2 is a diagram showing an overview of a storage process by a NAS among data storage processes in the present embodiment. [Figure 11] 11 is a diagram showing an overview of a time synchronization process performed between the control device and the camera, which is part of the data storage process in this embodiment. FIG. [Figure 12] 10 is a flowchart showing a procedure of a setting process in the present embodiment. [Figure 13] 7 is a flowchart showing part of the procedure of the transmission process in the present embodiment described with reference to FIG. 6. [Figure 14] 7 is a flowchart showing the remaining steps of the transmission process in the present embodiment described with reference to FIG. 6. [Figure 15] 5 is a flowchart showing the procedure of a recording process by a camera in the present embodiment. [Figure 16] 11 is a flowchart showing the procedure of the storage process by the NAS in the present embodiment described with reference to FIG. 10. [Figure 17] 12 is a flowchart showing the procedure of the time adjustment process in the present embodiment described with reference to FIG. 11. [Figure 18] 10 is a flowchart showing a procedure for a setting change process according to the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0022] Hereinafter, embodiments and modifications according to the present disclosure will be described with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed descriptions thereof will not be repeated. Note that the embodiments and modifications described below may be selectively combined as appropriate.
[0023] [Embodiment] [A. Application Example] First, an example of a scenario to which the present disclosure is applied will be described.
[0024] FIG. 1 is a diagram showing a data storage system according to the present embodiment. The data storage system 1 according to the present embodiment includes a control device 100, a support device 200, a touch panel 300, a camera 400, a NAS (Network Attached Storage) 500, an NTP (Network Time Protocol) server 600, and one or more field devices 700.
[0025] The control device 100, the support device 200, the touch panel 300, the camera 400, the NAS 500, and the NTP server 600 are connected to each other via a higher-level network 901. The higher-level network 901 is, for example, a general-purpose Ethernet (registered trademark). Note that the control device 100 and the support device 200 may be connected to each other via a USB (Universal Serial Bus).
[0026] The control device 100 is connected to one or more field devices 700 via a field network 902. It is preferable to adopt a bus or network that performs periodic communication with guaranteed data arrival time for the field network 902. As such a bus or network that performs periodic communication, EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), CompoNet (registered trademark), etc. are known.
[0027] The control device 100 is, for example, a computer such as a PLC (Programmable Logic Controller) or an industrial PC (Personal Computer). The control device 100 controls one or more field devices 700 in accordance with a user program created in advance. Each of the one or more field devices 700 includes an actuator that exerts some kind of physical action on a production facility or a production line (hereinafter collectively referred to as the "field"), various sensors installed in the field, or an input / output device that exchanges information with the field.
[0028] In the example shown in FIG. 1, the one or more field devices 700 include, but are not limited to, a field device including a servo motor driver 701 and a servo motor 801, a field device including a temperature regulator 702 and a heater 802, and a field device including a robot controller 703 and a robot 803.
[0029] The control device 100 manages one or more variables. The one or more variables include one or more internal state variables indicating an internal state of the control device 100 and one or more input / output variables exchanged between the control device 100 and one or more field devices 700. The one or more internal state variables include one or more control state variables indicating whether the control device 100 controls one or more field devices 700. The one or more input / output variables include at least one of one or more command variables indicating a command value from the control device 100 to one or more field devices 700, one or more current value variables indicating a state value of the one or more field devices 700, and one or more unit conversion variables for converting the unit of the state value of the one or more field devices 700. The control device 100 saves the variable data of the one or more variables to be saved during the period to be saved in the memory card 106A. After that, the control device 100 transmits the variable data to be saved to the NAS 500. The period to be saved will be described later with reference to FIG. 7 and FIG. 8.
[0030] The support device 200 is a device that supports the preparations required for the control device 100 to control one or more field devices 700. Specifically, the support device 200 provides a development environment (program creation and editing tools, parsers, compilers, etc.) for programs executed by the control device 100, a setting environment for setting parameters (configurations) of the control device 100 and various devices connected to the control device 100, a function for outputting a generated user program to the control device 100, and a function for online modification of a user program executed on the control device 100, etc.
[0031] Upon receiving an operation from a user, the touch panel 300 outputs a command or the like corresponding to the user operation to the control device 100. The touch panel 300 also displays the results of calculations performed by the control device 100 and the like.
[0032] The camera 400 is a network camera. The camera 400 is installed in a field. The camera 400 captures an image of a monitored area including at least a part of one or more field devices 700. The camera 400 transmits image data of the monitored area to the NAS 500. The image data may be still image data or video data. The image data also includes image capture time information indicating the time of capture.
[0033] The NAS500 is an example of a "network storage" in this disclosure. The NAS500 can store a large amount of data. More specifically, the NAS500 can store a larger amount of data than both the memory card and the storage of the control device 100. The NAS500 stores image data transmitted from the camera 400. Furthermore, the NAS500 extracts image data to be stored during the storage period from the image data, and stores the image data to be stored and the variable data to be stored transmitted from the control device 100 in association with time information.
[0034] The NTP server 600 provides the current time to the control device 100 in response to a request from the control device 100.
[0035] In the data storage system 1, the variable data to be stored and the image data to be stored are associated with time information and stored in the NAS 500. Therefore, according to the data storage system 1, the variable data and the image data can be reliably stored without dissipation.
[0036] <B. Hardware Configuration Example> Next, a hardware configuration example of the device constituting the data storage system 1 in the present embodiment will be described.
[0037] (b1: Control Device 100) FIG. 2 is a diagram showing an example of the hardware configuration of the control device in the present embodiment. The control device 100 includes, for example, a processor 101, a memory 102, a storage 103, an upper network controller 104, a field network controller 105, a memory card interface 106, a timer 107, and a clock 108.
[0038] The processor 101 is, for example, a CPU (Central Processing Unit). The processor 101 reads out the control program 113 stored in the storage 103, expands it in the memory 102, and executes it.
[0039] The memory 102 is composed of a volatile storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory). The memory 102 temporarily stores the variable data of one or more variables.
[0040] The storage 103 is composed of a non-volatile storage device such as an HDD (Hard Disc Drive), an SSD (Solid State Drive), or a flash memory, for example.
[0041] The storage 103 stores a control program 113. The control program 113 includes a system program 114, a user program 118, an anomaly detection program 120, a collection program 121, a transmission program 122, and a time management program 123.
[0042] The system programs 114 include an OS (Operating System) 115 for implementing the basic functions of the control device 100, a scheduler program 116, and an input / output program 117.
[0043] The scheduler program 116 provides a function for managing the execution order and execution timing of one or more tasks or one or more processes that constitute the control program 113 .
[0044] The input / output program 117 provides a function to acquire input data (e.g., variable data of a current value variable, variable data of a unit conversion variable, etc.) from one or more field devices 700. The input / output program 117 also provides a function to output a command value (variable data of a command variable) calculated by executing the user program 118 to a target field device.
[0045] The user program 118 provides a control calculation function. The user program 118 can be arbitrarily configured for each of the one or more field devices 700. The user program 118 can be defined by ladder logic using function blocks or the like. In the example shown in FIG. 2, the user program 118 includes a motion calculation 119. The motion calculation 119 generates a command value for a target field device based on input data (variable data) from the one or more field devices 700 and commands included in the user program 118.
[0046] The abnormality detection program 120 provides a function for determining whether or not an abnormality has occurred in one or more field devices 700 .
[0047] The collection program 121 provides a function for collecting variable data of one or more variables managed by the control device 100. In this disclosure, collection means saving the variable data in a predetermined storage area in the memory 102. The predetermined storage area in the memory 102 includes at least one of a data buffer 161 and a ring buffer 162 (see FIG. 6).
[0048] When the processor 101 executes the collection program 121, first, variable data of one or more variables managed by the control device 100 is associated with collection time information indicating the collection time and stored in the data buffer 161 in the memory 102. The collection time is the time when the variable data is stored in the data buffer 161. After that, at least a part of the variable data stored in the data buffer 161 is stored in the ring buffer 162 in association with the collection time information.
[0049] The transmission program 122 provides a function of extracting, when a storage trigger occurs, variable data to be stored during a period to be stored that is determined based on the time when the storage trigger occurs from the variable data stored in the ring buffer 162, and transmitting the variable data to be stored to the NAS 500. A storage trigger occurs when the processor 101 determines that an abnormality has occurred in one or more field devices 700.
[0050] The time management program 123 provides a function for acquiring the current time from the NTP server 600 and synchronizing the clock 108 to the current time, and a function for synchronizing the time between the control device 100 and the camera 400 .
[0051] The storage 103 stores data type definition data 124. The data type definition data 124 defines the data type of each of one or more variables managed by the control device 100.
[0052] The storage 103 stores the setting information 125. The setting information 125 includes the collection / save conditions of the variable data, other setting information of the control device 100, the IP address of the NAS 500, and the IP address of the camera 400. The collection / save conditions of the variable data include the collection / save method of the variable data. There are a first method and a second method for the collection / save method of the variable data. When the collection / save method of the variable data is the first method, the collection / save conditions of the variable data further include a pre-trigger collection time and a post-trigger collection time. When the collection / save method of the variable data is the second method, the collection / save conditions of the variable data further include a collection period. The first method, the second method, the pre-trigger collection time, the post-trigger collection time, and the collection period will be described later with reference to FIG. 7 and FIG. 8. The setting information 125 is downloaded from the support device 200 or the touch panel 300 to the storage 103 before the operation of the control device 100 is started.
[0053] The upper network controller 104 exchanges data via the upper network 901 with devices connected to the upper network 901 (such as the support device 200, the touch panel 300, the camera 400, the NAS 500, and the NTP server 600).
[0054] The field network controller 105 exchanges data with one or more field devices 700 via a field network 902 .
[0055] The memory card interface 106 reads and writes data from and to a removable memory card 106A. The memory card 106A is an example of an external storage device connected to the control device 100 without going through a network (for example, a higher-level network 901, a field network 902, etc.).
[0056] The timer 107 includes a clock circuit or a counter circuit for measuring time. Note that the timer 107 is not limited to such a circuit, and may be configured by a software module executed by the processor 101.
[0057] The clock 108 indicates the current time. Through a time adjustment process described later, the clock 108 indicates the same time as the clock 406 of the camera 400 (see FIG. 3).
[0058] (b2: Camera 400) 3 is a diagram showing an example of the hardware configuration of the camera according to the present embodiment. The camera 400 includes, for example, a processor 401, a memory 402, a storage 403, an upper network controller 404, an imaging unit 405, and a clock 406.
[0059] The processor 401 is, for example, a CPU. The processor 401 reads out a control program 413 stored in a storage 403, and loads and executes the control program 413 in a memory 402. The memory 402 is configured with a volatile storage device such as a DRAM or an SRAM.
[0060] The storage 403 is configured with a non-volatile storage device such as, for example, an HDD, an SSD, or a flash memory.
[0061] The storage 403 stores a control program 413. The control program 413 includes a system program 414 and a recording program 415.
[0062] The system program 414 includes an OS for implementing basic functions of the camera 400. The recording program 415 provides a function for, for example, capturing an image of a monitored area and transmitting image data of the monitored area to the NAS 500.
[0063] The storage 403 stores the setting information 416. The setting information 416 includes various setting information of the camera 400 and the IP address of the NAS 500. The setting information 416 is downloaded to the storage 403 from the support device 200 or the touch panel 300 before the operation of the control device 100 is started.
[0064] The upper network controller 404 exchanges data via the upper network 901 with devices connected to the upper network 901 (such as the control device 100, the support device 200, the touch panel 300, and the NAS 500).
[0065] The imaging unit 405 captures an image of the area to be monitored and outputs the captured image data to the processor 401 .
[0066] A clock 406 indicates the current time. Through a time adjustment process described later, the clock 406 indicates the same time as the clock 108 of the control device 100.
[0067] (b3:NAS500) 4 is a diagram showing an example of the hardware configuration of the NAS in this embodiment. The NAS 500 includes a processor 501, a memory 502, a storage 503, and an upper network controller 504, for example.
[0068] The processor 501 is, for example, a CPU. The processor 501 reads out a control program 513 stored in a storage 503, and loads and executes the control program 513 in a memory 502. The memory 502 is configured with a volatile storage device such as a DRAM or an SRAM.
[0069] The storage 503 is configured with a non-volatile storage device such as, for example, an HDD, an SSD, or a flash memory. The storage 503 is an example of a "storage unit" in this disclosure.
[0070] The storage 503 stores a control program 513. The control program 513 includes a system program 514 and a user program 515.
[0071] The system program 514 includes an OS for implementing basic functions of the NAS 500. The user program 515 provides, for example, a function for storing variable data to be saved and image data to be saved in the storage 503 in association with time information.
[0072] The storage 503 stores the setting information 516. The setting information 516 includes various setting information of the NAS 500 and the collection / storage conditions of variable data. The setting information 516 is downloaded from the support device 200 or the touch panel 300 to the storage 503 before the operation of the control device 100 is started.
[0073] The upper network controller 504 exchanges data with devices (such as the control device 100, the support device 200, the touch panel 300, and the camera 400) connected to the upper network 901 via the upper network 901.
[0074] The "data storage program" in the present disclosure includes the control program 113, the control program 413, and the control program 513.
[0075] <C. Processing> Next, the data storage process of the data storage system 1 in the present embodiment will be described. The data storage process is a process of associating the variable data to be stored and the image data to be stored with time information and storing them in the NAS 500.
[0076] (c1: Task executed by the control device 100) FIG. 5 is a diagram showing an example of a task executed by the control device in the present embodiment. The control device 100 executes a control task for performing real-time control of one or more field devices 700 and a related processing task for performing related processing related to the real-time control. The primary periodic task 131, the event task 132, the periodic task 133, and the periodic task 134 shown in FIG. 5 are examples of the control task. The system service 135 shown in FIG. 5 is an example of the related processing task.
[0077] The primary periodic task 131 includes a process that is executed with the highest priority (top priority) compared to other tasks in the control device 100. The primary periodic task 131 is executed periodically at a primary period 141 that corresponds to a control period.
[0078] "IO" in FIG. 5 indicates I / O refresh processing. "UPG" in FIG. 5 indicates user program execution processing. "MC" in FIG. 5 indicates motion control processing. "SMP" in FIG. 5 indicates collection processing. The primary periodic task 131 includes I / O refresh processing, user program execution processing, motion control processing, and collection processing. The I / O refresh processing is realized by the processor 101 executing the input / output program 117. In the I / O refresh processing, first, a command value is output from the control device 100 to one or more field devices 700. Then, input data (variable data) is input from one or more field devices 700 to the control device 100.
[0079] The user program execution process is a process in which the processor 101 executes a user program 118. The motion control process is realized by the processor 101 executing a motion calculation 119.
[0080] The collection process is one of the processes realized by the processor 101 executing the collection program 121, in which variable data of one or more variables managed by the control device 100 is associated with collection time information indicating the collection time and stored in the data buffer 161 (see Figure 6) in the memory 102.
[0081] The event task 132 includes a process that is executed with a lower priority than the primary periodic task 131. The event task 132 includes a user program execution process. The event task 132 is executed when a task execution condition is met.
[0082] The periodic task 133 includes a process that is executed with a lower priority than the event task 132. The periodic task 133 includes a user program execution process and a collection process. The periodic task 133 is executed periodically at a task period 143 that corresponds to a control period.
[0083] The periodic task 134 includes a process that is executed with a lower priority than the periodic task 133. The periodic task 134 includes a user program execution process and a collection process. The periodic task 134 is executed periodically at a task period 144 that corresponds to a control period.
[0084] The system service 135 includes a process ("SS" in FIG. 5) that has a lower priority than the periodic task 134. In the system service 135, for example, among the processes realized by the processor 101 executing the collection program 121, a process is executed in which at least a part of the variable data stored in the data buffer 161 is stored in the ring buffer 162 (see FIG. 6) in association with collection time information.
[0085] (c2: Overview of transmission process from the control device 100 to the NAS 500) 6 is a diagram showing an overview of a transmission process for transmitting variable data to be stored from the control device to the NAS in the data storage process in this embodiment. The control device 100 includes a collection unit 151, a first extraction unit 152, a storage processing unit 153, a transmission unit 154, a first calculation unit 155, an output unit 156, a data buffer 161, and a ring buffer 162. The collection unit 151 is realized by the processor 101 executing the collection program 121. The first extraction unit 152, the storage processing unit 153, the transmission unit 154, the first calculation unit 155, and the output unit 156 are realized by the processor 101 executing the transmission program 122. Both the data buffer 161 and the ring buffer 162 are storage areas secured in the memory 102.
[0086] The collection unit 151 collects variable data of one or more variables managed by the control device 100. More specifically, when a variable data collection start condition is satisfied, the collection unit 151 executes collection processing according to a control cycle. That is, the collection unit 151 stores the variable data of one or more variables managed by the control device 100 in the data buffer 161 in association with collection time information indicating the collection time. Thereafter, in the system service 135 (see FIG. 5), the collection unit 151 stores at least a part of the variable data stored in the data buffer 161 in association with the collection time information in the ring buffer 162.
[0087] When the first method is set in the control device 100 as the variable data collection / storage method, the collection unit 151 associates all of the variable data stored in the data buffer 161 with collection time information and stores it in the ring buffer 162. On the other hand, when the second method is set in the control device 100 as the variable data collection / storage method, the collection unit 151 associates only the variable data corresponding to a predetermined collection period among the variable data stored in the data buffer 161 with collection time information and stores it in the ring buffer 162. The variable data collection / storage method is set in advance in the control device 100 and the NAS 500 using the support device 200 or the touch panel 300 as a variable data collection / storage condition.
[0088] When a save trigger occurs, the first extraction unit 152 extracts variable data to be saved during a period to be saved that is determined based on the occurrence time of the save trigger from the variable data saved in the ring buffer 162. More specifically, when a save trigger occurs, the first extraction unit 152 first determines the period to be saved based on the variable data collection / save conditions in the setting information 125 saved in the storage 103. Next, based on the collection time information saved in the ring buffer 162, the first extraction unit 152 extracts, as variable data to be saved, variable data associated with collection time information indicating a time within the period to be saved from the ring buffer 162.
[0089] When a storage trigger occurs, the transmission unit 154 transmits information capable of identifying the period to be stored to the NAS 500. Here, a method of collecting / storing variable data and a method of setting the conditions for collecting / storing variable data will be described with reference to Figs. 7 to 9.
[0090] 7 is a diagram showing a first method of collecting / saving variable data in this embodiment. In the first method, the collecting unit 151 stores all of the variable data saved in the data buffer 161 by the collection process in the ring buffer 162 in association with collection time information. In the first method, the first extracting unit 152 determines the period before and after the occurrence of a save trigger as the period to be saved.
[0091] More specifically, in the first method, the first extraction unit 152 determines, as the period to be saved, the period from timing t1, which is a first predetermined time before timing T0 when the save trigger occurs, to timing t2, which is a second predetermined time after timing T0 when the save trigger occurs. In the following description, the period from timing t1 to timing T0 is also referred to as the "pre-trigger collection time," and the period from timing T0 to timing t2 is also referred to as the "post-trigger collection time."
[0092] In the first method, the collection unit 151 executes the collection process according to the control cycle from the occurrence of a storage trigger until at least the post-trigger collection time has elapsed, and stores the variable data in the data buffer 161 in association with the collection time information. The pre-trigger collection time and the post-trigger collection time are set in advance in the control device 100 and the NAS 500 using the support device 200 or the touch panel 300 as collection / storage conditions for the variable data. In the first method, the collection unit 151 stores all of the variable data stored in the data buffer 161 by the collection process in the ring buffer 162 in association with the collection time information. In the first method, the first extraction unit 152 extracts the variable data associated with the collection time information indicating the time within the period from timing t1 to timing t2 from the ring buffer 162 as the variable data to be stored.
[0093] In the first method, when a storage trigger occurs, the information capable of identifying the period of the storage target that is transmitted to the NAS 500 by the transmission unit 154 includes the time when the storage trigger occurred.
[0094] FIG. 8 is a diagram showing a second method of collecting / storing variable data in this embodiment. In the second method, the collecting unit 151 associates only the variable data corresponding to a predetermined collection period among the variable data stored in the data buffer 161 by the collection process with collection time information and stores it in the ring buffer 162. In the second method, the first extracting unit 152 determines the latest collection period before the occurrence of a storage trigger as the period to be stored. The collection period is the period from timing t3, t5 when the start trigger occurs to timing t4, t6. The collection period is set in advance in the control device 100 and the NAS 500 as a variable data collection / storage condition using the support device 200 or the touch panel 300.
[0095] For example, if it takes 30 seconds to press a workpiece coming down the production line, but it is known that the period during which a problem may occur is the first 20 seconds, the start trigger for the collection period can be set to the establishment of the start condition for the press processing of the workpiece, and the collection period can be set to 20 seconds. With such a setting, the variable data stored in the ring buffer 162 is limited to the variable data for the period during which a problem may occur, making it easier to refer to the variable data when a problem occurs.
[0096] In the second method, the first extraction unit 152 determines the latest collection period before the timing T0 at which the storage trigger occurs (the period from timing t5 to timing t6) as the period to be stored. The first extraction unit 152 extracts, from the ring buffer 162, the variable data associated with collection time information indicating a time within the period from timing t5 to timing t6 as the variable data to be stored.
[0097] In the second method, when a storage trigger occurs, the information capable of identifying the period to be stored, which is transmitted to the NAS 500 by the transmission unit 154, includes the time when the start trigger for the most recent collection period occurred.
[0098] In either the first method or the second method, the information capable of identifying the period to be stored, which is transmitted by the transmitting unit 154 to the NAS 500 when a storage trigger occurs, may include a time indicating the period to be stored (for example, from AA:BB to AA:CC). In that case, the collection / storage conditions of the variable data need only be set in advance in the control device 100, and need not be set in the NAS 500.
[0099] 9 is a diagram showing an example of a setting screen for setting the variable data collection / storage conditions in this embodiment. The setting screen G1 is displayed on the support device 200 or the touch panel 300, and is operated by a user. The setting screen G1 includes buttons 11 and 12 for selecting a variable data collection / storage method, and a button 16 for reflecting the variable data collection / storage conditions specified on the setting screen G1 in the control device 100 and the NAS 500.
[0100] The setting screen G1 further includes an input box 13 for inputting a pre-trigger collection time of the first method, and an input box 14 for inputting a post-trigger collection time of the first method. The setting screen G1 further includes an input box 15 for inputting a collection period of the second method.
[0101] When button 11 and button 16 are selected, the control device 100 and NAS 500 set the first method as the variable data collection / storage method, set the number entered in input box 13 as the pre-trigger collection time, and set the number entered in input box 14 as the post-trigger collection time.
[0102] When button 12 and button 16 are selected, the control device 100 and NAS 500 set the second method as the variable data collection / storage method, and set the value entered in the input box 15 as the collection period.
[0103] 6 again, first extraction unit 152 outputs the variable data to be saved to saving processing unit 153. When saving processing unit 153 receives the variable data to be saved from first extraction unit 152, it saves the variable data to be saved in memory card 106A. After saving the variable data to be saved in memory card 106A, saving processing unit 153 outputs an instruction to transmit the variable data to be saved to transmitting unit 154.
[0104] When receiving a transmission instruction from the storage processing unit 153, the transmission unit 154 acquires the variable data to be stored from the memory card 106A. The transmission unit 154 encrypts the variable data to be stored using an encryption key, and outputs the encrypted variable data to be stored to the first calculation unit 155.
[0105] The first calculation unit 155 calculates a hash value of the encrypted variable data to be saved. In the following description, the hash value calculated by the first calculation unit 155 is referred to as a “first hash value.” The first calculation unit 155 outputs the first hash value to the transmission unit 154.
[0106] The transmitting unit 154 transmits the encrypted variable data to be saved to the NAS 500. That is, the transmitting unit 154 transmits the variable data to be saved to the NAS 500 after the variable data to be saved has been saved in the memory card 106A.
[0107] The transmission unit 154 inquires of the NAS 500 about the hash value. In the NAS 500, a second calculation unit 554 (see FIG. 10 ), which will be described later, calculates a hash value of the encrypted variable data to be saved, which is received from the control device 100. In the following description, the hash value calculated by the second calculation unit 554 is referred to as a "second hash value." The second calculation unit 554 transmits the second hash value to the control device 100.
[0108] The transmission unit 154 judges whether the first hash value and the second hash value match. If the first hash value and the second hash value match, the transmission unit 154 judges that the transmission of the variable data to be saved was successful. On the other hand, if the first hash value and the second hash value do not match, it is considered that at least a part of the variable data to be saved that was sent from the control device 100 to the NAS 500 has been lost, destroyed, or tampered with. Therefore, if the first hash value and the second hash value do not match, the transmission unit 154 judges that the transmission of the variable data to be saved has failed.
[0109] If the transmission of the variable data to be saved is successful, the transmission unit 154 transmits a transmission completion notification to the NAS 500. Furthermore, if the transmission of the variable data to be saved is successful, the transmission unit 154 outputs a deletion instruction to delete the variable data to be saved in the memory card 106A to the save processing unit 153. When the save processing unit 153 receives the deletion instruction, it deletes the variable data to be saved in the memory card 106A.
[0110] If the transmission of the variable data to be saved fails, the transmission unit 154 acquires the variable data to be saved from the memory card 106A and resends the variable data to be saved to the NAS 500. When the variable data to be saved is resent to the NAS 500, the variable data to be saved is encrypted and a hash value (first hash value) of the encrypted variable data to be saved is calculated in the same manner as described above. The variable data to be saved is resent to the NAS 500 in the same manner as described above until the transmission of the variable data to be saved fails a first predetermined number of times or more.
[0111] When the transmission unit 154 fails to transmit the variable data to be saved a first predetermined number of times or more, the output unit 156 outputs an error signal to the touch panel 300. When the touch panel 300 receives the error signal, it displays a notice indicating that the transmission of the variable data to be saved has failed. Note that when the transmission unit 154 fails to transmit the variable data to be saved a first predetermined number of times or more, the output unit 156 may output an error signal to the support device 200.
[0112] (c3: Overview of storage processing by NAS) 10 is a diagram showing an overview of the storage process by NAS among the data storage processes in this embodiment. The NAS 500 includes a receiving unit 551, a second extracting unit 552, a storage processing unit 553, a second calculating unit 554, and a storage 503. The receiving unit 551, the second extracting unit 552, the storage processing unit 553, and the second calculating unit 554 are realized by the processor 501 executing the user program 515.
[0113] The receiving unit 551 receives image data from the camera 400 and stores the image data in the storage 503 .
[0114] When a save trigger occurs, the second extraction unit 552 extracts image data to be saved during the period to be saved from the image data saved in the storage 503. More specifically, the second extraction unit 552 determines that a save trigger has occurred when information capable of identifying the period to be saved is received from the control device 100. The second extraction unit 552 identifies the period to be saved based on the collection / save conditions of the variable data saved in the storage 503 and the information capable of identifying the period to be saved received from the control device 100.
[0115] When the variable data collection / save method is the first method, the second extraction unit 552 specifies the period from the time before the occurrence of the save trigger by the pre-trigger collection time to the time after the occurrence of the save trigger by the post-trigger collection time as the period to be saved. On the other hand, when the variable data collection / save method is the second method, the second extraction unit 552 specifies the period from the time when the start trigger of the latest collection period occurred to the time after the time when the start trigger of the latest collection period occurred as the period to be saved. The second extraction unit 552 extracts image data including shooting time information indicating a time within the period to be saved from the storage 503 as image data to be saved. The second extraction unit 552 outputs the image data to be saved to the save processing unit 553.
[0116] The second calculation unit 554 receives the encrypted variable data to be saved from the control device 100. When receiving an inquiry about a hash value from the control device 100, the second calculation unit 554 calculates a hash value (second hash value) of the encrypted variable data to be saved received from the control device 100. The second calculation unit 554 transmits the second hash value to the control device 100 and outputs the encrypted variable data to be saved to the save processing unit 553.
[0117] When the saving processing unit 553 receives a transmission completion notification from the control device 100, it decrypts the encrypted variable data to be saved that was received from the second calculation unit 554 by using the decryption key. The saving processing unit 553 associates the decrypted variable data to be saved and the image data to be saved that was received from the second extraction unit 552 by time information, and saves them in the storage 503.
[0118] (c4: Overview of time synchronization process performed between the control device 100 and the camera 400) 11 is a diagram showing an overview of the time adjustment process performed between the control device and the camera during the data storage process in this embodiment. The control device 100 includes an adjustment unit 157 and a clock 108. The adjustment unit 157 is realized by the processor 101 executing the time management program 123.
[0119] The adjustment unit 157 inquires of the current time of the NTP server 600. The adjustment unit 157 receives the current time from the NTP server 600 and adjusts the clock 108 to the current time. The adjustment unit 157 also adjusts the time between the control device 100 and the camera 400.
[0120] More specifically, adjustment unit 157 transmits a time adjustment command to camera 400. When camera 400 receives the time adjustment command, it transmits a response command to control device 100. When adjustment unit 157 receives the response command, it calculates a correction time to be transmitted to camera 400 based on the transmission time of the time adjustment command and the reception time of the response command. Adjustment unit 157 transmits the correction time to camera 400. In camera 400, processor 401 sets clock 406 to the correction time (see FIG. 3).
[0121] More specifically, when the adjustment unit 157 receives a response command, it calculates a round-trip delay time between the control device 100 and the camera 400 based on the transmission time of the time adjustment command and the reception time of the response command. The round-trip delay time is an example of a "communication delay time" in this disclosure. The round-trip delay time between the control device 100 and the camera 400 is calculated by the following formula 1.
[0122] (Round trip delay time) = (time when the response command is received) - (time when the time adjustment command is sent) Equation 1
[0123] The adjustment unit 157 obtains the current time from the clock 108, and calculates a correction time based on the current time and the round trip delay time. The correction time is calculated by the following formula 2.
[0124] (Correction time) = (Current time) + (Round trip delay time / 2) Equation 2
[0125] The adjustment unit 157 may repeat transmission and reception of the time adjustment command and the response command with the camera 400 a second predetermined number of times. In this case, the adjustment unit 157 calculates the round trip delay time each time and uses the average value of the round trip delay times for the second predetermined number of times to calculate the corrected time. This improves the accuracy of the corrected time.
[0126] (c5: Setting process procedure) 12 is a flowchart showing the procedure of the setting process in this embodiment. The setting process is a process for setting the control device 100, the NAS 500, and the camera 400 before the operation of the control device 100 is started.
[0127] In step S 1 , the support device 200 creates the user program 118 and the user program 515 , and receives the setting information 125 of the control device 100 , the setting information 516 of the NAS 500 , and the setting information 416 of the camera 400 .
[0128] In the next step S2, the support device 200 transmits the user program 118, the user program 515, the setting information 125, the setting information 516, and the setting information 416 to the corresponding device. More specifically, the support device 200 transmits the user program 118 and the setting information 125 to the control device 100. The support device 200 transmits the user program 515 and the setting information 516 to the NAS 500. The support device 200 transmits the setting information 416 to the camera 400.
[0129] In step S3 after step S2, the control device 100 receives the user program 118 and the setting information 125. In step S4, the control device 100 performs setting based on the setting information 125.
[0130] In step S5 after step S2, the NAS 500 receives the user program 515 and the setting information 516. In step S6, the NAS 500 performs setting based on the setting information 516.
[0131] In step S7 after step S2, the camera 400 receives the setting information 416. In step S8, the camera 400 performs setting based on the setting information 416.
[0132] In step S9 after steps S4, S6, and S8, the control device 100 performs the time adjustment process shown in Fig. 11 and Fig. 17. After step S9, the setting process is completed. After the setting process is completed, the control device 100 starts operation.
[0133] (c6: Transmission process procedure) Fig. 13 is a flowchart showing a part of the procedure of the transmission process in this embodiment described with reference to Fig. 6. Fig. 14 is a flowchart showing the remaining part of the procedure of the transmission process in this embodiment described with reference to Fig. 6.
[0134] In step S21, the processor 101 determines whether or not a condition for starting collection of variable data is satisfied. The condition for starting collection of variable data is defined by the user program 118. If the condition for starting collection of variable data is satisfied (YES in step S21), the processor 101 advances the process to steps S22 and S23. On the other hand, if the condition for starting collection of variable data is not satisfied (NO in step S21), the processor 101 repeats step S21.
[0135] In step S22, the processor 101 starts collecting variable data of one or more variables managed by the control device 100. That is, the processor 101 executes a collection process according to a control period, and stores the variable data of one or more variables managed by the control device 100 in the data buffer 161 in association with collection time information indicating the collection time. Thereafter, the processor 101 stores at least a part of the variable data stored in the data buffer 161 in the ring buffer 162 in association with the collection time information based on the variable data collection / storage method.
[0136] More specifically, when the variable data collection / storage method is the first method, the processor 101 executes a collection process, and stores the variable data in the data buffer 161 in association with collection time information. After that, the processor 101 stores all of the variable data stored in the data buffer 161 by the collection process in the ring buffer 162 in association with the collection time information.
[0137] On the other hand, when the variable data collection / storage method is the second method, the processor 101 executes a collection process, and stores the variable data in the data buffer 161 in association with collection time information. After that, the processor 101 stores only the variable data corresponding to a predetermined collection period among the variable data stored in the data buffer 161 by the collection process in the ring buffer 162 in association with the collection time information.
[0138] In step S23, the processor 101 transmits a recording start command to the camera 400.
[0139] In step S24 after step S22, the processor 101 determines whether or not a save trigger has occurred. If a save trigger has occurred (YES in step S24), the processor 101 advances the process to step S25. On the other hand, if a save trigger has not occurred (NO in step S24), the processor 101 repeats step S24.
[0140] In step S25, the processor 101 ends the collection of the variable data based on the collection / save method of the variable data. More specifically, when the collection / save method of the variable data is the first method, the processor 101 executes the collection process according to the control period from when the save trigger occurs until the post-trigger collection time has elapsed, and ends the collection of the variable data after at least the post-trigger collection time has elapsed from when the save trigger occurs. On the other hand, when the collection / save method of the variable data is the second method, the collection of the variable data ends after the save trigger occurs.
[0141] After step S25, the processor 101 proceeds to step S26 and step S28.
[0142] In step S26, the processor 101 determines the period to be saved based on the variable data collection / storage method and the time when the save trigger occurs, and extracts the variable data to be saved during the period to be saved from the variable data saved in the ring buffer 162.
[0143] More specifically, when the variable data collection / save method is the first method, the processor 101 determines the period from a timing that is a first predetermined time before the timing of the occurrence of the save trigger to a timing that is a second predetermined time after the timing of the occurrence of the save trigger as the period to be saved. On the other hand, when the variable data collection / save method is the second method, the processor 101 determines the most recent collection period before the occurrence of the save trigger as the period to be saved. The processor 101 extracts, from the ring buffer 162, the variable data associated with collection time information that indicates a time within the period to be saved as the variable data to be saved.
[0144] In the next step S27, the processor 101 saves the variable data to be saved in the memory card 106A.
[0145] In step S28, the processor 101 transmits a recording stop command to the camera 400.
[0146] In the next step S29, the processor 101 transmits to the NAS 500 information capable of identifying the period during which the data is to be saved.
[0147] In step S30 after step S27, the processor 101 encrypts the variable data to be saved, and calculates a hash value (first hash value) of the encrypted variable data to be saved.
[0148] In the next step S31, the processor 101 transmits the encrypted variable data to be saved to the NAS 500.
[0149] In the next step S32, the processor 101 inquires of the NAS 500 about the hash value.
[0150] In the next step S33, the processor 101 receives a hash value (second hash value) from the NAS 500, and determines whether the first hash value and the second hash value match. If the first hash value and the second hash value match (YES in step S33), the processor 101 proceeds to step S34. On the other hand, if the first hash value and the second hash value do not match (NO in step S33), the processor 101 proceeds to step S36.
[0151] In step S34, the processor 101 transmits a transmission completion notification to the NAS 500.
[0152] In the next step S35, the processor 101 deletes the variable data to be stored in the memory card 106A.
[0153] In step S36, the processor 101 determines whether or not the transmission of the variable data to be saved has failed a first predetermined number of times or more. If the transmission of the variable data to be saved has failed a first predetermined number of times or more (YES in step S36), the processor 101 advances the process to step S37. On the other hand, if the transmission of the variable data to be saved has not failed a first predetermined number of times or more (NO in step S36), the processor 101 advances the process to step S38.
[0154] In step S37, the processor 101 outputs an error signal to the touch panel 300.
[0155] In step S38, the processor 101 acquires the variable data to be saved from the memory card 106 A. After step S38, the processor 101 returns the process to step S30.
[0156] After step S23, step S29, step S35, or step S37, the transmission process ends.
[0157] (c7: Recording process procedure by camera 400) FIG. 15 is a flowchart showing the procedure of the recording process by the camera in this embodiment.
[0158] In step S41, camera 400 determines whether or not a recording start command has been received. If a recording start command has been received (YES in step S41), camera 400 proceeds to step S42. On the other hand, if a recording start command has not been received (NO in step S41), camera 400 repeats step S41.
[0159] In step S42, the camera 400 starts capturing images of the monitored area, and transmits image data of the monitored area to the NAS 500 at predetermined intervals.
[0160] In the next step S43, camera 400 determines whether or not a recording stop command has been received. If a recording stop command has been received (YES in step S43), camera 400 proceeds to step S44. On the other hand, if a recording stop command has not been received (NO in step S43), camera 400 repeats step S43.
[0161] In step S44, the camera 400 finishes capturing the image of the monitored area. After step S44, the recording process ends.
[0162] (c8: Procedure for saving data using NAS500) FIG. 16 is a flowchart showing the procedure of the storage process by the NAS in this embodiment described with reference to FIG.
[0163] In step S 51 , the processor 501 receives image data from the camera 400 and stores the image data in the storage 503 .
[0164] In the next step S52, the processor 501 determines whether or not information capable of identifying the period to be saved has been received. If information capable of identifying the period to be saved has been received (YES in step S52), the processor 501 advances the process to step S53. On the other hand, if information capable of identifying the period to be saved has not been received (NO in step S52), the processor 501 repeats step S52.
[0165] In step S53, the processor 501 extracts image data to be saved. More specifically, the processor 501 specifies the period to be saved based on the collection / storage conditions of the variable data saved in the storage 503 and the information capable of specifying the period to be saved received from the control device 100. The processor 501 extracts image data including shooting time information indicating a time within the period to be saved from the storage 503 as image data to be saved.
[0166] In the next step S54, the processor 501 receives from the control device 100 the encrypted variable data to be stored.
[0167] In the next step S55, the processor 501 determines whether or not an inquiry about the hash value has been received from the control device 100. If an inquiry about the hash value has been received from the control device 100 (YES in step S55), the processor 501 advances the process to step S56. On the other hand, if an inquiry about the hash value has not been received from the control device 100 (NO in step S55), the processor 501 repeats step S55.
[0168] In step S56, the processor 501 calculates a hash value (second hash value) of the encrypted variable data to be stored received from the control device 100, and transmits the second hash value to the control device 100.
[0169] In the next step S57, the processor 501 determines whether or not a transmission completion notification has been received. If a transmission completion notification has been received (YES in step S57), the processor 501 advances the process to step S58. On the other hand, if a transmission completion notification has not been received (NO in step S57), the processor 501 repeats step S57.
[0170] In step S58, the processor 501 decrypts the encrypted variable data to be saved.
[0171] In the next step S59, the processor 501 associates the decrypted variable data to be saved and the image data to be saved with each other by the time information, and saves them in the storage 503. More specifically, the processor 501 saves in the storage 503 a file in which the decrypted variable data to be saved and the image data to be saved are associated with each other by the time information.
[0172] In the next step S60, the processor 501 transmits the file saved in the storage 503 in step S59 to the support device 200. After step S60, the saving process by the NAS 500 ends. Based on the file received from the NAS 500, the support device 200 displays the variable data to be saved in a time series graph, and also displays an image (moving image or still image) indicated by the image data to be saved that is associated with the variable data to be saved by time information.
[0173] (c9: Time adjustment process procedure) FIG. 17 is a flowchart showing the procedure of the time setting process in the present embodiment described with reference to FIG.
[0174] In step S71, the processor 101 of the control device 100 obtains the current time from the NTP server 600. In step S72, the processor 101 sets the clock 108 to the current time. In step S73, the processor 101 transmits a time setting command to the camera 400.
[0175] In the next step S74, the processor 401 of the camera 400 receives the time adjustment command. In step S75, the processor 401 transmits a response command to the control device 100.
[0176] In the next step S76, the processor 101 receives the response command. In step S77, the processor 101 calculates the round trip delay time between the control device 100 and the camera 400 using the above formula 1.
[0177] In the next step S78, the processor 101 determines whether or not the transmission and reception of the time adjustment command and the response command between the control device 100 and the camera 400 has reached a second predetermined number of times. If the transmission and reception of the time adjustment command and the response command between the control device 100 and the camera 400 has reached the second predetermined number of times (YES in step S78), the processor 101 advances the process to step S79. On the other hand, if the transmission and reception of the time adjustment command and the response command between the control device 100 and the camera 400 has not reached the second predetermined number of times (NO in step S78), the processor 101 returns the process to step S73.
[0178] In step S79, the processor 101 calculates the average value of the round trip delay times for a second predetermined number of times. In step S80, the processor 101 calculates the correction time using the above formula 2. That is, the processor 101 determines the correction time to be the time obtained by adding half the average value of the round trip delay times to the current time. In step S81, the processor 101 transmits the correction time to the camera 400.
[0179] In the next step S82, the processor 401 sets the clock 406 to the corrected time. After step S82, the time setting process ends.
[0180] (c10: Setting change processing procedure) FIG. 18 is a flowchart showing the procedure of the setting change process in the present embodiment. The setting change process is a process of changing the setting of the collection / saving conditions of the variable data set by the setting process described with reference to FIG. 12.
[0181] In step S91, the touch panel 300 receives an instruction to change the collection / saving conditions of the variable data. The instruction to change the collection / saving conditions of the variable data is input to the touch panel 300 by the user. In step S92, the touch panel 300 transmits the change instruction to the control device 100.
[0182] In the next step S93, the processor 101 of the control device 100 receives the change instruction. In step S94, the processor 101 changes the setting of the collection / saving conditions of the variable data based on the change instruction. More specifically, the processor 101 updates the collection / saving conditions of the variable data among the setting information 125 stored in the storage 103 based on the change instruction. After step S94, the setting change process ends.
[0183] When the setting change process is executed, in step S29 (see FIG. 13), the processor 101 transmits the collection / saving conditions of the variable data after the change to the NAS 500 together with the information capable of specifying the period to be saved.
[0184] <D. Effect> As described above, in the data storage system 1, the variable data to be stored and the image data to be stored are associated with each other by time information and stored in the NAS 500. Therefore, according to the data storage system 1, the variable data and the image data can be surely stored without dissipation. Therefore, according to the data storage system 1, when an abnormality occurs in one or more field devices 700, the user can easily refer to the variable data and the image data at the same time. Therefore, the data storage system 1 is useful for analyzing the cause of the occurrence of the abnormality.
[0185] If the time of the clock 108 of the control device 100 and the clock 406 of the camera 400 do not match, it is difficult to associate variable data and image data of the same time for analysis. However, the data storage system 1 can synchronize the time of the clock 108 of the control device 100 and the clock 406 of the camera 400. Therefore, when an abnormality occurs in one or more field devices 700, the data storage system 1 can associate variable data and image data of the same time for more accurate analysis. Therefore, the data storage system 1 is useful for analyzing the cause of the abnormality.
[0186] Furthermore, in the data storage system 1, after the variable data to be stored is stored in the memory card 106A, the control device 100 transmits the variable data to be stored to the NAS 500. Therefore, in the data storage system 1, even if at least a part of the variable data to be stored is lost, destroyed, or tampered with during transmission of the variable data to be stored to the NAS 500, the control device 100 can obtain the variable data to be stored from the memory card 106A and resend it to the NAS 500. Therefore, according to the data storage system 1, the variable data to be stored can be reliably transmitted to the NAS 500.
[0187] Furthermore, in the data storage system 1, the control device 100 encrypts the variable data to be stored using an encryption key, and transmits the encrypted variable data to be stored to the NAS 500. Therefore, the data storage system 1 can prevent the variable data to be stored from being intercepted or tampered with. That is, the data storage system 1 can transmit the variable data to be stored to the NAS 500 securely.
[0188] In the above, the time adjustment process is performed during the setting process, but the timing of the time adjustment process is not limited to this. The user may instruct the execution of the time adjustment process at any timing from the touch panel 300 or the support device 200. In addition, in the above, an example of the time adjustment process using the NTP server 600 is shown, but the time between the clock 108 of the control device 100 and the clock 406 of the camera 400 may be adjusted without using the NTP server 600. For example, the control device 100 calculates the average round-trip delay time by the process from step S73 to step S79 shown in FIG. 17. The touch panel 300 or the support device 200 displays the average round-trip delay time. The user inputs the time to which the clock 108 of the control device 100 is to be adjusted to the touch panel 300 or the support device 200. The processor 101 of the control device 100 sets the clock 108 to the time inputted into the touch panel 300 or the support device 200, and the processor 401 of the camera 400 sets the clock 406 to the time inputted into the touch panel 300 or the support device 200 plus half the average value of the round trip delay time.
[0189] [Note] The above-described embodiment and modified examples include the following technical ideas.
[0190] [Configuration 1] A data storage system (1), comprising: A control device (100); A camera (400) for photographing an area to be monitored; A network storage (500), The control device (100) A collection unit (151) that collects variable data of one or more variables managed by the control device (100); a first extraction unit (152) that extracts, when a storage trigger occurs, from the variable data, variable data to be stored during a period to be stored that is determined based on a time when the storage trigger occurs; a transmission unit (154) that transmits the variable data to be stored to the network storage (500); The camera (400) transmits image data of the monitored area to the network storage (500); The network storage (500) a second extraction unit (552) that extracts image data to be stored during the period to be stored from the image data when the storage trigger occurs; The data storage system includes a storage unit (503) that stores the variable data to be stored and the image data to be stored in association with time information.
[0191] [Configuration 2] The data storage system according to configuration 1, wherein the control device (100) further comprises an adjustment unit (157) that synchronizes the time between the control device (100) and the camera (400).
[0192] [Configuration 3] The adjustment unit (157) transmits a time adjustment command to the camera (400); When the camera (400) receives the time adjustment command, the camera (400) transmits a response command to the control device (100); The adjustment unit (157) is When the response command is received, a correction time to be transmitted to the camera (400) is calculated based on the transmission time of the time adjustment command and the reception time of the response command; The data storage system of configuration 2, further comprising: transmitting the correction time to the camera (400).
[0193] [Configuration 4] The adjustment unit (157) is When the response command is received, a communication delay time between the control device (100) and the camera (400) is calculated based on the transmission time of the time adjustment command and the reception time of the response command; The data storage system according to configuration 3, wherein the correction time is calculated based on the communication delay time.
[0194] [Configuration 5] 1. A method of data storage implemented by one or more computers, comprising: Collecting variable data for one or more variables managed by the control device (100); When a save trigger occurs, extracting from the variable data a variable data to be saved during a period to be saved that is determined based on a time when the save trigger occurs; Transmitting the variable data to be stored to a network storage (500); Transmitting image data of a monitored area to the network storage (500); When the storage trigger occurs, extracting image data to be stored during the storage period from the image data; and storing the variable data to be saved and the image data to be saved in association with time information.
[0195] [Configuration 6] A data storage program for causing one or more computers to execute the data storage method according to configuration 5.
[0196] The embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The scope of the present disclosure is defined by the claims, not the above description, and is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]
[0197] 1 data storage system, 11,12,16 button, 13,14,15 input box, 100 control device, 101,401,501 processor, 102,402,502 memory, 103,403,503 storage, 104,404,504 upper network controller, 105 field network controller, 106 memory card interface, 106A memory card, 107 timer, 108 clock, 113,413,513 control program, 114,414,514 system program, 116 scheduler program, 117 input / output program, 118,515 user program, 119 motion calculation, 120 abnormality detection program, 121 collection program, 122 transmission program, 123 time management program, 124 data type definition data, 125,416,516 setting information, 131 Primary periodic task, 133, 134 Periodic task, 132 Event task, 135 System service, 141 Primary cycle, 143, 144 Task cycle, 151 Collection unit, 152 First extraction unit, 153, 553 Storage processing unit, 154 Transmission unit, 155 First calculation unit, 156 Output unit, 157 Adjustment unit, 161 Data buffer, 162 Ring buffer, 200 Support device, 300 Touch panel, 400 Camera, 405 Imaging unit, 415 Recording program, 551 Reception unit, 552 Second extraction unit, 554 Second calculation unit, 600 NTP server, 700 Field device, 701 Servo motor driver, 702 Temperature regulator, 703 Robot controller, 801 Servo motor, 802 Heater, 803 Robot, 901 Upper network, 902 Field network, G1 Setting screen, T0,t1,t2,t3,t4,t5,t6 timing.
Claims
1. 1. A data storage system, comprising: A control device; A camera for photographing the area to be monitored; Network storage and The control device includes: A collection unit that collects variable data of one or more variables managed by the control device; a first extraction unit that extracts, when a save trigger occurs, from the variable data, variable data to be saved during a period to be saved that is determined based on a time when the save trigger occurs; a transmission unit that transmits the variable data to be stored to the network storage; The camera transmits image data of the monitored area to the network storage; The network storage includes: a second extraction unit that extracts image data to be stored during the period to be stored from the image data when the storage trigger occurs; A data storage system comprising: a storage unit that stores the variable data to be stored and the image data to be stored in association with time information.
2. The data storage system according to claim 1 , wherein the control device further comprises an adjustment unit that synchronizes the time between the control device and the camera.
3. The adjustment unit transmits a time adjustment command to the camera, When the camera receives the time adjustment command, the camera transmits a response command to the control device; The adjustment unit is when the response command is received, a correction time to be transmitted to the camera is calculated based on the transmission time of the time adjustment command and the reception time of the response command; The data storage system according to claim 2 , further comprising: transmitting the correction time to the camera.
4. The adjustment unit is When the response command is received, a communication delay time between the control device and the camera is calculated based on a transmission time of the time adjustment command and a reception time of the response command; The data storage system according to claim 3 , wherein the correction time is calculated based on the communication delay time.
5. 1. A method of data storage implemented by one or more computers, comprising: collecting variable data for one or more variables managed by the control device; When a save trigger occurs, extracting from the variable data a variable data to be saved during a period to be saved that is determined based on a time when the save trigger occurs; transmitting the variable data to be stored to a network storage; Transmitting image data of a monitored area to the network storage; When the storage trigger occurs, extracting image data to be stored during the storage period from the image data; and storing the variable data to be saved and the image data to be saved in association with time information.
6. A data storage program for causing one or more computers to execute the data storage method according to claim 5.
Citation Information
Patent Citations
Programmable logic controller, data logger and control method
JP2019128702A
Programmable logic controller and main unit
JP2020013526A
Programmable logic controller and main unit
JP2021036479A