WO2014097379A1 - プログラム解析支援装置及び制御装置 - Google Patents

プログラム解析支援装置及び制御装置 Download PDF

Info

Publication number
WO2014097379A1
WO2014097379A1 PCT/JP2012/082703 JP2012082703W WO2014097379A1 WO 2014097379 A1 WO2014097379 A1 WO 2014097379A1 JP 2012082703 W JP2012082703 W JP 2012082703W WO 2014097379 A1 WO2014097379 A1 WO 2014097379A1
Authority
WO
WIPO (PCT)
Prior art keywords
dependency
extraction
analysis
unit
variable
Prior art date
Application number
PCT/JP2012/082703
Other languages
English (en)
French (fr)
Inventor
勘 仲井
明一 加藤
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to US14/113,490 priority Critical patent/US20140304551A1/en
Priority to CN201280020510.4A priority patent/CN104160344B/zh
Priority to PCT/JP2012/082703 priority patent/WO2014097379A1/ja
Priority to JP2013521691A priority patent/JP5362148B1/ja
Publication of WO2014097379A1 publication Critical patent/WO2014097379A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC

Definitions

  • the present invention relates to a program analysis support device and a control device.
  • the sampling trace function is known as a function for debugging whether the controller is operating correctly.
  • the sampling trace function acquires (samples) data (trace data) indicating the status of a specified device at a specified timing at a fixed period (sampling period), and stores the acquired trace data in a predetermined memory (sampling trace) Memory). Details of the sampling trace are described in Non-Patent Documents 1 and 2.
  • the device refers to a device in which input / output between the PC measurement monitoring control target and the PC is assigned to the memory address of the PC, and a memory address used internally by the PC.
  • the input device is assigned to the X device
  • the output device is assigned to the Y device
  • the internally used bit data is used for the M device
  • communication is used for the M device
  • the device character is determined in advance by the data type, such as B device for the device, F device for the error occurrence, and so on.
  • the address of each device is expressed in hexadecimal for the X device, Y device, and B device, and in decimal format for the M device and F device.
  • the present inventor has examined and found that there are two problems. As a first problem, since there is a limit to the memory size that can be sampled and traced at a time, it is necessary to narrow down the devices that are suspected of causing the malfunction. Further, as a second problem, there is a case where a sampling trace including a large number of things (for example, device operation) that do not substantially contribute directly to the identification of the cause of the failure may occur.
  • Non-Patent Document 3 There is a slicing technique described in Non-Patent Document 3 as a technique for solving the first problem. That is, in the ladder program, the dependency (directed graph) of the device (variable) is extracted. By using the device dependency (directed graph), it is possible to narrow down the devices suspected of causing the malfunction operation from the program.
  • Patent Document 1 describes that a program analysis is performed by freely combining a plurality of analysis conditions (analysis command, analysis target, etc.). Thus, according to Patent Literature 1, it is possible to quickly specify a location to be edited based on the result of program analysis.
  • debugging work is performed using production equipment with a built-in PC.
  • a debugging operation is performed by connecting a personal computer and a PC, and a debugging operation is performed using a display and operation buttons provided in the production facility.
  • Patent Document 1 does not describe any reproducibility of defects, and does not describe how to extract dependencies that are deeply related to defects in dealing with defects with low reproducibility. That is, the second problem remains unsolved.
  • the present invention has been made in view of the above, and when debugging work is performed using a display and an operation button provided in a production facility, it is deeply related to a problem from a huge and complicated dependency relationship (a directed graph).
  • An object of the present invention is to obtain a program analysis support device that can extract and display dependency relationships (directed graphs) with a small number of operations.
  • a program analysis support apparatus sets a ladder program to be analyzed and sets an analysis condition for setting a starting point of a dependency to be extracted A setting operation unit; an analysis processing execution unit including a variable dependency extraction unit that extracts a forward or backward device dependency from the ladder program; and a variable dependency display processing unit that displays the extracted device dependency.
  • An analysis result display processing unit and a circuit display processing unit that displays the ladder program
  • the analysis condition setting operation unit is a first condition relating to a device that does not extract a further forward or backward device dependency, or further A second condition relating to a device for extracting a forward or backward device dependency
  • the variable The existing relationship extraction unit does not extract a further forward or backward device dependency for a device that matches the first condition, and sets a further forward or backward device dependency for a device that meets the second condition.
  • the ladder program extracts a forward or backward device dependency from the set starting point as a starting point, generates a first extraction result
  • the variable dependency display processing unit includes the first The device dependence is displayed according to the extraction result.
  • the device dependence can be efficiently narrowed down using the directionality of the device dependence.
  • the dependency (directed graph) deeply related to the defect is extracted from the huge and complicated dependency (directed graph) without specifying a large number of analysis conditions (analysis command, analysis target, etc.). It becomes possible.
  • the dependency (directed graph) that is deeply related to the defect is extracted with a small number of operations from the huge and complicated dependency (directed graph). Can be displayed.
  • FIG. 1 is a diagram illustrating a hardware configuration of the program analysis support apparatus according to the first embodiment.
  • FIG. 2 is a diagram illustrating a functional configuration of the program analysis support apparatus according to the first embodiment.
  • FIG. 3 is a diagram illustrating a configuration of an analysis condition setting operation unit according to the first embodiment.
  • FIG. 4 is a diagram illustrating a directed graph corresponding to the forward dependency extraction result in the first embodiment.
  • FIG. 5 is a diagram showing a configuration of the ladder program in the first embodiment.
  • FIG. 6 is a diagram illustrating a forward analysis condition setting example in consideration of the device type in the first embodiment.
  • FIG. 7 is a diagram illustrating a directed graph corresponding to the example of the forward dependency extraction result in consideration of the device type in the first embodiment.
  • FIG. 1 is a diagram illustrating a hardware configuration of the program analysis support apparatus according to the first embodiment.
  • FIG. 2 is a diagram illustrating a functional configuration of the program analysis support apparatus according to the first embodiment.
  • FIG. 3
  • FIG. 8 is a diagram illustrating a backward analysis condition setting example in consideration of the device type in the first embodiment.
  • FIG. 9 is a diagram illustrating an example of displaying a ladder circuit related to the portion from the dependency graph display in the first embodiment.
  • FIG. 10 is a flowchart showing the dependency extraction processing in consideration of the device type in the first embodiment.
  • FIG. 11 is a diagram illustrating a forward analysis condition setting example in consideration of the device type in the first embodiment.
  • FIG. 12 is a flowchart showing the dependency extraction processing in consideration of the device type in the first embodiment.
  • FIG. 13 is a diagram illustrating a forward analysis condition setting example in consideration of the reference count in the second embodiment.
  • FIG. 14 is a diagram illustrating an example of a forward dependency extraction result in consideration of the number of references in the second embodiment.
  • FIG. 15 is a flowchart illustrating a dependency extraction process in consideration of the number of references in the second embodiment.
  • FIG. 16 is a diagram illustrating an analysis condition setting operation unit according to the second embodiment.
  • FIG. 17 is a diagram illustrating a usage status extraction result in the second embodiment.
  • FIG. 18 is a diagram illustrating a configuration of a ladder program according to the third embodiment.
  • FIG. 19 is a diagram illustrating a backward dependency extraction result according to the third embodiment.
  • FIG. 20 is a diagram illustrating an analysis condition setting operation unit according to the third embodiment.
  • FIG. 21 is a diagram illustrating a backward dependence extraction result in consideration of the number of control dependences in one ladder line in the third embodiment.
  • FIG. 22 is a flowchart illustrating the dependency extraction process in consideration of the number of control dependencies in one ladder line in the third embodiment.
  • FIG. 23 is a diagram illustrating self-holding in the fourth embodiment.
  • FIG. 24 is a diagram illustrating a forward analysis condition setting example in consideration of the self-holding device according to the fourth embodiment.
  • FIG. 25 is a flowchart illustrating the dependency extraction process in consideration of the self-holding device according to the fourth embodiment.
  • FIG. 26 is a flowchart showing an extraction process in which the end point of the obtained dependency relationship is automatically set as a new starting point in the fifth embodiment.
  • FIG. 27 is a diagram illustrating a result of extracting the forward dependency in the fifth embodiment.
  • FIG. 28 is a flowchart showing the dependency extraction processing in consideration of the A contact in the seventh embodiment.
  • FIG. 29 is a diagram illustrating an analysis condition setting operation unit according to the eighth embodiment.
  • FIG. 30 is a diagram showing a device memory dump in the eighth embodiment.
  • FIG. 31 is a diagram showing a configuration of a ladder program in the eighth embodiment.
  • FIG. 32 is a diagram illustrating a backward dependency extraction result according to the eighth embodiment.
  • FIG. 33 is a flowchart illustrating the dependency extraction processing in consideration of the device memory dump in the eighth embodiment.
  • FIG. 34 is a diagram showing the result of extracting the dependency relationship in the ninth embodiment.
  • FIG. 35 is a diagram illustrating dependency display in the ninth embodiment.
  • FIG. 36 is a diagram illustrating a hardware configuration according to the tenth embodiment.
  • FIG. 37 is a diagram showing an example of displaying the dependency relation for specifying the cause from the abnormality occurrence display in the tenth embodiment.
  • Embodiment 1 FIG. A program analysis support apparatus 1 according to the first embodiment will be described.
  • the program analysis support device 1 includes a programmable controller (hereinafter referred to as “PC”), a motion controller (hereinafter referred to as “MC”), a numerical controller (hereinafter referred to as “NC”), an inspection device controller, or Search for the cause of the malfunction of the newly developed ladder program for various industrial controllers, control devices such as indicators (hereinafter referred to as “GOT”), and ladder programs executed in microcomputers.
  • PC programmable controller
  • MC motion controller
  • NC numerical controller
  • inspection device controller or Search for the cause of the malfunction of the newly developed ladder program for various industrial controllers
  • control devices such as indicators (hereinafter referred to as “GOT”)
  • GUIT ladder programs executed in microcomputers.
  • This is a device for improving the efficiency of debugging work.
  • a PC will be described as an example.
  • the PC executes a ladder program (measurement control program) to grasp the state of the measurement control object or to instruct the measurement control object to operate.
  • a predetermined ladder program creation support device (measurement control program creation support device) is used for creating the ladder program.
  • a ladder program creation support device is generally provided as a software tool that operates on a personal computer, and supports editing of a ladder program that is a program used when a PC measures or controls a measurement control target. It has a function to do.
  • the ladder program creation support apparatus connects a personal computer and a PC, transfers the edited ladder program to the PC, or changes the state of the measurement control target or the ladder program (hereinafter referred to as “device”). It also has a function of monitoring the state of the value.
  • the program editing function and the monitoring function provided by the ladder program creation support apparatus are also mounted on the GOT, and the ladder program editing or device value status monitoring is also performed from the GOT that is always connected to the PC. Can be done.
  • sampling trace function is known as a function for debugging whether the controller is operating correctly.
  • the sampling trace function acquires (samples) data (trace data) indicating the status of a specified device at a specified timing at a fixed period (sampling period), and stores the acquired trace data in a predetermined memory (sampling trace) Memory).
  • the device refers to a device in which input / output between the PC measurement monitoring control target and the PC is assigned to the memory address of the PC, and a memory address used internally by the PC.
  • X device is assigned input
  • Y device is assigned output
  • M device is internally used bit data (internal relay)
  • B device is used for communication
  • error occurs A device character is determined in advance depending on the data type, such as F device indicating “”.
  • the address of each device is, for example, hexadecimal representation for the X device, Y device, B device, etc., and decimal representation for the M device, F device, etc.
  • the memory size that can be sampled and traced at a time is limited, so it is necessary to narrow down the devices that are suspected of causing malfunctions.
  • a sampling trace including a large number of things for example, device operations
  • things for example, device operations
  • Slicing technology can be considered as a technology to solve the first problem. That is, in the ladder program, the dependency (directed graph) of the device (variable) is extracted.
  • a ladder program includes a plurality of ladder lines (see FIG. 5).
  • the ladder program is configured to read a plurality of ladder lines from top to bottom so that each ladder line is read from left to right.
  • the calculation result of each ladder row is stored in the coil output and may be treated as an input in the subsequent ladder row (see FIG. 5). In other words, in the ladder program, processing is performed sequentially from left to right and from top to bottom.
  • the positive dependency is that the value of a certain device changes by extracting other devices that are affected by the change in the value of a certain device and then extracting other devices that are affected by those devices. All devices that are affected by this are extracted.
  • the positive dependency relationship follows the dependency relationship along the sequential processing direction.
  • the device group thus extracted constitutes a directed graph (see FIG. 4).
  • a backward dependency affects the change in the value of a device by extracting other devices that affect the change in the value of a device, and then extracting other devices that affect those devices. All devices to be given are extracted. In other words, the backward dependency relationship traces the dependency relationship in reverse to the sequential processing direction.
  • the device group thus extracted constitutes a directed graph (see FIG. 4).
  • debugging work is performed using production equipment with a built-in PC.
  • a debugging operation is performed by connecting a personal computer and a PC, and a debugging operation is performed using a display and operation buttons provided in the production facility.
  • the program analysis support device 1 has a hardware configuration as shown in FIG.
  • FIG. 1 is a diagram illustrating a hardware configuration of the program analysis support apparatus 1.
  • the program analysis support device 1 includes a microprocessor 2, a data storage memory 3, a display unit 4, an input unit 5, a storage unit 6, and a system bus 7.
  • the microprocessor 2, the data storage memory 3, the display unit 4, the input unit 5, and the storage unit 6 are connected to each other via a system bus 7.
  • the microprocessor 2 controls each part of the program analysis support apparatus 1 as a whole and executes each function of the program analysis support apparatus 1.
  • the data storage memory 3 temporarily stores data under the control of the microprocessor 2.
  • the data storage memory 3 has, for example, a work area 3a serving as a work area for the microprocessor 2.
  • the data storage memory 3 is composed of, for example, a DRAM (Dynamic Random Access Memory).
  • the display unit 4 displays predetermined information on the display screen 4a under the control of the microprocessor 2.
  • the display unit 4 may be, for example, a display provided in production equipment.
  • the display device includes, for example, a liquid crystal display.
  • the display unit 4 may be a display device, for example.
  • the display device includes, for example, a liquid crystal display.
  • the input unit 5 receives a predetermined instruction from the user via the operation button 5a or the like.
  • the operation button 5a is an operation button provided in the production facility, for example.
  • the operation button 5a may be realized as a button object and a touch panel on the display screen 4a of the display provided in the production facility.
  • the input unit 5 may be an input device having operation buttons 5a and the like.
  • the operation button 5a may be, for example, a physical button provided on the input device.
  • the storage unit 6 stores and holds, as files, programs such as a ladder program to be analyzed and a program analysis support program 6a for realizing each function of the program analysis support apparatus 1 and data 6b such as analysis results, respectively.
  • the storage unit 6 includes a storage device such as a hard disk, for example.
  • FIG. 2 is a diagram illustrating a functional configuration of the program analysis support apparatus 1.
  • the program analysis support apparatus 1 is configured such that, for example, a program analysis support program is executed by the microprocessor 2 so that the functional configuration shown in FIG. 2 is configured in the program analysis support apparatus 1 (for example, a work area in the data storage memory 3). 3a).
  • Each functional unit of the program analysis support apparatus 1 may be formed in a batch according to the start of execution of the program analysis support program, or sequentially formed according to the execution status of the program analysis support program. Also good.
  • the program analysis support apparatus 1 includes an analysis condition setting operation unit 9, an analysis processing execution unit 13, an analysis result display processing unit 10, and a circuit display processing unit 19.
  • the analysis condition setting operation unit 9 sets program analysis conditions according to an instruction corresponding to the user operation 8 and supplies the program analysis conditions to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 generates a start instruction for the program analysis support program and supplies it to the analysis processing execution unit 13 in response to the start instruction received by the operation button 5 a in response to the user operation 8. To do.
  • the analysis condition setting operation unit 9 sets the ladder program 16 to be analyzed in response to the program setting instruction received by the operation button 5a or the like corresponding to the user operation 8.
  • the program setting instruction is an instruction for setting the ladder program 16 to be analyzed.
  • the analysis condition setting operation unit 9 supplies information of the set ladder program 16 to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted in response to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8.
  • the starting point setting instruction is an instruction for setting the starting point of the dependency to be extracted.
  • the analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets either the first condition or the second condition.
  • the first condition is a condition relating to a device for which no further forward or backward device dependency is to be extracted.
  • the second condition is a condition relating to a device for which further forward or backward device dependency is to be extracted. Details of the first condition and the second condition will be described later.
  • the analysis condition setting operation unit 9 sets the first condition in response to the first condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8.
  • the first condition setting instruction is an instruction for setting the first condition.
  • the analysis condition setting operation unit 9 supplies information on the set first condition to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 specifies the second condition in response to the second condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8.
  • the second condition setting instruction is an instruction for setting the second condition.
  • the analysis condition setting operation unit 9 supplies information on the set second condition to the analysis processing execution unit 13.
  • the analysis processing execution unit 13 receives a program analysis support program start command from the analysis condition setting operation unit 9.
  • the analysis processing execution unit 13 reads out the program analysis support program held in the storage unit 6 in response to a program analysis support program start command.
  • the analysis processing execution unit 13 receives the program analysis condition setting result from the analysis condition setting operation unit 9.
  • the analysis process execution unit 13 executes the program analysis process according to the setting result of the program analysis condition, and supplies the result of the program analysis process, that is, the analysis result to the analysis result display processing unit 10.
  • the analysis processing execution unit 13 includes a variable usage status extraction unit 14 and a variable dependency extraction unit 15.
  • the variable usage status extraction unit 14 extracts the usage status of the device when instructed to extract the usage status via the analysis condition setting operation unit 9.
  • the variable usage status extraction unit 14 generates a device usage status extraction result and supplies it to the analysis result display processing unit 10.
  • variable dependency relationship extraction unit 15 extracts the device dependency when instructed to extract the dependency relationship through the analysis condition setting operation unit 9, for example. That is, the variable dependency relationship extraction unit 15 extracts a forward or backward device dependency from the ladder program 16.
  • variable dependency relationship extraction unit 15 does not extract a further forward or backward device dependency relationship for the device that matches the first condition set via the analysis condition setting operation unit 9. Further, the variable dependency relationship extraction unit 15 extracts a further forward or backward device dependency for a device that matches the second condition set via the analysis condition setting operation unit 9.
  • variable dependency relationship extraction unit 15 may refer to the content held in the device memory dump 18 when extracting the device dependency relationship.
  • variable dependency relationship extraction unit 15 generates a device dependency relationship extraction result, that is, a first extraction result, and supplies it to the analysis result display processing unit 10.
  • the analysis result display processing unit 10 receives the result of the program analysis processing from the analysis processing execution unit 13.
  • the analysis result display processing unit 10 generates display information using the result of the program analysis process, and displays the result of the program analysis process on the display screen 4a of the display unit 4 according to the generated display information.
  • the analysis result display processing unit 10 includes a variable usage status display processing unit 11 and a variable dependency relationship display processing unit 12.
  • the variable usage status display processing unit 11 receives a device usage status extraction result from the variable usage status extraction unit 14.
  • the variable usage status display processing unit 11 generates display information using the device usage status extraction result, and displays the device usage status extraction result on the display screen 4 a of the display unit 4 according to the generated display information.
  • the variable usage status display processing unit 11 generates graph information in which the device usage status extraction results are summarized in a graph, and the device usage status extraction results are displayed on the display screen 4 a of the display unit 4 according to the graph information. Display in the form of a graph. Thereby, the user who browsed the display screen 4a can easily grasp the extraction result of the usage status of the device visually.
  • the variable dependency relationship display processing unit 12 receives, for example, the device dependency relationship extraction result, that is, the first extraction result from the variable usage state extraction unit 14.
  • the variable dependency relationship display processing unit 12 converts the first extraction result into display information, and displays the device dependency relationship extraction result on the display screen 4 a of the display unit 4 according to the converted display information.
  • the variable dependency relationship display processing unit 12 generates directed graph information in which the device dependency relationship extraction results are compiled into a directed graph (see FIGS. 4 and 7), and the device dependency relationship extraction result is displayed according to the directed graph information.
  • the variable dependency relationship display processing unit 12 generates directed graph information in which the device dependency relationship extraction results are compiled into a directed graph (see FIGS. 4 and 7), and the device dependency relationship extraction result is displayed according to the directed graph information.
  • the user who browsed the display screen 4a can easily grasp the extraction result of the device dependency visually.
  • variable dependency display processing unit 12 designates the selected device in response to a device selection instruction received by the operation button 5a or the like corresponding to the user operation 8, for example.
  • the device selection instruction is an instruction to specify a selected device when one device is selected from the device dependency (for example, a directed graph) displayed on the display screen 4a by the variable dependency display processing unit 12. It is.
  • the variable dependency relationship display processing unit 12 supplies the specified device information to the circuit display processing unit 19.
  • the circuit display processing unit 19 receives information on the designated device from the variable dependency display processing unit 12.
  • the circuit display processing unit 19 generates ladder circuit display information according to the designated device. For example, the circuit display processing unit 19 generates display information of a ladder circuit that outputs a designated device as a coil.
  • the circuit display processing unit 19 selectively displays a ladder circuit that outputs the designated device as a coil instead of the device dependency (for example, a directed graph) displayed by the variable dependency display processing unit 12. (See the right figure in FIG. 9).
  • the circuit display processing unit 19 displays the device dependency displayed by the variable dependency display processing unit 12, that is, the entire device dependency (for example, a directed graph), while displaying the specified device.
  • the ladder circuit that outputs the coil is displayed (see FIG. 9).
  • the circuit display processing unit 19 displays the entire directed graph of the extracted device dependency and the ladder circuit that outputs the designated device as a coil side by side (see FIG. 9).
  • the circuit display processing unit 19 displays a ladder graph that outputs a specified device in a coil so as to overlap the directed graph while displaying the entire directed graph of the extracted device dependence relationship (for example, display Display in the center of the screen 4a.
  • FIG. 3 is a diagram illustrating a configuration of the analysis condition setting operation unit 9.
  • the analysis condition setting operation unit 9 executes the analysis processing when the analysis processing execution unit 13 reads the program analysis support program in response to the activation instruction received by the operation button 5a or the like corresponding to the user operation 8.
  • the screen data developed by the unit 13 is received.
  • the analysis condition setting operation unit 9 displays, for example, an analysis condition setting operation screen 9a as shown in FIG. 3 on the display screen 4a according to the screen data.
  • the analysis condition setting operation unit 9 receives a user operation 8 via, for example, the analysis condition setting operation screen 9a.
  • FIG. 3 shows a case where the program analysis support apparatus 1 has a function of extracting a device usage status and a function of extracting a device dependency, and a function of a user extracting a device dependency. This shows the case of selecting and specifying. Further, in the case of a function for extracting device dependency, whether to extract a forward dependency or a backward dependency is specified, and the starting point of analysis processing is specified. FIG. 3 shows a case where the forward direction is designated and the input device X1 is designated as the starting point.
  • the analysis condition setting operation screen 9a includes analysis selection fields 9a1 and 9a2, an execution button 9a3, a cancel button 9a4, a direction designation field 9a5, a start point designation field 9a6, a type designation on / off field 9a7, a type designation field 9a8, and the number of times.
  • a designated on / off field 9a9 and a number of times designation field 9a10 are provided.
  • One of the two analysis selection fields 9a1 and 9a2 is alternatively selected.
  • the analysis condition setting operation unit 9 selects the extraction of the device usage status as the analysis processing, and uses information indicating that the extraction of the device usage status is selected as a variable.
  • the situation extraction unit 14 is notified.
  • the variable usage status extraction unit 14 recognizes that an instruction has been given to extract the usage status via the analysis condition setting operation unit 9, for example.
  • variable usage status extraction unit 14 extracts the usage status of the device, and the variable usage status display processing unit 11 uses the extraction result to display display information (for example, graph information) on the display screen 4a. indicate.
  • the analysis condition setting operation unit 9 instructs the variable usage status extraction unit 14 to cancel the analysis processing.
  • the variable usage status extraction unit 14 stops extracting the usage status of the device.
  • variable dependency extraction unit 15 recognizes that an instruction to extract the device dependency relationship is given via the analysis condition setting operation unit 9.
  • the direction designation field 9a5 either forward or backward is selected as the direction of the device dependency to be extracted.
  • FIG. 3 illustrates a case where the forward direction is selected.
  • the forward and backward directions may be displayed as a pull-down menu by clicking on a black triangle, and may be selected by clicking on either the forward or backward direction.
  • FIG. 3 illustrates the case where the device X1 is designated as the starting point of the dependency relationship to be extracted.
  • type designation on / off field 9a7 either type designation (on) or no type designation (off) is instructed.
  • FIG. 3 illustrates a case where it is instructed not to specify the type (off).
  • the type designation on / off field 9a7 for example, it may be instructed to specify a type by turning on (on), or instruct to not specify a type by removing the check (off).
  • a first condition relating to a device from which no further forward or backward device dependency is extracted is designated.
  • a type of device from which no further forward or backward device dependency is extracted is designated.
  • the type of device indicates, for example, an X device indicating that the input is allocated, a Y device indicating that the output is allocated, an M device indicating internally used bit data (internal relay), and a device used for communication.
  • B device and F device indicating the occurrence of an error.
  • FIG. 3 illustrates a case where the type designation field 9a8 is not instructed.
  • variable dependency relationship extraction unit 15 extracts the device dependency relationship, and the variable dependency relationship display processing unit 12 uses the extraction result, that is, the first extraction result to display display information (for example, directed graph information). ) Is displayed on the display screen 4a.
  • the analysis condition setting operation unit 9 instructs the variable dependency extraction unit 15 to cancel the analysis process.
  • the variable dependency relationship extraction unit 15 stops extracting the device dependency relationship.
  • the input device X1 as the starting point may be configured to be specified by selecting a contact or a coil from the ladder program displayed by the circuit display processing unit 19.
  • FIG. 4 is an example of an execution result when the analysis condition setting operation screen 9a is operated as shown in FIG. 3 and the execution button 9a3 is pressed.
  • FIG. 4 shows a case where a large number of devices and dependencies are extracted.
  • the output device Y may be referred to as a contact point as shown in FIG. Focusing on the fact that the number of devices to be used is increasing, for example, no further dependency extraction processing is performed for the specified device type.
  • the Y device is an output device
  • the forward dependency is extracted from the input device X as a starting point
  • the end point is the Y device.
  • the process of extracting the dependency relationship to the point where the Y device is further referred to as the contact point exceeds the range of dependency extraction starting from the X device. It is none other than extracting the dependency relationship as the starting point.
  • the dependency relationship is further increased depending on the device type.
  • the Y device is designated as the device type that checks and enables the function that does not perform the extraction process and does not perform the extraction process of the further dependency.
  • the analysis selection field 9a2 is selected from the two analysis selection fields 9a1 and 9a2, the forward direction is selected in the direction designation field 9a5, and the start point designation field 9a6 is selected.
  • the device X1 is designated as the starting point of the dependency to be extracted, and the designation of type (on) is designated in the type designation on / off field 9a7.
  • the Y device is designated as the type of device (first condition) from which no further forward or backward device dependency is extracted.
  • FIG. 10 is a flowchart showing dependency extraction processing in consideration of the device type.
  • step S1 the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted according to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 6, the analysis condition setting operation unit 9 sets the device X1 as the starting point of the dependency to be extracted. The analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the first condition in response to the first condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case illustrated in FIG. 6, the analysis condition setting operation unit 9 sets the Y device as the first condition, that is, as the device type from which no further forward or backward device dependency is extracted. The analysis condition setting operation unit 9 supplies information on the set first condition to the analysis processing execution unit 13.
  • step S10 the variable dependency extraction unit 15 performs a recursive process. Specifically, the variable dependency relationship extraction unit 15 performs the following processing in steps S11 to S17.
  • step S11 the variable dependency extraction unit 15 extracts the device dependency from the starting device (for example, device X1) set by the analysis condition setting operation unit 9.
  • the variable dependency relationship extraction unit 15 extracts all the devices affected by the starting device from the ladder program 16 when the forward device dependency extraction is designated.
  • the variable dependency relationship extraction unit 15 extracts all devices that affect the starting device from the ladder program 16.
  • step S12 the variable dependency extraction unit 15 determines whether or not the processing in steps S13 to S17 has been completed for all the extracted devices. If the variable dependency relationship extraction unit 15 is not completed (“No” in step S12), the process proceeds to step S13, and if completed (“Yes” in step S12), the process ends.
  • step S13 the variable dependency extraction unit 15 selects one unprocessed device among all the extracted devices as a processing target.
  • step S14 the variable dependency extraction unit 15 determines whether or not the device to be processed matches the first condition. For example, in the case illustrated in FIG. 6, the variable dependency relationship extraction unit 15 determines whether or not the device to be processed is a device type (for example, Y device) from which no further forward or backward device dependency is extracted. The variable dependency relationship extraction unit 15 advances the process to S17 if the first condition is met (“Yes” in step S14), and performs the process if the first condition is not met (“No” in step S14). Proceed to S15.
  • the variable dependency relationship extraction unit 15 advances the process to S17 if the first condition is met (“Yes” in step S14), and performs the process if the first condition is not met (“No” in step S14). Proceed to S15.
  • step S15 the variable dependency relationship extraction unit 15 newly sets a processing target device as a starting point.
  • step S16 the variable dependency relationship extraction unit 15 extracts the device dependency using the starting point set in step S15 as the second starting device. For example, the variable dependency relationship extraction unit 15 extracts all devices affected by the second source device from the ladder program 16 when forward device dependency extraction is designated. Alternatively, for example, the variable dependency relationship extraction unit 15 extracts all devices that affect the second source device from the ladder program 16 when the backward device dependency extraction is designated. When the extraction process is completed, the variable dependency relationship extraction unit 15 returns the process to step S12.
  • step S17 since the variable dependency extraction unit 15 does not perform further dependency extraction processing on the device to be processed, the processing on the device to be processed ends. Then, the variable dependency relationship extraction unit 15 returns the process to step S12.
  • the directed graph shown in FIG. 7 is displayed on the display screen 4a by the dependency extraction processing when the function that does not perform the dependency extraction processing depending on the device type is checked and enabled.
  • the FIG. 7 is a diagram illustrating a directed graph corresponding to an example of a forward dependency extraction result in consideration of the device type.
  • the directed graph shown in FIG. 7 is a process of extracting a forward dependency relationship starting from the device X1, and for the device M1, which is a device that does not meet the first condition, the dependency extraction process further proceeds. If the devices Y1, Y2, and Y3 (see FIG. 4), which are devices that meet the above condition, are obtained, the further dependency extraction process is not performed.
  • the directed graph shown in FIG. 4 is narrowed down as the directed graph shown in FIG. 7, by checking and enabling a function that does not perform any further dependency extraction processing depending on the device type, a large number can be obtained. Even if the analysis conditions (analysis command, analysis target, etc.) are not specified in combination, it is possible to narrow down a huge and complicated dependency (the directed graph).
  • FIG. 6 illustrates the case of extracting the forward dependency
  • FIG. 8 illustrates the case of extracting the backward dependency. It is preferable to specify X as a device type that checks and enables a function that does not perform further dependency extraction processing depending on the device type, and does not perform further dependency extraction processing.
  • the analysis selection column 9a2 is selected from the two analysis selection columns 9a1 and 9a2, the backward direction is selected in the direction designation column 9a5, and the starting point designation column 9a6 is selected.
  • the device Y1 is designated as the starting point of the dependency to be extracted, and the designation of type (on) is designated in the type designation on / off field 9a7.
  • the X device is designated as the type of device (first condition) from which no further forward or backward device dependency is extracted.
  • the dependency extraction process proceeds, and if the input X device is reached, the process is performed so that no further dependency extraction process is performed.
  • the effect is the same as in the case of FIG. 6.
  • the directed graph shown in FIG. 4 can be narrowed down as the directed graph shown in FIG. 7.
  • devices that are input to the PC include not only the X device but also a B device that is input by communication, and devices that are output to the PC include not only the Y device but also output by communication.
  • B devices and F devices that output errors. Therefore, for example, in the example of FIG. 6, a B device or the like may be specified as the starting device instead of the X device, or a device type that does not perform further dependency extraction processing is replaced with the Y device.
  • B device, F device, etc. may be designated.
  • a B device, an F device, or the like may be designated as the starting device instead of the Y device, and an X device may be designated as a device type for which no further dependency extraction processing is performed. Instead of B device or the like may be designated.
  • the analysis condition setting operation screen 9a may further include a type designation on / off field 9a7a.
  • a type designation on / off field 9a7a can be unselected, but either one is selected alternatively.
  • the type designation on / off field 9a7 is selected (for example, checked)
  • the type designation on / off field 9a7a is selected (for example, checked)
  • it is selected to set a second condition relating to a device for extracting further forward or backward device dependency it is selected to set.
  • the analysis condition setting operation screen 9a has a function of performing further dependency relationship extraction processing depending on the device type as shown in FIG.
  • a device excluding the Y device is designated as the second condition, that is, as the device type for which more dependency extraction processing is to be performed.
  • the second condition that is, as the device type for which more dependency extraction processing is to be performed.
  • an X device, an M device, and a B device are designated in the type designation field 9a8.
  • step S1a the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted according to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 11, the analysis condition setting operation unit 9 sets the device X1 as the starting point of the dependency to be extracted. The analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the second condition in response to the second condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case illustrated in FIG. 11, the analysis condition setting operation unit 9 sets the X device, the M device, and the B device as the second condition, that is, as the device type for extracting further forward or backward device dependency. . The analysis condition setting operation unit 9 supplies information on the set second condition to the analysis processing execution unit 13.
  • step S14a the variable dependency extraction unit 15 determines whether or not the device to be processed matches the second condition. For example, in the case illustrated in FIG. 11, the variable dependency extraction unit 15 determines whether the processing target device is a device type (for example, an X device, an M device, or a B device) that extracts a further forward or backward device dependency. Judge whether or not. The variable dependency extraction unit 15 advances the process to S15 if the second condition is met (“Yes” in step S14a), and performs the process if the second condition is not met (“No” in step S14a). Proceed to S17.
  • a device type for example, an X device, an M device, or a B device
  • the directed graph shown in FIG. 7 is also displayed on the display screen 4a by the dependency extraction processing when the function for performing the dependency extraction processing depending on the device type is checked and enabled.
  • the directed graph shown in FIG. 7 is a process of extracting the forward dependency relationship starting from the device X1, and for the device M1 that is a device meeting the second condition, the dependency relationship extraction process is further advanced. If the device Y1, Y2, Y3 (see FIG. 4), which is a device that does not match the above condition, is reached, it is possible to obtain no further dependency extraction processing.
  • variable dependency relationship display processing unit 12 sends the selected device to the circuit display processing unit 19. Instructing to display only the ladder circuit that outputs the coil, or to display the ladder circuit that outputs the selected device while displaying the entire device dependency according to the first extraction result. You may comprise. If it does so, it will become a structure of a display like FIG. 9, and it contributes to making analysis work still more efficient. Because the dependency (directed graph) extracts only the dependency from the ladder control structure and removes other information, it helps to understand the ladder control structure from a global perspective. In addition to displaying the dependency relationship (directed graph), displaying the ladder circuit corresponding to that portion in order to confirm the details of the portion you want to pay attention to in the region makes the analysis work even more efficient. It is effective for this purpose.
  • the selected device when one device is selected from the dependency relationship (directed graph) extracted and displayed, the selected device can be distinguished from other devices in the dependency relationship (directed graph).
  • You may display with a form. For example, as shown in FIG. 9, by displaying a broken-line arrow from the device Y3 to the displayed ladder circuit, the device Y3 output as a coil in the displayed ladder circuit and the first extraction result are followed.
  • the device Y3 in the dependency relationship (or directed graph thereof) may be displayed in association with each other.
  • the device comment 17 assigned to the device can be displayed together with the device comment 17 assigned to the device (refer to FIG. 2). Can be displayed together.
  • the analysis condition setting operation unit 9 extracts the first condition relating to the device that does not extract the further forward or backward device dependency, or the further forward or backward device dependency.
  • a second condition relating to the device is set.
  • the variable dependency extraction unit 15 does not extract a further forward or backward device dependency for a device that matches the first condition, and sets a further forward or backward device dependency for a device that matches the second condition.
  • a forward or backward device dependency is extracted from the ladder program 16 with the starting point set by the analysis condition setting operation unit 9 as a starting point, and a first extraction result is generated.
  • the variable dependency display processing unit 12 displays the device dependency according to the first extraction result.
  • the device dependence can be efficiently narrowed down using the directionality of the device dependence.
  • the dependency (directed graph) deeply related to the defect is extracted from the huge and complicated dependency (directed graph) without specifying a large number of analysis conditions (analysis command, analysis target, etc.). It becomes possible.
  • the dependency (directed graph) that is deeply related to the defect is extracted with a small number of operations from the huge and complicated dependency (directed graph). Can be displayed.
  • the analysis condition setting operation unit 9 sets a device type (for example, Y device) that does not extract a further forward or backward device dependency as the first condition.
  • the analysis condition setting operation unit 9 sets a device type for extracting further forward or backward device dependency as the second condition.
  • the variable dependency relationship extraction unit 15 does not extract a further forward or backward device dependency for a device that matches the device type (first condition) that is not extracted, and matches the device type (second condition) to be extracted.
  • a forward or backward device dependency is extracted from the ladder program 16 with the starting point set by the analysis condition setting operation unit 9 as a starting point. Generate extraction results. Thereby, by using the first condition or the second condition, the device dependence can be efficiently narrowed down using the directionality of the device dependence.
  • the circuit display processing unit 19 selects a ladder circuit that outputs the designated device as a coil when one device is designated from among the device dependencies according to the first extraction result.
  • the ladder circuit that outputs the designated device as a coil is selectively displayed while displaying the entire device dependency according to the first extraction result.
  • Embodiment 2 a program analysis support apparatus according to the second embodiment will be described. Below, it demonstrates focusing on a different part from Embodiment 1.
  • FIG. 1 A program analysis support apparatus according to the second embodiment will be described. Below, it demonstrates focusing on a different part from Embodiment 1.
  • M device is used internally, and is used for the purpose of temporarily holding the processing result. Therefore, what kind of property the M device is used to temporarily hold depends on the ladder creator. However, the purpose of use of the M device is broadly divided into a case of simply holding the processing result temporarily and a case of holding the internal state of the controller that is indispensable for measuring and controlling the target.
  • contact points The number of M devices that are merely used as temporary storage of processing results is referred to as contact points.
  • the M device which holds the internal state of the controller is remarkably many times referred to as a contact. This is because the internal state of the controller is very important for various measurement control functions, such as checking interlock conditions.
  • the M device that holds the internal state of the controller does not actually output the value to the outside of the controller, but actually exceeds the role of temporarily holding the processing result, and is substantially the Y device. It plays an equivalent role. Therefore, as described in the first embodiment, the process of extracting the dependency relationship to the point where the M device is further referred to as a contact point exceeds the initial range of dependency relationship extraction, and further the M It is none other than extracting the dependency from the device.
  • the analysis condition setting operation unit 9 sets, as the first condition, the device reference count (threshold value) including the starting device from the starting device.
  • FIG. 13 checks and enables a function that does not perform further dependency extraction processing according to the number of references, and specifies 3 times as a reference frequency threshold value for not performing further dependency extraction processing. It shows the case.
  • FIG. 13 illustrates a case where designation of the number of times of reference (ON) is instructed.
  • the number-of-times designation on / off field 9a9 for example, it may be instructed to designate the number of references by turning on (on) and instruct to not designate the number of references (off) by removing the check. .
  • a threshold for the number of times of reference of devices including the starting device from the starting device is designated.
  • FIG. 13 illustrates a case where three times are instructed as the reference count threshold.
  • the forward designation is selected in the direction designation field 9a5
  • the device X1 is designated in the start point designation field 9a6
  • the designation of the number of references is designated (on) in the number designation on / off field 9a9
  • 3 When the device dependency is traced forward starting from the device X1, when a device that references the device three times or more including the device X1 is generated, further forward device dependency is extracted. Do not.
  • FIG. 15 is a flowchart showing a dependency extraction process in consideration of the reference count.
  • step S ⁇ b> 21 the analysis condition setting operation unit 9 determines whether or not a reference number threshold is specified. If the threshold value for the reference count is specified (“Yes” in step S21), the analysis condition setting operation unit 9 proceeds to step S23, and the threshold value for the reference count is not specified (“No” in step S21). Then, the process proceeds to step S22.
  • step S22 the analysis condition setting operation unit 9 instructs the variable usage status extraction unit 14 to extract a device usage status histogram.
  • the variable usage status extraction unit 14 recognizes that an instruction has been given to extract the usage status via the analysis condition setting operation unit 9.
  • the variable usage status extraction unit 14 recognizes that an instruction to extract the usage status is given (see FIG. 16).
  • the variable usage status extraction unit 14 recognizes that it has been instructed to extract the usage status, it extracts the usage status of the device.
  • the variable usage status extraction unit 14 generates a device usage status extraction result and supplies it to the variable usage status display processing unit 11.
  • the variable usage status display processing unit 11 receives, for example, a device usage status extraction result from the variable usage status extraction unit 14.
  • the variable usage status display processing unit 11 generates display information using the device usage status extraction result, and displays the device usage status extraction result on the display screen 4 a of the display unit 4 according to the generated display information. To do.
  • the variable usage status display processing unit 11 generates graph information in which the device usage status extraction results are summarized in a graph, and the device usage status extraction results are displayed on the display screen 4 a of the display unit 4 according to the graph information. Display in the form of a graph.
  • variable usage status display processing unit 11 uses a device usage status extraction result to display a device usage status histogram (see FIG. 17) with the number of devices on the vertical axis and the contact reference count on the horizontal axis on the display screen 4a. To display. Thereby, the user who browsed the device usage status histogram can determine the threshold value of the reference count according to the profile of the device usage status histogram.
  • the user can determine the contact reference count corresponding to the first minimum point (for example, 6 times in FIG. 17) as the reference count threshold.
  • the user can determine a default value (for example, 3 times) as the threshold value for the reference count.
  • the analysis condition setting operation unit 9 instructs the variable dependency extraction unit 15 to extract the device dependency in accordance with the user operation 8.
  • the variable dependency relationship extraction unit 15 recognizes that it has been instructed to extract device dependency via the analysis condition setting operation unit 9.
  • the variable usage status extraction unit 14 recognizes that it has been instructed to extract device dependency (see FIG. 13).
  • step S23 the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted according to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 6, the analysis condition setting operation unit 9 sets the device X1 as the starting point of the dependency to be extracted. The analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the first condition in response to the first condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case illustrated in FIG. 13, the analysis condition setting operation unit 9 sets three times as the first condition, that is, as a reference number threshold value for not extracting further forward or backward device dependency. The analysis condition setting operation unit 9 supplies information on the set first condition to the analysis processing execution unit 13.
  • step S30 the variable dependency extraction unit 15 performs a recursive process.
  • the variable dependency relationship extraction unit 15 is basically the same as the recursive processing (step S10) of the first embodiment, but performs different processing in the following points.
  • step S34 the variable dependency relationship extraction unit 15 determines whether or not the number of times the device to be processed is referenced and used is greater than or equal to the threshold set in step S23. For example, in the case illustrated in FIG. 13, the variable dependency relationship extraction unit 15 determines whether or not the number of times the processing target device is referenced and used is three or more. If the variable dependency relationship extraction unit 15 is equal to or greater than the threshold value (“Yes” in step S34), the process proceeds to S17, and if not greater than the threshold value (“No” in step S34), the process proceeds to S15.
  • FIG. 14 is a diagram illustrating a directed graph corresponding to an example of a forward dependency extraction result in consideration of the reference count. Since three times are specified as the threshold, the device M1, Y3, which is a device with a reference count of less than three, further advances the dependency extraction process, and the devices M2, M3 with a reference count of three or more are referred to. No further dependency extraction processing is performed.
  • the directed graph shown in FIG. 4 is narrowed down as the directed graph shown in FIG. 14, the function that does not perform further dependency extraction processing is checked according to the number of times the device is used for reference.
  • a huge and complicated dependency relationship a directed graph
  • analysis conditions analysis command, analysis target, etc.
  • the number of thresholds that should be set depends on the created ladder program. However, even for the ladder creator, it is not easy to set this threshold appropriately.
  • a function for extracting how many times each device is referred to and used as a contact and the number of times of reference as a usage state, that is, a histogram function of the number of contact references of the device is provided.
  • FIG. 16 shows a case where the function for extracting the usage status of the device is selected. In this case, setting of analysis conditions is not particularly necessary.
  • FIG. 17 is an example of the execution result. This histogram has a view that there are 40 devices that have one contact reference count, that is, one place that is used as a contact in the program. FIG. 17 shows that while the number of devices with a large number of contact references tends to decrease, the number of contact reference counts is 6 and 7 and the number of contact reference counts is 0, whereas the number of contact reference counts is 8. This shows an example where there are several devices.
  • the use purpose of the M device is roughly divided into a case of simply holding the processing result temporarily and a case of holding the internal state of the controller which is indispensable for measuring and controlling the target.
  • the value of the reference count at which further dependency extraction processing is not performed can be determined.
  • the contact reference frequency histogram as shown in FIG. 17 is obtained, for example, the first minimum point is used as the threshold value of the reference frequency for which no further dependency extraction processing is performed. 6 times may be specified.
  • the contact reference count of 6 to 7 is a threshold value that is a divide between a temporary holding device for a simple processing result and a holding device for an internal state of a controller that is indispensable for measuring and controlling a target. Because it is considered.
  • the configuration is such that the user does not need to explicitly extract the device usage status and find the threshold value. For example, if only the function for specifying the number of times is checked and the threshold value is not input, the device usage status is automatically extracted before the dependency extraction process, and the first minimum point is extracted from the histogram. It is possible to adopt a configuration in which the dependency is extracted by adopting the first minimum point as a threshold value.
  • the device type other than the M device may increase the number of times of reference, and the second embodiment may be applied without limiting the device type to the M device.
  • the extraction of the backward dependency is the same as the extraction of the forward dependency.
  • the effect of narrowing down is great when extracting positive dependencies.
  • Embodiment 1 and Embodiment 2 can be implemented in combination. Thereby, further narrowing down becomes possible.
  • the ladder program is used so that the variable usage status extraction unit 14 (see FIG. 2) serves as reference information when setting the first condition (for example, the threshold value of the reference count).
  • the first condition for example, the threshold value of the reference count.
  • a device is used as a reference in a plurality of ladder rows. This makes it possible to specify a threshold value for the number of times between the temporary holding device for the mere processing result and the holding device for the internal state of the controller, which is indispensable for measuring and controlling the target, in accordance with the histogram extraction result.
  • a first condition for example, it is possible to determine a threshold value for the number of times of reference for which no further dependency extraction processing is performed.
  • the analysis condition setting operation unit 9 sets a threshold value for the reference count at which no further forward or backward device dependency is extracted as the first condition.
  • the variable dependency relationship extraction unit 15 does not extract a further forward or backward device dependency for a device that matches the threshold value (first condition) of the reference number not to be extracted, that is, the reference frequency is equal to or greater than the threshold value.
  • a forward or backward device dependency is extracted from the program 16 using the starting point set by the analysis condition setting operation unit 9 as a starting point, and a first extraction result is generated. Thereby, by using the first condition, the device dependence can be efficiently narrowed down using the directionality of the device dependence.
  • Embodiment 3 FIG. Next, a program analysis support apparatus according to the third embodiment will be described. Below, it demonstrates centering on a different part from Embodiment 2. FIG.
  • an M device that is referred to as a contact in many places.
  • an important one is the number of times that this is referred to as a contact.
  • there may be a large number of devices that directly affect the M device that is, the number of contacts that control the coil in one ladder row in which the M device is a coil.
  • FIG. 18 shows an example of such a ladder. If a backward dependency is extracted from such a ladder program, a directed graph as shown in FIG. 19 is obtained, and the extraction result tends to be divergent. You can see that
  • the M device referred to in the second embodiment which is frequently referred to as a contact point, is important in terms of control that the internal state of the controller is maintained, whereas it is referred to in the third embodiment.
  • an M device having many contacts for controlling the coil is important in the sense that the conditions for ON / OFF control of the M device are very complicated and prone to problems.
  • the number of contacts in one line of the ladder in which the device is a coil that is, the number of other devices that directly affect the device is the number of control-dependent times. For devices exceeding the threshold, no further dependency extraction processing is performed. That is, the analysis condition setting operation unit 9 sets, as a first condition, a control dependence count (threshold value) indicating how many contact points are subject to control dependence in one ladder row.
  • FIG. 20 shows a function that does not perform further dependency extraction processing based on the number of times of control dependence indicating the number of contacts that control the coil in one line of the ladder, and enables further dependency extraction processing.
  • three times are designated as the threshold value of the number of coil control dependences for which no control is performed.
  • the analysis condition setting operation screen 9a may further include a number specification on / off field 9a9a.
  • the number designation on / off field 9a9a and the number designation on / off field 9a9 can both be unselected, but are selected alternatively when selected.
  • FIG. 20 illustrates a case in which the designation of the number of times of control dependence is instructed (ON).
  • the number-of-times designation on / off field 9a9a for example, it is instructed to specify the number of times of control dependence by turning on (on) and instruct to not to specify the number of times of control dependence by removing the check (off) Also good.
  • a threshold value of the control dependence number indicating the number of contacts controlling the coil in one line of the ladder is designated.
  • the backward designation is selected in the direction designation column 9a5
  • the device Y1 is designated in the start point designation column 9a6
  • the designation of the number of control dependences is designated (on) in the number designation on / off column 9a9a, and the number 3 in the number designation column 9a10.
  • the number of times of control dependence in the ladder line is three or more (for example, the device shown in FIG. 18). If M11, M12) occurs, no further backward device dependency is extracted.
  • FIG. 22 is a flowchart illustrating a dependency extraction process in consideration of the number of control dependencies.
  • step S41 the analysis condition setting operation unit 9 determines whether or not a threshold value for the number of control dependences is specified.
  • the analysis condition setting operation unit 9 advances the process to step S43 and does not specify the threshold value for the control dependence number (“No” in step S41). ), The process proceeds to step S42.
  • step S42 the analysis condition setting operation unit 9 instructs the variable usage status extraction unit 14 to extract a device usage status histogram.
  • the variable usage status extraction unit 14 recognizes that an instruction has been given to extract the usage status via the analysis condition setting operation unit 9.
  • the variable usage status extraction unit 14 recognizes that an instruction to extract the usage status is given (see FIG. 16).
  • the variable usage status extraction unit 14 recognizes that it has been instructed to extract the usage status, it extracts the usage status of the device.
  • the variable usage status extraction unit 14 generates a device usage status extraction result and supplies it to the variable usage status display processing unit 11.
  • the variable usage status display processing unit 11 receives, for example, a device usage status extraction result from the variable usage status extraction unit 14.
  • the variable usage status display processing unit 11 generates display information using the device usage status extraction result, and displays the device usage status extraction result on the display screen 4 a of the display unit 4 according to the generated display information. To do.
  • the variable usage status display processing unit 11 generates graph information in which the device usage status extraction results are summarized in a graph, and the device usage status extraction results are displayed on the display screen 4 a of the display unit 4 according to the graph information. Display in the form of a graph.
  • variable usage status display processing unit 11 uses a device usage status extraction result to control a device usage status histogram (for example, the horizontal axis is controlled in FIG. 17) with the number of devices as the vertical axis and the number of control dependences as the horizontal axis. Is displayed on the display screen 4a.
  • a device usage status histogram for example, the horizontal axis is controlled in FIG. 17
  • the user who browsed the device usage status histogram can determine the threshold value of the control dependence number according to the profile of the device usage status histogram.
  • the user when the profile of the device usage histogram is multimodal, the user depends on the number of control dependences corresponding to the first minimum point (for example, 6 times when the horizontal axis is replaced with the number of control dependences in FIG. 17). Can be determined as a threshold value of the number of control dependences. Further, for example, when the profile of the device usage state histogram is unimodal, the user can determine a default value (for example, 3 times) as the threshold value for the number of times of control dependence.
  • the analysis condition setting operation unit 9 instructs the variable dependency extraction unit 15 to extract the device dependency in accordance with the user operation 8.
  • the variable dependency relationship extraction unit 15 recognizes that it has been instructed to extract device dependency via the analysis condition setting operation unit 9.
  • the variable usage status extraction unit 14 recognizes that it has been instructed to extract device dependency (see FIG. 20).
  • step S43 the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted according to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 20, the analysis condition setting operation unit 9 sets the device Y1 as the starting point of the dependency to be extracted. The analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the first condition in response to the first condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case illustrated in FIG. 20, the analysis condition setting operation unit 9 sets three times as the first condition, that is, as a threshold value for the number of control dependences for not extracting further forward or backward device dependence. The analysis condition setting operation unit 9 supplies information on the set first condition to the analysis processing execution unit 13.
  • step S50 the variable dependency extraction unit 15 performs a recursive process.
  • the variable dependency relationship extraction unit 15 is basically the same as the recursive processing (step S10) of the first embodiment, but performs different processing in the following points.
  • step S54 the variable dependency relationship extraction unit 15 determines whether or not the number of contacts for controlling the device to be processed, that is, the number of control dependencies is equal to or greater than the threshold set in step S43. For example, in the case illustrated in FIG. 20, the variable dependency relationship extraction unit 15 determines whether or not the number of control dependencies is three or more. If the variable dependency relationship extraction unit 15 is greater than or equal to the threshold value (“Yes” in step S54), the process proceeds to S17, and if not greater than the threshold value (“No” in step S54), the process proceeds to S15.
  • FIG. 21 is a diagram illustrating a directed graph corresponding to a backward dependency extraction result example in consideration of the number of times of control dependence. Since three times are specified as the threshold, the device M1 having the control dependence count of less than 3 is further subjected to the dependency extraction process, and the devices M11 and M12 having the control dependence count of 3 or more (FIG. 19). For the reference), no further dependency extraction processing is performed.
  • the directed graph shown in FIG. 19 is narrowed down as the directed graph shown in FIG.
  • the directed graph shown in FIG. 19 By checking and enabling the function that does not perform the process, it is possible to narrow down the huge and complicated dependency (the directed graph) without specifying a combination of a large number of analysis conditions (analysis command, analysis target, etc.).
  • the number of control dependency times can be displayed together for a device that stops the previous dependency relationship extraction because the control dependency frequency is equal to or greater than a threshold value.
  • the number of thresholds to be set depends on the created ladder program as described in the second embodiment, so that each device is a coil.
  • the extraction of the backward dependency is the same as the extraction of the forward dependency.
  • the effect of narrowing down is great when extracting backward dependency.
  • Embodiments 1 to 3 can be implemented in appropriate combination.
  • the first and third embodiments, the second and third embodiments, the first embodiment, the second embodiment, and the third embodiment can be combined as appropriate. Thereby, further narrowing down becomes possible.
  • the ladder is used so that the variable usage status extraction unit 14 (see FIG. 2) serves as reference information when setting the first condition (for example, the threshold value of the control dependence number).
  • the first condition for example, the threshold value of the control dependence number.
  • a histogram is extracted regarding the number of times indicating how many contacts the control line receives in one ladder row.
  • the analysis condition setting operation unit 9 sets a threshold value for the number of control dependences that does not extract further forward or backward device dependence relations as the first condition.
  • the variable dependency relationship extraction unit 15 does not extract a further forward or backward device dependency for a device that matches the threshold value (first condition) of the control dependency frequency that is not extracted, that is, the control dependency frequency is equal to or greater than the threshold value. Then, a forward or backward device dependency is extracted from the ladder program 16 using the starting point set by the analysis condition setting operation unit 9 as a starting point, and a first extraction result is generated. Thereby, by using the first condition, the device dependence can be efficiently narrowed down using the directionality of the device dependence.
  • Embodiment 4 FIG. Next, a program analysis support apparatus according to the fourth embodiment will be described. Below, it demonstrates centering on a different part from Embodiment 2 and Embodiment 3. FIG.
  • the self-holding is a ladder as shown in FIG. 23, and the device M5 is turned on when the device X5 is turned on, and the device M5 is turned on even when the device X5 is turned off. It is called self-holding because it keeps holding. In order to turn off the device M5 that keeps ON, the device X6 or the device X7 may be turned on. Therefore, for the device M5, it can be said that the contact described in the position of the device X5 has a dependency as an ON condition, and the contact described in the position of the device X6 or the device X7 has a dependency as an OFF condition.
  • the self-holding device since the self-holding device holds the state, it often plays an important role in the control.
  • FIG. 24 shows that the function that does not perform further dependency extraction processing is checked and enabled according to the device type, and self-holding is specified as the device type for which no further dependency extraction processing is performed. Shows the case.
  • the analysis selection column 9a2 is selected from the two analysis selection columns 9a1 and 9a2, the forward direction is selected in the direction designation column 9a5, and the start point designation column 9a6 is selected.
  • the device X1 is designated as the starting point of the dependency to be extracted, and the designation of type (on) is designated in the type designation on / off field 9a7.
  • the self-holding device is designated as the type (first condition) of the device from which no further forward or backward device dependency is extracted.
  • FIG. 25 is a flowchart showing a dependency extraction process considering a self-holding device.
  • step S61 the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted according to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 24, the analysis condition setting operation unit 9 sets the device X1 as the starting point of the dependency to be extracted. The analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the first condition in response to the first condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 24, the analysis condition setting operation unit 9 sets a self-holding device as the first condition, that is, as a device type that does not extract a further forward or backward device dependency. The analysis condition setting operation unit 9 supplies information on the set first condition to the analysis processing execution unit 13.
  • step S70 the variable dependency extraction unit 15 performs a recursive process.
  • the variable dependency relationship extraction unit 15 is basically the same as the recursive processing (step S10) of the first embodiment, but performs different processing in the following points.
  • step S74 the variable dependency extraction unit 15 determines whether the processing target device is a self-holding device. If the variable dependency relationship extraction unit 15 is a self-holding device (“Yes” in step S74), the process proceeds to S17, and if it is not a self-holding device (“No” in step S74), the process proceeds to S15.
  • the backward dependency extraction is the same as the forward dependency extraction.
  • Embodiments 1 to 4 can be implemented in appropriate combination. Thereby, further narrowing down becomes possible.
  • the analysis condition setting operation unit 9 sets a device type (for example, a self-holding device) from which no further forward or backward device dependency is extracted as the first condition.
  • the variable dependency relationship extraction unit 15 is set by the analysis condition setting operation unit 9 from the ladder program 16 so as not to extract further forward or backward device dependency relationships for devices that match the device type (first condition) not to be extracted. From the starting point, a forward or backward device dependency is extracted to generate a first extraction result. Thereby, by using the first condition, the device dependence can be efficiently narrowed down using the directionality of the device dependence.
  • Embodiment 5 FIG. Next, a program analysis support apparatus according to the fifth embodiment will be described. In the following, the description will focus on the differences from the first to fourth embodiments.
  • a huge and complicated dependency can be narrowed down.
  • a device as a starting point affects the obtained dependency. It does not include all devices that affect the device or the starting device.
  • the dependency is extracted beyond the range of the dependency that is intended to be extracted. The purpose of the first to fourth embodiments is to prevent this. It is because.
  • Embodiment 5 considers extraction as a set of dependency relationships.
  • the conventional dependency extraction extracts FIG. 4, but in the first embodiment, the result is narrowed down as shown in FIG.
  • the device Y3 which is one of the end points of FIG. 7 thus obtained, as a new starting point.
  • the two dependency relationships obtained in this way correspond to one dependency relationship obtained by dividing the device X1 using the device Y3 without narrowing down the device X1 as a starting point.
  • a further dependency relationship is automatically extracted as a new starting point automatically with respect to the end point of the narrowed dependency relationship. That is, a further device dependency is separately extracted with each end point in the device dependency extracted as in the first to fourth embodiments as a new starting point.
  • variable dependency relationship extraction unit 14 separately extracts a device dependency relationship starting from the end device for the end device in the device dependency relationship according to the first extraction result, and generates a second extraction result. To do.
  • the variable dependency relationship extraction unit 14 supplies the generated second extraction result to the variable dependency relationship display processing unit 12.
  • the variable dependency relationship display processing unit 12 receives the second extraction result from the variable dependency relationship extracting unit 14. For example, the variable dependency relationship display processing unit 12 displays the device dependency according to the first extraction result, and displays the device dependency according to the second extraction result. For example, the variable dependency relationship display processing unit 12 displays the device dependency directed graph according to the first extraction result and the device dependency directed graph according to the second extraction result in a form that can be distinguished from each other. Displayed above (see FIG. 27). That is, the variable dependency relationship display processing unit 12 displays the device dependency relationship (see FIG. 4) starting from the starting point set by the analysis condition setting operation unit 9 based on the first extraction result and the second extraction result. The display is divided into two or more device dependency relationships (see FIG. 27).
  • FIG. 26 is a flowchart showing an extraction process in which the end point of the extracted dependency relationship is automatically set as a new starting point.
  • step S81 the same preprocessing as in the first to fourth embodiments is performed.
  • the analysis condition setting operation unit 9 performs the same process as step S1 (see FIG. 10) of the first embodiment.
  • the analysis condition setting operation unit 9 and the variable usage status extraction unit 14 perform the same processing as steps S21 to S23 (see FIG. 15) of the second embodiment.
  • the analysis condition setting operation unit 9 and the variable usage status extraction unit 14 perform the same processing as in step S41 to step S43 (see FIG. 22) of the third embodiment.
  • the analysis condition setting operation unit 9 performs the same process as step S61 (see FIG. 25) of the fourth embodiment.
  • step S82 the variable dependency relationship extraction unit 15 performs recursion processing similar to that in the first to fourth embodiments.
  • the variable dependency relationship extraction unit 15 performs the same processing as that of step S10 (see FIG. 10) of the first embodiment.
  • the variable dependency relationship extracting unit 15 performs the same process as that of step S30 (see FIG. 15) of the second embodiment.
  • the variable dependency relationship extracting unit 15 performs the same process as that of step S50 (see FIG. 22) of the third embodiment.
  • variable dependency relationship extraction unit 15 when the preprocessing of the fourth embodiment is performed in step S81, the variable dependency relationship extraction unit 15 performs the same processing as that of step S70 (see FIG. 25) of the fourth embodiment. Thereby, the variable dependency relationship extraction unit 15 extracts the device dependency relationship.
  • step S90 the variable dependency extraction unit 15 performs a recursive process. Specifically, the variable dependency relationship extraction unit 15 performs the following processing in steps S91 to S96.
  • step S91 it is determined whether or not the variable dependency extraction unit 15 has started all the end point devices in the device dependency extracted in step S82.
  • the variable dependency relationship extraction unit 15 ends the process when all the end point devices are set as starting points (“Yes” in step S91), and the processing is performed when all the end point devices are not set as starting points (“No” in step S91). Advances to step S92.
  • step S92 the variable dependency extraction unit 15 selects one unprocessed device as a processing target from among all the end point devices in the device dependency extracted in step S82.
  • the variable dependency relationship extraction unit 15 newly sets the selected device as a starting point.
  • step S93 the variable dependency relationship extraction unit 15 extracts the device dependency by the method of the same embodiment as that performed in step S82.
  • step S94 the variable dependency extraction unit 15 determines whether or not a further dependency is extracted in step S93. If further dependency extraction is performed (“Yes” in step S94), the variable dependency relationship extraction unit 15 proceeds to step S95, and no further dependency relationship is extracted (“No” in step S94). "), The process returns to step S91.
  • step S95 the variable dependency extraction unit 15 sets a new device to be processed as a starting point.
  • step S96 the variable dependency extraction unit 15 extracts the device dependency using the starting point set in step S95 as the second starting device.
  • the variable dependency relationship extraction unit 15 extracts all devices affected by the second source device from the ladder program 16 when forward device dependency extraction is designated.
  • the variable dependency relationship extraction unit 15 extracts all devices that affect the second source device from the ladder program 16 when the backward device dependency extraction is designated.
  • the variable dependency relationship extraction unit 15 returns the process to step S91.
  • the dependency shown in FIG. 27 can be extracted.
  • the directed graph of the device dependency extracted from the device X1 as the starting point is shown together with the tab “X1” in the same manner as in the first embodiment, and the end device Y3 in the extracted device dependency is separately provided as the end device.
  • a directed graph of device dependence starting from Y3 is shown together with a tab “Y3”.
  • variable dependency display unit 12 instead of being narrowed down instead of being narrowed down in consideration of the variable dependency extraction unit 15 without being narrowed down.
  • the obtained one device dependency relationship may be divided into two or more device dependency relationships and displayed based on devices that meet the specified condition. This is merely the movement of the device dependency division processing performed in the variable dependency relationship extraction unit 15 toward the variable dependency relationship display unit 12, and the substantial processing contents are the same.
  • variable dependency extraction unit 15 separately extracts the device dependency from the end device for the end device in the device dependency according to the first extraction result.
  • a second extraction result is generated.
  • the variable dependency display processing unit 12 sets the device dependency (see FIG. 4) starting from the starting point set by the analysis condition setting operation unit 9 to 2
  • the above device dependence is divided and displayed (see FIG. 27). This makes it possible to extract one huge and complicated dependency relationship as a moderately narrowed set of dependency relationships that are separated and separated by devices that have an important meaning in ladder processing. it can.
  • Embodiment 6 FIG. Next, a program analysis support apparatus according to the sixth embodiment will be described. Below, it demonstrates centering on a different part from Embodiment 2. FIG.
  • the sixth embodiment contrary to the second embodiment, only the device having a higher reference count is extracted with respect to the previous dependency, and the device with the lower reference count is not extracted with respect to the previous dependency.
  • step S34 is replaced with the process of the next step S34a (not shown).
  • step S34a the variable dependency extraction unit 15 determines whether or not the number of times the device to be processed is referenced and used is equal to or greater than the threshold set in step S23. For example, in the case illustrated in FIG. 13, the variable dependency relationship extraction unit 15 determines whether or not the number of times the processing target device is referenced and used is three or more. If the variable dependency relationship extraction unit 15 is greater than or equal to the threshold (“Yes” in step S34), the process proceeds to S15. If not greater than the threshold (“No” in step S34), the process proceeds to S17.
  • the ladder program is extracted by extracting only the dependency relationships between devices that have a large number of references and play an important role in control, and omit the devices that have a small number of references and have ancillary and auxiliary roles in control. It is possible to give a bird's-eye view of the entire control realized by
  • Embodiments 1 to 5 can be implemented in an appropriate combination, which is more effective.
  • the second embodiment is used to play an important role in control starting from a device having a small number of references and an auxiliary / auxiliary role in control.
  • the dependency relationship between the devices is extracted, and then the important device thus arrived is automatically set as the starting point according to the fifth embodiment, and the overall control realized by the ladder according to the sixth embodiment is a bird's-eye view.
  • Dependencies that can be performed are extracted, and finally, the conventional dependencies are extracted from the device that seems to be the cause of the failure from among them. You can get to the end cause while avoiding this.
  • Embodiment 7 FIG. Next, a program analysis support apparatus according to the seventh embodiment will be described. Below, it demonstrates centering on a different part from Embodiment 1-4.
  • the first to fourth embodiments a huge and complicated dependency can be narrowed down.
  • the obtained dependency is affected by a device that is affected by the starting device or Not all devices that affect the starting device are included.
  • the dependency is extracted beyond the range of the dependency that is intended to be extracted. The purpose of the first to fourth embodiments is to prevent this. It is because.
  • a malfunction that occurs in a production facility is that the output is not turned on even though the input is turned on.
  • the process of extracting the dependency relationship is advanced only in the place where it is used as the “a” contact.
  • the a contact is a contact that is referred to by positive logic such as the device X5 and the device M5 shown in FIG. 23, and the coil is turned on when the contact is turned on.
  • FIG. 28 is a flowchart showing a dependency extraction process in consideration of the contact a.
  • step S100 the variable dependency extraction unit 15 performs a recursive process.
  • the variable dependency relationship extraction unit 15 is basically the same as the recursive processing (step S10) of the first embodiment, but performs different processing in the following points.
  • step S101 the variable dependency extraction unit 15 extracts the device dependency from the starting device (for example, device X1) set by the analysis condition setting operation unit 9.
  • the variable dependency relationship extraction unit 15 extracts all devices in which the starting device is affected by the “a” contact from the ladder program 16 when the forward device dependency extraction is designated.
  • the variable dependency relationship extraction unit 15 extracts all devices that affect the starting device by the a contact from the ladder program 16.
  • a device that is turned on when the starting point is turned on can be selectively extracted by the extraction process of the dependency relationship limited to the place where the contact point a is used. That is, it is possible to narrow down a huge and complicated dependency relationship (a directed graph) without specifying a large number of analysis conditions (analysis command, analysis target, etc.) in combination.
  • the contact is not the a contact but the b contact. Therefore, the same is true for the process of extracting the dependency only when the input is used as the b contact.
  • the b contact is a contact referred to by negative logic such as the device X6 and the device X7 in FIG. 23, and the coil is turned on when the contact is turned off.
  • Embodiment 7 can be implemented in combination with Embodiments 1 to 6 as appropriate. This makes it possible to further narrow down the device dependency.
  • Embodiment 8 FIG. Next, a program analysis support apparatus according to the eighth embodiment will be described. Below, it demonstrates focusing on a different part from Embodiment 1. FIG.
  • the first embodiment aims to solve the first problem, but the eighth embodiment further aims to solve the second problem. That is, in the eighth embodiment, as a countermeasure to the second problem, by holding the value of the device memory when an error occurs, and performing the device dependency extraction process considering the value, Identify the cause of defects that have low reproducibility.
  • the F device is turned on (or a certain time or constant from when the F device is turned on). Stop the sampling trace (if the score is reached), look at the obtained sampling trace result, check the time series change of the values of other devices until the F device turns ON, identify the cause of the failure Yes.
  • the conventional sampling trace includes the sampling trace from when the trigger condition is met. There is a normal trigger function to start.
  • the analysis condition setting operation unit 9 sets, as the first condition, that a device that does not extract a further forward or backward device dependency is set as the device of the device memory dump 18.
  • 16383 device values can be obtained with one point sampling. Only when the F device is turned on, the internal state of the PC at that time can be roughly grasped.
  • the sampling trace result obtained in this way is a dump of the state of the device memory at that moment. If it is impossible to dump the entire memory inside the PC in terms of capacity, a device that affects the F device value that is the trigger for dumping may be selectively dumped. This is a device obtained by extracting the backward dependence relationship starting from the F device, and can be set in advance.
  • the analysis condition setting operation unit 9 sets a device (for example, device F1) that outputs an abnormality as a starting point of the dependency to be extracted, and performs device dependency extraction in consideration of the device memory dump 18.
  • the variable dependency relationship extraction unit 15 is instructed.
  • FIG. 29 shows a case where the device memory dump 18 is considered and a function that does not perform further device dependency extraction processing is checked and enabled.
  • the analysis condition setting operation screen 9a has a memory dump on / off column 9a11 in place of the type designation on / off column 9a7, the type designation column 9a8, the number designation on / off column 9a9, and the number designation column 9a10.
  • the analysis condition setting operation screen 9a may have a memory dump on / off field 9a11 in addition to the type designation on / off field 9a7, the type designation field 9a8, the number designation on / off field 9a9, and the number designation field 9a10.
  • FIG. 29 illustrates the case where a memory dump designation (ON) is instructed (ie, is illustrated).
  • a memory dump designation is performed by checking (ON). May be instructed not to specify memory dump (off) by removing the check.
  • the variable dependency relationship extraction unit 15 refers to the device memory dump 18 (see FIG. 2) in response to an instruction from the analysis condition setting operation unit 9, and sets the starting point (for example, device F1) set by the analysis condition setting operation unit 9 ) As a starting point, the forward or backward device dependency is extracted while considering the stored contents of the device memory dump 18, and the first extraction result is generated.
  • the variable dependency relationship extraction unit 15 supplies the first extraction result to the variable dependency relationship display processing unit 12.
  • the variable dependency relationship display processing unit 12 generates display information using the first extraction result and displays it on the display screen 4a. For example, the variable dependency display processing unit 12 displays the effective graph shown in the right diagram of FIG. 32 on the display screen 4a.
  • FIG. 33 is a flowchart showing the dependency extraction processing taking into account the memory dump of the device.
  • step S111 the analysis condition setting operation unit 9 sets the starting point of the dependency to be extracted according to the starting point setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 29, the analysis condition setting operation unit 9 sets the device F1 as the starting point of the dependency to be extracted. The analysis condition setting operation unit 9 supplies the set information of the starting point of the dependency relationship to be extracted to the analysis processing execution unit 13.
  • the analysis condition setting operation unit 9 sets the second condition in response to the second condition setting instruction received by the operation button 5a or the like corresponding to the user operation 8. For example, in the case shown in FIG. 29, the analysis condition setting operation unit 9 sets the content held in the device memory dump 18 as the second condition. The analysis condition setting operation unit 9 supplies information on the set second condition to the analysis processing execution unit 13.
  • step S120 the variable dependency extraction unit 15 performs a recursive process.
  • the variable dependency relationship extraction unit 15 is basically the same as the recursive processing (step S10) of the first embodiment, but performs different processing in the following points.
  • step S121 the variable dependency extraction unit 15 considers the device memory dump 18 (see FIGS. 2 and 30) and determines whether or not the starting device (for example, the device F1) is turned on.
  • the variable dependency relationship extraction unit 15 is turned on (“Yes” in step S121)
  • the process proceeds to step S122, and when it is turned off (“No” in step S121), the process is terminated.
  • step S122 the variable dependency extracting unit 15 extracts the device dependency while considering the device memory dump 18 from the starting device (for example, device F1) set by the analysis condition setting operation unit 9. .
  • variable dependency relationship extraction unit 15 when the forward device dependency extraction is designated, sets the ladder program 16 as a device that has the start device ON as a condition among all the devices affected by the start device. Extract from inside.
  • the variable dependency relationship extraction unit 15 selects a device whose starting device is ON from among the ladder programs 16 that influence the starting device. Extract from inside.
  • a device that is required to turn on the starting device can be grasped by referring to the device memory dump 18 (see FIG. 30), for example.
  • FIG. 30 shows a device memory dump 18 acquired when the device F1 is turned on as a trigger condition. If this ON / OFF state is reflected on the ladder program, it is as shown in FIG.
  • the device M9 is first extracted as a device that affects the device F1. Considering the device memory dump 18, since the device M9 is ON and the device F1 that is the coil of the ladder row is ON, the device M9 is further traced back.
  • devices M90, M91, and M92 are extracted as devices that affect the device M9. Since the device M90 is ON and the device M9 that is the coil in the ladder row is ON, the device M90 is further traced back. On the other hand, the device M91 is ON, but the device M9 that is a coil in the ladder row is not turned ON. This is because the ladder is such that the device M9 is turned on only when both the device M91 and the device M92 are turned on. Therefore, the device M91 does not go back any further. Since the device M92 is OFF, it does not go back any further.
  • the device X9 is extracted as a device that affects the device M90. Since the device X9 is ON and the device M90 that is the coil of the ladder row is ON, the device X9 goes back to the device X9, but there is no further dependency that affects the device X9.
  • the device memory itself at an arbitrary time can be referred to instead of the device memory dump by the sampling trace function when an error occurs. This is because the reference destination is only a device memory dump or a device memory at an arbitrary time. If the device status does not change after an error occurs until the error stops, the device at the time of error stop does not need to take a device memory dump by the sampling trace function at the time of error occurrence. There are many cases where there is not much difference even when referring to the memory itself.
  • a device that is turned off may be traced back.
  • the F device indicating the error occurrence is turned on. Therefore, in order to investigate the reason why the F device is turned on, the devices that are turned on are selectively traced back.
  • the cause of why the Y device is not turned on, that is, why it is turned off may be searched. In this case, the devices that are turned off are selectively traced back.
  • the starting device is specified, if the starting device is ON, the ON device is selectively traced back and the starting device is OFF. In this case, devices that are turned off may be selectively traced back. In this case, it is not necessary to specify whether to go back ON or go back OFF.
  • Embodiment 8 can be implemented by combining Embodiments 1 to 7 as appropriate. Thereby, further narrowing down becomes possible.
  • the analysis condition setting operation unit 9 sets a device (for example, device F1) that outputs an occurrence of an abnormality as a starting point of a dependency to be extracted.
  • the variable dependency relationship extraction unit 15 extracts a forward or backward device dependency relationship with reference to the content held in the device memory dump 18 from the device that outputs the occurrence of an abnormality.
  • Embodiment 9 FIG. Next, a program analysis support apparatus according to the ninth embodiment will be described. Below, it demonstrates focusing on a different part from Embodiment 1. FIG.
  • ⁇ Device dependency is displayed in a directed graph (display in block diagram format), which is suitable for understanding.
  • a directed graph display in block diagram format
  • an advanced user interface is required for the display operation. Therefore, when debugging work with a personal computer connected to a PC, there is no problem because an advanced user interface can be realized with a keyboard, mouse, and high-resolution display.
  • debugging operations are performed using buttons, it is necessary to implement a display operation method using a directed graph of device dependencies (display in block diagram format) within the limited user interface. Compared to the case of a personal computer, there is a problem that the number of operations is remarkably increased, which is rather troublesome.
  • the debugging work in question here is performed using a production facility that is measured and controlled by a ladder program, such as a production facility with a built-in PC, and is performed to eliminate a malfunction.
  • a ladder program such as a production facility with a built-in PC
  • the direct goal is to quickly identify the cause of the error.
  • variable dependency relationship display processing unit 12 has a function of selectively displaying the device that is the starting point of the device dependency relationship and the extracted end device of the device dependency relationship.
  • the variable dependency display processing unit 12 omits the device dependency as shown in FIG. 34 between the start device and the end device of the device dependency as shown in FIG. 35 in response to the user operation 8. Display in display form.
  • variable dependency relationship display processing unit 12 displays the start point and end point of the device dependency relationship according to the first extraction result, and displays the halfway device between the start point and the end point according to the expansion display operation. The display is omitted according to the folding display operation instruction.
  • the variable dependency relationship display processing unit 12 displays, for example, a halfway device that is an intermediate point between the start point and the end point according to the expanded display operation for each layer and omits the display according to the folding display operation instruction. Thereby, it is possible to selectively confirm an arbitrary portion (for example, an arbitrary hierarchy) to be confirmed in the entire device dependence relationship.
  • the display is substantially the same as the display by the directed graph of the device dependency (display in the block diagram format).
  • the ninth embodiment it is possible to selectively display the device that is the starting point of the device dependency relationship and the end device of the extracted device dependency relationship, such as a production facility with a built-in PC. Even within the user interface range, the cause of the error can be quickly identified.
  • variable dependency relationship display processing unit 12 displays the start point and end point of the device dependency relationship according to the first extraction result, and intermediate between the start point and the end point of the device dependency relationship.
  • the halfway device is displayed according to the expanded display operation, and the display is omitted according to the folding display operation instruction.
  • the variable dependency display processing unit 12 displays a halfway device that is an intermediate point between the start point and the end point for each layer according to the unfolding display operation, and omits the display according to the folding display operation instruction. Thereby, it is possible to selectively confirm an arbitrary portion (for example, an arbitrary hierarchy) to be confirmed in the entire device dependence relationship.
  • Embodiment 10 FIG. Next, a program analysis support apparatus according to the tenth embodiment will be described. Below, it demonstrates centering on a different part from Embodiment 8. FIG.
  • the fact that the F device is prepared is as described in the eighth embodiment, and in the event of a malfunction, a production facility is used to inform the operator of the fact and to prompt the recovery work. Then, the occurrence of abnormality is displayed on the display unit (for example, Non-Patent Document 4). At this time, in order to identify the cause of the abnormality, the operator looks at the abnormality occurrence screen, separately checks the F device corresponding to the abnormality, and sets the F device as a separate analysis condition. The task of looking at dependency relationships and ladder circuits is complicated.
  • control device 20 includes the program analysis support device 1, a device memory dump 18, an abnormality occurrence display processing unit 21, a display unit 24, an abnormality occurrence memory dump processing unit 22, and a control unit 23.
  • program analysis support apparatus 1 for example, the program analysis support apparatus according to any one of the first to ninth embodiments can be used.
  • device memory dump 18, the device memory dump in the first and eighth embodiments can be used.
  • the abnormality occurrence display processing unit 21 displays the abnormality occurrence on the display unit 24 when the abnormality occurrence is detected in the ladder program 16 (see FIG. 2).
  • the display unit 24 may be a display device such as a liquid crystal display, for example.
  • the abnormality occurrence display processing unit 21 displays, for example, one or more abnormality occurrences on the display unit 24.
  • the abnormality occurrence display processing unit 21 displays a plurality of abnormality occurrences on the display unit 24 as shown in the left diagram of FIG.
  • the abnormality occurrence display processing unit 21 may supply the display information displayed on the display unit 24 to the program analysis support apparatus 1 in response to a request from the control unit 23, for example. As a result, a plurality of occurrences of abnormality can be displayed on the display unit 4 of the program analysis support apparatus 1.
  • the abnormality occurrence display processing unit 21 recognizes that one abnormality occurrence has been selected among the displayed abnormality occurrences in response to the user operation 8, the program analysis support apparatus 1 and the control unit control the selected abnormality occurrence information. Notify unit 23.
  • the memory dump processing unit 22 When an abnormality occurs, the memory dump processing unit 22 at the time of abnormality dumps and holds the memory related to the device that outputs the abnormality when the ladder program 16 detects the abnormality (see FIG. 30). When an abnormality occurs, the memory dump processing unit 22 writes the contents of the held memory dump into the device memory dump 18 periodically or in response to a request from the control unit 23.
  • the control unit 23 controls each unit of the control device 20 as a whole.
  • control unit 23 controls the abnormality occurrence display processing unit 21 to display the abnormality occurrence on the display unit 24 when the abnormality occurrence is detected in the ladder program 16. At this time, the control unit 23 may control the abnormality occurrence display processing unit 21 so as to supply the display information displayed on the display unit 24 to the program analysis support apparatus 1.
  • control unit 23 controls the memory dump processing unit 22 when an abnormality occurs so as to dump the memory related to the device that outputs the abnormality occurrence.
  • control unit 23 stores the contents of the held memory dump in the device memory dump 18 at a predetermined timing (for example, a timing at which the memory dump in the memory dump processing unit 22 at the time of occurrence of abnormality is estimated to be completed).
  • the memory dump processing unit 22 at the time of occurrence of abnormality is controlled so as to write.
  • the control unit 23 is forward-looking as a starting point of a dependency relationship from which a device that outputs the selected abnormality occurrence is desired.
  • the program analysis support apparatus 1 is controlled so as to extract the backward device dependency.
  • the control unit 23 stores the content held in the abnormality occurrence memory dump processing unit 22 related to the device that outputs the selected abnormality occurrence, that is, the device memory dump 18
  • the program analysis support apparatus 1 is controlled so as to extract the forward or backward device dependency in consideration of the retained content.
  • control unit 23 controls the program analysis support apparatus 1 so as to display the device dependency obtained by the extraction (see the right diagram in FIG. 37).
  • control unit 23 may control the program analysis support apparatus 1 so as to display the selected abnormality occurrence and the device dependency obtained by the extraction in a display form in association with each other.
  • the alarm message 1 indicating the occurrence of an abnormality and the directed graph corresponding to the extracted device dependency are associated with each other by a broken arrow extending from the alarm message 1 to the directed graph.
  • the display form as shown in FIG. 37 it is possible to first grasp the control structure causing the occurrence of an abnormality from a global viewpoint, and correspond to that part in order to locally confirm the part of interest from among the parts.
  • the ladder circuit can be displayed, and the work for identifying the cause of the abnormality can be made more efficient.
  • the control unit 23 causes the selected abnormality occurrence when one abnormality occurrence is selected from among the abnormality occurrences displayed by the abnormality occurrence display processing unit 21.
  • the program analysis support apparatus 1 is controlled so as to extract a forward or backward device dependency as a starting point of the dependency to be extracted, and to display the obtained device dependency.
  • the control unit 23 outputs the selected abnormality occurrence when one abnormality occurrence is selected from the abnormality occurrences displayed by the abnormality occurrence display processing unit 21.
  • the device is set as the starting point of the dependency to be extracted, and the contents stored in the memory dump processing unit 22 at the time of occurrence of abnormality regarding the device that outputs the selected abnormality occurrence as the condition relating to the device that outputs the selected abnormality occurrence.
  • the program analysis support apparatus 1 is controlled so as to extract the forward or backward device dependency and display the obtained device dependency.
  • the control unit 23 controls the program analysis support apparatus 1 so as to display the selected abnormality occurrence and the device dependency obtained by extraction in a display form in association with each other.
  • the program analysis support apparatus is useful for failure analysis of ladder programs.
  • 1 program analysis support device 2 microprocessor, 3 data storage memory, 4 display unit, 5 input unit, 6 storage unit, 7 system bus, 8 user operation, 9 analysis condition setting operation unit, 10 analysis result display processing unit, 11 Variable usage status display processing unit, 12 variable dependency display processing unit, 13 analysis processing execution unit, 14 variable usage status extraction unit, 15 variable dependency extraction unit, 16 ladder program, 17 device comment, 18 device memory dump, 19 circuit Display processing unit, 20 control device, 21 anomaly occurrence display processing unit, 22 anomaly occurrence memory dump processing unit, 23 control unit, 24 display unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Programmable Controllers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

解析条件設定操作部と、変数依存関係抽出部と、変数依存関係表示処理部とを備え、前記解析条件設定操作部は、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスに係る第1の条件、又はさらなる前向き又は後向きのデバイス依存関係を抽出するデバイスに係る第2の条件を設定し、前記変数依存関係抽出部は、前記第1の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、且つ前記第2の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出するように、前記ラダープログラムから設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成し、前記変数依存関係表示処理部は、前記第1の抽出結果に従って、デバイス依存関係を表示する。

Description

プログラム解析支援装置及び制御装置
 本発明は、プログラム解析支援装置及び制御装置に関する。
 ラダープログラムについて、コントローラが正しく動作しているかどうかをデバッグするための機能として、サンプリングトレース機能が知られている。サンプリングトレース機能とは、指定されたタイミングで指定されたデバイスの状態を示すデータ(トレースデータ)を一定の周期(サンプリング周期)で取得(サンプリング)し、取得したトレースデータを所定のメモリ(サンプリングトレースメモリ)に格納するものである。サンプリングトレースの詳細については、非特許文献1~2に記載されている。
 ここで言うデバイスとは、PCの計測監視制御対象とPCとの間の入出力を、PCのメモリアドレスに割り付けたもの、および、PCが内部的に使用するメモリアドレスを指している。例えば非特許文献1~2に記載のPCでは、入力を割り付けたものをXデバイス、出力を割り付けたものをYデバイス、内部的に使用するビットデータ(内部リレー)をMデバイス、通信に使用するものをBデバイス、エラーの発生を示すものをFデバイス、などというようにデータ種別によってデバイス文字が予め決められている。各デバイスのアドレスは、XデバイスやYデバイスやBデバイスなどについては16進表現で、MデバイスやFデバイスなどについては10進表現となっている。
国際公開第2010/095289号
「QCPUユーザーズマニュアル(機能解説・プログラム基礎編)」三菱電機株式会社、マニュアル番号SH-080473 「GX Developer Version8 オペレーティングマニュアル」三菱電機株式会社、マニュアル番号SH-080356 「プログラムスライシング技術と応用」 下村隆夫著 共立出版 ISBN4-320-02743-4 「三菱数値制御装置PLCプログラミング説明書」三菱電機株式会社、マニュアル番号IB-1500035-F
 不具合動作の原因と疑われるデバイスについて、サンプリングトレースを行い、その内容をタイミングチャートとして表示するなどして解析すれば、不具合動作の原因特定が期待される。しかしながら、一度にサンプリングトレースできるメモリサイズには限りがある。
 それについて、本発明者は、検討を行い、2つの問題点があることを見出した。第1の問題点として、一度にサンプリングトレースできるメモリサイズには限りがあるので、不具合動作の原因と疑われるデバイスを絞り込む必要がある。また、第2の問題点として、実質的に不具合原因の特定に直接的に寄与しないもの(例えば、デバイスの動作)を多く含んでサンプリングトレースしてしまうことがある。
 第1の問題点を解決する技術として、非特許文献3に記載のスライシング技術がある。すなわち、ラダープログラムに於いては、デバイス(変数)の依存関係(の有向グラフ)を抽出することである。デバイスの依存関係(の有向グラフ)を利用することで、プログラム中から、不具合動作の原因と疑われるデバイスを絞り込むことが可能となる。
 しかしながら、近年、ラダープログラムが大規模かつ複雑になりつつあり、依存関係(の有向グラフ)を利用してもなお、不具合動作の原因と疑われるデバイスを絞り込むことが困難になっている。
 それに対して、特許文献1には、複数の解析条件(解析コマンド、解析対象等)を自由に組み合わせてプログラム解析を行うことが記載されている。これにより、特許文献1によれば、プログラム解析の結果に基づいて、編集対象となる場所を迅速に特定することが可能となるとされている。
 すなわち、特許文献1に記載の技術を利用すれば、依存関係(の有向グラフ)どうしの論理演算AND/OR/NOTを行うことで、巨大で複雑な依存関係(の有向グラフ)から、より深く解析条件に合致する依存関係(の有向グラフ)だけを抽出することが可能となるようにも考えられる。
 一方、デバッグ作業は、PCが組み込まれた生産設備を使って行われる。前述のとおり、パーソナルコンピュータとPCとを接続してデバッグ作業が行われるほか、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業が行われる。
 特許文献1に記載の技術を利用するためには、複数の解析条件を自由に組み合わせて指定するための高度なユーザインタフェースが必要となる。よって、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業が行われる場合には、これら限られたユーザインタフェースの範囲内で、解析条件を自由に組み合わせて指定するための操作方法を実現せざるをえないため、パーソナルコンピュータの場合に比べ、格段に操作数が多くなり、かえって手間となってしまう可能性がある。
 例えば、特許文献1に記載の技術では、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業を行う場合に、格段に操作数が多いために、操作ミスを誘発しやすく、適正に解析条件が組み合わされない可能性があり、不具合動作の原因と疑われるデバイスを絞り込むことが困難になりやすい。結果として、第1の問題点が未解決のままとなる。
 また、特許文献1には、不具合の再現性について一切記載がなく、再現性の低い不具合への対処について不具合に深く関係する依存関係をどのように抽出するのかについても一切記載がない。すなわち、第2の問題点も依然として未解決のままである。
 本発明は、上記に鑑みてなされたものであって、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業を行う場合に、巨大で複雑な依存関係(の有向グラフ)から不具合に深く関係する依存関係(の有向グラフ)を少ない操作数で抽出して表示できるプログラム解析支援装置を得ることを目的とする。
 上述した課題を解決し、目的を達成するために、本発明の1つの側面にかかるプログラム解析支援装置は、解析対象となるラダープログラムを設定するとともに、抽出したい依存関係の起点を設定する解析条件設定操作部と、前記ラダープログラムから前向き又は後向きのデバイス依存関係を抽出する変数依存関係抽出部を有する解析処理実行部と、前記抽出されたデバイス依存関係を表示する変数依存関係表示処理部を有する解析結果表示処理部と、前記ラダープログラムを表示する回路表示処理部とを備え、前記解析条件設定操作部は、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスに係る第1の条件、又はさらなる前向き又は後向きのデバイス依存関係を抽出するデバイスに係る第2の条件を設定し、前記変数依存関係抽出部は、前記第1の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、且つ前記第2の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出するように、前記ラダープログラムから前記設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成し、前記変数依存関係表示処理部は、前記第1の抽出結果に従って、デバイス依存関係を表示することを特徴とする。
 本発明によれば、第1の条件又は第2の条件を用いることで、デバイス依存関係の方向性を利用してデバイス依存関係を効率的に絞り込むことができる。この結果、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)から、不具合に深く関係する依存関係(の有向グラフ)だけを抽出することが可能となる。すなわち、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業を行う場合に、巨大で複雑な依存関係(の有向グラフ)から不具合に深く関係する依存関係(の有向グラフ)を少ない操作数で抽出して表示できる。
図1は、実施の形態1にかかるプログラム解析支援装置のハードウェア構成を示す図である。 図2は、実施の形態1にかかるプログラム解析支援装置の機能構成を示す図である。 図3は、実施の形態1における解析条件設定操作部の構成を示す図である。 図4は、実施の形態1における前向き依存関係抽出結果に対応した有向グラフを示す図である。 図5は、実施の形態1におけるラダープログラムの構成を示す図である。 図6は、実施の形態1におけるデバイス種別を考慮した前向き解析条件設定例を示す図である。 図7は、実施の形態1におけるデバイス種別を考慮した前向き依存関係抽出結果例に対応した有向グラフを示す図である。 図8は、実施の形態1におけるデバイス種別を考慮した後向き解析条件設定例を示す図である。 図9は、実施の形態1における依存関係グラフ表示から当該部分に係るラダー回路を表示する例を示す図である。 図10は、実施の形態1におけるデバイス種別を考慮した依存関係の抽出処理を示すフローチャートである。 図11は、実施の形態1におけるデバイス種別を考慮した前向き解析条件設定例を示す図である。 図12は、実施の形態1におけるデバイス種別を考慮した依存関係の抽出処理を示すフローチャートである。 図13は、実施の形態2における参照回数を考慮した前向き解析条件設定例を示す図である。 図14は、実施の形態2における参照回数を考慮した前向き依存関係抽出結果例を示す図である。 図15は、実施の形態2における参照回数を考慮した依存関係の抽出処理を示すフローチャートである。 図16は、実施の形態2における解析条件設定操作部を示す図である。 図17は、実施の形態2における使用状況抽出結果を示す図である。 図18は、実施の形態3におけるラダープログラムの構成を示す図である。 図19は、実施の形態3における後向き依存関係抽出結果を示す図である。 図20は、実施の形態3における解析条件設定操作部を示す図である。 図21は、実施の形態3におけるラダー1行中の制御依存回数を考慮した後向き依存関係抽出結果を示す図である。 図22は、実施の形態3におけるラダー1行中の制御依存回数を考慮した依存関係の抽出処理を示すフローチャートである。 図23は、実施の形態4における自己保持を示す図である。 図24は、実施の形態4における自己保持デバイスを考慮した前向き解析条件設定例を示す図である。 図25は、実施の形態4における自己保持デバイスを考慮した依存関係の抽出処理を示すフローチャートである。 図26は、実施の形態5における得られた依存関係の終点を自動的に新たな起点とする抽出処理を示すフローチャートである。 図27は、実施の形態5における前向き依存関係抽出結果を示す図である。 図28は、実施の形態7におけるA接点を考慮した依存関係の抽出処理を示すフローチャートである。 図29は、実施の形態8における解析条件設定操作部を示す図である。 図30は、実施の形態8におけるデバイスメモリダンプを示す図である。 図31は、実施の形態8におけるラダープログラムの構成を示す図である。 図32は、実施の形態8における後向き依存関係抽出結果を示す図である。 図33は、実施の形態8におけるデバイスメモリダンプを考慮した依存関係の抽出処理を示すフローチャートである。 図34は、実施の形態9における依存関係抽出結果を示す図である。 図35は、実施の形態9における依存関係表示を示す図である。 図36は、実施の形態10におけるハードウェア構成を示す図である。 図37は、実施の形態10における異常発生表示からその原因特定のための依存関係を表示する例を示す図である。
 以下に、本発明にかかるプログラム解析支援装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。
実施の形態1.
 実施の形態1にかかるプログラム解析支援装置1について説明する。
 プログラム解析支援装置1は、プログラマブルコントローラ(以下「PC」と言う。)、モーションコントローラ(以下「MC」と言う。)、数値制御装置コントローラ(以下「NC」と言う。)、検査装置コントローラ、又は表示器(以下「GOT」と言う。)等の各種の産業用のコントローラ、制御装置、或いは、マイクロコンピュータに於いて実行されるラダープログラムに関して、開発した新しいラダープログラムの動作不具合の発生原因を探索するデバッグ作業を、効率化するための装置である。以下に於いては、PCを例として記載する。
 PCは、ラダープログラム(計測制御プログラム)を実行して、計測制御対象の状態を把握したり、又は、動作を計測制御対象に指示したりする。ラダープログラムの作成には、所定のラダープログラム作成支援装置(計測制御プログラム作成支援装置)が用いられる。ラダープログラム作成支援装置は、一般的にはパーソナルコンピュータ上で動作するソフトウェアツールとして提供され、PCが計測制御対象を計測したり又は制御したりする際に用いられるプログラムであるラダープログラムの編集を支援する機能を有している。その他にも、ラダープログラム作成支援装置は、パーソナルコンピュータとPCとを接続して、編集したラダープログラムをPCへ転送したり、計測制御対象の状態又はラダープログラムの実行によって変化する変数(以下「デバイス」と言う。)の値の状態を監視したりする機能をも有している。
 なお、ラダープログラム作成支援装置が提供するプログラム編集機能及び監視機能は、GOT上にも搭載されており、PCと常時接続状態にあるGOT上からもラダープログラムの編集又はデバイスの値の状態の監視を行うことが出来る。
 ラダープログラムについて、コントローラが正しく動作しているかどうかをデバッグするための機能として、サンプリングトレース機能が知られている。サンプリングトレース機能とは、指定されたタイミングで指定されたデバイスの状態を示すデータ(トレースデータ)を一定の周期(サンプリング周期)で取得(サンプリング)し、取得したトレースデータを所定のメモリ(サンプリングトレースメモリ)に格納するものである。
 ここで言うデバイスとは、PCの計測監視制御対象とPCとの間の入出力を、PCのメモリアドレスに割り付けたもの、および、PCが内部的に使用するメモリアドレスを指している。例えば、PCでは、入力を割り付けたものをXデバイス、出力を割り付けたものをYデバイス、内部的に使用するビットデータ(内部リレー)をMデバイス、通信に使用するものをBデバイス、エラーの発生を示すものをFデバイス、などというようにデータ種別によってデバイス文字が予め決められている。各デバイスのアドレスは、例えば、XデバイスやYデバイスやBデバイスなどについては16進表現で、MデバイスやFデバイスなどについては10進表現となっている。
 不具合動作の原因と疑われるデバイスについて、サンプリングトレースを行い、その内容をタイミングチャートとして表示するなどして解析すれば、不具合動作の原因特定が期待される。しかしながら、一度にサンプリングトレースできるメモリサイズには限りがある。
 それについて、本発明者は、検討を行い、2つの問題点があることを見出した。
 第1の問題点として、一度にサンプリングトレースできるメモリサイズには限りがあるので、不具合動作の原因と疑われるデバイスを絞り込む必要がある。
 また、第2の問題点として、実質的に不具合原因の特定に直接的に寄与しないもの(例えば、デバイスの動作)を多く含んでサンプリングトレースしてしまうことがある。例えば、再現性の低い不具合、すなわち、いつ発生するか予測不能な不具合動作についてサンプリングトレースを行いたい場合には、サンプリング周期を長くすることで、サンプリング実施時間を長くする対処が考えられるが、サンプリング周期を長くすれば、実質的に不具合原因の特定に直接的に寄与しないものを多く含んでサンプリングトレースしてしまい、不具合動作について詳細な動作の解析が困難になる可能性がある。
 第1の問題点を解決する技術として、スライシング技術が考えられる。すなわち、ラダープログラムに於いては、デバイス(変数)の依存関係(の有向グラフ)を抽出することである。
 例えば、ラダープログラムは、複数のラダー行を含む(図5参照)ものである。ラダープログラムは、各ラダー行を左から右に読むように、複数のラダー行を上から下に読むように、構成されている。各ラダー行の演算結果は、コイル出力に格納されるとともに、後続のラダー行で入力として扱われることがある(図5参照)。言い換えると、ラダープログラムでは、左から右に、且つ、上から下に、シーケンシャルに処理が行われる。
 前向きの依存関係は、あるデバイスの値が変化することによって影響を受ける他のデバイスを抽出し、さらにそれらデバイスによって影響を受ける他のデバイスを抽出してゆくことで、あるデバイスの値が変化することによって影響を受ける全てのデバイスを抽出するものである。すなわち、前向きの依存関係は、シーケンシャルな処理の方向に沿って依存関係をたどっていくものである。そうして抽出されたデバイス群は、有向グラフを構成する(図4参照)。
 後向きの依存関係は、あるデバイスの値の変化に影響を与える他のデバイスを抽出し、さらにそれらデバイスに影響を与える他のデバイスを抽出してゆくことで、あるデバイスの値の変化に影響を与える全てのデバイスを抽出するものである。すなわち、後向きの依存関係は、シーケンシャルな処理の方向と逆に依存関係を遡ってたどっていくものである。そうして抽出されたデバイス群は、有向グラフを構成する(図4参照)。
 このようなデバイスの依存関係(の有向グラフ)を利用することで、ラダープログラム中から、不具合動作の原因と疑われるデバイスをある程度絞り込むことが可能となる。
 しかしながら、近年、ラダープログラムが大規模かつ複雑になりつつあり、依存関係(の有向グラフ)を利用してもなお、不具合動作の原因と疑われるデバイスを要求レベルまで絞り込むことが困難になっている。なぜならば、近年のラダープログラムにおいては、あるデバイスの値が変化することによって影響を受けるデバイスの数が膨大であり、あるいは、あるデバイスの値の変化に影響を与えるデバイスの数が膨大であり、抽出した依存関係(の有向グラフ)が巨大で複雑なものとなり、それだけでは実質的に要求レベルまでデバイスを絞り込めない可能性が高いからである。
 それに対して、仮に、多数の解析条件(解析コマンド、解析対象等)を自由に組み合わせてプログラム解析を行う場合を考える。この場合、依存関係(の有向グラフ)どうしの論理演算AND/OR/NOTを多数行うことで、巨大で複雑な依存関係(の有向グラフ)から、より深く解析条件に合致する依存関係(の有向グラフ)だけを抽出すること、すなわち不具合動作の原因と疑われるデバイスを要求レベルまで絞り込むことが可能となるようにも考えられる。
 一方、デバッグ作業は、PCが組み込まれた生産設備を使って行われる。前述のとおり、パーソナルコンピュータとPCとを接続してデバッグ作業が行われるほか、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業が行われる。
 多数の解析条件(解析コマンド、解析対象等)を自由に組み合わせてプログラム解析を行うためには、多数の解析条件を自由に組み合わせて指定するための高度なユーザインタフェースが必要となる。よって、パーソナルコンピュータとPCとを接続してデバッグ作業を行う場合には、キーボード、マウス、高解像度ディスプレイにより、あるいはそれらがタッチパネル式となっているものにより、高度なユーザインタフェースが実現されうるため問題ないが、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業が行われる場合には、これら限られたユーザインタフェースの範囲内で、多数の解析条件を自由に組み合わせて指定するための操作方法を実現せざるをえないため、パーソナルコンピュータの場合に比べ、格段に操作数が多くなり、かえって手間となってしまう可能性がある。
 すなわち、多数の解析条件(解析コマンド、解析対象等)を自由に組み合わせてプログラム解析を行う場合、例えば、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業を行うと、格段に操作数が多いために、操作ミスを誘発しやすく、適正に解析条件が組み合わされない可能性があり、不具合動作の原因と疑われるデバイスを要求レベルまで絞り込むことが困難になりやすい。結果として、第1の問題点が未解決のままとなる。
 また、多数の解析条件(解析コマンド、解析対象等)を自由に組み合わせてプログラム解析を行う場合、再現性の低い不具合については、不具合動作がいつ発生するのか予測不能であるため、多数の解析条件を想定することも困難である。すなわち、第2の問題点も依然として未解決のままである。
 そこで、実施の形態1では、まず、第1の問題点の解決を目指し、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業を行う場合に、巨大で複雑な依存関係(の有向グラフ)から不具合に深く関係する依存関係(の有向グラフ)を少ない操作数で選択的に抽出するための仕組みを提案する。
 具体的には、プログラム解析支援装置1は、図1に示すようなハードウェア構成を備える。図1は、プログラム解析支援装置1のハードウェア構成を示す図である。
 プログラム解析支援装置1は、マイクロプロセッサ2、データ格納メモリ3、表示部4、入力部5、保存部6、及びシステムバス7を備える。マイクロプロセッサ2、データ格納メモリ3、表示部4、入力部5、及び保存部6は、システムバス7を介して互いに接続されている。
 マイクロプロセッサ2は、プログラム解析支援装置1の各部を全体的に制御し、プログラム解析支援装置1の各機能を実行する。
 データ格納メモリ3は、マイクロプロセッサ2による制御のもと、データを一時的に格納する。データ格納メモリ3は、例えば、マイクロプロセッサ2による作業領域となるワーク領域3aを有している。データ格納メモリ3は、例えば、DRAM(Dynamic Random Access Memory)より成る。
 表示部4は、マイクロプロセッサ2による制御のもと、所定の情報を表示画面4a上に表示する。表示部4は、例えば、生産設備が備える表示器であってもよい。表示器は、例えば、液晶ディスプレイ等を有する。あるいは、表示部4は、例えば、ディスプレイ装置であってもよい。ディスプレイ装置は、例えば、液晶ディスプレイ等を有する。
 入力部5は、操作ボタン5a等を介して、ユーザから所定の指示を受け付ける。操作ボタン5aは、例えば、生産設備が備える操作ボタンである。操作ボタン5aは、例えば、生産設備が備える表示器の表示画面4a上にボタンオブジェクト及びタッチパネルとして実現されていてもよい。あるいは、例えば、入力部5は、操作ボタン5a等を有する入力装置であってもよい。操作ボタン5aは、例えば、入力装置に設けられた物理的なボタンであってもよい。
 保存部6は、例えば、解析対象のラダープログラム及びプログラム解析支援装置1の各機能を実現するためのプログラム解析支援用プログラム6a等のプログラム及び解析結果等のデータ6bをそれぞれファイルとして記憶・保持する。保存部6は、例えば、ハードディスク等の記憶装置より成る。
 また、プログラム解析支援装置1は、図2に示すような機能構成を備える。図2は、プログラム解析支援装置1の機能構成を示す図である。
 プログラム解析支援装置1は、例えば、プログラム解析支援用プログラムがマイクロプロセッサ2により実行されることで、図2に示すような機能構成がプログラム解析支援装置1内(例えば、データ格納メモリ3におけるワーク領域3a内)に形成される。なお、プログラム解析支援装置1の各機能部は、プログラム解析支援用プログラムの実行開始に応じて一括して形成されてもよいし、プログラム解析支援用プログラムの実行状況に応じて順次に形成されてもよい。
 具体的には、プログラム解析支援装置1は、解析条件設定操作部9、解析処理実行部13、解析結果表示処理部10、及び回路表示処理部19を備える。
 ラダープログラム16に対するプログラム解析を行う場合には、ユーザは、入力部5の操作ボタン5a等を操作し、プログラム解析条件を入力するユーザ操作8を行う。解析条件設定操作部9は、ユーザ操作8に対応する指示に応じて、プログラム解析条件を設定して解析処理実行部13へ供給する。
 例えば、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起動指示に応じて、プログラム解析支援用プログラムの起動指令を生成して解析処理実行部13へ供給する。
 例えば、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられたプログラム設定指示に応じて、解析対象となるラダープログラム16を設定する。プログラム設定指示は、解析対象となるラダープログラム16を設定させる指示である。解析条件設定操作部9は、設定されたラダープログラム16の情報を解析処理実行部13へ供給する。
 また、例えば、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。起点設定指示は、抽出したい依存関係の起点を設定させる指示である。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、第1の条件及び第2の条件のいずれか一方を設定する。第1の条件は、さらなる前向き又は後向きのデバイス依存関係を抽出しないものとするデバイスに係る条件である。第2の条件は、さらなる前向き又は後向きのデバイス依存関係を抽出するものとするデバイスに係る条件である。第1の条件及び第2の条件の詳細は、後述する。
 例えば、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第1の条件設定指示に応じて、第1の条件を設定する。第1の条件設定指示は、第1の条件を設定させる指示である。解析条件設定操作部9は、設定された第1の条件の情報を解析処理実行部13へ供給する。
 あるいは、例えば、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第2の条件設定指示に応じて、第2の条件を指定する。第2の条件設定指示は、第2の条件を設定させる指示である。解析条件設定操作部9は、設定された第2の条件の情報を解析処理実行部13へ供給する。
 解析処理実行部13は、プログラム解析支援用プログラムの起動指令を解析条件設定操作部9から受ける。解析処理実行部13は、プログラム解析支援用プログラムの起動指令に応じて、保存部6に保持されているプログラム解析支援用プログラムを読み出す。
 また、解析処理実行部13は、プログラム解析条件の設定結果を解析条件設定操作部9から受ける。解析処理実行部13は、プログラム解析条件の設定結果に応じて、プログラム解析処理を実行して、プログラム解析処理の結果、すなわち解析結果を解析結果表示処理部10へ供給する。
 例えば、解析処理実行部13は、変数使用状況抽出部14及び変数依存関係抽出部15を有する。変数使用状況抽出部14は、例えば、解析条件設定操作部9を介して使用状況を抽出するよう指示された場合に、デバイスの使用状況を抽出する。変数使用状況抽出部14は、デバイスの使用状況の抽出結果を生成して解析結果表示処理部10へ供給する。
 変数依存関係抽出部15は、例えば、解析条件設定操作部9を介して依存関係を抽出するよう指示された場合に、デバイスの依存関係を抽出する。すなわち、変数依存関係抽出部15は、ラダープログラム16から前向き又は後向きのデバイス依存関係を抽出する。
 このとき、変数依存関係抽出部15は、解析条件設定操作部9を介して設定された第1の条件に合致するデバイスについて、さらなる前向き又は後向きのデバイス依存関係を抽出しないようにする。また、変数依存関係抽出部15は、解析条件設定操作部9を介して設定された第2の条件に合致するデバイスについて、さらなる前向き又は後向きのデバイス依存関係を抽出するようにする。
 なお、変数依存関係抽出部15は、デバイス依存関係を抽出する際に、デバイスメモリダンプ18の保持内容を参酌してもよい。
 そして、変数依存関係抽出部15は、デバイス依存関係の抽出結果、すなわち第1の抽出結果を生成して解析結果表示処理部10へ供給する。
 解析結果表示処理部10は、プログラム解析処理の結果を解析処理実行部13から受ける。解析結果表示処理部10は、プログラム解析処理の結果を用いて表示情報を生成し、生成された表示情報に従って、プログラム解析処理の結果を表示部4の表示画面4a上に表示する。
 例えば、解析結果表示処理部10は、変数使用状況表示処理部11及び変数依存関係表示処理部12を有する。変数使用状況表示処理部11は、例えば、デバイスの使用状況の抽出結果を変数使用状況抽出部14から受ける。変数使用状況表示処理部11は、デバイスの使用状況の抽出結果を用いて表示情報を生成し、生成された表示情報に従って、デバイスの使用状況の抽出結果を表示部4の表示画面4a上に表示する。例えば、変数使用状況表示処理部11は、デバイスの使用状況の抽出結果をグラフにまとめたグラフ情報を生成し、グラフ情報に従って、デバイスの使用状況の抽出結果を表示部4の表示画面4a上にグラフの形態で表示する。これにより、表示画面4aを閲覧したユーザは、デバイスの使用状況の抽出結果を視覚的に容易に把握することができる。
 変数依存関係表示処理部12は、例えば、デバイス依存関係の抽出結果、すなわち第1の抽出結果を変数使用状況抽出部14から受ける。変数依存関係表示処理部12は、第1の抽出結果を表示情報に変換し、変換された表示情報に従って、デバイス依存関係の抽出結果を表示部4の表示画面4a上に表示する。例えば、変数依存関係表示処理部12は、デバイス依存関係の抽出結果を有向グラフ(図4、図7参照)にまとめた有向グラフ情報を生成し、有向グラフ情報に従って、デバイス依存関係の抽出結果を表示部4の表示画面4a上に有向グラフの形態で表示する。これにより、表示画面4aを閲覧したユーザは、デバイス依存関係の抽出結果を視覚的に容易に把握することができる。
 また、変数依存関係表示処理部12は、例えば、ユーザ操作8に対応して操作ボタン5a等で受け付けられたデバイス選択指示に応じて、選択されたデバイスを指定する。デバイス選択指示は、変数依存関係表示処理部12により表示画面4a上に表示されたデバイス依存関係(例えば、有向グラフ)の中から1つのデバイスが選択されたとき、その選択されたデバイスを指定させる指示である。変数依存関係表示処理部12は、指定されたデバイスの情報を回路表示処理部19へ供給する。
 回路表示処理部19は、指定されたデバイスの情報を変数依存関係表示処理部12から受ける。回路表示処理部19は、指定されたデバイスに応じて、ラダー回路の表示情報を生成する。例えば、回路表示処理部19は、指定されたデバイスをコイル出力するラダー回路の表示情報を生成する。
 そして、例えば、回路表示処理部19は、変数依存関係表示処理部12により表示されたデバイス依存関係(例えば、有向グラフ)に代えて、指定されたデバイスをコイル出力するラダー回路を選択的に表示する(図9の右図参照)。
 あるいは、例えば、回路表示処理部19は、変数依存関係表示処理部12により表示されたデバイス依存関係、すなわち抽出されたデバイス依存関係(例えば、有向グラフ)の全体を表示しつつ、指定されたデバイスをコイル出力するラダー回路を表示する(図9参照)。例えば、回路表示処理部19は、抽出されたデバイス依存関係の全体の有向グラフと、指定されたデバイスをコイル出力するラダー回路とを、横に並べて表示する(図9参照)。あるいは、例えば、回路表示処理部19は、抽出されたデバイス依存関係の全体の有向グラフを表示しつつ、その有向グラフの上に重なるように、指定されたデバイスをコイル出力するラダー回路を(例えば、表示画面4aの中心に)表示する。
 次に、解析条件設定操作部9の構成について図3を用いて説明する。図3は、解析条件設定操作部9の構成を示す図である。
 解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起動指示に応じて解析処理実行部13によりプログラム解析支援用プログラムが読み出された際に、解析処理実行部13により展開された画面データを受ける。解析条件設定操作部9は、その画面データに従って、例えば図3に示すような解析条件設定操作画面9aを表示画面4a上に表示する。解析条件設定操作部9は、例えば解析条件設定操作画面9aを介してユーザ操作8を受け付ける。
 例えば、図3は、プログラム解析支援装置1がデバイスの使用状況を抽出する機能とデバイスの依存関係を抽出する機能とを有している場合であって、ユーザがデバイスの依存関係を抽出する機能を選択して指定している場合を示している。さらに、デバイスの依存関係を抽出する機能の場合には、前向きの依存関係を抽出するのか、後向きの依存関係を抽出するのかを指定し、そして解析処理の起点を指定する。図3では、前向きを指定し、起点として入力デバイスX1を指定している場合を示している。
 具体的には、解析条件設定操作画面9aは、解析選択欄9a1,9a2、実行ボタン9a3、キャンセルボタン9a4、向き指定欄9a5、起点指定欄9a6、種別指定オンオフ欄9a7、種別指定欄9a8、回数指定オンオフ欄9a9、及び回数指定欄9a10を有する。解析選択欄9a1,9a2、実行ボタン9a3、キャンセルボタン9a4、向き指定欄9a5、起点指定欄9a6、種別指定オンオフ欄9a7、種別指定欄9a8、回数指定オンオフ欄9a9、及び回数指定欄9a10は、それぞれ、操作ボタン5aに相当する。
 2つの解析選択欄9a1,9a2は、いずれか一方が択一的に選択される。例えば、解析選択欄9a1が選択された場合、解析条件設定操作部9は、解析処理として、デバイスの使用状況の抽出を選択し、デバイスの使用状況の抽出が選択された旨の情報を変数使用状況抽出部14に通知する。これに応じて、変数使用状況抽出部14は、例えば、解析条件設定操作部9を介して使用状況を抽出するよう指示されたことを認識する。
 そして、実行ボタン9a3が押されたら、解析条件設定操作部9は、解析処理の開始を変数使用状況抽出部14に指令する。これに応じて、変数使用状況抽出部14は、デバイスの使用状況を抽出し、変数使用状況表示処理部11は、その抽出結果を用いて表示情報(例えば、グラフ情報)を表示画面4a上に表示する。
 あるいは、キャンセルボタン9a4が押されたら、解析条件設定操作部9は、解析処理のキャンセルを変数使用状況抽出部14に指令する。これに応じて、変数使用状況抽出部14は、デバイスの使用状況の抽出を中止する。
 あるいは、例えば、解析選択欄9a2が選択された場合、解析処理として、デバイスの依存関係の抽出が選択され、デバイスの依存関係の抽出が選択された旨の情報が変数依存関係抽出部15に通知される。これに応じて、変数依存関係抽出部15は、例えば、解析条件設定操作部9を介してデバイスの依存関係を抽出するよう指示されたことを認識する。
 向き指定欄9a5では、抽出したいデバイス依存関係の向きとして、前向き及び後向きのいずれかが選択される。図3では、前向きが選択された場合が例示されている。向き指定欄9a5では、例えば、黒三角をクリックすることでプルダウンメニューとして前向き及び後向きが表示され、前向き及び後向きのいずれかがクリックされることで選択されてもよい。
 起点指定欄9a6では、抽出したい依存関係の起点が指示される。図3では、抽出したい依存関係の起点として、デバイスX1が指示された場合が例示されている。
 種別指定オンオフ欄9a7では、種別指定を行うこと(オン)及び種別指定を行わないこと(オフ)のいずれかが指示される。図3では、種別指定を行わないこと(オフ)が指示された場合が例示されている。種別指定オンオフ欄9a7では、例えば、チェックを入れることで種別指定を行うこと(オン)を指示し、チェックを外すことで種別指定を行わないこと(オフ)を指示してもよい。
 種別指定欄9a8では、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスに係る第1の条件が指示される。例えば、種別指定欄9a8では、第1の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスの種別が指示される。デバイスの種別は、例えば、入力を割り付けたものを示すXデバイス、出力を割り付けたものを示すYデバイス、内部的に使用するビットデータ(内部リレー)を示すMデバイス、通信に使用するものを示すBデバイス、エラーの発生を示すFデバイスを含む。図3では、種別指定欄9a8が指示されていない場合が例示されている。
 そして、実行ボタン9a3が押されたら、解析条件設定操作部9は、解析処理の開始を変数依存関係抽出部15に指令する。これに応じて、変数依存関係抽出部15は、デバイス依存関係を抽出し、変数依存関係表示処理部12は、その抽出結果、すなわち第1の抽出結果を用いて、表示情報(例えば、有向グラフ情報)を表示画面4a上に表示する。
 あるいは、キャンセルボタン9a4が押されたら、解析条件設定操作部9は、解析処理のキャンセルを変数依存関係抽出部15に指令する。これに応じて、変数依存関係抽出部15は、デバイス依存関係の抽出を中止する。
 なお、起点としての入力デバイスX1は、回路表示処理部19によって表示されるラダープログラムの中から接点やコイルを選択することによって指定するように構成してもよい。
 図4は、解析条件設定操作画面9aが図3に示すように操作され、実行ボタン9a3が押された場合の実行結果の一例である。図4では、多数のデバイスおよび依存関係が抽出されている場合を示している。
 本実施の形態では、このように抽出結果が発散的になる原因として、図5に示すように、出力デバイスYが、さらに接点としても参照されている場合があり、これによって依存関係として抽出されるデバイスの数が多くなっていることに着目し、例えば、指定したデバイス種別については、それ以上の依存関係の抽出処理を行わないようにする。
 例えば、Yデバイスは、出力デバイスなのであるから、本来ならば、入力デバイスXを起点として前向き依存関係を抽出する場合、その終点はYデバイスである。にも関わらず、そのYデバイスがさらに接点としても参照されているところまで依存関係の抽出処理を進めることは、Xデバイスを起点とした依存関係の抽出の範囲を超えて、さらにそのYデバイスを起点とした依存関係の抽出を行っているに他ならない。
 そこで、本実施の形態では、図6に示すように、例えば、Yデバイスを起点とした依存関係の抽出を抑制するために、解析条件設定操作画面9aにおいて、デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にし、それ以上の依存関係の抽出処理を行わないことにするデバイス種別として、Yデバイスを指定している。
 例えば、図6に示すように、解析条件設定操作画面9aにおいて、2つの解析選択欄9a1,9a2のうち解析選択欄9a2が選択され、向き指定欄9a5で前向きが選択され、起点指定欄9a6で抽出したい依存関係の起点としてデバイスX1が指示され、種別指定オンオフ欄9a7で種別指定を行うこと(オン)が指示される。そして、種別指定欄9a8で、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスの種別(第1の条件)として、Yデバイスが指示される。
 次に、デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理について、図10を用いて説明する。図10は、デバイス種別を考慮した依存関係の抽出処理を示すフローチャートである。
 ステップS1では、解析条件設定操作部9が、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。例えば、図6に示す場合、解析条件設定操作部9は、抽出したい依存関係の起点としてデバイスX1を設定する。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第1の条件設定指示に応じて、第1の条件を設定する。例えば、図6に示す場合、解析条件設定操作部9は、第1の条件として、すなわち、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイス種別として、Yデバイスを設定する。解析条件設定操作部9は、設定された第1の条件の情報を解析処理実行部13へ供給する。
 ステップS10では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、以下のステップS11~ステップS17の処理を行う。
 ステップS11では、変数依存関係抽出部15が、解析条件設定操作部9により設定された起点デバイス(例えば、デバイスX1)を起点として、デバイスの依存関係を抽出する。例えば、変数依存関係抽出部15は、前向きのデバイス依存関係の抽出が指定された場合、起点デバイスが影響を与える全てのデバイスをラダープログラム16中より抽出する。あるいは、例えば、変数依存関係抽出部15は、後向きのデバイス依存関係の抽出が指定された場合、起点デバイスに影響を与える全てのデバイスをラダープログラム16中より抽出する。
 ステップS12では、変数依存関係抽出部15が、抽出された全てのデバイスについてステップS13~ステップS17の処理を完了したか否かを判断する。変数依存関係抽出部15は、完了していない(ステップS12で「No」)場合、処理をステップS13へ進め、完了している(ステップS12で「Yes」)場合、処理を終了する。
 ステップS13では、変数依存関係抽出部15が、抽出された全てのデバイスのうち、未処理のデバイスを1つ、処理対象として選択する。
 ステップS14では、変数依存関係抽出部15が、処理対象のデバイスが第1の条件に合致するか否かを判断する。例えば、図6に示す場合、変数依存関係抽出部15は、処理対象のデバイスが、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイス種別(例えば、Yデバイス)であるか否かを判断する。変数依存関係抽出部15は、第1の条件に合致する(ステップS14で「Yes」)場合、処理をS17へ進め、第1の条件に合致しない(ステップS14で「No」)場合、処理をS15へ進める。
 ステップS15では、変数依存関係抽出部15が、処理対象のデバイスを新たに起点として設定する。
 ステップS16では、変数依存関係抽出部15が、ステップS15で設定された起点を第2の起点デバイスとして、デバイスの依存関係を抽出する。例えば、変数依存関係抽出部15は、前向きのデバイス依存関係の抽出が指定された場合、第2の起点デバイスが影響を与える全てのデバイスをラダープログラム16中より抽出する。あるいは、例えば、変数依存関係抽出部15は、後向きのデバイス依存関係の抽出が指定された場合、第2の起点デバイスに影響を与える全てのデバイスをラダープログラム16中より抽出する。変数依存関係抽出部15は、抽出処理が完了したら、処理をステップS12へ戻す。
 ステップS17では、変数依存関係抽出部15が、処理対象のデバイスについてのさらなる依存関係の抽出処理は行わないので、処理対象のデバイスについての処理を終了する。そして、変数依存関係抽出部15は、処理をステップS12へ戻す。
 このように、デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理により、例えば、図7に示す有向グラフが表示画面4a上に表示される。図7は、デバイス種別を考慮した前向き依存関係抽出結果例に対応した有向グラフを示す図である。図7に示す有向グラフは、デバイスX1を起点として前向き依存関係を抽出する処理を行う過程で、第1の条件に合致しないデバイスであるデバイスM1については、さらに依存関係の抽出処理を進め、第1の条件に合致するデバイスであるデバイスY1,Y2,Y3(図4参照)に行き着いたら、それ以上の依存関係の抽出処理を行わないようにして得られたものである。
 図4に示す有向グラフが図7に示す有向グラフのごとく絞り込めていることからもわかるように、デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にすることで、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)を絞り込むことができる。
 図6が前向き依存関係の抽出の場合を例示したものであるに対して、図8は後向き依存関係の抽出の場合を例示したものである。デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にし、それ以上の依存関係の抽出処理を行わないことにするデバイス種別として、こんどはXを指定するとよい。
 例えば、図8に示すように、解析条件設定操作画面9aにおいて、2つの解析選択欄9a1,9a2のうち解析選択欄9a2が選択され、向き指定欄9a5で後向きが選択され、起点指定欄9a6で抽出したい依存関係の起点としてデバイスY1が指示され、種別指定オンオフ欄9a7で種別指定を行うこと(オン)が指示される。そして、種別指定欄9a8で、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスの種別(第1の条件)として、Xデバイスが指示される。
 そして、実行ボタン9a3が押されると、依存関係の抽出処理を進め、入力Xデバイスに行き着いたら、それ以上の依存関係の抽出処理を行わないように処理される。効果は、図6の場合と同様であり、例えば、図4に示す有向グラフを図7に示す有向グラフのごとく絞り込むことができる。
 なお、PCにとっての入力となるデバイスには、Xデバイスのみならず、通信による入力となるBデバイスなどがあるし、PCにとっての出力となるデバイスには、Yデバイスのみならず、通信による出力となるBデバイスやエラー出力となるFデバイスなどがある。したがって、例えば、図6の例において、起点デバイスとして、Xデバイスに代えてBデバイスなどを指定してもよいし、それ以上の依存関係の抽出処理を行わないデバイス種別として、Yデバイスに代えてBデバイス、Fデバイスなどを指定してもよい。あるいは、例えば、図8の例において、起点デバイスとして、Yデバイスに代えてBデバイス、Fデバイスなどを指定してもよいし、それ以上の依存関係の抽出処理を行わないデバイス種別として、Xデバイスに代えてBデバイスなどを指定してもよい。
 また、図11に示すように、解析条件設定操作画面9aは、種別指定オンオフ欄9a7aをさらに有していてもよい。例えば、種別指定オンオフ欄9a7aと種別指定オンオフ欄9a7とは、両方非選択とすることは可能だが、選択する場合にいずれか一方が択一的に選択される。例えば、種別指定オンオフ欄9a7が選択(例えば、チェック)されると、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスに係る第1の条件を設定することが選択される。あるいは、例えば、種別指定オンオフ欄9a7aが選択(例えば、チェック)されると、さらなる前向き又は後向きのデバイス依存関係を抽出するデバイスに係る第2の条件を設定することが選択される。
 この場合、例えば、Yデバイスを起点とした依存関係の抽出を抑制するために、解析条件設定操作画面9aにおいて、図11に示すように、デバイス種別によってそれ以上の依存関係の抽出処理を行う機能をチェックして有効にし、第2の条件として、すなわちそれ以上の依存関係の抽出処理を行うことにするデバイス種別として、Yデバイスを除いたデバイスを指定している。例えば、図11では、種別指定欄9a8でXデバイス、Mデバイス、Bデバイスが指示されている。
 また、デバイス種別によってそれ以上の依存関係の抽出処理を行う機能をチェックして有効にした場合の依存関係の抽出処理について、図12を用いて説明する。図12に示す処理は、図10に示す処理と次の点で異なる。
 ステップS1aでは、解析条件設定操作部9が、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。例えば、図11に示す場合、解析条件設定操作部9は、抽出したい依存関係の起点としてデバイスX1を設定する。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第2の条件設定指示に応じて、第2の条件を設定する。例えば、図11に示す場合、解析条件設定操作部9は、第2の条件として、すなわち、さらなる前向き又は後向きのデバイス依存関係を抽出するデバイス種別として、Xデバイス、Mデバイス、Bデバイスを設定する。解析条件設定操作部9は、設定された第2の条件の情報を解析処理実行部13へ供給する。
 ステップS14aでは、変数依存関係抽出部15が、処理対象のデバイスが第2の条件に合致するか否かを判断する。例えば、図11に示す場合、変数依存関係抽出部15は、処理対象のデバイスが、さらなる前向き又は後向きのデバイス依存関係を抽出するデバイス種別(例えば、Xデバイス、Mデバイス、Bデバイス)であるか否かを判断する。変数依存関係抽出部15は、第2の条件に合致する(ステップS14aで「Yes」)場合、処理をS15へ進め、第2の条件に合致しない(ステップS14aで「No」)場合、処理をS17へ進める。
 このように、デバイス種別によってそれ以上の依存関係の抽出処理を行う機能をチェックして有効にした場合の依存関係の抽出処理によっても、例えば、図7に示す有向グラフが表示画面4a上に表示される。図7に示す有向グラフは、デバイスX1を起点として前向き依存関係を抽出する処理を行う過程で、第2の条件に合致するデバイスであるデバイスM1については、さらに依存関係の抽出処理を進め、第2の条件に合致しないデバイスであるデバイスY1,Y2,Y3(図4参照)に行き着いたら、それ以上の依存関係の抽出処理を行わないようにしても得られる。
 このようにして抽出されて表示される依存関係(の有向グラフ)の中から1つのデバイスを選択すれば、変数依存関係表示処理部12は回路表示処理部19に対して、その選択されたデバイスをコイル出力するラダー回路のみを表示するように、あるいは、第1の抽出結果に従ったデバイス依存関係の全体を表示しつつ選択されたデバイスをコイル出力するラダー回路を表示するように、指示するように構成してもよい。そうすれば図9のような表示の構成となり、解析作業をより一層効率化することに寄与する。依存関係(の有向グラフ)は、ラダーの制御構造から依存関係だけを抽出し、他の情報をそぎ落とすことで、ラダーの制御構造を大局的な視点で把握することを支援するものであるから、依存関係(の有向グラフ)を表示するだけでなく、その中から注目したい部分を局所的に詳細確認するために、その部分に相当するラダー回路を表示することは、解析作業をより一層効率化するためには効果的である。
 なお、抽出されて表示される依存関係(の有向グラフ)の中から1つのデバイスが選択された際に、その選択されたデバイスを、依存関係(の有向グラフ)の中における他のデバイスと区別できる表示形態で表示してもよい。例えば、図9に示すように、デバイスY3から表示されたラダー回路へ向けて破線の矢印を表示することで、表示されたラダー回路でコイル出力されるデバイスY3と第1の抽出結果に従った依存関係(の有向グラフ)の中におけるデバイスY3とを対応付けて表示してもよい。
 また、ラダー回路の表示においてはデバイスに付与されたデバイスコメント17(図2参照)を合わせて表示できるのと同様に、依存関係(の有向グラフ)の表示おいてもデバイスに付与されたデバイスコメント17を合わせて表示できる。
 以上のように、実施の形態1では、解析条件設定操作部9が、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスに係る第1の条件、又はさらなる前向き又は後向きのデバイス依存関係を抽出するデバイスに係る第2の条件を設定する。変数依存関係抽出部15は、第1の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、且つ第2の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出するように、ラダープログラム16から解析条件設定操作部9で設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成する。変数依存関係表示処理部12は、第1の抽出結果に従って、デバイス依存関係を表示する。これにより、第1の条件又は第2の条件を用いることで、デバイス依存関係の方向性を利用してデバイス依存関係を効率的に絞り込むことができる。この結果、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)から、不具合に深く関係する依存関係(の有向グラフ)だけを抽出することが可能となる。すなわち、生産設備が備える表示器と操作ボタンとを用いてデバッグ作業を行う場合に、巨大で複雑な依存関係(の有向グラフ)から不具合に深く関係する依存関係(の有向グラフ)を少ない操作数で抽出して表示できる。
 また、実施の形態1では、解析条件設定操作部9が、第1の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイス種別(例えば、Yデバイス)を設定する。又は、解析条件設定操作部9が、第2の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出するデバイス種別を設定する。変数依存関係抽出部15は、抽出しないデバイス種別(第1の条件)に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、且つ抽出するデバイス種別(第2の条件)に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出するように、ラダープログラム16から解析条件設定操作部9で設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成する。これにより、第1の条件又は第2の条件を用いることで、デバイス依存関係の方向性を利用してデバイス依存関係を効率的に絞り込むことができる。
 また、実施の形態1では、回路表示処理部19が、第1の抽出結果に従ったデバイス依存関係の中から1つのデバイスが指定されたとき、指定されたデバイスをコイル出力するラダー回路を選択的に表示する、又は、第1の抽出結果に従ったデバイス依存関係の全体を表示しつつ指定されたデバイスをコイル出力するラダー回路を選択的に表示する。これにより、依存関係(の有向グラフ)を用いてラダーの制御構造を大局的な視点で把握することを支援できるとともに、その中から注目したい部分を局所的に詳細確認することを支援できる。その結果、解析作業をより一層効率化できる。
実施の形態2.
 次に、実施の形態2にかかるプログラム解析支援装置について説明する。以下では、実施の形態1と異なる部分を中心に説明する。
 抽出されたデバイスおよび依存関係が巨大となる原因は、実施の形態1で述べた原因以外にもある。それは、多くの箇所で接点として参照されるMデバイスの存在である。このようなMデバイスが存在すれば、依存関係(の有向グラフ)を十分に絞り込むことができない可能性がある。
 そこで、実施の形態2では、多くの箇所で接点として参照される(参照回数の多い)Mデバイスが存在するような場合に対処するための仕組みについて説明する。
 Mデバイスは内部的に使用されるものであって、処理結果の一時的な保持を目的として使用される。よって、どのような性質のものを一時的に保持すべくMデバイスを使用しているかについては、ラダー作成者に依存するところとなる。しかしながらMデバイスの使用目的は、単なる処理結果の一時的な保持という場合と、対象を計測制御する上で不可欠となるコントローラの内部状態の保持という場合とに、大別される。
 単なる処理結果の一時的な保持としてのMデバイスは、これを接点として参照されている数は少ない。これに対して、コントローラの内部状態を保持するMデバイスは、これを接点として参照されている回数は格段に多い。コントローラの内部状態は、種々の計測制御機能において、インタロック条件の確認など、とても重要だからである。
 すなわち、コントローラの内部状態を保持するMデバイスは、実際にはその値をコントローラ外部に出力することがないものの、単なる処理結果の一時的な保持としての役割を超えて、実質的にはYデバイスと同等の役割を果たしているものである。したがって、実施の形態1で述べたとおり、そのMデバイスがさらに接点としても参照されているところまで依存関係の抽出処理を進めることは、当初の依存関係の抽出の範囲を超えて、さらに当該Mデバイスを起点とした依存関係の抽出を行っているに他ならない。
 ここに着目し、実施の形態2では、接点として参照されている回数、すなわち、当該デバイスが影響を与える他のデバイスの数が、指定の閾値以上であるデバイスについては、それ以上の依存関係の抽出処理を行わないことにする。すなわち、解析条件設定操作部9は、第1の条件として、起点デバイスからの起点デバイスを含めたデバイスの参照回数(の閾値)を設定する。
 図13は、参照回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にし、それ以上の依存関係の抽出処理を行わないことにする参照回数の閾値として、3回を指定している場合を示している。
 例えば、回数指定オンオフ欄9a9では、参照回数の指定を行うこと(オン)及び参照回数の指定を行わないこと(オフ)のいずれかが指示される。図13では、参照回数の指定を行うこと(オン)が指示された場合が例示されている。回数指定オンオフ欄9a9では、例えば、チェックを入れることで参照回数の指定を行うこと(オン)を指示し、チェックを外すことで参照回数の指定を行わないこと(オフ)を指示してもよい。
 回数指定欄9a10では、起点デバイスからの起点デバイスを含めたデバイスの参照回数の閾値が指示される。図13では、参照回数の閾値として、3回が指示された場合が例示されている。例えば、向き指定欄9a5で前向きが選択され、起点指定欄9a6でデバイスX1が指示され、回数指定オンオフ欄9a9で参照回数の指定を行うこと(オン)が指示され、回数指定欄9a10で3(回)が指示された場合、デバイスX1を起点として前向きにデバイス依存関係をたどっていったときにデバイスX1を含めてデバイスを3回以上参照するものが発生したら、さらなる前向きのデバイス依存関係を抽出しないようにする。
 次に、デバイスの参照使用の回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理について、図15を用いて説明する。図15は、参照回数を考慮した依存関係の抽出処理を示すフローチャートである。
 ステップS21では、解析条件設定操作部9が、参照回数の閾値の指定があるか否かを判断する。解析条件設定操作部9は、参照回数の閾値の指定がある(ステップS21で「Yes」)場合、処理をステップS23へ進め、参照回数の閾値の指定がない(ステップS21で「No」)場合、処理をステップS22へ進める。
 ステップS22では、解析条件設定操作部9が、デバイス使用状況ヒストグラムを抽出するよう変数使用状況抽出部14に指示する。変数使用状況抽出部14は、例えば、解析条件設定操作部9を介して使用状況を抽出するよう指示されたことを認識する。例えば、変数使用状況抽出部14は、解析選択欄9a1が選択された場合、使用状況を抽出するよう指示されたことを認識する(図16参照)。変数使用状況抽出部14は、例えば、使用状況を抽出するよう指示されたことを認識すると、デバイスの使用状況を抽出する。変数使用状況抽出部14は、デバイスの使用状況の抽出結果を生成して変数使用状況表示処理部11へ供給する。
 変数使用状況表示処理部11は、例えば、デバイスの使用状況の抽出結果を変数使用状況抽出部14から受ける。変数使用状況表示処理部11は、デバイスの使用状況の抽出結果を用いて表示情報を生成し、生成された表示情報に従って、デバイスの使用状況の抽出結果を表示部4の表示画面4a上に表示する。例えば、変数使用状況表示処理部11は、デバイスの使用状況の抽出結果をグラフにまとめたグラフ情報を生成し、グラフ情報に従って、デバイスの使用状況の抽出結果を表示部4の表示画面4a上にグラフの形態で表示する。
 例えば、変数使用状況表示処理部11は、デバイスの使用状況の抽出結果を用いて、デバイス個数を縦軸とし接点参照回数を横軸とするデバイス使用状況ヒストグラム(図17参照)を表示画面4a上に表示する。これにより、デバイス使用状況ヒストグラムを閲覧したユーザは、デバイス使用状況ヒストグラムのプロファイルに応じて、参照回数の閾値を決めることができる。
 例えば、ユーザは、デバイス使用状況ヒストグラムのプロファイルが多峰性である場合、第1極小点に対応した接点参照回数(例えば、図17の場合、6回)を参照回数の閾値として決定できる。また、例えば、ユーザは、デバイス使用状況ヒストグラムのプロファイルが単峰性である場合、デフォルト値(例えば、3回)を参照回数の閾値として決定できる。
 そして、解析条件設定操作部9は、ユーザ操作8に応じて、デバイス依存関係の抽出を行うように変数依存関係抽出部15に指示する。変数依存関係抽出部15は、例えば、解析条件設定操作部9を介してデバイス依存関係を抽出するよう指示されたことを認識する。例えば、変数使用状況抽出部14は、解析選択欄9a2が選択された場合、デバイス依存関係を抽出するよう指示されたことを認識する(図13参照)。
 ステップS23では、解析条件設定操作部9が、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。例えば、図6に示す場合、解析条件設定操作部9は、抽出したい依存関係の起点としてデバイスX1を設定する。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第1の条件設定指示に応じて、第1の条件を設定する。例えば、図13に示す場合、解析条件設定操作部9は、第1の条件として、すなわち、さらなる前向き又は後向きのデバイス依存関係を抽出しないための参照回数の閾値として、3回を設定する。解析条件設定操作部9は、設定された第1の条件の情報を解析処理実行部13へ供給する。
 ステップS30では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、実施の形態1の再帰処理(ステップS10)と基本的に同様であるが、次の点で異なる処理を行う。
 ステップS34では、変数依存関係抽出部15が、処理対象のデバイスが参照使用される回数がステップS23で設定された閾値以上であるか否かを判断する。例えば、図13に示す場合、変数依存関係抽出部15は、処理対象のデバイスが参照使用される回数が3回以上であるか否かを判断する。変数依存関係抽出部15は、閾値以上である(ステップS34で「Yes」)場合、処理をS17へ進め、閾値以上でない(ステップS34で「No」)場合、処理をS15へ進める。
 このように、デバイスの参照使用の回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理により、例えば、図14に示す有向グラフが表示画面4a上に表示される。図14は、参照回数を考慮した前向き依存関係抽出結果例に対応した有向グラフを示す図である。閾値として3回が指定されているから、参照回数が3回未満のデバイスであるデバイスM1,Y3については、さらに依存関係の抽出処理を進め、参照回数が3以上であるデバイスM2,M3については、それ以上の依存関係の抽出処理を行わない。
 図4に示す有向グラフが図14に示す有向グラフのごとく絞り込めていることからもわかるように、デバイスの参照使用の回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にすることで、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)を絞り込むことができる。
 なお、抽出された依存関係の表示の際、参照回数が閾値以上であることにより先の依存関係抽出を止めたデバイスについては、それぞれの参照回数を合わせて表示することもできる。
 実際のところ、どの程度の数を閾値として、設定すべきかについては、作成されたラダープログラムに依存するところとなる。しかしながら、たとえラダー作成者の当人といえども、この閾値を適当に設定することは容易ではない。そこで、各デバイスが、どの程度に接点として参照使用されているか、その参照回数を使用状況として抽出する機能、すなわちデバイスの接点参照回数のヒストグラム機能を設けることにしている。
 図16は、デバイスの使用状況を抽出する機能を選択している場合を示している。この場合、解析条件の設定は、特段に必要ない。図17は、その実行結果の一例である。このヒストグラムは、接点参照回数が1回、すなわち、プログラム中で接点として使用されているところが1箇所であるようなデバイスが40個ある、という見方をするものである。そして図17は、接点参照回数の多いデバイスの個数は少なくなる傾向にある中で、接点参照回数が6回、7回というデバイスが0個になったのに対して、接点参照回数が8回というデバイスが数個存在している例を示している。
 一般的なラダープログラムに対して、このようなデバイスの使用状況を抽出すれば、およそ図17のような傾向、つまり、ヒストグラムの形状が単峰性ではなく、多峰性を示すことが、多くの場合で見られる。
 これは、例えば、Mデバイスの使用目的は、単なる処理結果の一時的な保持という場合と、対象を計測制御する上で不可欠となるコントローラの内部状態の保持という場合とに、大別されるところ、単なる処理結果を一時的に保持するMデバイスは接点参照回数が少なく、しかしそのようなMデバイスの個数は多い傾向にあることに対応している。そして、これは、さらに、対象を計測制御する上で不可欠となるコントローラの内部状態を保持するMデバイスは、インタロック条件の確認など、とても重要であるから、種々の計測制御機能において参照されるから、接点参照回数が多く、しかしそのようなMデバイスの個数は限られている、ということに対応している。
 このようにして得られた、接点参照回数のヒストグラムの結果に基づいて、それ以上の依存関係の抽出処理を行わないことにする参照回数の値を決めることができる。具体的には、図17のような接点参照回数のヒストグラムが得られた場合には、それ以上の依存関係の抽出処理を行わないことにする参照回数の閾値として、例えば第1極小点に対応した6回を指定すればよい。図17の場合、接点参照回数の6~7回が、単なる処理結果の一時的な保持デバイスと、対象を計測制御する上で不可欠となるコントローラの内部状態の保持デバイスとの、分かれ目となる閾値と考えられるからである。
 なお、これを自動的に行うように構成してもよい。すなわち、ユーザが明示的にデバイス使用状況を抽出して、閾値を見出すことを必要としないように構成するものである。例えば、回数指定の機能をチェックするだけで、その閾値を入力しなかった場合には、依存関係の抽出処理を行う前に、自動的にデバイス使用状況を抽出し、そのヒストグラムから第1極小点を抽出し、その第1極小点を閾値として採用して、依存関係の抽出処理を行う、という構成が考えられる。
 こうすることで、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)を絞り込むことができる。
 Mデバイス以外のデバイス種別でも、参照回数が多くなることがあり、デバイス種別をMデバイスに限定することなく、実施の形態2を適用してもよい。
 実施の形態2においても、後向き依存関係の抽出も、前向き依存関係の抽出と同じである。特に、前向きの依存関係を抽出する際に、絞り込みの効果が大きい。
 なお、実施の形態1と実施の形態2とを組み合わせて実施することができる。これにより、さらなる絞り込みが可能となる。
 以上のように、実施の形態2では、変数使用状況抽出部14(図2参照)が、第1の条件(例えば、参照回数の閾値)を設定する際の参考情報として供するように、ラダープログラムからデバイスについて、複数のラダー行で接点として参照使用されている回数に関するヒストグラムを抽出する。これにより、ヒストグラムの抽出結果に応じて、単なる処理結果の一時的な保持デバイスと対象を計測制御する上で不可欠となるコントローラの内部状態の保持デバイスとの分かれ目となる回数の閾値を特定することができ、第1の条件として、例えば、それ以上の依存関係の抽出処理を行わないことにする参照回数の閾値を決めることができる。
 また、実施の形態2では、解析条件設定操作部9が、第1の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出しない参照回数の閾値を設定する。変数依存関係抽出部15は、抽出しない参照回数の閾値(第1の条件)に合致する、すなわちその参照回数が閾値以上であるデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、ラダープログラム16から解析条件設定操作部9で設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成する。これにより、第1の条件を用いることで、デバイス依存関係の方向性を利用してデバイス依存関係を効率的に絞り込むことができる。
実施の形態3.
 次に、実施の形態3にかかるプログラム解析支援装置について説明する。以下では、実施の形態2と異なる部分を中心に説明する。
 実施の形態2では、多くの箇所で接点として参照されるMデバイスに着目しているが、内部的に使用されるMデバイスのうち、重要なものは、これを接点として参照されている回数が多いというほかに、そのMデバイスに直接的に影響を与えるデバイスの数、すなわち、そのMデバイスがコイルとなっているラダー1行中において、そのコイルを制御する接点の数が多い場合もある。図18は、そのようなラダーの一例であり、このようなラダープログラムに対して、後向きの依存関係を抽出すれば、図19に示すような有向グラフが得られ、抽出結果が発散的になる傾向にあることが分かる。
 そこで、実施の形態3では、Mデバイスがコイルとなっているラダー1行中において、そのコイルを制御する接点の数(制御依存回数)が多い場合に対処するための仕組みについて説明する。
 実施の形態2でいうところの、接点として参照されている回数が多いMデバイスは、コントローラの内部状態を保持しているという制御上の意味において重要であるのに対し、実施の形態3でいうところの、そのコイルを制御する接点が多いMデバイスは、そのMデバイスをON/OFF制御する条件がとても複雑であって不具合が起こりやすいという意味において重要である。
 ここに着目し、実施の形態3では、当該デバイスがコイルとなっているラダー1行中の接点の数、すなわち、当該デバイスに直接的に影響を与える他のデバイスの数が、制御依存回数の閾値を超えているデバイスについては、それ以上の依存関係の抽出処理を行わないことにする。すなわち、解析条件設定操作部9は、第1の条件として、1つのラダー行でいくつの接点から制御依存を受けているのかを示す制御依存回数(の閾値)を設定する。
 図20は、ラダー1行中にそのコイルを制御する接点の数を示す制御依存回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にし、それ以上の依存関係の抽出処理を行わないことにするコイルの制御依存回数の閾値として、3回を指定している場合を示している。
 例えば、解析条件設定操作画面9aは、回数指定オンオフ欄9a9aをさらに有してもよい。回数指定オンオフ欄9a9aと回数指定オンオフ欄9a9とは、ともに非選択とすることは可能だが、選択される場合に択一的に選択される。
 例えば、回数指定オンオフ欄9a9aでは、制御依存回数の指定を行うこと(オン)及び制御依存回数の指定を行わないこと(オフ)のいずれかが指示される。図20では、制御依存回数の指定を行うこと(オン)が指示された場合が例示されている。回数指定オンオフ欄9a9aでは、例えば、チェックを入れることで制御依存回数の指定を行うこと(オン)を指示し、チェックを外すことで制御依存回数の指定を行わないこと(オフ)を指示してもよい。
 回数指定欄9a10では、ラダー1行中にそのコイルを制御する接点の数を示す制御依存回数の閾値が指示される。図20では、制御依存回数の閾値として、3回が指示された場合が例示されている。例えば、向き指定欄9a5で後向きが選択され、起点指定欄9a6でデバイスY1が指示され、回数指定オンオフ欄9a9aで制御依存回数の指定を行うこと(オン)が指示され、回数指定欄9a10で3(回)が指示された場合、デバイスY1を起点として後向きにデバイス依存関係をたどっていったときに、ラダー1行中に制御依存する回数が3回以上のコイル(例えば、図18に示すデバイスM11,M12)が発生したら、さらなる後向きのデバイス依存関係を抽出しないようにする。
 デバイスがコイルとなっているラダー1行中のコイルの制御依存回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理について、図22を用いて説明する。図22は、制御依存回数を考慮した依存関係の抽出処理を示すフローチャートである。
 ステップS41では、解析条件設定操作部9が、制御依存回数の閾値の指定があるか否かを判断する。解析条件設定操作部9は、制御依存回数の閾値の指定がある(ステップS41で「Yes」)場合、処理をステップS43へ進め、制御依存回数の閾値の指定がない(ステップS41で「No」)場合、処理をステップS42へ進める。
 ステップS42では、解析条件設定操作部9が、デバイス使用状況ヒストグラムを抽出するよう変数使用状況抽出部14に指示する。変数使用状況抽出部14は、例えば、解析条件設定操作部9を介して使用状況を抽出するよう指示されたことを認識する。例えば、変数使用状況抽出部14は、解析選択欄9a1が選択された場合、使用状況を抽出するよう指示されたことを認識する(図16参照)。変数使用状況抽出部14は、例えば、使用状況を抽出するよう指示されたことを認識すると、デバイスの使用状況を抽出する。変数使用状況抽出部14は、デバイスの使用状況の抽出結果を生成して変数使用状況表示処理部11へ供給する。
 変数使用状況表示処理部11は、例えば、デバイスの使用状況の抽出結果を変数使用状況抽出部14から受ける。変数使用状況表示処理部11は、デバイスの使用状況の抽出結果を用いて表示情報を生成し、生成された表示情報に従って、デバイスの使用状況の抽出結果を表示部4の表示画面4a上に表示する。例えば、変数使用状況表示処理部11は、デバイスの使用状況の抽出結果をグラフにまとめたグラフ情報を生成し、グラフ情報に従って、デバイスの使用状況の抽出結果を表示部4の表示画面4a上にグラフの形態で表示する。
 例えば、変数使用状況表示処理部11は、デバイスの使用状況の抽出結果を用いて、デバイス個数を縦軸とし制御依存回数を横軸とするデバイス使用状況ヒストグラム(例えば、図17で横軸を制御依存回数に置き換えたもの)を表示画面4a上に表示する。これにより、デバイス使用状況ヒストグラムを閲覧したユーザは、デバイス使用状況ヒストグラムのプロファイルに応じて、制御依存回数の閾値を決めることができる。
 例えば、ユーザは、デバイス使用状況ヒストグラムのプロファイルが多峰性である場合、第1極小点に対応した制御依存回数(例えば、図17で横軸を制御依存回数に置き換えたものの場合、6回)を制御依存回数の閾値として決定できる。また、例えば、ユーザは、デバイス使用状況ヒストグラムのプロファイルが単峰性である場合、デフォルト値(例えば、3回)を制御依存回数の閾値として決定できる。
 そして、解析条件設定操作部9は、ユーザ操作8に応じて、デバイス依存関係の抽出を行うように変数依存関係抽出部15に指示する。変数依存関係抽出部15は、例えば、解析条件設定操作部9を介してデバイス依存関係を抽出するよう指示されたことを認識する。例えば、変数使用状況抽出部14は、解析選択欄9a2が選択された場合、デバイス依存関係を抽出するよう指示されたことを認識する(図20参照)。
 ステップS43では、解析条件設定操作部9が、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。例えば、図20に示す場合、解析条件設定操作部9は、抽出したい依存関係の起点としてデバイスY1を設定する。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第1の条件設定指示に応じて、第1の条件を設定する。例えば、図20に示す場合、解析条件設定操作部9は、第1の条件として、すなわち、さらなる前向き又は後向きのデバイス依存関係を抽出しないための制御依存回数の閾値として、3回を設定する。解析条件設定操作部9は、設定された第1の条件の情報を解析処理実行部13へ供給する。
 ステップS50では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、実施の形態1の再帰処理(ステップS10)と基本的に同様であるが、次の点で異なる処理を行う。
 ステップS54では、変数依存関係抽出部15が、処理対象のデバイスを制御する接点数、すなわち制御依存回数がステップS43で設定された閾値以上であるか否かを判断する。例えば、図20に示す場合、変数依存関係抽出部15は、制御依存回数がが3回以上であるか否かを判断する。変数依存関係抽出部15は、閾値以上である(ステップS54で「Yes」)場合、処理をS17へ進め、閾値以上でない(ステップS54で「No」)場合、処理をS15へ進める。
 このように、デバイスがコイルとなっているラダー1行中のコイルの制御依存回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理により、例えば、図21に示す有向グラフが表示画面4a上に表示される。図21は、制御依存回数を考慮した後向き依存関係抽出結果例に対応した有向グラフを示す図である。閾値として3回が指定されているから、制御依存回数が3回未満であるデバイスM1については、さらに依存関係の抽出処理を進め、制御依存回数が3回以上であるデバイスM11,M12(図19参照)については、それ以上の依存関係の抽出処理を行わない。
 図19に示す有向グラフが図21に示す有向グラフのごとく絞り込めていることからもわかるように、デバイスがコイルとなっているラダー1行中のコイルの制御依存回数によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にすることで、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)を絞り込むことができる。
 なお、抽出された依存関係の表示の際、制御依存回数が閾値以上であることにより先の依存関係抽出を止めたデバイスについては、それぞれの制御依存回数を合わせて表示することもできる。
 実際のところ、どの程度の数を閾値として、設定すべきかについては、作成されたラダープログラムに依存するところとなるのは、実施の形態2で述べたとおりであるから、各デバイスがコイルとなっているラダー1行中において、どの程度の接点数(制御依存回数)によって制御されているか、その接点数(制御依存回数)を使用状況として抽出する機能、すなわちデバイスの制御接点数(制御依存回数)のヒストグラム機能を設けることにしている。その内容等についても、実施の形態2と同様である。
 実施の形態3においても、後向き依存関係の抽出も、前向き依存関係の抽出と同じである。特に、後向きの依存関係を抽出する際に、絞り込みの効果が大きい。
 なお、実施の形態1~3を適宜組み合わせて実施することができる。例えば、実施の形態1と実施の形態3、実施の形態2と実施の形態3、実施の形態1と実施の形態2と実施の形態3のように適宜組み合わせて実施することができる。これにより、さらなる絞り込みが可能となる。
 以上のように、実施の形態3では、変数使用状況抽出部14(図2参照)が、第1の条件(例えば、制御依存回数の閾値)を設定する際の参考情報として供するように、ラダープログラムからデバイスについて、1つのラダー行でいくつの接点から制御依存を受けているのかを示す回数に関するヒストグラムを抽出する。これにより、ヒストグラムの抽出結果に応じて、ON/OFF制御する条件がとても複雑であって不具合が起こりやすいデバイスとそうでないデバイスとの分かれ目となる閾値を特定することができ、第1の条件として、例えば、それ以上の依存関係の抽出処理を行わないことにする制御依存回数の閾値を決めることができる。
 また、実施の形態3では、解析条件設定操作部9が、第1の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出しない制御依存回数の閾値を設定する。変数依存関係抽出部15は、抽出しない制御依存回数の閾値(第1の条件)に合致する、すなわちその制御依存回数が閾値以上であるデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、ラダープログラム16から解析条件設定操作部9で設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成する。これにより、第1の条件を用いることで、デバイス依存関係の方向性を利用してデバイス依存関係を効率的に絞り込むことができる。
実施の形態4.
 次に、実施の形態4にかかるプログラム解析支援装置について説明する。以下では、実施の形態2及び実施の形態3と異なる部分を中心に説明する。
 実施の形態2及び実施の形態3に見られるような、内部的に使用されるMデバイスのうち重要なものは、自己保持となっている場合が多い。
 そこで、実施の形態4では、自己保持となっているデバイスに対処するための仕組みについて説明する。
 ここで、自己保持とは、図23で示されるようなラダーのことであって、デバイスM5は、デバイスX5がONになればONとなり、しかもデバイスX5がOFFになっても、デバイスM5はONを保持し続けることから、自己保持と呼ばれる。ONを保持し続けるデバイスM5をOFFにするためには、デバイスX6またはデバイスX7をONにすればよい。そのため、デバイスM5にとって、デバイスX5の位置に記述される接点はON条件としての依存関係、デバイスX6又はデバイスX7の位置に記述される接点はOFF条件としての依存関係であるといえる。
 このように、自己保持となっているデバイスは、状態を保持するものであるから、制御において重要な役割を果たすことが多いのである。
 ここに着目し、実施の形態4では、ラダー1行中で接点としてもコイルとしても使用されていて自己保持となっているデバイスについては、それ以上の依存関係の抽出処理を行わないことにする。
 図24は、デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にし、それ以上の依存関係の抽出処理を行わないことにするデバイス種別として、自己保持を指定している場合を示している。
 例えば、図24に示すように、解析条件設定操作画面9aにおいて、2つの解析選択欄9a1,9a2のうち解析選択欄9a2が選択され、向き指定欄9a5で前向きが選択され、起点指定欄9a6で抽出したい依存関係の起点としてデバイスX1が指示され、種別指定オンオフ欄9a7で種別指定を行うこと(オン)が指示される。そして、種別指定欄9a8で、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスの種別(第1の条件)として、自己保持デバイスが指示される。
 デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理について、図25を用いて説明する。図25は、自己保持デバイスを考慮した依存関係の抽出処理を示すフローチャートである。
 ステップS61では、解析条件設定操作部9が、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。例えば、図24に示す場合、解析条件設定操作部9は、抽出したい依存関係の起点としてデバイスX1を設定する。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第1の条件設定指示に応じて、第1の条件を設定する。例えば、図24に示す場合、解析条件設定操作部9は、第1の条件として、すなわち、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイス種別として、自己保持デバイスを設定する。解析条件設定操作部9は、設定された第1の条件の情報を解析処理実行部13へ供給する。
 ステップS70では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、実施の形態1の再帰処理(ステップS10)と基本的に同様であるが、次の点で異なる処理を行う。
 ステップS74では、変数依存関係抽出部15が、処理対象のデバイスが自己保持デバイスであるか否かを判断する。変数依存関係抽出部15は、自己保持デバイスである(ステップS74で「Yes」)場合、処理をS17へ進め、自己保持デバイスでない(ステップS74で「No」)場合、処理をS15へ進める。
 このように、デバイス種別によってそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理により、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)を絞り込むことができる。
 なお、実施の形態4においても、後向き依存関係の抽出も、前向き依存関係の抽出と同様である。
 また、実施の形態1から4を適宜組み合わせて実施することができる。これにより、さらなる絞り込みが可能となる。
 以上のように、実施の形態4では、解析条件設定操作部9が、第1の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイス種別(例えば、自己保持デバイス)を設定する。変数依存関係抽出部15は、抽出しないデバイス種別(第1の条件)に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、ラダープログラム16から解析条件設定操作部9で設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成する。これにより、第1の条件を用いることで、デバイス依存関係の方向性を利用してデバイス依存関係を効率的に絞り込むことができる。
実施の形態5.
 次に、実施の形態5にかかるプログラム解析支援装置について説明する。以下では、実施の形態1~4と異なる部分を中心に説明する。
 実施の形態1~4によれば、巨大で複雑な依存関係は絞り込むことができるものの、それによって絞り込まれた結果として、得られた依存関係には、当然ながら、起点となるデバイスが影響を与えるデバイスあるいは起点となるデバイスに影響を与えるデバイスの全てのデバイスが含まれていない。従来の依存関係抽出が、抽出してほしいと意図する依存関係の抽出の範囲を超えて、さらなる依存関係の抽出を行っているところ、実施の形態1から4は、これを防止することを目的としているからである。
 そこで、起点となるデバイスが影響を与えるデバイスあるいは起点となるデバイスに影響を与えるデバイスの全てのデバイスを、1つの巨大で複雑な依存関係として抽出するのではなく、複数からなる、適度に絞り込まれた依存関係のセットとして抽出することを考えるのが実施の形態5である。
 例えば、図5のラダープログラムに対して、デバイスX1を起点とした場合、従来の依存関係抽出では図4を抽出するところ、実施の形態1では、図7のように絞り込まれた結果として抽出するのであるが、こうして得られた図7の終点の1つであるデバイスY3を新たな起点として、別途、さらなる依存関係を抽出することができる。このようにして得られた2つの依存関係は、デバイスX1を起点として絞り込むことなく得られた場合の1つの依存関係をデバイスY3によって分割したものに相当する。
 このように、1つの巨大で複雑な依存関係を確認するよりは、複数からなる、適度に絞り込まれた依存関係のセットを確認するほうが、理解しやすい。しかも、これら複数の依存関係は、1つの巨大で複雑な依存関係を、ラダー処理上において重要な意味をもつデバイスで切り分けて分断したものであるから、より理解がしやすいものとなっている。
 これを実施するための方法として、絞り込まれた依存関係の終点について、自動的に、新たな起点として、別途、さらなる依存関係を抽出する。すなわち、実施の形態1~4と同様にして抽出されたデバイス依存関係における各終点を新たな起点として、別途、さらなるデバイス依存関係を抽出する。
 例えば、変数依存関係抽出部14は、第1の抽出結果に従ったデバイス依存関係における終点デバイスについて、別途、その終点デバイスを起点としたデバイス依存関係を抽出して、第2の抽出結果を生成する。変数依存関係抽出部14は、生成された第2の抽出結果を変数依存関係表示処理部12へ供給する。
 変数依存関係表示処理部12は、第2の抽出結果を変数依存関係抽出部14から受ける。例えば、変数依存関係表示処理部12は、第1の抽出結果に従ってデバイス依存関係を表示するとともに、第2の抽出結果に従ってデバイス依存関係を表示する。例えば、変数依存関係表示処理部12は、第1の抽出結果に従ったデバイス依存関係の有向グラフと第2の抽出結果に従ったデバイス依存関係の有向グラフとを、互いに識別可能な形態で表示画面4a上に表示する(図27参照)。すなわち、変数依存関係表示処理部12は、解析条件設定操作部9により設定された起点を起点とするデバイス依存関係(図4参照)を、第1の抽出結果及び第2の抽出結果に基づいて、2以上のデバイス依存関係に分割して表示する(図27参照)。
 実施の形態1~4と同様にして抽出されたデバイス依存関係における各終点を新たな起点として、別途、さらなるデバイス依存関係を抽出する処理について、図26を用いて説明する。図26は、抽出された依存関係の終点を自動的に新たな起点とする抽出処理を示すフローチャートである。
 ステップS81では、実施の形態1~4と同様の前処理を行う。例えば、解析条件設定操作部9は、実施の形態1のステップS1(図10参照)と同様の処理を行う。あるいは、例えば、解析条件設定操作部9及び変数使用状況抽出部14は、実施の形態2のステップS21~ステップS23(図15参照)と同様の処理を行う。あるいは、例えば、解析条件設定操作部9及び変数使用状況抽出部14は、実施の形態3のステップS41~ステップS43(図22参照)と同様の処理を行う。あるいは、例えば、解析条件設定操作部9は、実施の形態4のステップS61(図25参照)と同様の処理を行う。
 ステップS82では、変数依存関係抽出部15が、実施の形態1~4と同様の再帰処理を行う。例えば、変数依存関係抽出部15は、ステップS81で実施の形態1の前処理が行われた場合、実施の形態1のステップS10(図10参照)と同様の処理を行う。あるいは、例えば、変数依存関係抽出部15は、ステップS81で実施の形態2の前処理が行われた場合、実施の形態2のステップS30(図15参照)と同様の処理を行う。あるいは、例えば、変数依存関係抽出部15は、ステップS81で実施の形態3の前処理が行われた場合、実施の形態3のステップS50(図22参照)と同様の処理を行う。あるいは、例えば、変数依存関係抽出部15は、ステップS81で実施の形態4の前処理が行われた場合、実施の形態4のステップS70(図25参照)と同様の処理を行う。これにより、変数依存関係抽出部15は、デバイス依存関係を抽出する。
 ステップS90では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、以下のステップS91~ステップS96の処理を行う。
 ステップS91では、変数依存関係抽出部15が、ステップS82で抽出されたデバイス依存関係における全ての終点デバイスを起点としたか否かが判断される。変数依存関係抽出部15は、全ての終点デバイスを起点とした(ステップS91で「Yes」)場合、処理を終了し、全ての終点デバイスを起点としていない(ステップS91で「No」)場合、処理をステップS92へ進める。
 ステップS92では、変数依存関係抽出部15が、ステップS82で抽出されたデバイス依存関係における全ての終点デバイスのうち、未処理のデバイスを1つ、処理対象として選択する。変数依存関係抽出部15は、選択されたデバイスを新たに起点として設定する。
 ステップS93では、変数依存関係抽出部15が、ステップS82で行ったのと同じ実施形態の方式により、デバイス依存関係を抽出する。
 ステップS94では、変数依存関係抽出部15が、ステップS93でさらなる依存関係の抽出が行われたか否かを判断する。変数依存関係抽出部15は、さらなる依存関係の抽出が行われた(ステップS94で「Yes」)場合、処理をステップS95へ進め、さらなる依存関係の抽出が行われていない(ステップS94で「No」)場合、処理をステップS91へ戻す。
 ステップS95では、変数依存関係抽出部15が、処理対象のデバイスを新たに起点として設定する。
 ステップS96では、変数依存関係抽出部15が、ステップS95で設定された起点を第2の起点デバイスとして、デバイスの依存関係を抽出する。例えば、変数依存関係抽出部15は、前向きのデバイス依存関係の抽出が指定された場合、第2の起点デバイスが影響を与える全てのデバイスをラダープログラム16中より抽出する。あるいは、例えば、変数依存関係抽出部15は、後向きのデバイス依存関係の抽出が指定された場合、第2の起点デバイスに影響を与える全てのデバイスをラダープログラム16中より抽出する。変数依存関係抽出部15は、抽出処理が完了したら、処理をステップS91へ戻す。
 この方法によれば、図5のラダープログラムに対して、デバイスX1を起点とした場合、図27のような依存関係を抽出することができる。図27では、デバイスX1を起点として実施の形態1と同様にして抽出されたデバイス依存関係の有向グラフがタブ「X1」とともに示され、抽出されたデバイス依存関係における終点デバイスY3について、別途、終点デバイスY3を起点としたデバイス依存関係の有向グラフがタブ「Y3」とともに示されている。
 なお、解析条件設定操作部9において指定された条件に合致するデバイスについては、変数依存関係抽出部15において考慮して絞り込む代わりに、変数依存関係表示部12において考慮することにして、絞り込むことなく得られた一のデバイス依存関係を、指定された条件に合致するデバイスに基づいて、二以上のデバイス依存関係に分割して表示してもよい。これは、変数依存関係抽出部15において処理していたデバイス依存関係の分割処理を、変数依存関係表示部12のほうへ移動させたに過ぎないので、実質的な処理内容は、同様である。
 以上のように、実施の形態5では、変数依存関係抽出部15が、第1の抽出結果に従ったデバイス依存関係における終点デバイスについて、別途、その終点デバイスを起点としたデバイス依存関係を抽出して、第2の抽出結果を生成する。変数依存関係表示処理部12は、解析条件設定操作部9により設定された起点を起点とするデバイス依存関係(図4参照)を、第1の抽出結果及び第2の抽出結果に基づいて、2以上のデバイス依存関係に分割して表示する(図27参照)。これにより、1つの巨大で複雑な依存関係を、ラダー処理上において重要な意味をもつデバイスで切り分けて分断した、適度に絞り込まれた依存関係のセットとして、理解しやすい形態で、抽出することができる。
実施の形態6.
 次に、実施の形態6にかかるプログラム解析支援装置について説明する。以下では、実施の形態2と異なる部分を中心に説明する。
 実施の形態2の依存関係の抽出では、制御において重要な役割を果たすデバイスより先の依存関係を抽出しないものとしている。これらは、すなわち、起点となるデバイスと、制御において重要な役割を果たすデバイスとの間の依存関係を抽出するものである。
 ところで、ラダープログラムが実現している制御の全体を鳥瞰するためには、制御において重要な役割を果たすデバイス間の依存関係を確認するのが、効率的である。
 そこで、実施の形態6では、実施の形態2とは逆に、参照回数の多いデバイスのみ、その先の依存関係を抽出し、参照回数の少ないデバイスについては、その先の依存関係を抽出しないことにする。
 例えば、図15に示すフローチャートにおいて、ステップS34の処理を、次のステップS34a(図示せず)の処理に置き換える。
 ステップS34aでは、変数依存関係抽出部15が、処理対象のデバイスが参照使用される回数がステップS23で設定された閾値以上であるか否かを判断する。例えば、図13に示す場合、変数依存関係抽出部15は、処理対象のデバイスが参照使用される回数が3回以上であるか否かを判断する。変数依存関係抽出部15は、閾値以上である(ステップS34で「Yes」)場合、処理をS15へ進め、閾値以上でない(ステップS34で「No」)場合、処理をS17へ進める。
 このようにすれば、参照回数が多く制御において重要な役割を果たすデバイス間の依存関係だけを抽出し、参照回数が少なく制御において付随的・補助的な役割のデバイスを省略することで、ラダープログラムが実現している制御の全体を鳥瞰することが可能となる。
 なお、実施の形態1から5を適宜組み合わせて実施することができ、より効果的となる。例えば、実施の形態2と組み合わせた場合について説明すると、先ず実施の形態2を利用して、参照回数が少なく制御において付随的・補助的な役割のデバイスを起点として、制御において重要な役割を果たすデバイスとの間の依存関係を抽出し、その後、そうしてたどり着いた重要デバイスを、実施の形態5によって自動的に起点として、実施の形態6によって、ラダーが実現している制御の全体を鳥瞰することが可能となる依存関係を抽出し、最後に、その中から最も不具合の原因と思われるデバイスを起点として、従来の依存関係を抽出することで、無用に依存関係が発散した結果となることを回避しつつ、末端の原因にたどり着くことができる。
実施の形態7.
 次に、実施の形態7にかかるプログラム解析支援装置について説明する。以下では、実施の形態1から4と異なる部分を中心に説明する。
 実施の形態1から4では、巨大で複雑な依存関係は絞り込むことができるものの、それによって絞り込まれた結果として、得られた依存関係には、当然ながら、起点となるデバイスが影響を与えるデバイスあるいは起点となるデバイスに影響を与えるデバイスの全てデバイスが含まれていない。従来の依存関係抽出が、抽出してほしいと意図する依存関係の抽出の範囲を超えて、さらなる依存関係の抽出を行っているところ、実施の形態1から4は、これを防止することを目的としているからである。
 ところで、生産設備で起こる不具合動作には、入力をONしたにも関わらず、出力がONしない、というものがある。そのどこに原因があるかを解析するためには、起点となるデバイスが影響を与える全てのデバイスを抽出しなくとも、起点がONすることによってONされるデバイスだけを抽出すればよい場合がある。
 ここに着目し、実施の形態7では、a接点として使用されているところに限って、依存関係の抽出処理を進めることにしている。a接点は、例えば、図23に示される、デバイスX5やデバイスM5のような正論理で参照される接点のことであり、接点がONすればコイルがONするものである。
 a接点として使用されているところに限った依存関係の抽出処理について図28を用いて説明する。図28は、a接点を考慮した依存関係の抽出処理を示すフローチャートである。
 ステップS100では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、実施の形態1の再帰処理(ステップS10)と基本的に同様であるが、次の点で異なる処理を行う。
 ステップS101では、変数依存関係抽出部15が、解析条件設定操作部9により設定された起点デバイス(例えば、デバイスX1)を起点として、デバイスの依存関係を抽出する。例えば、変数依存関係抽出部15は、前向きのデバイス依存関係の抽出が指定された場合、起点デバイスがa接点によって影響を与える全てのデバイスをラダープログラム16中より抽出する。あるいは、例えば、変数依存関係抽出部15は、後向きのデバイス依存関係の抽出が指定された場合、起点デバイスにa接点によって影響を与える全てのデバイスをラダープログラム16中より抽出する。
 このように、a接点として使用されているところに限った依存関係の抽出処理により、例えば、起点がONすることによってONされるデバイスを選択的に抽出できる。すなわち、多数の解析条件(解析コマンド、解析対象等)を組み合わせて指定せずとも、巨大で複雑な依存関係(の有向グラフ)を絞り込むことができる。
 なお、入力が負論理の場合は、a接点ではなくb接点となるから、b接点として使用されているところに限って、依存関係の抽出処理を進めることについては、同様である。ここで、b接点とは、図23において、デバイスX6及びデバイスX7のような負論理で参照される接点のことであり、接点がOFFすればコイルがONするものである。
 また、以上においては、前向き依存関係の場合について説明したが、出力がONしない原因がどこにあるかを解析するためには、起点デバイスにa接点によって影響を与える全てのデバイスを抽出しなくとも、起点がONするための条件となるONされるべきデバイスを選択的に抽出すればよい場合があるから、後向き依存関係の場合においても、a接点として使用されているところに限って、依存関係の抽出処理を進めることについては、同様である。なお、a接点とb接点とは論理が逆転しているものであるから、b接点について選択的に依存抽出処理を進めることは、a接点での依存抽出処理を止めることである。
 実施の形態7は、実施の形態1から6と適宜組み合わせて実施することができる。これにより、デバイス依存関係のさらなる絞り込みが可能となる。
実施の形態8.
 次に、実施の形態8にかかるプログラム解析支援装置について説明する。以下では、実施の形態1と異なる部分を中心に説明する。
 実施の形態1では、上記の第1の問題点の解決を目指しているが、実施の形態8では、さらに、上記の第2の問題点の解決を目指す。すなわち、実施の形態8では、第2の問題点への対処として、エラーが発生した時のデバイスメモリの値を保持しておき、その値を考慮したデバイス依存関係の抽出処理を行うことで、再現性の低い不具合原因を特定する。
 生産設備では、不具合動作を起こした場合には、その旨を作業者に伝えるとともに、復旧作業を促す必要がある。このためPCでは、エラーの発生を示すFデバイスが用意されており、各種の不具合動作を起こした場合には、それぞれのFデバイスをONにするようなラダープログラムが作成される。
 そして、従来のサンプリングトレースでは、予め指定した数点のデバイスについて、常時サンプリングトレースを実行しつつ、当該FデバイスがONとなったとき(または当該FデバイスがONとなったときから一定時間あるいは一定点数に達すれば)サンプリングトレースを停止して、得られたサンプリングトレース結果を見て、当該FデバイスがONに至るまでの他デバイスの値の時系列変化を確認して、不具合原因を特定している。
 しかし、それぞれのFデバイスをONにする原因、すなわち、当該Fデバイスに影響を与える他のデバイスの数は膨大であるから、第2の問題点が存在することは、前述のとおりである。
 従来のサンプリングトレースには、上述のとおり、常時サンプリングトレースを実行しつつ指定されたトリガ条件の成立で停止(またはトリガ条件成立から一定後に停止)するプレトリガ機能のほか、トリガ条件成立からサンプリングトレースを開始する通常トリガ機能がある。
 そこで、実施の形態8では、この通常トリガ機能を利用し、FデバイスがONとなるときをトリガ条件とし、サンプリング点数を1点とする代わりに、サンプリング対象となるデバイスを全デバイス(サンプリング可能な範囲内での全デバイス)に設定する。すなわち、解析条件設定操作部9は、第1の条件として、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスをデバイスメモリダンプ18のデバイスにすることを設定する。
 例えば、デバイス2つを8192点サンプリングすると、総計16383点のサンプリング容量が必要となるが、同じサンプリング容量でも、1点サンプリングなら、16383個分のデバイスの値を得ることができるのであるから、当該FデバイスがONとなった瞬間に限り、そのときのPCの内部状態をおよそ把握することができる。
 このようにして得られたサンプリングトレース結果は、その瞬間のデバイスメモリの状態をダンプしたものであるといえる。PCの内部の全メモリをダンプすることが、容量的に無理であれば、ダンプのトリガとなっている当該Fデバイス値に影響を与えるデバイスを選択的にダンプしてもよい。これは、当該Fデバイスを起点とした後向き依存関係を抽出して得られたデバイスであり、予め設定しておくことが可能である。
 こうして得られるデバイスメモリダンプ18(図2参照)を考慮し、当該デバイスをONとする条件となっているデバイスを選択的に遡ることで、後向き依存関係を絞り込むことが可能となる。
 例えば、解析条件設定操作部9は、異常発生を出力するデバイス(例えば、デバイスF1)を抽出したい依存関係の起点として設定するとともに、デバイスメモリダンプ18を考慮したデバイス依存関係の抽出を行うように変数依存関係抽出部15に指示する。
 図29は、デバイスメモリダンプ18を考慮してそれ以上のデバイス依存関係の抽出処理を行わない機能をチェックして有効にしている場合を示している。
 例えば、解析条件設定操作画面9aは、種別指定オンオフ欄9a7、種別指定欄9a8、回数指定オンオフ欄9a9、及び回数指定欄9a10に代えて、メモリダンプオンオフ欄9a11を有する。なお、解析条件設定操作画面9aは、種別指定オンオフ欄9a7、種別指定欄9a8、回数指定オンオフ欄9a9、及び回数指定欄9a10に加えて、メモリダンプオンオフ欄9a11を有していてもよい。
 メモリダンプオンオフ欄9a11では、メモリダンプ指定(すなわち、デバイスメモリダンプ18を考慮すること)を行うこと(オン)及びメモリダンプ指定を行わないこと(オフ)のいずれかが指示される。図29では、メモリダンプ指定を行うこと(オン)が指示された場合(すなわち、が例示されている。メモリダンプオンオフ欄9a11では、例えば、チェックを入れることでメモリダンプ指定を行うこと(オン)を指示し、チェックを外すことでメモリダンプ指定を行わないこと(オフ)を指示してもよい。
 変数依存関係抽出部15は、解析条件設定操作部9からの指示に応じて、デバイスメモリダンプ18(図2参照)を参照し、解析条件設定操作部9により設定された起点(例えば、デバイスF1)を起点として、デバイスメモリダンプ18の保持内容を参酌しながら、前向き又は後向きのデバイス依存関係を抽出し、第1の抽出結果を生成する。変数依存関係抽出部15は、第1の抽出結果を変数依存関係表示処理部12へ供給する。
 変数依存関係表示処理部12は、第1の抽出結果を用いて、表示情報を生成して表示画面4a上に表示する。例えば、変数依存関係表示処理部12は、図32の右図の有効グラフを表示画面4a上に表示する。
 デバイスメモリダンプ18を考慮してそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にした場合の依存関係の抽出処理について、図33を用いて説明する。図33は、デバイスのメモリダンプを考慮した依存関係の抽出処理を示すフローチャートである。
 ステップS111では、解析条件設定操作部9が、ユーザ操作8に対応して操作ボタン5a等で受け付けられた起点設定指示に応じて、抽出したい依存関係の起点を設定する。例えば、図29に示す場合、解析条件設定操作部9は、抽出したい依存関係の起点としてデバイスF1を設定する。解析条件設定操作部9は、設定された、抽出したい依存関係の起点の情報を解析処理実行部13へ供給する。
 また、解析条件設定操作部9は、ユーザ操作8に対応して操作ボタン5a等で受け付けられた第2の条件設定指示に応じて、第2の条件を設定する。例えば、図29に示す場合、解析条件設定操作部9は、第2の条件として、すなわち、デバイスメモリダンプ18の保持内容を設定する。解析条件設定操作部9は、設定された第2の条件の情報を解析処理実行部13へ供給する。
 ステップS120では、変数依存関係抽出部15が、再帰処理を行う。具体的には、変数依存関係抽出部15は、実施の形態1の再帰処理(ステップS10)と基本的に同様であるが、次の点で異なる処理を行う。
 ステップS121では、変数依存関係抽出部15が、デバイスメモリダンプ18(図2、図30参照)を考慮し、起点デバイス(例えば、デバイスF1)がONとなるか否かを判断する。変数依存関係抽出部15は、ONとなる(ステップS121で「Yes」)場合、処理をステップS122へ進め、OFFとなる(ステップS121で「No」)場合、処理を終了する。
 ステップS122では、変数依存関係抽出部15が、解析条件設定操作部9により設定された起点デバイス(例えば、デバイスF1)を起点として、デバイスメモリダンプ18を考慮しながら、デバイスの依存関係を抽出する。
 例えば、変数依存関係抽出部15は、前向きのデバイス依存関係の抽出が指定された場合、起点デバイスが影響を与える全てのデバイスのうち、起点デバイスのONが条件となっているデバイスをラダープログラム16中より抽出する。あるいは、例えば、変数依存関係抽出部15は、後向きのデバイス依存関係の抽出が指定された場合、起点デバイスに影響を与える全てのうち、起点デバイスのONが条件となっているデバイスをラダープログラム16中より抽出する。起点デバイスのONが条件となっているデバイスは、例えば、デバイスメモリダンプ18(図30参照)を参照することで把握できる。
 例えば、図30は、デバイスF1がONとなるときをトリガ条件として取得したデバイスメモリダンプ18である。このON/OFF状況をラダープログラム上に反映すると、図31のようになる。
 この場合、デバイスF1を起点として後向き依存関係を抽出すれば、まずデバイスF1に影響を与えるデバイスとしてデバイスM9が抽出される。デバイスメモリダンプ18を考慮すれば、デバイスM9はONであって、かつ、そのラダー行のコイルであるデバイスF1をONにしているので、さらにデバイスM9に遡る。
 次にデバイスM9に影響を与えるデバイスとしてデバイスM90,M91,M92が抽出される。デバイスM90はONであって、かつ、そのラダー行のコイルであるデバイスM9をONにしているので、さらにデバイスM90に遡る。一方でデバイスM91はONであるが、そのラダー行のコイルであるデバイスM9をONにするものではない。なぜならばデバイスM91とデバイスM92の両方がONの場合に限りデバイスM9がONとなるラダーとなっているからである。よってデバイスM91はこれ以上遡らない。デバイスM92はOFFであるから、これ以上遡らない。
 次にデバイスM90に影響を与えるデバイスとしてデバイスX9が抽出される。デバイスX9はONであって、かつ、そのラダー行のコイルであるデバイスM90をONにしているので、さらにデバイスX9に遡るが、デバイスX9に影響を与えるそれ以上の依存関係はない。
 単にデバイスF1を起点とした後向き依存関係を抽出すれば図32の左図のような結果が得られるところ、デバイスメモリダンプ18を考慮してそれ以上の依存関係の抽出処理を行わない機能をチェックして有効にすることで、図32の右図のような絞り込んだ結果が得られる。
 こうすることで、再現性の低い不具合について、エラー発生の原因となりうる膨大な数のデバイスの中から、実際にエラー発生の原因となっているデバイスを絞り込むことができ、前述の第2の問題点を解決できる。
 なお、エラー発生時のサンプリングトレース機能によるデバイスメモリダンプの代わりに、任意の時点でのデバイスメモリそのものを参照することもできる。参照する先が、デバイスメモリダンプか、任意の時点でのデバイスメモリか、だけの違いだからである。エラー発生してからしばらくしてエラー停止するまでの間において、デバイスの状況が変化しない場合などでは、エラー発生時のサンプリングトレース機能によるデバイスメモリダンプを取るまでもなく、エラー停止の時点でのデバイスメモリそのものを参照しても、大差ないことも多い。
 実施の形態8において、当該デバイスがONとなっている原因を遡るべく、後向き依存関係の抽出では1行のラダープログラムにはコイルに影響を与える接点が複数あるところ、メモリダンプを参照すれば実際にその瞬間においてコイルをONにしている接点を選択的に遡っている。当該デバイスがONとなっていることに起因しているところを掘り下げる場合も同様であって、前向き依存関係の抽出では複数のラダープログラムにおいて接点として参照されるために接点が影響を与えるコイルが複数あるところ、メモリダンプを参照すれば、実際にその瞬間において接点がONにしているコイルを選択的に掘り下げることができる。
 また、ONしているデバイスを遡るのではなく、OFFしているデバイスを遡るようにしてもよい。エラー発生の不具合の場合には、エラー発生を示すFデバイスがONとなるから、そのFデバイスが何故ONとなっているかの原因を探るべく、ONしているデバイスを選択的に遡るが、動作すべき機能が動作しないような不具合の場合は、そのYデバイスが何故ONになっていないのか、すなわち何故OFFなのかの原因を探ることもある。この場合には、OFFしているデバイスを選択的に遡る。
 加えて、起点となるデバイスを指定すれば、その起点となるデバイスがONとなっている場合には、ONしているデバイスを選択的に遡って、その起点となるデバイスがOFFとなっている場合には、OFFしているデバイスを選択的に遡るようにしてもよい。この場合、ONを遡るか、OFFを遡るかの指定操作が不要となる。
 実施の形態8は、実施の形態1から7を適宜組み合わせて実施することができる。これにより、さらなる絞り込みが可能となる。
 以上のように、実施の形態8では、解析条件設定操作部9が、異常発生を出力するデバイス(例えば、デバイスF1)を抽出したい依存関係の起点として設定する。変数依存関係抽出部15は、異常発生を出力するデバイスを起点としてデバイスメモリダンプ18の保持内容を参酌して前向き又は後向きのデバイス依存関係を抽出する。これにより、再現性の低い不具合について、実質的に不具合原因の特定に直接的に寄与しないもの(例えば、デバイスの動作)を除外しながら、不具合に深く関係する依存関係(の有向グラフ)を抽出して表示できる。この結果、再現性の低い不具合について、不具合動作について詳細な動作の解析を行うことができる。
実施の形態9.
 次に、実施の形態9にかかるプログラム解析支援装置について説明する。以下では、実施の形態1と異なる部分を中心に説明する。
 デバイス依存関係は、有向グラフによる表示(ブロックダイアグラム形式での表示)が、理解に適している。しかしながら、デバイス依存関係が巨大で複雑な場合には、その表示操作のために高度なユーザインタフェースが必要となる。よって、パーソナルコンピュータとPCとを接続してデバッグ作業を行う場合には、キーボード、マウス、高解像度ディスプレイにより、高度なユーザインタフェースが実現されうるため、問題ないが、生産設備が備える表示器と操作ボタンを用いてデバッグ作業が行われる場合には、これら限られたユーザインタフェースの範囲内で、デバイス依存関係の有向グラフによる表示(ブロックダイアグラム形式での表示)操作方法を実現せざるをえないため、パーソナルコンピュータの場合に比べ、格段に操作数が多くなり、かえって手間となってしまうという問題点がある。
 実施の形態1から8を適宜組み合わせて実施することで、巨大で複雑な依存関係は絞り込むことができるものの、限られたユーザインタフェースの範囲内で依存関係の有向グラフによる表示(ブロックダイアグラム形式での表示)操作しなければならないことに変わりない。
 ここで問題としているデバッグ作業とは、PCが組み込まれた生産設備などラダープログラムによって計測制御されている生産設備を使って行われるのであって、不具合動作を解消するために行われるものであるから、巨大で複雑なラダープログラムの構造を解析して理解することよりもむしろエラー原因を迅速に特定することが直接的な目的である。
 ここに着目して、実施の形態9では、抽出されたデバイス依存関係の途中の表示を省略し、原因と結果とを選択的に表示可能とする。すなわち、変数依存関係表示処理部12(図2参照)は、デバイス依存関係の起点となるデバイスと、抽出されたデバイス依存関係の終点デバイスとを選択的に表示する機能を有する。例えば、変数依存関係表示処理部12は、ユーザ操作8に応じて、図34のようなデバイス依存関係を、図35に示すように、デバイス依存関係の起点デバイスと終点デバイスとの間を省略した表示形態で表示する。
 表示を省略されたデバイス依存関係の途中については、デバイス依存関係の階層ごとに展開して表示できるよう、別途、表示を省略した部分を展開して表示したり、展開して表示した部分を省略して閉じたりするボタンを設ける。例えば、変数依存関係表示処理部12は、第1の抽出結果に従って、デバイス依存関係の起点と終点とについて表示するとともに、起点と終点との中間点である途中のデバイスについて、展開表示操作に従って表示し、折りたたみ表示操作指示に従って表示を省略する。このとき、変数依存関係表示処理部12は、例えば、起点と終点との中間点である途中のデバイスについて、各階層ごとに、展開表示操作に従って表示し、折りたたみ表示操作指示に従って表示を省略する。これにより、デバイス依存関係の全体のうち、確認したい任意の部分(例えば、任意の階層)を選択的に確認することができる。
 例えば、全てを展開して表示すれば、実質的に、デバイス依存関係の有向グラフによる表示(ブロックダイアグラム形式での表示)と同じになる。
 実施の形態9によれば、デバイス依存関係の起点となるデバイスと、抽出されたデバイス依存関係の終点デバイスとを選択的に表示することが可能となり、PCが組み込まれた生産設備といった、限られたユーザインタフェースの範囲内でも、エラー原因を迅速に特定することが可能となる。
 なお、抽出された依存関係が巨大で複雑であれば、終点デバイスの数も膨大なものとなるが、実施の形態1から8を実施することで、あるいは、実施の形態1から8を適宜組み合わせて実施することで、依存関係の末端デバイスの数は現実的な範囲内に絞り込むことができるから、実施の形態9の効果が十分に発揮される。
 以上のように、実施の形態9では、変数依存関係表示処理部12が、第1の抽出結果に従って、デバイス依存関係の起点と終点とについて表示するとともに、デバイス依存関係における起点と終点との中間点である途中のデバイスについて、展開表示操作に従って表示し、折りたたみ表示操作指示に従って表示を省略する。例えば、変数依存関係表示処理部12は、起点と終点との中間点である途中のデバイスについて、各階層ごとに、展開表示操作に従って表示し、折りたたみ表示操作指示に従って表示を省略する。これにより、デバイス依存関係の全体のうち、確認したい任意の部分(例えば、任意の階層)を選択的に確認することができる。
実施の形態10.
 次に、実施の形態10にかかるプログラム解析支援装置について説明する。以下では、実施の形態8と異なる部分を中心に説明する。
 Fデバイスが用意されていることについては、実施の形態8で述べたとおりであって、不具合動作を起こした場合には、その旨を作業者に伝えるとともに、復旧作業を促すために、生産設備では、その表示部に、異常の発生を表示する(例えば非特許文献4)。このとき作業者が、異常の原因がどこにあるかを特定するために、異常発生の画面をみてから、その異常に相当するFデバイスを別途しらべて、そのFデバイスを別途解析条件として設定して、依存関係やラダー回路を見るという作業は煩雑である。
 ここに着目して、実施の形態10では、図36に示すように、生産設備における制御装置20がプログラム解析支援装置1を備えることとして、異常発生表示の中から1つの異常表示を選択すると、その異常表示に相当するFデバイスを起点とした依存関係を表示させることにする。このとき、当該異常が発生した際のデバイスメモリダンプ18を参酌して、依存関係を抽出させることもできる。
 例えば、制御装置20は、プログラム解析支援装置1、デバイスメモリダンプ18、異常発生表示処理部21、表示部24、異常発生時メモリダンプ処理部22、及び制御部23を備える。プログラム解析支援装置1は、例えば、実施の形態1~9のいずれかにかかるプログラム解析支援装置を用いることができる。デバイスメモリダンプ18は、実施の形態1,8におけるデバイスメモリダンプを用いることができる。
 異常発生表示処理部21は、ラダープログラム16(図2参照)において異常発生が検出されたときに、異常発生を表示部24上に表示する。表示部24は、例えば、液晶ディスプレイなどの表示装置であってもよい。異常発生表示処理部21は、例えば、1以上の異常発生について表示部24上に表示する。例えば、異常発生表示処理部21は、図37の左図に示すように、複数の異常発生について表示部24上に表示する。このとき、異常発生表示処理部21は、例えば、制御部23からの要求に応じて、表示部24上に表示している表示情報をプログラム解析支援装置1へ供給してもよい。これにより、プログラム解析支援装置1の表示部4上にも複数の異常発生について表示できる。
 異常発生表示処理部21は、ユーザ操作8に応じて、表示された異常発生のうち1つの異常発生が選択されたことを認識すると、選択された異常発生の情報をプログラム解析支援装置1及び制御部23に通知する。
 異常発生時メモリダンプ処理部22は、ラダープログラム16において異常発生が検出されたときに、異常発生を出力するデバイスに係るメモリをダンプして保持する(図30参照)。異常発生時メモリダンプ処理部22は、保持しているメモリダンプの内容を、定期的に、又は、制御部23からの要求に応じて、デバイスメモリダンプ18に書き込む。
 制御部23は、制御装置20の各部を全体的に制御する。
 例えば、制御部23は、ラダープログラム16において異常発生が検出されたときに、異常発生を表示部24上に表示するように、異常発生表示処理部21を制御する。このとき、制御部23は、表示部24上に表示している表示情報をプログラム解析支援装置1へ供給するように、異常発生表示処理部21を制御してもよい。
 例えば、制御部23は、ラダープログラム16において異常発生が検出されたときに、異常発生を出力するデバイスに係るメモリをダンプするように、異常発生時メモリダンプ処理部22を制御する。
 例えば、制御部23は、所定のタイミング(例えば、異常発生時メモリダンプ処理部22におけるメモリダンプが完了したものと推定されるタイミング)において、保持しているメモリダンプの内容をデバイスメモリダンプ18に書き込むように、異常発生時メモリダンプ処理部22を制御する。
 例えば、制御部23は、異常発生表示処理部21により表示される異常発生のうち1つの異常発生が選択されたとき、選択された異常発生を出力するデバイスを抽出したい依存関係の起点として前向き又は後向きのデバイス依存関係を抽出するように、プログラム解析支援装置1を制御する。このとき、制御部23は、選択された異常発生を出力するデバイスに係る条件として、選択された異常発生を出力するデバイスに関する異常発生時メモリダンプ処理部22の保持内容、すなわちデバイスメモリダンプ18の保持内容を参酌して、前向き又は後向きのデバイス依存関係を抽出するように、プログラム解析支援装置1を制御する。
 例えば、制御部23は、抽出して得られたデバイス依存関係を表示するように、プログラム解析支援装置1を制御する(図37の右図参照)。このとき、制御部23は、選択された異常発生と抽出して得られたデバイス依存関係とを対応付けた表示形態で表示するように、プログラム解析支援装置1を制御してもよい。例えば、図37の場合、アラームメッセージ1から有向グラフに延びた破線の矢印により、異常発生を示すアラームメッセージ1と、抽出されたデバイス依存関係に対応した有向グラフとが対応付けられている。
 例えば、図37に示すような表示形態により、はじめに異常発生の原因となる制御構造を大局的な視点で把握でき、その中から注目したい部分を局所的に詳細確認するためにその部分に相当するラダー回路を表示することが可能となり、異常原因の特定作業をより一層効率化できる。
 以上のように、実施の形態10では、制御装置20において、制御部23は、異常発生表示処理部21により表示される異常発生のうち1つの異常発生が選択されたとき、選択された異常発生を出力するデバイスを抽出したい依存関係の起点として前向き又は後向きのデバイス依存関係を抽出し、得られたデバイス依存関係を表示するように、プログラム解析支援装置1を制御する。これにより、再現性の低い不具合について、実質的に不具合原因の特定に直接的に寄与しないもの(例えば、デバイスの動作)を除外しながら、不具合に深く関係する依存関係(の有向グラフ)を抽出して表示できる。この結果、再現性の低い不具合について、不具合動作について詳細な動作の解析を行うことができる。
 また、実施の形態10では、制御装置20において、制御部23は、異常発生表示処理部21により表示される異常発生のうち1つの異常発生が選択されたとき、選択された異常発生を出力するデバイスを抽出したい依存関係の起点として設定するとともに、選択された異常発生を出力するデバイスに係る条件として選択された異常発生を出力するデバイスに関する異常発生時メモリダンプ処理部22の保持内容を参酌して前向き又は後向きのデバイス依存関係を抽出し、得られたデバイス依存関係を表示するように、プログラム解析支援装置1を制御する。このとき、例えば、制御部23は、選択された異常発生と抽出して得られたデバイス依存関係とを対応付けた表示形態で表示するように、プログラム解析支援装置1を制御する。これにより、はじめに異常発生の原因となる制御構造を大局的な視点で把握でき、その中から注目したい部分を局所的に詳細確認するためにその部分に相当するラダー回路を表示することが可能となり、異常原因の特定作業をより一層効率化できる。
 以上のように、本発明にかかるプログラム解析支援装置は、ラダープログラムの不具合解析に有用である。
 1 プログラム解析支援装置、2 マイクロプロセッサ、3 データ格納メモリ、4 表示部、5 入力部、6 保存部、7 システムバス、8 ユーザ操作、9 解析条件設定操作部、10 解析結果表示処理部、11 変数使用状況表示処理部、12 変数依存関係表示処理部、13 解析処理実行部、14 変数使用状況抽出部、15 変数依存関係抽出部、16 ラダープログラム、17 デバイスコメント、18 デバイスメモリダンプ、19 回路表示処理部、20 制御装置、21 異常発生表示処理部、22 異常発生時メモリダンプ処理部、23 制御部、24 表示部。

Claims (7)

  1.  解析対象となるラダープログラムを設定するとともに、抽出したい依存関係の起点を設定する解析条件設定操作部と、
     前記ラダープログラムから前向き又は後向きのデバイス依存関係を抽出する変数依存関係抽出部を有する解析処理実行部と、
     前記抽出されたデバイス依存関係を表示する変数依存関係表示処理部を有する解析結果表示処理部と、
     前記ラダープログラムを表示する回路表示処理部と、
     を備え、
     前記解析条件設定操作部は、さらなる前向き又は後向きのデバイス依存関係を抽出しないデバイスに係る第1の条件、又はさらなる前向き又は後向きのデバイス依存関係を抽出するデバイスに係る第2の条件を設定し、
     前記変数依存関係抽出部は、前記第1の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出しないように、且つ前記第2の条件に合致するデバイスについてさらなる前向き又は後向きのデバイス依存関係を抽出するように、前記ラダープログラムから前記設定された起点を起点として前向き又は後向きのデバイス依存関係を抽出して、第1の抽出結果を生成し、
     前記変数依存関係表示処理部は、前記第1の抽出結果に従って、デバイス依存関係を表示する
     ことを特徴とするプログラム解析支援装置。
  2.  前記回路表示処理部は、前記第1の抽出結果に従って表示されたデバイス依存関係の中から1つのデバイスが指定されたとき、前記指定されたデバイスをコイル出力するラダー回路を選択的に表示する、又は、前記第1の抽出結果に従ったデバイス依存関係の全体を表示しつつ前記指定されたデバイスをコイル出力するラダー回路を選択的に表示する
     ことを特徴とする請求項1に記載のプログラム解析支援装置。
  3.  前記変数依存関係抽出部は、前記第1の抽出結果に従ったデバイス依存関係における終点デバイスについて、別途、前記終点デバイスを起点としたデバイス依存関係を抽出して、第2の抽出結果を生成し、
     前記変数依存関係表示処理部は、前記解析条件設定操作部により設定された起点を起点とするデバイス依存関係を、前記第1の抽出結果及び前記第2の抽出結果に基づいて、2以上のデバイス依存関係に分割して表示する
     ことを特徴とする請求項1に記載のプログラム解析支援装置。
  4.  前記変数依存関係表示処理部は、前記第1の抽出結果に従って、デバイス依存関係の起点と終点とについて表示するとともに、前記起点と前記終点との中間点である途中のデバイスについて、展開表示操作に従って表示し、折りたたみ表示操作指示に従って表示を省略する
     ことを特徴とする請求項1に記載のプログラム解析支援装置。
  5.  前記解析処理実行部は、
     前記第1の条件を設定する際の参考情報として供するように、前記ラダープログラムからデバイスについて、複数のラダー行で接点として参照使用されている回数、又は、1つのラダー行でいくつの接点から制御依存を受けているのかを示す回数に関するヒストグラムを抽出する変数使用状況抽出部をさらに有し、
     前記解析結果表示処理部は、
     前記抽出されたヒストグラムを表示する変数使用状況表示処理部をさらに有する
     ことを特徴とする請求項1に記載のプログラム解析支援装置。
  6.  請求項1に記載のプログラム解析支援装置と、
     前記ラダープログラムにおいて異常発生が検出されたときに、前記異常発生を表示する異常発生表示処理部と、
     前記異常発生表示処理部により表示される異常発生のうち1つの異常発生が選択されたとき、前記選択された異常発生を出力するデバイスを抽出したい依存関係の起点として設定し、得られたデバイス依存関係を表示するように、前記プログラム解析支援装置を制御する制御部と、
     を備えたことを特徴とする制御装置。
  7.  前記制御装置は、前記ラダープログラムにおいて異常発生が検出されたときに、前記異常発生を出力するデバイスに係るメモリをダンプして保持する異常発生時メモリダンプ処理部をさらに備え、
     前記制御部は、前記異常発生表示処理部により表示される異常発生のうち1つの異常発生が選択されたとき、前記選択された異常発生を出力するデバイスを抽出したい依存関係の起点として設定するとともに、前記選択された異常発生を出力するデバイスに係る条件として前記選択された異常発生を出力するデバイスに関する前記異常発生時メモリダンプ処理部の保持内容を参酌してさらなる前向き又は後向きのデバイス依存関係を抽出することを指定し、得られたデバイス依存関係を表示するように、前記プログラム解析支援装置を制御する
     ことを特徴とする請求項6に記載の制御装置。
PCT/JP2012/082703 2012-12-17 2012-12-17 プログラム解析支援装置及び制御装置 WO2014097379A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US14/113,490 US20140304551A1 (en) 2012-12-17 2012-12-17 Program analysis supporting device and control device
CN201280020510.4A CN104160344B (zh) 2012-12-17 2012-12-17 程序解析辅助装置及控制装置
PCT/JP2012/082703 WO2014097379A1 (ja) 2012-12-17 2012-12-17 プログラム解析支援装置及び制御装置
JP2013521691A JP5362148B1 (ja) 2012-12-17 2012-12-17 プログラム解析支援装置及び制御装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/082703 WO2014097379A1 (ja) 2012-12-17 2012-12-17 プログラム解析支援装置及び制御装置

Publications (1)

Publication Number Publication Date
WO2014097379A1 true WO2014097379A1 (ja) 2014-06-26

Family

ID=49850329

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/082703 WO2014097379A1 (ja) 2012-12-17 2012-12-17 プログラム解析支援装置及び制御装置

Country Status (4)

Country Link
US (1) US20140304551A1 (ja)
JP (1) JP5362148B1 (ja)
CN (1) CN104160344B (ja)
WO (1) WO2014097379A1 (ja)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016133879A (ja) * 2015-01-16 2016-07-25 横河電機株式会社 エンジニアリング支援装置、方法、及びプログラム
WO2016194099A1 (ja) * 2015-06-01 2016-12-08 三菱電機株式会社 デバッグ装置、デバッグ方法及びデバッグプログラム
CN106292583A (zh) * 2016-08-16 2017-01-04 苏州朋泰智能科技有限公司 基于分布式mes的柔性制造系统的纠错方法及装置
WO2017145710A1 (ja) * 2016-02-23 2017-08-31 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
JP2017188115A (ja) * 2016-04-04 2017-10-12 オムロン株式会社 プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム
WO2017175767A1 (ja) * 2016-04-04 2017-10-12 オムロン株式会社 プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム
JP2020177712A (ja) * 2020-08-07 2020-10-29 株式会社キーエンス 外部設定機器
WO2020261487A1 (ja) * 2019-06-27 2020-12-30 オムロン株式会社 解析装置、解析方法及び解析プログラム
WO2021065032A1 (ja) * 2019-10-03 2021-04-08 オムロン株式会社 制御システム、サポート装置およびサポートプログラム
US11188048B2 (en) 2018-10-23 2021-11-30 Keyence Corporation Programmable logic controller and main unit
EP4254113A1 (en) 2022-04-01 2023-10-04 OMRON Corporation Information processing system, information processing method and information processing program

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160266951A1 (en) * 2015-03-10 2016-09-15 Unisys Corporation Diagnostic collector for hadoop
JP6079817B2 (ja) * 2015-04-21 2017-02-15 株式会社安川電機 ラダープログラム作成装置、コンピュータープログラム及びラダープログラム作成方法
JP6212074B2 (ja) * 2015-06-29 2017-10-11 ファナック株式会社 最寄りのネットコメントを表示可能なラダープログラム編集装置
JP6309927B2 (ja) 2015-09-16 2018-04-11 ファナック株式会社 Ncプログラム運転と連動した関連信号の自動トレース機能を有する数値制御装置
JP6325500B2 (ja) * 2015-09-17 2018-05-16 ファナック株式会社 Cncの動作状況をコメント中に追加表示可能なラダー図モニタ装置
JP2017134493A (ja) * 2016-01-26 2017-08-03 ファナック株式会社 ラダープログラムの自己保持回路の自動トレース機能を備えたラダープログラム表示装置
JP6356726B2 (ja) 2016-05-19 2018-07-11 ファナック株式会社 ラダープログラム解析装置
US10338990B2 (en) 2016-06-23 2019-07-02 Vmware, Inc. Culprit module detection and signature back trace generation
US10331546B2 (en) 2016-06-23 2019-06-25 Vmware, Inc. Determination of a culprit thread after a physical central processing unit lockup
US10331508B2 (en) 2016-06-23 2019-06-25 Vmware, Inc. Computer crash risk assessment
US10365959B2 (en) 2016-06-23 2019-07-30 Vmware, Inc. Graphical user interface for software crash analysis data
US10268563B2 (en) 2016-06-23 2019-04-23 Vmware, Inc. Monitoring of an automated end-to-end crash analysis system
JP6773732B2 (ja) 2018-08-03 2020-10-21 ファナック株式会社 トレース装置
JP6795568B2 (ja) 2018-11-07 2020-12-02 ファナック株式会社 トレース装置及びプログラマブルコントローラ
CN109783368A (zh) * 2018-12-20 2019-05-21 武汉华中数控股份有限公司 梯形图编程软件测试系统及方法
JP7188198B2 (ja) * 2019-03-13 2022-12-13 オムロン株式会社 グラフ表示装置、グラフ表示方法、及びグラフ表示プログラム
JP7031627B2 (ja) * 2019-03-13 2022-03-08 オムロン株式会社 解析装置、解析方法、及び解析プログラム
JP7183877B2 (ja) * 2019-03-13 2022-12-06 オムロン株式会社 グラフ表示装置、グラフ表示方法、及びグラフ表示プログラム
CN113711142B (zh) * 2019-04-18 2022-09-09 三菱电机株式会社 调试辅助装置、调试辅助方法、记录介质
JP6692510B1 (ja) * 2019-06-18 2020-05-13 三菱電機株式会社 解析装置、方法、及びプログラム
CN112506129B (zh) * 2020-12-15 2022-02-22 北京东土科技股份有限公司 一种梯形图的转换方法、装置、设备及存储介质
CN112579477A (zh) * 2021-02-26 2021-03-30 北京北大软件工程股份有限公司 一种缺陷检测方法、装置以及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54152774A (en) * 1978-05-22 1979-12-01 Sharp Corp Monitor device of programmable sequence controller
JPH06318113A (ja) * 1993-05-07 1994-11-15 Omron Corp 故障診断のための診断対象のグループ化方法および装置
JP2001209415A (ja) * 2000-01-26 2001-08-03 Matsushita Electric Works Ltd 故障診断用の基準パターンの作成方法および故障診断装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102317877B (zh) * 2009-02-18 2014-07-09 三菱电机株式会社 程序分析支援装置
US8726091B2 (en) * 2011-06-24 2014-05-13 Rockwell Automation Technologies, Inc. Troubleshooting system for industrial control programs
CN102411330B (zh) * 2011-08-25 2014-03-12 华侨大学 一种将可编程逻辑控制器程序转换为普通Petri网的方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54152774A (en) * 1978-05-22 1979-12-01 Sharp Corp Monitor device of programmable sequence controller
JPH06318113A (ja) * 1993-05-07 1994-11-15 Omron Corp 故障診断のための診断対象のグループ化方法および装置
JP2001209415A (ja) * 2000-01-26 2001-08-03 Matsushita Electric Works Ltd 故障診断用の基準パターンの作成方法および故障診断装置

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016133879A (ja) * 2015-01-16 2016-07-25 横河電機株式会社 エンジニアリング支援装置、方法、及びプログラム
WO2016194099A1 (ja) * 2015-06-01 2016-12-08 三菱電機株式会社 デバッグ装置、デバッグ方法及びデバッグプログラム
JPWO2016194099A1 (ja) * 2015-06-01 2017-06-22 三菱電機株式会社 デバッグ装置、デバッグ方法及びデバッグプログラム
WO2017145710A1 (ja) * 2016-02-23 2017-08-31 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
JP2017188115A (ja) * 2016-04-04 2017-10-12 オムロン株式会社 プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム
WO2017175767A1 (ja) * 2016-04-04 2017-10-12 オムロン株式会社 プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム
US10838390B2 (en) 2016-04-04 2020-11-17 Omron Corporation Program creation support apparatus, control method for program creation support apparatus, and control program for program creation support apparatus
CN106292583A (zh) * 2016-08-16 2017-01-04 苏州朋泰智能科技有限公司 基于分布式mes的柔性制造系统的纠错方法及装置
CN106292583B (zh) * 2016-08-16 2018-08-31 苏州朋泰智能科技有限公司 基于分布式mes的柔性制造系统的纠错方法及装置
US11188048B2 (en) 2018-10-23 2021-11-30 Keyence Corporation Programmable logic controller and main unit
WO2020261487A1 (ja) * 2019-06-27 2020-12-30 オムロン株式会社 解析装置、解析方法及び解析プログラム
JP2021060675A (ja) * 2019-10-03 2021-04-15 オムロン株式会社 制御システム、サポート装置およびサポートプログラム
WO2021065032A1 (ja) * 2019-10-03 2021-04-08 オムロン株式会社 制御システム、サポート装置およびサポートプログラム
JP7392370B2 (ja) 2019-10-03 2023-12-06 オムロン株式会社 制御システム、サポート装置およびサポートプログラム
JP2020177712A (ja) * 2020-08-07 2020-10-29 株式会社キーエンス 外部設定機器
EP4254113A1 (en) 2022-04-01 2023-10-04 OMRON Corporation Information processing system, information processing method and information processing program

Also Published As

Publication number Publication date
JPWO2014097379A1 (ja) 2017-01-12
US20140304551A1 (en) 2014-10-09
JP5362148B1 (ja) 2013-12-11
CN104160344A (zh) 2014-11-19
CN104160344B (zh) 2016-01-20

Similar Documents

Publication Publication Date Title
JP5362148B1 (ja) プログラム解析支援装置及び制御装置
JP5649748B1 (ja) プログラマブルコントローラの周辺装置およびデバッグ支援プログラム
EP2419801B1 (en) Dynamic views in a modeling of an automation system
JP6006399B2 (ja) プログラマブル表示器、そのプログラム
JP5619328B1 (ja) シーケンスプログラム作成支援装置
JPWO2015170382A1 (ja) エンジニアリングツール、プログラム編集装置およびプログラム編集システム
JP2016004414A (ja) プログラム編集装置、方法、およびプログラム
JP5935658B2 (ja) 設計支援プログラム,方法及び装置
JP2009223714A (ja) 演算回路及び演算回路の異常解析方法
US10515179B2 (en) Circuit design verification apparatus and program
JP2009075633A (ja) プログラマブル表示器
TWI569118B (zh) 畫面作成軟體
US20200310377A1 (en) Ladder Display Device
KR101886986B1 (ko) 엔지니어링 툴 프로그램 및 엔지니어링 툴
WO2015001721A1 (ja) ユーザインタフェース検査方法、装置およびプログラム
JP6247542B2 (ja) 監視ポイント定義変更方法およびエンジニアリング装置
JP5296724B2 (ja) 画面表示データ編集装置及び画面表示データ編集プログラム
JP6121706B2 (ja) プログラミング方法および装置
JP6018494B2 (ja) プログラミング方法および装置
WO2024096011A1 (ja) シーケンスプログラムの編集プログラム
JP2009009314A (ja) エディタ装置、エディタプログラムおよびそれを記録した記録媒体
JP6395467B2 (ja) ラダー関数シミュレータ、ラダー回路図編集装置及びラダー関数シミュレータプログラム
TWI609313B (zh) 工程工具程式及工程工具
JPH1091477A (ja) 制御用マイクロコンピュータ装置及び該装置の保守ツール
JP6247182B2 (ja) 操作手順記録装置、操作手順記録方法及び操作手順記録プログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201280020510.4

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2013521691

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14113490

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 1120120015290

Country of ref document: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12890615

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 12890615

Country of ref document: EP

Kind code of ref document: A1