JP2006244178A - Collation program - Google Patents

Collation program Download PDF

Info

Publication number
JP2006244178A
JP2006244178A JP2005059589A JP2005059589A JP2006244178A JP 2006244178 A JP2006244178 A JP 2006244178A JP 2005059589 A JP2005059589 A JP 2005059589A JP 2005059589 A JP2005059589 A JP 2005059589A JP 2006244178 A JP2006244178 A JP 2006244178A
Authority
JP
Japan
Prior art keywords
block
control program
unit
ladder control
determination
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.)
Pending
Application number
JP2005059589A
Other languages
Japanese (ja)
Inventor
Satoru Honma
哲 本間
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.)
Bridgestone Corp
Original Assignee
Bridgestone 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 Bridgestone Corp filed Critical Bridgestone Corp
Priority to JP2005059589A priority Critical patent/JP2006244178A/en
Publication of JP2006244178A publication Critical patent/JP2006244178A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a collation program capable of collating a corresponding step of a first ladder control program and a second ladder control program even when a command is added in collation of the first ladder control program and the second ladder control program. <P>SOLUTION: This collation program makes a computer execute a procedure (step S203) for comparing and collating a first block and a second block wherein a block number of the first block owned by the first ladder control program and a block number of the second block owned by the second ladder control program are same; a procedure (step S205) for extracting a processing command, a kind of an element, and an element ID included in the first block and the second block as comparison elements; and a procedure (step S207) for determining whether the comparison elements included in the first block and the second block are coincident or not. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、処理命令と、要素の種類と、要素IDとを有するPLCに記憶されたラダー制御プログラムと編集されたラダー制御プログラムとを照合する照合プログラムに関する。   The present invention relates to a collation program for collating a ladder control program stored in a PLC having a processing instruction, an element type, and an element ID with an edited ladder control program.

従来、機器を制御するためのマイクロコンピュータを利用した制御装置としてプログラム・ロジック・コントローラ(Programmable Logic Controller)(以下PLC)が、広く知られている。このPLCは、制御プログラムを記憶し、制御プログラムを実行することにより、各種センサなどの各制御機器からの入力でランプや電力用開閉器などの各制御機器への出力を制御する。   2. Description of the Related Art Conventionally, a program logic controller (PLC) has been widely known as a control device using a microcomputer for controlling devices. The PLC stores a control program and executes the control program to control output to each control device such as a lamp and a power switch by input from each control device such as various sensors.

例えば、ラダー方式で記述されるラダー制御プログラムは、複数の単位ブロックによって構成される。各単位ブロックは、各ブロックに割り当てられるブロック番号と、ステップ番号と、処理命令と、処理命令を実行する要素の種類と、要素IDとを有するステップを含む。   For example, a ladder control program described in a ladder system is composed of a plurality of unit blocks. Each unit block includes a step having a block number assigned to each block, a step number, a processing instruction, a type of element for executing the processing instruction, and an element ID.

また、ラダー方式で記述されるラダー制御プログラムの表現方法としては、各制御機器の記号をその動作の順序に従って配列し、理解しやすくしたラダー図が広く利用されている。ラダー方式で記述されたラダー制御プログラムの進行状況を容易に把握するための方法として、ラダー制御プログラムの進行状況をラダー図によって出力する方法が、提案されている(例えば、特許文献1)。   As a method for expressing a ladder control program described in a ladder system, a ladder diagram in which symbols of each control device are arranged in accordance with the order of operations and is easy to understand is widely used. As a method for easily grasping the progress status of the ladder control program described in the ladder method, a method of outputting the progress status of the ladder control program using a ladder diagram has been proposed (for example, Patent Document 1).

この出力方法によれば、ラダー制御プログラムの進行状況に応じて機械等の動作の内容を容易に確認することができる。   According to this output method, the contents of the operation of the machine or the like can be easily confirmed according to the progress of the ladder control program.

ここで、機器のメンテナンス等で同じ動きをする設備について、異なるPLCを調整する際には、ラダー制御プログラムの確認が必要となるが、異なるPLCのラダー制御プログラムを比較して確認するのは容易ではない。従って、一般的には各PLCに記憶されたラダー制御プログラムについてメモリー等を介してコンピュータにコピーする。そして、コピーした各PLCのラダー制御プログラムをコンピュータで比較し、異なる部分があるときは書き換える手法がとられる。具体的には、ユーザーは、PLC1号機に記憶されたラダー制御プログラム(以下、第1ラダー制御プログラム)とPLC2号機に記憶されたプログラム(以下、第2ラダー制御プログラム)とを比較することで、書換えが正確に行われたか否かを確認する。また、第1ラダー制御プログラムと第2ラダー制御プログラムとの比較を容易にする照合プログラムも知られている。   Here, it is necessary to check the ladder control program when adjusting different PLCs for equipment that moves the same in equipment maintenance, etc., but it is easy to compare and check the ladder control programs of different PLCs. is not. Therefore, generally, the ladder control program stored in each PLC is copied to a computer via a memory or the like. Then, the copied ladder control program of each PLC is compared by a computer, and if there is a different part, a rewriting method is taken. Specifically, the user compares the ladder control program stored in the PLC No. 1 (hereinafter referred to as the first ladder control program) with the program stored in the PLC No. 2 (hereinafter referred to as the second ladder control program). Check if the rewrite was done correctly. A collation program that facilitates comparison between the first ladder control program and the second ladder control program is also known.

この照合プログラムは、第1ラダー制御プログラムにおけるm番目(ステップ番号m)のステップの記述と第2ラダー制御プログラムにおけるステップ番号mのステップの記述とが完全に一致すれば「一致」と判定し、第1ラダー制御プログラムにおけるステップ番号mのステップの記述と第2ラダー制御プログラムにおけるステップ番号mのステップの記述とが少しでも異なれば「不一致」と判定する。
特開2000−293208号公報 (第3頁、第2図)
The collation program determines “match” if the description of the m-th (step number m) step in the first ladder control program and the description of the step number m in the second ladder control program completely match, If the description of the step with the step number m in the first ladder control program is slightly different from the description of the step with the step number m in the second ladder control program, it is determined as “mismatch”.
JP 2000-293208 A (Page 3, FIG. 2)

上述したように、照合プログラムは、ステップ単位で一致または、不一致の判定を行うとともに、どのステップが不一致と判定されたかを出力する。  As described above, the collation program determines whether each step matches or does not match, and outputs which step is determined to be mismatched.

しかしながら、上述した照合プログラムでは、編集用プログラムに命令を追加、もしくは削除した場合、追加もしくは削除した命令以降のステップの判定において全てのステップが不一致と判定される。  However, in the above-described collation program, when an instruction is added to or deleted from the editing program, all steps are determined to be inconsistent in determination of steps after the added or deleted instruction.

従って、ユーザーは、第1ラダー制御プログラムも第2ラダー制御プログラムと同じように内容変更をして、再度照合プログラムを実行しなければならないといった問題があった。  Accordingly, there is a problem that the user has to change the contents of the first ladder control program in the same manner as the second ladder control program and execute the collation program again.

そこで、本発明は、上述の課題に鑑みてなされたものであり、第1ラダー制御プログラムと第2ラダー制御プログラムとを照合する際に、命令が追加された場合等であっても第1ラダー制御プログラムと第2ラダー制御プログラムとの対応するステップを照合することができる照合プログラムを提供することを目的とする。  Therefore, the present invention has been made in view of the above-described problems, and even when an instruction is added when the first ladder control program and the second ladder control program are collated, the first ladder is obtained. It is an object of the present invention to provide a collation program capable of collating corresponding steps of a control program and a second ladder control program.

上記課題を解決するために、本発明に係る照合プログラムの特徴は、処理命令(処理命令F30)と、前記処理命令を実行する要素の種類(要素の種類F41)と、前記要素に割り当てられる要素ID(要素IDF43)とを有するステップ(ステップF1)を含む単位ブロック(単位ブロックF3)を少なくとも複数有する第1ラダー制御プログラム(第1ラダー制御プログラム400P)と、前記単位ブロックを少なくとも複数有する第2ラダー制御プログラム(第2ラダー制御プログラム410P)とを照合する照合プログラムであって、コンピュータ(コンピュータ200)に、前記第1ラダー制御プログラムが有する前記単位ブロックである第1ブロックに割り当てられるブロック番号(ブロック番号F10)と、前記第2ラダー制御プログラムが有する前記単位ブロックである第2ブロックに割り当てられるブロック番号とが同じである前記第1ブロックと、前記第2ブロックとを比較対照とするブロック決定手順(ステップS203)と、前記第1ブロックに含まれる前記処理命令と、前記要素の種類と、前記要素IDとを比較要素(比較要素F5)として抽出し、前記第2ブロックに含まれる前記処理命令と、前記要素の種類と、前記要素IDとを比較要素として抽出する抽出手順(ステップS205)と、前記第1ブロックに含まれる前記比較要素と、前記第2ブロックに含まれる前記比較要素とが一致するか否かを判定する比較要素判定手順(ステップS207)とを実行させることを要旨とする。  In order to solve the above-described problem, the collation program according to the present invention is characterized by processing instructions (processing instructions F30), types of elements that execute the processing instructions (element types F41), and elements assigned to the elements A first ladder control program (first ladder control program 400P) having at least a plurality of unit blocks (unit blocks F3) including a step (step F1) having an ID (element IDF43), and a second having at least a plurality of the unit blocks. A collation program for collating with a ladder control program (second ladder control program 410P), which is a block number (assigned to a first block which is the unit block of the first ladder control program) to a computer (computer 200). Block number F10) and the second ladder A block determination procedure (step S203) in which the first block having the same block number assigned to the second block as the unit block included in the control program is compared with the second block; The processing instruction included in the block, the element type, and the element ID are extracted as comparison elements (comparison element F5), and the processing instruction included in the second block, the element type, Extraction procedure (step S205) for extracting an element ID as a comparison element and comparison for determining whether or not the comparison element included in the first block matches the comparison element included in the second block The gist is to execute the element determination procedure (step S207).

かかる特徴によれば、照合プログラムは、各単位ブロックについて比較要素毎に一致もしくは不一致の判定をすることにより、ステップ番号が異なっていても、比較要素が一致していれば一致と判定することができる。すなわち、ユーザーは、ステップ毎に一致もしくは不一致の判定をするのみの照合と違い、単位ブロック毎に一致もしくは不一致についての情報を知ることができる。従って、照合プログラムは、命令が追加された場合等であっても第1ラダー制御プログラムと第2ラダー制御プログラムとの対応するステップを照合することができる。   According to such a feature, the collation program determines whether each unit block matches or does not match for each comparison element, so that even if the step numbers are different, the comparison program determines that the comparison elements match. it can. That is, the user can know the information about the match or mismatch for each unit block, unlike the collation that only determines the match or mismatch for each step. Therefore, the collation program can collate the corresponding steps of the first ladder control program and the second ladder control program even when an instruction is added.

また、本発明の特徴に係る照合プログラムにおける比較要素F5には、前記比較要素の重要度に応じて重み付け値(重み付け値F7)が対応付けられ、前記比較要素判定手順(ステップS207)における判定結果及び前記重み付け値に基づいて、前記第1ブロックと前記第2ブロックとの一致度(ブロック一致度F9)を判定するブロック判定手順(ステップS211)を更に実行させてもよい。   Further, the comparison element F5 in the collation program according to the feature of the present invention is associated with a weighting value (weighting value F7) according to the importance of the comparison element, and the determination result in the comparison element determination procedure (step S207). In addition, a block determination procedure (step S211) for determining the degree of coincidence (block coincidence degree F9) between the first block and the second block based on the weight value may be further executed.

かかる特徴によれば、照合プログラムは、比較要判定素手順における判定結果及び重み付け値に応じて単位ブロック毎にブロック一致度を算出することにより、ブロック毎にブロック一致度について判定することができる。  According to this feature, the collation program can determine the block coincidence for each block by calculating the block coincidence for each unit block according to the determination result and the weighting value in the comparison necessity determination element procedure.

また、照合プログラムは、ブロック一致度に応じてブロック毎の判定を区分することにより、ユーザーにブロック一致度が大きく変わったブロック(一致度が低いブロック)等に関する情報を効率よく提供することができる。   In addition, the collation program can efficiently provide information on blocks (blocks with a low degree of matching) or the like to the user by classifying the determination for each block according to the degree of block matching. .

また、本発明の特徴に係る照合プログラムにおけるブロック判定手順(ステップS211)における判定結果で一致度(ブロック一致度F9)が基準値を下回った場合、前記第2ブロックに割り当てられる前記ブロック番号(ブロック番号F10)の次のブロック番号を有する前記第2ブロックと、前記第1ブロックとを新たに比較対照とするブロック照合手順(ステップS217)を更に実行させてもよい。   Further, when the matching degree (block matching degree F9) is lower than a reference value in the determination result in the block determination procedure (step S211) in the collation program according to the feature of the present invention, the block number (block) assigned to the second block A block collation procedure (step S217) may be further performed in which the second block having the block number next to the number F10) and the first block are newly compared.

かかる特徴によれば、照合プログラムは、第2ブロックに割り当てられるブロック番号の次のブロック番号を有する第2ブロックと、第1ブロックとを新たに比較対照とすることにより、第1ブロックのブロック番号と異なるブロック番号を有する第2ブロックとの比較を実行することができる。   According to this feature, the collation program newly sets the block number of the first block by using the second block having the block number next to the block number assigned to the second block and the first block as a comparison reference. And a comparison with a second block having a different block number.

第2ラダー制御プログラムが編集の際に追加されたブロックを有する場合、照合プログラムは、第1ブロックのブロック番号以降のブロック番号を有する第2部ブロックを比較することにより、ブロック番号の異なる第1ブロックと、第2ブロックとでも、一致もしくは不一致の判定をすることができる。   When the second ladder control program has a block added at the time of editing, the collation program compares the second part block having a block number after the block number of the first block, thereby comparing the first block having a different block number. Whether the block and the second block are matched or not can be determined.

また、本発明の特徴に係る照合プログラムにおける比較要素判定手順(ステップS207)における判定結果、または、ブロック判定手順(ステップS211)における判定結果を出力する出力手順(ステップS215)を更に実行させてもよい。   Further, the output procedure (step S215) for outputting the determination result in the comparison element determination procedure (step S207) or the determination result in the block determination procedure (step S211) in the collation program according to the feature of the present invention may be further executed. Good.

かかる特徴によれば、照合プログラムは、単位ブロックで比較要素毎に一致するか否かを出力することにより、ユーザーにステップ単位で一致または、不一致の判定をするのみの照合によるステップ毎の照合結果と違い、対応するステップが一致か否かについての情報をブロック単位で提供することができる。   According to such a feature, the collation program outputs whether or not each comparison element matches in the unit block, so that the collation result for each step by the collation that only determines whether the unit matches or does not match in units of steps. Unlike the above, it is possible to provide information about whether or not corresponding steps match in block units.

ブロック判定手順におけるブロック一致度をもとに判定結果として出力することにより、ユーザーにステップ毎の全ての不一致情報を提供するのではなく、ブロック一致度に基づいて判定されたブロック毎の情報を提供することができる。   By outputting the determination result based on the block matching degree in the block determination procedure, the user is provided with the information for each block determined based on the block matching degree, instead of providing all the mismatch information for each step to the user. can do.

照合プログラムは、ブロック一致度に応じてブロック毎の判定を区分して出力することにより、ユーザーにブロック一致度が大きく変わったブロック(ブロック一致度が低いブロック)等に関する情報を効率よく提供することができる。 The collation program classifies and outputs the judgment for each block according to the block matching degree, and thereby efficiently provides the user with information regarding blocks whose block matching degree has changed greatly (blocks with a low block matching degree). Can do.

本発明によれば、第1ラダー制御プログラムと第2ラダー制御プログラムとを照合する際に、命令が追加された場合等であっても第1ラダー制御プログラムと第2ラダー制御プログラムとの対応するステップを照合することができる照合プログラムを提供することができる。  According to the present invention, when the first ladder control program and the second ladder control program are collated, even if an instruction is added, the first ladder control program and the second ladder control program correspond to each other. A collation program that can collate the steps can be provided.

次に、図面を参照して、本発明の実施の形態を説明する。なお、以下の図面の記載において、同一または類似の部分には、同一又は類似の符号を付している。ただし、図面は模式的なものであり、各寸法の比率などは現実のものとは異なることを留意するべきである。   Next, embodiments of the present invention will be described with reference to the drawings. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals. However, it should be noted that the drawings are schematic and ratios of dimensions and the like are different from actual ones.

(システムの全体概略構成)
図1は、本実施形態に係る照合プログラムが用いられるシステムの全体概略構成図である。本実施形態に係るシステムは、照合プログラムを記憶するコンピュータ200と、機器1号機600を制御する第1ラダー制御プログラム(以下第1ラダー制御プログラム400P)を記憶するPLC1号機400と、機器2号機610を制御する第2ラダー制御プログラム(以下第2ラダー制御プログラム410P)を記憶するPLC2号機410とによって構成される。
(Overall system configuration)
FIG. 1 is an overall schematic configuration diagram of a system in which a collation program according to the present embodiment is used. The system according to the present embodiment includes a computer 200 that stores a verification program, a PLC No. 1 400 that stores a first ladder control program (hereinafter referred to as a first ladder control program 400P) that controls the No. 1 device 600, and an No. 2 device 610. The second ladder control program (hereinafter referred to as the second ladder control program 410P) for controlling the second ladder control program 410 stores the second ladder control program.

第1ラダー制御プログラム400P及び第2ラダー制御プログラム410Pの記述方式は、各制御機器の記号をその動作の順序に従って配列したラダー方式で、IEC61131−3及びJIS B3503に規格として定められている。   The description method of the first ladder control program 400P and the second ladder control program 410P is a ladder method in which symbols of the respective control devices are arranged in the order of their operations, and is defined as a standard in IEC 61131-3 and JIS B3503.

(ラダー制御プログラムの構成)
図2(a)は、ラダー方式で記述されるラダー制御プログラムの一例である。
(Configuration of ladder control program)
FIG. 2A is an example of a ladder control program described in a ladder system.

ラダー制御プログラムは、第1ラダー制御プログラム400P及び第2ラダー制御プログラム410Pとして記憶されている。ラダー制御プログラムは、複数の単位ブロックF3によって構成される。単位ブロックF3は、ブロック番号F10と、ステップ番号F20と、処理命令F30と、命令内容を実行する要素F40とを有するステップF1を配列することによって構成される。ラダー制御プログラムは、ステップ番号F20の順に実行され、0ステップの命令からEND命令まで繰り返して実行される。以下、各構成情報について説明する。   The ladder control program is stored as a first ladder control program 400P and a second ladder control program 410P. The ladder control program is composed of a plurality of unit blocks F3. The unit block F3 is configured by arranging step F1 having a block number F10, a step number F20, a processing instruction F30, and an element F40 for executing the instruction content. The ladder control program is executed in the order of step number F20, and is repeatedly executed from the 0-step instruction to the END instruction. Hereinafter, each configuration information will be described.

(1) ブロック番号F10
ブロック番号F10は、単位ブロックF3の順番に応じて適宜割り当てられる識別子である。ブロック番号F10は、ステップF1がどの単位ブロックF3に属するかを示す情報である。
(1) Block number F10
The block number F10 is an identifier that is appropriately assigned according to the order of the unit blocks F3. The block number F10 is information indicating which unit block F3 the step F1 belongs to.

(2) 処理命令F30
処理命令F30は、命令内容を示す情報である。例えば、処理命令F30は、a接点の母線接続(LD)、出力命令(OUT)など(図2(b)参照)がある。他にも、b接点の母線接続(LDI)、a接点の直列接続(AND)、a接点の並列接続(OR)、動作保持出力(SET)など(不図示)がある。
(2) Processing instruction F30
The processing instruction F30 is information indicating the instruction content. For example, the processing instruction F30 includes an a contact bus connection (LD), an output instruction (OUT), and the like (see FIG. 2B). In addition, there are bus connection (LDI) of b contact, series connection (AND) of a contact, parallel connection (OR) of a contact, operation holding output (SET), etc. (not shown).

(3) 要素F40
PLC1号機400及びPLC2号機410には、リレー、タイマー、カウンタなどの機能が多数内蔵されている。要素F40は、処理命令を実行する要素を示し、要素の種類F41とそれに対応する要素IDF43とで構成される。要素の種類F41は、内蔵されている要素の種類を示す情報である。例えば、入力リレー(X)、出力リレー(Y)、補助リレー(M)、タイマー(T)、カウンタ(C)などがある。要素ID F43は、要素の種類に応じて適宜割り当てられる識別子である。
(3) Element F40
The PLC No. 1 400 and the PLC No. 2 410 have a large number of functions such as relays, timers, and counters. An element F40 indicates an element for executing a processing instruction, and includes an element type F41 and an element IDF 43 corresponding to the element type F41. The element type F41 is information indicating the type of the built-in element. For example, there are an input relay (X), an output relay (Y), an auxiliary relay (M), a timer (T), a counter (C), and the like. The element ID F43 is an identifier that is appropriately assigned according to the type of element.

図2(b)は、図2(a)のラダー方式で記述されたラダー制御プログラムをラダー図で示した一例である。   FIG. 2B is an example of a ladder control program described in the ladder system of FIG.

ラダー図には、縦に伸びた制御電源母線F50と、2本の制御電源母線F50の間に配置されたリレーシンボルとが配置されている。ラダー図は、左右の制御電源母線F50及びリレーシンボルとを結ぶ線と、リレーシンボルとにより単位ブロックF3を形成している。   In the ladder diagram, a vertically extending control power supply bus F50 and a relay symbol arranged between the two control power supply buses F50 are arranged. In the ladder diagram, a unit block F3 is formed by a line connecting the left and right control power supply bus F50 and the relay symbol and the relay symbol.

ラダー図は、ブロック番号F10を備える単位ブロックF3をプログラムが進行する順に縦に配置する。   In the ladder diagram, unit blocks F3 having a block number F10 are arranged vertically in the order in which the program proceeds.

リレーシンボルには、命令の順番を示すステップ番号F20と、処理命令F30と、命令を実行する要素の種類F41と、要素ID F43とを有している。リレーシンボルには、入力信号を発する入力リレーF51と、入力信号を受けて出力をする出力リレーF52とがある。ラダー図は、左側の入力リレーF51から入力信号を得て、右側にある出力リレーF52に出力するようにプログラムを進行する。   The relay symbol has a step number F20 indicating the order of instructions, a processing instruction F30, an element type F41 for executing the instruction, and an element ID F43. The relay symbol includes an input relay F51 that emits an input signal and an output relay F52 that receives and outputs the input signal. In the ladder diagram, the program proceeds to obtain an input signal from the left input relay F51 and output it to the output relay F52 on the right side.

具体的には、ラダー図において、ステップ番号0の入力リレーX1が入力されると、ステップ番号2及びステップ番号3の出力リレーが出力される。これにより、ステップ番号2の出力リレーT1が出力されると、ステップ番号4の入力リレーT1が入力される、ステップ番号6及び、ステップ番号7の出力リレーが出力される。以下同様に、入力と出力とを繰り返すことでプログラムが進行される。   Specifically, in the ladder diagram, when the input relay X1 with step number 0 is input, the output relays with step number 2 and step number 3 are output. Thereby, when the output relay T1 of step number 2 is output, the input relay T1 of step number 4 is input, and the output relays of step number 6 and step number 7 are output. Similarly, the program proceeds by repeating input and output.

図2(c)は、図2(a)及び図2(b)に記述された第1ラダー制御プログラム400P及び第2ラダー制御プログラム410Pを実際に動作させた際の具体例である。このラダー図(図2(b))では、ステップ番号0でX1の信号が入力されると(例えば、ボタンX1が押されると)Y1が出力される(例えば、電球Y1が点灯する)。この際、ステップ番号1のY1の信号も入力されるため、X1の入力がストップしても、Y1、T1は出力の状態を維持することができる。また、同時にタイマーT1が作動し、t1秒後にステップ番号4のT1が入力される。これによりステップ番号7のY2も出力される(例えば、t1秒後に電球Y2が点灯する)。同様にして、t2秒後にY3が出力されてこのプログラムは処理を終了する。   FIG. 2C is a specific example when the first ladder control program 400P and the second ladder control program 410P described in FIGS. 2A and 2B are actually operated. In this ladder diagram (FIG. 2B), when the signal X1 is input at step number 0 (for example, when the button X1 is pressed), Y1 is output (for example, the light bulb Y1 is lit). At this time, since the Y1 signal of step number 1 is also input, even if the input of X1 stops, Y1 and T1 can maintain the output state. At the same time, the timer T1 is activated, and T1 of step number 4 is input after t1 seconds. Thereby, Y2 of step number 7 is also output (for example, the light bulb Y2 is turned on after t1 seconds). Similarly, Y3 is output after t2 seconds, and this program ends processing.

(コンピュータの論理ブロック構成)
図3は、上述したコンピュータ200の論理ブロック構成図である。なお、本実施形態に係る照合プログラムは、コンピュータ200で実行される。以下本発明との関連がある部分について主に説明する。従って、図3に示すコンピュータ200は、当該コンピュータの機能を実現する上で必須な、図示しない或いは説明を省略した論理ブロック(電源部など)を備える場合がある。
(Computer logical block configuration)
FIG. 3 is a logical block configuration diagram of the computer 200 described above. The collation program according to the present embodiment is executed by the computer 200. Hereinafter, portions related to the present invention will be mainly described. Therefore, the computer 200 illustrated in FIG. 3 may include a logical block (power supply unit or the like) that is not illustrated or that is not described in detail, which is essential for realizing the functions of the computer.

コンピュータ200は、取込部201と、編集用プログラム記憶部203と、抽出部205と、判定部207と、出力部209と、重み付け記憶部211と、判定基準記憶部213とを備える。   The computer 200 includes an acquisition unit 201, an editing program storage unit 203, an extraction unit 205, a determination unit 207, an output unit 209, a weighting storage unit 211, and a determination criterion storage unit 213.

取込部201は、PLC1号機400と接続してPLC1号機400に記憶された第1ラダー制御プログラム400Pを取り込む。同様にして、取込部201は、PLC2号機410と接続してPLC2号機410に記憶された第2ラダー制御プログラム410Pを取り込む。   The take-in unit 201 is connected to the PLC No. 1 400 and takes in the first ladder control program 400P stored in the PLC No. 1 400. Similarly, the take-in unit 201 is connected to the PLC No. 2 machine 410 and takes in the second ladder control program 410P stored in the PLC No. 2 machine 410.

具体的には、取込部201は、PLC1号機400で第1ラダー制御プログラム400Pが記録された外部記録媒体をコンピュータ200の取込部201に接続して第1ラダー制御プログラム400Pを取り込む。   Specifically, the capturing unit 201 captures the first ladder control program 400P by connecting an external recording medium in which the first ladder control program 400P is recorded in the PLC 1 machine 400 to the capturing unit 201 of the computer 200.

同様にして、取込部201は、PLC2号機410で第2ラダー制御プログラム410Pが記録された外部記録媒体をコンピュータ200の取込部201に接続して第2ラダー制御プログラム410Pを取り込む。   Similarly, the capturing unit 201 captures the second ladder control program 410P by connecting the external recording medium in which the second ladder control program 410P is recorded by the PLC No. 410 to the capturing unit 201 of the computer 200.

なお、取込部201は、有線LANインターフェイスによってPLC1号機400及びPLC2号機410と接続し、ラダー制御プログラムを取り込んでもよい。取り込まれたラダー制御プログラムは、それぞれ、第1ラダー制御プログラム400P及び第2ラダー制御プログラム410Pとして、編集用プログラム記憶部203に記憶される。   The take-in unit 201 may be connected to the PLC No. 1 400 and the PLC No. 2 410 via a wired LAN interface to take in the ladder control program. The fetched ladder control programs are stored in the editing program storage unit 203 as a first ladder control program 400P and a second ladder control program 410P, respectively.

なお、PLC1号機400及びPLC2号機410が有するラダー制御プログラムは、PLC1号機400及びPLC2号機410から切り取られるわけではなく、コンピュータ200で書き換えられるために取り込まれたものであり、PLC1号機400及びPLC2号機410にも元のラダー制御プログラムが残る。   Note that the ladder control program of the PLC No. 1 400 and the PLC No. 2 410 is not cut out from the PLC No. 1 400 and the PLC No. 2 410, but is taken in to be rewritten by the computer 200, and the PLC No. 1 400 and the PLC No. 2 The original ladder control program remains in 410.

編集用プログラム記憶部203は、第1ラダー制御プログラム400P及び第2ラダー制御プログラム410Pとを記憶する。具体的には、編集用プログラム記憶部203は、RAM等の内部記憶装置を用いても良く、ハードディスクやフレキシブルディスク等の外部記憶装置を用いても良い。   The editing program storage unit 203 stores a first ladder control program 400P and a second ladder control program 410P. Specifically, the editing program storage unit 203 may use an internal storage device such as a RAM or an external storage device such as a hard disk or a flexible disk.

抽出部205は第1ラダー制御プログラム400Pが有する単位ブロックF3と、第2ラダー制御プログラム410Pが有する単位ブロックF3とを比較対照として決定する(ブロック決定)。(ここで、第1ラダー制御プログラム400Pが有する単位ブロックF3を以下第1ブロックと呼び、第2ラダー制御プログラム410Pが有する単位ブロックF3を以下第2ブロックと呼ぶ。)次に、抽出部205は、第1ラダー制御プログラム400Pが有する第1ブロックと、第2ラダー制御プログラム410Pが有する第2ブロックとを比較要素F5毎に比較する。比較要素F5は、ラダー制御プログラムを構成する上で重要な処理命令F30と、要素の種類F41と、要素ID F43とを基に構成されている。   The extraction unit 205 determines the unit block F3 included in the first ladder control program 400P and the unit block F3 included in the second ladder control program 410P as comparison references (block determination). (Here, the unit block F3 included in the first ladder control program 400P is hereinafter referred to as a first block, and the unit block F3 included in the second ladder control program 410P is hereinafter referred to as a second block). The first block included in the first ladder control program 400P and the second block included in the second ladder control program 410P are compared for each comparison element F5. The comparison element F5 is configured on the basis of a processing instruction F30, an element type F41, and an element ID F43 that are important in configuring a ladder control program.

判定部207は、第1ラダー制御プログラム400Pの第1ブロックに含まれる比較要素F5と、第2ラダー制御プログラム410Pの第2ブロックに含まれる比較要素F5とが一致するか否かを比較要素F5毎に判定する(比較要素判定)。具体的には、判定部207は、第1ブロックに含まれる処理命令F30と、要素の種類F41と、要素ID F43と、第2ブロックとに含まれる処理命令F30と、要素の種類F41と、要素ID F43とが、それぞれ一致するか否かを判定する。   The determination unit 207 determines whether or not the comparison element F5 included in the first block of the first ladder control program 400P matches the comparison element F5 included in the second block of the second ladder control program 410P. Determine each time (comparison element determination). Specifically, the determination unit 207 includes a processing instruction F30 included in the first block, an element type F41, an element ID F43, a processing instruction F30 included in the second block, an element type F41, It is determined whether or not the element ID F43 matches each other.

また、判定部207は、第1ブロックと、第2ブロックとのブロック一致度F9(後述)を算出する。このブロック一致度F9は、重み付けテーブルD211(後述)の比較要素F5の重み付け値F7(後述)を利用して算出される。具体的には、判定部207は、前述した比較要素判定に基づいて、一致の場合100点、不一致の場合0点を比較要素F5毎の重み付けに応じて計算し、重み付け値F7を算出する。判定部207は、一致した比較要素F5の重み付け値F7を加算することによって、ブロック一致度F9を算出する。   Further, the determination unit 207 calculates a block matching degree F9 (described later) between the first block and the second block. This block matching degree F9 is calculated using a weighting value F7 (described later) of a comparison element F5 of a weighting table D211 (described later). Specifically, based on the comparison element determination described above, the determination unit 207 calculates 100 points in the case of coincidence and 0 points in the case of disagreement according to the weighting for each comparison element F5, and calculates the weight value F7. The determination unit 207 calculates the block matching degree F9 by adding the weighted value F7 of the matched comparison element F5.

判定部207は、ブロック一致度F9と一致度判定テーブルD213とに基づいて、単位ブロックF3について一致か否かを判定する(ブロック判定)。ブロック判定で不一致の判定がされた場合、判定部207は、第2プログラムに含まれる第2ブロックに割り当てられるブロック番号の次のブロック番号を有する第2ブロックと第1ブロックとを新たに比較対照とする(ブロック照合)。全ての第2ブロックと第1ブロックと判定が実行され、不一致の判定がされた場合、判定部207は、不一致の判定をする。一方、全ての第2ブロックと判定が実行されていない場合、判定部207は、全ての第2ブロックと判定されていない情報を抽出部205へ送信する。   The determination unit 207 determines whether or not the unit block F3 matches based on the block matching degree F9 and the matching degree determination table D213 (block determination). When it is determined that there is a mismatch in the block determination, the determination unit 207 newly compares the second block having the block number next to the block number assigned to the second block included in the second program with the first block. (Block verification). When all the second blocks and the first block are determined and a mismatch is determined, the determination unit 207 determines a mismatch. On the other hand, when the determination is not performed for all the second blocks, the determination unit 207 transmits information that is not determined to be all the second blocks to the extraction unit 205.

なお、判定部207は、一致度判定テーブルD213に基づいて一致判定を「完全一致」判定と、「相違あり一致」判定とに区分してもよい。また、判定部207は、一致度判定テーブルD213に基づいて不一致判定を「一致可能性あり」判定と、「不一致」判定とに区分してもよい。   Note that the determination unit 207 may classify the match determination into a “perfect match” determination and a “match with difference” determination based on the match determination table D213. Further, the determination unit 207 may classify the mismatch determination into a “possibility of matching” determination and a “mismatch” determination based on the matching degree determination table D213.

出力部209は、上述した判定部207の判定結果を出力する。具体的には、出力部209は、モニター等に出力する。   The output unit 209 outputs the determination result of the determination unit 207 described above. Specifically, the output unit 209 outputs to a monitor or the like.

重み付け記憶部211は、後述する重み付けテーブルD211(図4参照)を記憶する。具体的には、重み付け記憶部211は、RAM等の内部記憶装置を用いても良く、ハードディスクやフレキシブルディスク等の外部記憶装置を用いても良い。   The weight storage unit 211 stores a weighting table D211 (see FIG. 4) described later. Specifically, the weight storage unit 211 may use an internal storage device such as a RAM or an external storage device such as a hard disk or a flexible disk.

判定基準記憶部213は、後述する一致度判定テーブルD213(図5参照)を記憶する。具体的には、判定基準記憶部213には、RAM等の内部記憶装置を用いても良く、ハードディスクやフレキシブルディスク等の外部記憶装置を用いても良い。   The determination criterion storage unit 213 stores a coincidence degree determination table D213 (see FIG. 5) described later. Specifically, the determination criterion storage unit 213 may use an internal storage device such as a RAM or an external storage device such as a hard disk or a flexible disk.

次に上述した重み付け記憶部211に記憶される重み付けテーブルD211について説明する。図4は、重み付けテーブルD211の内容を示している。重み付けテーブルD211は、比較要素F5と重み付け値F7とを対応づけたテーブルである。重み付けテーブルD211は、比較要素F5毎に重み付け値F7を有する。重み付け値F7は、予めユーザーにより設定された重み付けにより算出された値である。   Next, the weighting table D211 stored in the weighting storage unit 211 described above will be described. FIG. 4 shows the contents of the weighting table D211. The weighting table D211 is a table in which the comparison element F5 is associated with the weighting value F7. The weighting table D211 has a weighting value F7 for each comparison element F5. The weighting value F7 is a value calculated by weighting set in advance by the user.

次に、上述した判定基準記憶部213に記憶される一致度判定テーブルD213について説明する。図5は、一致度判定テーブルD213の内容を示している。一致度判定テーブルD213は、ブロック一致度F9と、照合判定とを対応づけたテーブルである。照合判定は、一致・不一致判定と、詳細判定とに分けられる。   Next, the coincidence degree determination table D213 stored in the above-described determination criterion storage unit 213 will be described. FIG. 5 shows the contents of the coincidence degree determination table D213. The coincidence determination table D213 is a table in which the block coincidence F9 is associated with the collation determination. The collation determination is divided into a match / mismatch determination and a detailed determination.

一致・不一致判定は、一致判定もしくは不一致判定の二つである。具体的には、判定部207は、ブロック一致度が80点以上である場合に一致判定をする。また、判定部207は、ブロック一致度が80点未満である場合に不一致判定をする。  There are two types of match / mismatch determination: match determination or mismatch determination. Specifically, the determination unit 207 determines a match when the block matching degree is 80 or more. Also, the determination unit 207 determines a mismatch when the block matching degree is less than 80 points.

例えば、照合プロ第1ブロックと第2ブロックとの比較要素判定をした際に、処理命令F30と要素ID F43は一致の判定をしたが、要素の種類F41が不一致の判定をした場合を考える。  For example, when the comparison element determination between the verification professional first block and the second block is performed, the processing instruction F30 and the element ID F43 are determined to match, but the element type F41 is determined to be mismatched.

この場合、判定部207は、重み付けテーブルD211に基づいて、処理命令F30の重み付け値F7が50点、要素の種類F41の重み付け値F7が0点、要素ID F43の重み付け値F7が20点という数値を算出する。  In this case, based on the weighting table D211, the determination unit 207 has numerical values such that the weighting value F7 of the processing instruction F30 is 50 points, the weighting value F7 of the element type F41 is 0 points, and the weighting value F7 of the element ID F43 is 20 points. Is calculated.

判定部207は、比較要素F5毎の重み付け値F7を総計してブロック一致度F9 70点を算出する。判定部207は、ブロック一致度F9 70点と一致度判定テーブルD213とに基づいて、不一致の判定をする。  The determination unit 207 calculates the block matching degree F970 by adding the weighting value F7 for each comparison element F5. The determination unit 207 determines a mismatch based on 70 points of the block matching degree F970 and the matching degree determination table D213.

詳細判定は、ブロック一致度F9に応じてブロック一致度F9が高い順に「完全一致」と、「相違あり一致」と、「一致可能性あり」と、「不一致」と段階的に分別される。   The detailed determination is stepwise classified into “complete match”, “match with difference”, “possibility of match”, and “mismatch” in descending order of the block match F9 according to the block match F9.

具体的には、判定部207は、ブロック一致度が100点である場合に「完全一致」判定をする。判定部207は、ブロック一致度が80点〜99点である場合に「相違あり一致」の判定をする。判定部207は、ブロック一致度が50点〜79点である場合に「一致可能性あり」の判定をする。判定部207は、ブロック一致度が0点〜49点である場合に「不一致」の判定をする。   Specifically, the determination unit 207 determines “perfect match” when the block matching degree is 100 points. The determination unit 207 determines “match with difference” when the block matching degree is 80 to 99 points. The determination unit 207 determines “matching possibility” when the block matching degree is 50 to 79 points. The determination unit 207 determines “mismatch” when the block matching degree is 0 to 49 points.

なお、詳細判定毎に区分されたブロック一致度F9の配点は、予めユーザーにより設定されている値である。また、詳細判定は、この4段階に限られるものではなく、ユーザーの必要に応じて増減できるものである。   The score of the block matching degree F9 divided for each detailed determination is a value set in advance by the user. Further, the detailed determination is not limited to these four stages, and can be increased or decreased according to the needs of the user.

図6は、照合プログラムによって得られた判定結果を出力した一例の一部抜粋である。図6は、照合対照となる第1ラダー制御プログラム400Pと第2ラダー制御プログラム410Pとをラダー図で表示している。図6は、一致度判定テーブルD213を基に不一致と判定された単位ブロックF3が点線で囲まれている。  FIG. 6 is a partial extract of an example in which the determination result obtained by the collation program is output. FIG. 6 shows a ladder diagram of the first ladder control program 400P and the second ladder control program 410P that are to be compared. In FIG. 6, the unit block F3 determined to be inconsistent based on the degree-of-match determination table D213 is surrounded by a dotted line.

例えば、図6において、第2ラダー制御プログラム410Pは、ブロック番号2の単位ブロックF3にステップを追加したことにより、第1ラダー制御プログラム400Pと比較した際に、処理命令F30と、要素ID F43と、要素の種類F41とが不一致の判定を受けた結果、ブロック番号2が点線で囲まれている。   For example, in FIG. 6, the second ladder control program 410P adds a step to the unit block F3 with the block number 2 so that when compared with the first ladder control program 400P, the processing instruction F30, the element ID F43, As a result of the determination that the element type F41 does not match, the block number 2 is surrounded by a dotted line.

図6は、比較対照のラダー制御プログラムを左右に表示することで、ラダー制御プログラムの構造の違いをすぐに確認することができる。また、照合プログラムによって得られた判定結果は、点線の種類を図5の一致度判定テーブルD213の詳細判定別に段階的に分ける方法をとってもよい。   In FIG. 6, by displaying the comparison ladder control program on the left and right, the difference in the structure of the ladder control program can be immediately confirmed. Moreover, the determination result obtained by the collation program may take a method in which the type of dotted line is divided step by step according to the detailed determination of the coincidence determination table D213 in FIG.

(照合プログラムの動作)
次に、図7を参照して、単位ブロックF3を有する第1ラダー制御プログラム400Pと、単位ブロックF3を有する第2ラダー制御プログラム410Pとを照合する照合プログラムの動作フローについて説明する。
(Verification program operation)
Next, with reference to FIG. 7, the operation flow of the collation program that collates the first ladder control program 400P having the unit block F3 and the second ladder control program 410P having the unit block F3 will be described.

ここで、第1ラダー制御プログラム400Pは、第1番目から第n番目までの単位ブロックF3を有する。また、第2ラダー制御プログラム410Pは、第1番目から第m番目までの単位ブロックF3を有する。  Here, the first ladder control program 400P includes first to nth unit blocks F3. The second ladder control program 410P includes first to mth unit blocks F3.

図7に示すように、ステップS201において、取込部201は、PLC1号機400で第1ラダー制御プログラム400Pが記録された外部記録媒体より第1ラダー制御プログラム400Pを取り込む。取り込まれた第1ラダー制御プログラム400Pは、編集用プログラム記憶部203に第1ラダー制御プログラム400Pとして記憶される。同様にして、取込部201は、PLC2号機410で第2ラダー制御プログラム410Pが記録された外部記録媒体より第2ラダー制御プログラム410Pを取り込む。取り込まれた第2ラダー制御プログラム410Pは、編集用プログラム記憶部203に第2ラダー制御プログラム410Pとして記憶される。  As shown in FIG. 7, in step S201, the capturing unit 201 captures the first ladder control program 400P from an external recording medium on which the first ladder control program 400P is recorded by the PLC 1 machine 400. The fetched first ladder control program 400P is stored in the editing program storage unit 203 as the first ladder control program 400P. Similarly, the capturing unit 201 captures the second ladder control program 410P from the external recording medium on which the second ladder control program 410P is recorded by the PLC No. 410. The fetched second ladder control program 410P is stored in the editing program storage unit 203 as the second ladder control program 410P.

ステップS203において、抽出部205は、第2ラダー制御プログラム410Pの第i番目の単位ブロックF3と、第1ラダー制御プログラム400Pの第i番目の単位ブロックF3を比較対照として決定する。   In step S203, the extraction unit 205 determines the i-th unit block F3 of the second ladder control program 410P and the i-th unit block F3 of the first ladder control program 400P as comparison references.

ステップS205において、抽出部205は、第2ラダー制御プログラム410Pの単位ブロックF3に含まれる比較要素F5と、第1ラダー制御プログラム400Pの単位ブロックF3に含まれる比較要素F5とを抽出する。   In step S205, the extraction unit 205 extracts the comparison element F5 included in the unit block F3 of the second ladder control program 410P and the comparison element F5 included in the unit block F3 of the first ladder control program 400P.

ステップS207において、判定部207は、第1ラダー制御プログラム400Pの単位ブロックF3に含まれる比較要素F5と、第2ラダー制御プログラム410Pの単位ブロックF3に含まれる比較要素F5とが一致するか否かを判定する。   In step S207, the determination unit 207 determines whether or not the comparison element F5 included in the unit block F3 of the first ladder control program 400P matches the comparison element F5 included in the unit block F3 of the second ladder control program 410P. Determine.

ステップS209において、判定部207は、ステップS207で一致と判定された比較要素F5の重み付け値F7を加算することによってブロック一致度F9として算出する。   In step S209, the determination unit 207 calculates the block matching degree F9 by adding the weighting value F7 of the comparison element F5 determined to be matching in step S207.

ステップS211において、判定部207は、ステップS209で算出されたブロック一致度F9と一致度判定テーブルD213とに基づいて一致もしくは不一致の判定をする。   In step S211, the determination unit 207 determines matching or mismatching based on the block matching degree F9 calculated in step S209 and the matching degree determination table D213.

ステップS213において、判定部207は、ブロック一致度F9が、ステップS209で一致と判定されれば、ステップS215へ進み、不一致と判定されればステップS217へ進む。   In step S213, the determination unit 207 proceeds to step S215 if the block matching degree F9 is determined to be coincident in step S209, and proceeds to step S217 if it is determined that the block coincidence is not coincident.

ステップS215において、出力部209は、ブロック一致度F9についてのステップS211の判定をもとに一致もしくは不一致の出力をする。具体的には、出力部209は、ブロック一致度F9が、ステップS209で一致と判定された場合、つまりステップS211のYesでは一致の出力をする。また、出力部209は、ステップS215(後述)で、全ブロックが照合されていた場合、つまりステップS217のYesでは不一致の出力をする。なお、出力部209は、一致度判定テーブルD213と、ブロック一致度F9とに基づいて、「完全一致」と、「相違あり一致」と、「一致可能性あり」と、「不一致」とのいずれかを出力してもよい。   In step S215, the output unit 209 outputs matching or mismatching based on the determination in step S211 regarding the block matching degree F9. Specifically, the output unit 209 outputs a match when the block matching degree F9 is determined to be a match in step S209, that is, Yes in step S211. Further, the output unit 209 outputs a mismatch when all the blocks are collated in step S215 (described later), that is, in step S217 Yes. Note that the output unit 209 selects any one of “complete match”, “match with difference”, “possibility of match”, and “mismatch” based on the match determination table D213 and the block match F9. May be output.

ステップS217において、判定部207は、第2ラダー制御プログラム410Pの第i番目から第m番目の単位ブロックF3が第1ラダー制御プログラム400Pの第i番目の単位ブロックF3と比較されたか否かを検索する。判定部207は、第2ラダー制御プログラム410Pの第i番目から第m番目の単位ブロックF3が照合されていればステップS215へ進む。判定部207は、第2ラダー制御プログラム410Pの第i番目から第m番目の単位ブロックF3が照合されていなければ、ステップS203へ進む。   In step S217, the determination unit 207 searches whether or not the i-th to m-th unit block F3 of the second ladder control program 410P is compared with the i-th unit block F3 of the first ladder control program 400P. To do. If the i-th to m-th unit block F3 of the second ladder control program 410P is collated, the determination unit 207 proceeds to step S215. If the i-th to m-th unit block F3 of the second ladder control program 410P is not collated, the determination unit 207 proceeds to step S203.

第i番目から第m番目の単位ブロックF3が照合されていない場合、ステップS203において、抽出部205は、第2ラダー制御プログラム410Pの次の(第i+1番目の)単位ブロックF3と、第1ラダー制御プログラム400Pの第i番目の単位ブロックF3とを照合する決定をする。   When the i-th to m-th unit block F3 is not collated, in step S203, the extraction unit 205 determines the next (i + 1) -th unit block F3 of the second ladder control program 410P, and the The decision is made to collate with the i-th unit block F3 of the 1 ladder control program 400P.

また、照合プログラムは、ステップS209と、ステップS211と、ステップS217とを省略してもよい。この場合、ステップS213において、出力部209は、ステップS207における判定結果を出力する。具体的には、出力部209は、第1ラダー制御プログラム400Pの単位ブロックF3に含まれる比較要素F5と、第2ラダー制御プログラム410Pの単位ブロックF3に含まれる比較要素F5とが一致するか否かの情報を出力する。   Further, the collation program may omit step S209, step S211 and step S217. In this case, in step S213, the output unit 209 outputs the determination result in step S207. Specifically, the output unit 209 determines whether or not the comparison element F5 included in the unit block F3 of the first ladder control program 400P matches the comparison element F5 included in the unit block F3 of the second ladder control program 410P. Information is output.

なお、比較対照となるラダー制御プログラムは、第1ラダー制御プログラム400Pと、第2ラダー制御プログラム410Pとでなくてもよく、照合する目的のある2つのラダー制御プログラムであっても勿論よい。   It should be noted that the ladder control program to be compared is not limited to the first ladder control program 400P and the second ladder control program 410P, and may of course be two ladder control programs with the purpose of collation.

(本実施形態に係る照合プログラムの作用・効果)
以上説明した本実施形態に係る照合プログラムによれば、照合プログラムは、各単位ブロックF3について比較要素F5毎に一致もしくは不一致判定をすることにより、ステップ番号F20が異なっていても、比較要素F5が一致していれば、一致と判定することができる。すなわち、ユーザーは、ステップF1毎に一致もしくは不一致の判定をするのみの照合と違い、単位ブロックF3毎に一致もしくは不一致についての情報を知ることができる。すなわち、照合プログラムは、命令が追加された場合等であっても第1ラダー制御プログラムと第2ラダー制御プログラムとの対応するステップF1を照合することができる。
(Operation and effect of the collation program according to this embodiment)
According to the collation program according to the present embodiment described above, the collation program determines whether each unit block F3 matches or does not match for each comparison element F5, so that the comparison element F5 is different even if the step number F20 is different. If they match, it can be determined that they match. That is, the user can know the information about the match or mismatch for each unit block F3, unlike the collation that only determines the match or mismatch for each step F1. That is, the collation program can collate the corresponding step F1 between the first ladder control program and the second ladder control program even when an instruction is added.

また、照合プログラムは、比較要素判定手順(ステップS207)における判定結果及び重み付け値F7に応じて単位ブロックF3毎にブロック一致度F9を算出することにより、ブロック毎にブロック一致度F9について判定することができる。  Further, the collation program determines the block matching degree F9 for each block by calculating the block matching degree F9 for each unit block F3 according to the determination result in the comparison element determination procedure (step S207) and the weighting value F7. Can do.

また、照合プログラムは、ブロック一致度F9に応じて単位ブロックF3毎の判定を区分することにより、ユーザーにブロック一致度F9が大きく変わった単位ブロックF3(一致度が低いブロック)等に関する情報を効率よく提供することができる。   Further, the collation program classifies the determination for each unit block F3 according to the block matching degree F9, so that the user can efficiently obtain information on the unit block F3 (block with a low matching degree) etc. whose block matching degree F9 has changed significantly. Can be provided well.

ま作用・効果請求項3た、照合プログラムは、第2ブロックに割り当てられるブロック番号F10の次のブロック番号F10を有する第2ブロックと、第1ブロックとを新たに比較対照とすることにより、第1ブロックのブロック番号F10と異なるブロック番号F10を有する第2ブロックとの比較を実行することができる。   The collation program according to the third aspect of the present invention has the second block having the block number F10 next to the block number F10 assigned to the second block and the first block as a new comparison reference. A comparison between a block number F10 of one block and a second block having a different block number F10 can be performed.

第2ラダー制御プログラムが編集の際に追加された単位ブロックF3を有する場合、照合プログラムは、第1ブロックのブロック番号F10以降のブロック番号F10を有する第2部ブロックを比較することにより、ブロック番号F10の異なる第1ブロックと、第2ブロックとでも、一致もしくは不一致の判定をすることができる。  When the second ladder control program has the unit block F3 added at the time of editing, the collation program compares the second part block having the block number F10 after the block number F10 of the first block, thereby comparing the block number. It is possible to determine whether the first block and the second block having different F10 match or do not match.

また、照合プログラムは、単位ブロックF3で比較要素F5毎に一致するか否かを出力することにより、ユーザーにステップF1単位で一致または、不一致の判定をするのみの照合によるステップF1毎の照合結果と違い、対応するステップF1が一致か否かについての情報を単位ブロックF3で提供することができる。   In addition, the collation program outputs whether or not each comparison element F5 matches in the unit block F3, so that the collation result for each step F1 by the collation that only determines whether the unit matches or does not match in step F1 units. Unlike the case, information about whether or not the corresponding step F1 is the same can be provided in the unit block F3.

ブロック判定手順(ステップS211)におけるブロック一致度F9を判定結果として出力することにより、ユーザーに比較要素F5毎の全ての不一致情報を提供するのではなく、重み付け値F7に基づいて判定されたブロック一致度F9の情報を提供することができる。   By outputting the block matching degree F9 in the block determination procedure (step S211) as a determination result, the block matching determined based on the weighting value F7 is not provided to the user for all the mismatch information for each comparison element F5. Information of degree F9 can be provided.

照合プログラムは、ブロック一致度F9に応じて単位ブロックF3毎の判定を区分して出力することにより、ユーザーにブロック一致度F9が大きく変わった単位ブロックF3(ブロック一致度F9が低い単位ブロックF3)等に関する情報を効率よく提供することができる。   The collation program classifies and outputs the determination for each unit block F3 according to the block matching degree F9, so that the unit block F3 whose block matching degree F9 has changed greatly to the user (unit block F3 having a low block matching degree F9). Etc. can be provided efficiently.

本発明の一実施形態に係る照合プログラムの全体概略構成図である。It is a whole schematic block diagram of the collation program which concerns on one Embodiment of this invention. 本発明の一実施形態に係る照合プログラムにより照合されるラダー制御プログラムの構成を説明する説明図である。It is explanatory drawing explaining the structure of the ladder control program collated with the collation program which concerns on one Embodiment of this invention. 本発明の一実施形態に係る照合プログラムの論理ブロック構成図である。It is a logic block block diagram of the collation program which concerns on one Embodiment of this invention. 本発明の一実施形態に係る照合プログラムに設定される重み付け情報を説明する説明図である。It is explanatory drawing explaining the weighting information set to the collation program which concerns on one Embodiment of this invention. 本発明の一実施形態に係る照合プログラムに設定される一致度判定情報を説明する説明図である。It is explanatory drawing explaining the coincidence degree determination information set to the collation program which concerns on one Embodiment of this invention. 本発明の一実施形態に係る照合プログラムにより出力される情報を説明する説明図である。It is explanatory drawing explaining the information output by the collation program which concerns on one Embodiment of this invention. 本発明の一実施形態に係る照合プログラムの動作フロー図である。It is an operation | movement flowchart of the collation program which concerns on one Embodiment of this invention.

符号の説明Explanation of symbols

200…コンピュータ
201…取込部
203…編集用プログラム記憶部
205…抽出部
207…判定部
209…出力部
211…重み付け記憶部
D211…重み付けテーブル
213…判定基準記憶部
D213…一致度判定テーブル
400…PLC1号機
400P…第1ラダー制御プログラム
410…PLC2号機
410P…第2ラダー制御プログラム
600…機器1号機
610…機器2号機
F1…ステップ
F3…単位ブロック
F5…比較要素
F7…重み付け値
F9…ブロック一致度
F10…ブロック番号
F20…ステップ番号
F30…処理命令
F40…要素
F41…要素の種類
F43…要素ID
200 ... Computer 201 ... Reading unit 203 ... Editing program storage unit 205 ... Extracting unit 207 ... Determining unit 209 ... Output unit 211 ... Weighting storage unit D211 ... Weighting table 213 ... Determination reference storage unit D213 ... Matching degree determination table 400 ... PLC 1 machine 400P ... 1st ladder control program 410 ... PLC 2 machine 410P ... 2nd ladder control program 600 ... Equipment 1 machine 610 ... Equipment 2 machine F1 ... Step F3 ... Unit block F5 ... Comparison element F7 ... Weighting value F9 ... Block matching degree F10 ... Block number F20 ... Step number F30 ... Processing instruction F40 ... Element F41 ... Element type F43 ... Element ID

Claims (4)

処理命令と、前記処理命令を実行する要素の種類と、前記要素に割り当てられる要素IDとを有するステップを含む単位ブロックを少なくとも複数有する第1ラダー制御プログラムと、前記単位ブロックを少なくとも複数有する第2ラダー制御プログラムとを照合する照合プログラムであって、コンピュータに、
前記第1ラダー制御プログラムが有する前記単位ブロックである第1ブロックに割り当てられるブロック番号と、前記第2ラダー制御プログラムが有する前記単位ブロックである第2ブロックに割り当てられるブロック番号とが同じである前記第1ブロックと、前記第2ブロックとを比較対照とするブロック決定手順と、
前記第1ブロックに含まれる前記処理命令と、前記要素の種類と、前記要素IDとを比較要素として抽出し、前記第2ブロックに含まれる前記処理命令と、前記要素の種類と、前記要素IDとを比較要素として抽出する抽出手順と、
前記第1ブロックに含まれる前記比較要素と、前記第2ブロックに含まれる前記比較要素とが一致するか否かを判定する比較要素判定手順とを実行させることを特徴とする照合プログラム。
A first ladder control program having at least a plurality of unit blocks including a step having a processing instruction, a type of an element for executing the processing instruction, and an element ID assigned to the element; and a second having at least a plurality of the unit blocks. A collation program that collates with a ladder control program.
The block number assigned to the first block which is the unit block included in the first ladder control program and the block number assigned to the second block which is the unit block included in the second ladder control program are the same. A block determination procedure in which the first block and the second block are compared and compared;
The processing instruction included in the first block, the element type, and the element ID are extracted as comparison elements, and the processing instruction included in the second block, the element type, and the element ID are extracted. Extraction procedure for extracting as a comparison element,
A comparison program for executing a comparison element determination procedure for determining whether or not the comparison element included in the first block matches the comparison element included in the second block.
前記比較要素には、前記比較要素の重要度に応じて重み付け値が対応付けられ、前記比較要素判定手順における判定結果及び前記重み付け値に基づいて、前記第1ブロックと前記第2ブロックとの一致度を判定するブロック判定手順を更に含むことを特徴とする請求項1に記載の照合プログラム。   The comparison element is associated with a weighting value in accordance with the importance of the comparison element, and the first block and the second block are matched based on the determination result in the comparison element determination procedure and the weighting value. The collation program according to claim 1, further comprising a block determination procedure for determining the degree. 前記ブロック判定手順における判定結果で前記一致度が基準値を下回った場合、前記第2ブロックに割り当てられる前記ブロック番号の次のブロック番号を有する前記第2ブロックと、前記第1ブロックとを新たに比較対照とするブロック照合手順を更に含むことを特徴とする請求項2に記載の照合プログラム。  If the degree of coincidence falls below a reference value in the determination result in the block determination procedure, the second block having the block number next to the block number assigned to the second block and the first block are newly The collation program according to claim 2, further comprising a block collation procedure as a comparison reference. 前記比較要素判定手順における判定結果、または、前記ブロック判定手順における判定結果を出力する出力手順を含むことを特徴とする請求項2または請求項3に記載の照合プログラム。  4. The collation program according to claim 2, further comprising an output procedure for outputting a determination result in the comparison element determination procedure or a determination result in the block determination procedure.
JP2005059589A 2005-03-03 2005-03-03 Collation program Pending JP2006244178A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005059589A JP2006244178A (en) 2005-03-03 2005-03-03 Collation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005059589A JP2006244178A (en) 2005-03-03 2005-03-03 Collation program

Publications (1)

Publication Number Publication Date
JP2006244178A true JP2006244178A (en) 2006-09-14

Family

ID=37050528

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005059589A Pending JP2006244178A (en) 2005-03-03 2005-03-03 Collation program

Country Status (1)

Country Link
JP (1) JP2006244178A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007058368A (en) * 2005-08-23 2007-03-08 Yokogawa Electric Corp Collating device for program
JP2010032351A (en) * 2008-07-29 2010-02-12 Yokogawa Electric Corp Operation test support device
JP2013109713A (en) * 2011-11-24 2013-06-06 Jtekt Corp Peripheral equipment of programmable controller
CN104714468A (en) * 2014-12-31 2015-06-17 北京纵横机电技术开发公司 Method of comparison between continuous functional diagram files

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007058368A (en) * 2005-08-23 2007-03-08 Yokogawa Electric Corp Collating device for program
JP4556807B2 (en) * 2005-08-23 2010-10-06 横河電機株式会社 Program verification device
JP2010032351A (en) * 2008-07-29 2010-02-12 Yokogawa Electric Corp Operation test support device
JP2013109713A (en) * 2011-11-24 2013-06-06 Jtekt Corp Peripheral equipment of programmable controller
CN104714468A (en) * 2014-12-31 2015-06-17 北京纵横机电技术开发公司 Method of comparison between continuous functional diagram files
CN104714468B (en) * 2014-12-31 2017-10-03 北京纵横机电技术开发公司 A kind of comparative approach of continuous function map file

Similar Documents

Publication Publication Date Title
Martinez et al. Bottom-up technologies for reuse: automated extractive adoption of software product lines
US20100161085A1 (en) Peripheral device of programmable controller, method of variable substitution, and computer program product thereof
JP4556807B2 (en) Program verification device
CN111553070A (en) Finite state machine modeling method and device for stabilizing action logic of control device and storage medium
JP2006244178A (en) Collation program
CN107003664A (en) Design of information system aid and design of information system auxiliary program
CN114546510B (en) Verification method and device for suspend function, electronic equipment and storage medium
CN110442371A (en) A kind of method, apparatus of release code, medium and computer equipment
CN107632837B (en) Program burning system and method
CN107450953A (en) A kind of renewal BIOS method and device
TW201730786A (en) Analysis system and analysis method for executing analysis process with at least portions of time series data and analysis data as input data
CN110968307A (en) Micro-service construction method and device based on intelligent generation of basic codes
EP2620827A2 (en) Work content creation apparatus and method, and workflow creation apparatus and method
CN113001538B (en) Command analysis method and system
JP2009169573A (en) Analysis result output device and analysis result output method
JP2002014845A (en) Method for automatically generating test script part and device for the same
US11847148B2 (en) Information processing device and setting device
JP2008052359A (en) Test case generation device, test case generation method, and test case generator
KR101726120B1 (en) Program editing device, program editing method and computer readable recoding medium for recording program editing program
JP2007047849A (en) Preparation program for screen data for programmable display unit and computer-readable recording medium and screen data preparing device
JP2006235999A (en) Collation program
JP2007310829A (en) Data processor, data processing method and data processing program
JP3850867B1 (en) Source program creation support system
CN107885641A (en) A kind of operation management method and apparatus
JP2005063425A (en) Simulation support tool, verification system of ladder program, generation method of program product and test input ladder program, and verification method of the ladder program