Control device, logging method, and program

The control device for factory automation ensures reliable logging by storing logs with varying redundancy based on importance, preventing loss and enabling comprehensive analysis.

JP7830925B2Active Publication Date: 2026-03-17OMRON CORP
View PDF 10 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing logging mechanisms in manufacturing sites fail to prevent log loss due to device abnormalities, leading to incomplete analysis.

Method used

A control device for factory automation with a logging unit that determines storage units with different degrees of redundancy based on log type, ensuring logs are stored in higher priority units when conditions are met, and moving logs to higher priority units if lower priority units become unavailable.

Benefits of technology

Prevents log loss by ensuring critical logs are stored redundantly and securely, facilitating comprehensive analysis even in device failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007830925000001
    Figure 0007830925000001
  • Figure 0007830925000002
    Figure 0007830925000002
  • Figure 0007830925000003
    Figure 0007830925000003
Patent Text Reader

Abstract

To realize a reliable logging mechanism that prevents log loss.SOLUTION: A control device for FA (factory automation) comprises: a logging unit configured to be able to access multiple storage units including an external storage device; and a setting unit capable of setting the storage unit which is a storage destination of a log of predetermined processing related to control operation, by varying the degree of multiplexing for each type of the log. The logging unit includes: an acquisition unit for acquiring a log when executing the predetermined processing; and a determination unit for determining the type of the log acquired by the acquisition unit, and determines a storage unit set according to the determined type of the log as a storage destination of the log.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0005]

[0001] The present disclosure relates to a control device for controlling a target, a logging method, and a program.

Background Art

[0002] In a manufacturing site of FA (Factory Automation), control devices such as network-connected PLCs (Programmable Logic Controllers) are provided. The control device is provided with a function to control a target such as production equipment and devices via a field network, and a function to output a log to another device in order to store the log (hereinafter also referred to as logging).

[0003] Conventionally, when logging fails due to an abnormality in the device where the log is stored, the log disappears. Therefore, there has been a problem that the log cannot be analyzed.

[0004] Regarding logging, Patent Document 1 (Japanese Unexamined Patent Application Publication No. 2007-34416) monitors the free capacity of a disk drive currently used to store log data (that is, the disk drive specified by the detection target path), and flexibly changes the log output path (the disk drive used to store log data) according to the free capacity (paragraph 0047).

[0005] Patent Document 2 (Japanese Unexamined Patent Application Publication No. 2004-152024) provides a log level change tool operated by SE. When changing the log output destination, the tool is configured to be able to set the current server and application, that is, the log output source server name, the log output source application name, the log level after change, the log output destination server name, and the address (location or file name) (paragraph 0025).

[0006] Patent Document 3 (Japanese Patent Publication No. 2011-13793) describes a log output device that prevents information loss due to file overwriting, etc., by increasing the number of generations managed at the output destination when a high-level log output such as a critical error is issued in response to a log output request (paragraph 0059). [Prior art documents] [Patent Documents]

[0007] [Patent Document 1] Japanese Patent Publication No. 2007-34416 [Patent Document 2] Japanese Patent Publication No. 2004-152024 [Patent Document 3] Japanese Patent Publication No. 2011-13793 [Overview of the project] [Problems that the invention aims to solve]

[0008] While patent documents 1, 2, and 3 disclose methods for automatically changing the log output destination, there was a demand in manufacturing sites for a reliable logging mechanism that would prevent log loss.

[0009] This disclosure aims to realize a reliable logging mechanism that prevents log loss. [Means for solving the problem]

[0010] A control device for factory automation (FA) according to an example of this disclosure includes a first connector for connecting a first network to which the object to be controlled belongs, a second connector for connecting a second network to which an external storage device belongs, a logging unit configured to access a plurality of storage units including the external storage device, and a setting unit that can set a storage unit to be the storage destination for logs of predetermined processes related to control calculations, with different degrees of multiplexing for each type of log. The logging unit includes an acquisition unit that acquires logs when a predetermined process is executed, and a determination unit that determines the type of log acquired by the acquisition unit, and determines the storage unit set in accordance with the determined type of log to be the storage destination for the log.

[0011] According to this disclosure, the storage unit that stores logs acquired during the execution of predetermined processes related to control calculations can have different degrees of redundancy depending on the type of log. Therefore, it becomes possible to store logs in the redundant storage unit, thus avoiding situations where logs are lost without being stored.

[0012] In the disclosure described above, the configuration unit sets a priority for each storage unit so that it takes precedence over other storage units as a destination for storing logs.

[0013] According to this disclosure, it is possible to set a priority for when logs are stored in the storage unit where the logs are stored.

[0014] In the disclosure described above, the configuration unit is set so that higher priority storage units become the storage destinations for a wider variety of log types.

[0015] According to this disclosure, when the degree of redundancy of the storage unit where the logs are stored is to be varied based on the type of log, the degree of redundancy can be varied based on the type of log and the priority of the storage unit.

[0016] In the disclosure described above, the logging unit determines the storage location for the log to be the storage unit with the higher priority among two or more redundant storage units, whose state satisfies predetermined conditions.

[0017] According to this disclosure, the control device can determine, as the storage destination of the log, the storage unit with a higher priority whose state satisfies a predetermined condition from among two or more multiplexed storage units set as the storage destinations of the log.

[0018] In the above disclosure, when the state of the storage unit with a higher priority does not satisfy the predetermined condition, the logging unit determines the storage unit with the next lower priority as the storage destination of the log.

[0019] According to this disclosure, when the state of the storage unit with a higher priority does not satisfy the predetermined condition among two or more multiplexed storage units set as the storage destinations of the log, the control device can determine the storage unit with the next lower priority as the storage destination of the log.

[0020] In the above disclosure, the state of the storage unit includes the state related to the storage capacity. Therefore, when the state of the storage unit related to its storage capacity satisfies the predetermined condition, the control device can determine the storage unit as the storage destination.

[0021] In the above disclosure, the logging unit performs processing for the log stored in the storage unit so that the state related to the storage capacity satisfies the predetermined condition.

[0022] According to this disclosure, since the log of the storage unit is processed so that the state related to the storage capacity satisfies the predetermined condition, the possibility that the storage unit is determined as the storage destination of the log can be increased.

[0023] In the above disclosure, the state of the storage unit includes the state related to the accessibility to the storage unit. Therefore, when the state related to the accessibility to the storage unit satisfies the predetermined condition, the control device can determine the storage unit as the storage destination.

[0024] In the above disclosure, when the state of the storage unit with a higher priority is restored to a state that satisfies the predetermined condition, the logging unit moves the log of the storage unit corresponding to the next lower priority to the storage unit with the higher priority.

[0025] According to this disclosure, when the state of the memory unit with the higher priority is restored to a state that satisfies a predetermined condition, the logs of the memory unit with the lower priority move from the memory unit to the memory unit with the higher priority. Therefore, the movement can secure a free space in the memory unit with the lower priority for storing new logs. In addition, logs can be intensively stored in the memory unit with the higher priority.

[0026] In the above disclosure, the priority of the memory unit is based on the size of the memory capacity. Therefore, a memory unit with a larger memory capacity can set its priority to a higher level.

[0027] In the above disclosure, the type of log indicates the importance of the log, and the higher the importance of the log, the higher the degree of multiplexing. Therefore, for more important logs, the memory unit serving as the storage destination of the log can be multiplexed to prevent log loss.

[0028] In the above disclosure, the setting unit can set the memory unit serving as the storage destination of the logs of a predetermined process related to the control operation with different degrees of multiplexing for each type of the log based on a user operation on the control device. Therefore, the user can set the intended degree of multiplexing for the control device.

[0029] In another example of this disclosure, a logging method implemented by a processor provided in a FA (Factory Automation) controller is provided. The controller is configured to be able to access a plurality of memory units including an externally connected memory device via a network. The logging method includes steps of enabling a setting with different degrees of multiplexing for the memory unit serving as the storage destination of the logs of a predetermined process related to the target control operation provided in the FA for each type of the log, acquiring a log during the execution of the predetermined process, determining the type of the log acquired in the acquiring step, and determining the memory unit set corresponding to the determined type of the log as the storage destination of the log.

[0030] When this method is implemented, the storage units that store logs acquired during the execution of predetermined processes related to control calculations can be configured with different degrees of redundancy based on the type of log. Therefore, it becomes possible to store logs in each of the redundant storage units, thus avoiding situations where logs are lost without being stored.

[0031] Another example of this disclosure provides a program for causing a processor in a factory automation (FA) controller to execute a logging method. The controller is configured to have access to multiple storage units, including a network-connected external storage device. The logging method to be executed is a program that includes the steps of: enabling the storage units that serve as storage locations for logs of predetermined processes related to control calculations of a target in the FA to be configured with different degrees of redundancy for each type of log; acquiring logs when the predetermined processes are executed; determining the type of log acquired in the acquisition step; and determining the storage unit configured in accordance with the determined type of log to be the storage location for the log.

[0032] When this program is executed, the storage units that store logs acquired during the execution of predetermined processes related to control calculations can be configured with different degrees of redundancy based on the type of log. Therefore, it becomes possible to store logs in each of the redundant storage units, thus avoiding situations where logs are lost without being stored. [Effects of the Invention]

[0033] According to one example of this disclosure, a reliable logging mechanism can be provided to prevent the loss of logs. [Brief explanation of the drawing]

[0034] [Figure 1] This diagram schematically illustrates an example of a scenario in which the configuration of this disclosure is applied. [Figure 2] This is a schematic diagram showing an example of the overall configuration of a network system according to this embodiment. [Figure 3]It is a schematic diagram showing a hardware configuration example of the PLC 100 according to this embodiment. [Figure 4] It is a diagram schematically showing the hardware configuration of the support device 500 according to this embodiment. [Figure 5] It is a diagram schematically showing the configuration of logging according to this embodiment. [Figure 6] It is a diagram for explaining the features of the storage unit according to this embodiment. [Figure 7] It is a diagram for explaining the schematic processing of logging according to this embodiment. [Figure 8] It is a flowchart of log rotation according to this embodiment. [Figure 9] It is a diagram for explaining a setting tool related to logging according to this embodiment. [Figure 10] It is a flowchart showing the process of moving log files related to the NAS 280 according to this embodiment. [Figure 11] It is a flowchart showing the process of moving log files related to the SD card 116 according to this embodiment.

Embodiments for Carrying Out the Invention

[0035] This embodiment will be described in detail with reference to the drawings. For the same or corresponding parts in the drawings, the same reference numerals are given and their descriptions will not be repeated.

[0036] <A. Application Examples> Figure 1 is a schematic diagram illustrating an example of a scenario in which the configuration of this disclosure is applied. Referring to Figure 1, a PLC (Programmable Logic Controller) 100, which is an example of a control device provided in FA, comprises a control unit 10B and an IoT platform 10A. The control unit 10B operates on a platform that executes programs under a real-time OS (Operating System), and the IoT platform 10A operates on a platform that executes programs under a general-purpose OS. The control unit 10B mainly performs control calculation processing for controlling field devices 90 that are the target of control, corresponding to production equipment provided in FA. The IoT platform 10A performs IoT processing. The IoT processing mainly includes processing to connect the PLC 100 to devices on an external network and logging. The IoT processing includes predetermined processing related to control calculations performed by the PLC 100. Logging refers to the process of storing logs acquired during the execution of such predetermined processing in a storage unit.

[0037] The control unit 10B includes a control engine 150, a user program executed by the control engine 150, and an acquisition area 41, which is an example of a storage area for collecting data exchanged between the user program and the field device 90. The user program includes a control program 140, such as a ladder program, and an IO refresh program 40 for IO refresh. When the control program 140 is executed, it performs control calculation processing using the input data 154 of the acquisition area 41 and stores the control command, which is the result of the calculation, as output data 155 in the acquisition area 41. When the IO refresh program 40 is executed, it performs an IO refresh. In an IO refresh, a state value 92 transferred from the field device 90 is stored in the acquisition area 41 as input data 154, and the output data 155 is read from the acquisition area 41 and transferred to the field device 90 as a control command 93. The field device 90 is controlled according to the control command 93 from the PLC 100, and a state value 92 indicating the state of the field device 90, which is the result of the control, is transferred to the PLC 100. The control engine 150 controls the field device 90 in synchronization with the control cycle by repeatedly executing such control calculation processing and I / O refresh in synchronization with the control cycle.

[0038] The IoT platform 10A includes an IoT engine 250, an IoT program 260 and a configuration program 42 executed by the IoT engine 250, and log configuration information 30. Under the IoT engine 250, for example, a Java® program is executed. When executed, the configuration program 42 receives user operations from a support device 500 connected to the PLC 100 and sets the log configuration information 30 based on the received user operations. The log configuration information 30 indicates the priority 28 for the storage location of each of the multiple storage units, associated with the log type 29.

[0039] In this embodiment, the control engine 150 and the BIoT engine 250 are composed of programs including a system program, but are not limited to programs and may be composed of hardware circuits.

[0040] The IoT program 260 has an output program 270. When executed, the output program 270 performs logging. In the IoT processing performed by the IoT program 260, predetermined processing is performed on the data in the collection area 41, and the processing results are transferred to an information processing terminal 310 on the external network of the PLC 100 (described later) for analysis, etc. Such predetermined processing related to control calculations includes the calculation of representative values ​​and feature quantities of the state value 92, and the process of communicating these calculation results with the information processing terminal 310.

[0041] The output program 270 includes a log acquisition unit 271, which is a module that acquires logs when a predetermined process related to control calculations is executed; a log determination unit 272, which is a module that determines the type of log acquired; a storage destination determination unit 273, which is a module that determines the storage destination of the log; and a recovery unit 274, which is a module that transfers logs between storage units when the storage unit is restored to a state in which it can store logs.

[0042] The log acquisition unit 271 acquires as logs errors (ERROR), warnings (WARN), and normal information (INFO) output by the IoT engine 250 during the execution of the IoT program 260 that performs the predetermined processing described above. Errors indicate, for example, serious failures, such as bugs causing the program for the predetermined processing to terminate abnormally. Warnings indicate, for example, potential problems, such as high processor load causing the predetermined processing to terminate beyond a specified time. Normal information indicates, for example, that the predetermined processing has completed successfully. Errors, warnings, and normal information may each include errors occurring during communication processing, warnings related to such communication (such as an increase exceeding a traffic threshold), and information on normal communication, respectively, if the predetermined processing includes communication processing with an external information processing terminal 310.

[0043] In this embodiment, the logs represent three types: errors, warnings, and normal information, but the types are not limited to these. These logs can be useful and important information for ensuring the accuracy of the analysis processing in the information processing terminal 310 described above. The log determination unit 272 determines whether the acquired log is an error, a warning, or normal information based on the attributes of the log.

[0044] In this embodiment, the log type indicates the importance of the log in the analysis process described above. That is, if a unique representative value or feature is obtained, the analysis process can refer to the log to estimate its cause from the logs (errors, warnings, normal information) output by the IoT program execution. Such logs can be used as supporting information to facilitate the analysis process. The importance of such supporting information in the logs is ranked in the order of errors, warnings, and normal information.

[0045] The PLC100 is configured to allow access to multiple non-volatile storage units, including a NAS (Network Attached Storage) which is a storage device located on an external network, an SD (Secure Digital) card 116 which is an example of a storage medium that can be detachably attached to the PLC100, and an internal memory 44 which is composed of a storage medium built into the PLC100.

[0046] When the storage destination determination unit 273 determines that the type of acquired log is of a predetermined type, it determines two or more of the above-mentioned storage units as candidates for the storage destination of the log, thereby enabling redundancy of the log's storage destination.

[0047] More specifically, the log setting information 30 indicates, for each storage unit, the priority indicating that the storage unit is a storage destination for a predetermined type of log with higher priority than other storage units. When it is determined that the type of the log indicates a predetermined type, the storage destination determination unit 273 determines, based on the log setting information 30, candidates for the storage destination of the log to two or more of the plurality of storage units. For example, based on the log setting information 30, when the log indicates "ERROR", the log candidates for the storage destination are the NAS 280, the SD card 116, and the internal memory 44; when the log indicates "WARN", the log candidates for the storage destination are the NAS 80 and the SD card 116; and when the log indicates "INFO", the log candidate for the storage destination is the NAS 280. Thus, the degree of multiplexing of the log storage destination can be varied based on the type of the log. Since such a degree of multiplexing increases as the log is more important, more important logs can be logged without loss.

[0048] Hereinafter, as a more specific application example of the present disclosure, a more detailed configuration and logging of the PLC 100 according to the present embodiment will be described.

[0049] <B. System Configuration> An example of a network system including a control system 1 applicable to FA according to the present embodiment will be described. FIG. 2 is a schematic diagram showing an example of the overall configuration of the network system according to the present embodiment.

[0050] In Figure 2, the control system 1 applied to FA has a network configuration in which PLC100A, 100B, and 100C and multiple field devices 90 that are the target of control are connected to the network in a communicative manner. More specifically, PLC100A, 100B, and 100C are connected to network 2. Network 2 is further connected to NAS280, which has a relatively large storage capacity, and an information processing terminal 310 that provides tools to support the analysis of control-related data and log data collected by the control system 1. A data link is formed in network 2 that allows data to be exchanged between devices. PLC100A, 100B, and 100C each communicate with one or more field devices 90, such as sensors and actuators, via a field network 11 different from network 2. In the following description of embodiments common to PLC100A, 100B, and 100C, PLC100A, 100B, and 100C may be collectively referred to as PLC100.

[0051] In addition to being connected to the PLC 100 via the field network 11, the field devices 90 may also be directly connected to the PLC 100 via input / output units (not shown) associated with the PLC 100. Each of the field devices 90 includes an actuator that applies some physical action to a manufacturing device or production line (hereinafter collectively referred to as the "field"), and an input / output device that exchanges information with the field.

[0052] The data exchanged between the PLC 100 and the field device 90 via the field network 11 is updated at very short intervals of several hundred microseconds to several tens of milliseconds. This data update process is achieved by I / O refresh.

[0053] The PLC 100 can be connected to the support device 500. The support device 500 provides support tools to assist the user in operating the control system 1. The support tools include setup tools for preparing, such as the execution environment of the control program or the communication environment with the PLC 100. The support tools are provided to the user, for example, through a UI (User Interface).

[0054] In the control system 1, the support device 500 may be connected to the network 2, or may be built into the PLC 100, or may be provided as a portable terminal. Also, the information processing terminal 310 may be provided as a portable terminal.

[0055] The PLCs 100A, 100B, and 100C connected to the network 2 are respectively provided for different processes 3A, 3B, and 3C. Without limitation, for example, process 3A represents the assembly process of a product (workpiece), process 3B represents the painting process of the assembled product, and process 3C represents the inspection process of the painted product.

[0056] In this embodiment, a PLC is described as a typical example of the "control device", but the technical idea disclosed in this specification is applicable to any control device without being limited to the name of the PLC.

[0057] <C. Configuration of PLC 100> FIG. 3 is a schematic diagram showing a hardware configuration example of the PLC 100 according to this embodiment. Referring to FIG. 3, the PLC 100 mainly includes a power supply circuit 101 that supplies power PW to each part of the PLC 100, a CPU (Central Processing Unit) 102, a chipset 104, a memory 106 mainly composed of a volatile storage medium, a storage device 108 mainly composed of a non-volatile storage medium, a USB (Universal Serial Bus) controller 112, a memory card interface 114, a field network controller 113, and a network controller 120.

[0058] The CPU 102 reads a user program, including a control program 140, stored in the storage 108 or SD card 116, expands it into memory 106, and executes it, thereby realizing control calculation processing for controlling the controlled object.

[0059] Memory 106 consists of volatile storage devices such as DRAM (Dynamic Random Access Memory) or SRAM (Static Random Access Memory). Storage 108 consists of non-volatile storage devices such as HDD (Hard Disk Drive), SSD (Solid State Drive), or flash memory.

[0060] The chipset 104 facilitates the exchange of data between the CPU 102 and each component, thereby enabling the overall processing of the PLC 100.

[0061] Storage 108 stores a system program 1082 which has an OS (Operating System) 130 and a scheduler program 132 for realizing the basic functions of PLC 100, as well as a control program 140 created according to the controlled object such as equipment or machinery, and an IO refresh program 40 for exchanging control commands 93 and status values ​​92 with each field device 90. Furthermore, storage 108 stores an IoT program 260 which has an output program 270, and a setting program 42 which performs settings for logging. In addition, storage 108 has an area for storing a temporary log file 43 in which logs of a predetermined type detected when IoT program 260 is executed are recorded, a collection area 41 for storing data collected regarding control, an internal memory 44 which is an internal storage area of ​​PLC 100 for storing log files 320, and an area for storing log setting information 30.

[0062] In this embodiment, the log file has a predetermined size and records data chronologically according to the time the log was acquired. The CPU 102, acting as a log acquisition unit 271, creates a temporary log file 43 when a log is acquired and records the log in chronological order within the temporary log file 43. The log file is configured to be uniquely identifiable by including the file name and creation date and time as headers. The log file may include text data files such as CSV (comma separated values) files.

[0063] The USB controller 112 is responsible for exchanging data with any information processing device via a USB connection. Any information processing device may include, for example, a support device 500 that provides the user with functions such as creating or editing a control program 140, debugging, and setting various parameters.

[0064] The memory card interface 114 is configured to allow the SD card 116 to be easily inserted and removed. Under the control of the CPU 102, the memory card interface 114 writes information to and reads information from the SD card 116. The information read from and written to the SD card 116 includes application programs, including the control program 140 and the IoT program 260, data such as various settings, and log files 320.

[0065] The field network controller 113 has a connector 116a that connects to the field network 11 to which the field device 90 belongs, and controls the exchange of data between the PLC 100 and other devices, including the field device 90, via the field network 11. The field network controller 113 has an internal buffer that stores status values ​​92 received from the field network 11 and control commands 93 output from the PLC 100 to the field network 11 as input data 154 and output data 155, respectively.

[0066] The network controller 120 has a connector 120a that connects the PLC 100 to the network 2 and controls the exchange of data between the PLC 100 and external devices, including other PLCs 100, NAS 280, and information processing terminals 310, via the network 2.

[0067] The CPU 102 includes one or more processors. The one or more processors periodically control the field device 90 by performing the control calculation processing and I / O refresh described above by repeatedly executing the control program 140 and the refresh program 40 at predetermined intervals (e.g., the control cycle). In addition, the one or more processors of the CPU 102 execute the IoT program 260 or the setting program 42 asynchronously with the control cycle.

[0068] The IoT program 260 is executed asynchronously with respect to the control cycle by one or more processors of the CPU 102. When the IoT program 260 is executed, IoT processing is performed, logs are acquired during IoT processing, and the acquired logs are recorded in a temporary log file 43. The temporary log file 43 has a predetermined size and is configured as a so-called ring buffer.

[0069] The setting program 42 receives user operations to the PLC 100 via the support device 500 and stores (sets) log setting information 30 in the storage 108 based on the received user operations.

[0070] FIG. 2 shows a configuration example in which functions necessary for the CPU 102 to execute a program are provided. However, some or all of these provided functions may be implemented using a dedicated hardware circuit (e.g., an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array)). Alternatively, the main part of the PLC 100 may be realized using hardware that follows a general-purpose architecture (e.g., an industrial personal computer based on a general-purpose personal computer). In this case, multi-core technology may be applied to execute processes in parallel. Or, virtualization technology may be used to concurrently execute a plurality of different OSs and execute necessary applications on each OS.

[0071] In the present embodiment, the storage unit that serves as the storage destination of the log may be any non-volatile storage medium capable of storing the log, more specifically the log file 32, and is not limited to the SD card 116, the NAS 280, and the internal memory 44. In the present disclosure, such a storage destination may include, for example, a non-volatile storage medium included in the support device 500 or the information processing terminal 310. Also, a plurality of NASs 280 may be provided as the storage destination of the log file 320, and a device on the cloud may be included as the storage destination.

[0072] <C. Configuration of Support Device 500> FIG. 4 is a diagram schematically showing the hardware configuration of the support device 500 according to the present embodiment. Referring to FIG. 4, the support device 500 includes a CPU 510, a memory 512 composed of a volatile storage device such as a DRAM (Dynamic Random Access Memory), a timer 513, a hard disk 514 composed of a non-volatile storage device such as an HDD, an input interface 518, a display controller 520, a communication interface 524, and a data reader / writer 526. These components are connected via a bus 528 so as to be capable of data communication with each other.

[0073] The input interface 518 mediates data transmission between the CPU 510 and input devices such as the keyboard 523, a mouse (not shown), and a touch panel (not shown). The display controller 520 is connected to the display 522 and displays the results of processing in the CPU 510 and the like. The communication interface 524 communicates with the PLC 100 via USB. The data reader / writer 526 mediates data transmission between the CPU 510 and the memory card 516 which is an external storage medium.

[0074] Note that the removable storage media such as the SD card 116 of the PLC 100 and the memory card 516 in FIG. 4 include volatile storage media or non-volatile storage media, such as general-purpose semiconductor memory devices such as CF (Compact Flash), SD (Secure Digital), or magnetic storage media such as Flexible Disk, or optical storage media such as CD-ROM (Compact Disk Read Only Memory).

[0075] <D. Configuration of Logging> FIG. 5 is a diagram schematically showing the configuration of logging according to the present embodiment. Referring to FIG. 5, the IoT platform 10A includes a module of the IoT process 26A and a module of the logging 27A realized by executing the IoT program 260. The logging 27A determines the storage destination of the temporary log file 43 (see FIG. 4) in which the acquired logs are recorded from among a plurality of storage units (NAS 280, SD card 116, internal memory 44) based on the log type and the log setting information 30 of the temporary log file 43.

[0076] More specifically, logging 27A obtains, from the log setting information 30 set in relation to the log type of the temporary log file 43, the identifier of each of one or more storage units set in the log setting information 30, and determines, as the storage destination for the log, the storage unit with the highest priority among the storage units indicated by the obtained identifiers. Logging 27A transfers the temporary log file 43 to the determined storage unit. As a result, in the storage unit serving as the storage destination, the log of the temporary log file 43 is recorded as a log in the log file 320. In the present embodiment, the transfer of the log file includes the copying or moving of the log file.

[0077] <E. Priority of Storage Unit> FIG. 6 is a diagram for explaining the characteristics of the storage unit according to the present embodiment. Referring to FIG. 6, the type 611 of the storage unit in which the log file is stored by logging 27A includes the NAS 280, the SD card 116, and the internal memory 44. In FIG. 6, the capacity 612, stability 613, and ease of use 614 of each storage unit type 611 are shown in association with the storage unit type 611. The capacity 612 indicates the storage capacity capable of storing logs, and the capacities are large in the order of the NAS 280, the SD card 116, and the internal memory 44. Also, the ease of use 614 for the user of the storage unit is high in the order of the NAS 280, the SD card 116, and the internal memory 44. In contrast, the stability 613 indicating the possibility of stably maintaining a state in which the storage unit is accessible, that is, a state in which logs can be read and written, is high in the order of the internal memory 44, the SD card 116, and the NAS 280.

[0078] Events that inhibit the stability 613 of the storage unit, referring to FIG. 6, for NAS280 include insufficient capacity such as free space for storing logs, disconnection of cables such as the field network 11 connecting NAS280, increased traffic on the field network 11, and the period from when the PLC100 starts up until the PLC100 completes the connection to NAS280 (unconnected state). Also, referring to FIG. 6, for the SD card 116, events that inhibit the above stability 613 include insufficient capacity such as free space for storing logs, the SD card 116 being locked, the number of write operations of the SD card 116 exceeding the upper limit value, and the ejection button of the SD card 116 provided in the PLC100 being operated. Also, referring to FIG. 6, for the internal memory 44 of the PLC100, events that inhibit the above stability 613 include a predetermined event occurring in the PLC100 that makes access to the internal memory 44 impossible. Logging 27A can determine (detect) whether such inhibition events of each storage unit are occurring by searching the management information of the storage unit, the hardware information of the PLC100, the information of the network 2 managed by the PLC100, and the like.

[0079] In the present embodiment, the priority of the storage unit can be set based on one or more characteristics of the capacity 612, stability 613, and ease of use 614. For example, the priority of the storage unit is set based on the size of the capacity 612. The characteristics serving as criteria for setting the priority are not limited to the capacity 612, stability 613, and ease of use 614.

[0080] <F. Logging and Priority Information> Figure 7 is a diagram illustrating the general logging process according to this embodiment. Figure 7(A) shows a flowchart of the general process, and Figure 7(B) shows an example of log setting information 30. The log setting information 30 in Figure 7(B) indicates the priority for each of the storage units provided as log storage destinations—the NAS280, SD card 116, and internal memory 44—to be prioritized over other storage units for storing predetermined types of logs (ERROR, WARN, INFO). More specifically, the NAS280 is set to the highest priority (1st) for all of the abnormal (ERROR), warning (WARN), and normal information (INFO) logs, while the SD card 116 is set to the second highest priority as a storage destination for abnormal (ERROR) and warning (WARN) logs. According to this log configuration information 30, for logs indicating an “ERROR”, the storage locations for those logs are set to three: NAS280, SD card 116, and internal memory 44, thus triplicating the storage of those logs. For logs indicating a “WARN”, the storage locations for those logs are set to two: NAS280 and SD card 116, thus doubling the storage of those logs. As a result, the more important the log, the higher the degree of redundancy of the storage units that can store that log.

[0081] CPU 102 performs the process shown in Figure 7(A) as logging 27A. First, when an error occurs in IoT processing, CPU 102 acquires a log of the error (Step S1). More specifically, it creates a temporary log file 43 that records the log of the error.

[0082] The CPU 102 determines the type of log recorded in the temporary log file 43 and retrieves a storage unit capable of storing the log corresponding to the determined type from the log setting information 30 in Figure 7(B). In this case, the NAS 280, SD card 116, and internal memory 44 are retrieved as storage units along with their priority.

[0083] The CPU 102 first determines, according to the acquired priority of each storage unit, whether it can store (transfer) the temporary log file 43 to the NAS 280, which has the highest priority (step S3). If it determines that it can be stored (YES in step S3), it stores the temporary log file 43 in the NAS 280 (step S4). In the NAS 280, the temporary log file 43 is stored as log file 320 with a filename set. This filename includes the identifier of the storage unit where it is stored (nas.log). On the other hand, if the CPU 102 determines that it cannot store the temporary log file 43 in the NAS 280 (NO in step S3), it proceeds to step S5.

[0084] In step S3, the CPU 102 detects whether the storage unit of the NAS 280 is experiencing an interfering event (see Figure 6) that hinders stability 613, and based on the detection result, determines whether the temporary log file 43 can be stored in the NAS 280. If it is detected that the storage unit is not experiencing an interfering event, the CPU 102 determines that the temporary log file 43 can be stored in the NAS 280 (YES in step S3).

[0085] In step S5, the CPU 102 determines whether it can store (transfer) the temporary log file 43 to the SD card 116, which has the next highest priority (step S5). If it determines that it can store it (YES in step S5), it stores the temporary log file 43 in the SD card 116 (step S6). In the SD card 116, the temporary log file 43 is stored as a log file 320 with a file name set. This file name includes the identifier of the storage unit where it is stored (sd.log). On the other hand, if the CPU 102 determines that it cannot store the temporary log file 43 in the SD card 116 (NO in step S5), it proceeds to step S7.

[0086] In step S5, the CPU 102 detects whether there are any disruptive events (see Figure 6) that impede the stability 613 of the storage unit on the SD card 116, and based on the detection result, determines whether the temporary log file 43 can be stored on the SD card 116. If the storage unit is detected to be free of disruptive events, the CPU 102 determines that the temporary log file 43 can be stored on the SD card 116 (YES in step S5).

[0087] In step S7, the CPU 102 determines whether it can store (transfer) the temporary log file 43 to the internal memory 44, which has the next highest priority (step S7). If it determines that it can store it (YES in step S7), it stores the temporary log file 43 in the internal memory 44 (step S8). In the PLC 100's internal memory 44, the temporary log file 43 is stored as a log file 320 with a file name set. This file name includes the identifier of the storage unit where it is stored (plc.log). On the other hand, if the CPU 102 determines that it cannot store the temporary log file 43 in the internal memory 44 (NO in step S7), it does not store the temporary log file 43 in the internal memory 44 (step S9).

[0088] In step S7, the CPU 102 detects whether there are any disruptive events (see Figure 6) that would impede the stability 613 of the storage unit in the internal memory 44, and based on the detection results, determines whether the temporary log file 43 can be stored in the internal memory 44. If the storage unit is detected to be free of disruptive events, the CPU 102 determines that the temporary log file 43 can be stored in the internal memory 44 (YES in step S7).

[0089] Figure 7(A) describes the case where the log type is an error (ERORR), but the same processing is performed for warnings (WARN) and normal information (INFO). More specifically, the CPU 102 determines the NAS280 and SD card 116, which are candidate storage locations, from the log setting information 30 based on the log type, which is a warning (WARN). The CPU 102 then determines whether the temporary log file 43 can be stored in the determined storage location according to the priority order (steps S3 and S4), and stores the temporary log file 43 in the storage location that is determined to be able to store it (either the NAS280 or the SD card 116) (steps S4 and S6). Furthermore, the CPU 102 determines the internal memory 44, which is the storage location, from the log setting information 30 based on the normal information (INFO), which is the type of log, and determines whether the temporary log file 43 can be stored in the determined storage location (step S7). Based on the determination result, the CPU 102 stores the temporary log file 43 in the internal memory 44 (step S8).

[0090] In this way, the CPU 102 identifies two or more storage units as candidates for the storage location of the temporary log file 43, based on the log type and priority, as logging 27A. Of the identified storage units, the CPU 102 determines the storage unit with the higher priority, which satisfies the condition that the state of the storage unit satisfies a predetermined condition, i.e., that no event that would impede stability 613 has been detected for that storage unit, as the storage unit to be stored.

[0091] Furthermore, the CPU 102, as logging 27A, stores the temporary log file 43 in the storage unit corresponding to the next highest priority unit if the state of the higher-priority storage unit among the two or more storage units determined as candidates for storage does not satisfy the predetermined conditions described above, that is, if the condition that no events hindering stability 613 have been detected for that storage unit is not met.

[0092] Events that impede stability 613 in the memory unit include conditions related to memory capacity (such as insufficient capacity). The CPU 102 performs processing on the memory unit as logging 27A to ensure that the condition related to its memory capacity satisfies the above predetermined condition, namely that no events impeding stability 613 have been detected. Such processing includes, for example, log rotation as shown in Figure 8.

[0093] <G.ログローテーション> Figure 8 is a flowchart of log rotation according to this embodiment. In this embodiment, the CPU 102 performs log rotation as logging 27A on the storage unit that will be the storage destination for the log file 320, and secures free space where logs can be stored.

[0094] In log rotation, a threshold D1 is set for the number of days elapsed since the log file 320 was stored in the storage unit, which is the period during which the log file 320 can be stored in the storage unit, i.e., the period during which the log file 320 is accessible (mainly readable). The log files stored in the storage unit are divided so that the size of each file is less than the threshold TH2. In addition, in log rotation, a threshold TH1 is set for the total size of the log files 320 that can be stored in the storage unit. When the total size of the log files 320 stored in the storage unit exceeds TH1, the CPU 102 deletes log files indicating older dates (date and time) from the storage unit so that the total size of the log files 320 stored in the storage unit is less than TH1. In this embodiment, for the above thresholds, threshold D1 is set to, for example, "30 days", threshold TH1 is set to, for example, "500 MB (megabytes)", and threshold TH2 is set to, for example, "10 MB".

[0095] Figure 8 is a flowchart of log rotation according to this embodiment. The process in Figure 8 describes the case where an error (ERROE) occurs as the log type and NSA280 is determined as the storage location for the temporary log file 43. Note that the process for when a log of a different type than an error (ERROE) occurs, and the process when a storage location other than NSA280 is determined, are the same as the process in Figure 8, so the explanation will not be repeated. In Figure 8, the variable sap.log indicates the file name of the latest (currently being written) log on NAS280.

[0096] Referring to Figure 8, when CPU 102 detects that an error (ERROE) has occurred in IoT processing, it performs log rotation (step S11).

[0097] CPU 102 obtains the total size of the log files 320 stored on NAS 280, which has been determined to be the storage location for the temporary log file 43 that records an error (ERROE), compares the obtained total size with threshold TH1, and determines whether the total size is greater than or equal to threshold TH1 based on the comparison result (step S13).

[0098] If CPU102 determines that the total size of log files 320 is greater than or equal to threshold TH1 (YES in step S13), it deletes older log files 320 from NAS280 (step S14). In step S14, CPU102 searches NAS280 for log files 320 whose date exceeds threshold D1 and deletes them.

[0099] On the other hand, if CPU 102 determines that the total size of log files 320 is not greater than or equal to threshold TH1 (NO in step S13), it determines whether the date of the log file has changed (step S15). In step S15, CPU 102 compares the most recent date on which log files 320 were stored in NAS 280 with the date of the temporary log file 43 of the log that occurred in step S11, and determines whether the date has changed based on the comparison result. That is, it determines whether the date of the temporary log file 43 is different from the most recent date mentioned above.

[0100] If the date of the temporary log file 43 is different from the most recent date mentioned above, meaning that the date of the log file has changed (YES in step S15), the CPU 102 searches the NAS 280 and, based on the search results, determines whether or not there is a log file 320 stored in the NAS 280 for a period exceeding the threshold D1 (step S16).

[0101] If CPU102 determines that there are no log files 320 stored on NAS280 for a period exceeding threshold D1 (NO in step S16), it proceeds to step S18. In step S18, CPU102 creates a new log file 320 on NAS280, changes the filename of the created log file 320 from sap.log to sap.log_date_0.log using today's date, and writes the log from temporary log file 43 to the new log file 320 (step S18). On the other hand, if CPU102 determines that there are log files 320 stored on NAS280 for a period exceeding threshold D1 (NO in step S16), CPU102 deletes the log files 320 stored for a period exceeding threshold D1 from NAS280 (step S17) and proceeds to step S18. In step S18, if today's date is October 1, 2021, the new log file 320 will be assigned the filename sap_2021-10-01_0.log. Therefore, CPU 102 can determine the date on which the log file 320 on NAS280 was stored (created) from its filename.

[0102] In step S15, if the CPU 102 determines that the date of temporary log file 43 is not different from the most recent date mentioned above, that is, the date of temporary log file 43 is the same as the date of log file 320 which shows the most recent date on NAS280 (YES in step S15), then proceed to step S19.

[0103] In step S19, CPU 102 obtains the file size of log file 320, which indicates the most recent date on NAS280, compares this file size with threshold TH2, and determines whether the file size is greater than or equal to threshold TH2 based on the comparison result (step S19). If it is determined that the file size is greater than or equal to threshold TH2 (YES in step S19), CPU 102 closes the most recent log file 320, i.e., the log file 320 that is currently writing logs, and proceeds to step S20.

[0104] In step S20, CPU 102 creates a new log file 320 on NAS280, changes the filename of the created log file 320 from sap.log to sap.log_date_X.log using today's date, and writes the log from temporary log file 43 to the new log file 320 (step S20). The variable X is a value that is incremented each time a log file 320 is created on the same day. For example, if today's date is October 1, 2021, in step S20, if the next log file 320 after the log file 320 created in step S18 (filename sap_2021-10-01_0.log) is created, this log file 320 will be assigned the filename sap_2021-10-01_1.log. Therefore, CPU 102 can determine from the filename of the log file 320 the date it was stored (created) and the order in which the files were created on the same date.

[0105] On the other hand, in step S19, when the CPU 102 determines that the file size of the log file 320 indicating the most recent date of the NAS 280 is not equal to or greater than the threshold TH2 (NO in step S19), the CPU 102 writes the log of the temporary log file 43 to the most recent log file 320 of the NAS 280 (step S21).

[0106] <H. Settings related to logging> FIG. 9 is a diagram for explaining a setting tool related to logging according to the present embodiment. In the present embodiment, the setting tool related to logging includes a GUI (Graphical User Interface) tool provided by executing a setting program 42. The GUI tool is realized by presenting a screen on the display 522 of the support device 500 that can receive user operations. FIG. 9 shows an example of a screen displayed on the display 522 by the GUI tool.

[0107] Referring to FIG. 9, the screen for setting logging includes a window 71 for each storage unit of the log storage destination. Each window 71 is assigned an identifier 72 indicating the priority of the corresponding storage unit. Inside each window 71, a box (for example, a text box, etc.) for receiving user operations for setting logging is displayed.

[0108] For example, in the window 71 for the storage unit indicating "Priority 1" with the highest identifier 72, boxes for receiving each of the setting 73 related to the log storage destination, the setting 74 related to the type of log to be stored, and the setting 75 related to log rotation are displayed.

[0109] <S. Settings related to logging> More specifically, setting 73 includes a box 60 that accepts the specification of the type of storage unit to be used for storage, and boxes 61, 62, and 63 that accept the specification of the IP (Internet Protocol) address, username, and password when the storage unit to be used for storage is a NAS280. Setting 74 includes a box 64 that accepts the specification of the type of log to be stored in the storage unit specified in box 60. Setting 75 includes a box 65 that accepts the specification of whether or not to perform log rotation for the storage unit specified in box 60, boxes 66, 67, and 68 that accept the specification of thresholds (TH1, TH2, and D1) related to log rotation, and a box 69 that accepts the specification of the priority of the log files 320 to be rotated. Box 69 accepts the creation date of the log file and the storage location of the log file (internal memory 44, SD card 116) as criteria for selecting the log file 320 to be subject to log rotation with priority over others.

[0110] Furthermore, window 71 for the memory unit whose identifier 72 indicates the next highest priority "priority 2" displays boxes that accept user input in settings 73, 74, and 75, similar to window 71 for the memory unit indicating priority 1. Window 71 for the memory unit whose identifier 72 indicates the next highest priority "priority 2" further includes settings 76 and 77. Setting 76 includes boxes 82 and 83 that accept the specification of conditions for transferring (moving) the log file 320 of the memory unit indicating priority 2 to the memory unit indicating priority 1 when the memory unit indicating priority 1 recovers from a disruption event. Box 82 accepts the specification of whether or not to check the free space of the destination memory unit, and box 83 accepts the specification of the threshold TH3 (unit %) for the free space of the destination memory unit. Setting 77 is for transferring (moving) the log file 320 of the memory unit indicating priority 1 to the memory unit indicating priority 1 when the memory unit indicating priority 1 recovers from a disruption event. The PLC 100 includes boxes 84 and 85 that accept the specification of a trigger for transferring (moving) the log file 320 from the storage unit indicating "2" to the storage unit indicating "priority 1". Box 84 accepts an operation that specifies that the log transfer indicated by setting 76 should be performed when the operating mode of the PLC 100 becomes program mode. Box 85 accepts an operation that specifies that the log transfer indicated by setting 76 should be performed when the value of user variable V rises. Log transfers between storage units are performed according to these settings in boxes 84 and 85. As a result, log transfers between storage units are performed when the condition in box 84 or 85 is met. Therefore, even if the log transfer between storage units is a low-priority program process that is executed during the idle time of the CPU 102 processor, it is guaranteed that the log transfer will be performed in the PLC 100.

[0111] In Figure 9, in window 71 where identifier 72 indicates "priority 2," the codes of the boxes in settings 73, 74, and 75 are the same as the codes of window 71 where identifier 72 indicates "priority 1," so the illustration is omitted. Also in Figure 9, window 71 for the memory unit where identifier 72 indicates the lowest priority "priority 3" displays a box that accepts user input, just like the windows for the other priorities, so the illustration and detailed explanation are not repeated.

[0112] <I. Processing of Log File Movement after Error Resolution in Memory Unit> FIG. 10 is a flowchart showing the processing of log file movement related to NAS 280 according to the present embodiment. FIG. 11 is a flowchart showing the processing of log file movement related to the SD card 116 according to the present embodiment. When the CPU 102 detects that the state of the memory unit has recovered to a state satisfying a predetermined condition, that is, when it detects the resolution of an inhibiting event that inhibits the stability 613 of the memory unit, it performs the processing of moving the log file between the memory units based on the log setting information 30. In FIG. 10, a case where the inhibiting event of NAS 280 is resolved and the state of NAS 280 has recovered to a state satisfying a predetermined condition is shown, and in FIG. 11, a case where the inhibiting event of the SD card 116 is resolved and the state of the SD card 116 has recovered to a state satisfying a predetermined condition is shown. Here, by moving the log file 320 of one memory unit to another memory unit, the free capacity corresponding to the size of the log file 320 can be increased in one memory unit.

[0113] First, referring to FIG. 10, as the recovery unit 274, the CPU 102 detects, for example, based on the free capacity of NAS 280, that the lack of free capacity has been resolved, that is, the inhibiting event has been resolved (step S30).

[0114] As the recovery unit 274, the CPU 102 identifies the memory unit having the next lowest priority after the priority of NAS 280 from the log setting information 30. The SD card 116 is identified as the memory unit with the next lowest priority. As the recovery unit 274, the CPU 102 searches for the SD card 116 with the next lowest priority based on the log setting information 30, and determines based on the search result whether the log file 320 recording a predetermined type of log is stored in the SD card 116 (step S31).

[0115] If it is determined that a log file 320 containing a predetermined type of log is stored (YES in step S31), the CPU 102, as the recovery unit 274, renames the log file 320 and moves the log file 320 from the SD card 116 to the NAS 280 (step S32). This renaming includes changing "sd.log" to "nas.log" in the filename of the log file 320 in accordance with the change in the storage unit that stores the log file 320.

[0116] If it is determined that no log file 320 containing a predetermined type of log is stored on the SD card 116 (NO in step S31), the CPU 102, as the recovery unit 274, identifies a storage unit with the next lowest priority after the SD card 116 from the log setting information 30. The internal memory 44 is identified as the storage unit with the next highest priority. The CPU 102, as the recovery unit 274, searches the internal memory 44 with the next highest priority and, based on the search result, determines whether a log file 320 containing a predetermined type of log is stored in the internal memory 44 (step S33).

[0117] If it is determined that a log file 320 containing a predetermined type of log is stored (YES in step S33), the CPU 102, as the recovery unit 274, renames the log file 320 and moves the log file 320 from the internal memory 44 to the NAS 280 (step S34). This renaming includes changing "plc.log" to "nas.log" in the filename of the log file 320 in accordance with the change in the storage unit that stores the log file 320.

[0118] If it is determined that a log file 320 containing a predetermined type of log is not stored in the internal memory 44 (NO in step S33), the CPU 102 does not move the log file 320 (step S35) and the process ends.

[0119] The predetermined types of logs that are to be moved as described above are the logs indicated by the log setting information 30, and are error (ERROR), warning (WARN), and normal information (INFO) logs, which are the log types set as the storage destination for the storage unit (NAS280) where the resolution of the obstruction event was detected in step S30.

[0120] Figure 11 shows that the CPU 102, acting as a recovery unit 274, detects, for example, that the lack of free space has been resolved, i.e., that the disruptive event has been resolved, based on the free space on the SD card 116 (step S40).

[0121] The CPU 102, acting as a recovery unit 274, identifies a storage unit with the next lowest priority after the SD card 116 from the log setting information 30. The internal memory 44 is identified as the storage unit with the next highest priority. The CPU 102, acting as a recovery unit 274, searches the internal memory 44 with the next highest priority based on the log setting information 30, and determines, based on the search result, whether a log file 320 containing a predetermined type of log is stored in the internal memory (step S41).

[0122] If it is determined that a log of a predetermined type is stored in the internal memory 44 (YES in step S41), the CPU 102, as the recovery unit 274, renames the log file 320 and moves the log file 320 from the internal memory 44 to the SD card 116 (step S42). This renaming includes changing "plc.log" to "sd.log" in the filename of the log file 320 in accordance with the change in the storage unit that stores the log file 320.

[0123] If it is determined that no log file 320 containing a predetermined type of log is stored on the SD card 116 (NO in step S31), the CPU 102, as the recovery unit 274, identifies a storage unit with the next lowest priority after the SD card 116 from the log setting information 30.

[0124] When it is determined that the log file 320 that records logs of a predetermined type is not stored in the internal memory 44 (NO in step S41), the CPU 102 does not move the log file 320 (step S45), and the process ends.

[0125] The logs of the predetermined type that are the above-mentioned transfer targets are the logs indicated by the log setting information 30, and are errors (ERROR) and warnings (WARN) which are the types of logs for which the storage unit (SD card 116) where the elimination of the inhibition event was detected in step S40 is set as the storage destination. [[ID=u6]]

[0126] In this way, when the state of the storage unit with the higher priority satisfies a predetermined condition, that is, when the inhibition event is resolved and the storage unit returns to an accessible state, the log file 320 of the storage unit corresponding to the lower priority is moved (stored) to the storage unit with the higher priority by the recovery unit 274 of the logging 27A.

[0127] <J. Program and Recording Medium> The IoT program 260 and the setting program 42 including the output program 270 shown in this embodiment can also be recorded on a computer-readable recording medium including a recording medium such as a flexible disk, a CD-ROM, a ROM (Read Only Memory), a RAM (Random Access Memory), and an HDD (Hard Disc Drive) attached to the PLC 100, and provided as a program product. The recording medium is a medium that accumulates information such as the program by an electrical, magnetic, optical, mechanical, or chemical action so that a computer or other device, machine, etc. can read the information such as the program recorded thereon.

[0128] Also, the above program can be provided to the PLC 100 by downloading from the network 2 via the network controller 120. T

[0129] <K. Supplementary Note> The embodiment described above includes the following technical concept. [Configuration 1] A control device (100) for FA (factory automation), A first connector (116a) that connects to the first network (11) to which the object to be controlled (90) belongs, A second connector (12a) connects to the second network (2) to which the external storage device (280) belongs, A logging unit (27A) is configured to access a plurality of storage units (280, 116, 41) including the aforementioned external storage device, The system includes a storage unit that serves as the storage location for logs of predetermined processes related to control calculations, and a setting unit (42) that allows setting different multiplexing levels for each type of log, The logging unit, An acquisition unit (271) that acquires the log when the predetermined process is executed, The system includes a determination unit (272) that determines the type of log acquired by the acquisition unit, A control device that determines the storage location for the log to be a storage unit configured in accordance with the type of log that has been determined. [Configuration 2] The aforementioned setting unit is, The control device according to Configuration 1, wherein for each of the plurality of storage units, a priority is set so that the storage unit takes precedence over other storage units as the storage destination for the log. [Configuration 3] The aforementioned setting unit is, The control device according to configuration 2, wherein the storage unit with a higher priority is configured to be used as the storage location for a wider variety of logs. [Structure 4] The logging unit, The control device according to configuration 3, which determines the storage unit with the higher priority among two or more redundant storage units that satisfy predetermined conditions as the storage destination for the log. [Composition 5] The logging unit, The control device according to configuration 4, which, when the state of the higher-priority storage unit does not satisfy the predetermined conditions, determines the next-highest priority storage unit as the log storage destination. [Composition 6] The control device according to configuration 4 or 5, wherein the state of the memory unit includes a state relating to the memory capacity. [Composition 7] The logging unit, The control device according to configuration 6, which performs processing on the log stored in the storage unit so that the state related to the storage capacity satisfies the predetermined conditions. [Structure 8] The control device according to any one of configurations 4 to 7, wherein the state of the storage unit includes a state relating to the accessibility of the storage unit. [Composition 9] The logging unit, A control device according to any one of configurations 4 to 8, wherein when the state of the storage unit with the higher priority is restored to a state that satisfies the predetermined conditions, the log of the storage unit corresponding to the next lower priority is moved to the storage unit with the higher priority. [Configuration 10] The control device according to any one of configurations 4 to 9, wherein the priority of the memory unit is based on the size of the memory capacity. [Composition 11] The type of log indicates the importance of the log. A control device according to any one of configurations 1 to 10, wherein the degree of redundancy is higher for logs of higher importance. [Composition 12] The aforementioned setting unit is, A control device according to any one of configurations 1 to 11, wherein, based on user operation (510) to the control device, the storage unit that serves as the storage location for the log of the predetermined process related to the control calculation can be set with different multiplexing levels for each type of log. [Composition 13] A logging method performed by a processor (102) provided in a factory automation (FA) controller (100), The controller is configured to access a plurality of storage units (280, 116, 41) including an external storage device (280) connected to a network (2). The logging method is The FA is equipped with a storage unit that serves as a storage location for logs of predetermined processes related to control calculations of the target (90), and the FA is configured to allow the degree of redundancy to differ for each type of log. The steps include: acquiring the log when the predetermined process is executed, The steps include determining the type of log acquired in the acquisition step, A logging method comprising the step of determining a storage unit configured to correspond to the determined type of log as the storage destination for the log. [Composition 14] A program for causing a processor (102) provided in a factory automation (FA) controller (100) to execute a logging method, The controller is configured to access a plurality of storage units (280, 116, 41), including an external storage device (280) connected to a network. The logging method is The FA is equipped with a storage unit that stores logs of predetermined processes related to the target control calculation, and the FA is configured to allow the degree of redundancy to be set differently for each type of log. The steps include: acquiring the log when the predetermined process is executed, The steps include determining the type of log acquired in the acquisition step, A program that includes the step of determining the storage location for the log to be a storage unit configured in accordance with the type of log that has been determined.

[0130] The embodiments disclosed herein should be considered in all respects to be illustrative and not restrictive. The scope of the present invention is indicated by the claims rather than by the foregoing description, and all modifications within the meaning and scope equivalent to the claims are intended to be included. [Explanation of symbols]

[0131] 1 Control system, 2 Network, 3A, 3B, 3C Process, 10A IoT platform, 10B Control unit, 11 Field network, 26A IoT processing, 27A Logging, 29 Types, 30 Log setting information, 41 Collection area, 42 Setting program, 43 Temporary log file, 44 Internal memory, 72 Identifier, 73, 74, 75, 76, 77 Settings, 90 Field device, 92 Status value, 93 Control command, 116 SD card, 116a, 120a Connector, 120 Network controller, 140 Control program, 150 Control engine, 154 Input data, 155 Output data, 250 IoT engine, 260 IoT program, 270 Output program, 271 Log acquisition unit, 272 Log determination unit, 273 Storage destination determination unit, 274 Recovery unit, 310 Information processing terminal, 320 Log file, 500 Support device, 510 user operation.

Claims

1. A control device for FA (factory automation), A first connector that connects to the first network to which the object to be controlled belongs, A second connector that connects the second network to which the information processing device and external storage device belong, A logging unit configured to access multiple storage units, including the aforementioned external storage device, The system includes a storage unit that serves as the storage location for logs of predetermined processes related to control calculations, and a setting unit that allows setting different degrees of multiplexing for each type of log, The result of the control calculation includes a control command. The predetermined processing includes a process for calculating a representative value or characteristic quantity of the state value of the object controlled in accordance with the control command, and a process for communicating the result of the calculation to the information processing device. The logging unit, A log acquisition unit that acquires the log when the predetermined process is executed, The system includes a determination unit that determines the type of log acquired by the acquisition unit, The storage unit configured to correspond to the determined log type is determined as the storage destination for the log. The setting unit is, For each of the aforementioned storage units, a priority is set so that the storage unit has higher priority than other storage units as the storage location for the log. The setting unit is, A control device that configures storage units with higher priority to be used as storage locations for a wider variety of logs.

2. A control device for FA (Factory Automation), A first connector that connects to the first network to which the object to be controlled belongs, A second connector that connects to the second network to which the external storage device belongs, A logging unit configured to access multiple storage units, including the aforementioned external storage device, The system includes a storage unit that serves as the storage location for logs of predetermined processes related to control calculations, and a setting unit that allows setting different degrees of multiplexing for each type of log, The logging unit, A log acquisition unit that acquires the log when the predetermined process is executed, The system includes a determination unit that determines the type of log acquired by the acquisition unit, The storage unit configured to correspond to the determined log type is determined as the storage destination for the log. The setting unit is, For each of the aforementioned storage units, a priority is set so that the storage unit has higher priority than other storage units as the storage location for the log. The setting unit is, A control device that configures storage units with higher priority to be used as storage locations for a wider variety of logs.

3. The logging unit, The control device according to claim 1 or 2, wherein, among two or more redundant storage units, the storage unit with the higher priority whose state satisfies predetermined conditions is determined to be the storage destination for the log.

4. The logging unit, The control device according to claim 3, wherein when the state of the storage unit with the higher priority does not satisfy the predetermined condition, the storage unit with the next lower priority is determined to be the storage destination for the log.

5. The control device according to claim 3 or 4, wherein the state of the storage unit includes a state relating to the storage capacity.

6. The logging unit, The control device according to claim 5, which performs processing on the log stored in the storage unit so that the state relating to the storage capacity satisfies the predetermined conditions.

7. The control device according to any one of claims 3 to 6, wherein the state of the storage unit includes a state relating to the accessibility of the storage unit.

8. The logging unit, The control device according to any one of claims 3 to 7, wherein when the state of the storage unit with the higher priority is restored to a state that satisfies the predetermined conditions, the device reads the log of the storage unit corresponding to the next higher priority and stores it in the storage unit with the higher priority.

9. The control device according to any one of claims 3 to 8, wherein the priority of the storage unit is based on the size of the storage capacity.

10. The type of log indicates the importance of the log. The control device according to any one of claims 1 to 9, wherein the log of higher importance has a higher degree of redundancy.

11. The setting unit is, The control device according to any one of claims 1 to 10, wherein, based on user operations on the control device, the storage unit that serves as the storage location for the log of the predetermined process related to the control calculation can be set with different multiplexing levels for each type of log.

12. A logging method performed by a processor provided in a factory automation (FA) controller, The controller connects the network to which the information processing device and the external storage device belong. The controller is configured to be able to access a plurality of storage units, including the external storage device belonging to the network. The logging method is The FA is equipped with a storage unit that stores logs of predetermined processes related to control calculations for the target, and the FA is configured to allow the degree of redundancy to be set differently for each type of log. The steps include: acquiring the log when the predetermined process is executed, The steps include determining the type of log acquired in the acquisition step, The steps include determining the storage unit configured in accordance with the determined log type as the storage destination for the log, The result of the control calculation includes a control command. The predetermined processing includes a process for calculating a representative value or characteristic quantity of the state value of the object controlled in accordance with the control command, and a process for communicating the result of the calculation to the information processing device. The step that enables the above setting is, For each of the aforementioned storage units, a priority is set so that the storage unit takes precedence over other storage units as the storage location for the log, and A logging method that includes configuring the storage unit with a higher priority to be used as the storage location for a wider variety of logs.

13. A logging method performed by a processor provided in a factory automation (FA) controller, The controller is configured to access multiple storage units, including external storage devices connected to a network. The logging method is The FA is equipped with a storage unit that stores logs of predetermined processes related to control calculations for the target, and the FA is configured to allow the degree of redundancy to be set differently for each type of log. The steps include: acquiring the log when the predetermined process is executed, The steps include determining the type of log acquired in the acquisition step, The steps include determining the storage unit configured in accordance with the determined log type as the storage destination for the log, The step that enables the above setting is, The process includes setting a priority for each of the aforementioned storage units, which is given priority over other storage units in determining which storage unit will be the storage location for the log. In the step of setting the priority, the logging method is configured such that higher priority storage units are used to store a wider variety of logs.

14. A program for causing a processor in a factory automation (FA) controller to execute a logging method, The controller connects the network to which the information processing device and the external storage device belong. The controller is configured to be able to access a plurality of storage units, including the external storage device belonging to the network. The logging method is The FA is equipped with a storage unit that stores logs of predetermined processes related to control calculations for the target, and the FA is configured to allow the degree of redundancy to be set differently for each type of log. The steps include: acquiring the log when the predetermined process is executed, The steps include determining the type of log acquired in the acquisition step, The steps include determining the storage unit configured in accordance with the determined log type as the storage destination for the log, The result of the control calculation includes a control command. The predetermined processing includes a process for calculating a representative value or characteristic quantity of the state value of the object controlled in accordance with the control command, and a process for communicating the result of the calculation to the information processing device. The step that enables the above setting is, For each of the aforementioned multiple storage units, a priority setting is made to ensure that the storage unit has higher priority than other storage units as the storage location for the log, and A program that includes configuring higher-priority storage units to be used as storage locations for a wider variety of logs.

15. A program for causing a processor in a factory automation (FA) controller to execute a logging method, The controller is configured to access multiple storage units, including external storage devices connected to a network. The logging method is The FA is equipped with a storage unit that stores logs of predetermined processes related to control calculations for the target, and the FA is configured to allow the degree of redundancy to be set differently for each type of log. The steps include: acquiring the log when the predetermined process is executed, The steps include determining the type of log acquired in the acquisition step, The steps include determining the storage unit configured in accordance with the determined log type as the storage destination for the log, The step that enables the above setting is, The process includes setting a priority for each of the aforementioned storage units, which is given priority over other storage units in determining which storage unit will be the storage location for the log. In the step of setting the priority, the program is configured such that higher priority storage units are used to store a wider variety of log types.

Citation Information

Patent Citations

  • Network data server device and programmable logic controller system

    JP1996335104A

  • Log management method and computer program using the method

    JP2004152024A

  • Information processing system, log data management method and program for managing log data

    JP2007034416A

  • Update log backup method

    JP2007219756A

  • Equipment management device, equipment management system, log management method, log management program and recording medium with the program recorded thereon

    JP2010140111A