Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3890746B2 - Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine - Google Patents
[go: Go Back, main page]

JP3890746B2 - Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine - Google Patents

Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine Download PDF

Info

Publication number
JP3890746B2
JP3890746B2 JP15547398A JP15547398A JP3890746B2 JP 3890746 B2 JP3890746 B2 JP 3890746B2 JP 15547398 A JP15547398 A JP 15547398A JP 15547398 A JP15547398 A JP 15547398A JP 3890746 B2 JP3890746 B2 JP 3890746B2
Authority
JP
Japan
Prior art keywords
executed
information
active
command
processing
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.)
Expired - Fee Related
Application number
JP15547398A
Other languages
Japanese (ja)
Other versions
JPH11353009A (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.)
Fuji Electric FA Components and Systems Co Ltd
Original Assignee
Fuji Electric FA Components and Systems Co Ltd
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 Fuji Electric FA Components and Systems Co Ltd filed Critical Fuji Electric FA Components and Systems Co Ltd
Priority to JP15547398A priority Critical patent/JP3890746B2/en
Publication of JPH11353009A publication Critical patent/JPH11353009A/en
Application granted granted Critical
Publication of JP3890746B2 publication Critical patent/JP3890746B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、共通処理ルーチンに対する指令入力処理の自動生成方法、プログラムの自動生成装置及び自動生成プログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
機械の動作、あるいは工場のコンベア制御などのためにプログラマブルコントローラが用いられている。プログラマブルコントローラにより機器を制御するためには、プログラマブルコントローラの制御動作を定めるシーケンスプログラムを作成する必要がある。シーケンスプログラムを作成する場合、プログラミング知識の無い機械技術者が機械の動作仕様を動作フローで記述し、これを元にプログラミング担当者がシーケンスプログラムのフローチャートを作成していた。この場合、2つのフローは各要素の意味が異なっているので、プログラミング担当者が動作フローの各要素の内容を解釈してプログラムフローを作成する必要がある。これはプログラム開発そのものであり、プログラミング担当者に依存したものとなり、動作フローとプログラムフローとを完全に一致させることは困難であった。そこで、このような問題点を解決するために、本発明者は、先に特願平9−354522において、制御対象機器のシーケンス動作を記述した動作フローからシーケンスプログラムを自動生成する方法を提案した。
【0003】
ところで、上記の出願において、コンベア、ロボット等に対する共通処理ルーチンを部品として定義しているが、それらの部品に対する制御指示を指令として定義することが考えられる。実行可能な指令を複数持つ部品において同時に複数の指令を与えることが許されない場合、この部品に対して同時に複数の指令が与えられないように指令を排他管理する必要が生じる。
【0004】
図23は、ロボット1、2の部品に対して停止、搬入、搬出の指令を定義した場合の入出力端子を示す図であり、図24は部品の内部処理を示す図である。
図23に示すように停止、搬入等の指令端子を部品に設けた場合、図24に示すように部品の内部処理として指令の排他管理を行うnC1チェック処理と、そのチェック結果がエラーであった場合に、エラー出力を行うエラー出力処理を部品の内部処理としてユーザが作成する必要がある。
【0005】
【発明が解決しようとする課題】
しかしながら、部品の内部処理として指令の排他管理を行うチェックプログラムを作成するようにすると、プログラムの作成に慣れていないユーザは、停止、搬入等の指令処理プログラムを作成することは行っても、チェックプログラムの作成を忘れ、機器の制御に不都合が生じることが考えられる。
【0006】
また、部品の内部処理としてチェックプログラムを作成する方法は、部品毎にエラー情報をメインルーチンに出力する必要があり、それに対応してメインルーチン側で各部品のエラー情報を記憶するための変数を定義し、その変数を記憶するメモリ領域を確保しておく必要が生じる。これに加えて、メイン処理内に部品エラーに対する処理を記述する必要が有る。これは、部品の数が増えると、それにつれて必要なメモリ容量も増大するので、メモリを有効に活用する上で問題となる。
【0007】
本発明の課題は、共通処理ルーチンに対する指令入力処理を自動的に生成できるようにすることである。
【0008】
【課題を解決するための手段】
本発明は、制御対象機器のシーケンス動作を記述した動作フローに基づいて生成されるシーケンスプログラムの共通処理ルーチンに対する指令入力処理の自動生成方法であって、前記動作フローの要素毎に前記要素が実行可能な状態か否かを示す活性情報と、前記要素が実行済みか否かを示す実行済情報と、前記要素の実行を保留状態にする保留情報とを生成し、前記動作フローの各要素に対応させて前記要素の活性情報が活性、かつ実行済情報が未実行のとき前記要素の処理を実行し、前記要素の実行済情報を実行済みにするステップ処理と、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留のとき、前記要素の活性情報を非活性、実行済情報を未実行に変更し、実行権を次の要素に移動させるトランジション処理とを生成し、前記制御対象機器である部品の指令入力画面において指定された指令のみを有効にし、他の指令を無効にして指令の排他管理を行う処理を、前記共通処理ルーチンをコールするメインルーチンの中の前記指令入力処理として生成する。
【0009】
この発明によれば、共通処理ルーチンに同時に異なる指令が与えられる等の不都合が生じない。
【0010】
また、各共通処理ルーチンの内部にチェックプログラムを作成した場合には、チェック結果がエラーのとき、エラー情報がメインルーチンに通知されるので、それぞれの共通処理ルーチンのエラー情報を記憶する領域をメモリに確保しておく必要がある。請求項2記載の発明では、排他管理を行うプログラムをメインルーチンの一部として生成するので、共通処理ルーチンからメインルーチンにエラー情報を通知する必要が無くなる。従って、メモリに共通処理ルーチンからのエラー情報を記憶する領域を設ける必要が無くなり、メモリ容量を節約できる。これに加えて、メインルーチンに部品エラーに対する処理を記述する必要がなくなる。
【0011】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。本発明の前提となる、制御対象機器のシーケンス動作を記述した動作フローからシーケンスプログラムを自動生成する方法について説明する。
【0012】
図1は、本発明の実施の形態のシーケンスプログラム作成装置のブロック図である。
ユーザがキーボード11、マウス12を操作して動作フローの要素と要素の接続情報を入力すると、装置本体13内のフロー作画処理部15が入力されたデータに応じた動作フローをディスプレー14に表示すると共に、各要素の要素データをネット(net)ファイル16に書き込む。なお、動作フローで記述され、シーケンスプログラムで使用されるロボット、コンベア等の部品は部品データベース17に格納される。
【0013】
コンパイラ18は、ネットファイル16の要素データ及び部品データベース17の部品データに基づいて、図2に示す処理、つまり各要素の処理順序を決める処理順序ファイルの生成処理ST201、処理順序ファイルに基づいて後述するステップ処理及びトランジション処理を生成するフロー要素処理生成処理ST202、部品データベース17の部品ファンクションブロックFBの起動法、タスク指定に従って部品処理を生成する部品処理生成処理ST203及びネットファイル16の要素データから範囲指定データを探し、範囲指定がなされている場合に、範囲指定番号毎に範囲指定処理を生成する範囲指定処理生成処理ST204を実行する。
【0014】
これによりコンパイラ18によりフロー要素処理、部品処理、範囲指定処理等からなるシーケンスプログラム19が生成され、プログラマブルロジックコントローラPLC20に出力される。
【0015】
ネットファイル16とは、フロー作画処理部15により動作フローの要素毎に作成される要素データが複数集まって構成されるファイルであり、一定の規則のもとに要素の配列順に定められる要素番号と、要素の種別(例えば、開始、指令、待ち、並列分岐、選択分岐、並列合流、選択合流、END、RETURN、REPEAT)と、来先要素数と、来先要素番号と、行先要素数と、行先要素番号と、その要素で実行する項目(例えば、種別が指令であった場合、部品の各端子に入力する値)と、その要素が範囲指定されている場合に、範囲指定番号と、範囲内の位置(入口または中または出口)とから構成されている。範囲番号は、さらに、イベント、つまり事象の変化の監視か、タイマ監視の何れであるかを示す監視種別と、タイマ監視の場合の時間と、イベント監視の場合の信号名とからなる範囲指定情報からなる。
【0016】
上記のようにしてネットファイル16が作成されたなら、そのネットファイル16を元に、図4に示すような処理順序ファイル40を作成する。以下、図2の処理順序ファイル作成処理ST201の処理内容を、図3のフローチャートを参照して説明する。
【0017】
最初に、ポインタPに「1」を設定し、ネットファイル16から要素種別が開始の要素データの要素番号n1を得て、その要素番号n1とデータ数(この場合、要素種別が開始であるのでデータ数「1」を処理順序ファイルの先頭にセットする(図3、ST301)。これにより、図4の処理順序ファイル40のアドレス1にデータとして開始要素の要素番号n1が、データ数として「1」が記憶される。
【0018】
次に、その処理順序ファイル40のポインタPの指すアドレスのデータD1とデータ数k1を取得する(ST302)。データD1として複数のデータdが存在する場合には、次のステップST303で、データD1の中のデータd1が要素番号のみか、それとも要素番号と行先要素番号とからなるかを判別する。
【0019】
ステップST303で要素番号であると判別された場合には、ステップST304に進み要素番号−行先要素番号セット処理を実行し、要素番号と行先要素番号とからなると判別された場合には、ステップST305に進み要素番号セット処理を実行する。
【0020】
次に、図3のステップST305の要素番号セット処理を、図5を参照して説明する。
先ず、処理順序ファイル40のポインタP1+1の指すアドレスに要素d1の行先要素番号が格納されているか否かを判別する(図5、ST501)。最初の状態では、ポインタP1+1の指すアドレスにはデータは何も格納されていないので、ステップST402に進み、ポインタP1+1の指すアドレスに要素d1の行先要素番号を次の要素の要素番号として格納する。そして、データ数k1回分上記の処理を繰り返したか否かを判別する(ST503)。
【0021】
図6(A)〜(D)は、上述した要素番号セット処理により作成される処理順序ファイルの一例を示す図である。処理順序ファイル40は、要素番号からなる要素番号セルと、要素番号と行先要素番号とからなる要素番号+行先要素番号セルとから構成されている。
【0022】
図6(A)は、ポインタP1が要素番号n1と行先要素番号n2とが記憶されているアドレス「5」を指しているときに、処理順序ファイル40aの次のアドレス「6」にその行先要素番号n2が格納されることを示している。そして、その要素n2の行先要素がネットファイル16から探されて、要素n2の要素番号n2とその行先要素の要素番号が次のアドレス「7」に格納される。すなわち、処理順序ファイル40aには、要素番号と、要素番号+行先要素番号とが交互に格納されることになる。そして、要素番号と行先要素番号が格納された要素番号+行先要素番号セル内の要素番号はそのセルの1つ前に配置される要素番号セル内に存在し、要素番号+行先要素番号セルの行先要素番号はそのセルの次の要素番号セル内に存在することになる。
【0023】
同様に、図6(B)は、ポインタP1の指すセルの要素番号がn1で、その接続先の行先要素番号がn2、n3、n4の場合に、ポインタP1の指すアドレスの次のアドレスに1つ前のセルの行先要素番号が要素番号n2、n3、n4として格納されることを示している。
【0024】
図6(C)は、ポインタP1の指すセルの要素n1,n2,n3の行先要素の要素番号がn4の場合を示しており、次のアドレスP1+1にその行先要素番号n4が、要素番号n4として格納される。
【0025】
図6(D)は、ポインタP1の指すセルの要素n1、n2、n3の行先要素の要素番号がそれぞれn4、n5、n6の場合を示しており、ポインタP1の次のアドレスのセルの要素番号として行先要素番号n4、n5、n6が格納される。
【0026】
図3に戻り、ステップST304の要素番号−行先要素番号セット処理が終了し、ステップST306の判別でデータd1がEND、RETURNまたはREPEATでなかったとき、あるいはステップST305の要素番号セット処理が終了したときには、ステップST307に進みポインタP1に「1」を加算して、上述したステップST302以降の処理を繰り返す。そして、要素としてEND、RETURNまたはREPEATが検出されたなら、処理順序ファイル作成処理を終了する。
【0027】
以上のようにして動作フローから処理順序ファイルを作成したなら、次にその処理順序ファイルに基づいてフロー要素処理の生成を行う。
図7は、図2のフロー要素処理生成処理ST202の処理内容を示すフローチャートである。
【0028】
先ず、ポインタP1を初期化する(図7、ST701)。次に、処理順序ファイル40のポインタP1で指定されるアドレスからデータD1とデータ数k1を読み出す(ST702)。そして、処理順序ファイル40の該当するアドレスにデータが記憶されているか否かを判別する(ST703)。
【0029】
ステップST703で、処理順序ファイル40にデータが記憶されていると判別されたときには、そのデータ型が要素番号か、それとも要素番号−行先要素番号の何れであるかを判別する(ST704)。データ型が要素番号であれば、ステップST705のステップ処理生成処理を実行し、データ型が要素番号−行先要素番号であれば、ステップST706のトランジション処理生成処理を実行する。ステップ処理またはトランジション処理の生成が終了したならポインタP1をインクリメントしてST702に戻り、上記の処理を繰り返す。
【0030】
ここで、図7のステップ処理生成処理ST705の処理内容を、図8を参照して説明する。
最初に、処理順序ファイルのポインタP1で指定されるアドレスのデータD1の中のデータd1を読み出し、そのデータd1に対応するステップスケルトンを生成する(図8、ST801)。
【0031】
この実施の形態では、動作フローの要素毎にその要素が実行可能な状態か否かを示す活性フラグ(活性情報)と、その要素が実行済みであるか否かを示す実行済フラグ(実行済情報)と、その要素を保留状態にする保留フラグ(保留情報)とを設け、要素に対応する処理の実行順序を管理している。そして、要素に対応する処理を、要素自体の実行処理であるステップ処理と次の要素にトークンを移動させるトランジション処理とに分け、動作フローから各要素のステップ処理とトランジション処理を自動生成するようにしている。
【0032】
具体的には、ステップ処理で要素の活性フラグがオン、かつ実行済フラグがオフのとき、その要素自体の処理を実行し、処理が終了したならその要素の実行済フラグをオンにする。そして、トランジション処理で上流要素の活性フラグがオン、かつ実行済フラグがオン、かつ保留フラグがオフのとき、その要素の活性フラグと実行済フラグをオフにして次の要素の活性フラグをオンにし、トークン(実行権)を次の要素に移し次の要素を実行できるようにしている。
【0033】
上記のステップスケルトン生成処理ST801とは、図9(A)に示すような基本的な構成のステップ処理を生成する処理である。基本ステップ処理は、要素nの活性フラグがオン、かつ実行済フラグがオフか否かを判別するステップST901と、活性フラグがオン、かつ実行済フラグがオフのとき、実行済フラグをオンにするステップST902とからなる。
【0034】
また、基本となるトランジション処理は、図9(B)に示すように、上流要素nの活性フラグがオン、かつ実行済フラグがオン、かつ保留フラグがオフであるか否かを判別するステップST903と、上流要素nの活性フラグがオン、かつ実行済フラグがオン、かつ保留フラグがオフのとき、上流要素nの活性フラグをオフし、実行済フラグをオフし、トークンを下流の要素n1に移すために次の要素n1の活性フラグをオンにするステップST904とからなる。
【0035】
これらの基本ステップ処理及び基本トランジション処理に、その要素自体の処理(例えば、指令、分岐など)、条件判定処理等を付加して各要素のステップ処理及びトランジション処理が生成される。
【0036】
図8に戻り、ステップスケルトンを生成したなら、次に要素d1の要素種別をネットファイル16から読み出し、要素種別が指令、待ちか、RETURNか、その他かを判別する(図8、ST802)。
【0037】
要素種別が指令または待ちであれば、ステップST803に進み、部品のパラメータを設定する部品端子入力処理を生成する。また、部品が動作フローの要素の実行時のみコールする関数型部品の場合には、部品データベース17の部品ファンクションブロックをコールする部品処理を生成する。部品がフローの進行と独立して動作する常時型部品の場合、あるいは常時型で、起動タスクが生成されプログラムと別タスクの場合には、部品処理生成処理(図2、ST203)により部品処理が生成される。
【0038】
ここで、ステップST803における部品端子入力処理を図17を参照して説明する。
フロー作画処理部15(図1参照)で作成されたステップ要素で使用している部品名をnetファイル16(図1参照)から取得する(図17、ST1701)。
【0039】
次に、この部品名を元に部品データベース17(図1参照)を検索し、全ての入力端子情報を取得する(図17、ST1702)。
そして、netファイル16から、この部品に対する指令を取得し、検索された1つの入力端子についてこの指令のみを有効とし、他の指令を無効とする処理を生成する(図17、ST1703)。
【0040】
さらに、netファイル16の情報に基づき、残りの入力端子についても同様の処理を生成する(図17、ST1704)。
これにより、部品に対する指令が設定されたときに、指令に対する排他処理が自動生成されるので、従来のようにユーザが部品処理の一部としてチェックプログラムを作成する必要がなくなり、チェックプログラムの作成を忘れて、複数の指令が同時に記述されて動作上の不都合が生じるのを防止できる。
【0041】
また、部品内にチェック処理が不要のため、エラー情報を部品からメインルーチンへ出力する必要がなくなる。これにより、メインルーチンで使用する部品のエラー情報を変数として定義し、その変数を記憶するための領域をメモリに確保する必要がなくなるので、メモリ容量を制約できるとともに、部品エラーに対する処理も不要となる。
【0042】
ステップST802でデータd1の要素種別がRETURNであると判別された場合には、ステップST804のRETURN生成処理を実行する。また、データd1の要素種別が指令、待ち、RETURN以外であったときには、何も処理を実行せずにステップST805に進む。ステップST805では、データ数k1回分ステップ処理生成処理を実行したか否かを判別し、k1回実行したなら元の処理に戻る。
【0043】
図10は、上述したシーケンスプログラム作成装置により動作フローから生成されるシーケンスプログラムの概略を示す図である。
この動作フローは、コンベア1を1m移動させる指令を与えた後、モータ1に停止指令を与えるものである。この動作フロー全体がタスク1として周期的に実行され、モータ1処理がタスク2として5ms毎に実行される。
【0044】
上述した処理順序ファイル作成処理により、動作フローに対応する処理順序ファイル40が作成され、さらにその処理順序ファイル40に基づいてステップ処理及びトラジション処理が生成され、図10に示すように動作フローの1番目の要素「開始」と2番目の要素から、ステップ処理のstep1処理と、トランジション処理のtran1−2処理と、ステップ処理のstep2処理が生成され、以下同様に各要素のとステップ処理とトランジション処理が生成される。
【0045】
上述したシーケンスプログラムの自動生成方法により、動作フローの各要素毎にステップ処理と、要素間の接続と条件判断を行うトランジション処理が生成され、コンベア1を移動させる処理を起動させる処理が部品処理として生成され、5ms毎にモータ1処理等を起動する処理と範囲指定処理が生成される。
【0046】
次に、以上のようなシーケンスプログラムの自動生成の際に、部品に対する排他処理をメインルーチンの一部として自動生成する処理について説明する。
ユーザは、メインルーチンから呼び出す部品を作成する際に、部品の入出力端子名と、その属性、例えばデータ型を設定する。
【0047】
図11は、端子の設定画面を示しており、「指令」、「状態」、「入力」等の端子種別から「指令」を選択して端子名として「停止」、「搬入」、「搬出」を記述し、それぞれのデータ型として「BOOL」を選択する。ここで、「BOOL」とは、1ビットのオン、オフで表されるデータである。この他の入出力端子、状態等の端子名、属性も同様に設定できる。
【0048】
図12は、指令端子の設定画面で設定された部品の部品データベース17におけるデータ構造を示す図である。部品名、端子名(指令、状態は端子の種別を示す)、データ型が対のデータとして保存される。
【0049】
図13は、部品対する制御指示を指令として定義した定義方法に基づく部品の入出力端子を示す図である。本実施の形態では、指令のチェック処理を部品内部で行っていないので、指令チェック処理によりエラーが検出された場合のエラーを出力するエラー出力端子が不要となっている。
【0050】
図14は、部品の内部処理を示す図である。部品名「ロボット1、ロボット2」の指令として「停止」、「搬入」、「搬出」が設定された場合、ロボットの動作を停止させる停止処理、ロボットに部品等を搬入出させる搬入処理、搬出処理、それらの処理に基づいて出力端子から停止出力、搬出出力、搬出出力を出力するための制御出力処理、指令された動作が完了したことを示す停止完、搬入完、搬出完の情報を出力する状態出力処理がユーザにより作成されるが、図23に示されているnC1チェック処理とエラー出力処理は不要となる。
【0051】
次に、図15は、上述したようにして入出力端子の設定が終了した後に、部品に対する指令を入力する入力画面を示す図である。同図の入力画面は、図16の「ロボット1を停止させる」動作フローに基づいて指令を入力する場合を示している。
【0052】
指令の入力画面では、ユーザが画面の指令の欄の矢印のボタンをクリックすると、図11の部品の入出力端子の設定画面で設定された指令、「停止」、「搬入」、「搬出」がメニュー形式で表示されるので、ユーザは表示された指令の中から動作フローで定義した指令を選択する。さらに、パラメータとして装置番号を設定する。パラメータは、指令を修飾する情報であり、指令と同時に詳細設定を部品に与えたい場合に使用する。この例で使用しているロボット1は、複数の組立機械に部品を搬入、搬出しているので、指令を与える時、組立機械を指定するための装置番号が必要であり、このために装置番号がパラメータとして指定される。
【0053】
次に、本発明に係るプログラムの自動生成方法により生成されたプログラムの一例を、図18〜図21に示す。このプログラムは、図16に示す動作フローから作成されたものである。
【0054】
先ず、図18の初期設定処理で、1ビットの値「1」をロードし(”LD BOOL#1”)、その値を変数”INIFLG”、動作フローの開始要素である要素1の活性フラグ”STS1[1]”及び要素4の活性フラグ”STS1[4]”にストアする。
【0055】
次に、各工程の開始番号を設定し、最大工程番号”KTNO_MAX”として「256」、有効範囲指定番号”HNO_MAX”として「0」、有効要素番号”YNO_MAX”として「5」、有効端子番号”TRNO_MAX”として「3」を設定する。
【0056】
さらに、本プログラムで用いる変数名、例えば活性フラグ”STS1[1]”、”STS2[1]”・・・をモニタ時に用いる変数名”STS_1”、”STS2_1”・・・へ変換する。
【0057】
同様に、図19のフローの一時停止の変数名、トランジション処理の変数名の変換を行う。
次に、プログラムを一時停止させるための変数”PG_PSE[1]”の値をアキュムレータにロードし、その値が「0」か否かを判別する(図19の”JMPCN FLWCNT1”)。変数”PG_PSE[1]”が「1」であれば、フローの最後の”FLWCNT1”の部品処理にジャンプし、「0」であれば次のステップに進む。
【0058】
次のステップでは、要素1のステップ処理”ACT1”を実行する。このステップ処理では、要素1の活性フラグ”STS1[1]”の値をアキュムレータにロードし(”LD STS1[1]”)、アキュムレータの内容と要素1の実行済フラグ”STS2[1]”の値を反転したものとの論理積を取る(”ANDNSTS2[1]”)。そして、演算結果が「0」か否かを判断し、演算結果が「0」であれば、つまり要素1が非活性、又は実行済であれば、”ACT1E”にジャンプし、演算結果が「1」であれば、つまり要素1が活性、かつ未実行であれば次のステップに進む(”JMPCN ACT1E”)。
【0059】
要素1が活性、かつ未実行の場合には、要素1の処理を実行する必要があるが、この場合要素1が「開始要素」であるので、要素1の処理は何も実行せずに、要素1の実行済フラグ”STS2[1]”をセットし(”S STS2[1]”)、要素1を実行済の状態にする。その後、整数型の数値「1」をアキュムレータにロードし(”LD INT#1”)、そのアキュムレータの内容を要素1の活性トークン数として変数”PG_STR1[1]”にストアする。
【0060】
次に、要素1が活性、かつ実行済の場合には、実行権を要素1から要素3へ渡すトランジション処理”(*トランジション1−3*)を実行する。このトランジション処理では、要素1の活性フラグ”STS1[1]”の値をアキュムレータにロードし、アキュムレータの内容と実行済フラグ”STS2[1]”の値との論理積を取り(”AND STS2[1]”)、その結果と要素1の保留フラグ”STS3[1]”の値を反転したものとの論理積を取る(”ANDN STS3[1]”)。そして、その結果が「0」か否かを判断し、結果が「0」であれば、つまり要素1が非活性、又は未実行、又は保留であれば、”TRN1out1”にジャンプし、結果が「1」であれば、つまり要素1が活性、実行済、かつ非保留であれば次のステップに進む。なお、演算結果は”TRN1[1]”にストアしておく。
【0061】
要素1が活性、かつ実行済かつ、非保留の場合には、要素1の活性フラグ”STS1[1]”をリセットし(”R STS1[1]”)、要素1の実行済フラグ”STS2[1]”をリセットし、要素3の活性フラグ”STS1[3]”をセットする(”S STS1[3]”)。
【0062】
これにより要素1が非活性、未実行となり、要素3が活性となり、実行権が要素1から要素3へ移動する。なお、図19の命令”R”はリセット命令を意味し、”S”はセット命令を意味している。なお、要素3は、図16の動作フローのロボットを停止させる要素に該当し、要素1が開始要素、後述する要素2が終了要素に該当する。
【0063】
次に、要素3のステップ処理ACT3を実行する。先ず、要素3の活性フラグ”STS1[3]”の値をアキュムレータにロードし、そのアキュムレータの内容と要素3の実行済フラグ”STS2[3]”の値を反転したものとの論理積を取る。そして、演算結果が「0」か否かを判断し、演算結果が「0」であれば、、つまり要素3が非活性、又は実行済であれば、トランジション処理”(*トランジション3−2*)にジャンプし、演算結果が「1」で、要素3が活性、かつ未実行であれば次のステップに進む。
【0064】
要素3が活性、かつ未実行の場合には、図20で、要素3の実行済フラグ”STS2[3]”をセットして実行済にした後(”S STS2[3]”)、指令端子の初期化を行う。
【0065】
先ず、部品として定義されているロボット1の指令端子を初期化するために変数をクリアする処理を実行する。1ビットの値「0」をアキュムレータにロードし(”LD BOOL#0”)、そのアキュムレータの内容を変数”FLWFN00001_停止”にストアする(”ST FLWFN00001_停止”)。搬入、搬出の指令についても同様に初期化を行う。さらに、数値「0」を変数”FLWFN00001_装置”にストアし、部品のパラメータの装置番号を”0”に初期化する。
【0066】
次に、ロボット1を停止させる指令を与えるために、1ビットの値「1」をアキュムレータにロードし(LD BOOL#1”)、そのアキュムレータの内容を変数”FLWFN00001_停止”にストアする(”ST FLWFN00001_装置”)。これにより、ロボット1に指令を与えるための変数”FLWFN00001_停止”に「1」が設定される。
【0067】
さらに、数値「0」をアキュムレータにロードし(LD INT#0”)、そのアキュムレータの内容を変数”FLWFN00001_装置”にロードする。これにより、対象装置の装置番号を指定する変数”FLWFN00001_装置”に装置番号として「0」が設定される。この場合には、初期値と実際の装置番号が同一になっている。さらに、入力データ制御フラグ”FCNT[1]”に「1」をストアする。
【0068】
上述したように部品に対する指令の入力画面で入力された指令のみを有効とし、他の指令を無効とする処理がメインルーチンの要素3の処理として自動生成される。これにより、部品に対する指令の排他管理を行うチェック処理を、部品処理の一部としてユーザが作成する必要がなくなるので、ユーザがチェック処理の作成を忘れて制御対象機器の動作に不都合が生じることが無くなる。
【0069】
要素3のステップ処理が終了したなら、要素3−2のトランジション処理を実行する。このトランジション処理では、要素3の活性フラグ”STS1[3]”の値をアキュムレータにロードし、アキュムレータの内容と実行済フラグ”STS2[3]”との論理積を取り、さらにその結果と保留フラグ”STS3[3]”の値を反転したものとの論理積を取り、その結果を変数”TRN1[2]”にストアする。そして、演算結果が「0」か否かを判断し、演算結果が「0」であれば、つまり要素3が非活性、又は未実行、又は保留であれば、”TRN2out1E”のステップにジャンプし、要素3が活性、かつ実行済、かつ非保留であれば、次のステップに進む(”JMPCN TRN2out1E”)。
【0070】
要素3が活性、かつ実行済、かつ非保留の場合には、要素3の活性フラグ”STS1[3]”をリセットして非活性にし、実行済フラグ”STS2[3]”をリセットして未実行にし、要素2の活性フラグ”STS1[2]”をセットして実行権を要素2に移動する。
【0071】
次に、要素2のステップ処理を実行する。このステップ処理では、要素2の活性フラグ”STS1[2]”の値をアキュムレータにロードし、そのアキュムレータの内容と要素2の実行済フラグ”STS2[2]”の値を反転したものとの論理積を取る。そして、その演算結果が「0」か否かを判断し、演算結果が「0」であれば、つまり要素2が非活性、又は実行済であれば、”ACT2E”のステップにジャンプし、要素2が活性、かつ未実行であれば、次のステップに進む。
【0072】
次のステップでは、要素2が終了要素であるので何も処理を実行せず、要素2の実行済フラグ”STS2[2]”をセットして実行済にする。さらに、整数型の数値「0」を変数”PG_STR1[1]”にストアして、活性トークン数を「0」にする。
【0073】
次に、終了要素2のトランジション処理ACT2Eでは、要素2の活性フラグ”STS1[2]”の値をアキュムレータにロードし、そのアキュムレータの内容と実行済フラグ”STS2[2]”の値との論理積を取り、その結果と保留フラグ”STS3[2]”の値を反転したものとの論理積を取る。そして、演算結果が「0」か否かを判断し、演算結果が「0」であれば、つまり要素2が非活性、又は未実行、又は保留であれば、”TRN2ENDE”のステップにジャンプし、演算結果が「1」であれば、次のステップに進む。
【0074】
演算結果が「1」で、要素2が活性、かつ実行済、かつ非保留の場合には、要素2の活性フラグ”STS1[2]”をリセットして要素2を非活性にし、要素2の実行済フラグ”STS2[2]”をリセットして未実行にする。
【0075】
次に、部品をコールして指令を与える処理について説明する。先ず、入力データ制御フラグ”FCNT[1]”の値をアキュムレータにロードし(”LD FCNT[1]”)、アキュムレータの内容が「0」か否かを判別することで、入力データ制御フラグがセットされているか否かを判断する。アキュムレータが「0」のとき、つまり入力データ制御フラグがセットされていないときには、”FNCCNT1”のステップにジャンプし、アキュムレータが「1」で入力データ制御フラグがセットされているときには次のステップに進む。
【0076】
次のステップでは、変数”FLWFN00001_停止”の値をアキュムレータにロードし、そのアキュムレータの内容をロボット1の部品に対する指令としてストアする(図21の”ST ロボット1._停止”)。同様に、搬入、搬出の変数の値をロボット1の指令として設定する。また、変数”FLWFN0001”に記憶されている装置番号「0」を、ロボット1のパラメータの装置番号として設定する。
【0077】
上述した処理により、例えば、図15の部品に対する指令の入力画面でユーザが選択した指令のみが「1」となり、他の指令は「0」となるので、ロボット1に対する指令の内で”停止”のみが有効となり、他の搬入、搬出等の指令は無効となる。
【0078】
最後にロボット1の部品処理をコール(”CAL ロボット1”)する。そして、入力データ制御フラグ”FCNT[1]”に1ビットの値「0」をセットして制御フラグをリセットする。さらに、ロボット1が停止完状態にあるか否かを示す部品の出力端子の”停止完”の情報をロードし、その情報を変数”FLWFN00001_停止完”にストアする。同様にロボット1が搬入完了の状態にあるか否かを示す出力端子である”搬入完”の情報をロードし、その情報を変数”FLWFN00001_搬入完”にストアする。また、ロボット1が搬出完了の状態にあるか否かを示す出力端子である”搬出完”の情報をロードし、その情報を変数”FLWFN00001_搬出完”にストアする。これらの処理によりロボット1の状態が上述した変数にストアされ、メインルーチンでその変数を読み取ることにより、ロボット1の状態を認識できる。
【0079】
上述した実施の形態によれば、部品に対する指令がユーザにより設定されたとき、設定された指令のみを有効とし、他の指令を無効とする処理が自動生成されるので、従来のようにユーザが部品処理の内部にチェック処理を作成する必要がなくなる。これにより、ユーザがチェック処理の作成を忘れて、異なる指令が1つの部品に同時に与えられるような問題の発生を防止できる。また、チェック処理を部品処理の内部処理として作成する必要が無いため、個々の部品がチェック結果をメインルーチンに通知するためのエラー情報を出力する必要が無くなる。これにより、多数の部品が存在する場合でも、それらの部品のエラー情報を記憶するための変数を定義し、その変数を記憶する領域をメモリに確保する必要が無くなるので、メモリ容量をその分節約することができる。また、変数で定義されているエラー情報を処理するための処理をメインルーチンに設ける必要が無くなるので、その分プログラムも簡素になる。
【0080】
さらに、本発明に係るシーケンスプログラムの自動生成プログラムを、図22に示すフロッピーディスク2201、CDROM2202等の記憶媒体に格納しておいて、その記憶媒体を情報処理装置(パーソナルコンピュータ等)2203の媒体駆動装置(フロッピーディスクドライバー、CDROMドライバー等)2204により読み取りシーケンスプログラムを自動生成するようにしてもよい。あるいは自動生成プログラムをプログラム提供者のコンピュータのハードディスク等の記憶装置に記憶しておいて、通信によりユーザのコンピュータに転送してハードディスク等に記憶し、その自動生成プログラムを用いてシーケンスプログラムを生成するようにしてもよい。
【0081】
上述した実施の形態によれば、動作フローの要素毎に活性フラグ、実行済フラグ、保留フラグを設け、それらのフラグが一定の条件を満足するとき、実行権を次の要素に渡すようにしたので、動作フローの要素に対応する処理とその要素の処理が終了したとき実行権を次の要素に渡すようなプログラムを自動生成することが可能となる。
【0082】
また、本実施の形態では、動作フローの各要素に対応するステップ処理とトランジション処理とが自動生成されるので、従来のようにプログラミング担当者がプログラムを作成する場合に発生するステップやトランジションの抜けが無くなる。また、ステップ処理とステップ処理との間には必ずトランジション処理が生成されるので、シーケンシャルファンクションチャートのようにステップとトランジションの記述順序をユーザが注意する必要が無くなる。さらに、仕様を変更する際は、動作フローのみを変更すれば、その動作フローに対応するシーケンスプログラムが作成されるので、従来のようにシーケンスプログラムのみが変更され、動作フローが実際のプログラムと異なるという問題も生じない。
【0083】
また、従来、使用する部品の動作に必要なタスク毎にフローを記述し、タスク間でデータ交換を行うためのソフトウエア設計が必要であったが、1つの動作フローで別タスクで動作すべき部品が記述できるので、これらの作業が不要となる。その結果、ユーザはモータ等の使用部品が別のタスクで動作するか否かを考慮する必要がなく、機械動作そのものを記述するだけでシーケンスプログラムを生成することができる。
【0084】
なお、上述した実施の形態では、シーケンスプログラムを自動生成する際に、指令を排他管理するプログラムを自動生成する場合について説明したが、それ以外のプログラムを自動生成する場合にも本発明は適用できる。
【0085】
【発明の効果】
本発明によれば、共通処理ルーチンに対する指令の排他管理を行うプログラムを自動生成することができるので、ユーザが指令のチェックプログラムを作成するのを忘れて処理上の不都合が生じるのを防止できる。また、共通処理ルーチンに対する指令の排他管理を行うプログラムを、共通処理ルーチンの内部ではなく、メインルーチン側に作成することにより、共通処理ルーチンからメインルーチンにエラー情報を通知する必要がなくなる。これにより、共通処理ルーチンが複数存在する場合でも、それぞれのエラー情報を記憶するメモリ領域を確保する必要が無くなるので、メモリ容量を節約できる。
【図面の簡単な説明】
【図1】実施の形態のシーケンスプログラム作成装置のブロック図である。
【図2】コンパイラ18の処理内容を示す図である。
【図3】処理順序ファイル作成処理を示す図である。
【図4】処理順序ファイル40の構成の一例を示す図である。
【図5】要素番号セット処理を示す図である。
【図6】同図(A)〜(D)は、処理順序ファイルの一例を示す図である。
【図7】フロー要素処理生成処理を示す図である。
【図8】ステップ処理生成処理を示す図である。
【図9】ステップ処理及びトランジション処理の基本構成を示す図である。
【図10】動作フローから生成されるシーケンスプログラムの一例を示す図である。
【図11】部品の端子の設定画面を示す図である。
【図12】部品データのデータ構造を示す図である。
【図13】部品データベース17に登録される部品の入出力端子を示す図である。
【図14】部品の内部処理を示す図である。
【図15】指令の入力画面を示す図である。
【図16】動作フローの作成画面を示す図である。
【図17】部品端子入力処理を生成するフローチャート
【図18】シーケンスプログラムの一例を示す図(その1)である。
【図19】シーケンスプログラムの一例を示す図(その2)である。
【図20】シーケンスプログラムの一例を示す図(その3)である。
【図21】シーケンスプログラムの一例を示す図(その4)である。
【図22】記憶媒体を用いる場合の説明図である。
【図23】部品に対して複数の指令を定義した場合の部品の入出力端子を示す図である。
【図24】部品に対して複数の指令を定義した場合の部品の内部処理を示す図である。
【符号の説明】
16 ネットファイル
17 部品データベース
18 コンパイラ
40 処理順序ファイル
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an automatic generation method of command input processing for a common processing routine, an automatic program generation device, and a recording medium on which an automatic generation program is recorded.
[0002]
[Prior art]
Programmable controllers are used for machine operations or factory conveyor control. In order to control a device with a programmable controller, it is necessary to create a sequence program that defines the control operation of the programmable controller. When creating a sequence program, a mechanical engineer without programming knowledge describes the operation specifications of the machine in an operation flow, and based on this, a person in charge of programming creates a flowchart of the sequence program. In this case, since the meaning of each element is different in the two flows, it is necessary for the person in charge of programming to create a program flow by interpreting the contents of each element in the operation flow. This is program development itself and depends on a person in charge of programming, and it is difficult to perfectly match the operation flow with the program flow. Therefore, in order to solve such problems, the present inventor previously proposed a method for automatically generating a sequence program from an operation flow describing a sequence operation of a device to be controlled in Japanese Patent Application No. 9-354522. .
[0003]
By the way, in the above-mentioned application, a common processing routine for conveyors, robots, and the like is defined as parts. However, it is conceivable that control instructions for these parts are defined as commands. If it is not permitted to give a plurality of commands simultaneously to a component having a plurality of executable commands, it is necessary to exclusively manage the commands so that a plurality of commands are not given to the component at the same time.
[0004]
FIG. 23 is a diagram showing input / output terminals when stop, carry-in, and carry-out commands are defined for the components of the robots 1 and 2, and FIG. 24 is a diagram showing internal processing of the components.
As shown in FIG. 23, when a command terminal for stopping, carrying in, etc. is provided on a part, an nC1 check process for performing exclusive management of the command as an internal process of the part as shown in FIG. 24 and the check result is an error. In this case, the user needs to create an error output process for outputting an error as an internal process of the component.
[0005]
[Problems to be solved by the invention]
However, if you create a check program that performs exclusive management of commands as internal processing of parts, users who are not accustomed to program creation will be able to check even if they create command processing programs such as stop and carry-in Forgetting to create the program may cause inconvenience in controlling the equipment.
[0006]
In addition, the method of creating a check program as an internal process of parts requires that error information be output to the main routine for each part, and correspondingly, a variable for storing the error information of each part is stored on the main routine side. It is necessary to define and secure a memory area for storing the variable. In addition to this, it is necessary to describe processing for component errors in the main processing. As the number of parts increases, the required memory capacity increases accordingly, which is a problem in effectively utilizing the memory.
[0007]
An object of the present invention is to automatically generate a command input process for a common process routine.
[0008]
[Means for Solving the Problems]
The present invention is an automatic generation method of command input processing for a common processing routine of a sequence program generated based on an operation flow describing a sequence operation of a device to be controlled, which is executed by each element of the operation flow Active information indicating whether or not the element is possible, execution information indicating whether or not the element has been executed, and hold information that puts the execution of the element on hold are generated, and each element of the operation flow is generated. Correspondingly, a step process of executing the process of the element when the active information of the element is active and the executed information is not executed, and setting the executed information of the element to executed, and the active information of the element is active When the executed information is executed and the hold information is not held, the transition process for changing the active information of the element to inactive, changing the executed information to not executed, and transferring the execution right to the next element. The process of enabling only the command specified on the command input screen of the part that is the control target device and invalidating the other command and performing the exclusive management of the command is called the common processing routine. It is generated as the command input process in the routine.
[0009]
According to the present invention, there is no inconvenience that different commands are simultaneously given to the common processing routine.
[0010]
In addition, when a check program is created inside each common processing routine, error information is notified to the main routine when the check result is an error. Therefore, an area for storing error information for each common processing routine is stored in the memory. It is necessary to secure it. According to the second aspect of the present invention, since the program for performing exclusive management is generated as a part of the main routine, it is not necessary to notify error information from the common processing routine to the main routine. Therefore, it is not necessary to provide an area for storing error information from the common processing routine in the memory, and the memory capacity can be saved. In addition to this, it is not necessary to describe processing for component errors in the main routine.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. A method for automatically generating a sequence program from an operation flow describing a sequence operation of a device to be controlled, which is a premise of the present invention, will be described.
[0012]
FIG. 1 is a block diagram of a sequence program creation device according to an embodiment of the present invention.
When the user operates the keyboard 11 and the mouse 12 to input operation flow elements and element connection information, the flow drawing processing unit 15 in the apparatus main body 13 displays an operation flow corresponding to the input data on the display 14. At the same time, the element data of each element is written in the net file 16. Parts such as robots and conveyors described in the operation flow and used in the sequence program are stored in the parts database 17.
[0013]
The compiler 18 performs processing shown in FIG. 2 based on the element data of the net file 16 and the component data of the component database 17, that is, a processing sequence file generation process ST 201 for determining the processing sequence of each element, and will be described later based on the processing sequence file. Range from the flow element process generation process ST202 that generates the step process and the transition process to be performed, the component function block FB activation method of the part database 17, the component process generation process ST203 that generates the part process according to the task specification, and the element data of the net file 16 When the designated data is searched and the range is designated, the range designation processing generation process ST204 for creating the range designation process for each range designation number is executed.
[0014]
As a result, a sequence program 19 including flow element processing, component processing, range specification processing, and the like is generated by the compiler 18 and output to the programmable logic controller PLC 20.
[0015]
The net file 16 is a file configured by collecting a plurality of element data created for each element of the operation flow by the flow drawing processing unit 15, and includes an element number determined in the order of element arrangement under a certain rule. , Element type (for example, start, command, wait, parallel branch, selective branch, parallel merge, selective merge, END, RETURN, REPEAT), destination element number, destination element number, destination element number, Destination element number, the item to be executed in that element (for example, if the type is a command, the value to be input to each terminal of the component), and the range specification number and range if that element is specified as a range It is comprised from the inside position (entrance or inside or exit). The range number further includes range designation information including an event, that is, a monitoring type indicating whether event change monitoring or timer monitoring is performed, a time for timer monitoring, and a signal name for event monitoring. Consists of.
[0016]
When the net file 16 is created as described above, a processing order file 40 as shown in FIG. 4 is created based on the net file 16. The processing contents of the processing sequence file creation process ST201 in FIG. 2 will be described below with reference to the flowchart in FIG.
[0017]
First, “1” is set in the pointer P, the element number n1 of the element data whose element type starts from the net file 16 is obtained, and the element number n1 and the number of data (in this case, the element type is start) The number of data “1” is set at the head of the processing order file (FIG. 3, ST301), whereby the element number n1 of the start element as data is added to the address 1 of the processing order file 40 of FIG. Is stored.
[0018]
Next, the data D1 at the address pointed to by the pointer P of the processing order file 40 and the number of data k1 are acquired (ST302). When there are a plurality of data d as the data D1, it is determined in the next step ST303 whether the data d1 in the data D1 is only an element number or an element number and a destination element number.
[0019]
If it is determined in step ST303 that it is an element number, the process proceeds to step ST304, and element number-destination element number set processing is executed. If it is determined that the element number and destination element number are included, the process proceeds to step ST305. Advance element number set processing is executed.
[0020]
Next, the element number setting process in step ST305 of FIG. 3 will be described with reference to FIG.
First, it is determined whether or not the destination element number of the element d1 is stored at the address indicated by the pointer P1 + 1 of the processing order file 40 (FIG. 5, ST501). In the initial state, since no data is stored in the address pointed to by the pointer P1 + 1, the process proceeds to step ST402, and the destination element number of the element d1 is stored as the element number of the next element in the address pointed to by the pointer P1 + 1. Then, it is determined whether or not the above process has been repeated for the number of data k1 times (ST503).
[0021]
6A to 6D are diagrams illustrating an example of a processing order file created by the element number setting process described above. The processing order file 40 includes an element number cell composed of element numbers, and an element number composed of element numbers and destination element numbers + destination element number cells.
[0022]
FIG. 6A shows that when the pointer P1 points to the address “5” where the element number n1 and the destination element number n2 are stored, the destination element is set to the next address “6” of the processing order file 40a. The number n2 is stored. Then, the destination element of the element n2 is searched from the net file 16, and the element number n2 of the element n2 and the element number of the destination element are stored in the next address “7”. That is, the element number and the element number + the destination element number are alternately stored in the processing order file 40a. The element number in which the element number and the destination element number are stored + the element number in the destination element number cell exists in the element number cell arranged immediately before the cell, and the element number + the destination element number cell The destination element number will be in the element number cell next to that cell.
[0023]
Similarly, in FIG. 6B, when the element number of the cell pointed to by the pointer P1 is n1 and the destination element numbers of the connection destinations are n2, n3, and n4, 1 is added to the address next to the address pointed to by the pointer P1. This indicates that the destination element numbers of the previous cell are stored as element numbers n2, n3, and n4.
[0024]
FIG. 6C shows a case where the element number of the destination element of the element n1, n2, n3 of the cell pointed by the pointer P1 is n4, and the destination element number n4 is set as the element number n4 at the next address P1 + 1. Stored.
[0025]
FIG. 6D shows the case where the element numbers of the destination elements of the elements n1, n2, and n3 of the cell pointed to by the pointer P1 are n4, n5, and n6, respectively, and the element number of the cell at the next address of the pointer P1. Destination element numbers n4, n5 and n6 are stored.
[0026]
Returning to FIG. 3, when the element number-destination element number setting process in step ST304 is completed and the data d1 is not END, RETURN, or REPEAT in the determination in step ST306, or when the element number setting process in step ST305 is completed. Then, the process proceeds to step ST307, "1" is added to the pointer P1, and the processes after step ST302 are repeated. If END, RETURN, or REPEAT is detected as an element, the processing order file creation processing is terminated.
[0027]
If the processing order file is created from the operation flow as described above, the flow element process is generated based on the processing order file.
FIG. 7 is a flowchart showing the process contents of the flow element process generation process ST202 of FIG.
[0028]
First, the pointer P1 is initialized (FIG. 7, ST701). Next, the data D1 and the number of data k1 are read from the address specified by the pointer P1 of the processing order file 40 (ST702). And it is discriminate | determined whether data are memorize | stored in the applicable address of the processing order file 40 (ST703).
[0029]
If it is determined in step ST703 that data is stored in the processing order file 40, it is determined whether the data type is an element number or element number-destination element number (ST704). If the data type is an element number, the step process generation process of step ST705 is executed. If the data type is an element number-destination element number, the transition process generation process of step ST706 is executed. When the generation of the step process or the transition process is completed, the pointer P1 is incremented, the process returns to ST702, and the above process is repeated.
[0030]
Here, the processing contents of step processing generation processing ST705 in FIG. 7 will be described with reference to FIG.
First, the data d1 in the data D1 at the address specified by the pointer P1 of the processing order file is read, and a step skeleton corresponding to the data d1 is generated (FIG. 8, ST801).
[0031]
In this embodiment, for each element of the operation flow, an active flag (active information) indicating whether or not the element is executable and an executed flag (executed already) indicating whether or not the element has been executed Information) and a hold flag (hold information) that puts the element on hold, and manages the execution order of the processing corresponding to the element. Then, the process corresponding to the element is divided into a step process that is an execution process of the element itself and a transition process that moves the token to the next element, and the step process and transition process of each element are automatically generated from the operation flow. ing.
[0032]
Specifically, when the activation flag of an element is turned on and the executed flag is turned off in the step process, the process of the element itself is executed. When the process is completed, the executed flag of the element is turned on. When the upstream element activation flag is on, the execution flag is on, and the hold flag is off in the transition process, the activation flag and execution flag for that element are turned off and the activation flag for the next element is turned on. The token (execution right) is transferred to the next element so that the next element can be executed.
[0033]
The above step skeleton generation process ST801 is a process for generating a step process having a basic configuration as shown in FIG. In the basic step processing, step ST901 for determining whether or not the active flag of element n is on and the executed flag is off, and when the active flag is on and the executed flag is off, the executed flag is turned on. It consists of step ST902.
[0034]
In addition, as shown in FIG. 9B, the basic transition process determines whether the activation flag of the upstream element n is on, the executed flag is on, and the hold flag is off. Step ST903 When the active flag of the upstream element n is on, the executed flag is on, and the hold flag is off, the active flag of the upstream element n is turned off, the executed flag is turned off, and the token is transferred to the downstream element n1. Step ST904 for turning on the activation flag of the next element n1 for transfer.
[0035]
These basic step processing and basic transition processing are added with processing of the element itself (for example, command, branch, etc.), condition determination processing, etc., and step processing and transition processing of each element are generated.
[0036]
Returning to FIG. 8, when the step skeleton is generated, the element type of the element d1 is read from the net file 16, and it is determined whether the element type is command, wait, RETURN, or others (FIG. 8, ST802).
[0037]
If the element type is a command or waiting, the process proceeds to step ST803 to generate a component terminal input process for setting component parameters. If the component is a functional component that is called only when an element of the operation flow is executed, a component process that calls a component function block in the component database 17 is generated. If the part is a continuous part that operates independently of the progress of the flow, or if it is a permanent part and the startup task is generated and is a separate task from the program, the part processing is performed by the part processing generation process (FIG. 2, ST203). Generated.
[0038]
Here, the component terminal input processing in step ST803 will be described with reference to FIG.
The part name used in the step element created by the flow drawing processing unit 15 (see FIG. 1) is acquired from the net file 16 (see FIG. 1) (FIG. 17, ST1701).
[0039]
Next, the component database 17 (see FIG. 1) is searched based on the component name, and all input terminal information is acquired (FIG. 17, ST1702).
Then, a command for this part is acquired from the net file 16, and only the command is validated for one searched input terminal, and a process for invalidating the other command is generated (FIG. 17, ST1703).
[0040]
Further, based on the information in the net file 16, similar processing is generated for the remaining input terminals (FIG. 17, ST1704).
As a result, when a command for a part is set, an exclusive process for the command is automatically generated, so that it is not necessary for the user to create a check program as a part of the part processing as in the past. Forgetting, it is possible to prevent inconvenience in operation due to the simultaneous description of a plurality of commands.
[0041]
In addition, since no checking process is required in the part, it is not necessary to output error information from the part to the main routine. This eliminates the need to define error information of parts used in the main routine as variables and secure an area for storing the variables in the memory, so that the memory capacity can be constrained and processing for part errors is unnecessary. Become.
[0042]
If it is determined in step ST802 that the element type of the data d1 is RETURN, the RETURN generation process in step ST804 is executed. If the element type of the data d1 is other than command, wait, and RETURN, the process proceeds to step ST805 without executing any processing. In step ST805, it is determined whether or not the step process generation process for the number of data k1 times has been executed. If the step process is executed k1 times, the process returns to the original process.
[0043]
FIG. 10 is a diagram showing an outline of a sequence program generated from the operation flow by the above-described sequence program creation device.
In this operation flow, a stop command is given to the motor 1 after giving a command to move the conveyor 1 by 1 m. This entire operation flow is periodically executed as task 1, and motor 1 processing is executed as task 2 every 5 ms.
[0044]
By the processing order file creation process described above, a processing order file 40 corresponding to the operation flow is created, and further, step processing and transition processing are generated based on the processing order file 40. As shown in FIG. From the first element “start” and the second element, step 1 processing of step processing, tran 1-2 processing of transition processing, and step 2 processing of step processing are generated. Processing is generated.
[0045]
By the sequence program automatic generation method described above, a step process for each element of the operation flow and a transition process for connecting the elements and determining the conditions are generated, and the process for starting the process of moving the conveyor 1 is a component process. A process for starting the motor 1 process and the like and a range specifying process are generated every 5 ms.
[0046]
Next, a process for automatically generating an exclusive process for a part as a part of the main routine when the sequence program is automatically generated as described above will be described.
When creating a part to be called from the main routine, the user sets the input / output terminal name of the part and its attribute, for example, the data type.
[0047]
FIG. 11 shows a terminal setting screen, in which “command” is selected from the terminal types such as “command”, “state”, “input”, and the terminal names are “stop”, “carry in”, “carry out”. And select “BOOT” as the respective data type. Here, “BOOT” is data represented by ON / OFF of 1 bit. Other input / output terminals, terminal names such as states, and attributes can be set in the same manner.
[0048]
FIG. 12 is a diagram illustrating a data structure in the component database 17 of components set on the command terminal setting screen. The part name, terminal name (command, status indicates the type of terminal), and data type are stored as a pair of data.
[0049]
FIG. 13 is a diagram illustrating input / output terminals of a component based on a definition method in which a control instruction for the component is defined as a command. In the present embodiment, since the command check process is not performed inside the component, an error output terminal for outputting an error when an error is detected by the command check process is unnecessary.
[0050]
FIG. 14 is a diagram showing internal processing of components. When "stop", "carrying in", or "carrying out" are set as commands for the part names "Robot 1, Robot 2", stop processing to stop the robot operation, carry-in processing to carry in / out parts etc. to the robot, carry-out Processing, control output processing for outputting stop output, carry-out output, and carry-out output from the output terminal based on those processes, output of stop completion, carry-in completion, carry-out completion indicating that the commanded operation is completed The state output process to be performed is created by the user, but the nC1 check process and the error output process shown in FIG. 23 are not necessary.
[0051]
Next, FIG. 15 is a diagram showing an input screen for inputting a command for a component after the setting of the input / output terminals is completed as described above. The input screen of FIG. 16 shows a case where a command is input based on the operation flow “stop robot 1” of FIG.
[0052]
In the command input screen, when the user clicks the arrow button in the command column of the screen, the commands, “stop”, “carrying in”, and “carrying out” set in the setting screen of the input / output terminals of the parts in FIG. Since the menu is displayed, the user selects a command defined in the operation flow from the displayed commands. Furthermore, a device number is set as a parameter. The parameter is information that modifies the command, and is used when it is desired to give detailed settings to the part simultaneously with the command. Since the robot 1 used in this example carries parts into and out of a plurality of assembly machines, a device number for designating the assembly machine is necessary when giving a command. Is specified as a parameter.
[0053]
Next, an example of a program generated by the automatic program generation method according to the present invention is shown in FIGS. This program is created from the operation flow shown in FIG.
[0054]
First, in the initial setting process of FIG. 18, a 1-bit value “1” is loaded (“LD BOOT # 1”), the value is set to a variable “INIFLG”, and an activation flag of element 1 that is an operation flow start element ” Store in STS1 [1] "and the active flag" STS1 [4] "of element 4.
[0055]
Next, the start number of each process is set, the maximum process number “KTNO_MAX” is “256”, the effective range designation number “HNO_MAX” is “0”, the effective element number “YNO_MAX” is “5”, and the effective terminal number ” “3” is set as TRNO_MAX ”.
[0056]
Further, variable names used in this program, for example, activation flags “STS1 [1]”, “STS2 [1]”... Are converted into variable names “STS_1”, “STS2_1”.
[0057]
Similarly, the variable name for pause in the flow of FIG. 19 and the variable name for transition processing are converted.
Next, the value of the variable “PG_PSE [1]” for temporarily stopping the program is loaded into the accumulator, and it is determined whether or not the value is “0” (“JMPCN FLWCNT1” in FIG. 19). If the variable “PG_PSE [1]” is “1”, the process jumps to the part processing of “FLWCNT1” at the end of the flow, and if it is “0”, the process proceeds to the next step.
[0058]
In the next step, the element 1 step process “ACT1” is executed. In this step processing, the value of the activation flag “STS1 [1]” of the element 1 is loaded into the accumulator (“LD STS1 [1]”), and the contents of the accumulator and the executed flag “STS2 [1]” of the element 1 are loaded. The logical product with the inverted value is obtained ("ANDNSTS2 [1]"). Then, it is determined whether or not the operation result is “0”. If the operation result is “0”, that is, if the element 1 is inactive or has been executed, the process jumps to “ACT1E” and the operation result is “ If “1”, that is, if element 1 is active and not executed, the process proceeds to the next step (“JMPCN ACT1E”).
[0059]
When element 1 is active and not executed, it is necessary to execute the process of element 1. In this case, since element 1 is a “start element”, the process of element 1 is not executed. The executed flag “STS2 [1]” of the element 1 is set (“S STS2 [1]”), and the element 1 is set to the executed state. Thereafter, the integer type numerical value “1” is loaded into the accumulator (“LD INT # 1”), and the contents of the accumulator are stored in the variable “PG_STR1 [1]” as the number of active tokens of the element 1.
[0060]
Next, when the element 1 is active and has been executed, a transition process (* transition 1-3 *) for transferring the execution right from the element 1 to the element 3 is executed. In this transition process, the activation of the element 1 is executed. The value of the flag “STS1 [1]” is loaded into the accumulator, the logical product of the contents of the accumulator and the value of the executed flag “STS2 [1]” is taken (“AND STS2 [1]”), and the result and element ANDed with the inverted value of the hold flag “STS3 [1]” of 1 (“ANDN STS3 [1]”), it is determined whether the result is “0”, and the result is “ If “0”, that is, if element 1 is inactive, not executed, or suspended, jump to “TRN1out1”, and if the result is “1”, that is, element 1 is active, executed, and inactive If on hold, next Tsu proceed to the flop. The calculation result is stored in “TRN1 [1]”.
[0061]
If element 1 is active, has been executed, and is not on hold, the active flag “STS1 [1]” of element 1 is reset (“R STS1 [1]”), and the executed flag “STS2 [ 1] "is reset and the activation flag" STS1 [3] "of the element 3 is set (" S STS1 [3] ").
[0062]
As a result, element 1 becomes inactive and not executed, element 3 becomes active, and the execution right moves from element 1 to element 3. In FIG. 19, the instruction “R” means a reset instruction, and “S” means a set instruction. Element 3 corresponds to an element for stopping the robot in the operation flow of FIG. 16, element 1 corresponds to a start element, and element 2 described later corresponds to an end element.
[0063]
Next, the step process ACT3 of the element 3 is executed. First, the value of the activation flag “STS1 [3]” of the element 3 is loaded into the accumulator, and the logical product of the contents of the accumulator and the inverted value of the executed flag “STS2 [3]” of the element 3 is obtained. . Then, it is determined whether or not the operation result is “0”. If the operation result is “0”, that is, if the element 3 is inactive or has been executed, “transition processing” (* transition 3-2 * If the calculation result is “1”, the element 3 is active and not executed, the process proceeds to the next step.
[0064]
When the element 3 is active and not executed, the execution terminal “STS2 [3]” of the element 3 is set and executed in FIG. 20 (“S STS2 [3]”), and then the command terminal Initialize the.
[0065]
First, a process of clearing a variable is executed in order to initialize the command terminal of the robot 1 defined as a part. A 1-bit value “0” is loaded into the accumulator (“LD OOL # 0”), and the contents of the accumulator are stored in the variable “FLWFN00001_stop” (“ST FLWFN00001_stop”). Initialization is performed in the same way for the carry-in and carry-out commands. Further, the numerical value “0” is stored in the variable “FLWFN00001_device”, and the device number of the component parameter is initialized to “0”.
[0066]
Next, in order to give a command to stop the robot 1, the 1-bit value “1” is loaded into the accumulator (LD BOOT # 1), and the contents of the accumulator are stored in the variable “FLWFN00001_stop” (“ST FLWFN00001_device "). Thus," 1 "is set to the variable" FLWFN00001_stop "for giving a command to the robot 1.
[0067]
Further, the numerical value “0” is loaded into the accumulator (LD INT # 0 ”), and the contents of the accumulator are loaded into the variable“ FLWFN00001_device. ”Thus, the variable“ FLWFN00001_device ”that specifies the device number of the target device is loaded. “0” is set as the device number. In this case, the initial value and the actual device number are the same. Further, “1” is stored in the input data control flag “FCNT [1]”.
[0068]
As described above, only the command input on the command input screen for the component is validated, and the process of invalidating the other commands is automatically generated as the process of the element 3 of the main routine. This eliminates the need for the user to create a check process for performing exclusive management of commands for parts as a part of the part process, so that the user forgets to create the check process and inconveniences the operation of the control target device. Disappear.
[0069]
When the step process of element 3 is completed, the transition process of element 3-2 is executed. In this transition processing, the value of the activation flag “STS1 [3]” of element 3 is loaded into the accumulator, the logical product of the contents of the accumulator and the executed flag “STS2 [3]” is taken, and the result and the pending flag The logical product of the inverted value of “STS3 [3]” is obtained, and the result is stored in the variable “TRN1 [2]”. Then, it is determined whether or not the operation result is “0”. If the operation result is “0”, that is, if the element 3 is inactive, not executed, or suspended, the process jumps to the “TRN2out1E” step. If the element 3 is active, executed, and not pending, the process proceeds to the next step (“JMPCN TRN2out1E”).
[0070]
If element 3 is active, executed, and not on hold, the active flag “STS1 [3]” of element 3 is reset to inactive, and the executed flag “STS2 [3]” is reset to Execution is performed, the activation flag “STS1 [2]” of element 2 is set, and the execution right is transferred to element 2.
[0071]
Next, the step process of element 2 is executed. In this step process, the value of the activation flag “STS1 [2]” of the element 2 is loaded into the accumulator, and the logic between the contents of the accumulator and the value of the executed flag “STS2 [2]” of the element 2 is inverted. Take the product. Then, it is determined whether or not the calculation result is “0”. If the calculation result is “0”, that is, if the element 2 is inactive or has been executed, the process jumps to the “ACT2E” step. If 2 is active and not executed, proceed to the next step.
[0072]
In the next step, since element 2 is an end element, no processing is executed, and the executed flag “STS2 [2]” of element 2 is set to be executed. Further, the integer type numerical value “0” is stored in the variable “PG_STR1 [1]”, and the number of active tokens is set to “0”.
[0073]
Next, in the transition process ACT2E of the end element 2, the value of the activation flag “STS1 [2]” of the element 2 is loaded into the accumulator, and the logic between the contents of the accumulator and the value of the executed flag “STS2 [2]” The product is taken, and the logical product of the result and the inverted value of the hold flag “STS3 [2]”. Then, it is determined whether or not the operation result is “0”. If the operation result is “0”, that is, if the element 2 is inactive, not executed, or suspended, the process jumps to the “TRN2ENDE” step. If the calculation result is “1”, the process proceeds to the next step.
[0074]
If the calculation result is “1”, element 2 is active, has been executed, and is not on hold, the element 2 activation flag “STS1 [2]” is reset to deactivate element 2 and element 2 The executed flag “STS2 [2]” is reset to make it unexecuted.
[0075]
Next, processing for calling a component and giving a command will be described. First, the value of the input data control flag “FCNT [1]” is loaded into the accumulator (“LD FCNT [1]”), and it is determined whether or not the content of the accumulator is “0”. It is determined whether it is set. When the accumulator is “0”, that is, when the input data control flag is not set, the process jumps to the “FNCCNT1” step, and when the accumulator is “1” and the input data control flag is set, the process proceeds to the next step. .
[0076]
In the next step, the value of the variable “FLWFN00001_stop” is loaded into the accumulator, and the contents of the accumulator are stored as instructions for the parts of the robot 1 (“ST robot 1._stop” in FIG. 21). Similarly, the values of the carry-in and carry-out variables are set as commands for the robot 1. Also, the device number “0” stored in the variable “FLWFN0001” is set as the device number of the parameter of the robot 1.
[0077]
With the processing described above, for example, only the command selected by the user on the command input screen for the component in FIG. 15 becomes “1” and the other commands become “0”. Only commands are valid, and other commands such as loading and unloading are invalid.
[0078]
Finally, the parts processing of the robot 1 is called (“CAL robot 1”). Then, the 1-bit value “0” is set in the input data control flag “FCNT [1]” to reset the control flag. Further, the information of “stop complete” at the output terminal of the part indicating whether or not the robot 1 is in the stop complete state is loaded, and the information is stored in the variable “FLWFN00001_stop complete”. Similarly, the information “loading complete”, which is an output terminal indicating whether or not the robot 1 is in the loading completion state, is loaded, and the information is stored in the variable “FLWFN00001_loading completion”. In addition, information “loading complete”, which is an output terminal indicating whether or not the robot 1 is in the state of unloading, is loaded, and the information is stored in the variable “FLWFN00001_unloading completion”. By these processes, the state of the robot 1 is stored in the above-described variable, and the state of the robot 1 can be recognized by reading the variable in the main routine.
[0079]
According to the above-described embodiment, when a command for a part is set by a user, a process for enabling only the set command and invalidating other commands is automatically generated. There is no need to create a check process inside the component process. Accordingly, it is possible to prevent a problem that the user forgets to create the check process and different commands are simultaneously given to one component. In addition, since it is not necessary to create check processing as internal processing of component processing, it is not necessary for each component to output error information for notifying the main routine of the check result. This eliminates the need to define variables for storing error information for those parts even when there are a large number of parts and to secure an area for storing those variables in the memory, thus saving memory capacity accordingly. can do. In addition, since it is not necessary to provide a process for processing error information defined by variables in the main routine, the program is simplified accordingly.
[0080]
Further, the automatic generation program of the sequence program according to the present invention is stored in a storage medium such as the floppy disk 2201 and the CDROM 2202 shown in FIG. 22, and the storage medium is driven by the medium of the information processing apparatus (personal computer or the like) 2203. A reading sequence program may be automatically generated by an apparatus (floppy disk driver, CDROM driver, etc.) 2204. Alternatively, the automatic generation program is stored in a storage device such as a hard disk of the program provider's computer, transferred to the user's computer by communication, stored in the hard disk, and the sequence program is generated using the automatic generation program You may do it.
[0081]
According to the embodiment described above, an active flag, an executed flag, and a hold flag are provided for each element of the operation flow, and when these flags satisfy a certain condition, the execution right is passed to the next element. Therefore, it is possible to automatically generate a process corresponding to an element of the operation flow and a program that passes the execution right to the next element when the process of the element is completed.
[0082]
In the present embodiment, step processing and transition processing corresponding to each element of the operation flow are automatically generated, so steps and transitions that occur when a person in charge of programming creates a program as in the past are omitted. Disappears. Further, since a transition process is always generated between the step processes, the user need not pay attention to the description order of the steps and transitions as in the sequential function chart. Furthermore, when changing the specifications, if only the operation flow is changed, a sequence program corresponding to the operation flow is created, so only the sequence program is changed as in the prior art, and the operation flow is different from the actual program. There is no problem.
[0083]
In the past, it was necessary to design software for describing the flow for each task required for the operation of the component to be used and exchanging data between the tasks. Since parts can be described, these operations are unnecessary. As a result, the user does not need to consider whether or not a used component such as a motor operates in another task, and can generate a sequence program simply by describing the machine operation itself.
[0084]
In the above-described embodiment, a case has been described in which a program for exclusively managing commands is automatically generated when a sequence program is automatically generated. However, the present invention can also be applied to a case in which other programs are automatically generated. .
[0085]
【The invention's effect】
According to the present invention, it is possible to automatically generate a program for performing exclusive management of a command for a common processing routine, so that it is possible to prevent a user from forgetting to create a command check program and inconvenience in processing. Also, by creating a program for performing exclusive management of commands for the common processing routine on the main routine side instead of inside the common processing routine, it is not necessary to notify the main routine of error information from the common processing routine. As a result, even when there are a plurality of common processing routines, it is not necessary to secure a memory area for storing each error information, so that the memory capacity can be saved.
[Brief description of the drawings]
FIG. 1 is a block diagram of a sequence program creation device according to an embodiment.
FIG. 2 is a diagram showing processing contents of a compiler 18;
FIG. 3 is a diagram illustrating processing order file creation processing;
4 is a diagram showing an example of the configuration of a processing order file 40. FIG.
FIG. 5 is a diagram illustrating an element number setting process.
FIGS. 6A to 6D are diagrams showing an example of a processing order file.
FIG. 7 is a diagram illustrating a flow element process generation process.
FIG. 8 is a diagram illustrating a step process generation process.
FIG. 9 is a diagram illustrating a basic configuration of step processing and transition processing.
FIG. 10 is a diagram illustrating an example of a sequence program generated from an operation flow.
FIG. 11 is a diagram illustrating a setting screen for component terminals.
FIG. 12 is a diagram illustrating a data structure of component data.
13 is a diagram showing input / output terminals of components registered in the component database 17. FIG.
FIG. 14 is a diagram showing internal processing of a component.
FIG. 15 is a diagram showing a command input screen.
FIG. 16 is a diagram showing an operation flow creation screen;
FIG. 17 is a flowchart for generating component terminal input processing;
FIG. 18 is a diagram (part 1) illustrating an example of a sequence program;
FIG. 19 is a second diagram illustrating an example of a sequence program;
FIG. 20 is a third diagram illustrating an example of a sequence program;
FIG. 21 is a diagram (part 4) illustrating an example of a sequence program;
FIG. 22 is an explanatory diagram in the case of using a storage medium.
FIG. 23 is a diagram showing input / output terminals of a component when a plurality of commands are defined for the component.
FIG. 24 is a diagram showing internal processing of a component when a plurality of commands are defined for the component.
[Explanation of symbols]
16 Net file
17 Parts database
18 Compiler
40 Processing order file

Claims (6)

制御対象機器のシーケンス動作を記述した動作フローに基づいて生成されるシーケンスプログラムの共通処理ルーチンに対する指令入力処理の自動生成方法であって、
前記動作フローの要素毎に前記要素が実行可能な状態か否かを示す活性情報と、前記要素が実行済みか否かを示す実行済情報と、前記要素の実行を保留状態にする保留情報とを生成し、
前記動作フローの各要素に対応させて前記要素の活性情報が活性、かつ実行済情報が未実行のとき前記要素の処理を実行し、前記要素の実行済情報を実行済みにするステップ処理と、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留のとき、前記要素の活性情報を非活性、実行済情報を未実行に変更し、実行権を次の要素に移動させるトランジション処理とを生成し、
前記制御対象機器である部品の指令入力画面において指定された指令のみを有効にし、他の指令を無効にして指令の排他管理を行う処理を、前記共通処理ルーチンをコールするメインルーチンの中の前記指令入力処理として生成する共通処理ルーチンに対する指令入力処理の自動生成方法。
An automatic generation method of command input processing for a common processing routine of a sequence program generated based on an operation flow describing a sequence operation of a control target device,
Active information indicating whether or not the element can be executed for each element of the operation flow, executed information indicating whether or not the element has been executed, and hold information for putting the execution of the element on hold Produces
A step process of executing the process of the element when the activation information of the element is active and the executed information is not executed in correspondence with each element of the operation flow, and setting the executed information of the element to executed. When the active information of the element is active, the executed information is executed, and the hold information is non-hold, the active information of the element is changed to inactive, the executed information is changed to non-executed, and the execution right is set to the next element. And create a transition process to move
Only the command specified on the command input screen of the component that is the device to be controlled is enabled, the other command is disabled , and the exclusive management of the command is performed, the process in the main routine that calls the common processing routine A method for automatically generating command input processing for a common processing routine generated as command input processing .
前記部品の指令の初期化を行った後、前記部品の指令入力画面において指定された指令のみを有効にする前記指令入力処理を、前記メインルーチンの前記要素の処理の一部として生成する請求項1記載の共通処理ルーチンに対する指令入力処理の自動生成方法。 The command input processing for validating only the command specified on the command input screen for the component is generated as part of the processing of the element of the main routine after the command for the component is initialized. A method for automatically generating command input processing for the common processing routine according to claim 1. 前記ステップ処理とトランジション処理とを生成するステップは、前記各要素に対して前記要素の活性情報が活性、かつ実行済情報が実行済みか否かを判別するステップと、前記要素の活性情報が活性、かつ実行済情報が未実行のとき、前記実行済情報を実行済にするステップとからなるステップ処理と、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留か否かを判別するステップと、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留のとき、活性情報を非活性、かつ実行済情報を未実行に変更し、次の要素の活性情報を活性にして実行権を次ぎの要素に移動させるステップとからなるトランジション処理とを生成する請求項1または2記載の共通処理ルーチンに対する指令入力処理の自動生成方法。 The step of generating the step process and the transition process includes the step of determining whether or not the activation information of the element is active and the executed information has been executed for each element, and the activation information of the element is active. And when the executed information is not executed, whether the executed information is executed and whether the active information of the element is active, the executed information is executed, and the hold information is not held A step of determining whether or not the activation information of the element is active, the executed information is executed, and the hold information is non-hold, the active information is changed to inactive and the executed information is changed to non-executed, own elements active information by the active command input processing for a common processing routine according to claim 1 or 2, wherein generating a transition process comprising the step of moving to the next element of the execution right Generation method. 制御対象機器のシーケンス動作を記述した動作フローに基づいてシーケンスプログラムを自動生成するシーケンスプログラムの自動生成装置であって、
前記動作フローの要素毎に前記要素が実行可能な状態か否かを示す活性情報と、前記要素が実行済みか否かを示す実行済情報と、前記要素の実行を保留状態にする保留情報とを生成する実行情報生成手段と、
前記動作フローの各要素に対応させて前記要素の活性情報が活性、かつ実行済情報が未実行のとき前記要素の処理を実行し、前記要素の実行済情報を実行済みにするステップ処理と、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留のとき、前記要素の活性情報を非活性、実行済情報を未実行に変更し、実行権を次の要素に移動させるトランジション処理とを生成するステップ及びトランジション処理生成手段と、
前記制御対象機器である部品の指令入力画面において指定された指令のみを有効にし、他の指令を無効にして指令の排他管理を行う処理を、前記共通処理ルーチンをコールするメインルーチンの中の前記指令入力処理として生成する指令入力処理生成手段とを備えるシーケンスプログラムの自動生成装置。
A sequence program automatic generation device that automatically generates a sequence program based on an operation flow describing a sequence operation of a control target device,
Active information indicating whether or not the element can be executed for each element of the operation flow, executed information indicating whether or not the element has been executed, and hold information for putting the execution of the element on hold Execution information generating means for generating
A step process of executing the process of the element when the activation information of the element is active and the executed information is not executed in correspondence with each element of the operation flow, and setting the executed information of the element to executed. When the active information of the element is active, the executed information is executed, and the hold information is non-hold, the active information of the element is changed to inactive, the executed information is changed to non-executed, and the execution right is changed to the next element A step of generating a transition process to be moved and a transition process generating means;
Only the command specified on the command input screen of the component that is the device to be controlled is enabled, the other command is disabled , and the exclusive management of the command is performed, the process in the main routine that calls the common processing routine An apparatus for automatically generating a sequence program, comprising command input processing generating means for generating command input processing.
前記指令入力処理生成手段は、前記部品の指令の初期化を行った後、前記部品の指令入力画面において指定された指令のみを有効にする処理を、前記メインルーチンの前記要素の処理の一部として生成する請求項4記載のシーケンスプログラムの自動生成装置。 The command input process generation means performs a process of validating only the command specified on the command input screen of the part after initializing the command of the part, as a part of the process of the element of the main routine The automatic generation apparatus of the sequence program of Claim 4 produced | generated as these. 前記ステップ及びトランジション処理生成手段は、前記各要素に対して前記要素の活性情報が活性、かつ実行済情報が実行済みか否かを判別するステップと、前記要素の活性情報が活性、かつ実行済情報が未実行のとき、前記実行済情報を実行済にThe step and the transition process generation means determine whether the activation information of the element is active and the executed information has been executed for each element, and the active information of the element is active and executed When the information is not executed, the executed information is set to executed するステップとからなるステップ処理と、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留か否かを判別するステップと、前記要素の活性情報が活性、実行済情報が実行済み、かつ保留情報が非保留のとき、活性情報を非活性、かつ実行済情報を未実行に変更し、次の要素の活性情報を活性にして実行権を次の要素に移動させるステップとからなるトランジション処理とを生成する請求項4または5記載のシーケンスプログラムの自動生成装置。Determining whether the activation information of the element is active, executed information is executed, and whether the hold information is non-hold, and the active information of the element is active and executed information Has been executed and the hold information is not held, the step of changing the activation information to inactive and the execution information to not executed, activating the activation information of the next element and transferring the execution right to the next element 6. The sequence program automatic generation device according to claim 4 or 5, wherein a transition process comprising:
JP15547398A 1998-06-04 1998-06-04 Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine Expired - Fee Related JP3890746B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15547398A JP3890746B2 (en) 1998-06-04 1998-06-04 Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15547398A JP3890746B2 (en) 1998-06-04 1998-06-04 Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine

Publications (2)

Publication Number Publication Date
JPH11353009A JPH11353009A (en) 1999-12-24
JP3890746B2 true JP3890746B2 (en) 2007-03-07

Family

ID=15606827

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15547398A Expired - Fee Related JP3890746B2 (en) 1998-06-04 1998-06-04 Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine

Country Status (1)

Country Link
JP (1) JP3890746B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101373442B1 (en) * 2011-09-16 2014-03-13 미쓰비시덴키 가부시키가이샤 Sequence program creating apparatus

Also Published As

Publication number Publication date
JPH11353009A (en) 1999-12-24

Similar Documents

Publication Publication Date Title
US20030066050A1 (en) Method and system for programming devices using finite state machine descriptions
KR20100111686A (en) Bios graphical engine providing uniform look and feel
CN111823229A (en) Mechanical arm control flow generation method, device, equipment and storage medium
Jensen et al. Real-time strategy synthesis for timed-arc Petri net games via discretization
CN107577527A (en) Task generation and scheduling method and device
JP5542643B2 (en) Simulation apparatus and simulation program
JP3890746B2 (en) Command generation processing automatic generation method and sequence program automatic generation apparatus for common processing routine
JPH0855042A (en) Method for programming of data processing system
JPS5911921B2 (en) numerical control device
JP3770366B2 (en) Development environment device for control program, control device for executing control program, and recording medium for program for realizing the same
WO2024148776A1 (en) Design data processing method and apparatus for fpga engineering project, and electronic device
CN120045096A (en) Robot job task control system and robot
JPH0410081B2 (en)
JP2002073120A (en) Programming apparatus and method for programmable controller
CN115033826B (en) Web application routing jump method, device, equipment and medium
JP2005326909A (en) Plant engineering system
CN116301794B (en) A method and apparatus for visualizing service composition
Cadenhead Sams Teach Yourself Java in 21 Days: Covering Java 7 and Android
JP4125475B2 (en) RTL generation system, RTL generation method, RTL generation program, and semiconductor device manufacturing method
CN111813400B (en) Action event processing method and device, electronic equipment and computer storage medium
JP2024147394A (en) Program creation support system, program creation support method, and program for supporting creation
CN120337332A (en) Modeling method, device, terminal and medium based on navigation guidance
JP2006163523A (en) Behavior model generation method and behavior model generation method
CN116327062A (en) A control method, device, electronic equipment and medium of a cleaning robot
JP3612458B2 (en) Video transition management system and method, and computer-readable recording medium recording computer-readable program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050510

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050711

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060403

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: 20061114

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061127

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091215

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091215

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees