PROGRAMMABLE CONTROLLER, TERMINAL DEVICE, INFORMATION PROVIDING METHOD AND PROGRAM

JPWO2025126261A1Active Publication Date: 2025-06-19MITSUBISHI ELECTRIC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024522585
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2025-06-19
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

Existing PLC maintenance methods are inefficient due to the difficulty in identifying the cause of errors, particularly when unintended operations occur due to external device communication, leading to increased maintenance time.

Method used

A programmable controller equipped with a value log collection unit, event log collection unit, and communication log collection unit, which record and associate logs with time information, allowing for efficient analysis of device values, events, and communication data, facilitating quicker error identification.

Benefits of technology

The solution reduces the time required for maintenance by providing detailed logs that facilitate rapid identification of error causes, enhancing maintenance efficiency.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The PLC (10) includes a program execution unit (12) that executes a control program (P2), a value log collection unit (13) that collects logs of device values ​​stored in the memory (11) when the control program (P2) is executed, an event log collection unit (14) that collects logs of predetermined events including operations on device values ​​that occur inside the PLC (10), a communication log collection unit (15) that collects logs of communication data transmitted or received by a communication unit (16) that communicates via a network, a time information acquisition unit (18) that acquires time information related to time, and a provision unit (19) that provides the device value log, event log, and communication data log in association with time information related to the time when each log was collected.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a programmable controller, a terminal device, an information providing method, and a program. [Background technology]

[0002] In many cases, FA (Factory Automation) systems operate by using a PLC (Programmable Logic Controller) to execute user programs created by users to control various devices. With the recent development of information and communication technologies, such as IoT (Internet of the Things) technology and cloud systems, PLCs are increasingly being connected to external devices and communicating data. When a PLC controls various devices, the user program may behave in an unintended manner due to the external device.

[0003] In order to facilitate the investigation of the cause when an unexpected operation occurs in a user program like this, it is conceivable to apply a technology for recording logs (for example, see Patent Document 1). Patent Document 1 describes a technology for supporting error analysis by recording PLC communication log data and status log data including PLC errors. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2019-197461 A Summary of the Invention [Problem to be solved by the invention]

[0005] However, with the technology of Patent Document 1, it may take a long time to determine the cause of an error. For example, an error may occur in the PLC as a result of a command to write data related to control contents being sent to the PLC via communication but not actually being written. In this case, even if an operator confirms the occurrence of an error from the status log data and finds the write command from the communication log data, it is difficult to identify the cause as failure to write. Therefore, there is a risk that it will take a long time to carry out maintenance work using the PLC log.

[0006] The present disclosure has been made in light of the above-mentioned circumstances, and aims to reduce the time required for maintenance work using PLC logs. [Means for solving the problem]

[0007] In order to achieve the above-mentioned object, the data management device disclosed herein is a programmable controller that controls an appliance, and includes a program execution means that executes a control program for controlling the appliance, a memory shared with the appliance, a value log collection means that collects a log of values ​​stored in the memory when the control program is executed, an event log collection means that collects a log of events that occur inside the programmable controller and are predetermined events including operations on values ​​in the memory, a communication means that communicates with at least one of the appliance and a device other than the appliance via a network, a communication log collection means that collects a log of communication data transmitted or received by the communication means, a time information acquisition means that acquires time information related to the time, and a provision means that provides the value log, event log, and communication data log in association with time information related to the time when each log was collected. Effect of the Invention

[0008] According to the present disclosure, it is possible to reduce the time required for maintenance work using PLC logs. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram showing a configuration of an information providing system according to a first embodiment. [Diagram 2] FIG. 1 is a diagram showing a hardware configuration of an FA device according to a first embodiment. [Diagram 3] FIG. 1 is a diagram showing a functional configuration of a PLC and a terminal device according to a first embodiment; [Figure 4] FIG. 1 is a diagram showing an example of a list of value logs according to the first embodiment; [Diagram 5] FIG. 1 is a diagram showing an example of a list of event logs according to the first embodiment; [Figure 6] FIG. 1 shows a configuration of request data according to the first embodiment. [Figure 7] FIG. 1 is a first diagram showing a configuration of response data according to the first embodiment; [Figure 8] FIG. 2 is a second diagram showing a configuration of response data according to the first embodiment; [Figure 9] FIG. 1 is a diagram showing an example of a list of logs of communication data according to the first embodiment; [Figure 10] FIG. 13 is a diagram showing an example of information related to an error code according to the first embodiment; [Figure 11] FIG. 1 is a diagram showing an example of a screen displayed by a display unit according to the first embodiment; [Figure 12] FIG. 13 is a diagram showing a list of logs of communication data displayed by a display unit according to the first embodiment; [Figure 13] FIG. 13 is a diagram showing an example in which a log is selected by a user from a list of communication data according to the first embodiment; [Figure 14] FIG. 13 is a diagram showing an example of displaying a method for dealing with an error according to the first embodiment; [Figure 15] FIG. 12 is a diagram showing a first example in which logs are displayed in association with each other by the display unit according to the first embodiment; [Figure 16] FIG. 13 is a diagram showing a second example in which logs are displayed in association with each other by the display unit according to the first embodiment; [Figure 17] FIG. 1 is a diagram showing a flow of information provision according to the first embodiment. [Figure 18] FIG. 13 is a diagram showing a correspondence relationship between logs according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an information providing system according to an embodiment of the present disclosure will be described in detail with reference to the drawings.

[0011] Embodiment 1 The information providing system 100 according to the present embodiment corresponds to a part of a production system, a machining system, an inspection system, or other processing system constructed in a factory or plant. As shown in FIG. 1, the information providing system 100 is a system that supports a user U1 in checking details of the operation of the PLC 10 by providing the user U1 with a log recorded by the PLC 10 via a UI (User Interface) of a terminal device 30. This work is typically a maintenance work for investigating the cause of an error, but may be a work performed as part of quality control for controlling the quality of an object of processing realized by the control of the PLC 10, or a process control for improving the efficiency of control by the PLC 10, or may be other work.

[0012] The PLC 10 is a control device that is connected to the controlled device 20 via a network such as a field network or a dedicated line, and controls the controlled device 20. The PLC 10 corresponds to an example of a programmable controller that controls devices. The PLC 10 controls the controlled device 20 to perform various processes, for example, to operate a production line that processes workpieces to manufacture products, an inspection line that inspects workpieces, or a machining line that processes workpieces.

[0013] The PLC 10 has a memory 11 in which a device value 111 is stored, and the controlled device 20 has a memory 21 in which a device value 211 is stored. The device values ​​stored in the memories 11 and 21 are typically the same data through so-called cyclic transmission, so that the memory 11 is shared by the PLC 10 and the controlled device 20.

[0014] Although one controlled device 20 is representatively shown in FIG. 1, there may be two or more controlled devices 20. Each of the multiple controlled devices 20 shares the memory 11 of the PLC 10 with the PLC 10, and various control processes are executed by the PLC 10. For example, a device value 211 indicating a sensing result of the controlled device 20, which is a sensor, is written to the memory 21, and the device value 211 is synchronized with the device value 111 of the memory 11, so that the PLC 10 obtains the sensing result. Then, the PLC 10 stores in the memory 11 a device value 111 indicating an operation command for the controlled device 20, which is a robot, based on the sensing result, and the device value 111 is synchronized with the device value 211 of the robot, so that the robot operates according to the operation command. The controlled device 20 corresponds to an example of a device to be controlled by a programmable controller.

[0015] In this way, since the control processes for various controlled devices 20 are executed via the device value 111 of the PLC 10, if the history of the device value 111 is recorded as a log 51, the details of the control processes can be verified after the fact. Furthermore, although the transition of the device value 111 can be known from the log 51, the cause of the change in the device value 111 is not necessarily clear to the user U1. Therefore, the PLC 10 detects and records events that may change the device value 111, and provides the log 52 to the user U1. Furthermore, although the transition of events that have occurred within the PLC 10 can be known from the log 52, events that have occurred outside the PLC 10 are not necessarily clear to the user U1. Therefore, the PLC 10 provides the communication history as a log 53 to the user U1.

[0016] The PLC 10 and the terminal device 30 are each configured with hardware elements for functioning as a computer. In detail, as shown in Fig. 2, an FA device 40 corresponding to each of the PLC 10 and the terminal device 30 has a processor 41, a main memory unit 42, an auxiliary memory unit 43, an input unit 44, an output unit 45, and a communication unit 46. The main memory unit 42, the auxiliary memory unit 43, the input unit 44, the output unit 45, and the communication unit 46 are all connected to the processor 41 via an internal bus 47.

[0017] The processor 41 includes a CPU (Central Processing Unit) or an MPU (Micro Processing Unit) as a processing circuit. The processor 41 executes a program P1 stored in the auxiliary storage unit 43 to realize various functions and execute processes described below. The program P1 of the PLC 10 corresponds to an example of a control program for controlling the controlled device 20.

[0018] The main memory unit 42 includes a RAM (Random Access Memory). The program P1 is loaded into the main memory unit 42 from the auxiliary memory unit 43. The main memory unit 42 is used as a working area for the processor 41.

[0019] The auxiliary storage unit 43 includes a non-volatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) and an HDD (Hard Disk Drive). In addition to the program P1, the auxiliary storage unit 43 stores various data used in the processing of the processor 41. The auxiliary storage unit 43 supplies the data used by the processor 41 to the processor 41 according to an instruction from the processor 41. The auxiliary storage unit 43 also stores data supplied from the processor 41.

[0020] The input unit 44 includes input devices such as a hardware switch, an input key, a keyboard, and a pointing device. The input unit 44 acquires information input by a user of the FA device 40, and notifies the processor 41 of the acquired information.

[0021] The output unit 45 includes output devices such as a light emitting diode (LED), a liquid crystal display (LCD), and a speaker. The output unit 45 presents various information to the user of the FA device 40 in accordance with instructions from the processor 41.

[0022] The communication unit 46 includes a communication interface circuit for communicating with an external device. The communication unit 46 receives a signal from the outside and outputs data indicated by the signal to the processor 41. The communication unit 46 also transmits a signal indicating the data output from the processor 41 to the external device. Although one communication unit 46 is representatively shown in FIG. 2, the FA device 40 may have a plurality of communication units 46. For example, the PLC 10 may have a communication unit 46 for communicating with the controlled device 20 and a communication unit 46 for communicating with the terminal device 30 separately. The communication unit 46 of the PLC 10 may communicate with both the controlled device 20 and the terminal device 30 via the above-mentioned network, or may communicate with the controlled device 20 via the network and communicate with the terminal device 30 via, for example, a USB (Universal Serial Bus) cable.

[0023] The above-mentioned hardware configurations work together to allow the PLC 10 and the terminal device 30 to perform various functions. In detail, as shown in Fig. 3, the PLC 10 has, as its functions, a memory 11 in which device values ​​are stored, a program execution unit 12 that executes a control program P2 for controlling the controlled device 20, a value log collection unit 13 that periodically collects device values, an event log collection unit 14 that detects an event that occurs inside the PLC 10 and collects an event log, a communication log collection unit 15 that collects a log of communication by the communication unit 16, a communication unit 16 that communicates with an external device, a log storage unit 17 that accumulates and stores each log collected by the value log collection unit 13, the event log collection unit 14, and the communication log collection unit 15, a time information acquisition unit 18 that acquires time information related to time, and a provision unit 19 that provides the log stored in the log storage unit 17 to the terminal device 30.

[0024] The memory 11 is mainly realized by the main storage unit 42. The program execution unit 12 is mainly realized by the processor 41 of the PLC 10. The program execution unit 12 executes a control program P2 written to the PLC 10 by the terminal device 30. The control program P2 corresponds to the program P1 of the PLC 10, and is written in, for example, a ladder language or C language. The program execution unit 12 executes the control program P2, thereby reading and writing device values ​​from and to the memory 11, and as a result, the controlled device 20 is controlled. The program execution unit 12 corresponds to an example of a program execution means that executes a control program for controlling the device.

[0025] The value log collection unit 13 is mainly executed by the processor 41 of the PLC 10. The value log collection unit 13 collects device values ​​to be collected that are set by the setting unit 31 of the terminal device 30, in accordance with collection parameters set by the setting unit 31. The device values ​​to be collected may be all device values ​​used in the control program P2, values ​​selected by the user U1 from the device values ​​used in the control program P2, or values ​​arbitrarily set regardless of whether they are used in the control program P2.

[0026] The collection parameters include a cycle for collecting device values ​​and a period for collecting the device values. The cycle is, for example, 100 microseconds, 100 milliseconds, 1 second, or 1 minute. The start point of the period is, for example, when the PLC 10 is turned on, when the power is reset, when a collection start command is received from the terminal device 30, when a designated start trigger occurs, or when a designated start condition is satisfied. The end point of the period is, for example, when a specific end operation is performed in the PLC 10, when a collection end command is received from the terminal device 30, when a length of time set as the collection parameters has elapsed, when a designated end trigger occurs, or when a designated end condition is satisfied.

[0027] The value log collection unit 13 acquires time information from the time information acquisition unit 18 every time the device value is read. The time information may be, for example, a time stamp that directly indicates the time, or a count value that increases or decreases with the passage of time, such as the value of a scan counter. The scan counter is a measurement unit that measures the number of times that the program execution unit 12 repeats a scan that corresponds to one execution of the control process defined in the control program P2, and is realized by the processor 41.

[0028] The value log collection unit 13 writes the device value read from the memory 11 as a log of the device value in the log storage unit 17 in association with time information corresponding to the time of reading. FIG. 4 shows an example of a log accumulated in the log storage unit 17 by the value log collection unit 13. As shown in FIG. 4, a list of logs corresponding to row data that associates the address of the memory 11 where the device value is stored, the device value, and the time when the device value was collected is created. This list shows the transition of the collected device value. The value log collection unit 13 corresponds to an example of a value log collection means that collects a log of values ​​stored in the memory when a control program is executed.

[0029] The event log collection unit 14 is mainly executed by the processor 41 of the PLC 10. Events detected and collected by the event log collection unit 14 are events to which a predetermined event code is assigned, and include operations on device values. The operations on device values ​​include reading and writing of device values ​​that occurs due to execution of the control program P2, and reading and writing of device values ​​in the memory 11 that is performed by a device external to the PLC 10 regardless of whether the control program P2 is being executed. The external device may be the controlled device 20 or the terminal device 30, or may be another device.

[0030] Furthermore, the events detected and collected by the event log collection unit 14 may include operations on files stored in a storage device other than the memory 11 of the PLC 10, in addition to operations on device values. This storage device may be realized by the auxiliary storage unit 43 of the PLC 10, or may be a removable recording medium such as a memory card. Furthermore, the events detected and collected by the event log collection unit 14 may include events other than operations on device values ​​and files. For example, the events may include power ON or OFF of the PLC 10, and initialization of the memory 11. However, it is preferable that the events are events that may affect the control processing of the PLC 10, or events that occur as a result of the control processing of the PLC 10.

[0031] Then, every time the event log collecting unit 14 detects the occurrence of an event, it acquires time information from the time information acquiring unit 18, associates the time information with information indicating the detected event, and writes the time information as a log of the event in the log storage unit 17. FIG. 5 shows an example of a log accumulated in the log storage unit 17 by the event log collecting unit 14. As shown in FIG. 5, a list of logs corresponding to row data in which the date and time of the event occurrence, the event state predetermined according to the importance of the event, the event code of the event, the contents of the event, and the event occurrence source unit are associated with each other are created. The event occurrence source unit represents a unit in which an event occurs in the building block type PLC 10 configured by combining multiple units. The event log collecting unit 14 corresponds to an example of an event log collecting means that collects a log of an event that is a predetermined event including an operation on a memory value and occurs inside the programmable controller.

[0032] The communication log collection unit 15 is mainly executed by the processor 41 of the PLC 10. The communication log collection unit 15 collects communication data transmitted to or received by the communication unit 16 from the communication unit 16. The external device communicating with the communication unit 16 may be the controlled device 20 or the terminal device 30, or may be another device. The communication between the communication unit 16 and the external device may be communication via a network such as a field network and the Internet as exemplified in FIG. 1, or may be communication via a dedicated line. The communication unit 16 may perform socket communication with the controlled device 20. The communication log collection unit 15 may collect communication data transmitted through a plurality of communication paths.

[0033] If the communication log collection unit 15 collects all communication data, the size of the collected data will be excessively large, so the communication log collection unit 15 narrows down the communication data to be collected to the communication data set by the setting unit 31 of the terminal device 30. For example, the communication log collection unit 15 collects communication data including operation commands for device values ​​used in the control program P2.

[0034] An operation command for a device value is a command for reading or writing the device value. Fig. 6 shows a schematic configuration of request data for requesting the PLC 10 to execute a command, as an example of communication data including an operation command for a device value.

[0035] As shown in Fig. 6, the request data includes a command number, a subcommand, and data content. The command number is a number assigned to the command in advance, and the correspondence between the command and the command number is shared in advance between the communicating devices. The command may be an operation command for a device value, or may be another command. The subcommand is a parameter used auxiliary to the command, and may be omitted. Also, instead of the subcommand, a subcommand number assigned to the subcommand in advance in the same way as the command may be used.

[0036] The data content stores information indicating the target of the command. If the command is an operation command, the data content stores information indicating the operation target. For example, request data for reading a device value at an address "A10" includes a command number "1000" corresponding to reading the device value, and the data content "A10" for specifying the address.

[0037] The communication log collection unit 15 receives notification of information related to device values ​​referenced when executing the control program P2 from the program execution unit 12. The information related to the device values ​​includes the addresses of the device values. For example, when an address "A10" is specified in the source code of the control program P2, and a device value of "A10" is used in the control program P2, requested data having "A10" specified in the data content becomes a target for collection by the communication log collection unit 15. On the other hand, when a device value of "A10" is not used in the control program P2, requested data having "A10" specified in the data content is excluded from the target for collection by the communication log collection unit 15.

[0038] When a device value used in the control program P2 is changed, the communication log collection unit 15 collects communication data including operation commands for the changed device value, and excludes communication data including operation commands for the device value before the change from the communication log collection unit 15. For example, when a device value used in the control program P2 is changed from "A10" to "A20", the communication log collection unit 15 receives a notification of the change from the program execution unit 12, stops collecting logs of communication data including operation commands for the device value of "A10", and starts collecting logs of communication data including operation commands for the device value of "A20".

[0039] Furthermore, the communication log collection unit 15 may collect response data to the request data, in addition to the request data shown in Fig. 6. Response data configurations are typically illustrated in Figs. 7 and 8. The response data in the absence of an error shown in Fig. 7 has data content. If this response data is a response to request data requesting the reading of a device value of the PLC 10, the data content indicates the requested device value.

[0040] 8, the response data when an error occurs includes an error code, a command number, a subcommand, and data content. The error code is a code for identifying the content of the error. The command number and subcommand are the same information as the command number and subcommand included in the request data. The data content stores information related to the target of the command.

[0041] Although an example of device values ​​used in the control program P2 has been described with respect to the objects to be collected by the communication log collection unit 15, communication data including operation commands for device values ​​used as parameters of the control program P2 may also be collected. The device values ​​used as parameters of the control program P2 are values ​​that are not directly described in the source code of the control program P2 but that affect the processing content of the processor 41 that executes the control program P2, and values ​​that are indirectly referenced based on the description of the source code.

[0042] Although an example of device values ​​has been described as a collection target by the communication log collection unit 15, communication data related to files may be collected instead of device values. In particular, communication data including files used in the control program P2 and operation commands for files used as parameters of the control program P2 may be collected. These files are data stored in a storage device different from the memory 11. The storage device may be realized by the auxiliary storage unit 43 of the PLC 10, or may be a removable recording medium such as a memory card. The communication log collection unit 15 may receive a notification of information related to files referenced when executing the control program P2 from the program execution unit 12.

[0043] The communication log collection unit 15 corresponds to an example of a communication log collection means that collects a log of communication data including values ​​used in a control program or as parameters of the control program, or operation commands for files stored in a storage device other than the memory.

[0044] Although an example in which specific data such as device values ​​and files are specified as a method for narrowing down the collection targets by the communication log collection unit 15 has been described, other narrowing down methods may be adopted. For example, the communication log collection unit 15 may receive a notification of a protocol related to the control program P2 from the program execution unit 12 and collect communication data transmitted according to the protocol. The protocol related to the control program P2 includes a protocol used in the control program P2 and a communication protocol related to parameters of the control program P2.

[0045] The protocol used in the control program P2 is a standard of communication that occurs when the control program P2 is executed, for example, a standard of communication processing when a communication process conforming to a standard such as FTP (File Transfer Protocol) and SNTP (Simple Network Time Protocol) is described in the source code of the control program P2. Also, the protocol of communication related to the parameters of the control program P2 is a standard of communication that occurs when the control program P2 is executed, even though a command for executing the communication process is not directly described in the source code of the control program P2. Specifically, it corresponds to the standard of communication when the program execution unit 12 acquires, by communication, parameters required for determining the processing content when executing the control program P2.

[0046] When the protocol related to the control program P2 is changed, the communication log collection unit 15 collects communication data transmitted according to the changed protocol and excludes communication data transmitted according to the protocol before the change from the communication data to be collected. The communication log collection unit 15 corresponds to an example of a communication log collection means that collects a log of communication data that conforms to a protocol used in the control program or a protocol of communication related to the parameters of the control program.

[0047] In addition, the narrowing down method of specifying specific data and the narrowing down method of specifying a protocol may be arbitrarily combined for collecting communication data. For example, both communication data including operation commands for device values ​​used in the control program P2 and communication data following a protocol for communication related to parameters of the control program P2 may be collected.

[0048] Then, every time the communication log collection unit 15 acquires communication data, it acquires time information from the time information acquisition unit 18, associates the time information with the communication data, and writes it as a log of the communication data in the log storage unit 17. Fig. 9 shows an example of a log accumulated in the log storage unit 17 by the communication log collection unit 15. As shown in Fig. 9, a list of logs corresponding to row data is created, in which Time, which is the time when the communication data was transmitted or received, Source, which indicates the source of the communication data, Destination, which indicates the destination of the communication data, Protocol that the communication data follows, Info, which is the content of the communication data, and Length, which is the length of the communication data, are associated with each other.

[0049] If the communication data includes an operation command for a device value, an event in which the device value is operated by the operation command is detected by the event log collection unit 14. That is, for operation commands from external devices, logs are collected by both the communication log collection unit 15 and the event log collection unit 14. However, the logs collected by the communication log collection unit 15 are in the form of communication data, whereas the logs collected by the event log collection unit 14 are in a form to which an event code is added, which is a difference. In this way, by recording logs of events inside and outside the PLC 10 in different formats, the user U1 can verify these events in detail.

[0050] In addition, the device value log shown in FIG. 4, the event log shown in FIG. 5, and the communication data log shown in FIG. 9 use different formats for the time information, but it is sufficient if the time information can be converted into any one of the common formats.

[0051] Returning to Fig. 3, the communication unit 16 is mainly executed by the communication unit 46 of the PLC 10. Communication parameters are set in the communication unit 16 by the setting unit 31 of the terminal device 30, and the communication unit 16 communicates with an external device according to the set communication parameters. The communication parameters include, for example, an Internet Protocol (IP) address of the PLC 10 itself and an address of the external device. The communication unit 16 corresponds to an example of a communication means for communicating with at least one of the device and a device different from the device via a network.

[0052] The log storage unit 17 is mainly executed by the auxiliary storage unit 43 of the PLC 10. The time information acquisition unit 18 is mainly executed by the processor 41 of the PLC 10. The time information acquisition unit 18 may acquire the time measured inside the PLC 10, or may acquire information related to the time from an external device such as a time server. The time information acquisition unit 18 corresponds to an example of a time information acquisition means for acquiring time information related to the time. The providing unit 19 is mainly executed by the processor 41 of the PLC 10. The providing unit 19 reads out a log from the terminal device 30 in response to a request from the terminal device 30 and provides the log to the terminal device 30. The providing unit 19 corresponds to an example of a providing means for providing a device value log, an event log, and a communication data log in association with time information related to the time when each log was collected.

[0053] The terminal device 30 is, for example, an industrial PC (Personal Computer) or a tablet terminal. As shown in Fig. 3, the terminal device 30 includes a setting unit 31 that sets various parameters related to the recording of logs in the PLC 10, a receiving unit 32 that receives various logs from the PLC 10, a storage unit 33 that stores a large number of received logs, a display unit 34 that displays a list of logs, a reception unit 35 that receives a designation of any log from a user U1, and a search unit 36 ​​that searches for other types of logs corresponding to the designated log. The setting unit 31, the receiving unit 32, the storage unit 33, the display unit 34, the reception unit 35, and the search unit 36 ​​correspond to some functions of an engineering tool that is a software application for the user U1 to create and edit the control program P2 and write it to the PLC 10.

[0054] The setting unit 31 is mainly realized by the processor 41 of the terminal device 30. The setting unit 31 sets, in the PLC 10, parameters related to the collection of device value logs by the value log collection unit 13, parameters related to the collection of event logs by the event log collection unit 14, parameters related to narrowing down the collection targets by the communication log collection unit 15, and communication parameters of the communication unit 16, in accordance with instructions from the user U1.

[0055] The receiving unit 32 is mainly realized by the communication unit 46 of the terminal device 30. The receiving unit 32 corresponds to an example of a receiving means that receives each of the device value log, event log, and communication data log provided by the PLC 10 in association with time information regarding the time when each log was collected by the PLC 10.

[0056] The storage unit 33 is mainly realized by the auxiliary storage unit 43 of the terminal device 30. Various logs received by the receiving unit 32 are stored in the storage unit 33. As shown in Fig. 10, the storage unit 33 also stores an error code that may be included in the communication data, the content of the error code, and a method of dealing with the error code in association with each other. The storage unit 33 corresponds to an example of a storage means that stores an error code in association with the content of the error corresponding to the error code.

[0057] The display unit 34 is realized mainly by the cooperation of the processor 41 and the output unit 45 of the terminal device 30. The display unit 34 displays a list of each log stored in the memory unit 33 according to the operation of the user U1. FIG. 11 shows an example of a screen displayed by the display unit 34. This screen includes a list of event logs as shown in FIG. 5 and a list of communication data logs as shown in FIG. 9. This screen also displays the control program P2 and device values ​​used in the control program P2 that are recorded at a certain timing. FIG. 11 shows that the device value of the address "D0" is -32 and the device value of the address "D1" is 24. The display unit 34 may display the first value of the logged device values ​​on the screen as an initial value.

[0058] Furthermore, the display unit 34 may display a table as shown in Fig. 12 as a log list of communication data instead of the table as shown in Fig. 9. This table is a list of row data that associates No., which is the number of row data, Time, which is the time when the communication data to which the number is assigned was collected, Source and Destination of the communication data, Operation Command Type, which is the type of operation command included in the communication data, Operation Target, which is the target of the operation command, Error Code, which is the error code included in the communication data, and Error Summary, which is the content of the error.

[0059] The table shown in Fig. 12 is created by processing the log of the communication data itself as shown in Fig. 9. In detail, among the items shown in Fig. 12, the type of operation command and the target of the operation command can be obtained by analyzing Info in Fig. 9. Also, the error code and the content of the error can be obtained by referring to information related to the error as shown in Fig. 10. Display unit 34 displays the device value log, the event log, and the communication data log, and corresponds to an example of a display means that displays the content of the error corresponding to the error code when an error code is included in the communication data log.

[0060] Returning to FIG. 3, the reception unit 35 is mainly realized by the input unit 44 of the terminal device 30. Moreover, the search unit 36 ​​is mainly realized by the processor 41 of the terminal device 30. For example, as shown in FIG. 13, the reception unit 35 receives a selection by the user U1 of any log from the list of communication data logs. In FIG. 13, the selected log is highlighted with a frame. Moreover, the selected log includes an error code of "0100". This error code is a code included in the response data when an error occurs in which the target file does not exist in the PLC 10 during file opening and the opening fails.

[0061] Then, the search unit 36 ​​searches the storage unit 33 for a solution to the error corresponding to the selected log, and the display unit 34 displays the search result in a pop-up as shown in Fig. 14. In the example of Fig. 14, the error solution corresponding to the error code "0100" is displayed as shown in Fig. 10.

[0062] Furthermore, when any log is selected from the list of communication data logs as indicated by the cursor in Fig. 15, the search unit 36 ​​searches the storage unit 33 for an event log and a device value log corresponding to the communication data log based on the time information. In detail, the search unit 36 ​​identifies the time indicated by the time information attached to the selected communication data log, and searches for an event log and a device value log attached with time information that is the same as the identified time or has the smallest difference from the identified time. Then, the display unit 34 displays the event log found by the search by the search unit 36 ​​in an emphasized manner as shown in Fig. 15. Since both the selected communication data log and the event log recorded at the same time as the selected log are emphasized, these logs are displayed in association with each other.

[0063] Furthermore, the display unit 34 changes the log of the device value displayed on the screen to the device value that is the search result by the search unit 36. In the example of FIG. 15, it is shown that the device value of the address "D0" is -30. The selected log of the communication data and the log of the device value recorded at the same time as the selected log are displayed on the screen, so that these logs are displayed in association with each other. The display unit 34 corresponds to an example of a display means that identifies the log of the device value corresponding to the log that is the object of selection based on time information, and displays the first log that is the object of selection, the second log that is the search result by the search means, and the identified log of the device value in association with each other.

[0064] Furthermore, the accepting unit 35 accepts the selection by the user U1 of any log from the list of event logs, as indicated by the cursor in Fig. 16. Then, the searching unit 36 ​​searches the storage unit 33 for a communication data log and a device value log corresponding to the selected event log, based on the time information. The communication data log that is the search result is displayed in an emphasized manner, and the device value log that is the search result is displayed together with the name of the device value in the control program P2.

[0065] That is, the reception unit 35 receives a selection of one of the communication data log and the event log, and the search unit 36 ​​searches for the other log and the device value log corresponding to the selected log. The reception unit 35 corresponds to an example of a reception means for receiving a selection of one of the logs from a list of first logs, which are event logs or communication data logs. The search unit 36 ​​corresponds to an example of a search means for searching a list of second logs, which are different from the first log among the event logs and the communication data logs, for a log corresponding to the first log selected based on time information. The display unit 34 corresponds to an example of a display means for displaying the first log selected in association with the second log, which is a search result by the search means.

[0066] Next, a flow of providing information to the user U1 executed by the PLC 10 and the terminal device 30 having the above-mentioned functions will be described with reference to Fig. 17. As shown in Fig. 17, the terminal device 30 writes the control program P2 created by the user U1 to the PLC 10 (step S1), and sets various parameters related to log collection in the PLC 10 (step S2). The PLC 10 executes the control program P2 to control the controlled device 20 (step S3), and while executing the control program P2, collects device value logs, event logs, and communication data logs in association with time information (step S4).

[0067] Then, the PLC 10 provides the collected logs to the terminal device 30 in response to a request from the terminal device 30 (step S5), and the terminal device 30 displays a list of the received logs to the user U1 as shown in FIG. 11 (step S6). When any of the logs is selected by the user U1 as shown in FIGS. 13, 15, and 16, the terminal device 30 changes the display content as shown in FIGS. 14, 15, and 16 to clearly show the correspondence between the three types of logs (step S7). This allows the user U1 to easily recognize the relationship between the three types of logs and efficiently perform verification work such as determining the cause of an error. The information provision flow shown in FIG. 17 corresponds to an example of an information provision method.

[0068] As described above, the PLC 10 provides three types of logs in association with time information, thereby making it possible to reduce the time required for maintenance work using the logs of the PLC 10.

[0069] Furthermore, the communication log collection unit 15 collects communication data including operation commands for device values ​​or files related to the control program P2. In other words, when the device values ​​and files related to the control program P2 are changed, the communication log collection unit 15 changes the collection target to communication data including operation commands for the changed device values ​​and files. This allows the user U1 to narrow down the collection target to necessary communication data without being aware of changes in collection parameters.

[0070] The communication log collection unit 15 may also collect communication data transmitted according to a protocol related to the control program P2. In other words, when the protocol related to the control program P2 is changed, the communication log collection unit 15 changes the collection target to communication data transmitted according to the changed protocol. This allows the user U1 to narrow down the collection target to the necessary communication data and collect it without being aware of the change in the collection parameters.

[0071] The display unit 34 also displays the error content based on the error code included in the communication data, and also displays how to deal with the error. This makes it possible to easily find potential abnormalities related to communication errors that are difficult to find by observing the device value log and the event log. Furthermore, the user U1 can correct the error according to the countermeasures, which reduces the effort required for the user U1 to analyze the error.

[0072] Embodiment 2 Next, the second embodiment will be described, focusing on the differences from the first embodiment. The same or equivalent components as those in the first embodiment will be denoted by the same reference numerals. In the first embodiment, the search unit 36 ​​searches for a log with the same time as the selected log or a log with the smallest time difference. However, due to factors such as the time required for processing by the processor 41 of the PLC 10 and communication delays, the selected log and the log to be searched may have time information with different times. Below, an example of searching for a log with time information with a different time from the selected log will be described.

[0073] In Fig. 18, a list of communication data logs and a list of event logs are shown with the same time information connected by a dashed line. As can be seen from Fig. 18, in the above-mentioned first embodiment, when communication log 2 of communication logs 1 to 8 is selected, the search unit 36 ​​extracts event log 2, which has the same time information, from event logs 1 to 8 as a search result.

[0074] In contrast, the search unit 36 ​​according to the present embodiment searches for logs based on the contents of the communication log and the event log. For example, as shown in Fig. 18, when the communication log 2 is communication data including an operation command for the device value A10, the search unit 36 ​​identifies the event log 6 that records the operation event for this device value A10 as the search result.

[0075] In this way, the search unit 36 ​​searches for logs that match both the type of operation on the memory 11 and the address of the device value or file that is the target of the operation. The type of operation includes, for example, reading and writing of device values, and reading and writing of files. Therefore, the search unit 36 ​​determines that the communication log including the read operation on the device value A10 and the event log including the read operation on the device value A10 are related in content. However, the communication log including the read operation on the device value A10 and the event log including the write operation on the device value A10 are determined to be unrelated in content. Also, the communication log including the read operation on the device value A10 and the event log including the read operation on the device value A20 are determined to be unrelated in content.

[0076] However, even if there is a time difference between a communication data log and a corresponding event log, this time difference is usually short to some extent. Therefore, the search unit 36 ​​identifies one of the logs with time information whose time difference from the log selected by the user U1 is equal to or less than a predetermined threshold based on the contents of the log.

[0077] The search unit 36 ​​corresponds to an example of a search means for searching for a second log associated with time information whose difference from the time information associated with the first log selected is less than a threshold value, and which has content related to the content of the first log.

[0078] As described above, the search unit 36 ​​searches for logs whose contents are related to each other while allowing a certain degree of time lag. Therefore, an appropriate log corresponding to the log selected by the user U1 is searched for and displayed. This allows the user U1 to carry out maintenance work more efficiently.

[0079] Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments.

[0080] For example, the search unit 36 ​​searches for one corresponding log for a log selected by the user U1, but is not limited to this, and the search unit 36 ​​may specify a plurality of logs as a search result.

[0081] Also, although an example has been described in which the accumulated log data is stored in both the log storage unit 17 of the PLC 10 and the storage unit 33 of the terminal device 30, the log may be stored in only one of them. When the log storage unit 17 of the PLC 10 is omitted, the providing unit 19 sequentially transmits the logs generated in the PLC 10 to the terminal device 30, and the logs are accumulated in the storage unit 33. When the storage unit 33 of the terminal device 30 is omitted, the terminal device 30 receives the logs from the providing unit 19 by searching for logs from the log storage unit 17 of the PLC 10 as necessary.

[0082] The functions of the PLC 10 and the terminal device 30 according to the above-described embodiment can be realized by dedicated hardware or by a general computer system.

[0083] For example, the program P1 can be stored and distributed on a computer-readable recording medium such as a flexible disk, a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), or an MO (Magneto-Optical disk), and the program P1 can be installed on a computer to configure an apparatus that executes the above-mentioned processing.

[0084] Also, the program P1 may be stored in a disk device of a server device on a communication network such as the Internet, and may be downloaded to a computer, for example, by being superimposed on a carrier wave.

[0085] The above-mentioned processing can also be achieved by starting and executing the program P1 while transferring it via a network such as the Internet.

[0086] Furthermore, the above-mentioned processing can also be achieved by executing all or part of the program P1 on a server device, and executing the program P1 while the computer transmits and receives information related to the processing via a communications network.

[0087] In addition, when the above-mentioned functions are shared and realized by the OS (Operating System) or by the OS working together with an application, only the parts other than the OS may be stored on a medium and distributed, or may be downloaded to a computer.

[0088] Furthermore, the means for realizing the functions of the PLC 10 and the terminal device 30 are not limited to software, and some or all of them may be realized by dedicated hardware or circuits.

[0089] Various embodiments and modifications of the present disclosure are possible without departing from the broad spirit and scope of the present disclosure. The above-described embodiments are for explaining the present disclosure and do not limit the scope of the present disclosure. In other words, the scope of the present disclosure is indicated by the claims, not the embodiments. Various modifications made within the scope of the claims and within the scope of the disclosure equivalent thereto are considered to be within the scope of the present disclosure. [Industrial Applicability]

[0090] The present disclosure is suitable for maintenance work in FA systems. [Explanation of symbols]

[0091] 10 PLC, 11, 21 memory, 12 program execution unit, 13 value log collection unit, 14 event log collection unit, 15 communication log collection unit, 16 communication unit, 17 log storage unit, 18 time information acquisition unit, 19 provision unit, 20 controlled device, 30 terminal device, 31 setting unit, 32 receiving unit, 33 storage unit, 34 display unit, 35 reception unit, 36 search unit, 40 FA device, 41 processor, 42 main memory unit, 43 auxiliary memory unit, 44 input unit, 45 output unit, 46 communication unit, 47 internal bus, 51 to 53 log, 100 information provision system, 111, 211 device value, P1 program, P2 control program, U1 user.

Claims

1. A programmable controller for controlling a device, a program execution means for executing a control program for controlling the device; a memory shared with the device; a value log collection means for collecting a log of values ​​stored in the memory when the control program is executed; an event log collection means for collecting a log of predetermined events that occur within the programmable controller, the events including operations on the values ​​in the memory; A communication means for communicating with at least one of the device and a device different from the device via a network; a communication log collection means for collecting a log of communication data transmitted or received by the communication means; A time information acquisition means for acquiring time information relating to time; providing means for providing the value log, the event log, and the communication data log in association with the time information regarding the time when each log was collected; A programmable controller comprising:

2. the communication log collection means collects a log of the communication data including the values ​​used in the control program or as parameters of the control program, or operation commands for files stored in a storage device different from the memory; 2. The programmable controller of claim 1.

3. the communication log collection means collects a log of the communication data that complies with a protocol used in the control program or a protocol of communication related to a parameter of the control program; 2. The programmable controller of claim 1.

4. A terminal device that receives the log of the value, the log of the event, and the log of the communication data provided from the programmable controller according to any one of claims 1 to 3 in association with the time information, A storage means for storing an error code and the content of an error corresponding to the error code in association with each other; a display means for displaying the value log, the event log, and the communication data log, and, when the communication data log contains an error code, displaying the content of the error corresponding to the error code; A terminal device comprising:

5. a receiving means for receiving a selection of any one of the logs from a first log list which is the event log or the communication data log; a search means for searching a list of second logs, which are different from the first log, among the event logs and the communication data logs, for a log corresponding to the first log selected based on the time information; Equipped with the display means displays the first log selected and the second log that is a search result by the search means in association with each other. The terminal device according to claim 4.

6. the search means searches for the second log associated with time information whose difference from the time of the time information associated with the first log selected is less than a threshold value, the second log having content related to the content of the first log; The terminal device according to claim 5.

7. The display means includes: a log of the value corresponding to the log to be selected based on the time information, and the first log to be selected, the second log which is a search result by the search means, and the identified log of the value are displayed in association with each other. The terminal device according to claim 5.

8. An information providing method executed by a programmable controller that controls a device, comprising: a program execution means for executing a control program for controlling the device; a value log collecting means for collecting a log of values ​​stored in a memory shared by the programmable controller and the device when the control program is executed; an event log collection means for collecting a log of predetermined events that occur within the programmable controller, the events including operations on the values ​​of the memory; A communication means communicates with at least one of the device and a device different from the device via a network; A communication log collection means collects a log of communication data transmitted or received by the communication means, A time information acquisition means acquires time information relating to time, the providing means provides the value log, the event log, and the communication data log in association with the time information regarding the time when each log was collected. Methods of providing information, including:

9. A computer connected to a programmable controller, a receiving means for receiving, from the programmable controller, a log of values ​​stored in a memory shared by the programmable controller with a device that is the control target of the programmable controller, a log of events that have occurred inside the programmable controller, and a log of communication data that the programmable controller has transmitted or received via a network, in association with time information regarding the time at which the logs were collected by the programmable controller; A storage means for storing an error code and the content of an error corresponding to the error code in association with each other; a display means for displaying the value log, the event log, and the communication data log, and, when the communication data log contains an error code, displaying the content of the error corresponding to the error code; A program to function as a