Programmable controller, terminal device, information providing method, and program
The programmable controller's advanced log collection and management system addresses the time-consuming nature of existing PLC log analysis, enabling faster error identification and maintenance by providing comprehensive and timely logs.
Patent Information
- Application Number
- PCT/JP2023/044180
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-06-19
AI Technical Summary
Existing PLC log analysis techniques are time-consuming, making it difficult to identify the cause of errors, such as failed data writes, which prolong maintenance work.
A programmable controller with integrated log collection and management capabilities, including value logs, event logs, and communication logs, provided in association with time information, to facilitate efficient error analysis and maintenance.
This solution significantly reduces the time required for maintenance work by providing comprehensive and timely logs, enabling quicker identification and resolution of errors.
Smart Images

Figure JP2023044180_19062025_PF_FP_ABST
Abstract
Description
Programmable controller, terminal device, information providing method and program
[0001] The present disclosure relates to a programmable controller, a terminal device, an information providing method, and a program.
[0002] In many cases, factory automation (FA) systems operate by a programmable logic controller (PLC) executing user programs created by users to control various devices. With the recent development of information and communication technologies, such as the Internet of Things (IoT) technology and cloud systems, PLCs are increasingly being connected to external devices and communicating data. When a PLC controls various devices, the external devices can sometimes cause the user program to operate in an unintended manner.
[0003] In order to facilitate the investigation of the cause of such unexpected behavior of a user program, it is conceivable to apply a log recording technique (see, for example, Patent Document 1). Patent Document 1 describes a technique for supporting error analysis by recording PLC communication log data and status log data including PLC errors.
[0004] Japanese Patent Application Laid-Open No. 2019-197461
[0005] However, with the technology of Patent Document 1, it can take a long time to determine the cause of an error. For example, an error may occur in the PLC when a command to write control data is sent to the PLC via communication but the data is not actually written. In this case, even if an operator confirms the occurrence of the error from the status log data and finds the write command from the communication log data, it is difficult to identify the cause as the failure to write. Therefore, maintenance work using the PLC log may take a long time.
[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.
[0007] In order to achieve the above-mentioned object, the data management device of the present disclosure 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 logs of values stored in the memory when the control program is executed; an event log collection means that collects logs of predetermined events that occur within the programmable controller and include 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 logs of communication data sent or received by the communication means; a time information acquisition means that acquires time information related to 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.
[0008] According to the present disclosure, the time required for maintenance work using PLC logs can be reduced.
[0009] FIG. 1 is a diagram showing the configuration of an information providing system according to the first embodiment. FIG. 2 is a diagram showing the functional configuration of a PLC and a terminal device according to the first embodiment. FIG. 3 is a diagram showing an example of a list of value logs according to the first embodiment. FIG. 4 is a diagram showing an example of a list of event logs according to the first embodiment. FIG. 5 is a diagram showing the configuration of request data according to the first embodiment. FIG. 6 is a diagram showing the first diagram showing the configuration of response data according to the first embodiment. FIG. 7 is a diagram showing an example of a list of communication data logs according to the first embodiment. FIG. 8 is a diagram showing an example of information on an error code according to the first embodiment. FIG. 9 is a diagram showing an example of a screen displayed by a display unit according to the first embodiment. FIG. 10 is a diagram showing a list of communication data logs displayed by a display unit according to the first embodiment. FIG. 11 is a diagram showing an example in which a log is selected by a user from the list of communication data according to the first embodiment. FIG. 12 is a diagram showing an example in which a way to deal with an error according to the first embodiment.
[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. An information providing system 100 according to this embodiment corresponds to a part of a production system, a machining system, an inspection system, or other processing system established 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 also be work performed as part of quality control for managing the quality of an object processed under the control of the PLC 10, or process control for improving the efficiency of control by the PLC 10, or 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 is an example of a programmable controller that controls devices. The PLC 10 controls the controlled device 20 to perform various processes, such as operating 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, and therefore the memory 11 is shared by the PLC 10 and the controlled device 20.
[0014] Although FIG. 1 representatively shows one controlled device 20, 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, allowing the PLC 10 to execute various control processes. For example, a device value 211 indicating the 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 in the memory 11, thereby allowing the PLC 10 to obtain the sensing result. Then, based on the sensing result, the PLC 10 stores a device value 111 in the memory 11 indicating an operation command for the controlled device 20, which is a robot. The device value 111 is synchronized with the device value 211 of the robot, causing the robot to operate in accordance with 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, because control processes for various controlled devices 20 are executed via the device values 111 of the PLC 10, if the history of the device values 111 is recorded as a log 51, the details of the control processes can be verified after the fact. Furthermore, while the log 51 reveals the transition of the device value 111, 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 this to the user U1 as a log 52. Furthermore, while the log 52 reveals the transition of events occurring within the PLC 10, events occurring outside the PLC 10 are not necessarily clear to the user U1. Therefore, the PLC 10 provides the user U1 with a communication history as a log 53.
[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 includes 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 central processing unit (CPU) or a micro processing unit (MPU) as a processing circuit. The processor 41 executes a program P1 stored in the auxiliary storage unit 43 to realize various functions and perform the 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 42 includes a RAM (Random Access Memory). The program P1 is loaded into the main memory 42 from the auxiliary memory 43. The main memory 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 processor 41 with data used by the processor 41 in accordance with instructions 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 apparatus 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 apparatus 40 may have multiple 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 with the terminal device 30 via, for example, a USB (Universal Serial Bus) cable.
[0023] 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 events that occur inside the PLC 10 and collects event logs, a communication log collection unit 15 that collects logs of communications by the communication unit 16, the communication unit 16 that communicates with external devices, a log storage unit 17 that accumulates and stores the logs 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, and a provision unit 19 that provides the logs 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, ladder logic or C language. When the program execution unit 12 executes the control program P2, device values in the memory 11 are read and written, thereby controlling the controlled device 20. The program execution unit 12 corresponds to an example of a program execution means that executes a control program for controlling a 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 that are 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 collection period. The cycle is, for example, 100 microseconds, 100 milliseconds, 1 second, or 1 minute. The period starts, for example, when the PLC 10 is powered on, when the power is reset, when a collection start command is received from the terminal device 30, when a specified start trigger occurs, or when a specified start condition is met. The period ends, for example, when a specific end operation is performed on 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 specified end trigger occurs, or when a specified end condition is met.
[0027] The value log collection unit 13 acquires time information from the time information acquisition unit 18 each time it reads a device value. The time information may be, for example, a timestamp that directly indicates the time, or a count value that increases or decreases over time, such as the value of a scan counter. The scan counter is a measurement unit that measures the number of times the program execution unit 12 has repeated a scan, which 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 associates device values read from the memory 11 with time information corresponding to the time at which the values were read, and writes the device value logs in the log storage unit 17. 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 is created, which associates the address in the memory 11 where the device value is stored, the device value, and the time at which the device value was collected. This list shows the transition of the collected device values. The value log collection unit 13 corresponds to an example of a value log collection means that collects logs of values stored in 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 predetermined event codes are assigned, and include operations on device values. The operations on device values include reading and writing of device values that occur as a result of execution of the control program P2, as well as reading and writing of device values in the memory 11 that are 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, events detected and collected by the event log collection unit 14 may include, in addition to operations on device values, operations on files stored in a storage device other than the memory 11 of the PLC 10. 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, events detected and collected by the event log collection unit 14 may include events other than operations on device values and files. For example, they may include powering on or off the PLC 10 and initialization of the memory 11. However, it is desirable that the events be 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] Each time the event log collection unit 14 detects an event, it acquires time information from the time information acquisition unit 18, associates the time information with information indicating the detected event, and writes the associated information as an event log in the log storage unit 17. FIG. 5 illustrates an example of a log stored in the log storage unit 17 by the event log collection unit 14. As illustrated in FIG. 5 , a log list is created, which corresponds to row data that associates the date and time of the event occurrence, a predetermined event state determined based on the importance of the event, the event code of the event, the content of the event, and the unit that generated the event. The generating unit represents the unit where the event occurred in the building-block PLC 10, which is configured by combining multiple units. The event log collection unit 14 corresponds to an example of an event log collection means that collects logs of events that occur within the programmable controller, which are predetermined events including operations on memory values.
[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, from the communication unit 16, communication data transmitted to or received by the communication unit 16 from an external device. 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. Furthermore, communication between the communication unit 16 and the external device may be communication via a network such as a field network or the Internet as illustrated in FIG. 1, or communication via a dedicated line. The communication unit 16 may perform socket communication with the controlled device 20. Furthermore, the communication log collection unit 15 may collect communication data transmitted via multiple communication paths.
[0033] If the communication log collection unit 15 were to collect all communication data, the size of the collected data would become 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 a 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 Figure 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. Alternatively, a subcommand number assigned to the subcommand in advance, similar to the command, may be used instead of the subcommand.
[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 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 from the program execution unit 12 of information related to device values referenced when executing the control program P2. The information related to the device values includes the addresses of the device values. For example, if an address "A10" is specified in the source code of the control program P2, and the device value "A10" is used in the control program P2, then requested data having "A10" specified in its data content will be collected by the communication log collection unit 15. On the other hand, if the device value "A10" is not used in the control program P2, requested data having "A10" specified in its data content will be excluded from the collection targets of 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 target. 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 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. Schematic examples of the structure of the response data are shown 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 about the target of the command.
[0041] Furthermore, although the device values used in the control program P2 have been described as examples of the data 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 are values that are indirectly referenced based on the description in the source code.
[0042] Although the example of device values has been described as the objects to be collected by the communication log collection unit 15, communication data related to files may be collected instead of device values. Specifically, communication data including files used in the control program P2 and operation commands for files used as parameters for 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 also receive 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 logs of communication data including values used in a control program or as parameters of a control program, or operation commands for files stored in a storage device other than memory.
[0044] Although the above description is given of 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, other narrowing down methods may be adopted. For example, the communication log collection unit 15 may receive notification of a protocol related to the control program P2 from the program execution unit 12 and collect communication data transmitted in accordance with that 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 the standard of communication that occurs when the control program P2 is executed, such as when communication processing conforming to standards such as FTP (File Transfer Protocol) and SNTP (Simple Network Time Protocol) is described in the source code of the control program P2. The communication protocol for the parameters of the control program P2 is the standard of communication that occurs when the control program P2 is executed, even though the source code of the control program P2 does not directly describe commands for executing the communication processing. Specifically, the protocol corresponds to the standard of communication that occurs when the program execution unit 12 acquires, via communication, parameters required to determine 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 in accordance with the changed protocol and excludes communication data transmitted in accordance with the protocol before the change from the communication targets 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 parameters of the control program.
[0047] In addition, when collecting communication data, the narrowing-down method in which specific data is specified and the narrowing-down method in which a protocol is specified may be combined in any manner. For example, both communication data including operation commands for device values used in the control program P2 and communication data that conforms to a communication protocol related to the 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 the time information 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 followed by the communication data, 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, the event log collection unit 14 detects an event that operates the device value by the operation command. That is, with regard to an operation command from an external device, 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, while the logs collected by the event log collection unit 14 are in a format with an event code attached. 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] Furthermore, the time information used in the device value log shown in FIG. 4, the event log shown in FIG. 5, and the communication data log shown in FIG. 9 is expressed in different formats, 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 implemented 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 external devices in accordance with 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 that communicates with at least one of a device and a device other than 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 kept within 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 that acquires 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 logs from the terminal device 30 in response to a request from the terminal device 30 and provides the logs to the terminal device 30. The providing unit 19 corresponds to an example of a providing means 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.
[0053] 3 , the terminal device 30 includes a setting unit 31 that sets various parameters related to log recording in the PLC 10, a receiving unit 32 that receives various logs from the PLC 10, a storage unit 33 that stores the received logs, a display unit 34 that displays a list of logs, an accepting unit 35 that accepts a designation of a 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 accepting unit 35, and the search unit 36 correspond to some functions of an engineering tool, which is a software application that allows 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. In accordance with instructions from the user U1, 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 the narrowing down of collection targets by the communication log collection unit 15, and communication parameters of the communication unit 16.
[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 the device value log, the event log, and the 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. The storage unit 33 stores various logs received by the receiving unit 32. 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 mainly realized by cooperation between 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 in accordance with 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 such as those shown in FIG. 5 and a list of communication data logs such as those shown in FIG. 9. This screen also displays the control program P2 and device values recorded at a certain timing and used in the control program P2. FIG. 11 shows that the device value at address "D0" is -32 and the device value at address "D1" is 24. The display unit 34 may display the first value of the logged device values on the screen as the initial value.
[0058] 12 as a communication data log list, instead of the table shown in FIG. 9. This table is a list of row data that associates a No. that is the number of the row data, a Time that is the time when the communication data to which the number is assigned was collected, a Source and a Destination of the communication data, an Operation Command Type that is the type of operation command included in the communication data, an Operation Target that is the target of the operation command, an Error Code that is the error code included in the communication data, and an Error Summary that 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 particular, of the items shown in Fig. 12, the type of operation command and the target of the operation command can be obtained by analyzing the Info in Fig. 9. Furthermore, the error code and the content of the error can be obtained by referring to information about the error as shown in Fig. 10. The display unit 34 corresponds to an example of a display means that displays the device value log, the event log, and the communication data log, and, if an error code is included in the communication data log, displays the content of the error corresponding to the error code.
[0060] Returning to FIG. 3 , the reception unit 35 is mainly realized by the input unit 44 of the terminal device 30. Furthermore, 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. Furthermore, the selected log includes an error code of "0100." This error code is included in the response data when an error occurs during file open, indicating that the target file does not exist in the PLC 10 and the open has failed.
[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 results 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 a 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 particular, 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 that has the smallest difference from the identified time. The display unit 34 then highlights and displays the event log found by the search by the search unit 36, as shown in Fig. 15 . Because both the selected communication data log and the event log recorded at the same time as the selected communication data log are highlighted, these logs are displayed in association with each other.
[0063] Furthermore, the display unit 34 changes the device value log displayed on the screen to the device value that is the search result of the search unit 36. The example in FIG. 15 shows that the device value of the address "D0" is -30. The selected log of communication data and the log of device values 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 device value log corresponding to the selected log based on time information, and displays the selected first log, the second log that is the search result of the search means, and the identified device value log in association with each other.
[0064] 16, the reception unit 35 receives a selection by the user U1 of one of the event logs. The search unit 36 then 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 in the control program P2 together with the name of the device value.
[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 that receives 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 that searches a list of second logs, which are different from the first log and are among the event logs and communication data logs, for a log corresponding to the selected first log based on time information. The display unit 34 corresponds to an example of a display means that displays the selected first log in association with the second log, which is a search result by the search means.
[0066] Next, a flow of information provision to user U1 executed by the PLC 10 and terminal device 30 having the above-described 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 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] The PLC 10 then 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 Figure 11 (step S6). Furthermore, when the user U1 selects one of the logs as shown in Figures 13, 15, or 16, the terminal device 30 changes the display content as shown in Figures 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 relationships between the three types of logs and efficiently perform verification tasks such as determining the cause of an error. The information provision flow shown in Figure 17 corresponds to an example of an information provision method.
[0068] As described above, the PLC 10 associates the three types of logs with time information and provides them. This makes 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 only the necessary communication data without being aware of changes to the collection parameters.
[0070] Furthermore, the communication log collection unit 15 may collect communication data transmitted in accordance with a protocol related to the control program P2. In other words, if the protocol related to the control program P2 is changed, the communication log collection unit 15 changes the collection target to communication data transmitted in accordance with the changed protocol. This allows the user U1 to narrow down the collection target to only necessary communication data without being aware of changes in collection parameters.
[0071] The display unit 34 also displays the error content based on the error code included in the communication data, along with a solution to the error. This makes it easy to discover potential abnormalities related to communication errors that are difficult to discover by observing the device value log and the event log. Furthermore, the user U1 can correct the error according to the solution, reducing the effort required for the user U1 to analyze the error.
[0072] Second Embodiment Next, a second embodiment will be described, focusing on the differences from the first embodiment. Note that the same or equivalent components as those in the first embodiment will be designated 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 different time information. Below, an example of searching for a log with time information different from that of the selected log will be described.
[0073] 18 shows a list of communication data logs and a list of event logs, with the same time information connected by a dashed line. As can be seen from Fig. 18, in the 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, if communication log 2 is communication data including an operation command for device value A10, the search unit 36 identifies event log 6, which records an operation event for this device value A10, as a 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 device values, and reading and writing files. Therefore, the search unit 36 determines that a communication log that includes a read operation on device value A10 and an event log that includes a read operation on device value A10 are related in content. However, the search unit 36 determines that a communication log that includes a read operation on device value A10 and an event log that includes a write operation on device value A10 are unrelated in content. Furthermore, the search unit 36 determines that a communication log that includes a read operation on device value A10 and an event log that includes a read operation on device value A20 are 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 relatively short. Therefore, the search unit 36 identifies one of the logs, based on the content of the log, from among 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.
[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 of 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 with related content while allowing for a certain amount 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 perform 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 the log selected by user U1, but this is not limited to this, and the search unit 36 may identify multiple logs as the search result.
[0081] Furthermore, although an example has been described in which 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 either one of them. If the log storage unit 17 of the PLC 10 is omitted, the providing unit 19 sequentially transmits logs generated in the PLC 10 to the terminal device 30, and the logs are accumulated in the storage unit 33. If the storage unit 33 of the terminal device 30 is omitted, the terminal device 30 receives logs from the providing unit 19 by searching for logs from the log storage unit 17 of the PLC 10 as needed.
[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, by storing and distributing program P1 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 installing program P1 on a computer, a device that executes the above-mentioned processing can be configured.
[0084] Furthermore, 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 by superimposing it on a carrier wave, for example.
[0085] The above process 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-described processing can also be achieved by executing all or part of program P1 on a server device, and executing program P1 while the computer sends and receives information about the processing via a communications network.
[0087] In addition, when the above-mentioned functions are realized by an operating system (OS) 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 is not limited to software, and some or all of the functions may be realized by dedicated hardware or circuits.
[0089] The present disclosure allows various embodiments and modifications without departing from the broad spirit and scope of the present disclosure. Furthermore, the above-described embodiments are intended to explain the present disclosure and do not limit the scope of the present disclosure. In other words, the scope of the present disclosure is defined by the claims, not the embodiments. Various modifications made within the scope of the claims and the meaning of equivalent disclosures are considered to be within the scope of the present disclosure.
[0090] The present disclosure is suitable for maintenance work in an FA system.
[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 Providing unit, 20 Controlled device, 30 Terminal device, 31 Setting unit, 32 Receiving unit, 33 Storage unit, 34 Display unit, 35 Accepting 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 providing system, 111, 211 Device value, P1 Program, P2 Control program, U1 User.
Claims
1. A programmable controller for controlling a device, comprising: program execution means for executing a control program for controlling the device; a memory shared with the device; value log collection means for collecting a log of values stored in the memory when the control program is executed; event log collection means for collecting a log of events that are predefined events including operations on the values in the memory and that occur inside the programmable controller; communication means for communicating via a network with at least one of the device and a device different from the device; communication log collection means for collecting a log of communication data transmitted or received by the communication means; time information acquisition means for acquiring time information regarding time; and providing means for providing the log of the values, the log of the events, and the log of the communication data in association with the time information regarding the time at which each log is collected.
2. The programmable controller according to claim 1, wherein the communication log collection means collects a log of the communication data including an operation command on a file stored in a storage device different from the values or the memory used in the control program or as a parameter of the control program.
3. The programmable controller according to claim 1 or 2, wherein the communication log collection means collects a log of the communication data conforming to a protocol used in the control program or a communication protocol regarding a parameter of the control program.
4. A terminal device that receives, in association with the time information, each of the log of the values, the log of the events, and the log of the communication data provided from the programmable controller according to any one of claims 1 to 3, comprising: storage means for storing in association an error code and the content of an error corresponding to the error code; and display means for displaying the log of the values, the log of the events, and the log of the communication data, and for displaying the content of the error corresponding to the error code when the error code is included in the log of the communication data.
5. Receiving means for receiving a selection of any log from a list of first logs that are logs of the event or logs of the communication data; Searching means for searching, based on the time information, for a log corresponding to the first log selected from a list of second logs different from the first log among the logs of the event and the logs of the communication data; The terminal device according to claim 4, wherein the display means displays the first log selected as the object of the selection in association with the second log that is the search result by the search means.
6. The search means searches for a second log associated with time information of a time whose difference from the time of the time information associated with the first log selected as the object of the selection is smaller than a threshold value, and having content related to the content of the first log. The terminal device according to claim 5.
7. The display means identifies a log of the value corresponding to the log selected as the object of the selection based on the time information, and displays the first log selected as the object of the selection, the second log that is the search result by the search means, and the identified log of the value in association with each other. The terminal device according to claim 5 or 6.
8. An information providing method executed by a programmable controller for controlling a device, comprising: a program execution means for executing a control program for controlling the device; a value log collection 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 including operations on the values in the memory, the events occurring inside the programmable controller; 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 regarding time; and a providing means for providing the log of the values, the log of the events, and the log of the communication data in association with the time information regarding the time at which each log is collected.
9. A program for causing a computer connected to a programmable controller to function as: a receiving means for receiving, in association with time information regarding the time at which each of a log of values stored in a memory shared by the programmable controller and a device to be controlled by the programmable controller, a log of events occurring inside the programmable controller, and a log of communication data transmitted or received by the programmable controller via a network, from the programmable controller; a storage means for storing in association an error code and the content of an error corresponding to the error code; and a display means for displaying the log of the values, the log of the events, and the log of the communication data, and for displaying the content of the error corresponding to the error code when the error code is included in the log of the communication data.
Citation Information
Patent Citations
Program creation support program, program creation support device, and program creation support method
JP6854996B1