Programmable Logic Controller System

The programmable logic controller system addresses the challenge of maintaining the relationship between operation records and analysis results by using an integrated analyzer to link these elements, enhancing troubleshooting efficiency.

JP7691261B2Active Publication Date: 2025-06-11KEYENCE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021062985
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-04-01
Publication Date
2025-06-11
Estimated Expiration
2041-04-01

AI Technical Summary

Technical Problem

In programmable logic controller (PLC) systems, it is challenging to maintain an appropriate relationship between operation records and analysis results, making it difficult for users to identify the cause of events, especially rare or unexpected ones.

Method used

A programmable logic controller system is provided with an analyzer that forms part of or is communicably connected to the PLC. This system includes execution means for executing user programs, monitoring means for collecting and storing symbol values, and recording means for generating operation records. The analyzer links analysis results with operation records, allowing for the display of timing information, abnormal symbols, and analysis comments.

Benefits of technology

The system effectively maintains the relationship between operation records and analysis results, enabling users to more easily understand analysis reports and identify the causes of events, thereby improving troubleshooting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007691261000001
    Figure 0007691261000001
  • Figure 0007691261000002
    Figure 0007691261000002
  • Figure 0007691261000003
    Figure 0007691261000003
Patent Text Reader

Abstract

To properly maintain a relation between a driving record and a result of analysis in PLC.SOLUTION: A PLC system monitors an operating condition during an operating period during which a user program is executed, tentatively holds a result of monitoring, and records the result of monitoring as a driving record in the event that a predetermined event has occurred. Further, the PLC system analyzes the driving record to generate a result of analysis, and links the result of analysis to the driving record containing the result of monitoring.SELECTED DRAWING: Figure 24
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a programmable logic controller system.

Background Art

[0002] A programmable logic controller (PLC) is a controller that controls industrial machines such as manufacturing equipment, conveying devices, and inspection devices in factory automation. The PLC controls various expansion units and controlled devices by executing a user program such as a ladder program created by a programmer. In order to monitor the operation of the PLC, it has been proposed to collect the data held by the PLC and monitor the data with a computer (PC) or HMI (human interface: display device) connected outside the PLC (Patent Document 1).

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] By the way, the user creates a user program with the program creation support device and transfers it to the PLC. The PLC actually executes the user program to manufacture various products. Here, due to the occurrence of rare events that were not assumed when the user program was created, the production line may stop. Although the production line may not stop, events that require attention may also occur. On the other hand, when a predetermined event occurs, the PLC reads and records the device values collected before and after the occurrence time from the buffer. This may be called an operation record (operation log). The data utilization unit may analyze this record to create an analysis report and provide it to a web browser outside the PLC. Here, if the operation log can be reproduced together with the analysis report, the user will not only find it easier to understand the content of the analysis report but also easier to identify the cause of the occurrence of a predetermined event. Therefore, the analysis report and the operation log need to be linked. If the analysis report and the operation log are not linked, it will be difficult for the user to identify the operation log corresponding to the analysis report. Therefore, an object of the present invention is to appropriately maintain the relationship between the operation record and the analysis result in the PLC.

Means for Solving the Problem

[0005] The present invention is, for example, A programmable logic controller system having a programmable logic controller and an analyzer that forms part of or is communicably connected to the programmable logic controller, provided in the programmable logic controller, Execution means for executing the user program included in the project, a memory provided in the programmable logic controller and having a storage area for storing symbol values accessed according to the user program by the execution means, provided in the programmable logic controller, During the operation period when the user program is being executed by collecting the symbol values stored in the storage area Monitoring means for monitoring the operation state, provided in the programmable logic controller and including a plurality of symbol values collected in time series by the monitoring means Holding means for temporarily holding the monitoring result of the operation state, provided in the programmable logic controller, The a monitoring result including a plurality of symbol values collected in time series, for a predetermined period around the timing when a predetermined event occurred Monitoring result held by the holding means read out from the holding means Recording means for recording as an operation record, provided in the analyzer, the operation record the monitoring results included in analyze associating an abnormal symbol with the timing at which the symbol became abnormal analysis means for generating an analysis result; by the analyzing means linking means for linking the analysis result generated from the monitoring result to the operation record including the monitoring result the and 、 display data generation means for generating display data for displaying, in a display area capable of arranging a plurality of symbols side by side, the timing at which the event occurred, the abnormal symbols included in the analysis result, and individual analysis comments regarding the abnormal symbols selected from among the abnormal symbols A programmable logic controller system characterized by having the above is provided.

Effect of the Invention

[0006] According to the present invention, the relationship between the operation record (operation log) and the analysis result in the PLC is appropriately maintained.

Brief Description of the Drawings

[0007]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Mode for Carrying Out the Invention

[0008] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments do not limit the invention according to the claims, and not all combinations of the features described in the embodiments are essential for the invention. Two or more of the features described in the embodiments may be arbitrarily combined. Also, the same or similar configurations are given the same reference numerals, and duplicate descriptions are omitted. Small letters may be added to the end of the reference numerals to distinguish multiple configurations. Small letters may be omitted when describing matters common to multiple configurations.

[0009] <System Configuration> First, to make it easier for those skilled in the art to understand a programmable logic controller (PLC, which may also be simply called a programmable controller), the configuration and operation of a general PLC will be described.

[0010] Figure 1 is a conceptual diagram showing a configuration example of a PLC system according to an embodiment of the present invention. As shown in Figure 1, the PLC system includes a PC2 for editing a user program such as a ladder program, and a PLC1 for comprehensively controlling various industrial machines installed in a factory or the like. PC is an abbreviation for personal computer. The user program may be created using a graphical programming language such as a motion program in a flowchart format such as a ladder language or SFC (Sequential Function Chart), or may be created using a high-level programming language such as the C language. Hereinafter, for convenience of explanation, the user program executed in the basic unit 3 is assumed to be a ladder program. The PLC1 includes a basic unit 3 with a built-in CPU and one or more expansion units 4. One or more expansion units 4 are detachable from the basic unit 3.

[0011] The basic unit 3 includes a display unit 5 and an operation unit 6. The display unit 5 can display the operation status of the expansion unit 4 attached to the basic unit 3. The display unit 5 switches the display content according to the operation content by the user on the operation unit 6. The display unit 5 usually displays the current value (device value) stored in the device in the PLC1, error information generated in the PLC1, and the like. A device is a name (symbol) referring to a storage area on a memory provided for storing a device value (device data), and may be called a device memory. The device value is information indicating the input state from the input device, the output state to the output device, and the states of internal relays (auxiliary relays), timers, counters, data memories, etc. set in the user program. The types of device values are bit type and word type. A bit device stores a 1-bit device value. A word device stores a 1-word device value.

[0012] The expansion unit 4 is prepared to expand the functions of the PLC 1. A field device (controlled device) 10 corresponding to the functions of the expansion unit 4 may be connected to the expansion unit 4, whereby each field device 10 is connected to the basic unit 3 via the expansion unit 4. The field device 10 may be an input device such as a sensor or a camera, or an output device such as an actuator. Also, a plurality of field devices may be connected to one expansion unit 4.

[0013] For example, the expansion unit 4b may be a positioning unit that drives a motor (field device 10) to position a workpiece, or a counter unit. The counter unit counts signals from an encoder (field device 10) such as a manual pulse generator.

[0014] The expansion unit 4a collects symbol values from symbols (devices, variables, etc.) in the basic unit 3, analyzes the symbol values, and creates an analysis report including the analysis results. The expansion unit 4a may have a web server that provides the analysis report to an external PC 2. The basic unit 3 may also be called a CPU unit. In this embodiment, an example in which the expansion unit (analysis unit) 4a has a collection unit that collects symbol values is described. However, the collection unit may be provided in the basic unit 3 or in another expansion unit. Also, the expansion unit 4a may function as an analysis device that analyzes the collected data according to an instruction from the basic unit 3 or at a predetermined timing. In this embodiment, an example in which the expansion unit 4a functions as an analysis device is described. However, there is no intention to limit the present invention. The basic unit 3 may function as an analysis device, or an external device such as a PC 2 may function as an analysis device. The system including the PLC 1 and the PC 2 may be called a programmable logic controller system.

[0015] PC2 is a computer mainly operated by a programmer. PC2 may be called a program creation support device (monitoring device). PC2 is, for example, a portable notebook type or tablet type personal computer or smartphone, which is an external computer equipped with a display unit 7 and an operation unit 8. An external computer is a computer outside PLC1. A ladder program, which is an example of a user program for controlling PLC1, is created using PC2. The created ladder program is converted into mnemonic code in PC2. PC2 is connected to the basic unit 3 of PLC1 via a communication cable 9a such as a USB (Universal Serial Bus) cable. However, the communication cable 9a may be a network cable or the like similar to the communication cable 9b. Note that PC2 may be a programmable display set by the user. In this case, the screen for displaying the analysis result or the like may be set by the user. The programmable display may be equipped with a Web browser function, and the analysis result or the like may be displayed by the Web browser function.

[0016] Although not shown in FIG. 1, the operation unit 8 of PC2 may include a pointing device such as a mouse connected to PC2. Also, PC2 may be detachably connected to the basic unit 3 or the extension unit 4a of PLC1 via another communication cable 9b other than the USB cable. The communication cable 9b may be a so-called LAN cable. PC2 may be connected to the basic unit 3 of PLC1 by wireless communication without passing through the communication cables 9a and 9b.

[0017] <Program creation support device> FIG. 2 is a block diagram for explaining the electrical configuration of PC2. As shown in FIG. 2, PC2 includes a CPU 11, a display unit 7, an operation unit 8, a storage device 12, and communication units 13a and 13b. The display unit 7, the operation unit 8, the storage device 12, and the communication units 13a and 13b are each electrically connected to the CPU 11. The storage device 12 includes a RAM, a ROM, an HDD, an SSD, and may further include a removable memory card. The CPU is an abbreviation for a central processing unit. The ROM is an abbreviation for a read-only memory. The RAM is an abbreviation for a random access memory. The HDD is an abbreviation for a hard disk drive. The SSD is an abbreviation for a solid state drive.

[0018] The user of PC2 causes the CPU11 to execute the project editing program 14a stored in the storage device 12, and edits the project data through the operation unit 8. That is, PC2 is an engineering tool and also functions as a program creation support device. The project data includes one or more user programs (e.g., ladder programs) and configuration information of the basic unit 3 and the expansion unit 4. The configuration information includes the connection positions of a plurality of expansion units 4 to the basic unit 3, information indicating functions provided in the basic unit 3 (e.g., communication function and positioning function), information indicating functions of the expansion unit 4 (e.g., imaging function), and device allocation information, etc. Here, the editing of the project data includes the creation and change (re - editing) of the project data. The user reads out the project data stored in the storage device 12 as needed, and changes the project data using the project editing program 14a. The communication unit 13a communicates with the basic unit 3 via the communication cable 9a. The CPU11 transfers the project data to the basic unit 3 via the communication unit 13a. The communication unit 13a includes a communication circuit capable of performing communication compliant with the USB standard, etc. The communication unit 13b communicates with the expansion unit 4a via the communication cable 9b. The communication unit 13b includes a network communication circuit. The Web server program 14c is implemented as a part of the project editing program 14a. The Web browser program 14d receives the analysis report described in Web format from the expansion unit 4a via the communication unit 13a and displays it on the display unit 7. Note that the Web browser program 14d may request the Web server program 14c to provide the analysis report. The Web server program 14c may access the expansion unit 4a via the communication unit 13a and the basic unit 3, acquire the analysis report, and transfer it to the Web browser program 14d.

[0019] <plc> FIG. 3 is a block diagram for explaining the electrical configuration of the PLC 1. As shown in FIG. 3, the basic unit 3 includes a CPU 31, a display unit 5, an operation unit 6, a storage device 32, and a communication unit 33. The display unit 5, the operation unit 6, the storage device 32, and the communication unit 33 are each electrically connected to the CPU 31. The storage device 32 may include a RAM, a ROM, a memory card, and the like. The storage device 32 has a plurality of storage areas such as a device unit 34, a project storage unit 35, a ring buffer 36, and an operation record storage unit 37. The device unit 34 has bit devices, word devices, and the like, and each device stores a device value. The project storage unit 35 stores project data transferred from the PC 2. The ring buffer 36 periodically collects and stores device values from the device unit 34. When a predetermined event occurs, the operation record storage unit 37 stores an event record including the device values collected around the occurrence time (before the occurrence time, after the occurrence time, or before and after the occurrence time) and the collection time. An event means, for example, that an alarm condition or a caution condition set for each device is satisfied. The alarm condition means, for example, a condition for stopping the control operation of the manufacturing line by the PLC 1. The caution condition means, for example, a condition of a device value for which an administrator should pay attention to the control operation of the manufacturing line by the PLC 1. The CPU 41 transmits an event record to the PC 2 in response to a request from the PC 2. Further, the CPU 31 may provide device values to the PC 2 in real time. The storage device 32 also stores a control program executed by the CPU 31 of the basic unit 3. As shown in FIG. 3, the basic unit 3 and the extension unit 4 are connected via a unit internal bus 90 which is a kind of extension bus. Note that the communication function related to the unit internal bus 90 is implemented in the CPU 31, but may be implemented as a part of the communication unit 33. The communication unit 33 may have a serial communication circuit compliant with the USB standard or the like. The CPU 31 receives project data from the PC 2 via the communication unit 33.

[0020] Here, a supplementary explanation will be given for the internal unit bus 90. This internal unit bus 90 is a communication bus used for input / output refresh. Input / output refresh is a process of updating device values between the basic unit 3 and the expansion unit 4. Input / output refresh is executed every time the ladder program is executed once (that is, every scan).

[0021] The operation record (device values and their collection times, etc.) recorded in the operation record storage unit 37 may be a record of the operation state of the PLC 1 at the scan time level. For example, the operation record may be to record the symbol values of all symbols related to the operation of the PLC 1 and their collection times in chronological order for each scan. All symbols related to the operation may be, for example, all symbols used in a user program such as a ladder program, or all symbols included in a program unit or unit unit selected by the user. In this case, the symbols to be the target of the operation record may be collectively selected in a significant unit such as a program unit or a unit unit. The symbols to be the target of the operation record may be individually added or removed (added or deleted). For example, at the time of trouble occurrence, an operation record may be generated that records the symbol values of all symbols related to the operation of the PLC 1 around the time of trouble occurrence and their collection times in chronological order for each scan. The user will be able to accurately grasp what happened at the time of trouble occurrence even later based on the operation record. The operation record may contain a lot of information to reproduce the situation at that time. If there is a lot of information, the data capacity of the operation record will increase, making it difficult to handle the operation record (data processing, etc.) or imposing a load on the collection of the operation record. Therefore, the symbols to be the collection target can be selected by the user in program units or unit units.

[0022] In addition to symbols, the operation record may also include time-series camera images along with their imaging times. This allows the user to accurately understand what happened in the vicinity of the time of trouble, even retrospectively, for example, when trouble occurs. In particular, including camera images showing changes in the appearance of the equipment in the operation record will be helpful for understanding the situation. Therefore, camera images may be recorded in conjunction with the time series of the execution of the user program. The write history from external devices such as HMI (Human Machine Interface) and PC, and the write history from PLC may be included in the operation record as change point events. This allows the user to confirm, for example, what change point events occurred before and after trouble in time series.

[0023] From another perspective, the operation record may be referred to as a general term for data per scan time, such as devices, buffer memories of expansion unit 4, variables, etc., saved in response to the establishment of the save trigger condition. The operation record may include video data acquired by the expansion unit (camera unit) for each frame, saved in response to the establishment of the save trigger condition. Also, the operation record may include event histories such as errors and device value changes, saved in response to the establishment of the save trigger condition. Furthermore, the operation record may include the ladder program (project data) being executed at the time the save trigger condition was established. By including the project data at the time the operation record was generated in the operation record, even if there are multiple versions of the project data, the situation can be reproduced based on the project data actually used when the operation record was generated. The operation record may include an analysis report.

[0024] The expansion unit 4 includes a CPU 41 and a memory 42. The CPU 41b of the expansion unit 4b controls the field device 10 according to an instruction (device value) from the basic unit 3 stored in the device. Also, the CPU 41b stores the control result of the field device 10 in a device called a buffer memory. The control result stored in the device is transferred to the basic unit 3 by input / output refreshing. Also, the control result stored in the device may be transferred to the basic unit 3 even at a timing different from the input / output refreshing according to a read instruction from the basic unit 3. The memory 42 includes a RAM, a ROM, etc. In particular, a storage area used as a buffer memory is secured in the RAM. The memory 42 may have a buffer for temporarily holding data (e.g., still image data or moving image data) acquired by the field device 10.

[0025] The CPU 41a of the extended unit 4a that functions as a data utilization unit (analysis unit) communicates with the PC 2 via the communication cable 9b and the communication unit 43. The communication unit 43 includes a communication circuit that executes network communication. The CPU 41a executes a data utilization program stored in the memory 42a, analyzes the device values collected in the basic unit 3, and creates an analysis report including the analysis results. When the driving record analysis application is set as the data utilization application, the CPU 41a analyzes the device values collected in the basic unit 3 and creates an analysis report including the analysis results. For example, the CPU 41a analyzes the symbol values included in the driving record data to identify an abnormal symbol and the time when the symbol became abnormal, and creates an analysis report including the analysis results in which the abnormal symbol and the time when the symbol became abnormal are associated with each other. The driving record data includes information for reproducing the situation around the time when the driving record storage event occurred. Therefore, the driving record data may be managed in association with the analysis report. In addition, the driving record data includes the symbol values of many symbols for reproducing the situation around the time when the driving record storage event occurred. Therefore, the data size of the driving record data tends to be large. For example, the CPU 41a may read out the data necessary for the analysis report from the driving record data and additionally save it as data for the analysis report in the driving record data. Here, the additional saving means, for example, reading out and copying the data necessary for the analysis report from the driving record data, and additionally saving the data for the analysis report created by tagging the copied data in the driving record data. By applying data processing such as tagging the data in this way, it becomes easier to create an analysis report.

[0026] The driving record data may include camera images. In this case, by playing back the camera images, the user can more precisely understand the situation around the time when the driving record saving event occurred. The analysis report may include a UI (user interface) for playing back the camera images. Camera images have a large data size. Therefore, only the necessary camera image data may be partially downloaded when a click or scroll operation is received in the UI for playing back the camera images. For example, when creating the analysis report, the CPU 41a may process the camera images corresponding to the display order in the analysis report or generate index information indicating the correspondence between the time and the storage location of the camera images. Thereby, the CPU 41a may quickly and partially download the camera images corresponding to the display time (the time of the internal clock for playback).

[0027] An analysis report, in a narrow sense, means the analysis result itself, but in a broad sense, it may mean a web application that displays the analysis result and its user interface. The CPU 41a determines, for example, whether the device value is within the normal range or whether the timing at which the device value changes is within the normal range. Whether the timing at which the device value changes is within the normal range may be, for example, whether the length of the period during which the device value is "1" (on) is within the normal range. Also, it may be determined whether the number of changes in the device value in a certain process or cycle is within the normal range. If the device value collected from a certain device does not meet the normal conditions, that device may be called an abnormal device as a device with behavior different from usual. The CPU 41a may create an analysis report in web format and provide the analysis report to the web browser of the PC 2 via the communication unit 43 and the communication cable 9b. When the CPU 31 has a protocol conversion function, the CPU 41a may transmit the analysis report to the PC 2 via the internal unit bus 90, the CPU 31, the communication unit 33, and the communication cable 9a. The analysis report may have components such as a graph display component and a numerical value display component. These display components are realized by markup data (e.g., HTML data) that describes the front-end structure, style data (e.g., CSS data) that describes the decoration, and code (e.g., JavaScript (registered trademark) code) that describes dynamic processing. HTML is an abbreviation for HyperText Markup Language. CSS is an abbreviation for Cascading Style Sheets.

[0028] FIG. 4 is a diagram for explaining the functions realized by the CPU 11 of the PC 2. The project editing unit 50 is a function realized when the CPU 11 executes the project editing program 14a. The project editing unit 50 creates project data including a user program according to a user instruction input through the operation unit 8. The web server 51 communicates with the web browser 60 according to HTTP (HyperText Transfer Protocol) and provides display components to the web browser 60. The protocol conversion unit 52 converts HTTP into a predetermined communication protocol. The predetermined communication protocol is a communication protocol used for communication between the communication unit 13a and the communication unit 33. For example, when the web browser 60 requests an analysis report by an HTTP request, the web server 51 passes the HTTP request to the protocol conversion unit 52. The HTTP request includes the URL (Uniform Resource Locator) of the extension unit 4a (web server) that is executed by the CPU 41a and provides the analysis report. The protocol conversion unit 52 encapsulates the HTTP request and converts it into a request signal (command) that can be transmitted by the predetermined communication protocol. This request signal is passed to the CPU 31 of the basic unit 3 and further passed to the CPU 41a of the extension unit 4a. The CPU 41a returns the analysis report to the CPU 11 via the CPU 31. The web server 51 of the CPU 11 passes the analysis report to the web browser 60. Thereby, the web browser 60 displays the analysis report on the display unit 7.

[0029] The download unit 53 downloads operation records and the like from the basic unit 3 and stores them in the storage device 12. The debug unit 54 debugs the user program and displays the debug results on the display unit 7. The ladder monitor unit 56 acquires the value stored in the symbol described in the user program from the operation record, and highlights the value for the symbol in the user program. For example, the device value acquired from the operation record may be related and displayed for the device drawn in the ladder diagram of the ladder program. The relation map unit 55 creates a relation map showing the devices related to the abnormal device displayed in the analysis report and displays it on the display unit 7. An abnormal device is a device whose device value does not satisfy the normal condition or whose timing of change of the device value does not satisfy the normal condition. The relation map is, for example, a UI that visually shows the relationship between the device (input device) that affects the abnormal device and the abnormal device. The relation map may also show the relationship between the device (output device) affected by the abnormal device and the abnormal device. The debug unit 54 acquires the abnormal device and its related devices by analyzing the ladder program and creates a relation map.

[0030] The reception unit 57 receives editing operations for user programs, operations for debug processing, and the like. The notification processing unit 58 acquires by polling whether a notification has been issued in the PLC 1, and displays the acquired notification on the display unit 7. Examples of the notification include completion of creation of an analysis report. The playback unit 59 causes the download unit 53 to download the operation record and save it in the storage device 12, for example, in response to a playback request input from the reception unit 57 or the cooperation unit 64. The playback request may include, for example, identification information capable of specifying the operation record (e.g., unique identification information or a save path name in the PLC 1). The playback unit 59 plays back the operation record stored in the storage device 12 and displays it on the display unit 7. The playback unit 59 may have a ladder monitor unit 56 instead of the debug unit 54. Alternatively, the playback unit 59 may be included in the debug unit 54. The playback unit 59 may waveform-display and display time-series device values acquired in real time from the PLC 1, or may waveform-display and display time-series device values included in the operation record.

[0031] The web browser 60 may display an analysis report on the display unit 7 by executing a web application 61. The web application 61 is composed of, for example, HTML data, CSS data, and Java (R) scripts. The web application 61 may be provided from the extension unit 4a. The communication processing unit 62 processes communication with the web server 51. The data acquisition unit 63 acquires the driving record to be displayed in the analysis report from the project editing unit 50. It is assumed that the driving record has already been stored in the storage device 12 by the download unit 53. The cooperation unit 64 passes the specified information indicating a device or the like specified or selected by the user in the analysis report to the debugging unit 54 or the like. As a result, the debugging unit 54 can display the relation map of the abnormal device specified in the analysis report or display the portion where the abnormal device is described in the ladder program. The user can easily edit the ladder program for the abnormal device. The drawing unit 65 displays the analysis report on the display unit 7. Further, the cooperation unit 64 performs time management so that the playback time (selection time) in the analysis report is synchronized with the playback time of the driving record in the project editing unit 50.

[0032] FIG. 5 shows functions realized by the CPU 31 and the CPU 41a in the PLC 1 by executing a control program. In the CPU 31, the command processing unit 71 interprets a command received from the PC 2 and executes processing corresponding to the interpretation result. For example, when a request signal created by encapsulating an HTTP request is received, the command processing unit 71 transfers the request signal to the CPU 41a. When a response signal for the request signal is received from the CPU 41a, the command processing unit 71 transfers the response signal to the PC 2. The collection unit 72 collects symbol values (values stored in devices or variables) from the basic unit 3 and the expansion unit 4b and stores them in the ring buffer 36. The logging unit 73 determines whether any error or trouble (abnormal event) has occurred in the PLC 1 based on the collected symbol values and the like. For example, the logging unit 73 may determine whether the collected symbol values satisfy the recording conditions. When the collected symbol values satisfy the recording conditions, the logging unit 73 stores the symbol values as operation logs 76 in the operation record 74. For example, the logging unit 73 creates a folder for storing the operation record 74 and stores the operation log 76 therein. The logging unit 73 reads out the project data 75 that was being executed when the operation record was created from the project storage unit 35 and stores it in the operation record 74. Further, the logging unit 73 notifies the analysis unit 83 that the operation record 74 has been created.

[0033] Note that the CPU 31 or CPU 41a may have a setting unit for setting a control cycle used for generating a learning model, analysis, and generating an analysis report, which will be described later, according to the operator's input. The control cycle is set by specifying the timing serving as the basis of the cycle. The setting of the control cycle may be referred to as cycle setting. For example, the cycle setting includes a symbol name that defines the start timing of the cycle and edge information of the rise / fall of the symbol value. The cycle setting may include setting information of the start timing of the cycle based on a symbol name that defines the start timing of the cycle and edge information of the rise / fall of the symbol value, a symbol name that defines the end timing of the cycle, and setting information of the end timing of the cycle based on the edge information of the rise / fall of the symbol value. The setting of the control cycle by the setting unit is provided to the PLC 1 in a file format such as CSV, and the setting unit may read a file such as CSV and set the control cycle. For example, the control cycle set by the setting unit is used to classify devices synchronized with the cycle and add the classification information as attribute information to the model, narrow down the devices to be analyzed by the control cycle, or generate an analysis report displayed in synchronization with the control cycle. A plurality of control cycles may be set. Also, the control cycle does not necessarily have to be set. For example, when the possible values of the symbol value in the normal state are determined in advance, it may be determined whether it is an abnormal symbol by determining whether the symbol value is one of the possible values determined in advance.

[0034] In the CPU 41a, the protocol conversion unit 81 protocol-converts the HTTP request encapsulated and transferred from the PC 2 via the CPU 31, and extracts it from the request signal. The protocol conversion unit 81 encapsulates the response information transmitted from the Web server 82 for the HTTP request and passes it to the CPU 31. Also hereinafter, the Web browser 60 of the PC 2 and the Web server 82 of the extension unit 4a can communicate indirectly via the Web server 51, protocol conversion units 52 and 81, command processing unit 71, etc. within the PC 2. The protocol conversion units 52 and 81 may provide a transparent tunnel (e.g., TCP tunnel). The Web server 82 provides the analysis report created by the analysis unit 83 to the PC 2. The analysis unit 83 analyzes the operation log 76 in the operation record 74, creates the analysis result 77, and passes it to the logging unit 73. When the analysis unit 83 creates the analysis result 77, the logging unit 73 adds it to the operation record 74 including the analysis result 77 in addition to the project data 75 and the operation log 76. The operation record 74 is stored in the operation record storage unit 37. Thus, since the operation record 74 stores the project data 75, operation log 76, and analysis result 77 when an abnormal event occurs in the PLC 1 in an associated manner, it becomes easier to accurately reproduce the state of the PLC 1 when an abnormal event occurs. For example, by visually reproducing the change in the device value on the ladder diagram, the user will find it easier to debug the ladder program. In particular, when using the project data stored in the PC 2, it may be difficult to accurately reproduce the state of the PLC 1 when an abnormal event occurs. This is because the project data stored in the PC 2 may not match the project data 75 that was being executed in the PLC 1 when the abnormal event occurred. Therefore, the project data 75 that was being executed in the PLC 1 when the abnormal event occurred is stored in the operation record 74. When the analysis result 77 is issued, the notification issuing unit 84 issues a notification. This notification is transmitted to the CPU 11.

[0035] <User Interface (UI)> Figures 6 and 7 show the UI 100 of the project editing program 14a displayed on the display unit 7 (the UI 100 is displayed on the display unit 7 by executing the project editing program 14a). The mode selection menu 101 displays the plurality of modes provided in the project editing program 14a so that they can be selected. The plurality of modes include an editing mode, a monitoring mode, a replay mode (debugging mode), and the like. The editing mode shown in FIG. 6 is a mode for editing the ladder program displayed in the program display area 104. The project display area 102 displays the information constituting the project. This information includes the specification information and setting information of the basic unit 3 and the expansion unit 4 constituting the PLC 1, the assignment information of the devices, the setting information of the operation record, the ladder program, and the like. In the editing mode, the program display area 104 displays the ladder program specified in the project display area 102 so that it can be edited. In FIG. 6, a ladder program having program modules named an input section, an output section, and a processing section state is displayed. In particular, the plurality of program modules can be selected by the tab 107, and in FIG. 6, the tab 107 corresponding to the input section is selected.

[0036] The monitoring mode is a mode for waiting for a notification issued by the PLC 1. When the expansion unit 4a issues a notification indicating that it has created an analysis result, the CPU 11 displays a dialog or the like for displaying the notification on the display unit 7. The user interface of the monitoring mode is basically the same as that of the editing mode.

[0037] FIG. 8 shows a notification dialog 108. The notification dialog 108 displays the name of the application or function that issued the notification, the content of the notification, the number of occurrences of the notification, the date and time of the notification, etc. The notification information for displaying the notification dialog 108 includes the URL of the analysis report. When the display button 109 is pressed, the CPU 11 passes the URL of the analysis report to the web browser 60. Thereby, the web browser 60 accesses the web server specified by the URL, obtains the display data (web application 61) of the analysis report, and displays the analysis report.

[0038] As shown in FIG. 7, the replay mode is a mode in which the operation record is reproduced on the ladder program or the operation record is displayed as a waveform. The pointer 103 moves in conjunction with a user operation on the operation unit 8 and is used to press a button or the like or to select an object. For example, when the analysis report displayed in the project display area 102 is double-clicked by the pointer 103, the CPU 11 causes the web browser 60 to display the analysis report.

[0039] In the replay mode, the device values included in the operation record are displayed on the ladder program in the program display area 104. In the case of a relay device (bit device), whether the device value is 0 or 1 is displayed in a visually distinguishable manner. Visually distinguishable includes display in different colors or display of different icons. In the case of a word device, for example, the device value may be displayed in decimal. Other numerical display formats such as hexadecimal device values may be adopted.

[0040] Since the device value is time-series data that can change over time, each device value is associated with time information indicating the time when it was collected. The seek bar 105a indicates the playback time of the device value and may be operated by the pointer 103 to specify the playback time. During the playback of the driving record, the seek bar 105a moves from left to right in conjunction with the passage of the playback time. The time specifying unit 106a is a control object for instructing to advance the playback time, rewind the playback time, instruct the start of automatic playback, or stop the playback.

[0041] [Analysis Report] FIG. 9 shows an analysis report 110 displayed on the display unit 7 when the web browser 60 executes the web application 61. Note that the analysis report 110 is displayed on the display unit 7 together with the UI 100 of the project editing program 14a. That is, the window of the UI 100 and the window of the analysis report 110 are displayed as different windows. However, the UI 100 and the analysis report 110 may be displayed within a single window. Further, the analysis report 110 may be displayed on the display unit 7 or may be displayed on other display devices such as a programmable display, a tablet, or a smartphone.

[0042] The detection map 111 displays the start timing and end timing for each of a plurality of processes executed in the PLC1. In general, the period from the start timing to the end timing is called a cycle. In FIG. 9, a rectangle extending horizontally indicates a period (cycle) during which a process is being executed. The left of this rectangle indicates the older one, and the right indicates the newer one. The time bar 112a indicates the timing when a save trigger for the driving record data occurred. As described above, the driving record data holds data collected before the timing when the save trigger occurred and data collected after this timing. Therefore, data is shown before and after the time bar 112a. Meanwhile, the time bar 112e indicates the selected time, and can be moved to a desired time (left and right) by a drag operation or a drag-and-drop operation by the user. Instead of drag-and-drop, the time bar 112e may be configured to jump to a desired position when the user clicks on the desired position on the detection map. In this way, the user can update the display of the analysis result by operating the time bar 112e. In accordance with the operation of the time bar 112e, at least one or all of the detection list 114, the image display area 113, and the analysis comment 116, which will be described later, may be updated in conjunction with each other (time-synchronized) to display the corresponding analysis result. The time bars 112a and 112e may be drawn in different colors, or may be drawn with solid and dashed lines. This improves the distinguishability of the time bars 112a and 112e.

[0043] Here, two circles are written in step 1 of the detection map 111, which indicate the timing when the detection target devices became in an unusual state. The circle on the left indicates the timing when devices R001 and MR001 became in an unusual state (both at 14:50:45). The circle on the right indicates the timing when device R004 became in an unusual state (14:59:01). Fig. 9 shows a state in which the user has selected the device column for R004 in the detection list 114, and the time bar 112e of the detection map 111 is displayed at a position overlapping with the circle on the right.

[0044] The display position of the time bar 112e of the detection map 111 is linked to the user's device selection in the detection list 114. In the state shown in FIG. 9, when the device column of MR001 is selected (clicked), as shown in FIG. 10, MR001 is highlighted and the time bar 112e of the detection map 111 moves to a position overlapping the left circle mark of the two circle marks (the same applies when the device column of R001 is selected). Also, in response to the movement of the time bar 112e, the time bar 112f of the detection list also moves (is linked) up by one.

[0045] A state different from normal is, for example, when the device value deviates from the normal range, or when the timing or frequency of change of the device value is outside the normal range. In a product manufacturing factory, the same product is mass-produced every day. That is, the same process is repeated many times. Therefore, detecting and displaying a state different from normal is very useful for improving the ladder program or reviewing the production equipment. The normal range (normal condition) that defines the state the same as normal (normal state) may be defined by master data or by the learning result of the device value. In the detection map 111, the rectangle indicating the process moves from right to left over time (as described above, the time is older on the left and newer on the right).

[0046] The image display area 113 displays the camera image acquired in the PLC1. The camera image may also be included in the operation record. In FIG. 9, the camera image of the master data and the current camera image are displayed so as to be comparable. Since the camera image is also time-series data, the seek bar 105b indicates the playback time of the camera image and moves from left to right as the playback time elapses. The time bar 112b indicates the selected time. In FIG. 9, it indicates the timing when the detection target device R004 has changed to a state different from usual. The time specification unit 106b is a control object for instructing to advance the playback time of the camera image, return the playback time, instruct the start of playback, or stop the playback. Note that the cooperation unit 64 and the playback unit 59 manage so that the playback time of the detection map 111, the playback time of the camera image, and the playback time in the UI 100 are synchronized. Thereby, the playback time in the UI 100 and the playback time in the analysis report 110 match.

[0047] The detection list 114 indicates a device that has entered a state different from normal and the time when that state occurred (the time when the device value was collected). When the CPU 11 detects a click on the device displayed in the detection list 114, it may switch the operation mode of the project editing unit 50 to the replay mode. The CPU 11 passes the identification information of the clicked device, the playback time information (the time when the device value was collected), and the information for specifying the operation record to be analyzed (such as the save path) to the debug unit 54. As a result, the operation record to be analyzed is used to enter the replay mode, and at this time, the playback time of the analysis report 110 and the playback time information of the project editing unit 50 are synchronized. As a result, as shown in FIG. 7, the operation record 74 is played back in association with the ladder program. Note that FIG. 7 corresponds to the display screen when the replay mode of the UI 100 is activated with the device R004 selected in the detection list 114 of FIG. 9. The seek bar 105a in FIG. 7 indicates the time (14:59:01) when the device R004 entered a state different from normal. In the program display area 104, the states of the respective devices at this time (14:59:01) are visually distinguishable and displayed. Note that the project editing unit 50 may already be operating in the replay mode before the analysis report 110 is displayed. In this case, when an abnormal device is selected in the analysis report 110, the CPU 11 passes the time when the abnormal state (an event different from normal) occurred to the project editing unit 50, and the project editing unit 50 may read the device value synchronized with that time from the storage device 12 and display the device value on the ladder program.

[0048] In FIG. 9, the time bar 112c indicates the timing (14:59:06) when the save trigger for the operation record data occurred. Also, as described above, the time bar 112f is linked to the time indicated by the time bar 112e of the detection map 111. For example, when the time bar 112e is moved to the left of the left circular mark, in the detection list 114, the time bar 112f moves to a position overlapping the upper end line of the device column of R001.

[0049] Here, FIGS. 10 and 11 are explanatory diagrams for explaining how the analysis report 110 (FIG. 9) and the UI 100 of the project editing program 14a (FIG. 7) are linked. As described above, FIG. 7 corresponds to the display screen when the replay mode of the UI 100 is activated with the device R004 selected in the detection list 114 of FIG. 9.

[0050] As shown in FIG. 10, when the user selects (clicks) MR001 in the detection list 114, the time bar 112e moves in conjunction in the detection map 111. As the time bar 112e moves, the time bar 112f also moves up one position. Further, as the time bar 112e moves, the time bar 112b in the image display area 113 also moves to the left (linked display). Furthermore, the analysis comment 116, which will be described later, also has its display switched with the selection of MR001. Details will be described later.

[0051] On the other hand, as shown in FIG. 11, the time bar 105a moves slightly to the left (earlier in time) than in FIG. 7. At this time, the time bar 105a shows the time (14:50:45) when the device MR001 is in a state different from usual. In this way, by the linking unit 64, the time specified by the time bar 112e or the time bar 112f in the analysis report 110 and the playback time of the driving record (the time specified by the time bar 105a) are displayed synchronously.

[0052] Note that in FIGS. 10 and 11, the linked display in the state where the UI 100 of the project editing program 14a has been activated in advance is described. For example, when the UI 100 is activated in a state where the device column of MR001 has been selected in the detection list 114 of the analysis report 110 first, the UI 100 is activated in the state after the changes shown in FIGS. 10 and 11.

[0053] Also, in FIG. 10, the user selects one device from the detection list 114, but multiple devices may be selected. In this case, the same processing as when the top device (the oldest device in terms of time) is selected is performed. That is, for example, when the replay mode of the UI 100 is activated in a state where both MR001 and R004 are selected, the UI 100 is activated in the changed state shown in FIG. 11. The synchronous playback of time as described in this specification is a concept including the synchronous playback of the time index specified by the time bar 112f and the playback time index of the operation record. That is, even if it is not the time itself, the indexes representing the time may be synchronously played back.

[0054] As shown in FIG. 12, the CPU 11 may read the name of the abnormal device and its device comment 115 from the project data and display them in the detection list 114. The device comment 115 indicates the use of the device, etc. Therefore, the user will be able to easily understand the use of the abnormal device, etc.

[0055] The analysis comment 116 displays the comment included in the analysis result, the master data, and the time-series data of the current device values for the device selected in the detection list 114. The data displayed in the analysis comment 116 is the data for one control cycle. The time bar 112d indicates the timing when a state different from usual occurred.

[0056] FIGS. 9 and 12 show the data for one control cycle in which a state different from usual occurred for the device R004. More specifically, in the master data, two changes of off → on and on → off occur in one control cycle, whereas no change occurs in the current data. Therefore, the time bar 112d is displayed at the timing when a state different from usual, that is, off → on, occurred.

[0057] Here, in the analysis comment 116 shown in FIGS. 9 and 12, when the user selects (clicks) MR001 in the detection list 114, the display switches to the display shown in FIG. 10. FIG. 10 shows a state where a different state has occurred in the device of MR001. In this embodiment, each of the time bars 112e, 112b, and 112f indicates the same timing.

[0058] As shown in FIG. 12, the analysis report 110 may have a button 117a for instructing the display of the relation map and a button 117b for instructing the display of the waveform. Hereinafter, the display of the relation map and the waveform will be described in detail.

[0059] [Relation Map] Figure 13 shows a relation map 120. The relation map 120 is a UI that displays other devices related to a device (abnormal device) that is in a state different from normal in a ladder program. This allows the user to easily understand the relationship between the abnormal device and other devices. Generally, since the number of devices used in PLC1 ranges from several hundred to tens of thousands, it is not easy for the user to identify the device that caused the problem from a device that is in a state different from normal. The CPU 11 searches the ladder program for the abnormal device, discovers the description related to the abnormal device, and analyzes the description to identify the related devices. In this example, in the output section of the ladder program, an abnormal device (e.g., R004) is described, and MR000, MR001, and MR002 exist as related devices. The CPU 11 displays the abnormal device, related devices, and program modules identified from the ladder program in a tree-like manner. In this example, the devices input for the operation in the output section are displayed on the left, the program module is displayed in the middle, and the abnormal device is displayed on the right of it. As shown in Figure 13, when the program module is double-clicked by the pointer 103, the CPU 11 may pass the information to the project editing section 50 and display the corresponding program module in the program display area 104. The analysis report may be created for all devices or may be created only for some devices. By limiting it to some devices, the analysis time will be shortened. Depending on the analysis accuracy, it is expected that there will be more noise in the analysis results, but by limiting it to some devices, the noise will be reduced. In the case of such an analysis report for some devices, the device that caused the abnormality exists either in the device that was analyzed as being different from normal or in a device that was not included in the analysis target. Therefore, in the relation mapping, the devices that are not included in the analysis target may be highlighted.

[0060] [Waveform display] Figure 14 shows a waveform UI 130 that is displayed on the display unit 7 when the CPU 11 executes the waveform display program 14b. The device list 131 shows a list of devices to be displayed. For example, the CPU 11 enumerates the names of the devices selected or specified by the user in the detection list 114 in the device list 131. Figure 14 shows the state when the waveform UI 130 is started with R001, MR001, and R004 selected in Figure 9. Note that the relay device MR000 indicating the control cycle of the process (from start to end) is enumerated in the device list 131 by the CPU 11 even without user specification. That is, MR000 is a device defined by the above-described cycle setting and is automatically displayed on the waveform UI 130 regardless of whether there is a user specification. Note that the number of device values constituting the device waveform displayed on the waveform UI 130 may be specified in advance by user settings. For example, a predetermined number of device values may be displayed based on the time corresponding to the device column selected in the detection list 114 of the analysis report 110 (before the reference, after the reference, or before and after the reference). As another example, the waveform may be displayed in a reduced size so that all the device values included in the operation record are displayed as the device values constituting the device waveform displayed on the waveform UI 130. In this case, by expanding the display, the device waveform near the reference time described above can be more clearly visually recognized.

[0061] The waveform display area 132 shows the waveform of the device values for the selected device. The CPU 11 reads the time-series data of the device values from the operation record and displays it in the waveform display area 132. The CPU 11 may also display a time bar 112g for the waveform. Thereby, it becomes easier for the user to grasp at which part of the waveform an event different from usual has occurred. The time indicated by the time bar 112g is the same as the times indicated by the time bars 112e, 112b, and 112f. This is because the cooperation unit 64 manages the time so that the playback time and the event occurrence time in the analysis report 110 match those in the playback unit 59.

[0062] Here, FIG. 15 is an enlarged view of the region indicated by the dashed line in FIG. 14. In FIG. 15, the waveforms of the devices MR001 and R004 are shown by dashed lines, which are described for convenience of explanation and do not appear on the actual display screen. FIG. 15 illustrates that the time specified by the selected device in the detection list 114 of the analysis report 110 and the time bar 112g of the waveform UI 130 are reproduced synchronously by the cooperation unit 64.

[0063] FIGS. 14 and 15 show the device waveforms of MR000, R001, MR001, and R004 in order from the top. MR000 is a device that indicates the control cycle as described above. The period from off → on, through on → off, and back to off → on corresponds to one control cycle. In FIG. 14, originally, R001 should be a device that is always off. However, due to some abnormality, at the timing when the control cycle starts (the timing when MR000 turns on), R001 is on (an abnormality has occurred). As a result, even when R000 shown in FIG. 7 (not shown in FIG. 14) is on, MR001 does not turn on (in FIG. 14, this state is indicated by a dotted line). Furthermore, since MR001 does not turn on, R004 of the output unit shown in FIG. 13 also does not turn on (in FIG. 14, this state is indicated by a dotted line).

[0064] FIG. 14 shows the state when the waveform UI130 is activated with the device R001 selected in the detection list 114 of FIG. 9. That is, the time bar 112g is displayed at the time when R001 is in a state different from usual. In this state, when the device MR001 is selected in the detection list 114 of FIG. 9, the time bar 112g is displayed at the time when MR001 is in a state different from usual (see the time bar 112ga in FIG. 15). In addition, when the device R004 is selected in the detection list 114 of FIG. 9, the time bar 112g is displayed at the time when R004 is in a state different from usual (see the time bar 112gb in FIG. 15). In this way, by the cooperation unit 64, the time specified by the selected device in the detection list 114 of the analysis report 110 and the time indicated by the time bar 112g on the waveform UI130 are reproduced in synchronization.

[0065] Note that FIG. 15 describes the linked display in a state where the waveform UI130 is activated in advance. For example, the waveform UI130 may be activated in a state where the selected device in the detection list 114 is changed first (for example, changed from R001 to MR001 or R004). In this case, the waveform UI130 is activated in the state after the change shown in FIG. 15. Also, in FIG. 15, the user selects one device from the detection list 114, but a plurality of devices may be selected. In this case, the same processing as when the top device (the oldest device in terms of time) is selected is performed. That is, for example, when the waveform UI130 is activated with both MR001 and R004 selected, the time bar 112g is displayed (linked display) at the position of the time bar 112ga shown in FIG. 15.

[0066] In FIG. 14, all devices are relay devices, but a word device may be selected. The CPU 11 may waveform the device value of the word device and display it in the waveform display area 132.

[0067] In FIG. 14, the device values included in the operation record 74 are displayed, and master data may also be displayed superimposed thereon. The master data is time-series data of the same device values as usual. Therefore, by displaying these superimposed, it will be easier for the user to understand at which point in time an event different from usual occurred.

[0068] [Example] FIG. 16 shows an example of the field device 10 controlled by the PLC 1. In this example, the work W1 is conveyed by the belt conveyor 140a. The sensor 141a detects that the work W1 has reached a predetermined position. The work W2 is conveyed by the belt conveyor 140b. The sensor 141b detects that the work W2 has reached a predetermined position. The robot 143 assembles the work W1 and the work W2 on the workbench 142 to manufacture the work W3, and loads the work W3 onto the belt conveyor 140c.

[0069] FIG. 17 shows a ladder program that realizes the example shown in FIG. 16. The program module 150a shows an input section. The input device R000 is a relay device indicating the detection result of the sensor 141a. When the sensor 141a detects the work W1, the input device R000 turns on. When the sensor 141a does not detect the work W1, the input device R000 turns off. The input device R001 turns off when the robot 143 can accept the work W1. The input device R001 turns on when the robot 143 cannot accept the work W1. According to the first line of the program module 150a, MR001 turns on when the input device R000 is on and the input device R001 is not on.

[0070] The input device R002 is a relay device that indicates the detection result of the sensor 141b. When the sensor 141b detects the workpiece W2, the input device R002 turns on. When the sensor 141b does not detect the workpiece W2, the input device R002 turns off. The input device R003 turns off when the robot 143 can accept the workpiece W2. The input device R003 turns on when the robot 143 cannot accept the workpiece W1. MR002 is a relay device that indicates that the preparation of the workpiece W2 is complete. According to the second line of the program module 150a, MR002 turns on when the input device R002 is on and the input device R003 is not on.

[0071] The program module 150b indicates the output section. MR000 is a relay device that indicates that the manufacturing line is in operation. When MR000 is on, MR001 is on, and MR002 is on, the relay device R004 turns on. The relay device R004 is called a processing start signal and instructs the robot 143 to start processing (start assembly).

[0072] The program module 150c indicates the processing section status. DM0 is a device called a data memory and indicates 0 (acceptable), 1 (abnormal workpiece), 2 (jammed workpiece), 3 (insufficient material), etc. for the workpiece W1. According to the first line of the program module 150c, when DM0 is other than 0, R001 is set to on. DM1 is also a device called a data memory and indicates 0 (acceptable), 1 (abnormal workpiece), 2 (jammed workpiece), 3 (insufficient material), etc. for the workpiece W2. According to the second line of the program module 150c, when DM1 is other than 0, R003 is set to on.

[0073] As an example of debugging, an example where an abnormality occurs in workpiece W1 and robot 143 does not start processing will be taken up. First, at the time of starting debugging, it is assumed that an error event has occurred in which the finished workpiece W3 is not discharged. The user tries to find out why workpiece W3 was not discharged.

[0074] The user starts the project editing program 14a and selects the monitor mode. The CPU 11 receives a notification from the PLC 1 and displays a notification dialog 108. The CPU 11 detects that the display button 109 has been pressed by the user, obtains an analysis report from the PLC 1, and displays it on the display unit 7.

[0075] As shown in FIG. 12, according to the detection list 114 and the analysis comment 116 of the analysis report, it can be seen that the processing of workpieces W1 and W2 was not executed and workpiece W3 was not discharged because the processing start signal R004 did not turn on. Since R001 is on, it can be seen that the preparation of workpiece W1 was not completed, but the cause of the incomplete preparation of workpiece W1 is not known.

[0076] When the CPU 11 detects that MR001, R001, and R004 are selected in the detection list 114 of the analysis report 110 in FIG. 9 and the button 117b has been pressed, the waveform UI130 shown in FIG. 14 is displayed on the display unit 7. MR000 is a relay indicating one processing cycle. That is, one workpiece W3 is manufactured during the period when MR000 is on.

[0077] When a plurality of devices are selected in the detection list 114, as described above, the CPU 11 identifies the time when the device (the top device) displayed at the top in the detection list is in a state different from usual, and displays the time bar 112g at the identified time. In this example, since R001 is the top device, the time bar 112g is set at the timing when R001 is in a state different from usual. According to this example, it can be seen that R001 is turned on at the timing when it should be off in the normal state. Also, it can be easily visually recognized that MR001 and R004, which should be on in the normal state, are off. In FIG. 14, a waveform corresponding to 6 cycles is shown, but the CPU 11 may cut out and enlarge only the waveform corresponding to 1 cycle including the time indicated by the time bar 112g.

[0078] Next, the user tries to find out why R004 is in a state different from usual. In FIG. 12, when it is detected that R004 is selected and button 117a is pressed, CPU 11 displays relation map 120 on display unit 7. CPU 11 extracts the line containing the description of R004 from the ladder program and creates relation map 120. Relation map 120 may be displayed in a window different from the UI 100 of analysis report 110 or project editing program 14a. As shown in FIG. 13, in relation map 120, it is shown that MR000, MR001, and MR002 are related to R004 in the first row of output unit (program module 150b). CPU 11 may highlight the device that is in a state different from usual and the line number of the program module. Also, when a block in the output unit in relation map 120 is clicked, CPU 11 displays program module 150b in program display area 104. CPU 11 reflects the device values collected at the timing when each device in program module 150b is in a state different from usual. In FIG. 13, it is found that MR001 is off, and as a result, R004 is off. Program module 150b may be displayed in the same window as relation map 120. When the expand button 121 shown in FIG. 13 is clicked, CPU 11 expands and displays the relation for MR001.

[0079] According to FIG. 18, it shows a state where the expansion button 121a of MR001 is clicked and further the expansion button 121b of R001 is clicked. When the expansion button 121a of MR001 is clicked, the CPU 11 searches for the ladder program and extracts the first line (the first line of the input part) of the program module 150a in which MR001 is described. Thereby, the CPU 11 displays a block indicating the first line of the input part on the left side of MR001, and further displays the block of R000 and the block of R001 further to the left of the block indicating the first line of the input part. According to the analysis report or the operation record, it can be seen that R001 is in a state different from usual. Therefore, the CPU 11 highlights the block of R001.

[0080] When the expansion button 121b displayed beside the block of R001 is clicked, the CPU 11 executes a search for R001 and discovers the first line of the program module 150c (processing unit state). The CPU 11 displays a block indicating the first line of the processing unit state on the left side of the block of R001, and further displays the block of DM0 further to the left of that block. Finally, it is found that since DM0 was not "0", R001 was turned on and R004 was turned off.

[0081] In FIG. 18, the program display area 122 shows the extracted program module and also shows the device values of each device at the timing when R004 is in a state different from usual. The blank space indicates that the device is off, and the diagonal line indicates that the device is on. The CPU 11 acquires the device values of each device from the operation record stored in the storage device 12 and reflects them in the relation map 120.

[0082] Although FIG. 18 does not show a seek bar for displaying or specifying the playback time, the seek bar may be provided in the relation map 120. Thus, the user will be able to easily change the playback time of the device value even in the relation map 120. Also in this case, the CPU 11 synchronizes the playback time in the relation map 120 with the playback time of the device value in other user interfaces.

[0083] By checking the device values of each device while changing the playback time in the relation map 120, the user will be able to easily understand how the abnormal states of the device values are chained.

[0084] Note that the device in which an event different from usual has occurred may be highlighted on the ladder program. As shown in FIG. 18, the periphery of R001 may be displayed in hatching or an emphasized color. Also, it may be displayed that the device value in the normal state becomes off. Thus, the user will be able to easily understand the normal device value.

[0085] As described above, FIG. 18 shows the relation map displayed when the button 117a is pressed in the state where the device R004 is selected. However, when the time bar 112e of the analysis report 111 is moved to the left in the state where the relation map 120 shown in FIG. 18 is displayed, the highlighted device changes. This will be described with reference to FIG. 19.

[0086] FIG. 19 is an explanatory diagram showing how the devices to be highlighted are switched. The time bar 112e of the analysis report 111 may be between the timing (14:50:45) detected as different from usual for the devices R001 and MR001 and the timing (14:59:01) detected as different from usual for the device R004. In this case, only the devices R001 and MR001 are highlighted in the relation map 120 (the highlighting of the device R004 disappears). And when the time bar 112e of the analysis report 111 is to the left of the timing (14:50:45) detected as different from usual for the devices R001 and MR001, no device is highlighted in the relation map 120.

[0087] FIG. 19 shows that when the time bar 112e of the analysis report 11 is moved to the left, the devices to be highlighted gradually decrease. This makes it easy to track in time series which device caused the trouble. Note that when the time bar 112e of the analysis report 11 is moved to the right, the devices to be highlighted gradually increase. When the time bar 112e passes the timing (14:50:45) detected as different from usual for the devices R001 and MR001, all of the devices R001, MR001, and R004 are highlighted. In other words, the devices to be highlighted correspond to the devices that have already been detected as different from usual at the time indicated by the time bar 112e of the analysis report 11.

[0088] Note that the relation map 120 shown in FIG. 18 may include devices that are not subject to analysis when creating the analysis report 110. In this case, such devices that are not subject to analysis may be highlighted on the relation map 120. This is because, in addition to devices determined to be different from usual, devices that are not subject to analysis may also correspond to devices that are the cause of trouble. In order to improve the discriminability, it is preferable that the highlighting of devices determined to be different from usual and the highlighting of devices that are not subject to analysis are different highlightings, for example, by changing the type or color of the line. Also, in the relation map 120 shown in FIG. 18, devices (MR001 and R001) that affect the device (R004) selected in the analysis report 110 are displayed to the left of the selected device. However, this is only an example, and the present invention is not limited thereto. For example, devices affected by the device selected in the analysis report 110 may be displayed to the right of the selected device.

[0089] <Flowchart> FIG. 20 is a flowchart showing a method executed by the CPU 11. When the project editing program 14a is started through the operation unit 8, the CPU 11 executes the following processes according to the project editing program 14a.

[0090] In step S1, the CPU 11 (project editing unit 50) reads project data specified by the user. Thereby, the CPU 11 (project editing unit 50) displays the UI 100 on the display unit 7. Information read from the project data is reflected in the project display area 102. The ladder program included in the project data is displayed in the program display area 104.

[0091] In step S2, the CPU 11 (project editing unit 50) sets the operation mode to the edit mode. Thereby, the CPU 11 (reception unit 57) receives an edit instruction input to the program display area 104 and edits the ladder program according to the edit instruction.

[0092] In step S3, the CPU 11 (project editing unit 50) determines whether the monitor mode is selected as the operation mode. When the monitor mode is selected in the mode selection menu 101, the CPU 11 proceeds to S4. If the monitor mode is not selected in the mode selection menu 101, the CPU 11 proceeds to S11.

[0093] In step S4, the CPU 11 (debugging unit 54) determines whether a notification has been issued in the PLC 1. The notification processing unit 58 acquires a notification from the notification issuing unit 84 by polling. Note that step S4 is an optional step. If a notification exists, the CPU 11 proceeds to step S5.

[0094] In step S5, the CPU 11 (debugging unit 54) displays the analysis report 110 on the web browser 60. The debugging unit 54 passes the URL of the analysis report included in the notification to the web browser 60. The web browser 60 generates an HTTP request according to the URL and accesses the web server 51. The web server 51 passes the HTTP request to the protocol conversion unit 52 according to the URL. The protocol conversion unit 52 encapsulates the HTTP request and passes it to the CPU 31 (command processing unit 71) of the basic unit 3. The command processing unit 71 passes the encapsulated HTTP request to the protocol conversion unit 81 of the CPU 41a based on header information, etc. The protocol conversion unit 81 extracts the HTTP request from the encapsulated HTTP request and passes it to the web server 82. The web server 82 passes the web application 61 for displaying the analysis report 110 to the protocol conversion unit 81 as an HTTP response. The protocol conversion unit 81 encapsulates the web application 61 and passes it to the command processing unit 71. The command processing unit 71 passes the encapsulated web application 61 to the protocol conversion unit 52. The protocol conversion unit 52 extracts the web application 61 from the encapsulated web application 61 and passes it to the web server 51. The web server 51 passes the web application 61 to the web browser 60. The web browser 60 displays the analysis report 110 on the display unit 7 by executing the web application 61. The data acquisition unit 63 requests the driving record 74 from the web server 51 via the communication processing unit 62. The web server 51 instructs the download unit 53 to download the driving record 74 from the PLC 1 and store it in the storage device 12. The download unit 53 downloads the driving record 74 from the PLC 1 and stores it in the storage device 12. The web server 51 passes the driving record 74 requested by the data acquisition unit 63 to the data acquisition unit 63. The drawing unit 65 displays the analysis result 77 included in the driving record 74 on the analysis report 110.

[0095] In step S6, the CPU 11 (debugging unit 54) determines whether the operation mode has been switched to the replay mode in the analysis report 110 or the UI 100. When the operation mode is switched to the replay mode by the operation unit 8, the CPU 11 proceeds to step S7. If the operation mode has not been switched to the replay mode, the CPU 11 proceeds to step S5.

[0096] In step S7, the CPU 11 (ladder monitor unit 56) reproduces the operation record 74 downloaded to the storage device 12 on the display unit 7. As described above, the device values of the devices described in the ladder program are read from the operation record 74 in the program display area 104 and reflected in each device. To be reflected in a device means that it is visually shown whether the device is on or off, or that the device value stored in the device is displayed in association with that device. To display the device value in association with the device means, for example, to display the device value near the device in the row where the device is described.

[0097] If the switch to the monitor mode is not instructed in step S3, the CPU 11 proceeds to S11. In step S11, the CPU 11 determines whether the switch to the replay mode has been instructed. If the switch to the replay mode has not been instructed, the CPU 11 proceeds to S2. If the switch to the replay mode has been instructed, the CPU 11 proceeds to S12.

[0098] In step S12, the CPU 11 reproduces the operation record 74 stored in the storage device 12. If the operation record 74 is not stored in the storage device 12, the CPU 11 downloads the operation record 74 from the PLC 1, stores it in the storage device 12, and reproduces the operation record 74. The CPU 11 (reproduction unit 59) superimposes and displays the device values as time-series data included in the operation record 74 on the ladder program. Also, the reproduction unit 59 reads and displays the next device value from the operation record 74 as time passes.

[0099] In step S13, the CPU 11 determines whether to display the analysis report 110. For example, the CPU 11 determines whether an instruction to display the analysis report 110 has been input through the operation unit 8. If the analysis report 110 is not to be displayed, the CPU 11 returns to S12. Here, if an instruction to switch to another mode is given, the CPU 11 switches the operation mode to another mode. If the analysis report 110 is to be displayed, the CPU 11 proceeds to S14.

[0100] In step S14, the CPU 11 causes the web browser 60 to display the analysis report 110.

[0101] [Display processing of analysis report] FIG. 21 shows the details of the display processing of the analysis report in steps S5 and S14.

[0102] In step S21, the CPU 11 specifies a URL (IP address) for displaying the analysis report 110 to the web browser 60. The URL for displaying the analysis report 110 may be included in, for example, the analysis result 77 of the driving record 74.

[0103] In step S22, the CPU 11 (web browser 60) accesses the web server 51 according to the URL for displaying the analysis report 110 and receives a web application 61 for displaying the analysis report 110.

[0104] In step S23, the CPU 11 (web browser 60) executes the web application 61 to display the analysis report 110 on the web browser 60.

[0105] In step S24, the CPU 11 determines whether to display the relation map 120. For example, when the button 117a is clicked, the CPU 11 determines to display the relation map 120 and proceeds to step S25.

[0106] In step S25, the CPU 11 displays the relation map 120 on the display unit 7. For example, the CPU 11 (cooperation unit 64) transmits a display request (HTTP request) for the relation map 120 to the Web server 51 via the communication processing unit 62. This display request includes designation information of an abnormal device and time information indicating the timing when the abnormal state occurred. The Web server 51 passes the display request for the relation map 120 to the relation map unit 55 to have the display component of the relation map prepared. The relation map unit 55 reads out the device values of the abnormal device before and after the timing when the abnormal state occurred from the operation record 74 based on the designation information of the abnormal device and the time information indicating the timing when the abnormal state occurred, creates the display component of the relation map 120, and passes it to the Web server 51. The Web server 51 passes the display component of the relation map 120 to the Web browser 60. The Web browser 60 displays the relation map 120 according to the display component of the relation map 120. Alternatively, the relation map unit 55 may display the relation map 120 on the display unit 7 as a window different from the Web browser 60.

[0107] If it is determined in step S24 not to display the relation map 120, the CPU 11 proceeds to S26. In step S26, the CPU 11 determines whether to display the waveform of the designated device value. For example, if any abnormal device is designated and the button 117b shown in FIG. 12 is clicked, the CPU 11 determines to display the waveform and proceeds to step S27.

[0108] In step S27, the CPU 11 displays the waveform UI 130 on the display unit 7. For example, the CPU 11 (coordination unit 64) transmits a display request (HTTP request) for the waveform UI to the Web server 51 via the communication processing unit 62. This display request includes the specified information of the abnormal device and the time information indicating the timing when the abnormal state occurred. The Web server 51 passes the display request of the waveform UI 130 to the playback unit 59 to have the display components of the waveform UI 130 prepared. Based on the specified information of the abnormal device and the time information indicating the timing when the abnormal state occurred, the playback unit 59 reads out the device values of the abnormal device before and after the timing when the abnormal state occurred from the operation record 74, creates the display components of the waveform UI 130, and passes them to the Web server 51. The Web server 51 passes the display components of the waveform UI 130 to the Web browser 60. The Web browser 60 displays the waveform UI 130 according to the display components. Alternatively, the playback unit 59 may start the waveform display program 14b and display the waveform UI 130 on the display unit 7 as a window different from the Web browser 60.

[0109] Here, after the relation map is displayed in step S25, the CPU 11 determines whether the time bar 112e of the analysis report 110 has been operated (step S28). If the time bar 112e has been operated, as described above with reference to FIG. 19, the CPU 11 (coordination unit 64) performs an emphasized display of the device that has already been detected as different from usual based on the time indicated by the time bar 112e (step S29). Depending on the time indicated by the time bar 112e, no device may be emphasized.

[0110] After the waveform display is performed in step S27, the CPU 11 determines whether the time bar 112e of the analysis report 110 has been operated (step S30). If the time bar 112e has been operated, the CPU 11 (the linking unit 64) links and displays the time bar 112g of the waveform display based on the time indicated by the time bar 112e (step S31). In this embodiment, as described with reference to FIG. 19, the time bar 112g of the waveform display is linked and displayed. However, this is merely an example, and the present invention is not limited to this. For example, the display range of the waveform display may be linked so that the device waveform corresponding to the time indicated by the time bar 112e is displayed.

[0111] [Linking project data, operation logs and analysis results] In the operation record 74 shown in FIG. 5, the project data 75, the operation log 76, and the analysis result 77 are stored in the same folder, so that they are linked. However, the linking method is not limited to this. The logging unit 73 may compress the project data 75, the operation log 76, and the analysis result 77 to generate a single file. Alternatively, the logging unit 73 may link the project data 75, the operation log 76, and the analysis result 77 using unique identification information. In the following, it is assumed that the project data 75, the operation log 76, and the analysis result 77 are linked, but two of these three pieces of information may be linked.

[0112] FIG. 22 shows a method of associating project data 75, operation log 76, and analysis result 77 using identification information. When the logging unit 73 detects a predetermined event, it stores the operation log 76 and the project ID 200 in the operation record storage unit 37 as the operation record 74 and notifies the analysis unit 83. The predetermined event is, for example, an event that should be noted when the user manages the PLC 1 and satisfies the recording conditions predetermined by the user. The logging unit 73, for example, acquires the project ID 200 from the project storage unit 35. The logging unit 73 may determine the project ID 200 by performing a hash operation on the project data 75. Thus, the project ID 200 is the identification information of the project data 75 being executed by the PLC 1 when the predetermined event occurs.

[0113] The analysis unit 83 creates an analysis result 77c and notifies the logging unit 73 of the analysis ID 201, which is the identification information of the analysis result 77c. In this example, the analysis results 77a and 77b generated in the past are also stored in the memory 42b. The logging unit 73 stores the analysis ID 201 in the operation record 74. Thereby, the operation log 76 recorded for the predetermined event is associated with the project data 75b via the project ID 200. Similarly, the operation log 76 recorded for the predetermined event is associated with the analysis result 77c via the analysis ID 201. The notification issuing unit 84 transmits a notification (including the analysis ID) indicating that the analysis result has been created to the PC 2 via the basic unit 3.

[0114] When the project editing unit 50 receives the notification, it acquires the operation record 74 from the basic unit 3 and stores it in the storage device 12. Further, when a reproduction instruction for the operation record 74 is input, the project editing unit 50 acquires the project data 75b corresponding to the project ID 200 included in the operation record 74 from the storage device 12. Since the project ID of the project data 75a is 0, the project data 75a is not selected here. Further, the project editing unit 50 acquires the analysis result 77c corresponding to the analysis ID 201 included in the operation record 74 via the command processing unit 71 of the basic unit 3 and the CPU 41a of the extension unit 4a. As a result, the project data 75, the operation log 76, and the analysis result 77c that were being executed when a predetermined event occurred are stored in the storage device 12 and are used for displaying the analysis report 110 and reproducing the operation record 74.

[0115] Note that when a plurality of different events occur, a plurality of operation records 74 may be generated. In this case, the logging unit 73 may assign a record ID, which is identification information unique to each of the plurality of operation records 74. Thereby, the plurality of operation records 74 may be made distinguishable.

[0116] As shown in FIG. 23, other data may be linked mainly based on the analysis result. In FIG. 23, the project data 75a and 75b are stored in the storage device 12. The operation record storage unit 37 stores the operation records 74a to 74c. The analysis result 77 is stored in the memory 42a.

[0117] When the logging unit 73 detects a predetermined event, it creates an operation log 76 and an operation record 74c including the record ID 202, stores them in the operation record storage unit 37, and notifies the analysis unit 83 of the record ID and the project ID. The logging unit 73 is assumed to acquire the project ID 200 from the project storage unit 35. The project ID 200 is identification information of the project data 75 that was being executed by the PLC 1 when a predetermined event occurred.

[0118] The analysis unit 83 analyzes the operation log 76 to create analysis result data 203, and stores the project ID 200 and the record ID 202 received from the basic unit, together with the analysis result data 203, in the analysis result 77. As a result, the analysis result 77 is linked to the project data 75b via the project ID 200. Similarly, the analysis result 77c is linked to the operation record 74c (operation log 76) recorded for a predetermined event via the record ID 202. The notification issuing unit 84 transmits a notification (including the analysis ID) indicating that the analysis result has been created to the PC 2 via the basic unit 3.

[0119] When the project editing unit 50 receives the notification, it acquires the analysis result 77 from the extension unit 4a via the basic unit 3 based on the analysis ID, and stores it in the storage device 12. Further, when a reproduction instruction for the operation record 74 is input, the project editing unit 50 acquires the project data 75b corresponding to the project ID 200 included in the analysis result 77 from the storage device 12. The project editing unit 50 acquires the operation record 74c corresponding to the record ID 202 included in the analysis result 77 via the command processing unit 71 of the basic unit 3. As a result, the project data 75b, the operation log 76 (operation record 74c), and the analysis result 77 (analysis result data 203) that were being executed when a predetermined event occurred are stored in the storage device 12 and used for displaying the analysis report 110 and reproducing the operation record 74.

[0120] In this way, since the operation record 74 has the project data 75, the operation log 76, and the analysis result 77 linked to each other, information necessary for debugging the ladder program can be easily obtained. For example, even if there are a plurality of different versions of the project data 75, the project data 75b that was used when the operation log 76 was acquired can be easily obtained. Also, the operation log 76 used to acquire the analysis result 77 can be easily obtained.

[0121] By the way, when the operator who is operating PLC1 cannot resolve a trouble, he / she may request the engineer who set PLC1 or created project data 75 to help resolve the trouble. In such a case, the operator may read out the operation record 74, attach it to an email, and send it to the engineer. The engineer may reproduce the operation record 74 attached to the email, display the analysis report 110, or re-edit the project data 75, so that the trouble can be easily resolved.

[0122] The CPU 31 may function as an FTP (File Transfer Protocol) client. When the logging unit 73 stores the operation record 74 in the operation record storage unit 37, it instructs the FTP client to upload the operation record 74. The FTP client uploads the operation record 74 to an FTP server at a pre-specified IP address. Here, the FTP server may operate in the CPU 11 of the PC 2. The project editing unit 50 of the PC 2 can acquire the operation record 74 from the FTP server. For example, when the FTP server stores the operation record 74 in the storage device 12, the project editing unit 50 can read out the operation record 74 from the storage device 12.

[0123] FIG. 24 is a flowchart showing a method of storing an operation record.

[0124] In step S31, the CPU 31 (logging unit 73) determines whether the recording condition (storage condition) of the operation record 74 is satisfied. The recording condition is set in advance by the PC 2 or the like. When the recording condition is satisfied, the CPU 31 proceeds to step S32.

[0125] In step S32, the CPU 31 (logging unit 73) acquires the operation log 76. As described above, the logging unit 73 reads out device values and the like from the ring buffer 36 to create the operation log 76. Here, the logging unit 73 may attach a record ID for identifying the operation record 74 to the operation log 76.

[0126] In step S33, the CPU 31 (logging unit 73) acquires the project data 75 being executed in the basic unit 3 or the project ID which is the identification information thereof.

[0127] In step S34, the CPU 31 (logging unit 73) associates the operation log 76 with the project (project ID or project data 75). For example, the logging unit 73 stores the operation log 76 and the project data 75 in the same folder or file. Alternatively, the logging unit 73 stores the operation log 76 and the project ID in the same folder or file.

[0128] In step S35, the CPU 31 (logging unit 73) issues an analysis command to the analysis unit 83 of the expansion unit 4a. For example, the logging unit 73 may send a notification indicating that the operation record 74 (operation log 76) has been saved to the analysis unit 83. The analysis command or notification includes information (e.g., the path name of the folder or file where the operation record 74 is saved, the identification information of the operation record 74) capable of specifying the operation log 76 to be analyzed. The analysis unit 83 accesses the operation log 76 according to this information and creates an analysis result. The analysis unit 83 sends the analysis result 77 or the analysis ID specifying this analysis result to the logging unit 73.

[0129] In step S36, the CPU 31 (logging unit 73) receives the analysis result 77 or the analysis ID from the expansion unit 4a.

[0130] In step S37, the CPU 31 (logging unit 73) associates the operation log 76 with the analysis result 77 for the project. For example, the logging unit 73 stores the operation log 76, the project data 75 (project ID), and the analysis result 77 in the same folder or file. Alternatively, the logging unit 73 stores the operation log 76, the project data 75 (project ID), and the analysis ID in the same folder or file. Thereby, the operation record 74 that associates the project data 75, the operation log 76, and the analysis result 77 with each other is completed. The operation record 74 does not necessarily include the project data 75, the operation log 76, and the analysis result 77 themselves, and may include identification information such as an ID.

[0131] In step S38, the CPU 31 (command processing unit 71) transfers the operation record 74 to the PC 2. For example, the FTP client built into the command processing unit 71 uploads the operation record 74 to the FTP server operating on the PC 2. When the upload is completed, the command processing unit 71 may switch a bit device indicating that the storage of the operation record 74 is completed from off to on. Alternatively, the command processing unit 71 may send a notification indicating that the storage of the operation record 74 is completed to the PC 2. Thereby, the project editing unit 50 can recognize that the operation record 74 is stored in the storage device 12.

[0132] Incidentally, although the analysis unit 83 is implemented in the extension unit 4a, the analysis unit 83 may be implemented in the basic unit 3 or the PC 2. For example, the logging unit 73 may store the operation log 76 and the project data 75 (or project ID) among the operation records 74 on a memory card. Assume that the memory card constitutes a part of the storage device 32. The PC 2 may have a memory card reader capable of reading data from the memory card. The CPU 11 (analysis unit 83) of the PC 2 may read the operation log 76 from the memory card to create an analysis result 77, and store the analysis result 77 or analysis ID in the operation record 74. Thereby, the operation log 76, the project data 75, and the analysis result 77 constituting the operation record 74 may be associated with each other.

[0133] <Summary> [Viewpoint 1] The CPU 11 etc. function as acquisition means for acquiring an analysis report indicating an abnormal device that does not satisfy normal conditions as an analysis result of a plurality of device values collected from a plurality of devices by a programmable logic controller that executes a user program. The display unit 7 etc. function as report display means for displaying the analysis report. The operation unit 8 functions as reception means for receiving a selection input for the analysis report. The CPU 11 and the cooperation unit 64 function as specifying means for specifying the abnormal device selected by the selection input. As shown in FIG. 9 etc., the CPU 11 and the display unit 7 function as graphical display means for graphically displaying information regarding the abnormal device, which is information regarding the device held in the programmable logic controller. Thereby, it becomes possible to provide the user with information on a device (abnormal device) that behaves differently from usual.

[0134] [Viewpoint 2] The CPU 11 and the cooperation unit 64 may function as specifying means for specifying the point in time when an event occurs in which a non-normal device selected by a selection input does not satisfy normal conditions. As described above, the analysis result 77 displayed in the analysis report 110 includes the device value of the non-normal device and the time information at which the device value was collected. Therefore, the cooperation unit 64 can specify from the analysis result 77 the point in time when an event occurs in the non-normal device selected by the pointer 103. Note that the device value and the time information may be acquired from the operation log 76. As shown in FIG. 9 and the like, the CPU 11 and the display unit 7 may function as graphical display means for graphically displaying information about the device in which the device value was collected around the specified point in time and information about the device held in the programmable logic controller.

[0135] [Viewpoint 3] As described with reference to FIG. 7, the graphical display means (e.g., UI 100) may include debug display means (e.g., replay mode) for displaying a debug screen of the user program. The debug display means may display, in the debug screen, in association with the user program, the device value collected from the device as information about the device. The device value is collected by the PLC 1 during the period when the PLC 1 is actually executing the project. Since the actual device value is displayed in association with the user program, it will be easier for the user to debug or improve the user program.

[0136] [Viewpoint 4] An acquisition means (e.g., CPU 11, download unit 53) may be configured to acquire operation record data (e.g., operation record 74) including a plurality of time-series device values collected in a programmable logic controller. The analysis report 110 may be an analysis report that presents abnormal devices that do not meet the normal conditions determined based on the analysis of the operation record data. As shown in FIGS. 7, 9, 14, etc., the CPU 11 and the playback unit 59 are based on a plurality of time-series device values included in the operation record data on a monitor screen for monitoring the device values stored in the devices provided in the PLC 1, and may include a reproduction display means for reproducing and displaying the change in the device value over time. The reproduction display means (e.g., playback unit 59) may reproduce and display the time-series device values collected from the abnormal device and included in the operation record data over time. The reproduction display means (e.g., playback unit 59) may be configured to reproduce and display the time-series device values collected from a plurality of devices around the time when the event occurred and included in the operation record data over time.

[0137] [Viewpoint 5] The relation map 120 is an example of a relation map that shows the target device and other devices related to the target device in the user program based on the analysis result obtained by analyzing the user program for the selected target device. The relation map unit 55 functions as map display means for displaying the relation map 120 on the display unit 7. The map display means (e.g., the relation map unit 55) may highlight the relation map based on the time when the event occurs. For example, an abnormal device or a program module that describes an abnormal device may be highlighted. For example, the display color of a normal device and the display color of an abnormal device may be different. The icon image of a normal device and the icon image of an abnormal device may be different. Characters or symbols indicating that an abnormal event has occurred may be displayed on the abnormal device. Also, among the times when a plurality of abnormal events occur, the time that the user is focusing on may be highlighted. Such a focused time may be highlighted and displayed by the time bar 112. In particular, when the device value is displayed in a waveform, the user can easily understand at which timing an event different from usual has occurred by paying attention to the time bar 112.

[0138] [Viewpoint 6] The CPU 11 and the project editing unit 50 function as acquisition means for acquiring operation record data including a plurality of time-series device values collected in the PLC 1 and an analysis report presenting an abnormal device that does not satisfy the normal conditions determined based on the analysis of the operation record data. The CPU 11 and the playback unit 59 (ladder monitor unit 56) may reproduce and display in time series the device values collected from a plurality of devices around the time when the event occurs, which are the time-series device values included in the operation record data, over time.

[0139] [Viewpoint 7] The CPU 11 functions as acquisition means for acquiring an analysis report indicating an abnormal device that does not satisfy normal conditions as an analysis result of a plurality of device values collected from a plurality of devices by the PLC 1 that executes a user program. The CPU 11 and the relation map unit 55 function as map display means for displaying a relation map 120 indicating the target device of interest and other devices related to the target device of interest in the user program based on the analysis result obtained by analyzing the user program for the selected target device of interest. The relation map unit 55 may highlight the relation map 120 based on the time point when the event occurred.

[0140] [Aspect 8] PLC1 is an example of a programmable logic controller that executes a user program to control a controlled device. PC2 is connected to PLC1 and functions as a program creation support device (monitoring device) that edits a user program and transfers it to PLC1. The communication unit 33 is an example of a first communication means for communicating with the program creation support device. The CPU 31 is an example of an execution means for executing a user program received by the first communication means. The CPU 31 may have a plurality of processor cores or a plurality of processor circuits. The CPU 31, the collection unit 72, and the logging unit 73 function as a recording means for recording an operation record 74 related to the operation of PLC1. The CPU 41a and the analysis unit 83 function as a creation means for analyzing the operation record and creating an analysis report (e.g., analysis result). The Web application 61 that realizes the analysis report 110 is stored in the ROM area of the memory 42a and may be read by the Web server 82. The communication unit 13a of PC2 is an example of a second communication means for communicating with the first communication means. The CPU 11 and the project editing unit 50 are an example of a program editing means for receiving the editing of the user program through an editing screen of the user program. The CPU 11 and the Web browser 60 function as an acquisition means for acquiring an analysis report from PLC1 via the program editing means and displaying it on a report display screen (Figure 9). As a result, it becomes possible to provide the user with the analysis support 110 that may include information on a device (abnormal device) that behaves differently from usual. The Web browser 60 may be a browser incorporated in the project editing unit 50.

[0141] [Viewpoint 9] The web server 51 functions as a first web server that receives an HTTP request regarding the analysis report from the acquisition means. The protocol conversion unit 52 functions as a first conversion means that converts the HTTP protocol of the first web server into a communication protocol used between the first communication means of the PLC 1 and the second communication means of the PC 2. The second communication means (e.g., communication unit 13a) transmits a request signal (e.g., an encapsulated HTTP request) generated by converting the HTTP request regarding the analysis report by the first conversion means to the first communication means. The second communication means (e.g., communication unit 13a) is configured to receive the analysis report as a response to the request signal from the first communication means and pass it to the first conversion means. The acquisition means may be the web browser 60. The report display screen (e.g., analysis report 110) may be the window of the web browser 60.

[0142] [Viewpoint 10] The web server 82 of the extension unit 4a functions as a second web server that provides the analysis report. The protocol conversion unit 81 functions as a second conversion means that converts the request signal into an HTTP request regarding the analysis report and passes it to the second web server. The protocol conversion unit 81 receives the analysis report (web application 61) from the second web server and passes it to the first communication means. The first communication means (e.g., communication unit 33) transmits the analysis report to the second communication means (e.g., communication unit 13a). The second communication means (e.g., communication unit 13a) passes the analysis report to the first conversion means. The first conversion means (e.g., protocol conversion unit 52) passes the analysis report to the first web server (e.g., web server 51). The first web server (e.g., web server 51) passes the analysis report to the web browser (e.g., web browser 60). Thus, even when the extension unit 4a and the PC 2 are not directly connected, it is possible to provide the analysis report 110. When the extension unit 4a and the PC 2 can communicate via the communication cable 9b, the web server 82 of the extension unit 4a can directly pass the analysis report to the web browser 60.

[0143] [Viewpoint 11] The project editing unit 50 may display the content of the operation record 74 associated with the analysis report 110 on the debug screen (e.g., the program display area 104) in association with the user program.

[0144] [Viewpoint 12] The cooperation unit 64 or the download unit 53 may identify the operation record 74 associated with the analysis report 110 based on the information included in the analysis report 110 (analysis result 77). The download unit 53 may function as a download means for downloading the identified operation record 74 from the PLC 1.

[0145] [Viewpoint 13] The storage device 12 functions as a holding means for holding the operation record 74 downloaded by the download means. The playback unit 59 and the debug unit 54 may function as playback means for acquiring and playing back the operation record 74 associated with the analysis report 110 from the holding means.

[0146] [Viewpoint 14] The detection map 111 is an example of a process map that shows the start timing and end timing of a plurality of processes executed according to a user program in the PLC1. The detection list 114 is an example of a list of devices that did not satisfy the assumed normal conditions in advance. The image display area 113 displays a camera image further associated with the time information associated with the device selected in the list. The playback unit 59, the debug unit 54, and the cooperation unit 64 may be configured to play back these display information in time synchronization. As described above, the cooperation unit 64 shares the playback time information in the analysis report 110 and the playback time information of the device value displayed together with the ladder program in the replay mode with the playback unit 59 and the debug unit 54. For example, when the playback time is changed by an operation such as the seek bar 105b or the time bar 112e in the analysis report 110, the cooperation unit 64 notifies the playback unit 59 and the debug unit 54 of the change in the playback time via the communication processing unit 62. Similarly, when the playback unit 59 and the debug unit 54 detect that the playback time has been changed by the seek bar 105a or the like, they notify the cooperation unit 64 of the change in the playback time. Thereby, the playback time of the operation record 74 is synchronized between the project editing unit 50 and the web browser 60.

[0147] [Viewpoints 15 - 17] The relation map unit 55 functions as a map display means for displaying a relation map 120 including the relations between a plurality of devices described in the user program. Thereby, the user will be able to easily find the device that caused the abnormal event.

[0148] The map display means (e.g., the relation map unit 55) may highlight, in the relation map, the devices that do not meet the normal conditions among the target device and other devices. The map display means (e.g., the relation map unit 55) may display a relation map 120 including the target device selected from a list (e.g., the detection list 114) and other devices that are affected by or affect the target device. Note that the devices affected by the target device may not be included in the relation map 120. This is because the devices affected by the target device value do not cause the abnormal events that occur in the target device. That is, the events that cause the abnormal state should have occurred before the time when the abnormal state occurred.

[0149] The map display means (e.g., the relation map unit 55) may highlight the target device selected from the list in the relation map 120. The device value of the target device is the calculation result of the device values of a plurality of different devices. Therefore, even when some of the plurality of related devices used in the calculation are abnormal and other devices are normal, the target device that stores the calculation result may become abnormal. Therefore, if only the abnormal devices among the related devices are highlighted, it will be easier for the user to search for the cause of the abnormal state.

[0150] [Viewpoint 18] The playback unit 59, the debug unit 54, and the cooperation unit 64 may display a seek bar indicating the time to play the operation record 74, and may read out the device value at the time corresponding to the operation on the seek bar from the holding means. Thereby, the user will be able to easily change the playback time. Furthermore, the user will be able to easily search for the cause of the abnormal state by checking the change in the device value while changing the playback time.

[0151] [Viewpoint 19] The reproduction unit 59 and the waveform UI 130 may be configured to waveform and display the time-series data regarding the values of the devices included in the operation record 74. Since the user can easily check the changes in the device values, it will be easier to identify the cause of the abnormal band.

[0152] [Viewpoints 20, 21] The CPU 41a and the analysis unit 83 function as generation means for analyzing the operation record 74 and generating an analysis result when a predetermined event occurs. The CPU 41a and the notification issuing unit 84 function as notification means for notifying the program creation support device (e.g., PC 2) that the analysis result has been generated. As a result, the user will be able to easily grasp that a notable event has occurred.

[0153] Note that, as the predetermined event, for example, it may be that the device value for each scan exceeds the variation range during normal times. Specifically, the CPU 41a constantly monitors (so-called sign monitoring) whether the device values of one or more devices specified in advance by the user exceed the threshold indicating the variation range during normal times. When this device value exceeds the threshold indicating the variation range during normal times, the CPU 41a instructs the CPU 31 to generate the operation record 74 based on that timing. The CPU 31 automatically generates the operation record 74 based on the instruction from the CPU 41a. When the generation of the operation record 74 is completed, the CPU 31 notifies the CPU 41a that the operation record generation is completed. The CPU 41a that has received this notification automatically generates an analysis report based on the operation record 74 generated by the CPU 31. In this way, it becomes possible to monitor the signs before a trouble occurs and identify the cause of the signs by the automatically generated analysis report.

[0154] A notification indicating that the analysis result has been generated may be displayed on the editing screen of the user program. In particular, when the UI 100 for project editing is set to the monitor mode, the CPU 11 polls for the notification. Then, when the CPU 11 receives the notification, it displays a notification dialog 108. Thereby, the user will be able to easily recognize that an event requiring attention has occurred. A display button 109 for displaying the analysis report 110 may be provided in the notification dialog 108. Thereby, the user can easily confirm the details of the analysis result 77. Further, by instructing the reproduction of the operation record 74 from the analysis report 110, the user can reproduce and confirm the device values of the device that requires attention.

[0155] [Viewpoint 22] The analysis comment 116 may function as a comparison display area for comparing and displaying the waveform of the time-series data of the device values included in the operation record 74 and the waveform of the master data acquired in advance for the device values. Thereby, it will be possible to easily grasp what kind of abnormal event has occurred. The master data may be a learning result learned based on a plurality of operation logs 76 or the like, or may be a past operation log 76 specified by the user.

[0156] [Viewpoint 23] The CPU 31 functions as an execution means for executing the user program included in the project. The CPU 31 (collection unit 72) functions as a monitoring means for monitoring the operating state of the PLC 1 during the operation period in which the user program is being executed. The ring buffer 36 functions as a holding means for temporarily holding the monitoring results of the operating state. The CPU 31 (logging unit 73) is an example of a recording means that, when a predetermined event occurs, records the monitoring results held by the holding means as an operation record (operation log 76). The analysis unit 83 functions as an analysis means for analyzing the operation record and generating an analysis result 77. The CPU 31 (logging unit 73) and the CPU 41a function as linking means for linking the analysis result 77 generated from the monitoring results with the operation record (operation log 76) including the monitoring results. As a result, the analysis result 77 is directly or indirectly linked to the operation record 74 (operation log 76). Therefore, it will be possible to identify the operation record 74 that is the source of the analysis result 77 and reproduce the operation of the PLC 1 based on the operation record 74. This will enable the efficient progress of the debugging of the project data 75.

[0157] [Aspect 24] The linking means may further link the project (project data 75) including the user program being executed when the operation record (operation log 76) is recorded to the operation record 74 (operation log 76) and the analysis result 77. As a result, it will be possible to reproduce the operation of the PLC 1 with higher accuracy based on the operation record 74.

[0158] [Aspects 25, 26] The CPU 31 (logging unit 73) may record the analysis result 77 (analysis ID), the monitoring result (operation log 76 or record ID) that is the source of the analysis result 77, and the project (project data 75 or project ID) together as the operation record 74. The CPU 31 (logging unit 73) may record the analysis result 77, the monitoring result that is the source of the analysis result 77, and the project as one file. For example, the operation record 74 may be stored in one folder or one compressed file.

[0159] [Viewpoint 27] The PC 2 is an example of a computer that communicates with the PLC 1. In this case, the PLC 1 may have the above-described execution means, monitoring means, holding means, recording means, analysis means, and linking means. The PC 2 may have an acquisition means (e.g., project editing unit 50) for acquiring the operation record from the PLC 1 and a storage means (e.g., storage device 12) for storing the operation record acquired by the acquisition means. Further, the PC 2 may further have a record playback means (playback unit 59, debug unit 54, Web browser 60) for playing back the monitoring result included in the operation record and a report display means (Web browser 60) for displaying the analysis result included in the operation record as an analysis report.

[0160] [Viewpoint 28] The linking means (e.g., CPU 31) may link the identification information of the operation record, the identification information of the project, and the identification information of the analysis result. Thereby, the project including the user program being executed when the operation record is recorded may be linked to the analysis result generated from the monitoring result.

[0161] [Viewpoint 29] The memory device 12 or the project memory unit 35 functions as a first memory unit that stores a project (e.g., project data 75) and identification information of the project (e.g., project ID). The driving record memory unit 37 may function as a second memory unit that stores the monitoring result, the identification information of the project, and the identification information of the analysis result. The memory 42a may function as a third memory unit that stores the analysis result and the identification information of the analysis result. The project stored in the first memory unit may be associated with the monitoring result stored in the second memory unit by the identification information of the project. The monitoring result stored in the second memory unit and the analysis result stored in the third memory unit may be associated by the identification information of the analysis result. As a result, the monitoring result, the project, and the analysis result may be associated.

[0162] [Viewpoint 30] The driving record memory unit 37 may function as a second memory unit that stores the monitoring result and the identification information of the driving record including the monitoring result. The memory device 32 and the memory 42a may function as a third memory unit that stores the analysis result, the identification information of the project, and the identification information of the driving record. In this case, the project stored in the first memory unit may be associated with the analysis result stored in the third memory unit by the identification information of the project. The monitoring result stored in the second memory unit and the analysis result stored in the third memory unit may be associated by the identification information of the driving record. As a result, the monitoring result, the project, and the analysis result may be associated.

[0163] [Viewpoint 31] The CPU 11 (e.g., the project editing unit 50) may function as an acquisition means for acquiring the driving record, the analysis result, and the project that are mutually associated based on the identification information of the driving record, the identification information of the analysis result, and the identification information of the project. The storage device 12 may function as a storage means for storing the driving record acquired by the acquisition means. The debug unit 54 or the playback unit 59 may function as a record playback means for playing back the monitoring result included in the driving record. The web browser 60 may function as a report display means for displaying the analysis result associated with the driving record as an analysis report.

[0164] [Viewpoint 32] The monitoring result includes the device value stored in the device used by the user program. The monitoring result may store information obtained from symbols different from the device, such as variables used by the user program.

[0165] [Viewpoint 33] The record playback means (e.g., the CPU 11) may display the user program that is a part of the project linked to the driving record, and display the device value of the device included in the monitoring result in association with the device described in the user program.

[0166] [Viewpoint 34] The CPUs 31 and 41a may function as issuing means for issuing a notification when the driving record is recorded. The CPUs 31 and 41a may function as issuing means for issuing a notification when the analysis record is created. When the analysis result is necessarily created when the driving record is recorded, the notification indicating that the driving record is recorded may be synonymous with the notification indicating that the analysis result is created. Similarly, the notification indicating that the analysis result is created may be synonymous with the notification indicating that the driving record is recorded.

[0167] [Viewpoint 35] The acquisition means (e.g., CPU 11) may function as an FTP server that receives the operation record, project, and analysis results uploaded from the PLC 1.

[0168] The invention is not limited to the above-described embodiments, and various modifications and changes are possible within the scope of the gist of the invention.< / plc>

Claims

A programmable logic controller system having a programmable logic controller and an analyzer that forms part of or is communicably connected to the programmable logic controller, comprising: Execution means provided in the programmable logic controller for executing a user program included in a project; A memory provided in the programmable logic controller and having a storage area for storing symbol values accessed according to the user program by the execution means; Monitoring means provided in the programmable logic controller for monitoring an operating state by collecting symbol values stored in the storage area during an operating period in which the user program is being executed; Holding means provided in the programmable logic controller for temporarily holding a monitoring result of the operating state including a plurality of symbol values collected in time series by the monitoring means; Recording means provided in the programmable logic controller for reading from the holding means a monitoring result including a plurality of symbol values collected in time series held by the holding means and being a monitoring result for a predetermined period around the timing when a predetermined event occurred, and recording it as an operation record; Analysis means provided in the analyzer for analyzing the monitoring result included in the operation record and generating an analysis result associating an abnormal symbol with the timing when the symbol became abnormal; Linking means for linking the analysis result generated from the monitoring result by the analysis means to the operation record including the monitoring result; Display data generation means for displaying, in a display area capable of arranging and displaying a plurality of symbols, the timing when the event occurred and the abnormal symbols included in the analysis result, and for displaying individual analysis comments regarding the abnormal symbols selected from among the abnormal symbols; A programmable logic controller system characterized by comprising the above.

2. The programmable logic controller system according to claim 1, wherein the linking means links a project including a user program being executed when the operation record is recorded to the analysis result generated from the monitoring result and the operation record including the monitoring result.

3. The programmable logic controller system according to claim 2, wherein the recording means records the analysis result, the monitoring result on which the analysis result is based, and the project together as the operation record.

4. The programmable logic controller system according to claim 3, wherein the recording means records the analysis result, the monitoring result on which the analysis result is based, and the project as one file.

5. The programmable logic controller system further includes a computer that communicates with the programmable logic controller, the analysis device further includes the display data generation means and forms part of the programmable logic controller, the programmable logic controller further includes the linking means, the computer, an acquisition means for acquiring the operation record from the programmable logic controller, a storage means for storing the operation record acquired by the acquisition means, a record playback means for playing back the monitoring result included in the operation record, The programmable logic controller system according to claim 3 or 4, further comprising a report display means for displaying the analysis result included in the operation record as an analysis report based on the display data generated by the display data generation means.

6. The linking means links the identification information of the operation record, the identification information of the project, and the identification information of the analysis result, so as to link the project including the user program executed when the operation record was recorded to the analysis result generated from the monitoring result. The programmable logic controller system according to claim 2, characterized in that.

7. The recording means, a first storage unit for storing the project and the identification information of the project, a second storage unit for storing the monitoring result, the identification information of the project, and the identification information of the analysis result, and a third storage unit for storing the analysis result and the identification information of the analysis result. The project stored in the first storage unit according to the identification information of the project and the monitoring result stored in the second storage unit are associated with each other, and by associating the monitoring result stored in the second storage unit and the analysis result stored in the third storage unit according to the identification information of the analysis result, the monitoring result, the project, and the analysis result are associated with each other. The programmable logic controller system according to claim 6, characterized in that.

8. The recording means includes a first storage unit that stores the project and identification information of the project; a second storage unit that stores the monitoring result and identification information of the operation record including the monitoring result; a third storage unit that stores the analysis result, the identification information of the project, and the identification information of the operation record, and the project stored in the first storage unit is associated with the analysis result stored in the third storage unit according to the identification information of the project, and the monitoring result stored in the second storage unit and the analysis result stored in the third storage unit are associated with each other according to the identification information of the operation record, whereby the monitoring result, the project, and the analysis result are associated with each other. The programmable logic controller system according to claim 6, characterized in that.

9. The programmable logic controller system further includes a computer that communicates with the programmable logic controller, the analysis device further includes the display data generation means and forms a part of the programmable logic controller, the programmable logic controller further includes the associating means, the computer includes acquisition means for acquiring the operation record from the programmable logic controller; storage means for storing the operation record acquired by the acquisition means; recording and playback means for playing back the monitoring result included in the operation record; report display means for displaying the analysis result included in the operation record as an analysis report based on the display data generated by the display data generation means. The programmable logic controller system according to claim 2, characterized in that it further includes.

10. The programmable logic controller system according to claim 5 or 9, wherein the monitoring result includes a device value stored in a device used by the user program.

11. The programmable logic controller system according to claim 10, wherein the recording and playback means displays the user program that is part of the project associated with the operation record, and displays the device value of the device included in the monitoring result in association with the device described in the user program.

12. The programmable logic controller system according to any one of claims 1 to 11, further comprising issuing means for issuing a notification when the operation record is recorded.

13. The programmable logic controller system according to claim 5, wherein the acquisition means is an FTP server that receives the operation record, the project, and the analysis result uploaded from the programmable logic controller.

Citation Information

Patent Citations

  • Trouble analysis supporting device and simulation system

    JP2000250775A

  • Method for display of abnormality sign diagnostic result

    JP2013008098A

  • Programmable logic controller and data collection device

    JP2019016325A

  • Programmable logic controller and program formation assistance device

    JP2020013527A