DEBUG SUPPORT PROGRAM, DEBUG SUPPORT DEVICE, DEBUG SUPPORT SYSTEM, AND DEBUG SUPPORT METHOD

JPWO2025243511A5Active Publication Date: 2026-04-28MITSUBISHI ELECTRIC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
MITSUBISHI ELECTRIC CORP
Filing Date
2024-05-24
Publication Date
2026-04-28

AI Technical Summary

Benefits of technology

【0017】 上記構成によれば、要因デバイスの指定が受け付けられるのみならず、結果デバイスの指定も受け付けられる。そして、要因デバイスと結果デバイスとの局所依存関係を表す部分ツリー構造が表示される。表示される部分ツリー構造は、要因デバイスに影響を受けるデバイスのうちの、結果デバイスに影響を与えるデバイスである中間デバイスのみを根ノード及び葉ノード以外のノードとして含む。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000014_0000
    Figure 00000014_0000
  • Figure 00000014_0001
    Figure 00000014_0001
  • Figure 00000015_0000
    Figure 00000015_0000
Patent Text Reader

Abstract

The debugging support program causes the computer to function as a cause device designation receiving unit (110), a result device designation receiving unit (120), a local dependency identification unit (130), and a display control unit (140). The cause device designation receiving unit (110) receives designation of a cause device selected from a plurality of devices. The result device designation receiving unit (120) receives designation of a result device that depends on the cause device. The local dependency identification unit (130) identifies local dependency relationships between the cause device and the result device, which are represented by a partial tree structure in which the cause device is the root node and the result device is the leaf node. The partial tree structure includes only intermediate devices, which are devices that affect the result device among devices affected by the cause device, as nodes other than the root node and the leaf nodes.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a debugging support program, a debugging support device, a debugging support system, and a debugging support method. [Background technology]

[0002] Programmable logic controllers are known as devices that control manufacturing equipment in a production line. Programmable logic controllers control manufacturing equipment by executing a sequence program that includes multiple devices. The sequence program specifies the dependencies between multiple devices.

[0003] The following explains the terms used in this specification. In a sequence program, a "device" is a concept equivalent to a variable, and the value of that variable, i.e., the value stored in the memory area allocated to that device, is the "device value." The device value represents the state of the actual equipment, sensor, etc. that corresponds to that device.

[0004] In this specification, a second device that is "dependent" on a first device or that is "affected" by a first device means that a change in the value of the first device can result in a change in the value of the second device, and a second device that "affects" a first device means that a change in the value of the second device can result in a change in the value of the first device.

[0005] A first device and a second device are said to have a "dependency" on each other if the first device is "affected" by the second device, or if the first device "affects" the second device.

[0006] The dependency relationship between multiple devices defined by a sequence program can be expressed as a tree structure with each of the multiple devices as a node. That is, devices connected by edges in the tree structure have a dependency relationship. Specifically, a device represented by a parent node affects a device represented by a child node connected to the parent node by an edge.

[0007] When a defect is found in the control operation of a programmable logic controller, or when a sequence program is created or its contents are modified, the sequence program is debugged. In this specification, "debug" refers not only to the task of removing a bug when it is known in advance that there is a bug, but also to the task of checking whether or not there is a bug.

[0008] Patent Document 1 discloses a device that supports the debugging of a sequence program. This device has a function of accepting the designation of one device (hereinafter, referred to as a factor device) selected from multiple devices included in the sequence program, and a function of displaying devices that depend on the designated factor device.

[0009] In the device of Patent Document 1, all devices that depend on a specified factor device are displayed in a tree structure with the factor device as the root node. That is, each node in the tree structure other than the root node represents a device that depends on the factor device. In debugging, the user checks whether or not there is a bug for each of the devices presented in the tree structure. [Prior art documents] [Patent documents]

[0010] [Patent Document 1] International Publication No. 2014 / 097379 Summary of the Invention [Problem to be solved by the invention]

[0011] A sequence program may contain a huge number of devices. In such cases, it is particularly cumbersome to check all devices that depend on the factor device one by one.

[0012] Therefore, in order to perform debugging efficiently, it may be desirable to first check the parts particularly suspected of having a bug, especially the parts forming an important logical structure, etc. Specifically, instead of checking the entire tree structure with the cause device as the root node, it may be desirable to first check only the dependency relationship between the cause device and a specific device (hereinafter referred to as a result device) that is known in advance to be affected by the cause device.

[0013] However, in the device according to Patent Document 1, all devices that depend on the cause device are displayed, which requires the user to find the devices to be checked, that is, the devices that affect the result device described above, from among the displayed devices, and this work hinders the efficiency of debugging.

[0014] In addition, in the device according to Patent Document 1, irrelevant devices that do not affect the result device as described above are also displayed, so that the user may end up checking the irrelevant devices. This is also a factor that hinders the efficiency of debugging.

[0015] An object of the present disclosure is to provide a debug support program, a debug support device, a debug support system, and a debug support method that enable efficient debugging of a sequence program. [Means for solving the problem]

[0016] A debugging support program according to the present disclosure causes a computer that supports debugging of a sequence program to function as a cause device designation receiving unit, a result device designation receiving unit, a local dependency identifying unit, and a display control unit. The sequence program defines the dependencies between multiple devices, which are represented in a tree structure with each device being a node. The factor device designation receiving unit receives the designation of a factor device selected from a plurality of devices. The result device designation receiving unit receives designation of a result device that depends on a factor device among a plurality of devices. The local dependency identification unit uses the dependency represented in a tree structure to identify a local dependency, which is a dependency between a factor device and a result device, represented in a partial tree structure that constitutes a part of the tree structure, and in which the factor device is the root node and the result device is the leaf node. The display control unit displays a partial tree structure representing the local dependency relationship identified by the local dependency identification unit. The partial tree structure includes only intermediate devices, which are devices that affect the result device among devices affected by the cause device, as nodes other than the root node and leaf nodes. The local dependency specification unit has a search unit that searches for an end-point device and specifies an intermediate device by using one of the cause device and the result device as a start-point device and the other as an end-point device. The search unit sets a device having a dependency relationship with the start-point device as a determination target, determines whether the device is an end-point device, and if the device is not an end-point device, repeats a unit search process multiple times to set another device having a dependency relationship with the start-point device as a determination target for the next time. Effect of the Invention

[0017] According to the above configuration, not only the specification of the cause device but also the specification of the result device is accepted. Then, a partial tree structure expressing the local dependency between the cause device and the result device is displayed. The displayed partial tree structure includes only intermediate devices, which are devices that affect the result device among the devices affected by the cause device, as nodes other than the root node and the leaf nodes.

[0018] This eliminates the need to find intermediate devices that affect the result device from among the devices affected by the cause device, and also reduces the risk of checking unrelated devices that do not affect the result device, thereby enabling efficient debugging of sequence programs. [Brief description of the drawings]

[0019] [Figure 1] FIG. 1 is a conceptual diagram showing a configuration of a debugging support system according to a first embodiment. [Diagram 2] FIG. 1 is a conceptual diagram showing a configuration of a debugging support device according to a first embodiment. [Diagram 3] FIG. 1 is a conceptual diagram showing functions of a debugging support device according to a first embodiment; [Figure 4] Flowchart of debug support process according to the first embodiment [Diagram 5] FIG. 1 is a conceptual diagram illustrating a partial tree structure according to the first embodiment; [Figure 6] FIG. 13 is a conceptual diagram showing a configuration of a debugging support device according to a second embodiment. [Figure 7] Flowchart of debug support process according to the second embodiment [Figure 8] Flowchart of debug support process according to the third embodiment [Figure 9] Flowchart of debug support process according to the fourth embodiment DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] Hereinafter, an embodiment will be described with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals.

[0021] [Embodiment 1] As shown in FIG. 1, a debugging support system 300 according to this embodiment includes an execution device 200 that executes a sequence program, and a debugging support device 100 that supports the debugging of the sequence program.

[0022] The execution device 200 is, for example, a programmable logic controller, a simulator, etc. The simulator executes a sequence program to virtually reproduce the control operation defined by the sequence program.

[0023] The debugging support device 100 includes not only a debugging support unit 100A that realizes a function of supporting the debugging of a sequence program, but also an editing unit 100B that realizes a function of editing the sequence program. The debugging support device 100 acquires the sequence program from the execution device 200.

[0024] The configuration of the debugging support device 100 will be described with reference to Fig. 2. The debugging support device 100 includes a communication device 100a that is responsible for data communication with the execution device 200 shown in Fig. 1. A sequence program to be debugged is loaded into the debugging support device 100 via the communication device 100a.

[0025] The debugging support device 100 also includes a display device 100b that displays information related to debugging support to the user, and an input device 100c that allows the user to input, select, specify, etc., various data required to receive debugging support. The input device 100c and the display device 100b may form a touch screen.

[0026] The debugging support device 100 also includes a storage device 100d that stores a sequence program 100e to be debugged. The storage device 100d also stores a debugging support program 100f. The debugging support program 100f defines at least a procedure for realizing support for debugging the sequence program 100e.

[0027] The debugging support device 100 also includes a processor 100g that executes a debugging support program 100f. The processor 100g executes the debugging support program 100f to implement the functions of the debugging support unit 100A shown in FIG.

[0028] The functions of the editing unit 100B shown in FIG. 1 may be realized by a program (not shown) separate from the debugging support program 100f, or may be realized by the debugging support program 100f.

[0029] Hereinafter, the function of the debug support unit 100A of the debug support device 100 will be described with reference to FIG.

[0030] 3, the debug support unit 100A of the debug support apparatus 100 includes a cause device designation receiving unit 110. The cause device designation receiving unit 110 receives a cause device designated by a user. The cause device is one device selected from a plurality of devices included in the sequence program 100e.

[0031] The user designates a desired device included in the sequence program 100e as a cause device by using the input device 100c shown in FIG.

[0032] The debugging support unit 100A also includes a result device designation receiving unit 120. The result device designation receiving unit 120 receives a result device designated by a user. The result device is one device that depends on the cause device described above among multiple devices included in the sequence program 100e.

[0033] The user specifies, as a result device, one desired device that is known in advance to depend on the above-mentioned factor device, using the input device 100c shown in FIG.

[0034] As mentioned above, in order to efficiently debug sequence program 100e, it is desirable to first check a specific portion (hereinafter referred to as a specific portion) of the overall tree structure defined by sequence program 100e (hereinafter referred to as the overall tree structure), such as a portion that is particularly suspected of containing a bug or a portion that forms a particularly important logical structure.

[0035] Defining the cause device and the result device corresponds to determining the specific part. As an example, a user in charge of debugging may guess the specific part to be checked preferentially from the entire tree structure based on experience, intuition, etc. In other words, the cause device and the result device may be determined based on the user's experience, intuition, etc.

[0036] The debug support unit 100A also includes a local dependency identification unit 130. The local dependency identification unit 130 identifies a dependency relationship between a cause device designated to the cause device designation receiving unit 110 and a result device designated to the result device designation receiving unit 120 (hereinafter referred to as a local dependency relationship).

[0037] Local dependencies are represented by a subtree structure in which the cause device is the root node and the result device is the leaf node. Note that the root node refers to an ancestor node that has no parent node, and the leaf node refers to an end node that has no child node.

[0038] The partial tree structure constitutes a part of the overall tree structure and is specified using the dependencies between devices represented in the overall tree structure. The partial tree structure includes only devices (hereinafter referred to as intermediate devices) that affect the result device among the devices affected by the cause device as nodes (hereinafter referred to as intermediate nodes) other than the root node and leaf nodes.

[0039] Specifically, the local dependency identification unit 130 has a search unit 131 that is responsible for identifying a partial tree structure. The search unit 131 searches for an end-point device and identifies an intermediate device by setting one of the cause device and the result device as a start-point device that is a start point of the search and the other as an end-point device that is an end point of the search.

[0040] In this embodiment, the cause device is set as the start device and the result device is set as the end device. However, the result device may be set as the start device and the cause device as the end device.

[0041] Specifically, the search unit 131 starts from the start device and recognizes a tree structure (hereinafter, referred to as a reduction target tree structure) consisting of multiple devices that depend on the factor device in the process of searching for an end device. By recognizing the reduction target tree structure, it is possible to identify intermediate devices.

[0042] More specifically, the search unit 131 searches for an end point device by repeating a unit search process. In each unit search process, the search unit 131 determines whether a device that is a target of determination is an end point device by determining a device that is dependent on the start point device as a target of determination, and if the device that is a target of determination is not the end point device, sets another device that is dependent on the start point device as a target of determination next time.

[0043] The search unit 131 recognizes the reduction target tree structure in the process of repeating the unit search process. Since the reduction target tree structure is recognized in this manner, the search unit 131 can specify intermediate devices when it finds the end device.

[0044] After locating the end device, the search unit 131 specifies, as the above-mentioned partial tree structure, the tree structure to be reduced, from which nodes represented by unnecessary devices have been removed.

[0045] Here, "extra device" refers to any device other than the intermediate device among the multiple devices included in the reduction target tree structure (excluding the start point device and the end point device). Specifically, among the devices affected by the cause device, a device that does not affect the result device corresponds to an "extra device".

[0046] The debugging support unit 100A also includes a display control unit 140. The display control unit 140 causes the partial tree structure identified by the local dependency identification unit 130 to be displayed on the display device 100b shown in FIG.

[0047] The debugging support process implemented by the cause device designation receiving unit 110, result device designation receiving unit 120, local dependency identifying unit 130, and display control unit 140 will be specifically described below with reference to FIG.

[0048] 4, first, the factor device designation receiving unit 110 receives the designation of a factor device (step S10). The user designates a desired device included in the sequence program 100e as the factor device. Note that step S10 is an example of a factor device designation receiving step according to the present disclosure.

[0049] Next, the result device designation receiving unit 120 receives the designation of the result device (step S11). The user designates one desired device, which is known in advance to depend on the above-mentioned factor device, among the multiple devices included in the sequence program 100e, as the result device. Note that step S11 is an example of a result device designation receiving step according to the present disclosure.

[0050] Next, the searching unit 131 sets the cause device designated in step S10 as a start point device which is the start point of the search, and sets the result device designated in step S11 as an end point device which is the end point of the search (step S12).

[0051] Next, before starting the repetition of the unit search process, the search unit 131 sets the determination target in the first unit search process to the start point device (step S13). Then, the search unit 131 starts the repetition of the unit search process.

[0052] That is, first, the search unit 131 judges whether or not the device set as the judgment target is an end point device (step S14). If the device set as the judgment target is not an end point device (step S14: NO), the search unit 131 judges whether or not the end point device has already been detected (step S15).

[0053] If the end device has not yet been detected (step S15: NO), the search unit 131 sets another device dependent on the factor device as a device to be determined in the next unit search process. That is, the device to be determined is changed (step S16).

[0054] The device to be determined in the next unit search process is selected from among the devices that are dependent on the factor device and that have not yet been determined. In step S16, the search unit 131 selects the device to be determined in the next unit search process according to a traversal algorithm that can traverse all devices that are dependent on the factor device.

[0055] As such a traversal algorithm, a known algorithm, specifically, a depth-first search, a breadth first search, or the like, can be used.

[0056] After the device to be determined in the next unit search process is changed in step S16, the process returns to step S14 again. In this manner, the unit search process constituted by steps S14, S15, and S16 is repeated multiple times.

[0057] When the device to be determined corresponds to the end device in the multiple unit search processes (step S14: YES), the search unit 131 identifies an intermediate device (step S17). Note that, as described above, an intermediate device refers to a device that affects a result device among devices affected by a cause device.

[0058] That is, the fact that the end device has been found (step S14: YES) means that one route from the cause device to the result device in the above-mentioned reduction target tree structure composed of a device group dependent on the cause device has been recognized by the search unit 131. Therefore, in step S17, the search unit 131 can specify one or more intermediate devices existing in the recognized route.

[0059] However, even if the end device is found, it does not necessarily mean that the entire tree structure to be reduced has been recognized. Therefore, in order to thoroughly traverse the tree structure to be reduced and identify all intermediate devices, the process proceeds to step S18 after step S17.

[0060] In step S18, the search unit 131 determines whether all devices dependent on the factor device have been subjected to the determination, i.e., whether the entire tree structure to be reduced has been thoroughly traversed. If there is a device that has not yet been subjected to the determination among the devices dependent on the factor device (step S18: NO), i.e., if the entire tree structure to be reduced has not yet been traversed, the process returns to step S16.

[0061] On the other hand, when all devices dependent on the factor device have been determined as the judgment target (step S18: YES), that is, when the reduction target tree structure has been thoroughly traversed, the searching unit 131 reduces the reduction target tree structure. That is, the searching unit 131 removes nodes represented by extra devices other than the intermediate devices identified up to that point from the reduction target tree structure.

[0062] This identifies the partial tree structure, which is a part of the tree structure to be reduced. The partial tree structure includes only the intermediate devices identified by the search unit 131 until the determination of "YES" in step S18 as intermediate nodes, and represents the local dependency relationship described above. Note that steps S12-S18 are an example of a local dependency relationship identification step according to the present disclosure.

[0063] Next, the display control unit 140 causes the display device 100b shown in Fig. 2 to display the partial tree structure identified by the search unit 131 (step S19). Note that step S19 is an example of a display control step according to the present disclosure. This completes the debugging support process.

[0064] Fig. 5 shows an example of the partial tree structure TR2 displayed on the display device 100b. In Fig. 5, the partial tree structure TR2 is shown by a solid line. In addition, in order to clearly show that the partial tree structure TR2 is a part of the reduction-target tree structure TR1 traversed by the search unit 131, the part of the reduction-target tree structure TR1 other than the partial tree structure TR2 is also shown by a dashed line in Fig. 5.

[0065] In the reduction target tree structure TR1 and the partial tree structure TR2, the node N0 which is the root node represents the cause device DVa specified in step S10, and the node N112 which is the leaf node represents the result device DVb specified in step S11. In this embodiment, the node N0 also corresponds to the start device, and the node N112 also corresponds to the end device.

[0066] The tree structure TR1 to be reduced includes intermediate nodes other than the root node and the leaf nodes, that is, nodes N1-N4 and nodes N11-N14. Of these, only nodes N1 and N11 represent intermediate devices DVc that affect the result device DVb.

[0067] Therefore, the partial tree structure TR2 includes only the nodes N1 and N11 as intermediate nodes other than the root node and the leaf nodes. The partial tree structure TR2 is formed by a connection of edges without branches from the node NO representing the cause device DVa to the node N112 representing the result device DVb. Therefore, the partial tree structure TR2 represents a local dependency relationship between the cause device DVa and the result device DVb.

[0068] The display device 100b displays such a partial tree structure TR2 on the display device 100b. In this specification, "displaying the partial tree structure TR2" means not only (a) displaying only the partial tree structure TR2 and not displaying any part of the tree structure including the partial tree structure TR2 other than the partial tree structure TR2, but also (b) highlighting and displaying only the partial tree structure TR2 in the tree structure including the partial tree structure TR2.

[0069] As described above, the depth-first search can be used as the traversal algorithm used in step S16 in Fig. 4. In Fig. 5, the order in which the devices represented by each node are subjected to judgment when the depth-first search is adopted as the traversal algorithm is written next to the node.

[0070] Also, a breadth-first search may be used as the traversal algorithm. In Fig. 5, the order in which the devices represented by each node are subjected to the search when a breadth-first search is used as the traversal algorithm is written in parentheses next to the node.

[0071] As described above, even after locating the result device DVb, which is the end device, the search unit 131 continues to thoroughly traverse the reduction-target tree structure TR1 to be sure that it recognizes the entire reduction-target tree structure TR1 and identifies all of the intermediate devices DVc.

[0072] That is, whether the depth-first search or the breadth-first search is adopted, the search unit 131 does not end the search when it finds the result device DVb, but continues the search on the assumption that the result device DVb does not exist. As a result, the reduction target tree structure TR1 is traversed thoroughly. In this manner, a search method such as the depth-first search or the breadth-first search is applied to the traversal algorithm.

[0073] As described above, the debugging support device 100 according to this embodiment not only accepts the designation of the cause device DVa but also accepts the designation of the result device DVb. Then, a partial tree structure TR2 representing the local dependency between the cause device DVa and the result device DVb is displayed on the display device 100b. The displayed partial tree structure TR2 includes only the intermediate device DVc that affects the result device DVb among the devices affected by the cause device DVa as an intermediate node other than the root node and the leaf nodes.

[0074] Therefore, the user does not need to find the intermediate device DVc that affects the result device DVb from among the devices that are affected by the cause device DVa. Also, the user is unlikely to check unrelated devices that do not affect the result device DVb. Therefore, the sequence program 100e can be debugged efficiently.

[0075] [Embodiment 2] The debug support section 100A of the debugging support device 100 according to the above-described first embodiment may be provided with a function to cause the searching section 131 to terminate the repetition of the unit search process when a predetermined termination condition is satisfied. A specific example of this will be described below.

[0076] 6, in this embodiment, the local dependency identifying unit 130 further includes a search abort unit 132. The other configurations of the debug support unit 100A of the debug support device 100 are the same as those in the first embodiment.

[0077] When the number of times the unit search process is repeated by the search section 131 reaches a predetermined upper limit, the search abort section 132 causes the search section 131 to end the repetition of the unit search process. The operation of the search abort section 132 will be specifically described below.

[0078] 7 shows a flowchart of the debugging support process according to this embodiment. In this embodiment, steps S20-S22 are added. The other steps in FIG. 7 are the same as those shown in FIG.

[0079] In this embodiment, after the search unit 131 sets the next judgment target in step S16, the search abort unit 132 judges whether or not the number of repetitions of the unit search process so far has reached a predetermined upper limit (step S20).

[0080] If the number of times the unit search process has been repeated has not reached the upper limit (step S20: NO), the process returns to step S14 to continue repeating the unit search process.

[0081] On the other hand, if the number of repetitions of the unit search process has reached the upper limit (step S20: YES), the search abort unit 132 ends the repetition of the unit search process. Then, the search abort unit 132 determines whether or not at least one intermediate device has already been identified by the search unit 131 (step S21).

[0082] If at least one intermediate device has already been identified (step S21: YES), the end device has already been located, and at least a part of the partial tree structure TR2 has been identified by the search unit 131. In this case, the process proceeds to step S19. That is, at least a part of the partial tree structure TR2 that includes only the intermediate device DVc identified so far as an intermediate node is displayed by the display control unit 140 (step S19).

[0083] On the other hand, if no intermediate device has been identified so far (step S21: NO), this means that the end device has not yet been found and the partial tree structure TR2 has not been identified. In this case, the search abort unit 132 causes the display device 100b to display an error message indicating that the partial tree structure TR2 has not been identified (step S22), and forcibly ends the debugging support process.

[0084] According to this embodiment, when the number of repetitions of the unit search process reaches the upper limit, the repetition of the unit search process is terminated. That is, when the number of repetitions of the unit search process reaches the upper limit, the traversal of the reduction target tree structure TR1 is forcibly terminated regardless of whether the end point device has been found or not.

[0085] Therefore, when the number of devices included in the reduction target tree structure TR1 is enormous, it is possible to prevent the time required for the processes from step S13 to step S19 from becoming too long. If an error is displayed in step S22, the user can simply specify a different cause device and result device.

[0086] [Embodiment 3] In the above-mentioned second embodiment, the termination judgment as to whether or not to terminate the repetition of the unit search process is performed based on the number of times the unit search process is repeated. The termination judgment may be performed based on the hierarchical depth between the node represented by the device set as the judgment target in the unit search process and the node represented by the starting device. Hereinafter, an example in which the termination judgment of the second embodiment is changed will be described as a third embodiment.

[0087] In this specification, the "hierarchical depth between a first node and a second node" refers to the maximum number of edges constituting a path from a first node to a second node. As an example, in the tree structure TR1 to be reduced shown in Fig. 5, the number of edges constituting a path from node N0, which is the root node, to node N112, which is a leaf node, is 3. Therefore, the hierarchical depth between node N0 and node N112 is 3.

[0088] Fig. 8 shows a flowchart of the debugging support process according to this embodiment. In this embodiment, step S20 in Fig. 7 is changed to step S30 in Fig. 8. The steps other than step S30 in Fig. 8 are the same as those shown in Fig. 7.

[0089] After the search unit 131 sets the next judgment target in step S16, the search abort unit 132 in this embodiment determines whether the hierarchical depth between the node represented by the device set as the judgment target and the node represented by the starting device (hereinafter simply referred to as the hierarchical depth) has reached a predetermined upper limit depth (step S30).

[0090] That is, in this embodiment, the condition for terminating the repetition of the unit search process is that the hierarchical depth has reached the upper limit depth (hereinafter, referred to as the termination condition). If the termination condition is satisfied (step S30: YES), the process proceeds to step S21, and if the termination condition is not satisfied (step S30: NO), the process returns to step S14, which is the same as in the second embodiment. This embodiment also provides the same effects as the second embodiment.

[0091] In addition, when using breadth-first search as the above-mentioned cyclic algorithm, it is preferable to perform the termination decision based on the hierarchical depth as in the present embodiment. This makes it difficult to terminate the repetition of the unit search process at a stage where the hierarchical depth is too shallow, compared with the case where the termination decision is performed based on the number of repetitions of the unit search process (hereinafter simply referred to as the number of repetitions) as in the second embodiment.

[0092] On the other hand, when a depth-first search is used as a cyclic algorithm, it is preferable to make the decision to terminate based on the number of iterations, which makes it less likely that the unit search process will be terminated when the number of iterations is too small, compared to when the decision to terminate is based on the hierarchical depth.

[0093] However, when a breadth-first search is used as the traversal algorithm, the decision to abort may be made based on the number of iterations, and when a depth-first search is used as the traversal algorithm, the decision to abort may be made based on the hierarchical depth.

[0094] [Embodiment 4] A configuration applicable to any of the above-mentioned embodiments 1 to 3 will be described below.

[0095] A flowchart of the debugging support process according to this embodiment is shown in Fig. 9. First, a first partial tree structure extraction process is performed (step S40).

[0096] This "first partial tree structure extraction process" refers to the debugging support process according to any one of the embodiments 1 to 3. That is, step S40 in Fig. 9 is composed of all steps S10 to S19 in the flowchart shown in Fig. 4, Fig. 7, or Fig. 8.

[0097] Next, the result device designation receiving unit 120 judges whether or not to change the result device (step S41). If the result device is not to be changed (step S41: NO), specifically, if the user uses the input device 100c to perform an operation to not change the result device, the debugging support process is terminated.

[0098] On the other hand, when changing the result device (step S41: YES), specifically, when an operation to change the result device is performed by the user using the input device 100c, the result device designation receiving unit 120 receives the designation of the changed result device (step S42).

[0099] The user uses the input device 100c to specify a device that depends on the factor device specified in the previous step S10 and is different from the result device already specified, as the changed result device. Here, the "result device already specified" includes the result device specified in the previous step S11.

[0100] Then, a partial tree structure having the cause device specified in step S10 as the root node and the result device after the change specified in step S42 as the leaf node is extracted from the reduction target tree structure described above by the search unit 131, and the extracted partial tree structure is displayed by the display control unit 140 (step S43). After that, the process returns to step S41.

[0101] According to this embodiment, when extracting a partial tree structure in step S43, the result recognized in step S40 can be utilized. That is, at least a part of the reduction-target tree structure having the factor device specified in step S10 as the root node has already been recognized by the search unit 131 in step S40. Therefore, when extracting a partial tree structure from the reduction-target tree structure in step S43, the search unit 131 does not need to recognize the reduction-target tree structure again. Therefore, other partial tree structures that share a common factor device can be quickly extracted.

[0102] The above describes the first to fourth embodiments. The following variations are also possible.

[0103] 4, 7, and 8, the case where the cause device DVa is set as the start device and the result device DVb is set as the end device is illustrated. The result device DVb may be set as the start device and the cause device DVa may be set as the end device.

[0104] FIG. 1 illustrates a configuration in which the function of executing the sequence program 100e is realized by an execution device 200, which is dedicated hardware separate from the debugging support device 100. The debugging support device 100 may further include a function of an execution unit that executes the sequence program 100e. In this case, the function of the execution unit may also be realized by the debugging support program 100f. As an example, the debugging support system 300 may be configured by adding each function shown in FIG. 3 or FIG. 6 to an engineering tool that can edit the sequence program 100e and virtually execute it. However, it is sufficient that the debugging support device 100 has at least the function of the debugging support unit 100A among the debugging support unit 100A, the editing unit 100B, and the execution unit.

[0105] 2 is installed in an existing computer, the computer can function as the debugging support device 100 according to the embodiment. The concept of a computer includes an engineering tool and a programmable logic controller. The debugging support program 100f may be distributed via a communication network, or may be stored in a computer-readable non-transitory recording medium and distributed.

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

[0107] 100 debugging support device, 100A debugging support section, 100B editing section, 100a communication device, 100b display device, 100c input device, 100d storage device, 100e sequence program, 100f debugging support program, 100g processor, 110 cause device designation receiving section, 120 result device designation receiving section, 130 local dependency identification section, 131 search section, 132 search termination section, 140 display control section, 200 execution device, 300 debugging support system, DVa cause device, DVb result device, DVc intermediate device, TR2 partial tree structure, TR1 reduction target tree structure.

Claims

1. A computer that assists in debugging a sequence program that defines dependencies between multiple devices, represented in a tree structure with each of the multiple devices as a node, A factor device designation receiving unit that accepts the designation of a factor device to be selected from a plurality of the aforementioned devices, A result device specification receiving unit that receives the specification of a result device which depends on the factor device among the multiple devices, A local dependency identification unit identifies a local dependency that is a dependency between the factor device and the result device, which is represented by a subtree structure that constitutes a part of the tree structure, wherein the factor device is the root node and the result device is the leaf node, using the dependency relationship represented by the tree structure. A display control unit that displays the subtree structure representing the local dependency identified by the local dependency identification unit, To make it function as, The subtree structure includes, as nodes other than the root node and the leaf nodes, only intermediate devices that are affected by the factor device and affect the result device. The local dependency identification unit, A search unit that searches for an endpoint device and identifies an intermediate device, with one of the factor device and the result device being the starting device and the other being the endpoint device, and which repeatedly performs a unit search process multiple times, where it determines whether a device having a dependency relationship with the starting device is the endpoint device, and if the device is not the endpoint device, it sets another device having a dependency relationship with the starting device as the next device to be determined. A debugging support program that has the following features.

2. The local dependency identification unit, When the number of repetitions of the unit search process by the search unit reaches a predetermined upper limit, the search unit terminates the repetition of the unit search process. The debugging support program according to claim 1, further comprising the above.

3. The local dependency identification unit, When the hierarchical depth in the tree structure between the node represented by the device set as the target of determination in the unit search process and the node represented by the starting device reaches a predetermined upper limit depth, the search unit terminates the repetition of the unit search process. The debugging support program according to claim 1, further comprising the above.

4. The search unit uses the factor device as the starting device and the result device as the ending device. A debugging support program according to any one of claims 1 to 3.

5. The search unit uses the result device as the starting device and the factor device as the ending device. A debugging support program according to any one of claims 1 to 3.

6. A debugging support device that assists in debugging a sequence program that defines dependencies between multiple devices, represented in a tree structure in which each of the multiple devices is a node, A factor device designation receiving unit that accepts the designation of a factor device to be selected from a plurality of the aforementioned devices, A result device designation receiving unit that accepts the designation of a result device which depends on the factor device among a plurality of the aforementioned devices, A local dependency identification unit identifies a local dependency that is a dependency between the factor device and the result device, which is represented by a subtree structure that constitutes a part of the tree structure, wherein the factor device is the root node and the result device is the leaf node, using the dependency relationship represented by the tree structure, A display control unit that displays the subtree structure representing the local dependency identified by the local dependency identification unit, Equipped with, The subtree structure includes, as nodes other than the root node and the leaf nodes, only intermediate devices that are affected by the factor device and affect the result device. The local dependency identification unit, A search unit that searches for an endpoint device and identifies an intermediate device, with one of the factor device and the result device being the starting device and the other being the endpoint device, and which repeatedly performs a unit search process multiple times, where it determines whether a device having a dependency relationship with the starting device is the endpoint device, and if the device is not the endpoint device, it sets another device having a dependency relationship with the starting device as the next device to be determined. A debugging support device having the following features.

7. The debugging support device according to claim 6, An execution device that executes the sequence program, A debugging support system equipped with the following features.

8. A debugging support method for supporting the debugging of a sequence program that defines dependencies between multiple devices, represented in a tree structure in which each of the multiple devices is a node, A computer accepts the designation of a factor device to be selected from a plurality of the aforementioned devices in a factor device designation acceptance step, A result device designation acceptance step in which the computer accepts the designation of a result device which depends on the factor device among a plurality of devices, A local dependency identification step in which a computer identifies a local dependency between the factor device and the result device, which is represented by a subtree structure that constitutes a part of the tree structure, with the factor device as the root node and the result device as the leaf node, using the dependency relationships represented by the tree structure. A display control step in which the computer displays the subtree structure representing the local dependencies, Includes, The subtree structure includes, as nodes other than the root node and the leaf nodes, only intermediate devices that are affected by the factor device and affect the result device. The aforementioned local dependency identification step is, A search step in which one of the factor device and the result device is used as the starting device and the other as the ending device, the search step searches for the ending device and identifies the intermediate device, the unit search process is repeated multiple times, the device having a dependency on the starting device is the target of determination, it is determined whether the device is the ending device, and if the device is not the ending device, another device having a dependency on the starting device is set as the target of determination in the next step. Debugging support methods, including those mentioned above.