WO2022138442A1 - ラダープログラム解析装置 - Google Patents

ラダープログラム解析装置 Download PDF

Info

Publication number
WO2022138442A1
WO2022138442A1 PCT/JP2021/046507 JP2021046507W WO2022138442A1 WO 2022138442 A1 WO2022138442 A1 WO 2022138442A1 JP 2021046507 W JP2021046507 W JP 2021046507W WO 2022138442 A1 WO2022138442 A1 WO 2022138442A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
unit
output
logical operation
analysis device
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2021/046507
Other languages
English (en)
French (fr)
Inventor
翔吾 藤江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanuc Corp
Original Assignee
Fanuc Corp
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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP2022571374A priority Critical patent/JP7601906B2/ja
Priority to US18/255,348 priority patent/US12450149B2/en
Priority to DE112021005500.3T priority patent/DE112021005500T5/de
Priority to CN202180083811.0A priority patent/CN116615720A/zh
Publication of WO2022138442A1 publication Critical patent/WO2022138442A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage 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/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software

Definitions

  • the present invention relates to a ladder program analyzer.
  • coverage is one of the measures used in software testing, which is also called code coverage rate, and means the rate at which the source code of the program is tested.
  • the input circuit for one coil output is branched or merged, and it is necessary to manage in another file to record which route has been verified among multiple routes. It was difficult to record the coverage.
  • One aspect of the present disclosure is based on a path analysis unit that analyzes each path of the ladder program circuit, a contact combination acquisition unit that acquires a combination of contacts of each analyzed path, and a calculation result of a condition value for each combination. It is an analysis device provided with a path output unit that outputs a path.
  • the execution path of the ladder program can be measured without manual work by the operator.
  • FIG. 1 is a functional block diagram illustrating a function of the analysis device 1 according to the present embodiment.
  • FIG. 2 is a flowchart showing the operation of the analysis device 1.
  • FIG. 3 is a diagram showing an example of a range of logical operations in the ladder program to be analyzed by the analysis device 1.
  • FIG. 4 is a table showing an example of a combination of contacts in each path included in the range of logical operation shown in FIG.
  • FIG. 5 is a table showing an example of the result of the logical operation for each path shown in FIG.
  • FIG. 6 is an example of a diagram showing the result of the logical operation shown in FIG. 5 in a ladder program.
  • FIG. 1 is a functional block diagram illustrating a function of the analysis device 1 according to the present embodiment.
  • FIG. 2 is a flowchart showing the operation of the analysis device 1.
  • FIG. 3 is a diagram showing an example of a range of logical operations in the ladder program to be analyzed by the analysis device 1.
  • FIG. 4 is
  • FIG. 7 is a table showing an example of the result of the first logical operation for each path shown in FIG.
  • FIG. 8 is a table showing an example of the result of the second logical operation for each path shown in FIG.
  • FIG. 9 is a table showing the difference between the result of the first logical operation shown in FIG. 7 and the result of the second logical operation shown in FIG.
  • FIG. 10 is an example of a diagram showing the differences shown in FIG. 9 in a ladder program.
  • the analysis device 1 includes a control unit 11, a storage unit 12, and a display device 13.
  • the control unit 11 is a part that controls the entire analysis device 1, and various programs in the present embodiment are executed by appropriately reading and executing various programs from a storage area such as a ROM, RAM, flash memory, or a hard disk (HDD). Realizes the function.
  • the control unit 11 may be a CPU.
  • the control unit 11 includes a program acquisition unit 111, a range setting unit 112, a start / end condition setting unit 113, a path analysis unit 114, a list generation unit 115, a logical operation unit 116, and a path output unit 117.
  • the control unit 11 executes and analyzes the ladder program.
  • the program acquisition unit 111 acquires a ladder program to be analyzed by the analysis device 1 from the storage unit 12 described later.
  • the range setting unit 112 sets the range of the path to be the target of the logical operation by the logical operation unit 116 described later.
  • the range setting unit 112 makes it possible to perform logical operations only on a part of the circuits, not all the circuits constituting the ladder program.
  • the start / end condition setting unit 113 sets the start condition and the end condition of the logical operation.
  • the start / end condition setting unit 113 indicates, for example, that "X0.0" in the ladder program is turned ON and that the start button instructing the start of the analysis of the ladder program is pressed in the analysis device 1. It may be a starting condition. Further, in the start / end condition setting unit 113, for example, "X0.0" in the ladder program is turned off, or the end button instructing the end of the analysis of the ladder program in the analysis device 1 is pressed. This may be the end condition.
  • the path analysis unit 114 analyzes each path of the ladder program circuit. More specifically, the path analysis unit 114 identifies (reveals) all the paths included in the ladder program circuit.
  • the list generation unit 115 lists the paths analyzed by the path analysis unit 114.
  • the logical operation unit 116 performs a logical operation using the condition values of each combination of contacts included in each item of the list generated by the list generation unit 115.
  • the list generation unit 115 and the logical operation unit 116 may be collectively referred to as a “contact combination acquisition unit”.
  • the path output unit 117 outputs a path based on the calculation result by the logical operation unit 116. For example, the path output unit 117 may output only the path for which the operation result by the logical operation unit 116 is true. Alternatively, the path output unit 117 may output only the path for which the operation result by the logical operation unit 116 is false. Further, these output destinations may be the storage unit 12 described later or the display device 13.
  • the path output unit 117 includes a difference comparison unit 118 and a comparison result output unit 119.
  • the difference comparison unit 118 compares the results of the plurality of operations.
  • the comparison result output unit 119 outputs the comparison result by the difference comparison unit 118 together with the path corresponding to each calculation result included in the comparison result.
  • the storage unit 12 stores the ladder program acquired by the program acquisition unit 111, the path output by the path output unit 117, the comparison result output by the comparison result output unit 119 included in the path output unit 117, and the like. It is a storage device.
  • the display device 13 displays a ladder program acquired by the program acquisition unit 111, a path output by the path output unit 117, a comparison result output by the comparison result output unit 119 included in the path output unit 117, and the like. It is a display device, and is realized by, for example, a liquid crystal monitor.
  • step S11 the program acquisition unit 111 acquires the ladder program from the storage unit 12.
  • step S12 the range setting unit 112 sets the range for logical operation.
  • FIG. 3 shows an example of setting a range for logical operation.
  • a range including a path including "R1111.0” and “F0089.5", a path including "DDDD”, and a path including "X0010.6” and “EEEE” is set. ..
  • step S13 the start / end condition setting unit 113 sets the start condition and the end condition of the logical operation.
  • step S14 the path analysis unit 114 analyzes the path of the ladder program included in the range of logical operation.
  • step S15 the list generation unit 115 lists each analyzed path.
  • FIG. 4 is an example of the list generated by the list generation unit 115.
  • step S16 If the start condition is satisfied in step S16 (S16: YES), the process proceeds to step S17. If the start condition is not satisfied (S16: NO), the process returns to step S16.
  • step S17 the logical operation unit 116 logically operates the condition value corresponding to the combination of contacts included in each item of the list.
  • FIG. 5 shows an example of the result of a logical operation.
  • step S18 the path output unit 117 outputs the path for which the calculation result is true.
  • the path output unit 117 assumes that the path for which the calculation result is true is output to the display device 13, but the present invention is not limited to this.
  • the path output unit 117 may output a path whose calculation result is false instead of the path whose calculation result is true.
  • the output destination may be the storage unit 12 instead of the display device 13.
  • step S19 If the end condition is satisfied in step S19 (S19: YES), the process proceeds to step S20. If the end condition is not satisfied (S19: NO), the process returns to step S17.
  • step S20 the display device 13 displays the output content by the path output unit 117.
  • FIG. 6 is a display example thereof, and FIG. 5 shows a path No. in which the calculation result is true. The path of 2 is highlighted (in FIG. 6, the path is shown by a thick line).
  • the analysis device 1 not only outputs the path in which the calculation result is true, but also outputs the comparison result by the difference comparison unit 118 together with the path corresponding to each calculation result included in the comparison result. good.
  • FIGS. 7 to 9 an example is shown in which the calculation result included in the comparison result is output together with the path corresponding to the comparison result.
  • FIG. 7 is a table showing an example of the first calculation result.
  • the path No. The calculation result of 1 is "FALSE”
  • the calculation result of 2 is "TRUE”
  • the calculation result of 3 is "FALSE”.
  • FIG. 8 is a table showing an example of the second calculation result.
  • the path No. The calculation result of 1 is "FALSE”
  • the calculation result of 2 is "FALSE”
  • the calculation result of 3 is "FALSE”.
  • the path No. The calculation result of 2 is changed from "TRUE" to "FALSE".
  • FIG. 9 is a table showing the comparison result between the first calculation result and the second calculation result. As described above, the path No. The calculation result of 2 is "TRUE" in the first calculation result and "FALSE” in the second calculation result. In FIG. 9, the path Nos. The second column is surrounded by a thick line.
  • FIG. 10 shows an example of a ladder program displayed by the display device 13 as a result of the comparison result being output to the display device 13 by the comparison result output unit 119.
  • the path No. The path of 2 is highlighted (in FIG. 10, the path is shown by a thick line).
  • the display device 13 may display the table of FIG. 9 instead of the ladder program shown in FIG.
  • FIG. 11 is a functional block diagram illustrating the functions of the analysis device 1A according to the present embodiment.
  • FIG. 12 is a flowchart showing the operation of the analysis device 1A.
  • FIG. 13 is a table showing the execution history of operations.
  • the analysis device 1A according to the second embodiment mainly describes the components and operations different from those of the analysis device 1 according to the first embodiment, and the same components and operations are described. May be omitted.
  • control unit 11A included in the analysis device 1A is different from the control unit 11 included in the analysis device 1 in that the execution history output unit 120 is further provided.
  • FIG. 11 does not show the range setting unit 112, the start / end condition setting unit 113, the difference comparison unit 118, and the comparison result output unit 119 included in the control unit 11 of the analysis device 1 for the sake of simplification of the description. However, it may be configured to include one or more of these.
  • the execution history output unit 120 outputs the path whose result of the logical operation has changed when the logical operation is executed a plurality of times, together with the execution history of each path.
  • the output destination may be the storage unit 12 or the display device 13.
  • step S31 the program acquisition unit 111 acquires the ladder program from the storage unit 12.
  • step S32 the path analysis unit 114 analyzes the path of the ladder program.
  • step S33 the list generation unit 115 lists each analyzed path.
  • step S34 When the logical operation is started in step S34 (S34: YES), the process proceeds to step S35. If the logical operation has not started yet (S34: NO), the process returns to step S34.
  • step S35 the logical operation unit 116 logically operates the condition value corresponding to the combination of contacts included in each item of the list.
  • step S36 the path output unit 117 outputs the path together with the calculation result.
  • the path output unit 117 outputs the path together with the calculation result to the execution history output unit 120.
  • step S37 When the logical operation is terminated in step S37 (S37: YES), the process proceeds to step S38. If the logical operation has not been completed yet (S37: NO), the process returns to step S35.
  • step S38 the execution history output unit 120 outputs the paths whose logical operation results have changed, together with the execution history for each path.
  • the execution history output unit 120 is supposed to output to the display device 13, but the present invention is not limited to this, and the execution history output unit 120 may output to the storage unit 12.
  • step S39 the display device 13 displays the content output from the execution history output unit 120.
  • FIG. 13 is a display example thereof.
  • Path No. For path 1, the operation result at the time of the first logical operation is "TRUE”, the operation result at the time of the second logical operation is "FALSE”, and the operation result at the time of the third logical operation is "FALSE”.
  • the calculation result of is "FALSE”. That is, the path No.
  • the path 1 is highlighted because the calculation result has changed (in FIG. 13, the column is surrounded by a thick line).
  • FIG. 14 is a functional block diagram illustrating the functions of the analysis device 1B according to the present embodiment.
  • FIG. 15 is a flowchart showing the operation of the analysis device 1B.
  • FIG. 16 shows an example in which a dummy output coil is installed in each path constituting the ladder program.
  • FIG. 17 is a table showing an example of the output result for each path shown in FIG.
  • FIG. 18 is an example of a diagram showing the output result shown in FIG. 17 in a ladder program.
  • the analysis device 1B according to the third embodiment mainly describes the components and operations different from those of the analysis device 1 according to the first embodiment, and the same components and operations are described. May be omitted.
  • control unit 11B included in the analysis device 1B does not include the logical operation unit 116 as compared with the control unit 11 included in the analysis device 1, and instead includes the coil / command installation unit 121.
  • the coil / instruction installation unit 121 installs a dummy output coil or instruction in each path for each path analyzed by the path analysis unit 114.
  • the coil / command installation unit 121 in this embodiment constitutes a part or all of the “contact combination acquisition unit”.
  • the path output unit 117A outputs a path based on the output result from the dummy output coil or instruction installed by the coil / command installation unit 121.
  • the start / end condition setting unit 113 sets the start condition and end condition of the output of the output coil or the command.
  • the ladder program execution unit 122 that executes the ladder program executes the output coil or instruction installed by the coil / instruction installation unit 121. Specifically, the ladder program execution unit 122 starts the output of the output coil or the instruction when the start condition is satisfied, and ends the output of the output coil or the instruction when the end condition is satisfied.
  • the ladder program execution unit is also provided as a functional configuration in the control unit 11 of the first embodiment and the control unit 11A of the second embodiment.
  • the range setting unit 112 sets the range of the path that is the target of the output coil or the output of the command.
  • the path analysis unit 114 analyzes each path within the set range.
  • step S51 the program acquisition unit 111 acquires the ladder program from the storage unit 12.
  • step S52 the path analysis unit 114 analyzes the path of the ladder program.
  • step S53 the coil / instruction installation unit 121 installs a dummy output coil or instruction in each analyzed path.
  • FIG. 16 is an installation example of the output coils D1 to D3.
  • step S54 If the ladder program execution unit 122 starts executing the ladder program in step S54 (S54: YES), the process proceeds to step S55. If the ladder program execution unit 122 has not yet started the execution of the ladder program (S54: NO), the process returns to step S54.
  • step S55 the path output unit 117A acquires the output result from the output coil or the instruction.
  • FIG. 17 is a table showing an example of the output result.
  • step S56 the path output unit 117A outputs the path for which the output result from the output coil or the instruction is true.
  • the path output unit 117A may output a path whose output result is false instead of the path whose output result is true.
  • the path output unit 117A is supposed to output to the display device 13, but is not limited to this, and the output destination may be the storage unit 12.
  • step S57 when the ladder program execution unit 122 ends the execution of the ladder program (S57: YES), the process proceeds to step S58. If the ladder program execution unit 122 has not yet finished executing the ladder program (S57: NO), the process returns to step S55.
  • step S58 the display device 13 displays the content output from the path output unit 117A.
  • FIG. 18 is a display example thereof, and FIG. 17 shows a path No. in which the output result is turned ON. The path of 2 is highlighted (in FIG. 18, the path is shown by a thick line).
  • the analysis device is based on a path analysis unit 114 that analyzes each path of the ladder program circuit, a contact combination acquisition unit that acquires a combination of contacts of each analyzed path, and a calculation result of a condition value for each combination. It is provided with a path output unit 117 that outputs a path.
  • the analysis device is provided with an execution history output unit 120 that outputs a path in which the result of the logical operation has changed when the logical operation is executed a plurality of times together with the execution history of each path. You can check the execution history of the ladder program without using such functions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Software Systems (AREA)

Abstract

本発明は、オペレータが手作業せずに、簡便にラダープログラムの実行パスを測定することを目的とする。 本発明は、ラダープログラム回路の各パスを解析するパス解析部と、解析した各パスの接点の組み合わせを取得する接点組み合わせ取得部と、組み合わせ毎の条件値の演算結果に基づいてパスを出力するパス出力部とを備える、解析装置である。

Description

ラダープログラム解析装置
 本発明は、ラダープログラム解析装置に関する。
 ソフトウェア開発では、信頼性向上及び機能安全等の認証におけるテスト実施証明のため、カバレッジを記録することが求められている。なお、「カバレッジ」とは、コード網羅率とも呼ばれる、ソフトウェアテストで用いられる尺度の1つであり、プログラムのソースコードがテストされた割合を意味する。
 カバレッジの向上を目的として、プログラマブル・ロジック・コントローラ(PLC:Programmable Logic Controller)を動作させるPLCプログラムを、汎用プログラミング言語で記述された汎用言語プログラムに変換する変換部と、汎用言語プログラムに対する試験を行う技術が知られている(例えば、特許文献1)。
特開2018-133034号公報
 PLCで使用されるラダー言語では、1つのコイル出力に対する入力回路が分岐又は合流しており、複数あるルートの中で、どのルートが検証済みかを記録するには、別ファイルでの管理が必要であり、カバレッジの記録が大変であった。
 また、コイルがONする条件が1スキャンだけしか成立しない場合などにおいては、目視では確認できず、トレースなどの別機能でログを取りながらカバレッジを記録する必要があった。
 簡便なカバレッジの記録のため、オペレータが手作業せずに、ラダープログラムの実行パスを測定することのできる技術が求められている。
 本開示の一態様は、ラダープログラム回路の各パスを解析するパス解析部と、解析した各パスの接点の組み合わせを取得する接点組み合わせ取得部と、前記組み合わせ毎の条件値の演算結果に基づいてパスを出力するパス出力部とを備える、解析装置である。
 一態様によれば、オペレータが手作業せずに、ラダープログラムの実行パスを測定することができる。
一態様に係る解析装置の機能について説明する機能ブロック図である。 一態様に係る解析装置の動作を示すフローチャートである。 一態様に係る解析装置が解析対象とするラダープログラムのうち、論理演算する範囲の例を示す図である。 図3に示す範囲に含まれる各パスにおける接点の組み合わせの例を示す表である。 図4に示す各パスに対する論理演算の結果の例を示す表である。 図5に示された論理演算の結果をラダープログラムにおいて示す図の例である。 図3に示す各パス毎の第1の論理演算の結果の例を示す表である。 図3に示す各パス毎の第2の論理演算の結果の例を示す表である。 図7に示す第1の論理演算の結果と図8に示す第2の論理演算の結果との差分を示す表である。 図9に示される差分をラダープログラムにおいて示す図の例である。 一態様に係る解析装置の機能について説明する機能ブロック図である。 一態様に係る解析装置の動作を示すフローチャートである。 一態様に係る演算の実行履歴を示す表である。 一態様に係る解析装置の機能について説明する機能ブロック図である。 一態様に係る解析装置の動作を示すフローチャートである。 ラダープログラムを構成する各パスにダミーの出力コイルを設置した例である。 図16に示す各パス毎の出力結果の例を示す表である。 図17に示される出力結果をラダープログラムにおいて示す図の例である。
〔1 第1実施形態〕
 以下、本発明の第1実施形態について図1~図10を参照することにより説明する。図1は、本実施形態に係る解析装置1の機能について説明する機能ブロック図である。図2は、解析装置1の動作を示すフローチャートである。図3は、解析装置1が解析対象とするラダープログラムのうち、論理演算する範囲の例を示す図である。図4は、図3に示す論理演算する範囲に含まれる各パスにおける接点の組み合わせの例を示す表である。図5は、図4に示す各パスに対する論理演算の結果の例を示す表である。図6は、図5に示された論理演算の結果をラダープログラムにおいて示す図の例である。図7は、図3に示す各パス毎の第1の論理演算の結果の例を示す表である。図8は、図3に示す各パス毎の第2の論理演算の結果の例を示す表である。図9は、図7に示す第1の論理演算の結果と図8に示す第2の論理演算の結果との差分を示す表である。図10は、図9に示される差分をラダープログラムにおいて示す図の例である。
〔1.1 第1実施形態の構成〕
 図1に示すように、本実施形態に係る解析装置1は、制御部11と、記憶部12と、表示装置13とを備える。
 制御部11は、解析装置1の全体を制御する部分であり、各種プログラムを、ROM、RAM、フラッシュメモリ又はハードディスク(HDD)等の記憶領域から適宜読み出して実行することにより、本実施形態における各種機能を実現している。制御部11は、CPUであってよい。制御部11は、プログラム取得部111、範囲設定部112、開始・終了条件設定部113、パス解析部114、リスト生成部115、論理演算部116、パス出力部117を備える。制御部11は、ラダープログラムの実行及び解析を行う。
 プログラム取得部111は、後述の記憶部12から解析装置1の解析対象となるラダープログラムを取得する。
 範囲設定部112は、後述の論理演算部116による論理演算の対象となるパスの範囲を設定する。範囲設定部112により、ラダープログラムを構成する全ての回路ではなく、一部の回路に限定して、論理演算をすることが可能となる。
 開始・終了条件設定部113は、論理演算の開始条件及び終了条件を設定する。開始・終了条件設定部113は、例えば、ラダープログラム中の“X0.0”がONになったことや、解析装置1において、ラダープログラムの解析の開始を指示する開始ボタンが押されたことを開始条件としてもよい。また、開始・終了条件設定部113は、例えば、ラダープログラム中の“X0.0”がOFFになったことや、解析装置1において、ラダープログラムの解析の終了を指示する終了ボタンが押されたことを終了条件としてもよい。
 パス解析部114は、ラダープログラム回路の各パスを解析する。より詳細には、パス解析部114は、ラダープログラム回路に含まれる全てのパスを洗い出す(顕在化させる)。
 リスト生成部115は、パス解析部114によって解析されたパスをリスト化する。
 論理演算部116は、リスト生成部115によって生成されたリストの項目それぞれに含まれる接点の組み合わせ各々の条件値を用いて論理演算する。なお、以降では、リスト生成部115と論理演算部116とを「接点組み合わせ取得部」と総称することがある。
 パス出力部117は、論理演算部116による演算結果に基づいてパスを出力する。例えば、パス出力部117は、論理演算部116による演算結果が真であったパスのみを出力してもよい。あるいは、パス出力部117は、論理演算部116による演算結果が偽であったパスのみを出力してもよい。また、これらの出力先は、後述の記憶部12でもよく、表示装置13であってもよい。
 パス出力部117は、差分比較部118と比較結果出力部119とを備える。
 差分比較部118は、論理演算部116によって、所定のパスが複数回論理演算された場合、これら複数回の演算結果を比較する。
 比較結果出力部119は、差分比較部118による比較結果を、比較結果に含まれる各々の演算結果が対応するパスと共に出力する。
 記憶部12は、プログラム取得部111によって取得されるラダープログラムや、パス出力部117によって出力されるパスや、パス出力部117に含まれる比較結果出力部119によって出力される比較結果等を記憶する記憶装置である。
 表示装置13は、プログラム取得部111によって取得されるラダープログラムや、パス出力部117によって出力されるパスや、パス出力部117に含まれる比較結果出力部119によって出力される比較結果等を表示する表示装置であり、例えば液晶モニタによって実現される。
〔1.2 第1実施形態の動作〕
 以下、図2のフローチャートと、図3~図10に例示される図を参照することにより、本実施形態に係る解析装置1の動作について説明する。
 ステップS11において、プログラム取得部111は、記憶部12からラダープログラムを取得する。
 ステップS12において、範囲設定部112は、論理演算する範囲を設定する。図3は、論理演算する範囲を設定する例を示す。図3の例においては、“R1111.0”及び“F0089.5”を含むパスと、“DDDD”を含むパスと、“X0010.6”及び“EEEE”を含むパスを含む範囲が設定される。
 ステップS13において、開始・終了条件設定部113が、論理演算の開始条件と終了条件とを設定する。
 ステップS14において、パス解析部114が、論理演算する範囲に含まれるラダープログラムのパスを解析する。
 ステップS15において、リスト生成部115が、解析した各パスをリスト化する。図4は、リスト生成部115が生成したリストの例である。
 ステップS16において開始条件が成立した場合(S16:YES)には、処理はステップS17に進行する。開始条件が成立していない場合(S16:NO)には、処理はステップS16に戻る。
 ステップS17において、論理演算部116が、リストの各項目に含まれる接点の組み合わせに対応する条件値を論理演算する。図5は、論理演算の結果の例を示す。
 ステップS18において、パス出力部117は、演算結果が真となったパスを出力する。ここでは例として、パス出力部117は、演算結果が真となったパスを表示装置13に出力するものとするがこれには限定されない。パス出力部117は、演算結果が真となったパスの代わりに、演算結果が偽となったパスを出力してもよい。なお、出力先は、表示装置13ではなく、記憶部12であってもよい。
 ステップS19において、終了条件が成立した場合(S19:YES)には、処理はステップS20に進行する。終了条件が成立していない場合(S19:NO)には、処理はステップS17に戻る。
 ステップS20において、表示装置13は、パス出力部117による出力内容を表示する。図6は、その表示例であり、図5で演算結果が真となったパスNo.2のパスが強調表示される(図6では、そのパスが太線で示される。)。
 なお、解析装置1は、単に演算結果が真となったパスを出力するだけではなく、差分比較部118による比較結果を、比較結果に含まれる各々の演算結果が対応するパスと共に出力してもよい。以下、図7~図9を参照することにより、比較結果に含まれる演算結果を、当該比較結果が対応するパスと共に出力する例を示す。
 図7は、第1の演算結果の例を示す表である。図7の表においては、パスNo.1の演算結果が“FALSE”、パスNo.2の演算結果が“TRUE”、パスNo.3の演算結果が“FALSE”となっている。
 図8は、第2の演算結果の例を示す表である。図8の表においては、パスNo.1の演算結果が“FALSE”、パスNo.2の演算結果が“FALSE”、パスNo.3の演算結果が“FALSE”となっている。図7の表と比較すると、パスNo.2の演算結果が“TRUE”から“FALSE”に変化している。
 図9は、第1の演算結果と第2の演算結果との比較結果を示す表である。上記のように、パスNo.2の演算結果が、第1の演算結果では“TRUE”となっており、第2の演算結果では“FALSE”となっている。図9では、演算結果が異なるパスNo.2の列が太線で囲まれる。
 図10は、比較結果出力部119によって比較結果が表示装置13に出力された結果、表示装置13が表示するラダープログラムの例を示す。図10に示す例においては、パスNo.2のパスが強調表示される(図10では、そのパスが太線で示される。)。なお、表示装置13は、図10に示すラダープログラムの代わりに、図9の表を表示してもよい。
〔2 第2実施形態〕
 以下、本発明の第2実施形態について図11~図13を参照することにより説明する。図11は、本実施形態に係る解析装置1Aの機能について説明する機能ブロック図である。図12は、解析装置1Aの動作を示すフローチャートである。図13は、演算の実行履歴を示す表である。なお、以下では説明の簡略化のため、主として、第2実施形態に係る解析装置1Aが、第1実施形態に係る解析装置1と異なる構成要素や動作について記載し、同一の構成要素や動作については、省略することがある。
〔2.1 第2実施形態の構成〕
 図11を参照すると、解析装置1Aが備える制御部11Aは、解析装置1が備える制御部11に比較して、実行履歴出力部120を更に備える点で異なる。なお、図11では、説明の簡略化のため、解析装置1の制御部11が備える範囲設定部112、開始・終了条件設定部113、差分比較部118、比較結果出力部119を記載していないが、これらのうち1以上を備える構成としてもよい。
 実行履歴出力部120は、論理演算を複数回実行した際、論理演算の結果に変化のあったパスを、パス毎の実行履歴と共に出力する。出力先は、記憶部12であってもよく表示装置13であってもよい。
〔2.2 第2実施形態の動作〕
 以下、図12のフローチャートと、図13に例示される表を参照することにより、本実施形態に係る解析装置1Aの動作について説明する。
 ステップS31において、プログラム取得部111は、記憶部12からラダープログラムを取得する。
 ステップS32において、パス解析部114が、ラダープログラムのパスを解析する。
 ステップS33において、リスト生成部115が、解析した各パスをリスト化する。
 ステップS34において論理演算を開始する場合(S34:YES)には、処理はステップS35に進行する。論理演算をまだ開始しない場合(S34:NO)には、処理はステップS34に戻る。
 ステップS35において、論理演算部116が、リストの各項目に含まれる接点の組み合わせに対応する条件値を論理演算する。
 ステップS36において、パス出力部117は、パスを演算結果と共に出力する。ここでは、パス出力部117が、パスを演算結果と共に、実行履歴出力部120に出力するものとする。
 ステップS37において、論理演算を終了する場合(S37:YES)には、処理はステップS38に進行する。論理演算をまだ終了しない場合(S37:NO)には、処理はステップS35に戻る。
 ステップS38において、実行履歴出力部120は、論理演算の結果に変化のあったパスを、パス毎の実行履歴と共に出力する。ここでは、実行履歴出力部120は、表示装置13に出力するものとするが、これには限定されず、記憶部12に出力してもよい。
 ステップS39において、表示装置13は、実行履歴出力部120から出力された内容を表示する。図13はその表示例である。パスNo.1のパスは、第1回目の論理演算時の演算結果が“TRUE”となっており、第2回目の論理演算時の演算結果が“FALSE”となっており、第3回目の論理演算時の演算結果が“FALSE”となっている。すなわち、パスNo.1のパスは、演算結果が変化しているため、強調表示されている(図13では、その列が太線で囲われる)。
〔3 第3実施形態〕
 以下、本発明の第3実施形態について図14~図18を参照することにより説明する。図14は、本実施形態に係る解析装置1Bの機能について説明する機能ブロック図である。図15は、解析装置1Bの動作を示すフローチャートである。図16は、ラダープログラムを構成する各パスにダミーの出力コイルを設置した例である。図17は、図3に示す各パス毎の出力結果の例を示す表である。図18は、図17に示される出力結果をラダープログラムにおいて示す図の例である。なお、以下では説明の簡略化のため、主として、第3実施形態に係る解析装置1Bが、第1実施形態に係る解析装置1と異なる構成要素や動作について記載し、同一の構成要素や動作については、省略することがある。
〔3.1 第3実施形態の構成〕
 図14を参照すると、解析装置1Bが備える制御部11Bは、解析装置1が備える制御部11に比較して、論理演算部116を備えず、その代わりに、コイル・命令設置部121を備える。
 コイル・命令設置部121は、パス解析部114によって解析された各パス毎に、各パスへダミーの出力コイル又は命令を設置する。なお、本実施形態におけるコイル・命令設置部121は「接点組み合わせ取得部」の一部又は全部を構成する。
 パス出力部117Aは、コイル・命令設置部121によって設置されたダミーの出力コイル又は命令からの出力結果に基づいてパスを出力する。
 開始・終了条件設定部113は、出力コイル又は命令の出力の開始条件及び終了条件を設定する。
 ラダープログラムを実行するラダープログラム実行部122は、コイル・命令設置部121によって設置された出力コイル又は命令を実行する。詳細には、ラダープログラム実行部122は、開始条件が成立した際に出力コイル又は命令の出力を開始し、終了条件が成立した際に出力コイル又は命令の出力を終了する。なお、ラダープログラム実行部は、第1実施形態の制御部11及び第2実施形態の制御部11Aにも、機能構成として備えられている。
 範囲設定部112は、出力コイル又は命令の出力の対象となるパスの範囲を設定する。パス解析部114は、設定された範囲内の各パスを解析する。
 第3実施形態は、第2実施形態における実行履歴出力部120と同様に、出力コイル又は命令の出力を複数回実行した際、出力コイル又は命令の出力の結果に変化のあったパスを、パス毎の実行履歴と共に出力する実行履歴出力部(図示せず)を更に備えていてもよい。
〔3.2 第3実施形態の動作〕
 以下、図15のフローチャートと、図16~図18の図を参照することにより、本実施形態に係る解析装置1Bの動作について説明する。
 ステップS51において、プログラム取得部111は、記憶部12からラダープログラムを取得する。
 ステップS52において、パス解析部114が、ラダープログラムのパスを解析する。
 ステップS53において、コイル・命令設置部121が、解析した各パスへ、ダミーの出力コイル又は命令を設置する。図16は、出力コイルD1~D3の設置例である。
 ステップS54において、ラダープログラム実行部122がラダープログラムの実行を開始する場合(S54:YES)には、処理はステップS55に進行する。ラダープログラム実行部122がラダープログラムの実行をまだ開始しない場合(S54:NO)には、処理はステップS54に戻る。
 ステップS55において、パス出力部117Aが、出力コイル又は命令からの出力結果を取得する。図17は、出力結果の例を示す表である。
 ステップS56において、パス出力部117Aは、出力コイル又は命令からの出力結果が真となったパスを出力する。このステップS56において、パス出力部117Aは、出力結果が真となったパスの代わりに、出力結果が偽となったパスを出力してもよい。なお、パス出力部117Aは、表示装置13に対して出力するものとするが、これには限定されず、出力先は記憶部12であってもよい。
 ステップS57において、ラダープログラム実行部122がラダープログラムの実行を終了する場合(S57:YES)には、処理はステップS58に進行する。ラダープログラム実行部122がラダープログラムの実行をまだ終了しない場合(S57:NO)には、処理はステップS55に戻る。
 ステップS58において、表示装置13は、パス出力部117Aから出力された内容を表示する。図18は、その表示例であり、図17で出力結果がONとなったパスNo.2のパスが強調表示される(図18では、そのパスが太線で示される。)。
 〔4 効果〕
 本発明に係る解析装置は、ラダープログラム回路の各パスを解析するパス解析部114と、解析した各パスの接点の組み合わせを取得する接点組み合わせ取得部と、組み合わせ毎の条件値の演算結果に基づいてパスを出力するパス出力部117とを備える。
 これにより、オペレータが手作業をせずに、ラダープログラムの実行パスを測定することができる。
 また、本発明に係る解析装置は、論理演算を複数回実行した際、論理演算の結果に変化のあったパスを、パス毎の実行履歴と共に出力する実行履歴出力部120を備えることにより、トレースなどの機能を使わずに、ラダープログラムの実行履歴を確認することができる。
 1 解析装置
 11 制御部
 12 記憶部
 13 表示装置
 111 プログラム取得部
 112 範囲設定部
 113 開始・終了条件設定部
 114 パス解析部
 115 リスト生成部
 116 論理演算部
 117,117A パス出力部
 118 差分比較部
 119 比較結果出力部
 120 実行履歴出力部
 121 コイル・命令設置部
 122 ラダープログラム実行部

Claims (12)

  1.  ラダープログラム回路の各パスを解析するパス解析部と、
     解析した各パスの接点の組み合わせを取得する接点組み合わせ取得部と、
     前記組み合わせ毎の条件値の演算結果に基づいてパスを出力するパス出力部とを備える、解析装置。
  2.  前記接点組み合わせ取得部は、取得された接点の組み合わせ毎の条件値について論理演算を行う論理演算部を備える、請求項1に記載の解析装置。
  3.  前記接点組み合わせ取得部は、取得された接点の組み合わせ毎に、各パスへ出力コイル又は命令を設置するコイル・命令設置部を備え、
     前記パス出力部は、設置された出力コイル又は命令の出力に基づいて、パスを出力する、請求項1に記載の解析装置。
  4.  前記論理演算の開始条件及び終了条件を設定する開始・終了条件設定部を更に備え、
     前記論理演算部は、前記開始条件が成立した際に前記論理演算を開始し、前記終了条件が成立した際に前記論理演算を終了する、請求項2に記載の解析装置。
  5.  前記論理演算の対象となるパスの範囲を設定する範囲設定部を更に備え、
     前記パス解析部は、設定された範囲内の各パスを解析する、請求項2又は請求項4に記載の解析装置。
  6.  前記パス出力部は、
      前記論理演算を複数回実行した際、前記論理演算部による複数の演算結果を比較する差分比較部と、
     前記差分比較部による比較結果を出力する比較結果出力部とを備える、請求項2、請求項4又は請求項5に記載の解析装置。
  7.  前記論理演算を複数回実行した際、前記論理演算の結果に変化のあったパスを、パス毎の実行履歴と共に出力する実行履歴出力部を更に備える、請求項2、請求項4、請求項5又は請求項6に記載の解析装置。
  8.  前記出力コイル又は命令の出力の開始条件及び終了条件を設定する開始・終了条件設定部と、
     ラダープログラムを実行するラダープログラム実行部と、を更に備え、
     前記ラダープログラム実行部は、前記開始条件が成立した際に前記出力コイル又は命令の出力を開始し、前記終了条件が成立した際に前記出力コイル又は命令の出力を終了する、請求項3に記載の解析装置。
  9.  前記出力コイル又は命令の出力の対象となるパスの範囲を設定する範囲設定部を更に備え、
     前記パス解析部は、設定された範囲内の各パスを解析する、請求項3又は請求項8に記載の解析装置。
  10.  前記パス出力部は、
     前記出力コイル又は命令の出力を複数回実行した際、前記出力コイル又は命令の出力結果を比較する差分比較部と、
     前記差分比較部による比較結果を出力する比較結果出力部とを備える、請求項3、請求項8又は請求項9に記載の解析装置。
  11.  前記出力コイル又は命令の出力を複数回実行した際、前記出力コイル又は命令の出力の結果に変化のあったパスを、パス毎の実行履歴と共に出力する実行履歴出力部を更に備える、請求項3、請求項8、請求項9又は請求項10に記載の解析装置。
  12.  前記パス出力部による出力結果を表示する表示装置を更に備える、請求項1から請求項11のいずれか1項に記載の解析装置。
PCT/JP2021/046507 2020-12-21 2021-12-16 ラダープログラム解析装置 Ceased WO2022138442A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022571374A JP7601906B2 (ja) 2020-12-21 2021-12-16 ラダープログラム解析装置
US18/255,348 US12450149B2 (en) 2020-12-21 2021-12-16 Ladder program analysis device used in a programmable logic controller (PLC)
DE112021005500.3T DE112021005500T5 (de) 2020-12-21 2021-12-16 Kontaktplanprogramm-Analysevorrichtung
CN202180083811.0A CN116615720A (zh) 2020-12-21 2021-12-16 梯形图程序解析装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020211354 2020-12-21
JP2020-211354 2020-12-21

Publications (1)

Publication Number Publication Date
WO2022138442A1 true WO2022138442A1 (ja) 2022-06-30

Family

ID=82159310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/046507 Ceased WO2022138442A1 (ja) 2020-12-21 2021-12-16 ラダープログラム解析装置

Country Status (5)

Country Link
US (1) US12450149B2 (ja)
JP (1) JP7601906B2 (ja)
CN (1) CN116615720A (ja)
DE (1) DE112021005500T5 (ja)
WO (1) WO2022138442A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS605347A (ja) * 1983-06-23 1985-01-11 Fujitsu Ltd 複数プロセツサ用スタテイツクトレ−ス装置
JPH10283005A (ja) * 1997-04-04 1998-10-23 Mitsubishi Electric Corp シーケンスプログラムの表示方法、および、実行方法
JP2015170009A (ja) * 2014-03-05 2015-09-28 株式会社東芝 表示情報生成装置、プログラム実行状況表示システム、方法およびプログラム

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5781776A (en) * 1995-11-01 1998-07-14 Allen Bradley Company, Inc. Industrial controller permitting program editing during program execution
US20120072777A1 (en) * 2009-05-27 2012-03-22 Mitsubishi Electric Corporation Debugging device, debugging method, and computer program for sequence program
DE112012007174T5 (de) * 2012-11-26 2015-08-06 Mitsubishi Electric Corporation Kontaktplan-Anzeigevorrichtung und Kontaktplan-Anzeigeverfahren
JP2015149004A (ja) * 2014-02-07 2015-08-20 富士電機株式会社 ラダー図試験データ作成装置
JP6309927B2 (ja) * 2015-09-16 2018-04-11 ファナック株式会社 Ncプログラム運転と連動した関連信号の自動トレース機能を有する数値制御装置
JP6827340B2 (ja) 2017-02-17 2021-02-10 三菱重工エンジニアリング株式会社 ソフトウェア試験装置、ソフトウェア試験システム、ソフトウェア試験方法およびプログラム
JP6568152B2 (ja) * 2017-06-30 2019-08-28 ファナック株式会社 数値制御装置
WO2020105173A1 (ja) * 2018-11-22 2020-05-28 三菱電機株式会社 データ制御装置、プログラマブルロジックコントローラ及びデータ制御方法
WO2020174627A1 (ja) * 2019-02-27 2020-09-03 三菱電機株式会社 設計支援装置、設計支援方法および設計支援プログラム
EP3715975B1 (en) * 2019-03-28 2023-03-01 Mitsubishi Electric R&D Centre Europe B.V. Method and apparatus for analysing a ladder program
JP7277292B2 (ja) * 2019-07-08 2023-05-18 ファナック株式会社 Plc装置
US11409257B2 (en) * 2019-10-03 2022-08-09 Keyence Corporation Setting device that sets a programmable logic controller and PLC system that collects control data and a dashboard for displaying control data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS605347A (ja) * 1983-06-23 1985-01-11 Fujitsu Ltd 複数プロセツサ用スタテイツクトレ−ス装置
JPH10283005A (ja) * 1997-04-04 1998-10-23 Mitsubishi Electric Corp シーケンスプログラムの表示方法、および、実行方法
JP2015170009A (ja) * 2014-03-05 2015-09-28 株式会社東芝 表示情報生成装置、プログラム実行状況表示システム、方法およびプログラム

Also Published As

Publication number Publication date
JPWO2022138442A1 (ja) 2022-06-30
DE112021005500T5 (de) 2024-01-18
US12450149B2 (en) 2025-10-21
CN116615720A (zh) 2023-08-18
JP7601906B2 (ja) 2024-12-17
US20240028333A1 (en) 2024-01-25

Similar Documents

Publication Publication Date Title
US8453106B2 (en) Graphical user interface for exploring source code execution behavior
US10445225B2 (en) Command coverage analyzer
CN105279093A (zh) 软件测试方法、装置及设备
JP6351906B1 (ja) デバッグ装置
JPH10320234A (ja) ソフトウェアの自動テスト方法
JP2004004050A (ja) 試験実行システムを供給する製品および試験実行システムを動作させる方法
WO2022138442A1 (ja) ラダープログラム解析装置
JP6275009B2 (ja) 試験装置及び試験プログラム
JP6978458B2 (ja) シーケンスプログラムのトレースに用いるシーケンスプログラム処理装置
JP7750409B2 (ja) 情報処理装置、試験方法、及び試験プログラム
KR101999321B1 (ko) 프로그램 검증 시스템 및 검증 방법
WO2020065826A1 (ja) バリデーション装置、バリデーション方法およびバリデーションプログラム
JP2019106107A (ja) プログラム、情報処理装置及び画面テストシステム
KR101038877B1 (ko) 테스트 절차 생성 시스템, 그 컴퓨터 구현 방법 및 컴퓨터 판독가능 기록 매체
JP2010025589A (ja) 試験装置及び試験プログラム
US20240211385A1 (en) Test support apparatus, test support method and program
JP2009223804A (ja) 端末装置、及び検査方法
JP2019040280A (ja) 出力プログラム、出力方法および情報処理装置
JP2005090959A (ja) 制御プログラムおよび測定システム
WO2025186989A1 (ja) プログラム、処理装置、及び方法
JP5680040B2 (ja) 移動体通信端末試験システム及び移動体通信端末試験方法
WO2018123039A1 (ja) プログラム比較装置およびプログラム差分照合方法
JP2007128456A (ja) プログラム管理装置
CN116737572A (zh) 一种基于互联网的应用软件测试方法、系统及存储介质
JP4888148B2 (ja) 半導体試験装置

Legal Events

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

Ref document number: 21910590

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022571374

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 18255348

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 202180083811.0

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 112021005500

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21910590

Country of ref document: EP

Kind code of ref document: A1

WWG Wipo information: grant in national office

Ref document number: 18255348

Country of ref document: US