Debugging support program, debugging support device, debugging support system, and debugging support method

The debugging support system efficiently identifies and displays local dependencies between designated devices in sequence programs, addressing inefficiencies in existing tools by focusing on relevant nodes only.

WO2025243511A1PCT designated stage Publication Date: 2025-11-27MITSUBISHI ELECTRIC CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/019205
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2025-11-27

AI Technical Summary

Technical Problem

Existing debugging tools for sequence programs in programmable logic controllers display all devices dependent on a specified device, including irrelevant ones, leading to inefficient debugging by requiring users to identify relevant devices manually.

Method used

A debugging support system that accepts the designation of a factor and result device, identifying and displaying a partial tree structure showing only the local dependencies between these devices, excluding irrelevant nodes.

Benefits of technology

This approach reduces the need to manually identify relevant devices, minimizing the checking of irrelevant ones, thereby enhancing debugging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024019205_27112025_PF_FP_ABST
    Figure JP2024019205_27112025_PF_FP_ABST
Patent Text Reader

Abstract

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

Description

Debugging support program, debugging support device, debugging support system, and debugging support method

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

[0002] Programmable logic controllers are known to control manufacturing equipment on production lines. Programmable logic controllers control manufacturing equipment by executing a sequence program that includes multiple devices. The sequence program defines the dependencies between multiple devices.

[0003] The terminology used in this specification will be explained below. 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. corresponding to that device.

[0004] Also, in this specification, a second device that "depends on" a first device or a second device 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. Also, 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 relationships between multiple devices defined by a sequence program can be expressed as a tree structure in which each device is 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, "debugging" refers not only to the process of removing a bug when it is known in advance that the bug exists, but also to the process of checking whether or not the bug exists.

[0008] Japanese Patent Application Laid-Open No. 2006-129999 discloses an apparatus for supporting the debugging of a sequence program, which has a function for accepting the designation of one device (hereinafter referred to as a factor device) selected from a plurality of devices included in the sequence program, and a function for displaying devices dependent on the designated factor device.

[0009] In the device disclosed in 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. During debugging, the user checks whether or not there is a bug in each of the devices presented in the tree structure.

[0010] International Publication No. 2014 / 097379

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

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

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

[0014] Furthermore, in the device disclosed in Patent Document 1, irrelevant devices that do not affect the result device are also displayed, which can lead to checking of irrelevant devices, which also hinders the efficiency of debugging.

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

[0016] A debugging support program according to the present disclosure causes a computer that supports the debugging of a sequence program to function as a factor device designation receiving unit, a result device designation receiving unit, a local dependency identification unit, and a display control unit. The sequence program defines dependencies between multiple devices, represented as a tree structure in which each of the multiple devices is a node. The factor device designation receiving unit accepts the designation of a factor device selected from the multiple devices. The result device designation receiving unit accepts the designation of a result device that depends on the factor device among the multiple devices. The local dependency identification unit uses the dependencies represented by the tree structure to identify local dependencies between the factor device and the result device, represented as a partial tree 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. The display control unit displays the partial tree structure representing the local dependency 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 factor device, as nodes other than the root node and leaf nodes.

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

[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.

[0019] Conceptual diagram showing the configuration of a debug support system according to the first embodiment. Conceptual diagram showing the configuration of a debug support device according to the first embodiment. Conceptual diagram showing the functions of the debug support device according to the first embodiment. Flowchart of debug support processing according to the first embodiment. Conceptual diagram illustrating a partial tree structure according to the first embodiment. Conceptual diagram showing the configuration of a debug support device according to the second embodiment. Flowchart of debug support processing according to the second embodiment. Flowchart of debug support processing according to the third embodiment. Flowchart of debug support processing according to the fourth embodiment.

[0020] Hereinafter, embodiments will be described with reference to the drawings, in which the same or corresponding parts are designated by the same reference numerals.

[0021] First Embodiment 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 operations 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 communicates data 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 for receiving 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, thereby realizing 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] The function of the debug support unit 100A of the debug support device 100 will be described below with reference to FIG.

[0030] 3, the debug support unit 100A of the debugging support apparatus 100 includes a factor device designation receiving unit 110. The factor device designation receiving unit 110 receives a factor device designation from a user. The factor 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 factor device 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 designation from a user. The result device is one of multiple devices included in the sequence program 100e that depends on the cause device described above.

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

[0034] As mentioned above, in order to efficiently debug the sequence program 100e, it is desirable to first check a specific portion (hereinafter referred to as the specific portion) of the overall tree structure (hereinafter referred to as the overall tree structure) defined by the sequence program 100e, 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 defining the specific part. For example, the user in charge of debugging determines 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 defined 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 (hereinafter referred to as a local dependency relationship) between a factor device specified by the factor device designation receiving unit 110 and a result device specified by the result device designation receiving unit 120.

[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 a terminal node that has no child node.

[0038] The partial tree structure is 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 the partial tree structure. The search unit 131 sets one of the cause device and the result device as a start-point device that is the start point of the search, and the other as an end-point device that is the end point of the search, and searches for the end-point device and identifies the intermediate device.

[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, in the process of searching for the end device, recognizes a tree structure (hereinafter referred to as a reduction target tree structure) made up of multiple devices that depend on the factor device. By recognizing the reduction target tree structure, intermediate devices can be identified.

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

[0043] The search unit 131 recognizes the tree structure to be reduced in the process of repeating the unit search process. By recognizing the tree structure to be reduced in this way, the search unit 131 can identify intermediate devices when it finds the end device.

[0044] After finding the end-point device, the search unit 131 identifies the partial tree structure described above by removing the nodes represented by the unnecessary devices from the tree structure to be reduced.

[0045] Here, "extra devices" refers to devices other than intermediate devices (excluding start and end devices) among the multiple devices included in the tree structure to be reduced. Specifically, "extra devices" are devices that are affected by a factor device but do not affect a result device.

[0046] The debugging support unit 100A also includes a display control unit 140. The display control unit 140 displays the partial tree structure identified by the local dependency identification unit 130 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 a result device (step S11). The user designates one desired device from among the multiple devices included in the sequence program 100e that is known to depend on the factor device described above 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 search unit 131 sets the factor device specified in step S10 as the start point device, which is the start point of the search, and sets the result device specified in step S11 as the 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 determines whether the device set as the target of determination is the end device (step S14). If the device set as the target of determination is not the end device (step S14: NO), the search unit 131 determines whether the end 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 other devices that depend on the factor device as devices to be determined in the next unit search process, i.e., changes the devices to be determined (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 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 thoroughly 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 S 14. In this way, the unit search process made up of steps S14, S15, and S16 is repeated multiple times.

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

[0058] That is, the fact that the end device has been found (step S14: YES) means that one route from the factor device to the result device in the aforementioned reduction target tree structure made up of a group of devices that depend on the factor device has been recognized by the search unit 131. Therefore, in step S17, the search unit 131 can identify one or more intermediate devices that exist 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, after step S17, the process proceeds to step S18.

[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, if all devices dependent on the factor device have been determined to be the target of the determination (step S18: YES), i.e., if the reduction target tree structure has been thoroughly traversed, the search unit 131 reduces the reduction target tree structure by removing 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, as intermediate nodes, only the intermediate devices identified by the search unit 131 until the determination in step S18 is "YES," and represents the local dependency relationship described above. Note that steps S12 to S18 are an example of a local dependency relationship identification step according to the present disclosure.

[0063] Next, the display control unit 140 displays the partial tree structure identified by the search unit 131 on the display device 100b shown in Fig. 2 (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 indicated by a solid line. In addition, in order to clearly indicate that the partial tree structure TR2 is a part of the reduction-target tree structure TR1 that is traversed by the search unit 131, the parts of the reduction-target tree structure TR1 other than the partial tree structure TR2 are also indicated by dashed lines in Fig. 5.

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

[0066] The tree structure TR1 to be reduced includes nodes N1-N4 and nodes N11-N14 as intermediate nodes other than the root node and leaf nodes. 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 leaf nodes. The partial tree structure TR2 is configured by a connection of edges without branches from the node N0 representing the cause device DVa to the node N112 representing the result device DVb. Therefore, the partial tree structure TR2 represents the local dependency relationship between the cause device DVa and the result device DVb.

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

[0069] As described above, a 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 evaluation when a depth-first search is used as the traversal algorithm is written next to the node.

[0070] Alternatively, 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 of recognizing the entire reduction target tree structure TR1 and identifying all intermediate devices DVc.

[0072] That is, whether a depth-first search or a 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 assuming 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 a depth-first search or a 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 relationship between the cause device DVa and the result device DVb is displayed on the display device 100b. The displayed partial tree structure TR2 includes, as intermediate nodes other than the root node and leaf nodes, only intermediate devices DVc that affect the result device DVb among the devices affected by the cause device DVa.

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

[0075] Second Embodiment The debug support unit 100A of the debugging support device 100 according to the first embodiment may be provided with a function that causes the search unit 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 identification 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 has been repeated by the search unit 131 reaches a predetermined upper limit, the search abort unit 132 causes the search unit 131 to terminate the repetition of the unit search process. The operation of the search abort unit 132 will now be described in detail.

[0078] 7 shows a flowchart of the debugging support process according to this embodiment. In this embodiment, steps S20 to 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 target for judgment in step S16, the search termination unit 132 determines whether 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 up to now 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 terminates the repetition of the unit search process. Then, the search abort unit 132 determines whether at least one intermediate device has already been identified by the searching 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 portion 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 portion of the partial tree structure TR2, which 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 devices have been identified so far (step S21: NO), this means that the end device has not yet been found and partial tree structure TR2 has not been identified. In this case, the search abort unit 132 displays an error message on the display device 100b indicating that partial tree structure TR2 could not be 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 processing 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-described embodiment 2, the termination determination as to whether or not to terminate the repetition of the unit search process was performed based on the number of times the unit search process was repeated. The termination determination may also be performed based on the hierarchical depth between the node represented by the device set as the determination target in the unit search process and the node represented by the starting device. An example in which the termination determination in embodiment 2 is modified will be described below as embodiment 3.

[0087] In this specification, the "hierarchical depth between a first node and a second node" refers to the maximum number of edges that make up the path from the first node to the second node. As an example, in the tree structure TR1 to be reduced shown in Figure 5, the number of edges that make up the 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 debug support process according to this embodiment. In this embodiment, step S20 in Fig. 7 is changed to step S30 in Fig. 8. The steps in Fig. 8 other than step S30 are the same as those shown in Fig. 7.

[0089] After the search unit 131 sets the next target for judgment in step S16, the search abortion unit 132 in this embodiment determines whether the hierarchical depth (hereinafter simply referred to as the hierarchical depth) between the node represented by the device set as the target for judgment and the node represented by the starting device 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 (hereinafter referred to as the termination condition) is that the hierarchical depth has reached the upper limit depth. 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 achieves the same effects as the second embodiment.

[0091] When breadth-first search is used as the cyclic algorithm described above, it is preferable to make the decision to terminate based on the hierarchical depth as in this embodiment. This makes it less likely that the repeated unit search process will be terminated at a stage where the hierarchical depth is too shallow, compared to when the decision to terminate is made based on the number of iterations of the unit search process (hereinafter simply referred to as the number of iterations) as in embodiment 2.

[0092] On the other hand, when a depth-first search is used as the 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 made 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] Fourth Embodiment A configuration applicable to any of the above-described first to third embodiments will be described below.

[0095] 9 shows a flowchart of the debugging support process according to this embodiment. First, the 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 first to third embodiments. That is, step S40 in Fig. 9 is made up of all steps S10 to S19 in the flowcharts shown in Fig. 4, 7, or 8.

[0097] Next, the result device designation receiving unit 120 determines 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 operates the input device 100c to not change the result device, the debugging support process is terminated.

[0098] On the other hand, when the result device is changed (step S41: YES), specifically, when the user performs an operation to change the result device 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 that is different from the result device already specified as the changed result device. Here, the "already specified result device" includes the result device specified in the previous step S11.

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

[0101] According to this embodiment, when extracting a partial tree structure in step S43, the results recognized in step S40 can be utilized. That is, at least a portion 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 the factor device can be quickly extracted.

[0102] The above describes the first to fourth embodiments. The following modifications 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. Alternatively, 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 the 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 the functions shown in FIG. 3 or 6 to an engineering tool that can edit and virtually execute the sequence program 100e. However, it is sufficient that the debugging support device 100 has at least the functions of the debugging support unit 100A among the debugging support unit 100A, the editing unit 100B, and the execution unit.

[0105] 2 is installed on 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 on a computer-readable non-transitory recording medium and distributed.

[0106] The present disclosure allows various embodiments and modifications without departing from the broad spirit and scope of the present disclosure. The above-described embodiments are intended to explain the present disclosure and do not limit the scope of the present disclosure. The scope of the present disclosure is defined by the claims, not the embodiments. Various modifications made within the scope of the claims and the meaning of the disclosure equivalent thereto are considered to be within the scope of the present disclosure.

[0107] 100 Debugging support device, 100A Debugging support unit, 100B Editing unit, 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 unit, 120 Result device designation receiving unit, 130 Local dependency identification unit, 131 Search unit, 132 Search termination unit, 140 Display control unit, 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 debugging support program that causes a computer to function as follows: the computer supports the debugging of a sequence program that defines dependencies between a plurality of devices, the dependencies being represented in a tree structure in which each of the devices is a node; a factor device designation accepting unit that accepts the designation of a factor device selected from the plurality of devices; a result device designation accepting unit that accepts the designation of a result device that depends on the factor device among the plurality of devices; a local dependency identifying unit that uses the dependency represented in the tree structure to identify a local dependency, which is a dependency relationship between the factor device and the result device, represented as a partial tree structure that constitutes a part of the tree structure, the partial tree structure having the factor device as the root node and the result device as a leaf node; and a display control unit that displays the partial tree structure that represents the local dependency relationship identified by the local dependency identifying unit, wherein the partial tree structure includes only intermediate devices that are devices that affect the result device among the devices affected by the factor device, as nodes other than the root node and the leaf nodes.

2. The debugging support program of claim 1, wherein the local dependency identification unit comprises: a search unit that searches for the end-point device and identifies the intermediate device by designating one of the cause device and the result device as a start-point device and the other as an end-point device, and that repeats a unit search process multiple times, in which the device that depends on the start-point device is the target of judgment, the search unit determines whether the device is the end-point device, and if the device is not the end-point device, sets another device that depends on the start-point device as the target of judgment next.

3. The debugging support program according to claim 2, wherein the local dependency identification unit further comprises a search termination unit that causes the search unit to terminate the repetition of the unit search process when the number of times the search unit has repeated the unit search process reaches a predetermined upper limit.

4. The debugging support program of claim 2, wherein the local dependency identification unit further includes a search termination unit that causes the search unit to terminate the repetition of the unit search process when the hierarchical depth in the tree structure 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 reaches a predetermined upper limit depth.

5. The debugging support program according to claim 2, wherein the search section sets the cause device as the start point device and the result device as the end point device.

6. The debugging support program according to claim 2, wherein the search section sets the result device as the start device and the cause device as the end device.

7. A debugging support device that supports the debugging of a sequence program that defines dependencies between a plurality of devices, the dependencies being represented in a tree structure in which each of the plurality of devices is a node, comprising: a factor device designation receiving unit that receives designation of a factor device selected from the plurality of devices; a result device designation receiving unit that receives designation of a result device that depends on the factor device among the plurality of devices; a local dependency identification unit that uses the dependency represented in the tree structure to identify a local dependency, which is a dependency relationship between the factor device and the result device, represented in a partial tree structure that constitutes a part of the tree structure, the partial tree structure having the factor device as a root node and the result device as a leaf node; and a display control unit that displays the partial tree structure that represents the local dependency identified by the local dependency identification unit, wherein the partial tree structure includes only intermediate devices that are devices that affect the result device among the devices affected by the factor device, as nodes other than the root node and the leaf nodes.

8. A debugging support system comprising: the debugging support device according to claim 7; and an execution device that executes the sequence program.

9. A debugging support method for supporting the debugging of a sequence program which defines dependencies between a plurality of devices, the dependencies being represented in a tree structure in which each of the plurality of devices is a node, comprising: a factor device designation receiving step in which a computer receives designation of a factor device selected from the plurality of devices; a result device designation receiving step in which the computer receives designation of a result device which depends on the factor device among the plurality of devices; a local dependency identification step in which the computer uses the dependency represented in the tree structure to identify a local dependency, which is a dependency relationship between the factor device and the result device, represented as a partial tree structure which constitutes a part of the tree structure, the partial tree structure having the factor device as a root node and the result device as a leaf node; and a display control step in which the computer displays the partial tree structure which represents the local dependency, wherein the partial tree structure includes only intermediate devices which are devices which affect the result device among the devices affected by the factor device, as nodes other than the root node and the leaf nodes.

Citation Information

Patent Citations

  • Program-analysis support device and control device

    WO2014097379A1

  • Debugging assistance device, debugging assistance method and debugging assistance program

    WO2020213129A1