Flow path generation program, flow path generation device, and flow path generation method

By generating an event flow chart, simplifying irrelevant events, the program verification process of the programmable controller is simplified, the verification burden caused by the complex variable dependency relationship is solved, and the simplified verification job is realized.

CN120569679AActive Publication Date: 2025-08-29MITSUBISHI ELECTRIC CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202380089970.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2025-08-29
Estimated Expiration
2043-03-14

AI Technical Summary

Technical Problem

In the prior art, when verifying the control program of a programmable controller, there is a problem of complex variable dependencies, which leads to excessive burden on verification jobs.

Method used

Through the process generation program generation device, the log information acquisition unit is used to obtain the variable value transition in the control program, and an event flow chart is generated to exclude unrelated events, and only the event connection with the highest correlation is retained to generate a simplified flow chart.

Benefits of technology

It reduces the verification job burden related to the control programs executed by the programmable controller, and simplifies the understanding and verification process of variable relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120569679A_ABST
    Figure CN120569679A_ABST
Patent Text Reader

Abstract

The program causes the flow generation device (10) to function as a generation unit (12). The generation unit (12) performs a connection operation by setting an initial event generated by an initial variable among the plurality of variables as a first event, and then sets a second event connected by a previous connection operation as a new first event. And generating a flow path in which two or more events are connected in series by excluding an initial event and an event directly or indirectly connected to the initial event from the selection object of the new second event and repeating a connection operation in which the initial event and the event directly or indirectly connected to the initial event are selected from among events generated by a second variable different from the first variable. On the basis of the log information, a second event indicating the highest degree of association with a first event generated by a first variable among a plurality of variables included in the control program is selected, and the second event is connected to the first event.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a process generation program, a process generation device and a process generation method. Background Art

[0002] In factory automation (FA) production, various processes are performed by controlling instruments with programmable controllers. Instrument control by programmable controllers follows the instructions specified by control programs executed by the programmable controllers.

[0003] The control program sometimes becomes the object of verification for confirming whether the programmable controller has performed its actions as expected by the user. In the verification of the control program, the focus is on the relationship between the variables contained in the control program, studying how a specific phenomenon is spread in the control process, or finding out the cause of the specific phenomenon. Therefore, a technology for extracting the relationship between variables from the control program and its execution log has been proposed (for example, refer to Patent Document 1). Patent Document 1 describes the following technology, that is, extracting a group of variables with a dependency relationship by parsing the source code of the control program, and correcting the extracted dependency relationship based on the parsing result of the execution log.

[0004] Patent Document 1: Japanese Patent No. 6833129 Summary of the Invention

[0005] For control programs containing a large number of variables, the number of variables that have dependencies on one variable can become enormous. Consequently, the number of variable groups extracted using the technique in Patent Document 1 increases. Consequently, even if dependencies are corrected based on the analysis results of the execution log, users will be presented with overly complex relationships between variables, potentially making verification difficult. Therefore, there is room for reducing the burden of verifying control programs executed by programmable controllers.

[0006] The present invention has been made in view of the above-mentioned circumstances, and an object of the present invention is to reduce the burden of verification work related to a control program executed by a programmable controller.

[0007] In order to achieve the above-mentioned purpose, the process generation program of the present invention is used to enable a computer to function as the following units: a log information acquisition unit, which acquires log information, which log information indicates the respective changes in the values ​​of multiple variables included in the control program when the programmable controller executes the control program for controlling the instrument; and a generation unit, which generates a process in which two or more events are connected in series, and generates an event flow chart representing the generated process, wherein the process is generated by setting an initial event generated by an initial variable among multiple variables as the first event and performing a connection operation, setting the second event connected by the previous connection operation as a new first event, excluding the initial event and the events directly or indirectly connected to the initial event from the selection objects of the new second event and repeating the connection operation, the connection operation being to select the second event with the highest degree of association indicating the degree of association with the first event generated by the first variable among multiple variables based on the log information from the events generated by the second variable different from the first variable, and connecting the second event to the first event.

[0008] Effects of the Invention

[0009] According to the present invention, a generation unit generates a flow in which two or more events are serially connected by excluding an initial event and any events directly or indirectly connected to it from selection for a new second event and repeating the connection operation. This prevents the flow from containing a large number of variables included in the control program. Consequently, the burden of verifying control programs executed by a programmable controller can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a diagram showing the relationship among the flow generation device, PLC (Programmable Logic Controller), and equipment according to the first embodiment.

[0011] Figure 2 This is a diagram showing an example of a control program according to the first embodiment.

[0012] Figure 3 This is a diagram showing the hardware configuration of the flow generation device according to the first embodiment.

[0013] Figure 4 This is a diagram showing the functional configuration of the flow generation device according to the first embodiment.

[0014] Figure 5 This is a diagram showing an example of log information according to the first embodiment.

[0015] Figure 6 This is a flowchart showing the flow generation process according to the first embodiment.

[0016] Figure 7 This is a flowchart showing the preparation process according to the first embodiment.

[0017] Figure 8 This is a diagram showing an example of representative values ​​and index values ​​calculated in the preparation process according to the first embodiment.

[0018] Figure 9 This is a diagram showing an example of designating an initial event according to the first embodiment.

[0019] Figure 10 This is the first diagram showing an example of event connection according to the first embodiment.

[0020] Figure 11 FIG2 is a second diagram showing an example of event connection according to the first embodiment.

[0021] Figure 12 FIG3 is a third diagram showing an example of event connection according to the first embodiment.

[0022] Figure 13 This is a diagram showing an example of an event flow chart displayed on the UI (User Interface) section according to the first embodiment.

[0023] Figure 14 This is a diagram for explaining the elimination of outlier values ​​according to the second embodiment.

[0024] Figure 15 This is a diagram for explaining clustering according to the second embodiment.

[0025] Figure 16 This is a diagram showing an example of log information according to the third embodiment.

[0026] Figure 17 This is a diagram showing an example of the frequency of counting in the preparation process according to the third embodiment. DETAILED DESCRIPTION

[0027] Hereinafter, a flow generation device according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

[0028] Implementation Method 1

[0029] like Figure 1As shown in FIG. 1 , the process generation device 10 of this embodiment is connected to a programmable controller, namely, a PLC 21, and is equivalent to a management terminal used by a user to manage the PLC 21. Specifically, the process generation device 10 generates a process that represents the relationship between a plurality of variables included in a control program 211 executed by the PLC 21, thereby assisting the user in debugging the control program 211. The process generation device 10 can be connected to the PLC 21 via a communication line such as a USB (Universal Serial Bus) cable, or can be connected via a USB cable.

[0030] Connected to PLC 21 via a field network.

[0031] The PLC 21 is a control device that controls the instrument 22 by executing a pre-written control program 211 in the factory. Figure 1 While one instrument 22 is representatively shown, the PLC 21 may be connected to multiple instruments 22 to control these multiple instruments 22. For example, the PLC 21 may receive a signal from an instrument 22 indicating that the instrument 22, acting as a sensor, has detected a workpiece being conveyed on a belt conveyor. Based on the received signal, the PLC 21 may transmit an operation command to another instrument 22, acting as a robot, to process the workpiece. The PLC 21 may be connected to the instrument 22 via a signal line that transmits a voltage or current signal, or via a field network.

[0032] The control program 211 is created by a user who uses the flow generation device 10 as a management terminal and is written into the PLC 21. Figure 2 As shown in the simplified example in FIG, the control program 211 is a sequence program written in ladder language. The control processing specified in the control program 211 is usually repeatedly executed by the PLC 21 to perform the same process on a plurality of workpieces.

[0033] like Figure 2 As shown, the control program 211 includes input variables and output variables labeled with names. The names of the input variables are obtained by combining "X" indicating that the signal is input to the PLC 21 with a numerical value identifying the input signal, and the names of the output variables are obtained by combining "Y" indicating that the signal is output from the PLC 21 to the instrument 22 with a numerical value identifying the output signal. Figure 2In the example, the value of the output variable "Y1" is controlled in correspondence with the input variable "X1", and the value of the output variable "Y2" is controlled in correspondence with the input variable "X2". For example, the value of the input variable "X1" corresponds to the signal input from the instrument 22 as a sensor, and the value of the output variable "Y1" corresponds to the signal output to the instrument 22 as a robot. The values ​​of the variables are stored in the area corresponding to the name of the variable in the memory of the PLC 21. The variables handled by the control program 211 are also called devices. As types of devices, there are bit devices that represent a 1-bit value corresponding to either the ON state or the OFF state, and word devices that represent word-sized values.

[0034] Verifying control program 211 requires exploring the relationships between events generated by variable values ​​and events generated by other variable values. While referencing the source code of control program 211 provides insights into the relationships between variables, it's difficult to fully understand the relationships expressed in the complex source code. Furthermore, for subsequent maintenance, it's not necessary to fully understand all relationships. Therefore, based on the history of variable values ​​during the execution of control program 211 and the multiple events generated by the variables, the flow generation device 10 estimates the flow of events with the deepest expected relationship and presents it to the user.

[0035] Here, the relationship between variables and events may be a causal relationship, a dependency relationship, or a subordinate relationship, or may be a correlation relationship, a co-occurrence relationship, or an intertwined relationship that is inferred to be related even if there is no relationship in the source code of the control program 211.

[0036] The process generation device 10 is composed of hardware elements for functioning as a computer. Figure 3 As shown, the flow generation device 10 includes a processor 101, a main storage unit 102, an auxiliary storage unit 103, an input unit 104, an output unit 105, and a communication unit 106. The main storage unit 102, the auxiliary storage unit 103, the input unit 104, the output unit 105, and the communication unit 106 are connected to the processor 101 via an internal bus 107.

[0037] The processor 101 includes a CPU (Central Processing Unit) or an MPU (Micro Processing Unit) as a processing circuit. The processor 101 implements various functions and performs the processing described below by executing a program P1 stored in the auxiliary storage unit 103. The program P1 corresponds to a so-called engineering design tool and is an example of a process generation program that enables the process generation device 10 to function as described below.

[0038] The main storage unit 102 includes a RAM (Random Access Memory). The program P1 is loaded from the auxiliary storage unit 103 into the main storage unit 102. The main storage unit 102 is used as a work area for the processor 101.

[0039] The auxiliary storage unit 103 includes nonvolatile memory, typically EEPROM (Electrically Erasable Programmable Read-Only Memory) and HDD (Hard Disk Drive). In addition to the program P1, the auxiliary storage unit 103 also stores various data used by the processor 101. Following instructions from the processor 101, the auxiliary storage unit 103 supplies data used by the processor 101 to the processor 101. Furthermore, the auxiliary storage unit 103 stores data supplied from the processor 101.

[0040] The input unit 104 includes input devices such as hardware switches, input keys, a keyboard, and a pointing device. The input unit 104 acquires information input by a user and notifies the processor 101 of the acquired information.

[0041] The output unit 105 includes output devices such as LEDs (Light Emitting Diodes), LCDs (Liquid Crystal Displays), and speakers, and presents various information to the user according to instructions from the processor 101 .

[0042] The communication unit 106 includes a communication interface circuit for communicating with an external device. The communication unit 106 receives a signal from the outside and outputs the data indicated by the signal to the processor 101. In addition, the communication unit 106 transmits a signal indicating the data output from the processor 101 to the external device.

[0043] Through the coordinated action of the above hardware structure, the process generation device 10 performs various functions. Figure 4 As shown, the process generation device 10 has: a log information acquisition unit 11, which acquires log information representing the changes in the values ​​of variables contained in the control program 211; a generation unit 12, which generates a process of events generated by the variables based on the log information; an output unit 13, which outputs a data file 31 representing the generated process; and a UI unit 14, which acts as an interface between the user 41.

[0044] The log information acquisition unit 11 is mainly implemented by the communication unit 106. The log information acquisition unit 11 receives the log information from the PLC 21. Figure 5 Receive the log information as shown in the example. Figure 5As shown, log information is a time-series collection of records that associates a date and time, the identifier of a variable serving as an input or output variable, and the event that occurred at that date and time. Below, we explain an example where each variable recorded in log information represents a single-bit value, and an event is an event where the variable's value changes from OFF to ON or from ON to OFF. OFF corresponds to zero, and ON corresponds to 1.

[0045] The generation unit 12 is mainly implemented by the processor 101. The generation unit 12 generates a flow in which events recorded in log information are connected in series, generates an event flow chart representing the generated flow, and outputs it to the output unit 13 and the UI unit 14.

[0046] The output unit 13 is mainly implemented by the cooperation of the processor 101 and the communication unit 106. The output destination of the data file 31 output by the output unit 13 can be a recording medium such as a memory card that can be inserted and removed from the flow generation device 10, or a storage device connected via a field network or a LAN (Local Area Network).

[0047] The UI unit 14 is primarily implemented through the coordinated operation of the input unit 104 and the output unit 105. The UI unit 14 obtains information input by the user 41 and provides it to the generator 12, thereby causing the generator 12 to generate a flow based on the information. Furthermore, the UI unit 14 presents the event flow chart generated by the generator 12 to the user 41.

[0048] Next, refer to Figures 6 to 13 , the process generation processing performed by the process generation device 10 is described in detail. Figure 6 The flow generation process shown corresponds to an example of a flow generation method executed by the flow generation device 10 .

[0049] During the process generation process, the log information acquisition unit 11 acquires the control program 211 and log information from the PLC 21 (step S1). The control program 211 can be a source code or object format program. The log information acquisition unit 11 is an example of a log information acquisition unit that acquires log information indicating the transition of the values ​​of multiple variables included in the control program for controlling the instrument when the programmable controller executes the control program. Next, the generation unit 12 performs preparatory processing for generating the process (step S2).

[0050] In preparation, such as Figure 7As shown, the generator 12 extracts the log of variables included in the control program 211 from the log information (step S21). Specifically, the generator 12 scans the control program 211, identifies all input variables and output variables used in the control program 211, and extracts records related to the identified variables from the log information. If the log information only includes records related to the input variables and output variables used in the control program 211, step S21 can be omitted.

[0051] Next, the generator 12 calculates the time difference between the events generated by the variables for all combinations of the two variables (step S22). Specifically, the generator 12 calculates the time difference in the log information for all combinations of events of the input variables and events of the output variables. For example, Figure 8 As shown in the figure, for the combination of the preceding event of input variable X1 changing from OFF to ON and the subsequent events of all output variables Y1 to Y4, there are 8 possible combinations, two for each output variable. If the input variables are also the four variables X1 to X4, there are 64 possible combinations, two for each variable.

[0052] Return to Figure 7 After step S22, the generation unit 12 calculates the representative value of the calculated difference and the index value of the fluctuation for each combination of events (step S23). As described above, the processing specified by the control program 211 is repeatedly executed. Therefore, since each event may occur repeatedly, the time difference is usually calculated multiple times for a specific combination of two events. For example, Figure 5 In the log information, the same event is repeated in a cycle of about 15 minutes. Therefore, the combination of the event in which the input variable X1 turns on and the subsequent event in which the output variable Y1 turns on is recorded multiple times, and other combinations are also recorded multiple times.

[0053] Furthermore, multiple subsequent events can occur after a single preceding event. For example, if multiple events occur after the event where the input variable X1 turns ON at 0:0:0:00, the output variable Y1 turns ON, but only the difference between the events and the most recent one can be calculated.

[0054] exist Figure 8 The representative value and index value of the calculated differences are shown for each combination. Here, the representative value is the average value, and the index value for fluctuation is the standard deviation. However, this is not limiting; the representative value can also be the median value or the mode, and the index value can also be the coefficient of variation.

[0055] Return to Figure 7 If step S23 is completed, the process performed by the process generation device 10 returns from the preparation process to Figure 6 The process shown in Figure 1 generates the processing. Figure 6 As shown in FIG, after the preparation process of step S2, the process generation device 10 sets the initial event of the process (step S3). The initial event is the event that becomes the starting point of the process, and the process generation device 10 receives the designation of the initial event from the user. For example, Figure 9 As shown, from the submenu displayed by clicking the input variable X1 in the control program displayed on the UI unit 14, the event of the variable is designated as the initial event. The initial event can be Figure 9 The event that the variable specified in this way generates first can also be used by the user to further specify the type of event that should be set as the initial event. The variable that generates the initial event is an example of an initial variable.

[0056] Return to Figure 6 The generating unit 12 sets the initial event as the first event, selects the second event with the highest correlation with the first event from the events satisfying the event conditions 1 to 4, and performs a connection operation to connect the second event with the first event (step S4).

[0057] Condition 1 is that the fluctuation index value is less than or equal to the threshold. For example, if the event of input variable X1 turning ON is set as the initial event, if the threshold is 1.0, then Figure 8 In the combination of events where the output variable Y3 turns ON, the standard deviation is 1.1, which exceeds the threshold. Therefore, the event where the output variable Y3 turns ON is not selected as the second event. Alternatively, the threshold can be specified by the user.

[0058] Condition 2 refers to the subsequent event. When the event of input variable X1 turning ON is set as the initial event, the event following the initial event is the selection object of the second event. Figure 8 In the example, the subsequent events of the eight combinations in which the event of input variable X1 turning ON occurs first satisfy condition 2. However, the combination in which the event of input variable X1 turning ON occurs later does not satisfy condition 2.

[0059] Condition 3 indicates that if the variable that generated the first event is an input variable, the event generated by the output variable is an output variable; if the variable that generated the first event is an output variable, the event generated by the input variable is an input variable. If the event for input variable X1 is set as the initial event, the events for output variables Y1 to Y4 are selected as the second event, while other events for input variable X1 and events for other input variables X2 to X4 are not selected as the second event. If representative values ​​and index values ​​are calculated for each combination of input and output variables, as in the preparatory process described above, Condition 3 can be omitted.

[0060] Condition 4 means being different from the following exclusions. Specifically, it means being different from any of the following events: the initial event, other events generated by the variable that generated the initial event, linked events directly or indirectly linked to the initial event, and other events generated by the variable that generated the linked event. However, in condition 4 of step S4, where the event of input variable X1 turning on is set as the initial event, the event for input variable X1 is excluded.

[0061] An event that satisfies conditions 1 to 4 is, for example, Figure 8 Of the events shown, both the event in which the output variable Y1 turns on and the event in which the output variable Y2 turns on.

[0062] The generation unit 12 selects the event with the highest correlation with the first event from the events that meet conditions 1 to 4 as the second event. The smaller the representative value, the higher the correlation. For example, let the correlation be P and the representative value be Q. The correlation is represented by a formula such as P=1 / (Q+1), but it is not limited to this and can also be represented by other formulas. In addition, since the correlation corresponds to the representative value one-to-one, the generation unit 12 can also treat the representative value as the correlation. The generation unit 12 can select the event with the smallest representative value from the events to be selected as the second event. Figure 8 In the example, the event when the output variable Y1 turns ON is selected as the second event.

[0063] Therefore, if Figure 10 As shown in FIG, the node 52 representing the second event that the output variable Y1 turns ON is connected to the node 51 representing the first event that the input variable X1 turns ON. Figure 10 In FIG, the nodes 51 and 52 are connected by arrows indicating a temporal relationship, but they may be connected by lines of a different type than arrows. Figure 10 In the example, the rectangular nodes correspond to input variables, and the oval nodes correspond to output variables. The shading of the nodes corresponds to the events that turn on.

[0064] Return to Figure 6 After step S4, the generator 12 sets the second event connected by the previous connection operation as a new first event, and performs a connection operation to select a new second event with the highest degree of relevance to the new first event from the events that satisfy conditions 1 to 4 and connect it (step S5). Figure 10 In step S5 after the output variable Y1 turns ON is connected to the initial event, the event corresponding to node 52 is set as the new first event, and the same connection operation as step S4 is repeated. Figure 11 As illustrated, the node 53 corresponding to the event in which the input variable X2 turns OFF is connected to the node 52 .

[0065] The connection operation performed in steps S4 and S5 is equivalent to an example of the following connection operation, that is, from the events generated by the second variable different from the first variable, the second event with the highest correlation degree indicating the degree of association with the first event generated by the first variable among multiple variables is selected based on the log information, and connected to the first event.

[0066] Return to Figure 6 After step S5, the generator 12 determines whether there are any remaining events that can be connected to the end of the process (step S6). That is, when the last connected event is set as the new first event, it determines whether there are any remaining events that meet conditions 1 to 4.

[0067] If it is determined that there are still events that can be connected (step S6; Yes), the generator 12 repeats the connection operation of step S5. Figure 11 As shown, nodes 54 to 56 are sequentially connected to generate a flow in which events of input variables and events of output variables are alternately connected in series.

[0068] In step S6, when it is determined that there are no events that can be connected (step S6; No), the generator 12 determines whether all the variable events are connected in the flow (step S7). Figure 11 In the example, since the event of the input variable X3 and the event of the output variable Y2 are not included in the flow, the determination result of step S7 is No.

[0069] If the event is determined to be unconnected for all variables (step S7: No), the generator 12 sets the event generated by the unconnected variable as the first event and performs a connection operation (step S8) by selecting the second event with the highest degree of relevance to the first event from among the events that satisfy conditions 1 to 3 and condition 5. For example, the event in which the input variable X3 turns ON is set as the first event. The method for selecting a single unconnected variable and the method for selecting the type of event associated with the selected variable are arbitrary.

[0070] Condition 5 means that it is an event that constitutes the process. Therefore, step S8 can be said to be a step of searching for a connection target to connect an unconnected event to the process. When the event corresponding to node 54 is selected as the event with the highest correlation from the events that meet conditions 1 to 3 and 5, as shown in the following example: Figure 12 As shown, the node 57 corresponding to the event in which the input variable X3 turns ON is connected to the node 54.

[0071] After that, the generator 12 repeats the determination of step S7. Thus, a certain event is connected to the process with respect to all variables. For example, Figure 12As shown, the node 58 corresponding to the event in which the output variable Y2 turns ON is connected to the node 57.

[0072] Furthermore, if the determination in step S7 is repeated but no new events are connected, the generator 12 may omit or modify a portion of the conditions used in the determination in step S8 to facilitate the connection of the event to the process. For example, the generator 12 may increase the threshold for condition 1 or omit condition 2. Furthermore, if no new events are connected even after modifying the conditions, the generator 12 may determine that all events that can be connected are already connected to the process, and thus return the result of the determination in step S7 to yes.

[0073] In step S7, if it is determined that all variable events have been connected to the process (step S7; Yes), the generator 12 generates an event flow chart representing the generated process, displays the event flow chart on the UI 14, and outputs a data file representing the event flow chart to the output unit 13 (step S9). Specifically, Figure 13 As shown, the UI unit 14 displays the representative value of the time difference between events on the arrows connecting the nodes. This allows the user 41 to easily identify which events occurred at what time intervals. The output unit 13 is an example of an output unit that outputs a data file representing the event flow chart.

[0074] As described above, the generator 12 eliminates the initial event and any events directly or indirectly connected to it from the selection of the new second event and repeats the connection operation, thereby generating a flow in which two or more events are connected in series. This prevents the flow from containing a large number of variables included in the control program 211. Consequently, the burden of verifying the control program 211 executed by the PLC 21 can be reduced.

[0075] Furthermore, the degree of correlation, which indicates the degree of association between events, increases as the representative value of the difference between the time when the first event occurred and the time when the second event occurred decreases. Generally, events with short time differences can be inferred to have some kind of relationship. Therefore, it is desirable to obtain an appropriate flow of events indicated by log information.

[0076] Furthermore, the linking operation is an operation of selecting a second event from events whose index value indicating the fluctuation of the time difference is less than a threshold value. If the index value is large, it can be said that the relationship between the events is weak, so linking inappropriate events can be avoided.

[0077] Furthermore, after generating a flow in which events are connected in series, the generator 12 selects, from among the events constituting the flow, the event with the highest degree of correlation with an unconnected event generated by any of a plurality of variables and not included in the flow, and connects the unconnected event to the selected event to modify the flow. This allows for the creation of a flow that expresses the relationships between as many variables as possible.

[0078] Furthermore, a connection operation connects an output variable to an input variable, and vice versa. Typically, the PLC 21 controls the instrument 22 in response to input signals. Therefore, in the control program of the PLC 21, events associated with the input variables are received and events associated with the output variables are generated. Furthermore, as a result of controlling the instrument 22 and acting on the outside, the PLC 21 receives new input signals, thus receiving events associated with the output variables and generating events associated with the input variables. In this way, events associated with the input variables and output variables alternately influence each other, resulting in a realistic flow.

[0079] Furthermore, the first and second events that are the subject of the connection operation are increases or decreases in the value of a single bit. Here, an increase corresponds to a change to the ON state, and a decrease corresponds to a change to the OFF state. Bit devices are often associated with the presence or absence of input or output in the control program 211. Therefore, a flow that appropriately indicates the order in which input and output are determined is desirable.

[0080] Furthermore, the generator 12 sets the second event connected by the previous connection operation as the new first event, excludes the initial event, other events generated by the variable that generated the initial event, connection events directly or indirectly connected to the initial event, and other events generated by the variable that generated the connection event from the selection of the new second event, and repeats the connection operation to generate a flow. This generates a flow that uses one event for each variable. It is rare for all events generated by a variable to be meaningful; generally, one should focus on a single event. Therefore, it is desirable that the generated flow not include unnecessary events.

[0081] Furthermore, the flow generation device 10 includes an output unit 13 that outputs a data file 31 representing an event flow chart. This facilitates the use of the event flow chart. For example, a manual including the event flow chart can be easily created.

[0082] Implementation Method 2

[0083] Next, Embodiment 2 will be described, focusing on the differences from Embodiment 1. Components identical or equivalent to those in Embodiment 1 are denoted by the same reference numerals. This embodiment differs from Embodiment 1 in that inappropriate sample values ​​calculated as time differences are eliminated before calculating appropriate representative values.

[0084] The control process specified by the control program 211 is preferably executed periodically, but may be temporarily stopped when an abnormality such as a momentary stop occurs. The time difference calculated in the preparation process based on the log information recorded including the period of the above-mentioned exception will be as follows: Figure 14 As shown, the values ​​include deviations that are significantly different from 15 seconds or 16 seconds during normal operation.

[0085] Therefore, the generator 12 detects the deviation values ​​in the distribution of time differences and calculates the representative value based on the sample values ​​that are greater than or equal to 1 time difference after excluding the detected deviation values. For example, the generator 12 excludes the deviation values ​​using the so-called 3σ method. Specifically, the generator 12 calculates the mean value and standard deviation using all the sample values ​​of the time difference, and repeats the process of excluding sample values ​​that deviate from the mean value and standard deviation by more than 3 times until there are no more objects to be excluded. Figure 14 The example of shows that the process of determining the excluded object is repeated 6 times, and as a result, sample values ​​greater than or equal to 972 seconds are excluded as outliers.

[0086] In addition, when both the first event and the second event that are the subject of the connection operation occur only once in the control process specified by the control program 211, the time difference between these events is approximately constant. However, when at least one of the first event and the second event occurs twice or more in the control process, the time difference between the events is not necessarily constant. For example, Figure 15 As shown, regarding the same combination of events, time differences of approximately 20 seconds and approximately 80 seconds sometimes appear alternately.

[0087] Therefore, the generator 12 calculates a representative value based on the results of clustering the time difference sample values. For example, the generator 12 performs clustering using the k-means method and calculates a representative value and a fluctuation index value for each cluster. Furthermore, the generator 12 uses the representative value and index value of at least one cluster as the value used in the join operation. For example, the generator 12 may use the cluster with the smallest representative value, the cluster with the smallest index value, or a weighted average of the values ​​of all clusters.

[0088] As described above, the generator 12 detects outliers in the time difference distribution and calculates a representative value based on sample values ​​with one or more time differences after excluding the detected outliers. This allows for calculation of an appropriate representative value and a realistic flow.

[0089] In addition, the generating unit 12 calculates the representative value based on the result obtained by clustering the sample values ​​of the time difference. Figure 15 The representative value calculated in the same manner as in Embodiment 1 for the distribution suitable for being considered as two clusters is a value that rarely appears in actual log information. In contrast, the generator 12 of this embodiment calculates the representative value based on the clustering result, thereby obtaining a more realistic representative value.

[0090] Implementation 3

[0091] Next, Embodiment 3 will be described, focusing on the differences from Embodiment 1. The same reference numerals are used for the same or equivalent components as those in Embodiment 1. This embodiment differs from Embodiment 1 in that log information does not include date and time, and the time difference is not used in the connection operation.

[0092] like Figure 16 As illustrated, the log information involved in this embodiment is equivalent to the log information involved in embodiment 1 with the date and time omitted. Based on this log information, in the preparation process, Figure 17 As shown, for all combinations of two events, the frequency of the two events occurring consecutively without any other events in between is counted. Then, the generator 12 uses this frequency as the correlation and performs a connection operation. Thus, the same flow as in the first embodiment is generated. In addition, regarding the connection operation, the number of the two events is omitted. Figure 6 The judgment of condition 1 is shown.

[0093] As described above, in the connection operation, the second event with the highest relevance to the first event is an event that occurs immediately after the first event and has a higher frequency than other events. This allows the creation of a flow from a log without time recording.

[0094] As mentioned above, although embodiment of this invention was described, this invention is not limited to the said embodiment.

[0095] For example, in Embodiments 1 and 2, the format of the log information is not limited to associating generated events with their time. Log information may also be information that records variable values ​​at a sampling period shorter than the control processing period, regardless of the presence or absence of events. Based on this information, the presence or absence of events can also be determined during the preparation process. Log information can simply be information that directly or indirectly indicates the transition of variable values ​​while the PLC 21 executes the control program.

[0096] Furthermore, although the example in which the log information acquisition unit 11 acquires log information from the PLC 21 has been described, the present invention is not limited thereto and the log information acquisition unit 11 may acquire log information provided by a user.

[0097] Furthermore, although a flow is generated using events for all variables included in the control program 211, this is not limiting. Alternatively, the UI unit 14 may receive a user specification of a partial program corresponding to a portion of the control program, and the generation unit 12 may generate a flow using the variables included in the partial program as a target. The UI unit 14 is an example of a user interface unit that receives the specification of a partial program included in the control program.

[0098] Furthermore, the conditions used for determination during the connection operation can be arbitrarily changed. For example, condition 3, which alternately connects events for input variables and events for output variables, can be omitted. This allows events for other input variables to be connected to events for input variables, and events for other output variables to be connected to events for output variables.

[0099] In addition, the example of using one event to generate a process for each variable has been described, but the present invention is not limited to this. For example, for variables specified by the user, a process may be generated using all events. Figure 6 The exclusion objects of the condition 4 shown are set as the connection events connected to the initial event in the flow.

[0100] The generation unit 12 is equivalent to an example of a generation unit, which, after performing a connection operation on an initial event generated by an initial variable among multiple variables as a first event, sets the second event connected by the previous connection operation as a new first event, excludes the initial event and the events directly or indirectly connected to the initial event from the selection objects of the new second event and repeats the connection operation, thereby generating a process in which two or more events are connected in series, and generating an event flow chart representing the generated process.

[0101] Furthermore, condition 2 can be changed from a subsequent event to a preceding event relative to the first event, or it can be omitted. In the above embodiment, condition 2 is a subsequent event, so events occurring after the initial event are sequentially connected, resulting in a flow of events occurring after the initial event. This flow can be said to be a flow of events affected by the initial event. On the other hand, if condition 2 is changed to a preceding event, events preceding the initial event are sequentially connected, resulting in a flow that can be said to trace back to the event that caused the initial event.

[0102] Regarding the connection operation according to the third embodiment, the second event having the highest degree of relevance to the first event may be an event that occurs immediately before the first event and has a higher frequency than other events.

[0103] While the example described above treats increases and decreases in the value of a single bit as different types of events, it is also possible to treat value changes as a single event, regardless of the distinction between increases and decreases. Furthermore, events generated by bit devices are not limited to increases and decreases in value; they can be modified to other events, or additional events can be added. For example, a value remaining on or off for a specified period of time can be used.

[0104] Furthermore, the events that constitute the flow are not limited to events generated by bit devices, but may also be events generated by word devices.

[0105] The functions of the flow generation device 10 according to the above-described embodiment can be realized by dedicated hardware, or can be realized by a general computer system.

[0106] For example, the program P1 may be stored in a computer-readable recording medium such as a floppy disk, CD-ROM (Compact Disk Read-Only Memory), DVD (Digital Versatile Disk), or MO (Magneto-Optical Disk) and distributed, and installed in a computer, thereby forming a device that executes the above-described processing.

[0107] Alternatively, the program P1 may be stored in advance in a disk device of a server device on a communication network such as the Internet, and may be superimposed on a carrier wave and downloaded to a computer.

[0108] Furthermore, the above-described processing can also be realized by transferring the program P1 via a network represented by the Internet and starting its execution.

[0109] Furthermore, the above-described processing can also be realized by executing all or part of the program P1 on a server device, and by having a computer execute the program P1 while transmitting and receiving information related to the processing via a communication network.

[0110] Furthermore, when the above functions are realized by sharing the responsibility of the OS (Operating System) or by cooperation between the OS and applications, only the parts other than the OS may be stored in a medium and distributed, or may be downloaded to a computer.

[0111] Furthermore, the means for realizing the functions of the flow generation device 10 is not limited to software, and a part or all of the functions may be realized by dedicated hardware or circuits.

[0112] The present invention can be implemented in various embodiments and variations without departing from the broad spirit and scope of the present invention. Furthermore, the above-described embodiments are provided to illustrate the present invention and are not intended to limit the scope of the present invention. That is, the scope of the present invention is not represented by the embodiments but by the claims. Furthermore, variations implemented within the scope of the claims and their equivalents are considered to fall within the scope of the present invention.

[0113] Industrial Applicability

[0114] The present invention is suitable for verification work of a control program used in FA field.

[0115] Description of the label

[0116] 10 Process generation device, 11 Log information acquisition unit, 12 Generation unit, 13 Output unit, 14 UI unit, 101 Processor, 102 Main storage unit, 103 Auxiliary storage unit, 104 Input unit, 105 Output unit, 106 Communication unit, 107 Internal bus, 21 PLC, 211 Control program, 22 Instrument, 31 Data file, 41 User, 51-58 Nodes, P1 program.

Claims

1. A flow generation program for causing a computer to function as the following unit: a log information acquisition unit that acquires log information indicating changes in the values ​​of a plurality of variables included in a control program for controlling an instrument when the programmable controller executes the control program; and A generation unit that generates a process in which two or more events are connected in series, and generates an event flow chart representing the generated process, wherein the process is generated by setting an initial event generated by an initial variable among the multiple variables as the first event and performing a connection operation, setting a second event connected by the previous connection operation as the new first event, excluding the initial event and events directly or indirectly connected to the initial event from the selection objects of the new second event, and repeating the connection operation, the connection operation being to select the second event with the highest degree of association representing the degree of association with the first event generated by the first variable among the multiple variables based on the log information from among the events generated by the second variable different from the first variable, and connecting the second event to the first event.

2. The process generation program according to claim 1, wherein: The log information shows, in association with time, changes in the values ​​of the plurality of variables when the programmable controller repeatedly executes the processing specified by the control program. The degree of association becomes higher as the representative value of the difference between the time when the first event occurred and the time when the second event occurred is smaller.

3. The process generation program according to claim 2, wherein: The connection operation is an operation of selecting the second event from events in which the index value indicating the fluctuation of the difference is smaller than a threshold value.

4. The process generation program according to claim 3, wherein: After generating the flow, the generating unit selects the event with the highest correlation degree from among the events constituting the flow, which is an unconnected event generated by any of the plurality of variables and not included in the flow, and connects the unconnected event to the selected event to change the flow.

5. The process generation program according to any one of claims 2 to 4, wherein: The generating unit detects an outlier in the distribution of the differences, and calculates the representative value based on one or more of the differences excluding the detected outlier.

6. The process generation program according to any one of claims 2 to 5, wherein: The generation unit calculates the representative value based on a result obtained by clustering a plurality of sample values ​​of the difference.

7. The process generation program according to any one of claims 2 to 6, wherein: The event flow chart represents the flow by nodes corresponding to events and lines connecting the nodes corresponding to the connected events, and the representative values ​​are attached to the lines.

8. The process generation program according to claim 1, wherein: The log information indicates changes in the values ​​of the plurality of variables when the programmable controller repeatedly executes processing specified by the control program. The second event having the highest degree of relevance to the first event is an event that occurs immediately before or after the first event and has a higher frequency than other events.

9. The process generation program according to any one of claims 1 to 8, wherein: When the first variable is an input variable corresponding to an input to the programmable controller, the second variable is an output variable corresponding to an output from the programmable controller to the device. When the first variable is the output variable, the second variable is the input variable.

10. The process generation program according to any one of claims 1 to 9, wherein: The first variable and the second variable are variables representing a 1-bit value. The first event and the second event refer to changes in the value of the 1 bit. The process generation program according to claim 10 , wherein: The first event and the second event each refer to an increase or decrease in the value of the 1 bit.

12. The process generation program according to any one of claims 1 to 11, wherein: The generation unit takes the second event connected by the previous connection operation as the new first event, excludes the events generated by the initial variables, the connection events directly or indirectly connected to the initial event, and other events generated by the variables that generated the connection events from the selection objects of the new second event and repeats the connection operation, thereby generating the process.

13. The process generation program according to any one of claims 1 to 12, wherein: The computer is further configured to function as a user interface unit that receives a designation of a partial program included in the control program. The plurality of variables are variables included in the partial program.

14. The process generation program according to any one of claims 1 to 13, wherein: The computer is further caused to function as an output unit that outputs a data file representing the event flow chart.

15. A process generation device comprising: a log information acquisition unit that acquires log information indicating changes in the values ​​of a plurality of variables included in a control program for controlling an instrument when the programmable controller executes the control program; and A generation unit that generates a process in which two or more events are connected in series, and generates an event flow chart representing the generated process, wherein the process is generated by setting an initial event generated by an initial variable among the multiple variables as the first event and performing a connection operation, setting a second event connected by the previous connection operation as the new first event, excluding the initial event and events directly or indirectly connected to the initial event from the selection objects of the new second event, and repeating the connection operation, the connection operation being to select the second event with the highest degree of association representing the degree of association with the first event generated by the first variable among the multiple variables based on the log information from among the events generated by the second variable different from the first variable, and connecting the second event to the first event.

16. A process generation method, comprising: The log information acquisition unit acquires log information indicating changes in the values ​​of a plurality of variables included in a control program for controlling the device when the programmable controller executes the control program. The generation unit generates a process in which two or more events are connected in series by performing a connection operation on an initial event generated by an initial variable among the multiple variables as a first event, excluding the initial event and events directly or indirectly connected to the initial event from selection objects of the new second event and repeating the connection operation, thereby generating a process in which two or more events are connected in series, wherein the connection operation is to select, from among events generated by a second variable different from the first variable, the second event having the highest degree of association indicating the degree of association with the first event generated by the first variable among the multiple variables based on the log information, and connecting the second event to the first event. The generating unit generates an event flow chart representing the process.

Citation Information

Patent Citations

  • Control system, method, program and information processing device

    CN106062722A

  • Process monitoring device

    JP2019053537A

  • Program creation support device for programmable logic controller

    JP2020134986A

  • Monitoring device and programmable logic controller system

    JP2022158228A

  • Apparatus anomaly monitoring method and system

    US20110276828A1