JPWO2019003313A1 - Debug device - Google Patents

Debug device Download PDF

Info

Publication number
JPWO2019003313A1
JPWO2019003313A1 JP2018505755A JP2018505755A JPWO2019003313A1 JP WO2019003313 A1 JPWO2019003313 A1 JP WO2019003313A1 JP 2018505755 A JP2018505755 A JP 2018505755A JP 2018505755 A JP2018505755 A JP 2018505755A JP WO2019003313 A1 JPWO2019003313 A1 JP WO2019003313A1
Authority
JP
Japan
Prior art keywords
execution
instruction
executed
operation verification
unit
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.)
Granted
Application number
JP2018505755A
Other languages
Japanese (ja)
Other versions
JP6351906B1 (en
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Application granted granted Critical
Publication of JP6351906B1 publication Critical patent/JP6351906B1/en
Publication of JPWO2019003313A1 publication Critical patent/JPWO2019003313A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Debugging And Monitoring (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

発明にかかるデバッグ装置(100)は、検証対象シーケンスプログラム(16)に含まれる命令を実行するプログラム実行部(12)と、プログラム実行部(12)で実行された命令と、実行された命令の実行内容と実行された命令の直前の命令の実行結果との関係を表す実行種別と、を判定する動作検証状況判定部(14)と、動作検証状況判定部(14)で判定された実行種別毎の命令の実行有無と、実行種別と、実行された命令を識別する識別情報とを対応付けて記憶する動作検証状況記憶部(15)と、プログラム実行部(12)で実行された命令と実行された命令の実行種別とを命令の実行有無に応じて視認可能な形式で表示する動作検証状況表示部(21)と、を備える。A debugging device (100) according to the invention includes a program execution unit (12) for executing an instruction included in a verification target sequence program (16), an instruction executed by the program execution unit (12), and an instruction executed. Operation verification status determination unit (14) that determines the execution type and the execution type that represents the relationship between the execution result of the instruction immediately before the executed instruction and the execution type determined by the operation verification status determination unit (14) Operation verification status storage unit (15) that stores the execution status of each instruction, execution type, and identification information that identifies the executed instruction, and the instruction executed by the program execution unit (12) And an operation verification status display unit (21) for displaying the execution type of the executed instruction in a format that can be visually recognized according to the execution status of the instruction.

Description

本発明は、シーケンスプログラムのデバッグに使用されるデバッグ装置に関する。   The present invention relates to a debugging apparatus used for debugging a sequence program.

一般にプログラムの開発では、作成したプログラムが所望の動作をするか動作検証を行い、動作検証により不具合を発見した場合にはプログラムを修正して不具合を解消させるといったデバッグを実施する。   In general, in program development, operation verification is performed to determine whether the created program performs a desired operation, and debugging is performed such that if a defect is found by operation verification, the program is corrected to eliminate the defect.

プログラムの動作検証の網羅率をカバレッジと呼び、動作検証およびデバッグを行ったプログラムは不具合がないと見なせることから、カバレッジはプログラムの品質指標として用いられている。カバレッジにはいくつかの種類があり、代表的なものとして、プログラムを構成する全ての処理のうち、1回以上実行した処理の割合を示すC0カバレッジがある。また、カバレッジはその意味から、プログラム開発における動作検証の進捗を示す指標としても用いることができる。   The coverage rate of program operation verification is called coverage, and the program used for operation verification and debugging can be considered to have no defects, so coverage is used as a program quality indicator. There are several types of coverage, and representatively, there is C0 coverage which indicates the ratio of processing executed one or more times to all processing constituting a program. In addition, coverage can also be used as an indicator that indicates the progress of operation verification in program development.

工場などの生産現場における作業の自動化を実現するFA(Factory Automation)分野ではシーケンスプログラムが使用される。シーケンスプログラムは、ある処理を実施する最小単位である命令を複数組み合わせて構成される。命令は、実行条件と呼ばれる属性を持ち、実行条件と、直前の命令に対し何らかの計算を実施する論理式(以下、前条件と呼ぶ)の結果とにより、命令の実行要否が判断される。なお、前条件が成立する場合を真、成立しない場合を偽と称する。   Sequence programs are used in the FA (Factory Automation) field that realizes automation of work at production sites such as factories. The sequence program is configured by combining a plurality of instructions, which is the minimum unit for performing a certain process. An instruction has an attribute called an execution condition, and the execution necessity of the instruction is determined based on the execution condition and the result of a logical expression (hereinafter referred to as a pre-condition) that performs some calculation on the immediately preceding instruction. The case where the pre-condition is satisfied is called true, and the case where it is not satisfied is called false.

実行条件には複数の種類があり、前条件が真の場合にのみ命令が実行され、前条件が偽の場合は実行されないON時実行、前条件が偽から真に変化した場合のみ命令が実行される立上り実行、前条件の真偽に関係なく常に命令が実行される常時実行などがある。常時実行の命令はON実行とOFF実行という二種類の実行種別を持ち、ON実行とOFF実行とは実行結果が異なる。すなわち、常時実行の命令は前条件が真の場合と偽の場合とで実行する内容が異なる。ON実行は前条件が真の場合に実行され、OFF実行は前条件が偽の場合に実行される。   There are multiple types of execution conditions, and the instruction is executed only when the precondition is true, not executed when the precondition is false, ON when executed, and the instruction is executed only when the precondition changes from false to true There is a rising execution that is performed and a constant execution in which an instruction is always executed regardless of the truth or falseness of the pre-condition. The instruction for constant execution has two types of execution types of ON execution and OFF execution, and the execution results of ON execution and OFF execution are different. That is, the instruction to be always executed differs in the contents to be executed depending on whether the pre-condition is true or false. ON execution is performed when the precondition is true, and OFF execution is performed when the precondition is false.

上述したように、シーケンスプログラムを構成する命令には、常時実行といった、C言語等の一般的に使用されるプログラミング言語にはない実行条件が存在するため、カバレッジを得るために必要な動作検証も、一般的に使用されるプログラミング言語とは異なる。例えばC0カバレッジを100%にする場合を考える。C0カバレッジとは、全ての実行可能な処理のうち、実行された処理の割合を示す指標である。一般的なプログラムでは、処理が実行される条件が偽の場合は処理がスキップされるため、動作検証の対象の命令のうち、処理が実行される条件が真の場合に実行された処理のみ評価すれば、C0カバレッジは100%となる。一方、シーケンスプログラムにおいては、命令それぞれが持つ実行条件を考慮する必要がある。動作検証の対象の命令に常時実行の命令が含まれている場合、C0カバレッジを100%とするためには、常時実行のON実行およびOFF実行の両方を検証する必要がある。   As described above, since instructions constituting a sequence program have execution conditions that are not available in commonly used programming languages such as C, such as constant execution, operation verification necessary to obtain coverage is also possible. It is different from the commonly used programming language. For example, consider the case where the C0 coverage is set to 100%. The C0 coverage is an index indicating the ratio of executed processing to all executable processing. In a general program, if the condition under which the process is executed is false, the process is skipped. Therefore, among the instructions of the operation verification target, only the process executed when the condition under which the process is executed is true is evaluated. C0 coverage would then be 100%. On the other hand, in a sequence program, it is necessary to consider the execution conditions of each instruction. In the case where the instruction subject to operation verification includes an instruction for constant execution, in order to make the C0 coverage 100%, it is necessary to verify both ON execution and OFF execution of constant execution.

特許文献1には、シーケンス制御回路図の定義ファイルとレジスタの変化状態とを照合し、照合結果からカバレッジである動作網羅率を算出するとともに動作網羅率を表示するシーケンス制御システムが開示されている。   Patent Document 1 discloses a sequence control system which collates a definition file of a sequence control circuit diagram with a change state of a register, calculates an operation coverage percentage which is coverage from the comparison result, and displays the operation coverage percentage. .

特開2000−293208号公報JP, 2000-293208, A

一般的なプログラミング言語のカバレッジを視覚的に表現する技術および定量的に百分率で表す技術は、前条件が真の場合に実行された命令に対してのみ実現される。一方、シーケンスプログラムでは同一の命令であっても前条件により実行の種別が異なる場合があり、前条件が真の場合の検証のみではカバレッジを正確に計測することはできない。このため、シーケンスプログラムではカバレッジの視覚的な表現が困難であり、また動作検証の進捗管理および確認が困難である、という問題があった。   Techniques for visually representing coverage of a general programming language and techniques for quantitatively representing by percentage are implemented only for instructions executed when the precondition is true. On the other hand, even in the case of a sequence program, even in the case of the same instruction, the type of execution may differ depending on the pre-condition, and coverage can not be measured accurately only by verification when the pre-condition is true. For this reason, there is a problem that visual representation of coverage is difficult in the sequence program, and progress management and confirmation of operation verification are difficult.

特許文献1には、シーケンス制御回路図および試験パターンのカバレッジを算出する技術が示されている。しかしながら、レジスタの変化の有無からカバレッジを算出しており、ON実行およびOFF実行といった命令の実行種別を区別することはしていない。そのため、実行された命令の実行種別をユーザが確認して常時実行の命令の検証が完了したか否かを判断する作業が必要となり、効率的にデバッグを進めることが難しいという問題がある。   Patent Document 1 discloses a technique for calculating coverage of a sequence control circuit diagram and a test pattern. However, the coverage is calculated from the presence or absence of the change of the register, and the execution types of the instruction such as ON execution and OFF execution are not distinguished. Therefore, there is a problem that it is difficult for the user to confirm the execution type of the executed instruction and to determine whether the verification of the constantly executed instruction is completed or not, which makes it difficult to efficiently perform the debugging.

本発明は、上記に鑑みてなされたものであって、デバッグの作業効率を向上させるデバッグ装置を得ることを目的とする。   The present invention has been made in view of the above, and it is an object of the present invention to obtain a debugging device that improves the efficiency of debugging work.

上述した課題を解決し、目的を達成するために、本発明にかかるデバッグ装置は、シーケンスプログラムに含まれる命令を実行する実行部と、実行部で実行された命令と、実行された命令の実行内容と前記実行された命令の直前の命令の実行結果との関係を表す実行種別と、を判定する判定部と、を備える。また、デバッグ装置は、判定部で判定された実行種別毎の命令の実行有無と、実行種別と、実行された命令を識別する識別情報とを対応付けて記憶する記憶部と、実行部で実行された命令と実行された命令の実行種別とを命令の実行有無に応じて視認可能な形式で表示する表示部と、を備える。   In order to solve the problems described above and achieve the object, the debugging device according to the present invention includes an execution unit that executes instructions included in a sequence program, an instruction executed by the execution unit, and an execution of the executed instructions. A determination unit that determines an execution type representing a relation between contents and an execution result of an instruction immediately before the executed instruction; Also, the debugging device executes the execution by the storage unit that stores the execution status of the instruction for each execution type determined by the determination unit, the execution type, and the identification information that identifies the executed instruction, and the execution unit And a display unit for displaying the executed instruction and the execution type of the executed instruction in a viewable form according to the execution or non-execution of the instruction.

本発明にかかるデバッグ装置は、デバッグの作業効率を向上させることができるという効果を奏する。   The debugging device according to the present invention has an effect that the work efficiency of debugging can be improved.

実施の形態1にかかるデバッグ装置の構成例を示す図FIG. 1 is a diagram showing an example of the configuration of a debugging device according to a first embodiment. 実施の形態1にかかる動作検証設定入力部が動作検証設定を受け付ける際に表示する動作検証設定ダイアログボックスの一例を示す図A diagram showing an example of an operation verification setting dialog box displayed when the operation verification setting input unit according to the first embodiment receives an operation verification setting. 実施の形態1にかかるPLC(Programmable Logic Controller)で実行されるシーケンスプログラムおよびシーケンスプログラムを構成する命令の一例を示す図A diagram showing an example of a sequence program executed by a PLC (Programmable Logic Controller) according to a first embodiment and an instruction constituting the sequence program 実施の形態1にかかる動作検証状況判定部が収集した動作検証状況を保存する形式の一例を示す図FIG. 6 is a diagram showing an example of a format for storing the operation verification status collected by the operation verification status determination unit according to the first embodiment. 実施の形態1にかかる動作検証状況表示部が、動作検証の状況をシーケンスプログラムの表示背景を変更することによりユーザに通知する場合の表示例を示す図A diagram showing a display example in the case where the operation verification status display unit according to the first embodiment notifies the user of the operation verification status by changing the display background of the sequence program. 実施の形態1にかかる動作検証状況表示部が、動作検証の状況をシーケンスプログラムの表示背景を変更することによりユーザに通知する場合の他の表示例を示す図The figure which shows another display example in the case where the operation verification condition display part concerning Embodiment 1 notifies a user of the condition of operation verification by changing the display background of a sequence program. 実施の形態1にかかる動作検証状況表示部が、動作検証の状況をシーケンスプログラムの各命令に対応づけて表示するマークを変更することによりユーザに通知する場合の表示例を示す図A diagram showing a display example in the case where the operation verification status display unit according to the first embodiment notifies the user by changing the mark displayed by associating the operation verification status with each command of the sequence program. 実施の形態1にかかる動作検証状況表示部が、プログラムの表示を変更することにより動作検証の状況を表す場合の表示例を示す図A diagram showing a display example when the operation verification status display unit according to the first embodiment represents the operation verification status by changing the display of the program. 実施の形態1にかかるデバッグ装置が動作検証状況を表示する動作を示すフローチャートThe flowchart which shows the operation where the debug device which depends on the form 1 of execution displays operational verification circumstance 実施の形態1にかかる動作検証状況表示部が複数の動作検証状況の中から選択した1つ以上の動作検証状況に基づいて表示を行う動作を示すフローチャートThe flowchart which shows the operation | movement which the operation verification condition display part concerning Embodiment 1 performs a display based on the one or more operation verification condition which was selected out of several operation verification conditions 実施の形態1にかかる動作検証状況表示部が表示装置に表示させる動作検証状況選択画面の一例を示す図A diagram showing an example of an operation verification status selection screen displayed on a display device by the operation verification status display unit according to the first embodiment. 実施の形態1にかかるデバッグ装置のPLCのハードウェア構成を示す図The figure which shows the hardware constitutions of PLC of the debugging apparatus concerning Embodiment 1 実施の形態2にかかるデバッグ装置の構成例を示す図A diagram showing an example of configuration of a debugging device according to a second embodiment

以下に、本発明の実施の形態にかかるデバッグ装置を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Hereinafter, a debugging device according to an embodiment of the present invention will be described in detail based on the drawings. The present invention is not limited by the embodiment.

実施の形態1.
図1は、本発明の実施の形態1にかかるデバッグ装置の構成例を示す図である。実施の形態1にかかるデバッグ装置100は、プログラマブルロジックコントローラ(PLC:Programmable Logic Controller)1と、コンピュータ2内部のエンジニアリングツール20とを含んで構成される。エンジニアリングツール20は、エンジニアリングツール20として動作するためのプログラムをコンピュータ2が実行することにより実現される。コンピュータ2は、エンジニアリングツール20として動作するためのプログラムを実行するプロセッサ、プログラムおよび各種データを保持するメモリ、ディスプレイである表示装置、マウスおよびキーボードである入力装置、通信インタフェースといった各種ハードウェアを備える。PLC1とコンピュータ2はネットワークケーブル3を介して接続される。なお、接続経路については無線を使用してもよい。
Embodiment 1
FIG. 1 is a diagram showing a configuration example of a debugging device according to a first embodiment of the present invention. The debugging device 100 according to the first embodiment includes a programmable logic controller (PLC: Programmable Logic Controller) 1 and an engineering tool 20 in the computer 2. The engineering tool 20 is realized by the computer 2 executing a program for operating as the engineering tool 20. The computer 2 includes various hardwares such as a processor that executes a program for operating as the engineering tool 20, a memory that holds the program and various data, a display that is a display, an input device that is a mouse and a keyboard, and a communication interface. The PLC 1 and the computer 2 are connected via the network cable 3. Note that wireless connection may be used for the connection path.

PLC1は、プログラムメモリ11、プログラム実行部12および動作検証結果管理部13を備える。動作検証結果管理部13は、動作検証状況判定部14および動作検証状況記憶部15を備える。PLC1は、2つの動作モード、具体的には、被制御機器を制御する通常モードと、シーケンスプログラムのデバッグを行うデバッグモードとを有し、図示を省略したスイッチといった切り替え手段をユーザが操作することにより動作モードを選択可能に構成されている。動作検証結果管理部13は、デバッグモードが選択されている場合に動作する。   The PLC 1 includes a program memory 11, a program execution unit 12, and an operation verification result management unit 13. The operation verification result management unit 13 includes an operation verification status determination unit 14 and an operation verification status storage unit 15. The PLC 1 has two operation modes, specifically, a normal mode for controlling the controlled device and a debug mode for debugging the sequence program, and the user operates the switching means such as a switch (not shown). Is configured to be able to select the operation mode. The operation verification result management unit 13 operates when the debug mode is selected.

プログラムメモリ11は、被制御機器を制御するシーケンスプログラムを記憶するメモリであり、検証対象シーケンスプログラム16を保持する。検証対象シーケンスプログラム16は、デバッグ装置100を使用して行うデバッグの対象プログラムである。プログラム実行部12は、プログラムメモリ11で保持されているシーケンスプログラムを実行する実行部である。プログラム実行部12は、デバッグモードが選択されている場合は検証対象シーケンスプログラム16を実行する。検証対象シーケンスプログラム16は、プログラムメモリ11で保持されているシーケンスプログラムの中からユーザが指定したシーケンスプログラムである。また、プログラム実行部12は、デバイスメモリ17を有する。デバイスメモリ17は、プログラム実行部12がシーケンスプログラムを実行すると実行内容に従って値が更新される各種のデバイス値を保持するメモリである。デバイス値は、PLC1が制御対象機器の制御で使用する制御情報の値を示す。FA分野では、制御情報を識別する情報をデバイスと呼び、デバイス値は制御対象機器の状態を示す。   The program memory 11 is a memory for storing a sequence program for controlling the controlled device, and holds a verification target sequence program 16. The verification target sequence program 16 is a program to be debugged using the debugging device 100. The program execution unit 12 is an execution unit that executes the sequence program held in the program memory 11. The program execution unit 12 executes the verification target sequence program 16 when the debug mode is selected. The verification target sequence program 16 is a sequence program designated by the user from among the sequence programs held in the program memory 11. The program execution unit 12 also has a device memory 17. The device memory 17 is a memory that holds various device values whose values are updated according to the execution content when the program execution unit 12 executes the sequence program. The device value indicates the value of control information that the PLC 1 uses to control the control target device. In the FA field, information identifying control information is called a device, and the device value indicates the state of the control target device.

動作検証結果管理部13の動作検証状況判定部14は、デバッグモードにおいてプログラム実行部12が検証対象シーケンスプログラム16を実行しているとき、命令の実行種別および命令の実行有無と命令の組を、動作検証状況として取得し、動作検証状況記憶部15に保存する。すなわち、動作検証状況判定部14は、プログラム実行部12で実行された、検証対象シーケンスプログラム16内の命令および実行された命令の実行種別を判定する判定部であり、判定結果を実行された命令と対応付けて動作検証状況記憶部15に保存する。命令の実行種別は上述したON実行およびOFF実行といった情報であり、命令で実行する内容とこの命令の直前の命令の実行結果との関係を表す。動作検証状況判定部14は、プログラム実行部12のデバイスメモリ17から読み出したデバイス値を解析することにより動作検証状況を取得する。動作検証状況判定部14は、デバイスメモリ17内の特定のデバイス値が更新されたか否かをモニタすることにより、特定のデバイス値に対応する命令が実行されたか否かを知ることができる。また、動作検証状況判定部14は、プログラム実行部12がシーケンスプログラム中のどの命令を実行しようとしているかについても、デバイスメモリ17内のデバイス値をモニタすることにより知ることができる。各命令の実行種別および前条件はシーケンスプログラムを解析することにより知ることができる。動作検証結果管理部13の動作検証状況記憶部15は、動作検証状況判定部14が取得した動作検証状況を受け取り記憶する記憶部である。   When the program execution unit 12 is executing the verification target sequence program 16 in the debug mode, the operation verification status determination unit 14 of the operation verification result management unit 13 determines the combination of instruction execution type, instruction execution availability, and instruction, The operation verification status is acquired and stored in the operation verification status storage unit 15. That is, the operation verification status determination unit 14 is a determination unit that determines the execution type of the instruction in the verification target sequence program 16 executed by the program execution unit 12 and the executed instruction, and the instruction for which the determination result has been executed , And stored in the operation verification status storage unit 15 in association with the above. The execution type of the instruction is information such as ON execution and OFF execution described above, and represents the relationship between the content to be executed by the instruction and the execution result of the instruction immediately before this instruction. The operation verification status determination unit 14 analyzes the device value read out from the device memory 17 of the program execution unit 12 to acquire the operation verification status. The operation verification status determination unit 14 can know whether or not an instruction corresponding to a specific device value has been executed by monitoring whether or not the specific device value in the device memory 17 has been updated. The operation verification status determination unit 14 can also know which instruction in the sequence program the program execution unit 12 intends to execute by monitoring the device value in the device memory 17. The execution type and the pre-condition of each instruction can be known by analyzing the sequence program. The operation verification status storage unit 15 of the operation verification result management unit 13 is a storage unit that receives and stores the operation verification status acquired by the operation verification status determination unit 14.

エンジニアリングツール20は、動作検証状況表示部21、動作検証設定入力部22および動作検証設定書込部23を有する。   The engineering tool 20 includes an operation verification status display unit 21, an operation verification setting input unit 22, and an operation verification setting writing unit 23.

動作検証状況表示部21は、動作検証状況記憶部15で記憶されている動作検証状況に基づき、検証対象シーケンスプログラム16の動作検証の進捗状況を、ユーザが視認可能な形式でコンピュータ2の表示装置(図示せず)に表示する表示部である。動作検証状況表示部21は、シーケンスプログラムを表示装置に表示する機能も有する。   The operation verification status display unit 21 displays the progress status of the operation verification of the verification target sequence program 16 based on the operation verification status stored in the operation verification status storage unit 15 in a format that allows the user to view it. It is a display part displayed on (not shown). The operation verification status display unit 21 also has a function of displaying a sequence program on a display device.

動作検証設定入力部22は、動作検証対象のシーケンスプログラムの設定と、動作検証対象のシーケンスプログラムの実行回数の設定と、検証対象の実行種別の設定とを、動作検証設定としてユーザから受け付ける。図2は、実施の形態1にかかる動作検証設定入力部22が動作検証設定を受け付ける際に表示装置が表示する動作検証設定ダイアログボックスの一例を示す図である。図2に示した動作検証設定ダイアログボックスは、検証対象プログラム名および検証対象実行種別がプルダウンにより設定可能に構成され、検証対象実行回数がテキストボックスへの数値入力により設定可能に構成されている。図2に示されている内容の状態でOKボタンが押下された場合、動作検証設定入力部22は、名称がMAINのシーケンスプログラムに含まれているON実行の命令を対象として、合計10回検証を行う内容の動作検証設定を受け付ける。検証対象実行種別では、ON実行およびOFF実行を個別に指定することができるほか、ON実行およびOFF実行の両方を検証対象として選択できることとする。なお、動作検証設定を図2に示した検証対象プログラム名、検証対象実行回数および検証対象実行種別に限定するものではない。その他の情報を動作検証設定に含ませてもよい。また、本実施の形態では、動作検証設定入力部22が動作検証設定の入力をユーザから受け付けることとしたが、規定の形式で記述されたファイルの入力により、エンジニアリングツール20が動作検証設定の情報を取得するようにすることも可能である。   The operation verification setting input unit 22 receives the setting of the sequence program to be operation verified, the setting of the number of executions of the sequence program to be operation verified, and the setting of the execution type to be verified from the user as the operation verification setting. FIG. 2 is a diagram showing an example of the operation verification setting dialog box displayed by the display device when the operation verification setting input unit 22 according to the first embodiment receives the operation verification setting. The operation verification setting dialog box shown in FIG. 2 is configured such that the verification target program name and the verification target execution type can be set by pull-down, and the verification target execution frequency can be set by numerical input to the text box. When the OK button is pressed in the state of the content shown in FIG. 2, the operation verification setting input unit 22 verifies a total of 10 times for the ON execution instruction included in the sequence program whose name is MAIN. Accept the operation verification settings of the content to be performed. In the verification target execution type, ON execution and OFF execution can be individually designated, and both ON execution and OFF execution can be selected as verification targets. The operation verification setting is not limited to the verification target program name, the verification target execution frequency, and the verification target execution type shown in FIG. Other information may be included in the operation verification setting. In the present embodiment, the operation verification setting input unit 22 receives the input of the operation verification setting from the user. However, when the file described in the prescribed format is input, the information of the operation verification setting of the engineering tool 20 is It is also possible to get

動作検証設定書込部23は、動作検証設定入力部22が受け付けた動作検証設定を示す情報を、動作検証結果管理部13の動作検証状況判定部14に書き込み、書き込んだ情報に従って動作するよう、動作検証状況判定部14を設定する。仮に、動作検証設定入力部22が図2に示されている内容の動作検証設定を受け付け、これに対応する情報を動作検証設定書込部23が動作検証状況判定部14に書き込んだ場合、動作検証状況判定部14は、名称がMAINのシーケンスプログラムがプログラム実行部12で実行された場合に、このシーケンスプログラムが10回実行されるまでの間、ON実行の命令が実行されたか否かをモニタする。この場合、動作検証状況判定部14は、シーケンスプログラムが10回実行されるまでの間のモニタ結果を動作検証状況として動作検証状況記憶部15に書き込む。   The operation verification setting writing unit 23 writes information indicating the operation verification setting received by the operation verification setting input unit 22 in the operation verification state determination unit 14 of the operation verification result management unit 13 and operates according to the written information. The operation verification status determination unit 14 is set. If the operation verification setting input unit 22 receives the operation verification setting of the content shown in FIG. 2 and the information corresponding to this is written in the operation verification state determination unit 14, the operation is performed. When the sequence program whose name is MAIN is executed by the program execution unit 12, the verification status determination unit 14 monitors whether an instruction for ON execution is executed until the sequence program is executed ten times. Do. In this case, the operation verification status determination unit 14 writes the monitoring result until the sequence program is executed ten times in the operation verification status storage unit 15 as the operation verification status.

図3は、実施の形態1にかかるPLC1で実行されるシーケンスプログラムおよびシーケンスプログラムを構成する命令の一例を示す図である。図3に示したシーケンスプログラムはエンジニアリングツール20の図示を省略したプログラム作成部にて作成される。シーケンスプログラムは、PLC1が実行可能なコードに変換された後、エンジニアリングツール20からPLC1へ伝送され、PLC1のプログラムメモリ11に書き込まれる。なお、図3ではラダー言語で作成したシーケンスプログラムの例を示している。図3に記載の「(0)」、「(2)」、「(4)」および「(6)」はステップ番号である。   FIG. 3 is a diagram showing an example of a sequence program executed by the PLC 1 according to the first embodiment and instructions constituting the sequence program. The sequence program shown in FIG. 3 is created by a program creation unit whose illustration of the engineering tool 20 is omitted. The sequence program is converted from the PLC1 into an executable code, transmitted from the engineering tool 20 to the PLC1, and written to the program memory 11 of the PLC1. FIG. 3 shows an example of a sequence program created in ladder language. “(0)”, “(2)”, “(4)” and “(6)” described in FIG. 3 are step numbers.

図4は、実施の形態1にかかる動作検証状況判定部14がプログラム実行部12から収集した動作検証状況を動作検証状況記憶部15へ保存する形式の一例を示す図である。図4に示したように、動作検証状況は、命令を表すステップ番号(step number)、命令の実行条件を表すランタイプ(run type)、ON実行完了フラグおよびOFF実行完了フラグを含む。ステップ番号は命令の識別情報である。また、この識別情報は、実行されたシーケンスプログラムの中から、どの命令が実行されたかを特定する為の情報である。ランタイプが‘0’の場合は常時実行を表し、‘1’の場合は常時実行ではない実行条件を表す。動作検証状況判定部14は、プログラム実行部12のデバイスメモリ17に格納されているデバイス値を読み出すことにより、どのステップ番号の命令が実行されたのかおよび命令を実行する際の前条件を確認し、確認結果に従い、ON実行完了フラグまたはOFF実行完了フラグにチェックを入れる。図4に示した動作検証状況は、ステップ番号‘0’に対応する命令のON実行が実行済み、ステップ番号‘2’に対応する命令のOFF実行が実行済み、ステップ番号‘4’に対応する命令のON実行およびOFF実行が実行済み、ステップ番号‘8’に対応する命令のON実行およびOFF実行が実行済みであることを示している。なお、動作検証状況の保存形式は図4に示したものに限定されない。どの命令をどの実行条件で実行済みかが分かるのであれば、バイナリデータまたはテキストデータといった形式で記憶してもよい。   FIG. 4 is a diagram illustrating an example of a format in which the operation verification status determination unit 14 according to the first embodiment stores the operation verification status collected from the program execution unit 12 in the operation verification status storage unit 15. As shown in FIG. 4, the operation verification status includes a step number representing an instruction, a run type representing an execution condition of the instruction, an ON execution completion flag, and an OFF execution completion flag. The step number is identification information of the instruction. The identification information is information for specifying which instruction has been executed among the executed sequence programs. If the run type is '0', it indicates constant execution, and if '1' indicates an execution condition that is not constant execution. The operation verification status determination unit 14 reads the device value stored in the device memory 17 of the program execution unit 12 to confirm which step number an instruction has been executed and the pre-conditions for executing the instruction. Check the ON execution completion flag or the OFF execution completion flag according to the confirmation result. In the operation verification status shown in FIG. 4, the ON execution of the instruction corresponding to the step number '0' has been executed, the OFF execution of the instruction corresponding to the step number '2' has been executed, and the operation verification status corresponds to the step number '4' It shows that the ON execution and the OFF execution of the instruction have been executed, and the ON execution and the OFF execution of the instruction corresponding to the step number “8” have been executed. The storage format of the operation verification status is not limited to that shown in FIG. If it is known which instruction has been executed under which execution condition, it may be stored in the form of binary data or text data.

つづいて、エンジニアリングツール20の動作検証状況表示部21が動作検証状況を表示装置に表示する形式について、図5〜図8を使用して説明する。   Subsequently, a format in which the operation verification status display unit 21 of the engineering tool 20 displays the operation verification status on the display device will be described using FIGS. 5 to 8.

図5は、実施の形態1にかかる動作検証状況表示部21が、動作検証の状況をシーケンスプログラムの表示背景を変更することによりユーザに通知する場合の表示例を示す図である。図5は、図3に示したシーケンスプログラムの表示背景を、シーケンスプログラムに含まれる各命令の実行状況に対応させて変更した例を示している。表示背景の変更方法の代表例は色の変更である。例えば、ON実行とOFF実行の双方を実行済みの場合は青、ON実行のみ実行済みの場合は背景色をオレンジとし、OFF実行のみ実行済みの場合は背景色を黄とし、ON実行およびOFF実行の両方とも実行されていない場合は背景色を白とする。   FIG. 5 is a diagram showing a display example in the case where the operation verification status display unit 21 according to the first embodiment notifies the user of the operation verification status by changing the display background of the sequence program. FIG. 5 shows an example in which the display background of the sequence program shown in FIG. 3 is changed according to the execution status of each instruction included in the sequence program. A representative example of the method of changing the display background is the change of color. For example, if both ON execution and OFF execution have been executed, then blue, if only ON execution has been performed, the background color is orange, and if only OFF execution has been performed, the background color is yellow, ON execution and OFF execution The background color is white if both are not running.

図6は、実施の形態1にかかる動作検証状況表示部21が、動作検証の状況をシーケンスプログラムの表示背景を変更することによりユーザに通知する場合の他の表示例を示す図である。図6に示した例では、背景色の変更に加えて、ON実行およびOFF実行の双方を実行済みの命令を表示しないようにしている。ON実行およびOFF実行の双方を実行済みの命令を表示しないことで、動作検証が完了していない命令がどれくらい残っているのかをユーザが容易に知ることができる。図6に示した例では、ステップ番号が4の命令についてはON実行およびOFF実行が実行済みであるため、ステップ番号が4の命令は表示されていない。   FIG. 6 is a diagram showing another display example in the case where the operation verification status display unit 21 according to the first embodiment notifies the user of the operation verification status by changing the display background of the sequence program. In the example shown in FIG. 6, in addition to the change of the background color, both the ON execution and the OFF execution are prevented from displaying the executed instruction. By not displaying the executed instruction for both the ON execution and the OFF execution, the user can easily know how much the instruction whose operation verification is not completed remains. In the example shown in FIG. 6, since the ON execution and the OFF execution have already been executed for the instruction with the step number 4, the instruction with the step number 4 is not displayed.

図7は、実施の形態1にかかる動作検証状況表示部21が、動作検証の状況をシーケンスプログラムの各命令に対応づけて表示するマークを変更することによりユーザに通知する場合の表示例を示す図である。図7は、図3に示したシーケンスプログラムに含まれる各命令の実行状況を黒塗の丸(●)、白抜きの丸(○)および二重丸(◎)で表した例を示している。具体的には、ON実行のみ実行済みの命令には‘●’を付与し、OFF実行のみ実行済みの命令には‘○’を付与し、ON実行とOFF実行の双方を実行済みの命令には‘◎’を付与している。   FIG. 7 shows a display example in the case where the operation verification status display unit 21 according to the first embodiment notifies the user by changing the mark displayed by associating the operation verification status with each instruction of the sequence program. FIG. FIG. 7 shows an example in which the execution status of each instruction included in the sequence program shown in FIG. 3 is represented by a black circle (●), an open circle (○) and a double circle (◎). . Specifically, '●' is given to an instruction that has been ON-executed only, and '○' is given to an instruction that has only OFF-execution, and both ON and OFF executions are instructions that have been executed. Is given '' '.

図8は、実施の形態1にかかる動作検証状況表示部21が、プログラムの表示を変更することにより動作検証の状況を表す場合の表示例を示す図である。図8では、一度でもON実行された経路および命令の表示を変更することにより動作検証の状況を表す例を示している。ON実行された経路および命令の表示を変更する方法としては、ON実行されていない状態では破線で表し、ON実行された場合に実線での表示に変更する方法が考えられる。また、ON実行されていない状態とON実行された状態とで表示色を変更する方法も考えられる。表示の変更方法はON実行がされたことが分かるのであればどのような方法であってもよい。   FIG. 8 is a diagram showing a display example in the case where the operation verification status display unit 21 according to the first embodiment represents the status of the operation verification by changing the display of the program. FIG. 8 shows an example showing the state of operation verification by changing the display of a path and an instruction that has been turned ON even once. As a method of changing the display of the ON-executed path and the instruction, a method may be considered in which it is represented by a broken line in a state where the ON is not performed and is changed to a solid line when the ON is performed. In addition, it is conceivable to change the display color between the state in which the ON state is not executed and the state in which the ON state is performed. The display change method may be any method as long as it is known that the ON execution has been performed.

図5〜図8では、カバレッジの網羅率を、色分け等によって表示しているが、単純に「○○%実施」と表示画面上に表示するようにしてもよい。このような表示は、図5〜図8のラダープログラム上に併せて表示してもよい。また、色分け等による表示と数値による表示とを併せて行うようにしてもよい。カバレッジの網羅率は、動作検証状況表示部21が、動作検証状況記憶部15で記憶されている動作検証状況に基づいて算出する。なお、動作検証状況表示部21は、実行条件が常時実行の命令についてはON実行およびOFF実行の双方が実行済みの場合に当該命令の動作検証が完了しているものとしてカバレッジの網羅率を算出する。   Although the coverage rate of the coverage is displayed by color coding or the like in FIGS. 5 to 8, the coverage rate may simply be displayed on the display screen as “performing ○%”. Such a display may be displayed together on the ladder program of FIGS. In addition, display by color coding or the like and display by numerical values may be performed together. The coverage rate of the coverage is calculated by the operation verification status display unit 21 based on the operation verification status stored in the operation verification status storage unit 15. Note that the operation verification status display unit 21 calculates coverage coverage assuming that the operation verification of the instruction is completed when both the ON execution and the OFF execution have already been executed for the instruction whose execution condition is always execution. Do.

つづいて、デバッグ装置100が動作検証状況を表示する動作について、図9を用いて説明する。図9は、実施の形態1にかかるデバッグ装置100が動作検証状況を表示する動作を示すフローチャートである。   Subsequently, an operation in which the debug device 100 displays the operation verification status will be described with reference to FIG. FIG. 9 is a flowchart showing an operation of the debugging device 100 according to the first embodiment to display the operation verification status.

デバッグ装置100が動作検証状況を表示する動作においては、動作検証状況判定部14が、検証対象シーケンスプログラム16をプログラム実行部12が実行している状態において、ステップ毎にデバイスメモリ17からデバイス値を収集し、収集したデバイス値に基づいて命令の実行の有無を判定する(ステップS11)。なお、命令の実行有無の判定には、既存のシーケンスプログラムのモニタ技術を使用できる。また、命令の実行種別については、該当の命令の実行条件の種類および前条件から判定できる。動作検証状況判定部14は、収集したデバイス値に基づいて、命令の実行の有無および実行種別を判定する。   In the operation in which the debug device 100 displays the operation verification status, the operation verification status determination unit 14 outputs the device value from the device memory 17 for each step while the program execution unit 12 is executing the verification target sequence program 16. Based on the collected and collected device values, it is determined whether or not an instruction has been executed (step S11). In addition, the monitor technique of the existing sequence program can be used for determination of the execution presence or absence of an instruction. Further, the execution type of the instruction can be determined from the type of the execution condition of the corresponding instruction and the pre-condition. The operation verification status determination unit 14 determines the presence or absence of the execution of the instruction and the execution type based on the collected device values.

次に、動作検証状況判定部14は、判定結果、すなわち命令の実行の有無および実行種別を、ステップ番号と対応付けて動作検証状況記憶部15に格納する(ステップS12)。命令の実行の有無および実行種別とステップ番号と対応付けたものが図4に示した動作検証状況である。   Next, the operation verification status determination unit 14 stores the determination result, that is, the presence or absence of the execution of the instruction and the execution type in the operation verification status storage unit 15 in association with the step number (step S12). It is the operation verification status shown in FIG. 4 in which the presence or absence of the execution of the instruction and the execution type and the step number are associated with each other.

次に、動作検証状況表示部21が、動作検証状況記憶部15に格納されている動作検証状況に基づいて、検証対象シーケンスプログラム16の各命令の実行状況および実行種別を表示装置に表示する(ステップS13)。   Next, the operation verification status display unit 21 displays the execution status and execution type of each instruction of the verification target sequence program 16 on the display device based on the operation verification status stored in the operation verification status storage unit 15 ( Step S13).

図9に示したステップS13において、動作検証状況表示部21は、図5〜図8に示した内容例の画面を表示する。また、動作検証状況記憶部15に複数の動作検証状況が格納されている場合、動作検証状況表示部21は、複数の動作検証状況の中からユーザが選択した1つ以上の動作検証状況に基づいて表示画面を生成する。一般的に、プログラムのデバッグ作業では、プログラムの動作条件の設定を変更しながら、複数の動作条件の元でプログラウを実行し、不具合の有無を確認する。そのため、複数の動作条件の各々に対応する動作検証結果が得られることになる。本実施の形態にかかるデバッグ装置100の場合、図2を用いて説明した動作検証設定がプログラムの動作条件に相当し、図4を用いて説明した動作検証状況がプログラムの動作検証結果に相当する。すなわち、動作検証状況記憶部15には複数の動作検証状況が格納されている。   In step S13 shown in FIG. 9, the operation verification status display unit 21 displays the screen of the content example shown in FIG. 5 to FIG. When a plurality of operation verification states are stored in the operation verification state storage unit 15, the operation verification state display unit 21 is based on one or more operation verification states selected by the user from the plurality of operation verification states. Generate a display screen. Generally, in the program debugging operation, while changing the setting of the operating condition of the program, the program is executed under a plurality of operating conditions to confirm the presence or absence of a defect. Therefore, operation verification results corresponding to each of a plurality of operation conditions are obtained. In the case of the debugging device 100 according to the present embodiment, the operation verification setting described using FIG. 2 corresponds to the operation condition of the program, and the operation verification state described using FIG. 4 corresponds to the operation verification result of the program. . That is, the operation verification status storage unit 15 stores a plurality of operation verification statuses.

図10は、実施の形態1にかかる動作検証状況表示部21が複数の動作検証状況の中から選択した1つ以上の動作検証状況に基づいて表示を行う動作を示すフローチャートである。   FIG. 10 is a flowchart showing an operation of the operation verification status display unit 21 according to the first embodiment to perform display based on one or more operation verification statuses selected from among a plurality of operation verification statuses.

動作検証状況表示部21は、図9に示したステップS13において表示を行う場合、まず、動作検証状況を選択する画面を表示装置に表示する(ステップS21)。このステップS21での表示は図11に示した画面とすることができる。図11は、実施の形態1にかかる動作検証状況表示部21が表示装置に表示させる動作検証状況選択画面の一例を示す図である。図11に示した画面表示例は、動作検証状況記憶部15で記憶されている動作検証状況のファイル名(動作検証状況_001,動作検証状況_002,…)のリストと、各ファイルを選択するためのチェックボックスと、表示開始ボタンと、キャンセルボタンとを含む。ユーザは、チェックボックスにチェックを入れることで表示させたい動作検証状況を選択し、表示開始ボタンを押下することで動作検証状況の表示を開始させる。すなわち、動作検証状況表示部21は、ステップS21を実行して図11に示した画面を表示装置に表示させた後、1つ以上の動作検証状況のファイルが選択され、表示開始ボタンが押下されるのを待つ。   When performing the display in step S13 shown in FIG. 9, the operation verification status display unit 21 first displays a screen for selecting the operation verification status on the display device (step S21). The display in this step S21 can be the screen shown in FIG. FIG. 11 is a diagram showing an example of the operation verification status selection screen displayed on the display device by the operation verification status display unit 21 according to the first embodiment. In the screen display example shown in FIG. 11, a list of file names of the operation verification status (operation verification status _001, operation verification status 002, ...) stored in the operation verification status storage unit 15 and each file are selected. And a display start button and a cancel button. The user selects the operation verification status to be displayed by putting a check in the check box, and starts displaying the operation verification status by pressing the display start button. That is, after the operation verification status display unit 21 executes step S21 to display the screen shown in FIG. 11 on the display device, one or more files of the operation verification status are selected, and the display start button is pressed. Wait for

動作検証状況表示部21は、1つ以上の動作検証状況が選択された状態で表示開始ボタンが押下されると、選択された動作検証状況に基づいて、図5〜図8に示した中のいずれか一つの内容例の画面を表示装置に表示する(ステップS22)。複数の動作検証状況が選択された状態でステップS22を実行する場合、動作検証状況表示部21は、選択された動作検証状況の内容をマージし、マージ後の動作検証状況に従い表示を行う。   If one or more operation verification states are selected and the display start button is pressed, operation verification state display unit 21 selects one of the states shown in FIGS. 5 to 8 based on the selected operation verification state. The screen of any one content example is displayed on the display device (step S22). When step S22 is executed in a state where a plurality of operation verification states are selected, the operation verification state display unit 21 merges the contents of the selected operation verification states, and performs display according to the operation verification states after merging.

一例として、動作検証状況_001および動作検証状況_002が選択され、動作検証状況_001はON実行のみを実行した結果、動作検証状況_002はOFF実行のみを実行した結果である場合について考える。この場合、動作検証状況表示部21は、動作検証状況_001および動作検証状況_002を解析することにより、ある命令のON実行およびOFF実行の双方が実行済みかどうか、実行済みではない場合にON実行とOFF実行のどちらが実行済みではないのか、ON実行およびOFF実行の双方が実行済みではないのかを把握し、各命令のON実行およびOFF実行の実行状況が視認可能な内容の画面(図5〜図8に示した中のいずれか一つの内容例の画面)を表示装置へ表示する。   As an example, consider that the operation verification status _ 001 and the operation verification status _ 002 are selected, and the operation verification status _ 001 is the result of executing only ON execution, and the operation verification status _ 002 is the result of executing only OFF execution. In this case, by analyzing the operation verification status _ 001 and the operation verification status _ 002, the operation verification status display unit 21 determines whether both the ON execution and the OFF execution of a certain instruction have been executed. Figure out which of the two is not already executed or which is not already executed, and the screen shows the execution status of each instruction ON and OFF (see Figure 5) The screen of any one of the content examples shown in FIG. 8 is displayed on the display device.

また、他の例として、動作検証状況_001および動作検証状況_002が選択され、動作検証状況_001にはステップ番号XXの常時実行の命令(以下、命令Aとする)のON実行は実行されたがOFF実行は実行されていないことを示す情報が含まれ、動作検証状況_002には命令AのON実行は実行されていないがOFF実行は実行されたことを示す情報が含まれている場合について考える。この場合、動作検証状況表示部21は、動作検証状況_001および動作検証状況_002を解析することにより命令AのON実行およびOFF実行の双方が実行済み、すなわち検証済みであることが分かる。そのため、動作検証状況表示部21は、命令AのON実行およびOFF実行を検証済みであることを視認可能な内容の画面を表示装置へ表示する。   Also, as another example, operation verification status _ 001 and operation verification status _ 002 are selected, and in operation verification status _ 001, ON execution of an instruction for continuous execution of step number XX (hereinafter referred to as instruction A) is executed Consider a case where information indicating that OFF execution is not executed is included, and information indicating that ON execution of instruction A is not executed but information indicating that OFF execution is executed is included in operation verification status _002. . In this case, the operation verification status display unit 21 analyzes the operation verification status _ 001 and the operation verification status _ 002 to find that both the ON execution and the OFF execution of the instruction A have been executed, ie, verified. Therefore, the operation verification status display unit 21 displays, on the display device, a screen with contents that allow visual confirmation that the ON execution and the OFF execution of the instruction A have been verified.

つづいて、実施の形態1にかかるデバッグ装置100を構成するPLC1のハードウェア構成について説明する。図1に示したPLC1は、図12に示したプロセッサ201、メモリ202および通信インタフェース203で実現することができる。プロセッサ201は、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、CPU(Central Processing Unit)、またはDSP(Digital Signal Processor)などであってもよい。また、メモリ202は、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable ROM)、またはEEPROM(Electrically EPROM)などの、不揮発性または揮発性の半導体メモリ、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、またはDVD(Digital Versatile Disc)などが該当する。メモリ202は、2種類以上の記憶装置を組み合わせたものであってもよい。   Subsequently, the hardware configuration of the PLC 1 constituting the debugging device 100 according to the first embodiment will be described. The PLC 1 shown in FIG. 1 can be realized by the processor 201, the memory 202 and the communication interface 203 shown in FIG. The processor 201 may be a processing device, an arithmetic device, a microprocessor, a microcomputer, a central processing unit (CPU), a digital signal processor (DSP), or the like. The memory 202 is a nonvolatile or volatile semiconductor memory such as RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable ROM), or EEPROM (Electrically EPROM), or a magnetic disk. , Flexible disks, optical disks, compact disks, mini disks, or DVDs (Digital Versatile Disc). The memory 202 may be a combination of two or more types of storage devices.

PLC1のプログラムメモリ11はメモリ202により実現される。PLC1のプログラム実行部12はプロセッサ201およびメモリ202により実現される。PLC1の動作検証結果管理部13はプロセッサ201およびメモリ202により実現される。すなわち、動作検証状況判定部14は、動作検証状況判定部14として動作するためのプログラムをメモリ202が保持しておき、このプログラムをプロセッサ201がメモリ202から読み出して実行することにより実現される。また、動作検証状況記憶部15は、メモリ202により実現される。なお、図12に示した通信インタフェース203は、エンジニアリングツール20を実現するコンピュータ2と通信を行う際に利用する。なお、既に説明したように、エンジニアリングツール20は、エンジニアリングツール20として動作するためのプログラムをコンピュータ2が実行することにより実現される。   The program memory 11 of the PLC 1 is realized by the memory 202. The program execution unit 12 of the PLC 1 is realized by the processor 201 and the memory 202. The operation verification result management unit 13 of the PLC 1 is realized by the processor 201 and the memory 202. That is, the operation verification status determination unit 14 is realized by the memory 202 holding a program for operating as the operation verification status determination unit 14 and the processor 201 reading out the program from the memory 202 and executing the program. The operation verification status storage unit 15 is realized by the memory 202. The communication interface 203 shown in FIG. 12 is used when communicating with the computer 2 that realizes the engineering tool 20. As described above, the engineering tool 20 is realized by the computer 2 executing a program for operating as the engineering tool 20.

以上のように、本実施の形態にかかるデバッグ装置100は、シーケンスプログラムを実行するプログラム実行部12と、プログラム実行部12で実行された命令、実行された命令の実行種別および前条件をデバイスメモリ17に格納されたデバイス値に基づいて判定する動作検証状況判定部14と、動作検証状況判定部14による判定結果を動作検証状況として記憶する動作検証状況記憶部15と、を備える。これにより、実行された命令の実行種別をユーザが確認する必要が無くなり、ユーザの作業負荷を軽減させることができる。よって、シーケンスプログラムのデバッグの作業効率を向上させることができる。また、シーケンスプログラムの動作検証の進捗状況をユーザが視認可能な形式で表示する動作検証状況表示部21を備える。これにより、動作検証の進捗状況をユーザが容易に知ることができ、デバッグの作業効率をさらに向上させることができる。   As described above, the debugging device 100 according to the present embodiment includes the program execution unit 12 for executing the sequence program, the instruction executed by the program execution unit 12, the execution type and the pre-condition of the executed instruction as device memory The operation verification status determination unit 14 based on the device value stored in 17 and the operation verification status storage unit 15 that stores the determination result by the operation verification status determination unit 14 as an operation verification status. This eliminates the need for the user to confirm the execution type of the executed instruction, thereby reducing the user's workload. Therefore, the work efficiency of debugging a sequence program can be improved. The operation verification status display unit 21 displays the progress status of the operation verification of the sequence program in a format that can be visually recognized by the user. As a result, the user can easily know the progress of the operation verification, and the debugging operation efficiency can be further improved.

なお、本実施の形態では、実行種別としてON実行、OFF実行を用いているが、実行種別としてはこれに限らず、プログラムの実行内容が定義付けられたものであれば良い。   In the present embodiment, ON execution and OFF execution are used as execution types. However, the execution types are not limited to this, and any execution types of programs may be defined.

実施の形態2.
実施の形態1では、PLC1が動作検証結果管理部13を備えた構成のデバッグ装置について説明したが、エンジニアリングツール20を含んだコンピュータ2が動作検証結果管理部13を備えた構成としてもよい。
Second Embodiment
In the first embodiment, although the debugging apparatus having the configuration in which the PLC 1 includes the operation verification result management unit 13 has been described, the computer 2 including the engineering tool 20 may be configured to include the operation verification result management unit 13.

図13は、実施の形態2にかかるデバッグ装置の構成例を示す図である。実施の形態2にかかるデバッグ装置100aは、PLC1aと、実施の形態1で説明した動作検証結果管理部13、およびエンジニアリングツール20を実現するコンピュータ2aとを備える。PLC1aは、実施の形態1で説明したPLC1から動作検証結果管理部13を削除した構成のPLCである。コンピュータ2は、実施の形態1で説明したエンジニアリングツール20に加えて、実施の形態1で説明した、プログラム実行部12が実行した命令および実行種別を判定してその結果を記憶する動作検証結果管理部13を備える。PLC1aのプログラムメモリ11およびプログラム実行部12は、実施の形態1で説明したPLC1のプログラムメモリ11およびプログラム実行部12と同じであるため説明を省略する。また、コンピュータ2aのエンジニアリングツール20および動作検証結果管理部13は、実施の形態1で説明したコンピュータ2のエンジニアリングツール20およびPLC1の動作検証結果管理部13と同じであるため説明を省略する。   FIG. 13 is a diagram of a configuration example of the debugging device according to the second embodiment. The debugging device 100a according to the second embodiment includes the PLC 1a, the operation verification result management unit 13 described in the first embodiment, and a computer 2a for realizing the engineering tool 20. The PLC 1 a is a PLC having a configuration in which the operation verification result management unit 13 is deleted from the PLC 1 described in the first embodiment. In addition to the engineering tool 20 described in the first embodiment, the computer 2 determines the instruction executed by the program execution unit 12 and the execution type described in the first embodiment, and stores the result thereof. A unit 13 is provided. The program memory 11 and the program execution unit 12 of the PLC 1a are the same as the program memory 11 and the program execution unit 12 of the PLC 1 described in the first embodiment, and therefore the description thereof is omitted. The engineering tool 20 and the operation verification result management unit 13 of the computer 2a are the same as the engineering tool 20 of the computer 2 and the operation verification result management unit 13 of the PLC 1 described in the first embodiment, and therefore the description thereof is omitted.

なお、エンジニアリングツール20と動作検証結果管理部13とを別構成としたが、エンジニアリングツール20が動作検証結果管理部13を備える構成としてもよい。   Although the engineering tool 20 and the operation verification result management unit 13 are separately configured, the engineering tool 20 may be configured to include the operation verification result management unit 13.

以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。   The configuration shown in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and one of the configurations is possible within the scope of the present invention. Parts can be omitted or changed.

1,1a PLC、2,2a コンピュータ、3 ネットワークケーブル、11 プログラムメモリ、12 プログラム実行部、13 動作検証結果管理部、14 動作検証状況判定部、15 動作検証状況記憶部、16 検証対象シーケンスプログラム、17 デバイスメモリ、20 エンジニアリングツール、21 動作検証状況表示部、22 動作検証設定入力部、23 動作検証設定書込部、100,100a デバッグ装置。   1, 1a PLC, 2, 2a computer, 3 network cable, 11 program memory, 12 program execution unit, 13 operation verification result management unit, 14 operation verification status determination unit, 15 operation verification status storage unit, 16 verification target sequence program, 17 device memory, 20 engineering tools, 21 operation verification status display unit, 22 operation verification setting input unit, 23 operation verification setting writing unit, 100, 100a debug device.

上述した課題を解決し、目的を達成するために、本発明にかかるデバッグ装置は、シーケンスプログラムに含まれる命令を実行する実行部と、実行部で実行された命令と、実行された命令の実行内容と前記実行された命令の直前の命令の実行結果との関係を表す実行種別と、を判定する判定部と、を備える。また、デバッグ装置は、判定部で判定された実行種別毎の命令の実行有無と、実行種別と、実行された命令を識別する識別情報とを対応付けて記憶する記憶部と、実行部で実行された命令と実行された命令の実行種別とを命令の実行有無に応じて視認可能な形式で表示する表示部と、を備える。また、実行種別は、直前の命令の実行結果が真の場合に実行するON実行と、直前の命令の実行結果が偽の場合に実行するOFF実行とを含む。 In order to solve the problems described above and achieve the object, the debugging device according to the present invention includes an execution unit that executes instructions included in a sequence program, an instruction executed by the execution unit, and an execution of the executed instructions. A determination unit that determines an execution type representing a relation between contents and an execution result of an instruction immediately before the executed instruction; Also, the debugging device executes the execution by the storage unit that stores the execution status of the instruction for each execution type determined by the determination unit, the execution type, and the identification information that identifies the executed instruction, and the execution unit And a display unit configured to display the executed instruction and the execution type of the executed instruction in a form that can be viewed according to whether the instruction is executed. The execution type includes ON execution to be executed when the execution result of the immediately preceding instruction is true and OFF execution to be executed when the execution result of the immediately preceding instruction is false.

Claims (6)

シーケンスプログラムに含まれる命令を実行する実行部と、
前記実行部で実行された命令と、前記実行された命令の実行内容と前記実行された命令の直前の命令の実行結果との関係を表す実行種別と、を判定する判定部と、
前記判定部で判定された実行種別毎の命令の実行有無と、前記実行種別と、前記実行された命令を識別する識別情報とを対応付けて記憶する記憶部と、
前記実行部で実行された命令と前記実行された命令の実行種別とを前記命令の実行有無に応じて視認可能な形式で表示する表示部と、
を備えることを特徴とするデバッグ装置。
An execution unit that executes instructions included in the sequence program;
A determination unit that determines an instruction executed by the execution unit, and an execution type representing a relationship between an execution content of the executed instruction and an execution result of an instruction immediately before the executed instruction;
A storage unit that stores the execution status of an instruction for each execution type determined by the determination unit, the execution type, and identification information for identifying the executed instruction in association with each other;
A display unit that displays an instruction executed by the execution unit and an execution type of the executed instruction in a viewable format according to whether or not the instruction is executed;
A debugging apparatus comprising:
前記表示部は、前記実行部で実行されたシーケンスプログラムに対比して前記実行された命令と前記実行種別とを表示することを特徴とする請求項1に記載のデバッグ装置。   The debugging device according to claim 1, wherein the display unit displays the executed instruction and the execution type in contrast to the sequence program executed by the execution unit. 前記表示部は、前記実行部で実行された命令の、前記シーケンスプログラムに含まれる全ての命令に対する割合を表示することを特徴とする請求項1または2に記載のデバッグ装置。   The debugging device according to claim 1 or 2, wherein the display unit displays a ratio of the instruction executed by the execution unit to all the instructions included in the sequence program. 前記判定部は、前記実行部で実行された命令および前記実行された命令の実行種別の判定を複数の動作検証設定に従って行うことが可能に構成され、異なる動作検証設定に従って前記判定を行い複数の判定結果を生成し、
前記表示部は前記複数の判定結果を1つの画面で表示することを特徴とする請求項1に記載のデバッグ装置。
The determination unit is configured to be able to determine the instruction executed by the execution unit and the execution type of the executed instruction according to a plurality of operation verification settings, and performs the determination according to different operation verification settings. Generate a judgment result,
The debugging apparatus according to claim 1, wherein the display unit displays the plurality of determination results on one screen.
前記表示部は、前記複数の判定結果のうち、ユーザが指定した判定結果を1つの画面で表示することを特徴とする請求項4に記載のデバッグ装置。   5. The debugging apparatus according to claim 4, wherein the display unit displays the determination result designated by the user among the plurality of determination results on one screen. 前記実行種別は、前記直前の命令の実行結果が真の場合に実行するON実行と、前記直前の命令の実行結果が偽の場合に実行するOFF実行とを含むことを特徴とする請求項1から5のいずれか一つに記載のデバッグ装置。   The execution type includes ON execution which is executed when the execution result of the immediately preceding instruction is true, and OFF execution which is executed when the execution result of the immediately preceding instruction is false. The debugging device according to any one of 5.
JP2018505755A 2017-06-27 2017-06-27 Debug device Active JP6351906B1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/023623 WO2019003313A1 (en) 2017-06-27 2017-06-27 Debugging device

Publications (2)

Publication Number Publication Date
JP6351906B1 JP6351906B1 (en) 2018-07-04
JPWO2019003313A1 true JPWO2019003313A1 (en) 2019-06-27

Family

ID=62779846

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018505755A Active JP6351906B1 (en) 2017-06-27 2017-06-27 Debug device

Country Status (3)

Country Link
JP (1) JP6351906B1 (en)
CN (1) CN109791398B (en)
WO (1) WO2019003313A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7173928B2 (en) * 2019-06-05 2022-11-16 ファナック株式会社 Numerical controller
WO2021005691A1 (en) * 2019-07-08 2021-01-14 三菱電機株式会社 Control device, program monitoring method, and program
JP6789458B1 (en) * 2020-02-14 2020-11-25 三菱電機株式会社 Program providing device, program providing method and program providing system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2525492B2 (en) * 1989-12-29 1996-08-21 シャープ株式会社 Programmable controller
JP2000293208A (en) * 1999-04-02 2000-10-20 Hitachi Ltd Sequence control system
JP2005310056A (en) * 2004-04-26 2005-11-04 Mitsubishi Electric Corp Program execution control system
JP4718901B2 (en) * 2005-05-27 2011-07-06 パナソニック株式会社 Instruction execution device, debugging method, debugging device, and debugging program
CN104063321B (en) * 2014-06-27 2017-06-13 北京控制工程研究所 A kind of test checking system and test verification method for the soft core programs of MicroBlaze
KR101846140B1 (en) * 2015-04-16 2018-04-05 미쓰비시덴키 가부시키가이샤 Program diagnostic device, program diagnostic method, and program diagnostic program

Also Published As

Publication number Publication date
WO2019003313A1 (en) 2019-01-03
CN109791398A (en) 2019-05-21
CN109791398B (en) 2020-12-18
JP6351906B1 (en) 2018-07-04

Similar Documents

Publication Publication Date Title
US8453106B2 (en) Graphical user interface for exploring source code execution behavior
US9342278B2 (en) Method and program editor for creating and processing a program for an industrial automation arrangement
US9292413B2 (en) Setting breakpoints in a code debugger used with a GUI object
JP6351906B1 (en) Debug device
US8079014B2 (en) Software development apparatus and method
US8752023B2 (en) System, method and program product for executing a debugger
KR101627488B1 (en) Engineering tool, program editing device, and program editing system
CN111666217A (en) Method and apparatus for testing code
EP2634733A1 (en) Operations task management system and method
JP2016045712A (en) Programmable logic controller
US9165007B2 (en) Log message optimization to ignore or identify redundant log messages
KR102076754B1 (en) Diagnostic system for control logic and method for diagnosing the same
JP4865491B2 (en) Firmware test automation method
JP4767309B2 (en) Information processing apparatus, information processing method, and computer program
CN110554966B (en) Driving debugging method, behavior analysis method and driving debugging system
WO2022138442A1 (en) Ladder program analysis device
KR101999321B1 (en) Program test system and test method using the same
KR101303866B1 (en) Method of monitoring substrate processing apparatus
JP7055264B1 (en) Programmable controller, programmable controller system and program
JP2015170072A (en) State transition visualizing system and state transition visualizing program
US20130191305A1 (en) Apparatus for validating processes for information completeness
US9523969B2 (en) Systems and methods for tracking the quality and efficiency of machine instructions for operating an associated controller
WO2018123039A1 (en) Program comparator and program difference verification method
KR101323833B1 (en) Apparatus and Method For Scheduling
JP2015109535A (en) Communication apparatus and error response level switching method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180202

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180202

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20180202

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20180501

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180508

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180605

R150 Certificate of patent or registration of utility model

Ref document number: 6351906

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250