WO2016166876A1 - プログラム診断装置、プログラム診断方法及びプログラム診断プログラム - Google Patents

プログラム診断装置、プログラム診断方法及びプログラム診断プログラム Download PDF

Info

Publication number
WO2016166876A1
WO2016166876A1 PCT/JP2015/061757 JP2015061757W WO2016166876A1 WO 2016166876 A1 WO2016166876 A1 WO 2016166876A1 JP 2015061757 W JP2015061757 W JP 2015061757W WO 2016166876 A1 WO2016166876 A1 WO 2016166876A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
search
condition
control program
unit
Prior art date
Application number
PCT/JP2015/061757
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 KR1020177031427A priority Critical patent/KR101846140B1/ko
Priority to JP2016555855A priority patent/JP6076565B1/ja
Priority to CN201580078870.3A priority patent/CN107533322B/zh
Priority to PCT/JP2015/061757 priority patent/WO2016166876A1/ja
Publication of WO2016166876A1 publication Critical patent/WO2016166876A1/ja

Links

Images

Classifications

    • 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

Definitions

  • the present invention relates to a program diagnostic apparatus, a program diagnostic method, and a program diagnostic program for diagnosing a control program.
  • control program In a control system that controls a machine in the FA (Factory Automation) field, the control program is described in a program language.
  • the programming language is exemplified by a ladder (Ladder, LD) language or a structured text (Structured Text, ST) language (IEC 61131-3, JIS B 3503: 2012).
  • the control program includes instructions and variables. In order to investigate the cause when the value of a certain variable in the control program is different from the expected value, the following operation was performed manually.
  • the first operation is an operation that goes back through the control program and examines the location and conditions that may change the value of the target variable.
  • the second operation is an operation to reproduce that the condition is satisfied at the location examined in the first operation by executing a simulation of the control program.
  • the third operation is an operation to go back further in the control program and check the location and conditions that satisfy the conditions reproduced in the second operation.
  • a first process of finding a block including an output command part capable of operating this value from all blocks in the ladder program using an abnormality in the output command part as a search key The logical operation of the conditional instruction part of the block found in the first process is performed, the state of the output instruction part of this block corresponding to the logical operation result of this conditional instruction part is determined, and this block outputs the abnormal output
  • the sequence diagram acquisition unit acquires a sequence diagram of an operation state, and the selection unit selects a desired symbol in the operation sequence diagram, so that an upstream connection related to the symbol is obtained.
  • the connection line search unit searches for the line, and it is possible to easily obtain the presence or absence of the output of the operation state, and even if the operation state changes, the data is read and the defective part is sequentially searched. Possible sequence diagram monitors are described (summary).
  • JP 2001-67122 A Japanese Patent Laid-Open No. 3-108005 JP-A-9-305207
  • the present invention has been made in view of the above, and an object of the present invention is to obtain a program diagnostic apparatus that can make it easy for a user to grasp the overall image of a problem.
  • the present invention can be described by a control program including an operation instruction for changing an argument value and a condition instruction for determining a condition for executing the operation instruction, and the control program Stores instruction specification data including the instruction name of the instruction, the type of operation instruction or conditional instruction, and the processing contents of the instruction, and search result data in which search results executed for the control program are accumulated.
  • a storage unit is provided.
  • the present invention searches a control program for a variable setting unit that sets a target variable, an operation instruction that may change the value of the target variable, and obtains the searched operation instruction and instruction specification data.
  • a condition for executing the operation command searched by the operation search unit and the operation search unit that collates and writes the target variable name, the command name of the searched operation command, the type of the command, and the processing content to the search result data
  • the conditional instruction for determining the condition is searched from the control program, the searched conditional instruction is compared with the instruction specification data, the variable name of the argument of the searched conditional instruction, and the instruction name of the searched conditional instruction Writes the command type and processing contents to the search result data, sets the argument of the searched conditional command to a new target variable, searches the operation search unit and the condition search unit It comprises a search determination unit to be executed again, and the list display unit for displaying a list of contents of the search result data.
  • the program diagnostic apparatus has an effect that it is easy for the user to grasp the whole picture of the problem.
  • FIG. The figure which shows the structure of the control system concerning Embodiment 1.
  • FIG. The figure which shows the hardware constitutions of the control apparatus concerning Embodiment 1.
  • FIG. 1 is a diagram illustrating a configuration of a control system according to the first embodiment of the present invention.
  • the control system 1 includes an engineering tool 2, a control device 3, and machines 4 and 5.
  • the engineering tool 2 creates project data including a control program executed by the control device 3 and transmits it to the control device 3.
  • the control device 3 controls the machines 4 and 5 by executing a control program included in the project data.
  • the control device 3 is exemplified by programmable controllers (JIS B 3502: 2011, programmable controllers (PLC)).
  • FIG. 2 is a diagram illustrating a hardware configuration of the control device according to the first embodiment.
  • the control device 3 includes a main board 3a and sub boards 3b and 3c.
  • the main board 3a includes a CPU (Central Processing Unit) 3a1, a memory 3a2 which is a RAM (Random Access Memory), a communication interface 3a3, a bus interface 3a4, and a storage unit 3a5.
  • the CPU 3a1, the memory 3a2, the communication interface 3a3, the bus interface 3a4, and the storage unit 3a5 are connected via an internal bus B1.
  • the communication interface 3a3 communicates with the engineering tool 2.
  • the bus interface 3a4 is a bus bridge circuit that connects the internal bus B1 and the expansion bus B2.
  • the sub boards 3b and 3c are connected to the main board 3a via the expansion bus B2.
  • the sub board 3 b is connected to the machine 4.
  • the sub board 3 c is connected to the machine 5.
  • the storage unit 3a5 stores the project data 24a received from the engineering tool 2.
  • the storage unit 3a5 is exemplified by SSD (Solid State Drive) or HDD (Hard Disk Drive).
  • the project data 24a includes an operation instruction that changes the value of an argument and a control program 24a1 that includes a condition instruction that determines a condition for executing the operation instruction, a control parameter 24a2 that is referred to when the control program 24a1 is executed, and a memory 3a2 It includes a device memory 24a3 that defines a work area, and connection information 24a4 that defines a connection relationship between the sub-board 3b and the machine 4 and a connection relationship between the sub-board 3c and the machine 5.
  • the control program 24a1 includes a MAIN (main) program 24a1a and a SUB (sub) program 24a1b.
  • the control program 24a1 is described in a ladder language, but the present invention is not limited to this.
  • a structured text language is exemplified.
  • each of the plurality of devices in the memory 3a2 corresponds to a variable of the control program 24a1.
  • FIG. 3 is a diagram illustrating a hardware configuration of the engineering tool according to the first embodiment.
  • the engineering tool 2 according to the first embodiment can be realized using a computer.
  • the computer includes a CPU 21, a RAM 22, a ROM (Read Only Memory) 23, a storage unit 24, an input unit 25, a display unit 26, and a communication interface 27.
  • the CPU 21, RAM 22, ROM 23, storage unit 24, input unit 25, display unit 26, and communication interface 27 are connected via a bus B.
  • the CPU 21 executes programs stored in the ROM 23 and the storage unit 24 while using the RAM 22 as a work area.
  • Examples of the program stored in the ROM 23 include BIOS (Basic Input / Output System) or UEFI (Unified Extensible Firmware Interface).
  • Examples of the program stored in the storage unit 24 include an operating system program and an engineering tool program.
  • the storage unit 24 is exemplified by an SSD or an HDD.
  • the input unit 25 receives an operation input from the user.
  • the input unit 25 is exemplified by a keyboard or a mouse.
  • the display unit 26 displays characters and images.
  • the display unit 26 is exemplified by a liquid crystal display device.
  • the communication interface 27 communicates with the control device 3.
  • FIG. 4 is a diagram illustrating functional blocks of the engineering tool according to the first embodiment.
  • the storage unit 24 stores project data 24a.
  • the project data 24a includes an operation instruction for changing the value of an argument and a control program 24a1 including a condition instruction for determining a condition for executing the operation instruction, a control parameter 24a2 referred to when the control program 24a1 is executed, A device memory 24a3 that defines a work area in the memory 3a2, a connection relationship between the sub-board 3b of the control device 3 and the machine 4, and connection information 24a4 that defines a connection relationship between the sub-board 3c of the control device 3 and the machine 5; ,including.
  • the storage unit 24 stores instruction specification data 24b including instruction names of all instructions that can be described in the control program 24a1, types of operation instructions or conditional instructions, and instruction processing contents.
  • the control program 24a1 is described in a ladder language. Therefore, the instruction specification data 24b includes instruction names of all instructions in the ladder language, types of operation instructions or conditional instructions, and instruction processing contents.
  • FIG. 5 is a diagram showing instruction specification data of the engineering tool according to the first embodiment.
  • the instruction specification data 24b includes an instruction name item 24b1, an instruction type item 24b2, an explanatory note item 24b3, and a remarks item 24b4.
  • the line 51 of the instruction specification data 24b includes information related to the “LD” (load) instruction.
  • the command name “LD” is described in the command name item in the row 51. Since the LD instruction is a conditional instruction, the instruction type “condition” is described in the instruction type item in the row 51.
  • the description of the operation of the “LD” instruction is described in the item of the description in the line 51. Since the “LD” command is a command for determining whether or not the first argument is ON, the description “# 1 is ON” is described in the description item of the row 51. ing.
  • the line 52 of the instruction specification data 24b includes information related to the “OUT” instruction.
  • the command name “OUT” is described in the command name item in the line 52.
  • the command type “operation” is described in the command name item in the line 52.
  • the line 54 of the instruction specification data 24b includes information regarding the “MOV” (move) instruction.
  • the command name “MOV” is described in the command name item on the line 54. Since the “MOV” instruction is a conditional instruction, the instruction type “operation” is described in the instruction type item of the line 54.
  • FIG. 5 shows four lines 51, 52, 53, and 54 related to four instructions.
  • the instruction specification data 24b includes a plurality of lines relating to all instructions described in the ladder language.
  • the storage unit 24 stores search end condition data 24c in which a search end condition to be executed for the control program 24a1 is described.
  • the search end condition data 24c includes search count data 24c1 and search range data 24c2.
  • FIG. 6 is a diagram showing search frequency data of the engineering tool according to the first embodiment. “10” is described in the search count data 24c1. Thereby, the search performed with respect to the control program 24a is completed up to 10 times.
  • FIG. 7 is a diagram showing search range data of the engineering tool according to the first embodiment.
  • the search range data 24c2 includes a range start step number item and a range end step number item. “1” is described in the item of the range top step number. In the range end step number item, “100” is described. As a result, the search executed for the control program 24a1 is limited to the range from step number 1 to step number 100, and ends when it falls outside this range.
  • the storage unit 24 stores search result data 24d in which search results executed for the control program 24a1 are accumulated.
  • FIG. 8 is a diagram showing search result data of the engineering tool according to the first embodiment.
  • the search result data 24d includes a variable name item 24d1, an instruction name item 24d2, an instruction type item 24d3, an explanatory text item 24d4, a program name item 24d5, and a step number item 24d6. .
  • the rows 61, 62, 63 and 64 of the search result data 24d will be described in the description of the operation of the engineering tool 2.
  • the storage unit 24 stores the execution data 24e in which the values at the predetermined timing of all variables used in the control program 24a1 are stored. That is, the execution data 24e stores the values of all variables at a plurality of different timings.
  • the search result data 24d will be described in the description of the operation of the engineering tool 2.
  • the CPU 21 executes the engineering tool program stored in the storage unit 24. Thereby, the engineering tool part 21a including the project data creation part 21a1 and the program diagnosis part 21a2 is realized.
  • the project data creation unit 21a1 creates project data 24a and transmits it to the control device 3.
  • FIG. 9 is a diagram showing a project data creation screen of the engineering tool according to the first embodiment.
  • the project data creation unit 21a1 displays the project data creation screen 30 on the display unit 26.
  • the project data creation screen 30 has a control program creation field 30a.
  • a MAIN program 24a1a is created in the control program creation field 30a.
  • the MAIN program 24a1a includes lines 41, 42, 43, 44, 45 and 46.
  • the line 41 includes a conditional instruction 41a and an operation instruction 41b.
  • the conditional instruction 41a is “LD M0”.
  • M0 is a variable.
  • the combination of the letter “M” and a numerical value represents a bit type variable.
  • the operation command 41b is “INC D0”. Among these, “D0” is a variable. In the first embodiment, the combination of the letter “D” and the numerical value represents a word type variable.
  • the “INC” (increment) instruction is an instruction for incrementing the first argument by one. That is, the operation command 41b is a command for incrementing the variable “D0” by one.
  • the line 42 includes a condition command 42a and an operation command 42b.
  • the conditional instruction 42a is “LD M100”. Among these, “M100” is a variable.
  • the operation command 42b is “MOV D0 D10”.
  • “D10” is a variable.
  • the “MOV” instruction is an instruction for transferring the value of the first argument to the second argument. That is, the operation instruction 42b is an instruction for transferring the value of the variable “D0” to the variable “D10”.
  • the line 43 includes a conditional instruction 43a and an operation instruction 43b.
  • the condition instruction 43a is “LD M200”. Among these, “M200” is a variable.
  • the operation command 43b is “OUT Y0”.
  • “Y0” is a variable.
  • the combination of the letter “Y” and a numerical value represents a bit type variable. That is, the operation command 43b is a command for turning on the variable “Y0”.
  • the line 44 includes a condition command 44a and an operation command 44b.
  • the operation command 44b is “MOV K15 D20”. Among these, “K15” is a constant “15”, and “D20” is a variable. That is, the operation command 44b is a command for transferring the constant “15” to the variable “D20”.
  • the line 45 includes a conditional instruction 45a and an operation instruction 45b.
  • the conditional instruction 45a is an OR (logical sum) of “LD M10”, “LD M11”, and “LD M12”.
  • “M10”, “M11”, and “M12” are variables. That is, the conditional instruction 45a is an instruction for determining the logical sum of the value of the variable “M10”, the value of the variable “M11”, and the value of the variable “M12”.
  • the operation command 45b is “MOV D20 D30”.
  • “D30” is a variable. That is, the operation instruction 45b is an instruction for transferring the value of the variable “D20” to the variable “D30”.
  • Line 46 is an end command.
  • the program diagnosis unit 21a2 includes a variable setting unit 21a2a for setting a target variable.
  • the variable setting unit 21a2a can receive a variable input by the user to the input unit 25 and set it as a target variable. Further, the variable setting unit 21a2a can receive a variable in which a problem has occurred from the control device 3 and set it as a target variable.
  • the program diagnosis unit 21a2 searches the control program 24a1 for an operation command that may change the value of the target variable, collates the searched operation command with the command specification data 24b, and sets the target variable name. And an operation search unit 21a2b that writes the instruction name, instruction type, and processing content of the searched operation instruction in the search result data 24d.
  • the program diagnosis unit 21a2 searches the control program 24a1 for a condition command for determining a condition for executing the operation command searched by the operation search unit 21a2b, and compares the searched condition command with the command specification data 24b. ,
  • the variable name of the argument of the searched conditional instruction, the instruction name of the searched conditional instruction, the type of instruction, and the contents of the process are written in the search result data 24d, and the argument of the searched conditional instruction is set to the new target It includes a condition search unit 21a2c that is set to a variable.
  • the program diagnosis unit 21a2 includes a search determination unit 21a2d that causes the operation search unit 21a2b and the condition search unit 21a2c to execute the search again.
  • the program diagnosis unit 21a2 includes a list display unit 21a2e that displays a list of contents of the search result data 24d.
  • the program diagnosis unit 21a2 scans the memory 3a2 of the control device 3 at a predetermined timing, thereby acquiring values of all variables used in the control program 24a1, and writing the scan unit 21a2f to the execution data 24e. Including.
  • the predetermined timing is exemplified as follows.
  • the first example is every certain time.
  • the fixed time is exemplified by 1 second.
  • the values of all the variables are accumulated in the execution data 24e every certain time.
  • a second example is when a notification indicating that a problem has occurred has been received from the control device 3.
  • the values of all variables when a problem occurs in the control device 3 are accumulated in the execution data 24e.
  • the third example is when the user inputs an instruction to execute scanning to the input unit 25. As a result, the values of all variables at the timing desired by the user are accumulated in the execution data 24e.
  • FIG. 10 is a flowchart showing processing of the engineering tool according to the first embodiment.
  • the scanning unit 21a2f executes the process shown in FIG. 10 at a predetermined timing.
  • step S10 the scan unit 21a2f scans the memory 3a2 of the control device 3 to obtain the values of all variables used in the control program 24a1.
  • step S12 the scan unit 21a2f writes the values of all variables acquired in step S10 into the execution data 24e, and ends the process.
  • the program diagnosis unit 21a2 includes a simulation unit 21a2g that calculates the values of all variables used in the control program 24a1 by executing the simulation of the control program 24a1, and writes the values in the execution data 24e.
  • the program diagnosis unit 21a2 can diagnose the problem of the control program 24a1 without operating the control device 3.
  • FIG. 11 is a flowchart showing processing of the engineering tool according to the first embodiment.
  • the simulation unit 21a2g executes the process shown in FIG. 11 when the user inputs an instruction to execute the simulation to the input unit 25.
  • the simulation unit 21a2g calculates the values of all variables used in the control program 24a1 by executing the simulation of the control program 24a1 in step S20.
  • step S22 the simulation unit 21a2g writes the values of all variables calculated in step S20 into the execution data 24e, and ends the process.
  • FIG. 12 is a flowchart showing processing of the engineering tool according to the first embodiment.
  • the variable setting unit 21a2a sets a target variable in step S100.
  • FIG. 13 is a diagram showing a program diagnosis screen of the engineering tool according to the first embodiment.
  • the variable setting unit 21a2a displays the program diagnosis screen 70 on the display unit 26.
  • the program diagnosis screen 70 has a variable setting column 71.
  • the variable “D20” is set as the target variable 72 in the variable setting column 71.
  • the variable setting unit 21a2a can receive a variable input by the user to the input unit 25 and set it as the target variable 72. Further, the variable setting unit 21a2a can receive the variable in which the problem has occurred from the control device 3 and set it as the target variable 72.
  • step S102 the motion search unit 21a2b searches the control program 24a1 for a motion command in which the target variable 72 is described as an argument.
  • the operation retrieval unit 21a2b can retrieve an operation instruction from the control program 24a1 by acquiring the instruction type of the instruction by comparing the instruction in the control program 24a1 with the instruction specification data 24b.
  • FIG. 14 is a diagram for explaining the search process of the engineering tool according to the first embodiment.
  • the values described in the lower part of each variable are values of each variable at a certain timing, and are values accumulated in the execution data 24e.
  • the program diagnosis unit 21a2 uses the values of all the variables scanned when receiving a notification from the control device 3 that a problem has occurred, the program diagnosis unit 21a2 Based on the value of the variable, the control program 24a1 can be diagnosed. Thereby, the program diagnosis part 21a2 can diagnose the problem of the control program 24a1 at the timing when the problem occurs in the control device 3.
  • the program diagnosis unit 21a2 may The control program 24a1 can be diagnosed on the basis of the values of all variables at the timing. Thereby, the program diagnosis part 21a2 can diagnose the problem of the control program 24a1 at the timing before the time when the problem occurs in the control device 3.
  • variable “D20” set in the target variable 72 is described in the second argument 44b1 of the operation command 44b.
  • step S102 the motion search unit 21a2b finds out that the variable “D20” set in the target variable 72 is described in the second argument 44b1 of the motion command 44b. Then, the motion search unit 21a2b acquires the command type “motion” of the command name “MOV” by collating the command name “MOV” of the motion command 44b with the command specification data 24b. Therefore, the motion search unit 21a2b can search for the motion command 44b from the control program 24a1.
  • motion search unit 21a2b may obtain the motion command by graphically analyzing the control program 24a1 instead of collating the command name with the command specification data 24b.
  • the operation search unit 21a2b has two instructions when two instructions are described in one line, such as lines 41, 42, 43, and 44 of the control program 24a1 shown in FIG.
  • the instruction on the right side, that is, the downstream side of the control program 24a1 may be acquired as the operation instruction.
  • the operation search unit 21a2b first connects a plurality of instructions to a wired OR connection.
  • the point 45a1 that has been set is found.
  • the motion search unit 21a2b may acquire the command 45b on the right side of the point 45a1, that is, on the downstream side of the control program 24a1, as the motion command.
  • the motion search unit 21a2b can search for the motion command from the control program 24a1 without collating the command name with the command specification data 24b.
  • step S104 the motion search unit 21a2b searches for a motion command in which the value of the target variable may change among the motion commands searched in step S102.
  • variable “D20” set in the target variable 72 is described in the second argument 44b1 of the operation command 44b.
  • the instruction name “MOV” of the operation instruction 44b is an instruction that transfers the value of the first argument to the second argument.
  • step S104 the motion search unit 21a2b can search the control program 24a1 for the motion command 44b in which the value of the variable “D20” set in the target variable 72 may change.
  • step S106 the motion search unit 21a2b collates the motion command searched in step S104 with the command specification data 24b, and writes information based on the search result in step S104 into the search result data 24d.
  • the motion search unit 21a2b creates a row 61 in step S106. Then, the motion search unit 21a2b writes the variable name “D20”, the command name “MOV”, and the command type “motion” in the items 24d1, 24d2, and 24d3 in the row 61.
  • the motion search unit 21a2b collates the motion command 44b retrieved in step S104 with the explanatory text item 24b3 of the command specification data 24b.
  • the first argument of the operation instruction 44b is a constant “K15”, and the second argument is a variable “D20”. Therefore, the motion search unit 21a2b creates an explanatory note “K15 is transferred to D20” and writes it in the item 24d4 of the row 61.
  • the motion search unit 21a2b writes the program name “MAIN” including the motion command 44b in the item 24d5 in the row 61.
  • the operation command 44b is the 11th step of the MAIN program 24a1a. Therefore, the operation command unit 21a2b writes the step number “11” in the item 24d6 of the row 61.
  • the condition search unit 21a2c searches the control program 24a1 for a condition command for determining a condition for executing the motion command searched by the motion search unit 21a2b.
  • the condition retrieval unit 21a2c can retrieve a condition instruction from the control program 24a1 by acquiring the instruction type of the instruction by comparing the instruction in the control program 24a1 with the instruction specification data 24b.
  • the search result by the condition search unit 21a2c may have a plurality of locations.
  • condition search unit 21a2c may acquire an operation command by analyzing the control program 24a1 graphically instead of collating the command name with the command specification data 24b.
  • condition search unit 21a2c performs two instructions when two instructions are described in one line as in lines 41, 42, 43, and 44 of the control program 24a1 shown in FIG.
  • the instruction on the left side, that is, the upstream side of the control program 24a1 may be acquired as an operation instruction.
  • the operation search unit 21a2b first connects a plurality of instructions to a wired OR connection. The point 45a1 that has been set is found. Then, the motion search unit 21a2b may acquire the command 45a on the left side of the point 45a1, that is, on the upstream side of the control program 24a1, as the motion command.
  • condition retrieval unit 21a2c can retrieve the condition instruction from the control program 24a1 without collating the instruction name with the instruction specification data 24b.
  • conditional instruction 44a is described on the left side of the operation instruction 44b, that is, on the upstream side of the MAIN program 24a1a.
  • step S108 the condition search unit 21a2c can search the control program 24a1 for the condition command 44a for determining the condition for executing the operation command 44b.
  • step S110 the condition search unit 21a2c collates the condition instruction searched in step S108 with the instruction specification data 24b, and obtains information based on the search result in step S108 as search result data 24d. Write to.
  • condition search unit 21a2c collates the condition command 44a searched in step S108 with the explanatory text item 24b3 of the command specification data 24b.
  • the first argument of the conditional instruction 44a is a variable “D10”, and the second argument is a constant “K10000”. Therefore, the condition search unit 21a2c creates an explanatory note “D10 is equal to K10000” and writes it in the item 24d4 of the line 62.
  • condition search unit 21a2c writes the program name “MAIN” including the condition command 44a in the item 24d5 of the line 62.
  • conditional instruction 44a is the eighth step of the MAIN program 24a1a. Therefore, the condition command part 21a2c writes the step number “8” in the item 24d6 of the line 62.
  • step S112 the condition search unit 21a2c sets the argument of the condition instruction searched in step S110 as a new target variable 72.
  • condition search unit 21a2c There may be a plurality of new target variables 72 set by the condition search unit 21a2c.
  • the condition search unit 21a2c does not set a new target variable 72 when the control program 24a1 cannot be traced further.
  • FIG. 15 is a diagram for explaining the search process of the engineering tool according to the first embodiment.
  • conditional instruction 44a includes a first argument 44a1 “D10” and a second argument “K10000”.
  • the second argument “K10000” is a constant and not a variable. Therefore, the condition search unit 21a2c sets the first argument 44a1 “D10” to the new target variable 72 in step S112.
  • the search determination unit 21a2d determines whether or not the search end condition is satisfied in step S114.
  • the search termination condition is exemplified as follows.
  • the first example is a case where a new target variable 72 is not set in step S112. That is, it is a case where the control program 24a1 cannot be traced further.
  • a second example is a case where the number of repetitions of the search from step S102 to step S112 by the action search unit 21a2b and the condition search unit 21a2c reaches the number described in the search count data 24c1.
  • the program diagnosis unit 21a2 can prevent the search from being finished and can ensure that the search is stopped, that is, it is possible to ensure the stop of the search.
  • the program diagnosis unit 21a2 can limit the search range even when the scale of the control program 24a1 is large, so that it is possible to reduce the man-hours for identifying the cause of the problem of the control program 24a1.
  • a third example is a case where the new target variable 72 set in step S112 by the condition search unit 21a2c is outside the range of the step number described in the search range data 24c2.
  • the program diagnosis unit 21a2 has an effect of ensuring search stoppage.
  • the program diagnosis unit 21a2 can limit the search range even when the scale of the control program 24a1 is large, so that it is possible to reduce the man-hours for identifying the cause of the problem of the control program 24a1.
  • the search determination unit 21a2d can determine an OR (logical sum) of a plurality of search end conditions.
  • step S114 determines in step S114 that the search condition is not satisfied (No) If the search determination unit 21a2d determines in step S114 that the search condition is not satisfied (No), the process proceeds to step S102.
  • FIG. 16 is a diagram for explaining the search process of the engineering tool according to the first embodiment.
  • the operation command 42b includes a first argument “D0” and a second argument 42b1 “D10”.
  • step S102 and step S104 the motion search unit 21a2b finds out that the variable “D10” set in the target variable 72 is described in the second argument 42b1 of the motion command 42b. Then, the motion search unit 21a2b acquires the command type “motion” of the command name “MOV” by collating the command name “MOV” of the motion command 42b with the command specification data 24b. Accordingly, the motion search unit 21a2b can search the control program 24a1 for the motion command 42b.
  • the motion search unit 21a2b creates a row 63 in step S106. Then, the motion search unit 21a2b writes the variable name “D0”, the command name “MOV”, and the command type “motion” in the items 24d1, 24d2, and 24d3 in the row 63.
  • the motion search unit 21a2b collates the motion command 42b retrieved in step S104 with the explanatory text item 24b3 of the command specification data 24b.
  • the first argument of the operation instruction 42b is a variable “D0”, and the second argument is a variable “D10”. Therefore, the motion search unit 21a2b creates an explanatory note “D0 is transferred to D10” and writes it in the item 24d4 of the row 63.
  • the motion search unit 21a2b writes the program name “MAIN” including the motion command 42b in the item 24d5 in the row 63.
  • the operation command 42b is the fourth step of the MAIN program 24a1a. Accordingly, the operation command unit 21a2b writes the step number “4” in the item 24d6 of the row 63.
  • conditional instruction 42a is described on the left side of the operation instruction 42b, that is, on the upstream side of the MAIN program 24a1a.
  • step S108 the condition search unit 21a2c can search the control program 24a1 for a condition command 42a for determining a condition for executing the operation command 42b.
  • step S110 the condition search unit 21a2c collates the condition instruction searched in step S108 with the instruction specification data 24b, and writes information based on the search result in step S108 into the search result data 24d.
  • condition search unit 21a2c creates a row 64 in step S110. Then, the condition search unit 21a2c writes the variable name “M100”, the instruction name “LD”, and the instruction type “condition” in the items 24d1, 24d2, and 24d3 in the row 64.
  • condition search unit 21a2c collates the condition command 42a searched in step S108 with the explanatory text item 24b3 of the command specification data 24b.
  • the first argument of the conditional instruction 42a is a variable “M100”. Therefore, the condition search unit 21a2c creates an explanatory note “M100 is ON” and writes it in the item 24d4 in the row 64.
  • condition search unit 21a2c writes the program name “MAIN” including the condition instruction 42a in the item 24d5 in the row 64.
  • the conditional instruction 42a is the third step of the MAIN program 24a1a. Therefore, the condition command part 21a2c writes the step number “3” in the item 24d6 of the row 64.
  • condition search unit 21a2c sets the first argument “M100” to the new target variable 72 in step S112.
  • step S114 determines in step S114 that the search condition is satisfied (Yes)
  • the process proceeds to step S116.
  • the search determination unit 21a2d determines that the search condition is satisfied in step S114 (Yes), and advances the process to step S116.
  • the list display unit 21a2e displays the contents of the search result data 24d as a list on the display unit 26 in step S116.
  • FIG. 17 is a diagram showing a program diagnosis screen of the engineering tool according to the first embodiment.
  • the list display unit 21a2e displays a list of the contents of the search result data 24d in the list display field 80 of the program diagnosis screen 70.
  • the list display field 80 includes a program name item 81, a step number item 82, a variable name item 83, a command name item 84, a command type item 85, and an explanatory text item 86. .
  • the list display unit 21a2e displays the contents of the rows 61, 62, 63, and 64 of the search result data 24d in the rows 91, 92, 93, and 94, respectively.
  • the program diagnosis unit 21a2 displays not only the contents of the instruction causing the problem displayed in the line 94 and the contents of the instruction causing the problem displayed in the line 91, but also the line
  • the contents of the instructions related to the instruction causing the problem and the instruction causing the problem displayed in the line 93 and the line 92 can also be displayed in a list.
  • the program diagnosis unit 21a2 has an effect that the user can easily grasp the whole image between the instruction that caused the problem and the instruction that caused the problem.
  • FIG. 18 is a flowchart showing processing of the engineering tool according to the first embodiment.
  • the list display unit 21a2e displays the command 44b, 44a, 42b, or 42a corresponding to the step number in the item 82a of the selected line.
  • the program diagnostic unit 21a2 has an effect that the user can immediately confirm a desired command.
  • the list display column 80 inputs a filter condition input column 81a for inputting a filter condition for a program name, a filter condition input column 82a for inputting a filter condition for a step number, and a filter condition for a variable name.
  • Filter condition input field 83a for inputting Filter condition input field 84a for inputting the filter condition of the instruction name
  • Filter condition input field 85a for inputting the filter condition of the instruction type
  • the filter condition of the explanatory text A filter condition input field 86a.
  • FIG. 19 is a flowchart showing processing of the engineering tool according to the first embodiment.
  • the list display unit 21a2e When an instruction name is input to the filter condition input field 84a in step S202, the list display unit 21a2e lists lines that match the filter condition input in the lines 91, 92, 93, and 94 of the search result data 24d. indicate. For example, when “MOV” is input to the filter condition input field 84a, the list display unit 21a2e displays only the lines 91 and 93.
  • the program diagnosis unit 21a2 has an effect that the user can reduce the man-hours for specifying the cause of the problem by narrowing down the commands related to the problem.
  • the operation search unit 21a2b can acquire the instruction type “operation” of the instruction name by collating the instruction name with the instruction specification data 24b.
  • the operation search unit 21a2b can search the operation program from the control program 24a1.
  • condition search unit 21a2c can acquire the instruction type “condition” of the instruction name by collating the instruction name with the instruction specification data 24b.
  • condition retrieval unit 21a2c can retrieve the condition instruction from the control program 24a1.
  • the storage unit 24 stores search end condition data 24c in which a search end condition executed for the control program 24a1 is described.
  • the search determination unit 21a2d determines that the search satisfies the end condition, the search determination unit 21a2d ends the search by the operation search unit 21a2b and the condition search unit 21a2c.
  • the program diagnosis unit 21a2 has an effect of ensuring search stoppage.
  • the search determination unit 21a2d can limit the search range even when the scale of the control program 24a1 is large. Therefore, the program diagnosis unit 21a2 has an effect of suppressing the man-hour for specifying the cause of the problem of the control program 24a1.
  • the storage unit 24 stores execution data 24e in which values at predetermined timings of all variables used in the control program 24a1 are accumulated.
  • the scan unit 21a2f scans the memory 3a2 of the control device 3 at a predetermined timing, thereby acquiring the values of all variables used in the control program 24a1 and writing them in the execution data 24e.
  • the program diagnosis unit 21a2 uses the values of all the variables scanned when it receives notification from the control device 3 that a problem has occurred, the timing at which the problem occurs in the control device 3.
  • the control program 24a1 can be diagnosed based on the values of all the variables.
  • the program diagnosis part 21a2 can diagnose the problem of the control program 24a1 at the timing when the problem occurs in the control device 3.
  • the program diagnosis unit 21a2 uses the values of all variables before the time when the notification that the problem has occurred from the control device 3 is received for the search, the program diagnosis unit 21a2
  • the control program 24a1 can be diagnosed based on the values of all variables at earlier timings. Thereby, the program diagnosis part 21a2 can diagnose the problem of the control program 24a1 at the timing before the time when the problem occurs in the control device 3.
  • the simulation unit 21a2g calculates the values of all variables used in the control program 24a1 by executing the simulation of the control program 24a1, and writes the values in the execution data 24e.
  • the program diagnosis unit 21a2 can diagnose the problem of the control program 24a1 without operating the control device 3.
  • the configuration described in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and can be combined with other configurations without departing from the gist of the present invention. It is also possible to omit or change the part.
  • control system 2 engineering tool, 3 control device, 4, 5 machine, 21 CPU, 21a1, project data creation unit, 21a2 program diagnosis unit, 21a2a variable setting unit, 21a2b operation search unit, 21a2c condition search unit, 21a2d search determination unit 21a2e list display section, 21a2f scan section, 21a2g simulation section, 24 storage section, 24a project data, 24a1 control program, 24b instruction specification data, 24c search end condition data, 24d search result data, 24e execution data.

Abstract

動作命令及び条件命令を含む制御プログラムと、命令の命令名、命令の種別及び命令の処理の内容を含む命令仕様データと、制御プログラムに対して実行される検索の結果が蓄積される検索結果データと、を記憶する記憶部と、ターゲットの変数を設定する変数設定部と、ターゲットの変数の値が変化する可能性がある動作命令を検索して、ターゲットの変数名、並びに、検索された動作命令の命令名、命令の種別及び処理の内容を検索結果データに書き込む動作検索部と、動作命令を実行する条件を判定する条件命令を検索して、検索された条件命令の引数の変数名、並びに、条件命令の命令名、命令の種別及び処理の内容を検索結果データに書き込み、条件命令の引数を新たなターゲットの変数に設定する条件検索部と、動作検索部及び条件検索部に検索を再度実行させる検索判定部と、検索結果データの内容を一覧表示する一覧表示部と、を備える。

Description

プログラム診断装置、プログラム診断方法及びプログラム診断プログラム
 本発明は、制御プログラムを診断するプログラム診断装置、プログラム診断方法及びプログラム診断プログラムに関する。
 FA(Factory Automation)分野で機械を制御する制御システムでは、制御プログラムはプログラム言語で記述される。プログラム言語は、ラダー(Ladder、LD)言語又はストラクチャードテキスト(Structured Text、ST)言語(IEC 61131-3、JIS B 3503:2012)が例示される。
 制御プログラムは、命令及び変数を含む。制御プログラム内のある変数の値が、想定している値と異なった場合に、その原因を調査するためには、以下の操作が手動で行われていた。
 第1の操作は、制御プログラムを遡り、ターゲットの変数の値を変化させる可能性がある箇所及び条件を調べる操作である。
 第2の操作は、制御プログラムをシミュレーション実行し、第1の操作で調べた箇所で条件が満たされることを再現する操作である。
 第3の操作は、更に制御プログラムを遡り、第2の操作で再現した条件を満たす箇所及び条件を調べる操作である。
 以降、第2の操作及び第3の操作を繰り返し、根本となる原因を探していた。
 しかし、手動で制御プログラムを遡って調べていくことは、時間及び労力が掛かるので、変数の値が想定している値と異なったことの原因の特定は困難であった。
 関連する技術として、下記の特許文献1には、出力信号が異常接点であると検知された場合、該出力信号からラダープログラムを前のステップに戻って行き、1つ1つの接点状態を確認しながら不具合接点を特定するカバレッジ診断を行う、ラダープログラム診断方法が記載されている(段落0053)。
 また、下記の特許文献2には、出力命令部の異常を検索キーとして、この値を操作可能な出力命令部を含んだブロックをラダープログラム内の全ブロック中から発見する第1の過程と、第1の過程において探し出されたブロックの条件命令部の論理演算を行い、この条件命令部の論理演算結果に対応するこのブロックの出力命令部の状態を判定し、このブロックが上記異常な出力命令部の状態を真に操作しているか否かの正当性判定を行う第2の過程と、第2の過程においてブロックが正当な場合に、このブロックの条件命令部の中からその出力命令部の状態を操作可能なリレーをすべて探す第3の過程と、第3の過程で探し出されたリレーを次の検索キーとして第1,第2及び第3の過程を繰り返す第4の過程と、第1の過程において該当するブロックが見つからなかった場合に、その旨の結果を出力すると共に、第3の過程において該当するリレーが見つからなかった場合にその条件命令部内のリレーを異常原因とする結果を出力する第5の過程と、を有するラダーシーケンス方式のプログラムにおける異常の原因箇所究明方法が記載されている(第4頁から第5頁)。
 また、下記の特許文献3には、シーケンス図取得部が動作状態のシーケンス図を取得し、選択部が動作シーケンス図の中の所望するシンボルを選択することによって、そのシンボルに関連する上流の接続線を接続線検索部が芋づる式に検索し、動作状態の出力の有無を容易に得ることができると共に、動作状態が変化しても、そのデータを読み込んで不良部分の検索を順次行うことができるシーケンス図モニターが記載されている(要約書)。
特開2001-67122号公報 特開平3-108005号公報 特開平9-305207号公報
 しかしながら、特許文献1から3に記載の技術では、ユーザは、問題の原因となった接点を知ることはできるが、問題の原因となった接点から問題が発生した接点までの間の命令を知ることができない。従って、ユーザが問題の全体像を把握することは、困難であった。
 本発明は、上記に鑑みてなされたものであって、ユーザが問題の全体像を把握することを容易にすることができるプログラム診断装置を得ることを目的とする。
 上述した課題を解決し、目的を達成するために、本発明は、引数の値を変化させる動作命令及び動作命令を実行する条件を判定する条件命令を含む制御プログラムと、制御プログラムで記述され得る命令の命令名、動作命令又は条件命令の種別、並びに、命令の処理の内容を含む命令仕様データと、制御プログラムに対して実行される検索の結果が蓄積される検索結果データと、を記憶する記憶部を備える。本発明は、ターゲットの変数を設定する変数設定部と、ターゲットの変数の値が変化する可能性がある動作命令を制御プログラムの中から検索して、検索された動作命令と命令仕様データとを照合し、ターゲットの変数名、並びに、検索された動作命令の命令名、命令の種別及び処理の内容を検索結果データに書き込む動作検索部と、動作検索部で検索された動作命令を実行する条件を判定する条件命令を制御プログラムの中から検索して、検索された条件命令と命令仕様データとを照合し、検索された条件命令の引数の変数名、並びに、検索された条件命令の命令名、命令の種別及び処理の内容を検索結果データに書き込み、検索された条件命令の引数を新たなターゲットの変数に設定する条件検索部と、動作検索部及び条件検索部に検索を再度実行させる検索判定部と、検索結果データの内容を一覧表示する一覧表示部と、を備える。
 本発明にかかるプログラム診断装置は、ユーザが問題の全体像を把握することを容易にすることができるという効果を奏する。
実施の形態1にかかる制御システムの構成を示す図 実施の形態1にかかる制御装置のハードウェア構成を示す図 実施の形態1にかかるエンジニアリングツールのハードウェア構成を示す図 実施の形態1にかかるエンジニアリングツールの機能ブロックを示す図 実施の形態1にかかるエンジニアリングツールの命令仕様データを示す図 実施の形態1にかかるエンジニアリングツールの検索回数データを示す図 実施の形態1にかかるエンジニアリングツールの検索範囲データを示す図 実施の形態1にかかるエンジニアリングツールの検索結果データを示す図 実施の形態1にかかるエンジニアリングツールのプロジェクトデータ作成画面を示す図 実施の形態1にかかるエンジニアリングツールの処理を示すフローチャート 実施の形態1にかかるエンジニアリングツールの処理を示すフローチャート 実施の形態1にかかるエンジニアリングツールの処理を示すフローチャート 実施の形態1にかかるエンジニアリングツールのプログラム診断画面を示す図 実施の形態1にかかるエンジニアリングツールの検索処理を説明する図 実施の形態1にかかるエンジニアリングツールの検索処理を説明する図 実施の形態1にかかるエンジニアリングツールの検索処理を説明する図 実施の形態1にかかるエンジニアリングツールのプログラム診断画面を示す図 実施の形態1にかかるエンジニアリングツールの処理を示すフローチャート 実施の形態1にかかるエンジニアリングツールの処理を示すフローチャート
 以下に、本発明の実施の形態にかかるプログラム診断装置、プログラム診断方法及びプログラム診断プログラムを図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。
実施の形態1.
 図1は、本発明の実施の形態1にかかる制御システムの構成を示す図である。制御システム1は、エンジニアリングツール2と、制御装置3と、機械4及び5と、を含む。
 エンジニアリングツール2は、制御装置3で実行される制御プログラムを含むプロジェクトデータを作成して、制御装置3に送信する。制御装置3は、プロジェクトデータに含まれる制御プログラムを実行することにより、機械4及び5を制御する。制御装置3は、プログラマブルコントローラ(JIS B 3502:2011、programmable controllers(PLC))が例示される。
 図2は、実施の形態1にかかる制御装置のハードウェア構成を示す図である。制御装置3は、メイン基板3aと、サブ基板3b及び3cと、を含む。
 メイン基板3aは、CPU(Central Processing Unit)3a1と、RAM(Random Access Memory)であるメモリ3a2と、通信インタフェース3a3と、バスインタフェース3a4と、記憶部3a5と、を含む。CPU3a1、メモリ3a2、通信インタフェース3a3、バスインタフェース3a4及び記憶部3a5は、内部バスB1を介して接続されている。
 通信インタフェース3a3は、エンジニアリングツール2と通信を行う。
 バスインタフェース3a4は、内部バスB1と拡張バスB2とを連絡するバスブリッジ回路である。サブ基板3b及び3cは、拡張バスB2を介して、メイン基板3aに接続されている。サブ基板3bは、機械4に接続されている。サブ基板3cは、機械5に接続されている。
 記憶部3a5は、エンジニアリングツール2から受信したプロジェクトデータ24aを記憶する。記憶部3a5は、SSD(Solid State Drive)又はHDD(Hard Disk Drive)が例示される。
 プロジェクトデータ24aは、引数の値を変化させる動作命令及び動作命令を実行する条件を判定する条件命令を含む制御プログラム24a1と、制御プログラム24a1の実行時に参照される制御パラメータ24a2と、メモリ3a2内の作業領域を規定するデバイスメモリ24a3と、サブ基板3bと機械4との接続関係及びサブ基板3cと機械5との接続関係を規定する接続情報24a4と、を含む。
 制御プログラム24a1は、MAIN(メイン)プログラム24a1aと、SUB(サブ)プログラム24a1bと、を含む。実施の形態1では、制御プログラム24a1は、ラダー言語で記述されているものとするが、これに限定されない。制御プログラム24a1が記述される他の言語は、ストラクチャードテキスト言語が例示される。
 メモリ3a2内には、デバイスメモリ24a3で規定される複数のデバイスが確保される。実施の形態1では、メモリ3a2内の複数のデバイスの各々は、制御プログラム24a1の変数に対応する。
 図3は、実施の形態1にかかるエンジニアリングツールのハードウェア構成を示す図である。実施の形態1にかかるエンジニアリングツール2は、コンピュータを利用して実現可能である。コンピュータは、CPU21と、RAM22と、ROM(Read Only Memory)23と、記憶部24と、入力部25と、表示部26と、通信インタフェース27と、を含む。CPU21、RAM22、ROM23、記憶部24、入力部25、表示部26及び通信インタフェース27は、バスBを介して接続されている。
 CPU21は、RAM22を作業領域として使用しながら、ROM23及び記憶部24に記憶されているプログラムを実行する。ROM23に記憶されているプログラムは、BIOS(Basic Input/Output System)又はUEFI(Unified Extensible Firmware Interface)が例示される。記憶部24に記憶されているプログラムは、オペレーティングシステムプログラム及びエンジニアリングツールプログラムが例示される。記憶部24は、SSD又はHDDが例示される。
 入力部25は、ユーザからの操作入力を受け付ける。入力部25は、キーボード又はマウスが例示される。表示部26は、文字及び画像を表示する。表示部26は、液晶表示装置が例示される。通信インタフェース27は、制御装置3と通信を行う。
 図4は、実施の形態1にかかるエンジニアリングツールの機能ブロックを示す図である。記憶部24は、プロジェクトデータ24aを記憶する。
 プロジェクトデータ24aは、引数の値を変化させる動作命令及び動作命令を実行する条件を判定する条件命令を含む制御プログラム24a1と、制御プログラム24a1の実行時に参照される制御パラメータ24a2と、制御装置3のメモリ3a2内の作業領域を規定するデバイスメモリ24a3と、制御装置3のサブ基板3bと機械4との接続関係及び制御装置3のサブ基板3cと機械5との接続関係を規定する接続情報24a4と、を含む。
 記憶部24は、制御プログラム24a1で記述され得る全ての命令の命令名、動作命令又は条件命令の種別並びに命令の処理の内容を含む命令仕様データ24bを記憶する。
 実施の形態1では、制御プログラム24a1は、ラダー言語で記述されている。従って、命令仕様データ24bは、ラダー言語の全ての命令の命令名、動作命令又は条件命令の種別並びに命令の処理の内容を含む。
 図5は、実施の形態1にかかるエンジニアリングツールの命令仕様データを示す図である。命令仕様データ24bは、命令名の項目24b1と、命令種別の項目24b2と、説明文の項目24b3と、備考の項目24b4と、を含む。
 命令仕様データ24bの行51は、「LD」(ロード)命令に関する情報を含む。行51の命令名の項目には、命令名「LD」が記述されている。行51の命令種別の項目には、LD命令が条件命令であるので、命令種別「条件」が記述されている。
 行51の説明文の項目には、「LD」命令の動作の説明が記述されている。「LD」命令は第1引数がON(オン)しているか否かを判定する命令であるので、行51の説明文の項目には、説明文「#1がONしている」が記述されている。
 行51の備考の項目には、「LD」命令の第1引数のデータ型が記述されている。「LD」命令の第1引数はビット型であるので、行51の備考の項目には、備考「ビット変数」が記述されている。
 命令仕様データ24bの行52は、「OUT」(アウト)命令に関する情報を含む。行52の命令名の項目には、命令名「OUT」が記述されている。行52の命令種別の項目には、OUT命令が動作命令であるので、命令種別「動作」が記述されている。
 行52の説明文の項目には、「OUT」命令の動作の説明が記述されている。「OUT」命令は第1引数をON(オン)する命令であるので、行52の説明文の項目には、説明文「#1をONする」が記述されている。
 行52の備考の項目には、「OUT」命令の第1引数のデータ型が記述されている。「OUT」命令の第1引数はビット型であるので、行52の備考の項目には、備考「ビット変数」が記述されている。
 命令仕様データ24bの行53は、「=」(イコール)命令に関する情報を含む。行53の命令名の項目には、命令名「=」が記述されている。行53の命令種別の項目には、「=」命令が条件命令であるので、命令種別「条件」が記述されている。
 行53の説明文の項目には、「=」命令の動作の説明が記述されている。「=」命令は第1引数と第2引数とが等しいか否かを判定する命令であるので、行53の説明文の項目には、説明文「#1が#2と等しい」が記述されている。
 行53の備考の項目には、「=」命令の第1引数及び第2引数のデータ型が記述されている。「=」命令の第1引数及び第2引数はワード型であるので、行53の備考の項目には、備考「ワード変数」が記述されている。
 命令仕様データ24bの行54は、「MOV」(ムーブ)命令に関する情報を含む。行54の命令名の項目には、命令名「MOV」が記述されている。行54の命令種別の項目には、「MOV」命令が条件命令であるので、命令種別「動作」が記述されている。
 行54の説明文の項目には、「MOV」命令の動作の説明が記述されている。「MOV」命令は第1引数の値を第2引数に転送する命令であるので、行54の説明文の項目には、説明文「#1が#2に転送される」が記述されている。
 行54の備考の項目には、「MOV」命令の第1引数及び第2引数のデータ型が記述されている。「MOV」命令の第1引数及び第2引数はワード型であるので、行54の備考の項目には、備考「ワード変数」が記述されている。
 図5では、4つの命令に関する4つの行51,52,53及び54を示した。しかし、実際には、命令仕様データ24bは、ラダー言語で記述される全ての命令に関する複数の行を含む。
 再び図4を参照すると、記憶部24は、制御プログラム24a1に対して実行される検索の終了条件が記述された検索終了条件データ24cを記憶する。検索終了条件データ24cは、検索回数データ24c1と、検索範囲データ24c2と、を含む。
 図6は、実施の形態1にかかるエンジニアリングツールの検索回数データを示す図である。検索回数データ24c1には、「10」が記述されている。これにより、制御プログラム24aに対して実行される検索は、最大10回までで終了する。
 図7は、実施の形態1にかかるエンジニアリングツールの検索範囲データを示す図である。検索範囲データ24c2は、範囲先頭ステップ番号の項目と、範囲末尾ステップ番号の項目と、を含む。範囲先頭ステップ番号の項目には、「1」が記述されている。範囲末尾ステップ番号の項目には、「100」が記述されている。これにより、制御プログラム24a1に対して実行される検索は、ステップ番号1からステップ番号100までの範囲に限られ、この範囲から外れたら終了する。
 再び図4を参照すると、記憶部24は、制御プログラム24a1に対して実行される検索の結果が蓄積される検索結果データ24dを記憶する。
 図8は、実施の形態1にかかるエンジニアリングツールの検索結果データを示す図である。検索結果データ24dは、変数名の項目24d1と、命令名の項目24d2と、命令種別の項目24d3と、説明文の項目24d4と、プログラム名の項目24d5と、ステップ番号の項目24d6と、を含む。
 検索結果データ24dの行61,62,63及び64については、エンジニアリングツール2の動作の説明の中で説明する。
 再び図4を参照すると、記憶部24は、制御プログラム24a1で使用されている全変数の予め定められたタイミングでの値が蓄積される実行データ24eを記憶する。つまり、実行データ24eは、複数の異なるタイミングでの全変数の値が蓄積される。
 検索結果データ24dについては、エンジニアリングツール2の動作の説明の中で説明する。
 CPU21は、記憶部24に記憶されたエンジニアリングツールプログラムを実行する。これにより、プロジェクトデータ作成部21a1及びプログラム診断部21a2を含むエンジニアリングツール部21aが実現される。
 プロジェクトデータ作成部21a1は、プロジェクトデータ24aを作成して、制御装置3に送信する。
 図9は、実施の形態1にかかるエンジニアリングツールのプロジェクトデータ作成画面を示す図である。プロジェクトデータ作成部21a1は、プロジェクトデータ作成画面30を表示部26に表示させる。
 プロジェクトデータ作成画面30は、制御プログラム作成欄30aを有する。図9では、制御プログラム作成欄30a内に、MAINプログラム24a1aが作成されている。
 MAINプログラム24a1aは、行41,42,43,44,45及び46を含む。
 行41は、条件命令41aと、動作命令41bと、を含む。条件命令41aは、「LD M0」である。この中の「M0」は、変数である。実施の形態1において、英字「M」と、数値と、の結合は、ビット型の変数を表す。
 動作命令41bは、「INC D0」である。この中の「D0」は、変数である。実施の形態1において、英字「D」と、数値と、の結合は、ワード型の変数を表す。「INC」(インクリメント)命令は、第1引数を1増加させる命令である。つまり、動作命令41bは、変数「D0」を1増加させる命令である。
 行42は、条件命令42aと、動作命令42bと、を含む。条件命令42aは、「LD M100」である。この中の「M100」は、変数である。
 動作命令42bは、「MOV D0 D10」である。この中の「D10」は、変数である。「MOV」命令は、第1引数の値を第2引数に転送する命令である。つまり、動作命令42bは、変数「D0」の値を変数「D10」に転送する命令である。
 行43は、条件命令43aと、動作命令43bと、を含む。条件命令43aは、「LD M200」である。この中の「M200」は、変数である。
 動作命令43bは、「OUT Y0」である。この中の「Y0」は、変数である。実施の形態1において、英字「Y」と、数値と、の結合は、ビット型の変数を表す。つまり、動作命令43bは、変数「Y0」をONにする命令である。
 行44は、条件命令44aと、動作命令44bと、を含む。条件命令44aは、「= D10 K10000」である。この中の「K10000」は、定数「10000」である。つまり、条件命令44aは、変数「D10」の値と定数「10000」とが等しいか否かを判定する命令である。
 動作命令44bは、「MOV K15 D20」である。この中の「K15」は、定数「15」であり、「D20」は、変数である。つまり、動作命令44bは、定数「15」を変数「D20」に転送する命令である。
 行45は、条件命令45aと、動作命令45bと、を含む。条件命令45aは、「LD M10」と、「LD M11」と、「LD M12」と、のOR(論理和)である。この中の「M10」、「M11」及び「M12」は、変数である。つまり、条件命令45aは、変数「M10」の値と、変数「M11」の値と、変数「M12」の値と、の論理和を判定する命令である。
 動作命令45bは、「MOV D20 D30」である。この中の「D30」は、変数である。つまり、動作命令45bは、変数「D20」の値を変数「D30」に転送する命令である。
 行46は、終了命令である。
 再び図4を参照すると、プログラム診断部21a2は、ターゲットの変数を設定する変数設定部21a2aを含む。変数設定部21a2aは、ユーザが入力部25に入力した変数を受け取って、ターゲットの変数に設定することができる。また、変数設定部21a2aは、問題が発生した変数を制御装置3から受け取って、ターゲットの変数に設定することができる。
 プログラム診断部21a2は、ターゲットの変数の値が変化する可能性がある動作命令を制御プログラム24a1の中から検索して、検索された動作命令と命令仕様データ24bとを照合し、ターゲットの変数名、並びに、検索された動作命令の命令名、命令の種別及び処理の内容を検索結果データ24dに書き込む動作検索部21a2bを含む。
 プログラム診断部21a2は、動作検索部21a2bで検索された動作命令を実行する条件を判定する条件命令を制御プログラム24a1の中から検索して、検索された条件命令と命令仕様データ24bとを照合し、検索された条件命令の引数の変数名、並びに、検索された条件命令の命令名、命令の種別及び処理の内容を検索結果データ24dに書き込み、検索された条件命令の引数を新たなターゲットの変数に設定する条件検索部21a2cを含む。
 プログラム診断部21a2は、動作検索部21a2b及び条件検索部21a2cに検索を再度実行させる検索判定部21a2dを含む。
 プログラム診断部21a2は、検索結果データ24dの内容を一覧表示する一覧表示部21a2eを含む。
 プログラム診断部21a2は、予め定められたタイミングで、制御装置3のメモリ3a2をスキャンすることにより、制御プログラム24a1で使用されている全変数の値を取得し、実行データ24eに書き込むスキャン部21a2fを含む。
 予め定められたタイミングは、以下が例示される。
 第1の例は、一定の時間経過毎である。一定の時間は、1秒が例示される。これにより、実行データ24eには、一定の時間経過毎の全変数の値が蓄積される。
 第2の例は、制御装置3から問題が発生した旨の通知を受信したときである。これにより、実行データ24eには、制御装置3で問題が発生したときの全変数の値が蓄積される。
 第3の例は、ユーザが入力部25にスキャンを実行する旨の指示を入力したときである。これにより、実行データ24eには、ユーザが所望するタイミングでの全変数の値が蓄積される。
 図10は、実施の形態1にかかるエンジニアリングツールの処理を示すフローチャートである。
 スキャン部21a2fは、予め定められたタイミングで、図10に示す処理を実行する。
 スキャン部21a2fは、ステップS10において、制御装置3のメモリ3a2をスキャンすることにより、制御プログラム24a1で使用されている全変数の値を取得する。
 スキャン部21a2fは、ステップS12において、ステップS10で取得した全変数の値を実行データ24eに書き込み、処理を終了する。
 再び図4を参照すると、プログラム診断部21a2は、制御プログラム24a1をシミュレーション実行することにより、制御プログラム24a1で使用されている全変数の値を算出し、実行データ24eに書き込むシミュレーション部21a2gを含む。
 これにより、実行データ24eには、制御装置3を動作させなくても、制御プログラム24a1で使用されている全変数の値が蓄積される。従って、プログラム診断部21a2は、制御装置3を動作させなくても、制御プログラム24a1の問題を診断することができる。
 図11は、実施の形態1にかかるエンジニアリングツールの処理を示すフローチャートである。
 シミュレーション部21a2gは、ユーザが入力部25にシミュレーション実行する旨の指示を入力したら、図11に示す処理を実行する。
 シミュレーション部21a2gは、ステップS20において、制御プログラム24a1をシミュレーション実行することにより、制御プログラム24a1で使用されている全変数の値を算出する。
 シミュレーション部21a2gは、ステップS22において、ステップS20で算出した全変数の値を実行データ24eに書き込み、処理を終了する。
 図12は、実施の形態1にかかるエンジニアリングツールの処理を示すフローチャートである。
 変数設定部21a2aは、ステップS100において、ターゲットの変数を設定する。
 図13は、実施の形態1にかかるエンジニアリングツールのプログラム診断画面を示す図である。変数設定部21a2aは、プログラム診断画面70を表示部26に表示させる。
 プログラム診断画面70は、変数設定欄71を有する。図13では、変数設定欄71内で、変数「D20」がターゲットの変数72に設定されている。
 変数設定部21a2aは、ユーザが入力部25に入力した変数を受け取って、ターゲットの変数72に設定することができる。また、変数設定部21a2aは、問題が発生した変数を制御装置3から受け取って、ターゲットの変数72に設定することができる。
 再び図12を参照すると、動作検索部21a2bは、ステップS102において、ターゲットの変数72が引数に記述されている動作命令を、制御プログラム24a1の中から検索する。
 動作検索部21a2bは、制御プログラム24a1の中の命令と命令仕様データ24bとを照合することで当該命令の命令種別を取得することにより、動作命令を制御プログラム24a1の中から検索することができる。
 動作検索部21a2bによる検索結果は、複数箇所あっても良い。
 図14は、実施の形態1にかかるエンジニアリングツールの検索処理を説明する図である。
 図14において、各変数の下段に記述されている値は、あるタイミングでの各変数の値であり、実行データ24eに蓄積されている値である。
 プログラム診断部21a2は、制御装置3から問題が発生した旨の通知を受信したときにスキャンした全変数の値を検索に使用することとすれば、制御装置3で問題が発生したタイミングでの全変数の値に基づいて、制御プログラム24a1の診断を行うことができる。これにより、プログラム診断部21a2は、制御装置3で問題が発生したタイミングでの、制御プログラム24a1の問題を診断することができる。
 プログラム診断部21a2は、制御装置3から問題が発生した旨の通知を受信したときより前での全変数の値を検索に使用することとすれば、制御装置3で問題が発生したときより前のタイミングでの全変数の値に基づいて、制御プログラム24a1の診断を行うことができる。これにより、プログラム診断部21a2は、制御装置3で問題が発生したときより前のタイミングでの、制御プログラム24a1の問題を診断することができる。
 ターゲットの変数72に設定された変数「D20」は、動作命令44bの第2引数44b1に記述されている。
 動作検索部21a2bは、ステップS102において、ターゲットの変数72に設定された変数「D20」が動作命令44bの第2引数44b1に記述されていることを見つけ出す。そして、動作検索部21a2bは、動作命令44bの命令名「MOV」と命令仕様データ24bとを照合することで、命令名「MOV」の命令種別「動作」を取得する。従って、動作検索部21a2bは、動作命令44bを制御プログラム24a1の中から検索することができる。
 なお、動作検索部21a2bは、命令名と命令仕様データ24bとを照合することに代えて、制御プログラム24a1を図形的に解析することで、動作命令を取得することとしても良い。
 具体的には、動作検索部21a2bは、図9に示す制御プログラム24a1の行41,42,43及び44のように、1つの行に2つの命令が記述されている場合には、2つの命令の内の右側、つまり制御プログラム24a1の下流側の命令を動作命令として取得しても良い。
 また、動作検索部21a2bは、図9に示す制御プログラム24a1の行45のように、1つの行に2つより多くの命令が記述されている場合には、まず、複数の命令がワイヤードOR接続されている点45a1を見つけ出す。そして、動作検索部21a2bは、点45a1より右側、つまり制御プログラム24a1の下流側の命令45bを動作命令として取得しても良い。
 これにより、動作検索部21a2bは、命令名と命令仕様データ24bとを照合することなく、動作命令を制御プログラム24a1の中から検索することができる。
 再び図12を参照すると、動作検索部21a2bは、ステップS104において、ステップS102で検索した動作命令の中で、ターゲットの変数の値が変化する可能性がある動作命令を検索する。
 ターゲットの変数72に設定された変数「D20」は、動作命令44bの第2引数44b1に記述されている。動作命令44bの命令名「MOV」は、第1引数の値を第2引数に転送する命令である。
 従って、動作検索部21a2bは、ステップS104において、ターゲットの変数72に設定された変数「D20」の値が変化する可能性がある動作命令44bを制御プログラム24a1の中から検索することができる。
 動作検索部21a2bは、ステップS106において、ステップS104で検索された動作命令と命令仕様データ24bとを照合し、ステップS104での検索結果に基づく情報を、検索結果データ24dに書き込む。
 再び図8を参照すると、動作検索部21a2bは、ステップS106において、行61を作成する。そして、動作検索部21a2bは、変数名「D20」、命令名「MOV」及び命令種別「動作」を、行61の項目24d1,24d2及び24d3に書き込む。
 また、動作検索部21a2bは、ステップS104で検索された動作命令44bと命令仕様データ24bの説明文の項目24b3とを照合する。動作命令44bの第1引数は、定数「K15」であり、第2引数は、変数「D20」である。従って、動作検索部21a2bは、説明文「K15がD20に転送される」を作成して、行61の項目24d4に書き込む。
 また、動作検索部21a2bは、動作命令44bが含まれているプログラム名「MAIN」を、行61の項目24d5に書き込む。
 また、動作命令44bは、MAINプログラム24a1aの第11ステップ目である。従って、動作命令部21a2bは、ステップ番号「11」を、行61の項目24d6に書き込む。
 再び図12を参照すると、条件検索部21a2cは、ステップS108において、動作検索部21a2bによって検索された動作命令を実行する条件を判定する条件命令を、制御プログラム24a1の中から検索する。
 条件検索部21a2cは、制御プログラム24a1の中の命令と命令仕様データ24bとを照合することで当該命令の命令種別を取得することにより、条件命令を制御プログラム24a1の中から検索することができる。
 条件検索部21a2cによる検索結果は、複数箇所あっても良い。
 なお、条件検索部21a2cは、命令名と命令仕様データ24bとを照合することに代えて、制御プログラム24a1を図形的に解析することで、動作命令を取得することとしても良い。
 具体的には、条件検索部21a2cは、図9に示す制御プログラム24a1の行41,42,43及び44のように、1つの行に2つの命令が記述されている場合には、2つの命令の内の左側、つまり制御プログラム24a1の上流側の命令を動作命令として取得しても良い。
 また、動作検索部21a2bは、図9に示す制御プログラム24a1の行45のように、1つの行に2つより多くの命令が記述されている場合には、まず、複数の命令がワイヤードOR接続されている点45a1を見つけ出す。そして、動作検索部21a2bは、点45a1より左側、つまり制御プログラム24a1の上流側の命令45aを動作命令として取得しても良い。
 これにより、条件検索部21a2cは、命令名と命令仕様データ24bとを照合することなく、条件命令を制御プログラム24a1の中から検索することができる。
 再び図14を参照すると、動作命令44bの図中左側、つまりMAINプログラム24a1aの上流側には、条件命令44aが記述されている。
 従って、条件検索部21a2cは、ステップS108において、動作命令44bを実行する条件を判定する条件命令44aを、制御プログラム24a1の中から検索することができる。
 再び図12を参照すると、条件検索部21a2cは、ステップS110において、ステップS108で検索された条件命令と命令仕様データ24bとを照合し、ステップS108での検索結果に基づく情報を、検索結果データ24dに書き込む。
 再び図8を参照すると、条件検索部21a2cは、ステップS110において、行62を作成する。そして、条件検索部21a2cは、変数名「D10」、命令名「=」及び命令種別「条件」を、行62の項目24d1,24d2及び24d3に書き込む。
 また、条件検索部21a2cは、ステップS108で検索された条件命令44aと命令仕様データ24bの説明文の項目24b3とを照合する。条件命令44aの第1引数は、変数「D10」であり、第2引数は、定数「K10000」である。従って、条件検索部21a2cは、説明文「D10がK10000と等しい」を作成して、行62の項目24d4に書き込む。
 また、条件検索部21a2cは、条件命令44aが含まれているプログラム名「MAIN」を、行62の項目24d5に書き込む。
 また、条件命令44aは、MAINプログラム24a1aの第8ステップ目である。従って、条件命令部21a2cは、ステップ番号「8」を、行62の項目24d6に書き込む。
 再び図12を参照すると、条件検索部21a2cは、ステップS112において、ステップS110で検索された条件命令の引数を、新たなターゲットの変数72に設定する。
 条件検索部21a2cによって設定される新たなターゲットの変数72は、複数あっても良い。また、条件検索部21a2cは、制御プログラム24a1をそれ以上遡ることが出来ない場合は、新たなターゲットの変数72を設定しない。
 図15は、実施の形態1にかかるエンジニアリングツールの検索処理を説明する図である。
 図15に示すように、条件命令44aは、第1引数44a1「D10」と、第2引数「K10000」と、を含んでいる。しかし、第2引数「K10000」は、定数であって、変数ではない。そこで、条件検索部21a2cは、ステップS112において、第1引数44a1「D10」を、新たなターゲットの変数72に設定する。
 再び図12を参照すると、検索判定部21a2dは、ステップS114において、検索終了条件が満たされたか否かを判定する。検索終了条件は、以下が例示される。
 第1の例は、ステップS112で新たなターゲットの変数72が設定されなかった場合である。つまり、制御プログラム24a1をそれ以上遡ることが出来ない場合である。
 第2の例は、動作検索部21a2b及び条件検索部21a2cによるステップS102からステップS112までの検索の繰り返し回数が、検索回数データ24c1に記述された回数に達した場合である。
 これにより、プログラム診断部21a2は、検索が終わらないことを抑制して検索が停止することを確保することができる、つまり検索の停止性を確保することができるという効果を奏する。また、プログラム診断部21a2は、制御プログラム24a1の規模が大きい場合であっても、検索範囲を限定することができるので、制御プログラム24a1の問題の原因を特定する工数を抑制できる効果を奏する。
 第3の例は、条件検索部21a2cによりステップS112で設定された新たなターゲットの変数72が、検索範囲データ24c2に記述されたステップ番号の範囲外になった場合である。
 これにより、プログラム診断部21a2は、検索の停止性が確保されるという効果を奏する。また、プログラム診断部21a2は、制御プログラム24a1の規模が大きい場合であっても、検索範囲を限定することができるので、制御プログラム24a1の問題の原因を特定する工数を抑制できる効果を奏する。
 検索判定部21a2dは、複数の検索終了条件のOR(論理和)を判定することができる。
 検索判定部21a2dは、ステップS114において、検索条件が満たされていないと判定したら(No)、処理をステップS102に進める。
 図16は、実施の形態1にかかるエンジニアリングツールの検索処理を説明する図である。
 図16に示すように、動作命令42bは、第1引数「D0」と、第2引数42b1「D10」と、を含んでいる。
 動作検索部21a2bは、ステップS102及びステップS104において、ターゲットの変数72に設定された変数「D10」が動作命令42bの第2引数42b1に記述されていることを見つけ出す。そして、動作検索部21a2bは、動作命令42bの命令名「MOV」と命令仕様データ24bとを照合することで、命令名「MOV」の命令種別「動作」を取得する。従って、動作検索部21a2bは、動作命令42bを制御プログラム24a1の中から検索することができる。
 再び図8を参照すると、動作検索部21a2bは、ステップS106において、行63を作成する。そして、動作検索部21a2bは、変数名「D0」、命令名「MOV」及び命令種別「動作」を、行63の項目24d1,24d2及び24d3に書き込む。
 また、動作検索部21a2bは、ステップS104で検索された動作命令42bと命令仕様データ24bの説明文の項目24b3とを照合する。動作命令42bの第1引数は、変数「D0」であり、第2引数は、変数「D10」である。従って、動作検索部21a2bは、説明文「D0がD10に転送される」を作成して、行63の項目24d4に書き込む。
 また、動作検索部21a2bは、動作命令42bが含まれているプログラム名「MAIN」を、行63の項目24d5に書き込む。
 また、動作命令42bは、MAINプログラム24a1aの第4ステップ目である。従って、動作命令部21a2bは、ステップ番号「4」を、行63の項目24d6に書き込む。
 動作命令42bの図中左側、つまりMAINプログラム24a1aの上流側には、条件命令42aが記述されている。
 従って、条件検索部21a2cは、ステップS108において、動作命令42bを実行する条件を判定する条件命令42aを、制御プログラム24a1の中から検索することができる。
 条件検索部21a2cは、ステップS110において、ステップS108で検索された条件命令と命令仕様データ24bとを照合し、ステップS108での検索結果に基づく情報を、検索結果データ24dに書き込む。
 再び図8を参照すると、条件検索部21a2cは、ステップS110において、行64を作成する。そして、条件検索部21a2cは、変数名「M100」、命令名「LD」及び命令種別「条件」を、行64の項目24d1,24d2及び24d3に書き込む。
 また、条件検索部21a2cは、ステップS108で検索された条件命令42aと命令仕様データ24bの説明文の項目24b3とを照合する。条件命令42aの第1引数は、変数「M100」である。従って、条件検索部21a2cは、説明文「M100がONしている」を作成して、行64の項目24d4に書き込む。
 また、条件検索部21a2cは、条件命令42aが含まれているプログラム名「MAIN」を、行64の項目24d5に書き込む。
 また、条件命令42aは、MAINプログラム24a1aの第3ステップ目である。従って、条件命令部21a2cは、ステップ番号「3」を、行64の項目24d6に書き込む。
 条件命令42aは、第1引数「M100」を含んでいる。そこで、条件検索部21a2cは、ステップS112において、第1引数「M100」を、新たなターゲットの変数72に設定する。
 再び図12を参照すると、検索判定部21a2dは、ステップS114において、検索条件が満たされていると判定したら(Yes)、処理をステップS116に進める。
 再び図16を参照すると、ターゲットの変数72「M100」を含む動作命令は制御プログラム24a1内に存在しない。
 従って、検索判定部21a2dは、ステップS114で検索条件が満たされていると判定して(Yes)、処理をステップS116に進める。
 再び図12を参照すると、一覧表示部21a2eは、ステップS116において、検索結果データ24dの内容を表示部26に一覧表示する。
 図17は、実施の形態1にかかるエンジニアリングツールのプログラム診断画面を示す図である。一覧表示部21a2eは、検索結果データ24dの内容を、プログラム診断画面70の一覧表示欄80内に一覧表示する。
 一覧表示欄80は、プログラム名の項目81と、ステップ番号の項目82と、変数名の項目83と、命令名の項目84と、命令種別の項目85と、説明文の項目86と、を有する。
 一覧表示部21a2eは、行91,92,93及び94内に、検索結果データ24dの行61,62,63及び64の内容を夫々表示する。
 このように、プログラム診断部21a2は、行94内に表示されている、問題の原因となった命令の内容及び行91内に表示されている、問題が発生した命令の内容だけではなく、行93及び行92内に表示されている、問題の原因となった命令と問題が発生した命令との間に関与する命令の内容をも併せて、一覧表示することができる。
 これにより、プログラム診断部21a2は、ユーザが問題の原因となった命令と問題が発生した命令との間の全体像を把握することを容易にすることができるという効果を奏する。
 図18は、実施の形態1にかかるエンジニアリングツールの処理を示すフローチャートである。
 一覧表示部21a2eは、ステップS200において、行91,92,93又は94が選択されたら、選択された行の項目82a内のステップ番号に該当する命令44b,44a,42b又は42aを表示する。
 これにより、プログラム診断部21a2は、ユーザが所望の命令を直ぐに確認することができるという効果を奏する。
 また、一覧表示欄80は、プログラム名のフィルタ条件を入力するためのフィルタ条件入力欄81aと、ステップ番号のフィルタ条件を入力するためのフィルタ条件入力欄82aと、変数名のフィルタ条件を入力するためのフィルタ条件入力欄83aと、命令名のフィルタ条件を入力するためのフィルタ条件入力欄84aと、命令種別のフィルタ条件を入力するためのフィルタ条件入力欄85aと、説明文のフィルタ条件を入力するためのフィルタ条件入力欄86aと、を有する。
 図19は、実施の形態1にかかるエンジニアリングツールの処理を示すフローチャートである。
 一覧表示部21a2eは、ステップS202において、フィルタ条件入力欄84aに命令名が入力されたら、検索結果データ24dの行91,92,93及び94の中で入力されたフィルタ条件に合致する行を一覧表示する。例えば、フィルタ条件入力欄84aに「MOV」が入力されたら、一覧表示部21a2eは、行91及び93だけを表示する。
 これにより、プログラム診断部21a2は、ユーザが問題に関係する命令を絞り込むことで問題の原因を特定する工数を抑制できる効果を奏する。
 また、動作検索部21a2bは、命令名と命令仕様データ24bとを照合することで、命令名の命令種別「動作」を取得することができる。
 これにより、動作検索部21a2bは、動作命令を制御プログラム24a1の中から検索することができる。
 また、条件検索部21a2cは、命令名と命令仕様データ24bとを照合することで、命令名の命令種別「条件」を取得することができる。
 これにより、条件検索部21a2cは、条件命令を制御プログラム24a1の中から検索することができる。
 また、記憶部24は、制御プログラム24a1に対して実行される検索の終了条件が記述された検索終了条件データ24cを記憶する。そして、検索判定部21a2dは、検索が終了条件を満たしていると判定したら、動作検索部21a2b及び条件検索部21a2cによる検索を終了させる。
 これにより、プログラム診断部21a2は、検索の停止性が確保されるという効果を奏する。また、検索判定部21a2dは、制御プログラム24a1の規模が大きい場合であっても、検索範囲を限定することができる。従って、プログラム診断部21a2は、制御プログラム24a1の問題の原因を特定する工数を抑制できる効果を奏する。
 また、記憶部24は、制御プログラム24a1で使用されている全変数の予め定められたタイミングでの値が蓄積される実行データ24eを記憶する。
 スキャン部21a2fは、予め定められたタイミングで、制御装置3のメモリ3a2をスキャンすることにより、制御プログラム24a1で使用されている全変数の値を取得し、実行データ24eに書き込む。
 これにより、プログラム診断部21a2は、制御装置3から問題が発生した旨の通知を受信したときにスキャンした全変数の値を検索に使用することとすれば、制御装置3で問題が発生したタイミングでの全変数の値に基づいて、制御プログラム24a1の診断を行うことができる。これにより、プログラム診断部21a2は、制御装置3で問題が発生したタイミングでの、制御プログラム24a1の問題を診断することができる。
 また、プログラム診断部21a2は、制御装置3から問題が発生した旨の通知を受信したときより前での全変数の値を検索に使用することとすれば、制御装置3で問題が発生したときより前のタイミングでの全変数の値に基づいて、制御プログラム24a1の診断を行うことができる。これにより、プログラム診断部21a2は、制御装置3で問題が発生したときより前のタイミングでの、制御プログラム24a1の問題を診断することができる。
 また、シミュレーション部21a2gは、制御プログラム24a1をシミュレーション実行することにより、制御プログラム24a1で使用されている全変数の値を算出し、実行データ24eに書き込む。
 これにより、プログラム診断部21a2は、制御装置3を動作させなくても、制御プログラム24a1の問題を診断することができる。
 以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。
 1 制御システム、2 エンジニアリングツール、3 制御装置、4,5 機械、21 CPU、21a1 プロジェクトデータ作成部、21a2 プログラム診断部、21a2a 変数設定部、21a2b 動作検索部、21a2c 条件検索部、21a2d 検索判定部、21a2e 一覧表示部、21a2f スキャン部、21a2g シミュレーション部、24 記憶部、24a プロジェクトデータ、24a1 制御プログラム、24b 命令仕様データ、24c 検索終了条件データ、24d 検索結果データ、24e 実行データ。

Claims (10)

  1.  引数の値を変化させる動作命令及び前記動作命令を実行する条件を判定する条件命令を含む制御プログラムと、前記制御プログラムで記述され得る命令の命令名、前記動作命令又は前記条件命令の種別、並びに、命令の処理の内容を含む命令仕様データと、前記制御プログラムに対して実行される検索の結果が蓄積される検索結果データと、を記憶する記憶部と、
     ターゲットの変数を設定する変数設定部と、
     前記ターゲットの変数の値が変化する可能性がある前記動作命令を前記制御プログラムの中から検索して、検索された前記動作命令と前記命令仕様データとを照合し、前記ターゲットの変数名、並びに、検索された前記動作命令の命令名、命令の種別及び処理の内容を前記検索結果データに書き込む動作検索部と、
     前記動作検索部で検索された前記動作命令を実行する条件を判定する前記条件命令を前記制御プログラムの中から検索して、検索された前記条件命令と前記命令仕様データとを照合し、検索された前記条件命令の引数の変数名、並びに、検索された前記条件命令の命令名、命令の種別及び処理の内容を前記検索結果データに書き込み、検索された前記条件命令の引数を新たなターゲットの変数に設定する条件検索部と、
     前記動作検索部及び前記条件検索部に検索を再度実行させる検索判定部と、
     前記検索結果データの内容を一覧表示する一覧表示部と、
     を備えることを特徴とするプログラム診断装置。
  2.  前記動作検索部は、前記制御プログラムの中の命令と前記命令仕様データとを照合することで当該命令の命令種別を取得することにより、前記動作命令を前記制御プログラムの中から検索することを特徴とする請求項1に記載のプログラム診断装置。
  3.  前記条件検索部は、前記制御プログラムの中の命令と前記命令仕様データとを照合することで当該命令の命令種別を取得することにより、前記条件命令を前記制御プログラムの中から検索することを特徴とする請求項1に記載のプログラム診断装置。
  4.  前記記憶部は、前記制御プログラムに対して実行される検索の終了条件が記述された検索終了条件データを更に記憶し、
     前記検索判定部は、前記動作検索部及び前記条件検索部によって実行された検索が前記終了条件を満たしていると判定したら、前記動作検索部及び前記条件検索部による検索を終了させ、前記動作検索部及び前記条件検索部によって実行された検索が前記終了条件を満たしていないと判定したら、前記動作検索部及び前記条件検索部に検索を再度実行させることを特徴とする請求項1に記載のプログラム診断装置。
  5.  前記検索終了条件データは、前記動作検索部及び前記条件検索部による検索回数のデータ又は前記制御プログラムの検索範囲のデータであることを特徴とする請求項4に記載のプログラム診断装置。
  6.  前記一覧表示部は、変数名、又は、検索された条件命令の命令名、命令の種別若しくは処理の内容のフィルタ条件が入力されたら、前記検索結果データの中で前記フィルタ条件に合致するデータの内容を一覧表示することを特徴とする請求項1に記載のプログラム診断装置。
  7.  前記記憶部は、前記制御プログラムで使用されている全変数の予め定められたタイミングでの値が蓄積される実行データを更に記憶し、
     前記予め定められたタイミングで、前記制御プログラムを実行する制御装置のメモリをスキャンすることにより、前記制御プログラムで使用されている全変数の値を取得し、前記実行データに書き込むスキャン部を更に備えることを特徴とする請求項1に記載のプログラム診断装置。
  8.  前記制御プログラムをシミュレーション実行することにより、前記制御プログラムで使用されている全変数の値を算出し、前記実行データに書き込むシミュレーション部を更に備えることを特徴とする請求項7に記載のプログラム診断装置。
  9.  引数の値を変化させる動作命令及び前記動作命令を実行する条件を判定する条件命令を含む制御プログラムと、前記制御プログラムで記述され得る命令の命令名、前記動作命令又は前記条件命令の種別、並びに、命令の処理の内容を含む命令仕様データと、前記制御プログラムに対して実行される検索の結果が記録される検索結果データと、を記憶する記憶部を備えるプログラム診断装置で実行される方法であって、
     ターゲットの変数を設定する変数設定工程と、
     前記ターゲットの変数の値が変化する可能性がある前記動作命令を前記制御プログラムの中から検索して、検索された前記動作命令と前記命令仕様データとを照合し、前記ターゲットの変数名、並びに、検索された前記動作命令の命令名、命令の種別及び処理の内容を前記検索結果データに書き込む動作検索工程と、
     前記動作検索工程で検索された前記動作命令を実行する条件を判定する前記条件命令を前記制御プログラムの中から検索して、検索された前記条件命令と前記命令仕様データとを照合し、検索された前記条件命令の引数の変数名、並びに、検索された前記条件命令の命令名、命令の種別及び処理の内容を前記検索結果データに書き込み、検索された前記条件命令の引数を新たなターゲットの変数に設定する条件検索工程と、
     前記動作検索工程及び前記条件検索工程に検索を再度実行させる検索判定工程と、
     前記検索結果データの内容を一覧表示する一覧表示工程と、
     を備えることを特徴とするプログラム診断方法。
  10.  引数の値を変化させる動作命令及び前記動作命令を実行する条件を判定する条件命令を含む制御プログラムと、前記制御プログラムで記述され得る命令の命令名、前記動作命令又は前記条件命令の種別、並びに、命令の処理の内容を含む命令仕様データと、前記制御プログラムに対して実行される検索の結果が記録される検索結果データと、を記憶する記憶部を備えるプログラム診断装置で実行されるプログラムであって、
     ターゲットの変数を設定する変数設定工程と、
     前記ターゲットの変数の値が変化する可能性がある前記動作命令を前記制御プログラムの中から検索して、検索された前記動作命令と前記命令仕様データとを照合し、前記ターゲットの変数名、並びに、検索された前記動作命令の命令名、命令の種別及び処理の内容を前記検索結果データに書き込む動作検索工程と、
     前記動作検索工程で検索された前記動作命令を実行する条件を判定する前記条件命令を前記制御プログラムの中から検索して、検索された前記条件命令と前記命令仕様データとを照合し、検索された前記条件命令の引数の変数名、並びに、検索された前記条件命令の命令名、命令の種別及び処理の内容を前記検索結果データに書き込み、検索された前記条件命令の引数を新たなターゲットの変数に設定する条件検索工程と、
     前記動作検索工程及び前記条件検索工程に検索を再度実行させる検索判定工程と、
     前記検索結果データの内容を一覧表示する一覧表示工程と、
     を備えることを特徴とするプログラム診断プログラム。
PCT/JP2015/061757 2015-04-16 2015-04-16 プログラム診断装置、プログラム診断方法及びプログラム診断プログラム WO2016166876A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020177031427A KR101846140B1 (ko) 2015-04-16 2015-04-16 프로그램 진단 장치, 프로그램 진단 방법 및 프로그램 진단 프로그램
JP2016555855A JP6076565B1 (ja) 2015-04-16 2015-04-16 プログラム診断装置、プログラム診断方法及びプログラム診断プログラム
CN201580078870.3A CN107533322B (zh) 2015-04-16 2015-04-16 程序诊断装置及程序诊断方法
PCT/JP2015/061757 WO2016166876A1 (ja) 2015-04-16 2015-04-16 プログラム診断装置、プログラム診断方法及びプログラム診断プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/061757 WO2016166876A1 (ja) 2015-04-16 2015-04-16 プログラム診断装置、プログラム診断方法及びプログラム診断プログラム

Publications (1)

Publication Number Publication Date
WO2016166876A1 true WO2016166876A1 (ja) 2016-10-20

Family

ID=57126471

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/061757 WO2016166876A1 (ja) 2015-04-16 2015-04-16 プログラム診断装置、プログラム診断方法及びプログラム診断プログラム

Country Status (4)

Country Link
JP (1) JP6076565B1 (ja)
KR (1) KR101846140B1 (ja)
CN (1) CN107533322B (ja)
WO (1) WO2016166876A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109791398A (zh) * 2017-06-27 2019-05-21 三菱电机株式会社 调试装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2020166004A1 (ja) * 2019-02-14 2021-02-18 三菱電機株式会社 制御システム、プログラマブルロジックコントローラ、方法、及びプログラム

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03108005A (ja) * 1989-09-21 1991-05-08 Sony Corp ラダーシーケンス方式のプログラムにおける異常の原因箇所究明方法
JP2005316986A (ja) * 2004-03-31 2005-11-10 Omron Corp 開発支援装置およびアウトライン情報生成プログラムならびにアウトライン情報生成方法
JP2011028552A (ja) * 2009-07-27 2011-02-10 Keyence Corp プログラム作成支援装置、プログラム作成支援方法及びコンピュータプログラム

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7272450B2 (en) * 2004-03-31 2007-09-18 Omron Corporation Development aid device
WO2011080945A1 (ja) * 2009-12-28 2011-07-07 三菱電機株式会社 プログラム作成支援装置
CN104204975B (zh) * 2012-03-26 2016-10-12 三菱电机株式会社 定序程序调试辅助装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03108005A (ja) * 1989-09-21 1991-05-08 Sony Corp ラダーシーケンス方式のプログラムにおける異常の原因箇所究明方法
JP2005316986A (ja) * 2004-03-31 2005-11-10 Omron Corp 開発支援装置およびアウトライン情報生成プログラムならびにアウトライン情報生成方法
JP2011028552A (ja) * 2009-07-27 2011-02-10 Keyence Corp プログラム作成支援装置、プログラム作成支援方法及びコンピュータプログラム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109791398A (zh) * 2017-06-27 2019-05-21 三菱电机株式会社 调试装置
CN109791398B (zh) * 2017-06-27 2020-12-18 三菱电机株式会社 调试装置

Also Published As

Publication number Publication date
CN107533322B (zh) 2019-04-19
JPWO2016166876A1 (ja) 2017-04-27
KR101846140B1 (ko) 2018-04-05
KR20170127569A (ko) 2017-11-21
CN107533322A (zh) 2018-01-02
JP6076565B1 (ja) 2017-02-08

Similar Documents

Publication Publication Date Title
JP6359235B2 (ja) プロセス制御の検索結果を管理するための方法および装置
US10915419B2 (en) Industrial control system, and assistance apparatus, control assist method, and program thereof
JP6430037B2 (ja) デバッグ支援装置およびデバッグ支援方法
US20190012622A1 (en) Computer-readable recording medium for visualization of manufacturing-process, method of visualizing manufacturing process, and manufacturing-process visualizing system
US8656358B2 (en) Plant control system and interlock factor specifying method
JP6076565B1 (ja) プログラム診断装置、プログラム診断方法及びプログラム診断プログラム
US10846067B2 (en) Software generation method and software generation system
JP2009122936A (ja) 異常調査用表示機能を備えたシーケンスプログラムモニタ装置およびプログラマブルコントローラ
JP2008225683A (ja) 画面操作システムおよびプログラム
JP4928471B2 (ja) プラント制御システム
JPH11224211A (ja) ソフトウェア検査支援装置
WO2020230241A1 (ja) テスト装置、テスト方法及びプログラム
JPH08179966A (ja) プログラムテスト装置
JP6840294B1 (ja) プログラマブル表示器、制御システムおよび解析方法
JP7385147B2 (ja) 検査スケジュール作成装置及び検査スケジュール作成用プログラム
WO2020189142A1 (ja) 制御システム、制御方法、および制御プログラム
US20220309842A1 (en) Abnormality diagnosis device
JP2005275713A (ja) 保守情報管理システム
JP2009134518A (ja) 試験プログラムの検証方法及びその検証システム
AU2011202744B2 (en) Plant control system and method of specifying primary-factor for interlock
JP6003281B2 (ja) 製品に対する品質評価システム及び品質評価方法
JP2023107534A (ja) 支援システム、支援方法およびプログラム
JP2019125134A (ja) 検証支援プログラム、検証支援方法、および情報処理装置
JP2009076821A (ja) 検査式作成支援システム、検査式作成支援方法、および検査式作成支援プログラム
KR20120040370A (ko) 기판 처리 장치의 모니터링 방법

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2016555855

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 15889214

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20177031427

Country of ref document: KR

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 15889214

Country of ref document: EP

Kind code of ref document: A1