JPH11353009A - Method for automatically generating command input processing to common processing routine, method for defining command for common processing routine and storage medium - Google Patents

Method for automatically generating command input processing to common processing routine, method for defining command for common processing routine and storage medium

Info

Publication number
JPH11353009A
JPH11353009A JP15547398A JP15547398A JPH11353009A JP H11353009 A JPH11353009 A JP H11353009A JP 15547398 A JP15547398 A JP 15547398A JP 15547398 A JP15547398 A JP 15547398A JP H11353009 A JPH11353009 A JP H11353009A
Authority
JP
Japan
Prior art keywords
executed
program
processing
command
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP15547398A
Other languages
Japanese (ja)
Other versions
JP3890746B2 (en
Inventor
Terumichi Kimura
照道 木村
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 Co Ltd
Original Assignee
Fuji Electric 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 Co Ltd filed Critical Fuji Electric 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

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To automatically generate command input processing so as to make only a single command effective to parts for stopping an input of plural commands. SOLUTION: Once a stop command has bean set to a robot on an input picture of the command, as the step processing of an element for stopping the robot 1 of a main routine, processing for setting '0' to a command terminal and initializing it and processing for setting '1' to the command terminal of the stop selected by a user are automatically generated. Thus, only the stop command becomes effective as a command to the robot 1 and the other commands become ineffective.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、共通処理ルーチン
に対する指令入力処理の自動生成方法、共通処理ルーチ
ンに対する指令の定義方法、プログラムの自動生成装置
及び自動生成プログラムを記録した記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for automatically generating a command input process for a common processing routine, a method for defining a command for a common processing routine, an automatic program generation device, and a recording medium on which an automatic generation program is recorded.

【0002】[0002]

【従来の技術】機械の動作、あるいは工場のコンベア制
御などのためにプログラマブルコントローラが用いられ
ている。プログラマブルコントローラにより機器を制御
するためには、プログラマブルコントローラの制御動作
を定めるシーケンスプログラムを作成する必要がある。
シーケンスプログラムを作成する場合、プログラミング
知識の無い機械技術者が機械の動作仕様を動作フローで
記述し、これを元にプログラミング担当者がシーケンス
プログラムのフローチャートを作成していた。この場
合、2つのフローは各要素の意味が異なっているので、
プログラミング担当者が動作フローの各要素の内容を解
釈してプログラムフローを作成する必要がある。これは
プログラム開発そのものであり、プログラミング担当者
に依存したものとなり、動作フローとプログラムフロー
とを完全に一致させることは困難であった。そこで、こ
のような問題点を解決するために、本発明者は、先に特
願平9−354522において、制御対象機器のシーケ
ンス動作を記述した動作フローからシーケンスプログラ
ムを自動生成する方法を提案した。
2. Description of the Related Art Programmable controllers are used for operation of machines or control of conveyors in factories. In order to control devices by the 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 machine 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, the two flows have different meanings for each element,
The programmer needs to interpret the contents of each element of the operation flow to create a program flow. This is program development itself, and depends on the person in charge of programming, and it has been difficult to completely match the operation flow with the program flow. In order to solve such a problem, the present inventor has previously proposed in Japanese Patent Application No. 9-354522 a method of automatically generating a sequence program from an operation flow describing a sequence operation of a controlled device. .

【0003】ところで、上記の出願において、コンベ
ア、ロボット等に対する共通処理ルーチンを部品として
定義しているが、それらの部品に対する制御指示を指令
として定義することが考えられる。実行可能な指令を複
数持つ部品において同時に複数の指令を与えることが許
されない場合、この部品に対して同時に複数の指令が与
えられないように指令を排他管理する必要が生じる。
In the above-mentioned application, a common processing routine for a conveyor, a robot, and the like is defined as a part. However, it is conceivable that a control instruction for the part is defined as a command. When it is not allowed 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 this component at the same time.

【0004】図23は、ロボット1、2の部品に対して
停止、搬入、搬出の指令を定義した場合の入出力端子を
示す図であり、図24は部品の内部処理を示す図であ
る。図23に示すように停止、搬入等の指令端子を部品
に設けた場合、図24に示すように部品の内部処理とし
て指令の排他管理を行うnC1チェック処理と、そのチ
ェック結果がエラーであった場合に、エラー出力を行う
エラー出力処理を部品の内部処理としてユーザが作成す
る必要がある。
FIG. 23 is a diagram showing input / output terminals when stop, carry-in, and carry-out commands are defined for components of the robots 1 and 2, and FIG. 24 is a diagram showing internal processing of the components. In the case where a command terminal such as stop and carry-in is provided for a component as shown in FIG. 23, an nC1 check process for performing exclusive control of a command as an internal process of the component as shown in FIG. In this case, the user needs to create an error output process for outputting an error as an internal process of the component.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、部品の
内部処理として指令の排他管理を行うチェックプログラ
ムを作成するようにすると、プログラムの作成に慣れて
いないユーザは、停止、搬入等の指令処理プログラムを
作成することは行っても、チェックプログラムの作成を
忘れ、機器の制御に不都合が生じることが考えられる。
However, if a check program for performing exclusive control of commands is created as internal processing of parts, a user who is not accustomed to creating a program can execute a command processing program for stopping, loading, etc. Even if the check program is created, the check program may be forgotten and the control of the device may be inconvenient.

【0006】また、部品の内部処理としてチェックプロ
グラムを作成する方法は、部品毎にエラー情報をメイン
ルーチンに出力する必要があり、それに対応してメイン
ルーチン側で各部品のエラー情報を記憶するための変数
を定義し、その変数を記憶するメモリ領域を確保してお
く必要が生じる。これに加えて、メイン処理内に部品エ
ラーに対する処理を記述する必要が有る。これは、部品
の数が増えると、それにつれて必要なメモリ容量も増大
するので、メモリを有効に活用する上で問題となる。
In the method of creating a check program as internal processing of a component, it is necessary to output error information to the main routine for each component, and the main routine stores the error information of each component correspondingly. Needs to be defined, and a memory area for storing the variable must be reserved. In addition to this, it is necessary to describe processing for a component error in the main processing. This is a problem in effective use of the memory because the required memory capacity increases as the number of components increases.

【0007】本発明の課題は、共通処理ルーチンに対す
る指令入力処理を自動的に生成できるようにすることで
ある。
An object of the present invention is to automatically generate a command input process for a common processing routine.

【0008】[0008]

【課題を解決するための手段】請求項1記載の発明は、
複数の共通処理ルーチンに対して実行すべき処理内容を
指示する複数の指令を定義した定義方法に基づくプログ
ラムの自動生成方法であって、複数の指令の排他管理を
必要とする場合に、複数の指令の内で選択された指令の
みを有効とし、他の指令を無効とするプログラムを自動
生成する。
According to the first aspect of the present invention,
An automatic generation method of a program based on a definition method in which a plurality of instructions for specifying processing contents to be executed for a plurality of common processing routines is defined. Automatically generates a program that makes only the command selected among the commands valid and invalidates other commands.

【0009】例えば、複数の指令の排他管理を行うプロ
グラムを、共通処理ルーチンをコールするメインルーチ
ンの一部として自動生成する。請求項1記載の発明によ
れば、共通処理ルーチンに対する指令の排他管理を行う
チェックプログラムをユーザ自身が作成しなくともよい
ので、ユーザがチェックプログラムの作成を忘れて、共
通処理ルーチンに同時に異なる指令が与えられる等の不
都合が生じない。
For example, a program for exclusively controlling a plurality of commands is automatically generated as a part of a main routine that calls a common processing routine. According to the first aspect of the present invention, it is not necessary for the user to create a check program for performing exclusive control of commands for the common processing routine. Therefore, the user forgets to create a check program and simultaneously issues different commands to the common processing routine. Is not caused.

【0010】また、各共通処理ルーチンの内部にチェッ
クプログラムを作成した場合には、チェック結果がエラ
ーのとき、エラー情報がメインルーチンに通知されるの
で、それぞれの共通処理ルーチンのエラー情報を記憶す
る領域をメモリに確保しておく必要がある。請求項2記
載の発明では、排他管理を行うプログラムをメインルー
チンの一部として生成するので、共通処理ルーチンから
メインルーチンにエラー情報を通知する必要が無くな
る。従って、メモリに共通処理ルーチンからのエラー情
報を記憶する領域を設ける必要が無くなり、メモリ容量
を節約できる。これに加えて、メインルーチンに部品エ
ラーに対する処理を記述する必要がなくなる。
When a check program is created in each common processing routine, if the check result indicates an error, error information is notified to the main routine, and the error information of each common processing routine is stored. An area must be reserved in memory. According to the second aspect of the present invention, since a program for performing exclusive management is generated as a part of the main routine, it is not necessary to notify the main routine of error information from the common processing routine. Therefore, there is no need 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, there is no need to describe processing for component errors in the main routine.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。本発明の前提となる、制御対象機
器のシーケンス動作を記述した動作フローからシーケン
スプログラムを自動生成する方法について説明する。
Embodiments of the present invention will be described below with reference to the drawings. A method of automatically generating a sequence program from an operation flow describing a sequence operation of a controlled device, which is a premise of the present invention, will be described.

【0012】図1は、本発明の実施の形態のシーケンス
プログラム作成装置のブロック図である。ユーザがキー
ボード11、マウス12を操作して動作フローの要素と
要素の接続情報を入力すると、装置本体13内のフロー
作画処理部15が入力されたデータに応じた動作フロー
をディスプレー14に表示すると共に、各要素の要素デ
ータをネット(net)ファイル16に書き込む。な
お、動作フローで記述され、シーケンスプログラムで使
用されるロボット、コンベア等の部品は部品データベー
ス17に格納される。
FIG. 1 is a block diagram of a sequence program creating apparatus according to an embodiment of the present invention. When the user operates the keyboard 11 and the mouse 12 to input the elements of the operation flow and the connection information of the elements, the flow drawing processing unit 15 in the apparatus main body 13 displays the operation flow corresponding to the input data on the display 14. At the same time, the element data of each element is written to the net (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】コンパイラ18は、ネットファイル16の
要素データ及び部品データベース17の部品データに基
づいて、図2に示す処理、つまり各要素の処理順序を決
める処理順序ファイルの生成処理ST201、処理順序
ファイルに基づいて後述するステップ処理及びトランジ
ション処理を生成するフロー要素処理生成処理ST20
2、部品データベース17の部品ファンクションブロッ
クFBの起動法、タスク指定に従って部品処理を生成す
る部品処理生成処理ST203及びネットファイル16
の要素データから範囲指定データを探し、範囲指定がな
されている場合に、範囲指定番号毎に範囲指定処理を生
成する範囲指定処理生成処理ST204を実行する。
The compiler 18 performs processing shown in FIG. 2, that is, a processing order file generation processing ST201 for determining the processing order of each element, based on the element data of the net file 16 and the part data of the part database 17, Flow element processing generation processing ST20 for generating step processing and transition processing described later based on the processing
2. Component processing generation processing ST203 for generating component processing in accordance with the activation method of the component function block FB of the component database 17 and task designation, and the net file 16
The range specification data is searched for from the element data of (1), and when the range is specified, the range specification process generation process ST204 for generating the range specification process for each range specification number is executed.

【0014】これによりコンパイラ18によりフロー要
素処理、部品処理、範囲指定処理等からなるシーケンス
プログラム19が生成され、プログラマブルロジックコ
ントローラPLC20に出力される。
As a result, a sequence program 19 including a flow element process, a component process, a range designation process, and the like is generated by the compiler 18 and output to the programmable logic controller PLC 20.

【0015】ネットファイル16とは、フロー作画処理
部15により動作フローの要素毎に作成される要素デー
タが複数集まって構成されるファイルであり、一定の規
則のもとに要素の配列順に定められる要素番号と、要素
の種別(例えば、開始、指令、待ち、並列分岐、選択分
岐、並列合流、選択合流、END、RETURN、RE
PEAT)と、来先要素数と、来先要素番号と、行先要
素数と、行先要素番号と、その要素で実行する項目(例
えば、種別が指令であった場合、部品の各端子に入力す
る値)と、その要素が範囲指定されている場合に、範囲
指定番号と、範囲内の位置(入口または中または出口)
とから構成されている。範囲番号は、さらに、イベン
ト、つまり事象の変化の監視か、タイマ監視の何れであ
るかを示す監視種別と、タイマ監視の場合の時間と、イ
ベント監視の場合の信号名とからなる範囲指定情報から
なる。
The net file 16 is a file composed of a plurality of element data created by the flow drawing processing unit 15 for each element of the operation flow, and is determined according to a certain rule in the arrangement order of the elements. Element number and element type (for example, start, command, wait, parallel branch, selective branch, parallel merge, select merge, END, RETURN, RE
PEAT), the number of destination elements, the number of destination elements, the number of destination elements, the number of destination elements, and the item to be executed by the element (for example, if the type is a command, input to each terminal of the component. Value) and, if the element is ranged, the range designation number and the position within the range (entrance or middle or exit)
It is composed of The range number further includes an event, that is, range designation information including a monitoring type indicating whether the event monitoring is a change in the event or a timer monitoring, a time in the case of the timer monitoring, and a signal name in the case of the event monitoring. Consists of

【0016】上記のようにしてネットファイル16が作
成されたなら、そのネットファイル16を元に、図4に
示すような処理順序ファイル40を作成する。以下、図
2の処理順序ファイル作成処理ST201の処理内容
を、図3のフローチャートを参照して説明する。
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. Hereinafter, the processing content of the processing order file creation processing ST201 of FIG. 2 will be described with reference to the flowchart of FIG.

【0017】最初に、ポインタPに「1」を設定し、ネ
ットファイル16から要素種別が開始の要素データの要
素番号n1を得て、その要素番号n1とデータ数(この
場合、要素種別が開始であるのでデータ数「1」を処理
順序ファイルの先頭にセットする(図3、ST30
1)。これにより、図4の処理順序ファイル40のアド
レス1にデータとして開始要素の要素番号n1が、デー
タ数として「1」が記憶される。
First, "1" is set to the pointer P, the element number n1 of the element data whose element type is started is obtained from the net file 16, and the element number n1 and the number of data (in this case, the element type is Therefore, the number of data "1" is set at the head of the processing order file (FIG. 3, ST30).
1). As a result, the element number n1 of the start element and the number of data “1” are stored at address 1 of the processing order file 40 of FIG. 4 as data.

【0018】次に、その処理順序ファイル40のポイン
タPの指すアドレスのデータD1とデータ数k1を取得
する(ST302)。データD1として複数のデータd
が存在する場合には、次のステップST303で、デー
タD1の中のデータd1が要素番号のみか、それとも要
素番号と行先要素番号とからなるかを判別する。
Next, the data D1 and the data number k1 of the address pointed to by the pointer P of the processing order file 40 are obtained (ST302). A plurality of data d as data D1
Exists, in the next step ST303, it is determined whether or not the data d1 in the data D1 consists only of the element number or the element number and the destination element number.

【0019】ステップST303で要素番号であると判
別された場合には、ステップST304に進み要素番号
−行先要素番号セット処理を実行し、要素番号と行先要
素番号とからなると判別された場合には、ステップST
305に進み要素番号セット処理を実行する。
If it is determined in step ST303 that the element number is the element number, the process proceeds to step ST304 to execute an element number-destination element number set process. Step ST
Proceeding to 305, an element number setting process is executed.

【0020】次に、図3のステップST305の要素番
号セット処理を、図5を参照して説明する。先ず、処理
順序ファイル40のポインタP1+1の指すアドレスに
要素d1の行先要素番号が格納されているか否かを判別
する(図5、ST501)。最初の状態では、ポインタ
P1+1の指すアドレスにはデータは何も格納されてい
ないので、ステップST402に進み、ポインタP1+
1の指すアドレスに要素d1の行先要素番号を次の要素
の要素番号として格納する。そして、データ数k1回分
上記の処理を繰り返したか否かを判別する(ST50
3)。
Next, the element number setting process of step ST305 in 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, no data is stored at the address pointed to by the pointer P1 + 1.
The destination element number of the element d1 is stored at the address indicated by 1 as the element number of the next element. Then, it is determined whether or not the above processing is repeated for k1 times of data (ST50).
3).

【0021】図6(A)〜(D)は、上述した要素番号
セット処理により作成される処理順序ファイルの一例を
示す図である。処理順序ファイル40は、要素番号から
なる要素番号セルと、要素番号と行先要素番号とからな
る要素番号+行先要素番号セルとから構成されている。
FIGS. 6A to 6D are views showing an example of a processing order file created by the above-described element number setting processing. The processing order file 40 includes an element number cell including an element number, and an element number + a destination element number cell including an element number and a destination element number.

【0022】図6(A)は、ポインタP1が要素番号n
1と行先要素番号n2とが記憶されているアドレス
「5」を指しているときに、処理順序ファイル40aの
次のアドレス「6」にその行先要素番号n2が格納され
ることを示している。そして、その要素n2の行先要素
がネットファイル16から探されて、要素n2の要素番
号n2とその行先要素の要素番号が次のアドレス「7」
に格納される。すなわち、処理順序ファイル40aに
は、要素番号と、要素番号+行先要素番号とが交互に格
納されることになる。そして、要素番号と行先要素番号
が格納された要素番号+行先要素番号セル内の要素番号
はそのセルの1つ前に配置される要素番号セル内に存在
し、要素番号+行先要素番号セルの行先要素番号はその
セルの次の要素番号セル内に存在することになる。
FIG. 6A shows that the pointer P1 has the element number n.
When 1 and the destination element number n2 point to the address "5" stored, it indicates that the destination element number n2 is stored at the next address "6" of the processing order file 40a. 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 set to the next address "7".
Is stored in That is, in the processing order file 40a, element numbers and element numbers + destination element numbers are stored alternately. The element number in the element number + destination element number cell in which the element number and the destination element number are stored exists in the element number cell arranged immediately before the cell, and the element number + destination element number cell The destination element number will be in the next element number cell of that cell.

【0023】同様に、図6(B)は、ポインタP1の指
すセルの要素番号がn1で、その接続先の行先要素番号
がn2、n3、n4の場合に、ポインタP1の指すアド
レスの次のアドレスに1つ前のセルの行先要素番号が要
素番号n2、n3、n4として格納されることを示して
いる。
Similarly, FIG. 6B shows that when the element number of the cell indicated by the pointer P1 is n1 and the destination element numbers of the connection destinations are n2, n3, and n4, the cell next to the address indicated by the pointer P1 is displayed. This indicates that the destination element number of the cell immediately before the address is stored as element numbers n2, n3, and n4.

【0024】図6(C)は、ポインタP1の指すセルの
要素n1,n2,n3の行先要素の要素番号がn4の場
合を示しており、次のアドレスP1+1にその行先要素
番号n4が、要素番号n4として格納される。
FIG. 6C shows a case where the element number of the destination element of the cell elements n1, n2 and n3 indicated by the pointer P1 is n4, and the destination element number n4 is stored at the next address P1 + 1. It is stored as a number n4.

【0025】図6(D)は、ポインタP1の指すセルの
要素n1、n2、n3の行先要素の要素番号がそれぞれ
n4、n5、n6の場合を示しており、ポインタP1の
次のアドレスのセルの要素番号として行先要素番号n
4、n5、n6が格納される。
FIG. 6D shows a case where the element numbers of the destination elements of the elements n1, n2, and n3 of the cell indicated by the pointer P1 are n4, n5, and n6, respectively, and the cell at the next address of the pointer P1 is shown. Destination element number n as the element number of
4, n5 and n6 are stored.

【0026】図3に戻り、ステップST304の要素番
号−行先要素番号セット処理が終了し、ステップST3
06の判別でデータd1がEND、RETURNまたは
REPEATでなかったとき、あるいはステップST3
05の要素番号セット処理が終了したときには、ステッ
プST307に進みポインタP1に「1」を加算して、
上述したステップST302以降の処理を繰り返す。そ
して、要素としてEND、RETURNまたはREPE
ATが検出されたなら、処理順序ファイル作成処理を終
了する。
Returning to FIG. 3, the element number-destination element number setting process in step ST304 is completed.
When the data d1 is not END, RETURN, or REPEAT in the determination of step 06, or in step ST3
When the element number setting process of 05 is completed, the process proceeds to step ST307, where "1" is added to the pointer P1.
The processing after step ST302 described above is repeated. And END, RETURN or REPE as an element
If an AT is detected, the processing order file creation processing ends.

【0027】以上のようにして動作フローから処理順序
ファイルを作成したなら、次にその処理順序ファイルに
基づいてフロー要素処理の生成を行う。図7は、図2の
フロー要素処理生成処理ST202の処理内容を示すフ
ローチャートである。
After the processing order file is created from the operation flow as described above, the flow element processing is generated based on the processing order file. FIG. 7 is a flowchart showing the processing contents of the flow element processing generation processing ST202 of FIG.

【0028】先ず、ポインタP1を初期化する(図7、
ST701)。次に、処理順序ファイル40のポインタ
P1で指定されるアドレスからデータD1とデータ数k
1を読み出す(ST702)。そして、処理順序ファイ
ル40の該当するアドレスにデータが記憶されているか
否かを判別する(ST703)。
First, the pointer P1 is initialized (FIG. 7,
ST701). Next, from the address designated by the pointer P1 of the processing order file 40, the data D1 and the data number k
1 is read (ST702). Then, it is determined whether or not data is stored at the corresponding address in the processing order file 40 (ST703).

【0029】ステップST703で、処理順序ファイル
40にデータが記憶されていると判別されたときには、
そのデータ型が要素番号か、それとも要素番号−行先要
素番号の何れであるかを判別する(ST704)。デー
タ型が要素番号であれば、ステップST705のステッ
プ処理生成処理を実行し、データ型が要素番号−行先要
素番号であれば、ステップST706のトランジション
処理生成処理を実行する。ステップ処理またはトランジ
ション処理の生成が終了したならポインタP1をインク
リメントしてST702に戻り、上記の処理を繰り返
す。
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 an element number-destination element number (ST704). If the data type is the element number, the step processing generation processing of step ST705 is executed, and if the data type is the element number-destination element number, the transition processing generation processing of step ST706 is executed. When the generation of the step processing or the transition processing is completed, the pointer P1 is incremented, the process returns to ST702, and the above processing is repeated.

【0030】ここで、図7のステップ処理生成処理ST
705の処理内容を、図8を参照して説明する。最初
に、処理順序ファイルのポインタP1で指定されるアド
レスのデータD1の中のデータd1を読み出し、そのデ
ータd1に対応するステップスケルトンを生成する(図
8、ST801)。
Here, the step processing generation processing ST shown in FIG.
The processing content of 705 will be described with reference to FIG. First, the data d1 in the data D1 at the address designated 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 activation flag (activation information) indicating whether the element is in an executable state, and an executed flag indicating whether the element has been executed. (Executed information) and a pending flag (pending information) for putting the element in a pending state are provided to manage the execution order of processing corresponding to the element. The processing corresponding to the element is divided into step processing, which is execution processing of the element itself, and transition processing, in which a token is moved to the next element. Step processing and transition processing for each element are automatically generated from the operation flow. ing.

【0032】具体的には、ステップ処理で要素の活性フ
ラグがオン、かつ実行済フラグがオフのとき、その要素
自体の処理を実行し、処理が終了したならその要素の実
行済フラグをオンにする。そして、トランジション処理
で上流要素の活性フラグがオン、かつ実行済フラグがオ
ン、かつ保留フラグがオフのとき、その要素の活性フラ
グと実行済フラグをオフにして次の要素の活性フラグを
オンにし、トークン(実行権)を次の要素に移し次の要
素を実行できるようにしている。
Specifically, when the activation flag of an element is on and the executed flag is off in the step processing, the processing of the element itself is executed, and when the processing is completed, the executed flag of the element is turned on. I do. Then, when the activation flag of the upstream element is on, the executed flag is on, and the hold flag is off in the transition processing, the activation flag and the execution flag of the element are turned off, and the activation flag of the next element is turned on. The token (execution right) is moved to the next element so that the next element can be executed.

【0033】上記のステップスケルトン生成処理ST8
01とは、図9(A)に示すような基本的な構成のステ
ップ処理を生成する処理である。基本ステップ処理は、
要素nの活性フラグがオン、かつ実行済フラグがオフか
否かを判別するステップST901と、活性フラグがオ
ン、かつ実行済フラグがオフのとき、実行済フラグをオ
ンにするステップST902とからなる。
The above step skeleton generation processing ST8
01 is a process for generating a step process having a basic configuration as shown in FIG. Basic step processing is
It comprises a step ST901 for determining whether or not the activation flag of the element n is on and the execution flag is off, and a step ST902 for turning on the execution flag when the activation flag is on and the execution flag is off. .

【0034】また、基本となるトランジション処理は、
図9(B)に示すように、上流要素nの活性フラグがオ
ン、かつ実行済フラグがオン、かつ保留フラグがオフで
あるか否かを判別するステップST903と、上流要素
nの活性フラグがオン、かつ実行済フラグがオン、かつ
保留フラグがオフのとき、上流要素nの活性フラグをオ
フし、実行済フラグをオフし、トークンを下流の要素n
1に移すために次の要素n1の活性フラグをオンにする
ステップST904とからなる。
The basic transition processing is as follows:
As shown in FIG. 9B, step ST903 to determine whether the activation flag of the upstream element n is on, the executed flag is on, and the suspension flag is off, When on, the executed flag is on, and the hold flag is off, the activation flag of the upstream element n is turned off, the executed flag is turned off, and the token is transferred to the downstream element n.
Step ST904 of turning on the activation flag of the next element n1 in order to shift to 1.

【0035】これらの基本ステップ処理及び基本トラン
ジション処理に、その要素自体の処理(例えば、指令、
分岐など)、条件判定処理等を付加して各要素のステッ
プ処理及びトランジション処理が生成される。
In these basic step processing and basic transition processing, processing of the element itself (for example, command,
For example, a branch process), a condition determination process, and the like are added to generate a step process and a transition process for each element.

【0036】図8に戻り、ステップスケルトンを生成し
たなら、次に要素d1の要素種別をネットファイル16
から読み出し、要素種別が指令、待ちか、RETURN
か、その他かを判別する(図8、ST802)。
Returning to FIG. 8, once the step skeleton is generated, the element type of the element d1 is changed to the net file 16
From the element type is command, wait, RETURN
Or other (ST802 in FIG. 8).

【0037】要素種別が指令または待ちであれば、ステ
ップST803に進み、部品のパラメータを設定する部
品端子入力処理を生成する。また、部品が動作フローの
要素の実行時のみコールする関数型部品の場合には、部
品データベース17の部品ファンクションブロックをコ
ールする部品処理を生成する。部品がフローの進行と独
立して動作する常時型部品の場合、あるいは常時型で、
起動タスクが生成されプログラムと別タスクの場合に
は、部品処理生成処理(図2、ST203)により部品
処理が生成される。
If the element type is a command or a wait, the process proceeds to step ST803 to generate a component terminal input process for setting a component parameter. If the component is a functional component that is called only when executing an element of the operation flow, 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 flow progression, or
If the activation task is generated and is a task different from the program, a component process is generated by the component process generation process (ST203 in FIG. 2).

【0038】ここで、ステップST803における部品
端子入力処理を図17を参照して説明する。フロー作画
処理部15(図1参照)で作成されたステップ要素で使
用している部品名をnetファイル16(図1参照)か
ら取得する(図17、ST1701)。
Here, the component terminal input processing in step ST803 will be described with reference to FIG. The component 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】次に、この部品名を元に部品データベース
17(図1参照)を検索し、全ての入力端子情報を取得
する(図17、ST1702)。そして、netファイ
ル16から、この部品に対する指令を取得し、検索され
た1つの入力端子についてこの指令のみを有効とし、他
の指令を無効とする処理を生成する(図17、ST17
03)。
Next, the component database 17 (see FIG. 1) is searched based on the component names, and all input terminal information is obtained (FIG. 17, ST1702). Then, a command for this component is obtained from the net file 16, and processing is performed to validate only this command and invalidate other commands for one searched input terminal (FIG. 17, ST17).
03).

【0040】さらに、netファイル16の情報に基づ
き、残りの入力端子についても同様の処理を生成する
(図17、ST1704)。これにより、部品に対する
指令が設定されたときに、指令に対する排他処理が自動
生成されるので、従来のようにユーザが部品処理の一部
としてチェックプログラムを作成する必要がなくなり、
チェックプログラムの作成を忘れて、複数の指令が同時
に記述されて動作上の不都合が生じるのを防止できる。
Further, similar processing is generated for the remaining input terminals based on the information of the net file 16 (FIG. 17, ST1704). Accordingly, when a command for a component is set, an exclusive process for the command is automatically generated, so that the user does not need to create a check program as a part of the component process as in the related art.
Forgetting to create the check program, it is possible to prevent a situation in which a plurality of commands are described at the same time and an inconvenience in operation occurs.

【0041】また、部品内にチェック処理が不要のた
め、エラー情報を部品からメインルーチンへ出力する必
要がなくなる。これにより、メインルーチンで使用する
部品のエラー情報を変数として定義し、その変数を記憶
するための領域をメモリに確保する必要がなくなるの
で、メモリ容量を制約できるとともに、部品エラーに対
する処理も不要となる。
Further, since there is no need for a check process in the component, it is not necessary to output error information from the component to the main routine. This eliminates the need to define the error information of the components used in the main routine as variables and secure an area for storing the variables in the memory, thereby limiting the memory capacity and eliminating the need for processing for component errors. Become.

【0042】ステップST802でデータd1の要素種
別がRETURNであると判別された場合には、ステッ
プST804のRETURN生成処理を実行する。ま
た、データd1の要素種別が指令、待ち、RETURN
以外であったときには、何も処理を実行せずにステップ
ST805に進む。ステップST805では、データ数
k1回分ステップ処理生成処理を実行したか否かを判別
し、k1回実行したなら元の処理に戻る。
If it is determined in step ST802 that the element type of the data d1 is RETURN, a RETURN generation process in step ST804 is executed. Also, the element type of data d1 is command, wait, RETURN
Otherwise, the process proceeds to step ST805 without executing any processing. In step ST805, it is determined whether or not the step processing generation processing for the number of data k1 has been performed, and if the processing has been performed k1 times, the process returns to the original processing.

【0043】図10は、上述したシーケンスプログラム
作成装置により動作フローから生成されるシーケンスプ
ログラムの概略を示す図である。この動作フローは、コ
ンベア1を1m移動させる指令を与えた後、モータ1に
停止指令を与えるものである。この動作フロー全体がタ
スク1として周期的に実行され、モータ1処理がタスク
2として5ms毎に実行される。
FIG. 10 is a diagram schematically showing a sequence program generated from an operation flow by the above-described sequence program creating device. In this operation flow, after giving a command to move the conveyor 1 by 1 m, a stop command is given to the motor 1. The entire operation flow is periodically executed as a task 1, and the motor 1 processing is executed as a task 2 every 5 ms.

【0044】上述した処理順序ファイル作成処理によ
り、動作フローに対応する処理順序ファイル40が作成
され、さらにその処理順序ファイル40に基づいてステ
ップ処理及びトラジション処理が生成され、図10に示
すように動作フローの1番目の要素「開始」と2番目の
要素から、ステップ処理のstep1処理と、トランジショ
ン処理のtran1−2処理と、ステップ処理のstep2処理
が生成され、以下同様に各要素のとステップ処理とトラ
ンジション処理が生成される。
By the above-described processing order file creation processing, 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 of the operation flow, step 1 processing of step processing, tran 1-2 processing of transition processing, and step 2 processing of step processing are generated, and so on. Processing and transition processing are generated.

【0045】上述したシーケンスプログラムの自動生成
方法により、動作フローの各要素毎にステップ処理と、
要素間の接続と条件判断を行うトランジション処理が生
成され、コンベア1を移動させる処理を起動させる処理
が部品処理として生成され、5ms毎にモータ1処理等
を起動する処理と範囲指定処理が生成される。
By the above-described automatic generation method of the sequence program, step processing is performed for each element of the operation flow,
A transition process for determining the connection between elements and a condition determination is generated, a process for starting the process of moving the conveyor 1 is generated as a component process, a process for starting the motor 1 process and the like every 5 ms, and a range designation process are generated. You.

【0046】次に、以上のようなシーケンスプログラム
の自動生成の際に、部品に対する排他処理をメインルー
チンの一部として自動生成する処理について説明する。
ユーザは、メインルーチンから呼び出す部品を作成する
際に、部品の入出力端子名と、その属性、例えばデータ
型を設定する。
Next, a description will be given of a process of automatically generating an exclusive process for a part as a part of a main routine when the above-described sequence program is automatically generated.
When creating a part to be called from the main routine, the user sets input / output terminal names of the part and attributes thereof, for example, data types.

【0047】図11は、端子の設定画面を示しており、
「指令」、「状態」、「入力」等の端子種別から「指
令」を選択して端子名として「停止」、「搬入」、「搬
出」を記述し、それぞれのデータ型として「BOOL」
を選択する。ここで、「BOOL」とは、1ビットのオ
ン、オフで表されるデータである。この他の入出力端
子、状態等の端子名、属性も同様に設定できる。
FIG. 11 shows a terminal setting screen.
Select “command” from the terminal types such as “command”, “state”, and “input”, and describe “stop”, “import”, and “export” as the terminal names, and “BOOL” as their data types.
Select Here, “BOOL” is data represented by 1 bit ON / OFF. Other input / output terminals, terminal names such as status, and attributes can be similarly set.

【0048】図12は、指令端子の設定画面で設定され
た部品の部品データベース17におけるデータ構造を示
す図である。部品名、端子名(指令、状態は端子の種別
を示す)、データ型が対のデータとして保存される。
FIG. 12 is a diagram showing a data structure in the component database 17 of the component set on the command terminal setting screen. The component name, terminal name (command and status indicate the type of terminal), and data type are stored as paired data.

【0049】図13は、部品対する制御指示を指令とし
て定義した定義方法に基づく部品の入出力端子を示す図
である。本実施の形態では、指令のチェック処理を部品
内部で行っていないので、指令チェック処理によりエラ
ーが検出された場合のエラーを出力するエラー出力端子
が不要となっている。
FIG. 13 is a diagram showing 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 instruction check processing is not performed inside the component, an error output terminal for outputting an error when an error is detected by the instruction check processing is unnecessary.

【0050】図14は、部品の内部処理を示す図であ
る。部品名「ロボット1、ロボット2」の指令として
「停止」、「搬入」、「搬出」が設定された場合、ロボ
ットの動作を停止させる停止処理、ロボットに部品等を
搬入出させる搬入処理、搬出処理、それらの処理に基づ
いて出力端子から停止出力、搬出出力、搬出出力を出力
するための制御出力処理、指令された動作が完了したこ
とを示す停止完、搬入完、搬出完の情報を出力する状態
出力処理がユーザにより作成されるが、図23に示され
ているnC1チェック処理とエラー出力処理は不要とな
る。
FIG. 14 is a diagram showing internal processing of a component. When “Stop”, “Load in”, and “Unload” are set as commands for the component names “Robot 1 and Robot 2”, stop processing for stopping the operation of the robot, loading processing for loading and unloading parts and the like to the robot, and unloading Processing, stop output, unloading output, control output processing for outputting unloading output from output terminal based on those processings, output of stop complete, import complete, and export complete indicating that the commanded operation is completed The state output process is performed by the user, but the nC1 check process and the error output process shown in FIG. 23 are not required.

【0051】次に、図15は、上述したようにして入出
力端子の設定が終了した後に、部品に対する指令を入力
する入力画面を示す図である。同図の入力画面は、図1
6の「ロボット1を停止させる」動作フローに基づいて
指令を入力する場合を示している。
FIG. 15 is a view 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.
6 shows a case where a command is input based on the operation flow of “stop robot 1”.

【0052】指令の入力画面では、ユーザが画面の指令
の欄の矢印のボタンをクリックすると、図11の部品の
入出力端子の設定画面で設定された指令、「停止」、
「搬入」、「搬出」がメニュー形式で表示されるので、
ユーザは表示された指令の中から動作フローで定義した
指令を選択する。さらに、パラメータとして装置番号を
設定する。パラメータは、指令を修飾する情報であり、
指令と同時に詳細設定を部品に与えたい場合に使用す
る。この例で使用しているロボット1は、複数の組立機
械に部品を搬入、搬出しているので、指令を与える時、
組立機械を指定するための装置番号が必要であり、この
ために装置番号がパラメータとして指定される。
In the command input screen, when the user clicks the arrow button in the command column on the screen, the command set on the component input / output terminal setting screen shown in FIG.
"Import" and "Export" are displayed in a menu format.
The user selects a command defined in the operation flow from the displayed commands. Further, a device number is set as a parameter. A parameter is information that qualifies a directive,
Use this when you want to give detailed settings to a part at the same time as a command. The robot 1 used in this example carries parts in and out of a plurality of assembling machines.
A device number for specifying the assembly machine is required, and for this purpose, the device number is specified as a parameter.

【0053】次に、本発明に係るプログラムの自動生成
方法により生成されたプログラムの一例を、図18〜図
21に示す。このプログラムは、図16に示す動作フロ
ーから作成されたものである。
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】先ず、図18の初期設定処理で、1ビット
の値「1」をロードし(”LD BOOL#1”)、そ
の値を変数”INIFLG”、動作フローの開始要素で
ある要素1の活性フラグ”STS1[1]”及び要素4
の活性フラグ”STS1[4]”にストアする。
First, in the initial setting process of FIG. 18, a 1-bit value "1" is loaded ("LD BOOL # 1"), and the value is set as a variable "INIFLG". Active flag "STS1 [1]" and element 4
Is stored in the activation flag “STS1 [4]”.

【0055】次に、各工程の開始番号を設定し、最大工
程番号”KTNO_MAX”として「256」、有効範
囲指定番号”HNO_MAX”として「0」、有効要素
番号”YNO_MAX”として「5」、有効端子番号”
TRNO_MAX”として「3」を設定する。
Next, the start number of each process is set, "256" is set as the maximum process number "KTNO_MAX", "0" is set as the effective range designation number "HNO_MAX", and "5" is set as the effective element number "YNO_MAX". ID"
TRNO_MAX ”is set to“ 3 ”.

【0056】さらに、本プログラムで用いる変数名、例
えば活性フラグ”STS1[1]”、”STS2
[1]”・・・をモニタ時に用いる変数名”STS_
1”、”STS2_1”・・・へ変換する。
Further, variable names used in this program, for example, the activation flags “STS1 [1]”, “STS2”
[1] is a variable name used for monitoring “STS_
1 "," STS2_1 "...

【0057】同様に、図19のフローの一時停止の変数
名、トランジション処理の変数名の変換を行う。次に、
プログラムを一時停止させるための変数”PG_PSE
[1]”の値をアキュムレータにロードし、その値が
「0」か否かを判別する(図19の”JMPCN FL
WCNT1”)。変数”PG_PSE[1]”が「1」
であれば、フローの最後の”FLWCNT1”の部品処
理にジャンプし、「0」であれば次のステップに進む。
Similarly, the variable names of the temporary stop and the variable names of the transition process in the flow of FIG. 19 are converted. next,
Variable "PG_PSE" for temporarily stopping the program
[1] ”is loaded into the accumulator and it is determined whether or not the value is“ 0 ”(“ JMPCN FL ”in FIG. 19).
WCNT1 ") The variable" PG_PSE [1] "is" 1 "
If it is, the process jumps to the component processing of the last "FLWCNT1" of the flow, and if it is "0", it proceeds to the next step.

【0058】次のステップでは、要素1のステップ処
理”ACT1”を実行する。このステップ処理では、要
素1の活性フラグ”STS1[1]”の値をアキュムレ
ータにロードし(”LD STS1[1]”)、アキュ
ムレータの内容と要素1の実行済フラグ”STS2
[1]”の値を反転したものとの論理積を取る(”AN
DNSTS2[1]”)。そして、演算結果が「0」か
否かを判断し、演算結果が「0」であれば、つまり要素
1が非活性、又は実行済であれば、”ACT1E”にジ
ャンプし、演算結果が「1」であれば、つまり要素1が
活性、かつ未実行であれば次のステップに進む(”JM
PCN ACT1E”)。
In the next step, the step processing "ACT1" for element 1 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” of the element 1 are loaded.
[1] AND with the inverted value of ""("AN
DNSS2 [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,“ ACT1E ”is set. If the operation result is "1", that is, if the element 1 is active and not executed, the process proceeds to the next step ("JM
PCN ACT1E ").

【0059】要素1が活性、かつ未実行の場合には、要
素1の処理を実行する必要があるが、この場合要素1が
「開始要素」であるので、要素1の処理は何も実行せず
に、要素1の実行済フラグ”STS2[1]”をセット
し(”S STS2[1]”)、要素1を実行済の状態
にする。その後、整数型の数値「1」をアキュムレータ
にロードし(”LD INT#1”)、そのアキュムレ
ータの内容を要素1の活性トークン数として変数”PG
_STR1[1]”にストアする。
If the element 1 is active and has not been executed, it is necessary to execute the processing of the element 1. In this case, since the element 1 is the "start element", no processing of the element 1 is executed. Instead, the executed flag “STS2 [1]” of the element 1 is set (“S STS2 [1]”) to bring the element 1 into the executed state. After that, the integer type numerical value “1” is loaded into the accumulator (“LD INT # 1”), and the contents of the accumulator are set as the number of active tokens of the element 1 and the variable “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]”にストアしてお
く。
Next, when the element 1 is active and has been executed, a transition process for transferring the execution right from the element 1 to the element 3 (* transition 1-3 *) is executed. 1 activation flag "STS1"
The value of [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 the element 1 are reserved. The logical product of the flag "STS3 [1]" and the inverted value is taken ("ANDN STS3
[1] ”) Then, it is determined whether or not the result is“ 0 ”. If the result is“ 0 ”, that is, if the element 1 is inactive, not executed, or suspended,“ TRN1out1 ” If the result is “1”, that is, if the element 1 is active, executed, and not pending, the process proceeds to the next step.
The operation result is stored in “TRN1 [1]”.

【0061】要素1が活性、かつ実行済かつ、非保留の
場合には、要素1の活性フラグ”STS1[1]”をリ
セットし(”R STS1[1]”)、要素1の実行済
フラグ”STS2[1]”をリセットし、要素3の活性
フラグ”STS1[3]”をセットする(”S STS
1[3]”)。
If the element 1 is active, executed, and not held, the activation flag “STS1 [1]” of the element 1 is reset (“RSTS1 [1]”), and the execution flag of the element 1 is reset. “STS2 [1]” is reset, and the activation flag “STS1 [3]” of the element 3 is set (“S STS”).
1 [3] ").

【0062】これにより要素1が非活性、未実行とな
り、要素3が活性となり、実行権が要素1から要素3へ
移動する。なお、図19の命令”R”はリセット命令を
意味し、”S”はセット命令を意味している。なお、要
素3は、図16の動作フローのロボットを停止させる要
素に該当し、要素1が開始要素、後述する要素2が終了
要素に該当する。
As a result, the element 1 becomes inactive and not executed, the element 3 becomes active, and the execution right moves from the element 1 to the element 3. Note that the command “R” in FIG. 19 means a reset command, and “S” means a set command. The element 3 corresponds to an element for stopping the robot in the operation flow of FIG. 16, and the element 1 corresponds to a start element, and the element 2 described later corresponds to an end element.

【0063】次に、要素3のステップ処理ACT3を実
行する。先ず、要素3の活性フラグ”STS1[3]”
の値をアキュムレータにロードし、そのアキュムレータ
の内容と要素3の実行済フラグ”STS2[3]”の値
を反転したものとの論理積を取る。そして、演算結果が
「0」か否かを判断し、演算結果が「0」であれば、、
つまり要素3が非活性、又は実行済であれば、トランジ
ション処理”(*トランジション3−2*)にジャンプ
し、演算結果が「1」で、要素3が活性、かつ未実行で
あれば次のステップに進む。
Next, step processing ACT3 of element 3 is executed. First, 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, the processing jumps to the transition process "(* transition 3-2 *). If the operation result is" 1 "and the element 3 is active and not executed, the next processing is performed. Proceed to step.

【0064】要素3が活性、かつ未実行の場合には、図
20で、要素3の実行済フラグ”STS2[3]”をセ
ットして実行済にした後(”S STS2[3]”)、
指令端子の初期化を行う。
If the element 3 is active and has not been executed, after setting the executed flag "STS2 [3]" of the element 3 in FIG. 20 to make it executed ("S STS2 [3]") ,
Initialize the command terminal.

【0065】先ず、部品として定義されているロボット
1の指令端子を初期化するために変数をクリアする処理
を実行する。1ビットの値「0」をアキュムレータにロ
ードし(”LD BOOL#0”)、そのアキュムレー
タの内容を変数”FLWFN00001_停止”にスト
アする(”ST FLWFN00001_停止”)。搬
入、搬出の指令についても同様に初期化を行う。さら
に、数値「0」を変数”FLWFN00001_装置”
にストアし、部品のパラメータの装置番号を”0”に初
期化する。
First, a process of clearing variables is performed to initialize the command terminal of the robot 1 defined as a part. The 1-bit value “0” is loaded into the accumulator (“LD BOOL # 0”), and the contents of the accumulator are stored in the variable “FLWFN00001_stop” (“ST FLWFN00001_stop”). Initialization is similarly performed for carry-in and carry-out instructions. Further, the numerical value “0” is changed to a variable “FLWFN00001_device”.
And the device number of the component parameter is initialized to “0”.

【0066】次に、ロボット1を停止させる指令を与え
るために、1ビットの値「1」をアキュムレータにロー
ドし(LD BOOL#1”)、そのアキュムレータの
内容を変数”FLWFN00001_停止”にストアす
る(”ST FLWFN00001_装置”)。これに
より、ロボット1に指令を与えるための変数”FLWF
N00001_停止”に「1」が設定される。
Next, in order to give a command to stop the robot 1, a 1-bit value "1" is loaded into the accumulator (LD BOOL # 1), and the contents of the accumulator are stored in a variable "FLWFN00001_stop". (“ST FLWFN00001_device”), whereby the variable “FLWF” for giving a command to the robot 1 is obtained.
“1” is set to “N00001_stop”.

【0067】さらに、数値「0」をアキュムレータにロ
ードし(LD INT#0”)、そのアキュムレータの
内容を変数”FLWFN00001_装置”にロードす
る。これにより、対象装置の装置番号を指定する変数”
FLWFN00001_装置”に装置番号として「0」
が設定される。この場合には、初期値と実際の装置番号
が同一になっている。さらに、入力データ制御フラグ”
FCNT[1]”に「1」をストアする。
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", whereby the variable specifying the device number of the target device is read.
FLWFN00001_device ”as device number“ 0 ”
Is set. In this case, the initial value and the actual device number are the same. In addition, the input data control flag
"1" is stored in FCNT [1] ".

【0068】上述したように部品に対する指令の入力画
面で入力された指令のみを有効とし、他の指令を無効と
する処理がメインルーチンの要素3の処理として自動生
成される。これにより、部品に対する指令の排他管理を
行うチェック処理を、部品処理の一部としてユーザが作
成する必要がなくなるので、ユーザがチェック処理の作
成を忘れて制御対象機器の動作に不都合が生じることが
無くなる。
As described above, the process of validating only the command input on the component input screen and invalidating 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 control of a command on a component as part of the component process, so that the user may forget to create the check process and cause inconvenience in the operation of the controlled device. Disappears.

【0069】要素3のステップ処理が終了したなら、要
素3−2のトランジション処理を実行する。このトラン
ジション処理では、要素3の活性フラグ”STS1
[3]”の値をアキュムレータにロードし、アキュムレ
ータの内容と実行済フラグ”STS2[3]”との論理
積を取り、さらにその結果と保留フラグ”STS3
[3]”の値を反転したものとの論理積を取り、その結
果を変数”TRN1[2]”にストアする。そして、演
算結果が「0」か否かを判断し、演算結果が「0」であ
れば、つまり要素3が非活性、又は未実行、又は保留で
あれば、”TRN2out1E”のステップにジャンプ
し、要素3が活性、かつ実行済、かつ非保留であれば、
次のステップに進む(”JMPCN TRN2out1
E”)。
When the step processing of the element 3 is completed, the transition processing of the element 3-2 is executed. In this transition processing, the activation flag “STS1” of the element 3
[3] ”is loaded into the accumulator, the logical product of the contents of the accumulator and the executed flag“ STS2 [3] ”is obtained, and the result is further combined with the hold flag“ STS3 ”.
The logical product of the value obtained by inverting the value of [3] "is obtained, and the result is stored in a variable" TRN1 [2] ". Then, it is determined whether or not the operation result is" 0 ". If "0", that is, if the element 3 is inactive, not executed, or suspended, the process jumps to the step of "TRN2out1E", and if the element 3 is active, executed, and not suspended,
Proceed to the next step ("JMPCN TRN2out1"
E ").

【0070】要素3が活性、かつ実行済、かつ非保留の
場合には、要素3の活性フラグ”STS1[3]”をリ
セットして非活性にし、実行済フラグ”STS2
[3]”をリセットして未実行にし、要素2の活性フラ
グ”STS1[2]”をセットして実行権を要素2に移
動する。
If the element 3 is active, executed, and not suspended, the activation flag “STS1 [3]” of the element 3 is reset to deactivate, and the executed flag “STS2”
[3] ”is reset to not be executed, the activation flag“ STS1 [2] ”of the element 2 is set, and the execution right is moved to the element 2.

【0071】次に、要素2のステップ処理を実行する。
このステップ処理では、要素2の活性フラグ”STS1
[2]”の値をアキュムレータにロードし、そのアキュ
ムレータの内容と要素2の実行済フラグ”STS2
[2]”の値を反転したものとの論理積を取る。そし
て、その演算結果が「0」か否かを判断し、演算結果が
「0」であれば、つまり要素2が非活性、又は実行済で
あれば、”ACT2E”のステップにジャンプし、要素
2が活性、かつ未実行であれば、次のステップに進む。
Next, the step processing of the element 2 is executed.
In this step processing, the activation flag “STS1” of the element 2
[2] ”is loaded into the accumulator, and the contents of the accumulator and the executed flag“ STS2 ”of the element 2 are loaded.
[2] ”is ANDed with the inverted value of“ 2. ”Then, it is determined whether or not the operation result is“ 0 ”. If the operation result is“ 0 ”, that is, element 2 is inactive, Alternatively, if the execution has been completed, the process jumps to the step “ACT2E”. If the element 2 is active and has not been executed, the process proceeds to the next step.

【0072】次のステップでは、要素2が終了要素であ
るので何も処理を実行せず、要素2の実行済フラグ”S
TS2[2]”をセットして実行済にする。さらに、整
数型の数値「0」を変数”PG_STR1[1]”にス
トアして、活性トークン数を「0」にする。
In the next step, since the element 2 is the end element, no processing is executed and the executed flag "S"
TS2 [2] "is set to be executed. Further, the integer type number" 0 "is stored in the variable" PG_STR1 [1] ", and the number of active tokens is set to" 0 ".

【0073】次に、終了要素2のトランジション処理A
CT2Eでは、要素2の活性フラグ”STS1[2]”
の値をアキュムレータにロードし、そのアキュムレータ
の内容と実行済フラグ”STS2[2]”の値との論理
積を取り、その結果と保留フラグ”STS3[2]”の
値を反転したものとの論理積を取る。そして、演算結果
が「0」か否かを判断し、演算結果が「0」であれば、
つまり要素2が非活性、又は未実行、又は保留であれ
ば、”TRN2ENDE”のステップにジャンプし、演
算結果が「1」であれば、次のステップに進む。
Next, transition processing A of the end element 2
In the CT2E, the activation flag “STS1 [2]” of the element 2
Is loaded into the accumulator, the logical product of the contents of the accumulator and the value of the executed flag "STS2 [2]" is obtained, and the result is compared with the value obtained by inverting the value of the pending flag "STS3 [2]". Take the logical product. Then, it is determined whether the operation result is “0”, and 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, and if the operation result is “1”, the process proceeds to the next step.

【0074】演算結果が「1」で、要素2が活性、かつ
実行済、かつ非保留の場合には、要素2の活性フラグ”
STS1[2]”をリセットして要素2を非活性にし、
要素2の実行済フラグ”STS2[2]”をリセットし
て未実行にする。
If the operation result is “1” and the element 2 is active, has been executed, and is not pending, the activation flag of the element 2
Reset STS1 [2] "to deactivate element 2,
The executed flag “STS2 [2]” of the element 2 is reset to be not executed.

【0075】次に、部品をコールして指令を与える処理
について説明する。先ず、入力データ制御フラグ”FC
NT[1]”の値をアキュムレータにロードし(”LD
FCNT[1]”)、アキュムレータの内容が「0」
か否かを判別することで、入力データ制御フラグがセッ
トされているか否かを判断する。アキュムレータが
「0」のとき、つまり入力データ制御フラグがセットさ
れていないときには、”FNCCNT1”のステップに
ジャンプし、アキュムレータが「1」で入力データ制御
フラグがセットされているときには次のステップに進
む。
Next, a process of calling a component and giving a command will be described. First, the input data control flag "FC
NT [1] "is loaded into the accumulator (" LD
FCNT [1] ”), the accumulator content is“ 0 ”
By determining whether or not the input data control flag is set, it is determined whether or not the input data control flag is set. When the accumulator is "0", that is, when the input data control flag is not set, the process jumps to the step of "FNCCNT1". When the accumulator is "1" and the input data control flag is set, the process proceeds to the next step. .

【0076】次のステップでは、変数”FLWFN00
001_停止”の値をアキュムレータにロードし、その
アキュムレータの内容をロボット1の部品に対する指令
としてストアする(図21の”ST ロボット1._停
止”)。同様に、搬入、搬出の変数の値をロボット1の
指令として設定する。また、変数”FLWFN000
1”に記憶されている装置番号「0」を、ロボット1の
パラメータの装置番号として設定する。
In the next step, the variable “FLWFN00
001_Stop ”is loaded into the accumulator, and the contents of the accumulator are stored as a command for the parts of the robot 1 (“ ST Robot 1._Stop ”in FIG. 21). This is set as a command for the robot 1. Also, the variable “FLWFN000” is set.
The device number “0” stored in “1” is set as the device number of the parameter of the robot 1.

【0077】上述した処理により、例えば、図15の部
品に対する指令の入力画面でユーザが選択した指令のみ
が「1」となり、他の指令は「0」となるので、ロボッ
ト1に対する指令の内で”停止”のみが有効となり、他
の搬入、搬出等の指令は無効となる。
By the above-described processing, for example, only the command selected by the user on the command input screen for parts shown in FIG. 15 becomes “1”, and the other commands become “0”. Only "stop" is valid, and other commands such as loading and unloading are invalid.

【0078】最後にロボット1の部品処理をコール(”
CAL ロボット1”)する。そして、入力データ制御
フラグ”FCNT[1]”に1ビットの値「0」をセッ
トして制御フラグをリセットする。さらに、ロボット1
が停止完状態にあるか否かを示す部品の出力端子の”停
止完”の情報をロードし、その情報を変数”FLWFN
00001_停止完”にストアする。同様にロボット1
が搬入完了の状態にあるか否かを示す出力端子である”
搬入完”の情報をロードし、その情報を変数”FLWF
N00001_搬入完”にストアする。また、ロボット
1が搬出完了の状態にあるか否かを示す出力端子であ
る”搬出完”の情報をロードし、その情報を変数”FL
WFN00001_搬出完”にストアする。これらの処
理によりロボット1の状態が上述した変数にストアさ
れ、メインルーチンでその変数を読み取ることにより、
ロボット1の状態を認識できる。
Finally, the parts processing of the robot 1 is called (“
Then, the CAL robot 1 ") performs a 1-bit value" 0 "in the input data control flag" FCNT [1] "and resets the control flag. In addition, robot 1
Is loaded with the information of "stop complete" of the output terminal of the component indicating whether or not it is in the stop complete state, and the information is stored in a variable "FLWFN".
"00001_stop complete". Similarly, robot 1
Is an output terminal indicating whether or not loading is complete. "
Load the information of "Load complete" and store the information in the variable "FLWF".
N00001_loading complete ". Information of" output complete "which is an output terminal indicating whether or not the robot 1 is in the state of completion of loading is loaded, and the information is stored in a variable" FL ".
WFN00001_Unloading Completed ". By these processes, the state of the robot 1 is stored in the above-described variables, and by reading the variables in the main routine,
The state of the robot 1 can be recognized.

【0079】上述した実施の形態によれば、部品に対す
る指令がユーザにより設定されたとき、設定された指令
のみを有効とし、他の指令を無効とする処理が自動生成
されるので、従来のようにユーザが部品処理の内部にチ
ェック処理を作成する必要がなくなる。これにより、ユ
ーザがチェック処理の作成を忘れて、異なる指令が1つ
の部品に同時に与えられるような問題の発生を防止でき
る。また、チェック処理を部品処理の内部処理として作
成する必要が無いため、個々の部品がチェック結果をメ
インルーチンに通知するためのエラー情報を出力する必
要が無くなる。これにより、多数の部品が存在する場合
でも、それらの部品のエラー情報を記憶するための変数
を定義し、その変数を記憶する領域をメモリに確保する
必要が無くなるので、メモリ容量をその分節約すること
ができる。また、変数で定義されているエラー情報を処
理するための処理をメインルーチンに設ける必要が無く
なるので、その分プログラムも簡素になる。
According to the above-described embodiment, when a command for a component is set by a user, a process for validating only the set command and invalidating other commands is automatically generated. This eliminates the need for the user to create a check process inside the component process. Thus, it is possible to prevent a problem that the user forgets to create the check process and different commands are given to one part at the same time. Further, since it is not necessary to create the check process as an internal process of the component process, it is not necessary for each component to output error information for notifying the check result to the main routine. This eliminates the need to define variables for storing error information of those components even when a large number of components are present and to secure an area for storing the variables in the memory, thereby saving memory capacity. can do. Further, since there is no need to provide a process for processing error information defined by variables in the main routine, the program is simplified accordingly.

【0080】さらに、本発明に係るシーケンスプログラ
ムの自動生成プログラムを、図22に示すフロッピーデ
ィスク2201、CDROM2202等の記憶媒体に格
納しておいて、その記憶媒体を情報処理装置(パーソナ
ルコンピュータ等)2203の媒体駆動装置(フロッピ
ーディスクドライバー、CDROMドライバー等)22
04により読み取りシーケンスプログラムを自動生成す
るようにしてもよい。あるいは自動生成プログラムをプ
ログラム提供者のコンピュータのハードディスク等の記
憶装置に記憶しておいて、通信によりユーザのコンピュ
ータに転送してハードディスク等に記憶し、その自動生
成プログラムを用いてシーケンスプログラムを生成する
ようにしてもよい。
Further, the automatic generation program of the sequence program according to the present invention is stored in a storage medium such as a floppy disk 2201 or CDROM 2202 shown in FIG. 22, and the storage medium is used as an information processing device (personal computer or the like) 2203. Medium drive device (floppy disk driver, CDROM driver, etc.) 22
04 may be used to automatically generate a reading sequence program. Alternatively, an automatic generation program is stored in a storage device such as a hard disk of a computer of a program provider, transferred to a user's computer by communication, stored in a hard disk or the like, and a sequence program is generated using the automatic generation program. You may do so.

【0081】上述した実施の形態によれば、動作フロー
の要素毎に活性フラグ、実行済フラグ、保留フラグを設
け、それらのフラグが一定の条件を満足するとき、実行
権を次の要素に渡すようにしたので、動作フローの要素
に対応する処理とその要素の処理が終了したとき実行権
を次の要素に渡すようなプログラムを自動生成すること
が可能となる。
According to the above-described embodiment, the activation flag, the executed flag, and the hold flag are provided for each element of the operation flow, and when those flags satisfy a certain condition, the execution right is passed to the next element. With this configuration, it is possible to automatically generate a program that passes the execution right to the next element when the processing corresponding to the element of the operation flow and the processing of the element are completed.

【0082】また、本実施の形態では、動作フローの各
要素に対応するステップ処理とトランジション処理とが
自動生成されるので、従来のようにプログラミング担当
者がプログラムを作成する場合に発生するステップやト
ランジションの抜けが無くなる。また、ステップ処理と
ステップ処理との間には必ずトランジション処理が生成
されるので、シーケンシャルファンクションチャートの
ようにステップとトランジションの記述順序をユーザが
注意する必要が無くなる。さらに、仕様を変更する際
は、動作フローのみを変更すれば、その動作フローに対
応するシーケンスプログラムが作成されるので、従来の
ようにシーケンスプログラムのみが変更され、動作フロ
ーが実際のプログラムと異なるという問題も生じない。
Further, in the present embodiment, step processing and transition processing corresponding to each element of the operation flow are automatically generated, so that the steps that occur when a programmer creates a program as in the related art are described. Transition omission is eliminated. Further, since the transition processing is always generated between the step processing, the user does not need to pay attention to the description order of the steps and the transition as in the sequential function chart. Furthermore, when changing 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 conventional case, and the operation flow is different from the actual program. The problem does not arise.

【0083】また、従来、使用する部品の動作に必要な
タスク毎にフローを記述し、タスク間でデータ交換を行
うためのソフトウエア設計が必要であったが、1つの動
作フローで別タスクで動作すべき部品が記述できるの
で、これらの作業が不要となる。その結果、ユーザはモ
ータ等の使用部品が別のタスクで動作するか否かを考慮
する必要がなく、機械動作そのものを記述するだけでシ
ーケンスプログラムを生成することができる。
Further, conventionally, it has been necessary to describe a flow for each task necessary for the operation of a component to be used and to design software for exchanging data between tasks. However, one operation flow requires another task. Since the components to be operated can be described, these operations become unnecessary. As a result, the user does not need to consider whether the used parts such as the motor operate by another task, and can generate the sequence program only by describing the machine operation itself.

【0084】なお、上述した実施の形態では、シーケン
スプログラムを自動生成する際に、指令を排他管理する
プログラムを自動生成する場合について説明したが、そ
れ以外のプログラムを自動生成する場合にも本発明は適
用できる。
In the above-described embodiment, a case has been described in which, when a sequence program is automatically generated, a program for exclusively managing commands is automatically generated. However, the present invention is also applicable to a case where other programs are automatically generated. Is applicable.

【0085】[0085]

【発明の効果】本発明によれば、共通処理ルーチンに対
する指令の排他管理を行うプログラムを自動生成するこ
とができるので、ユーザが指令のチェックプログラムを
作成するのを忘れて処理上の不都合が生じるのを防止で
きる。また、共通処理ルーチンに対する指令の排他管理
を行うプログラムを、共通処理ルーチンの内部ではな
く、メインルーチン側に作成することにより、共通処理
ルーチンからメインルーチンにエラー情報を通知する必
要がなくなる。これにより、共通処理ルーチンが複数存
在する場合でも、それぞれのエラー情報を記憶するメモ
リ領域を確保する必要が無くなるので、メモリ容量を節
約できる。
According to the present invention, it is possible to automatically generate a program for exclusively controlling a command for a common processing routine. For this reason, the user forgets to create a program for checking a command, causing inconvenience in processing. Can be prevented. In addition, by creating a program for performing exclusive management of commands for the common processing routine not in the common processing routine but in the main 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, there is no need to secure a memory area for storing each error information, so that the memory capacity can be saved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】実施の形態のシーケンスプログラム作成装置の
ブロック図である。
FIG. 1 is a block diagram of a sequence program creation device according to an embodiment.

【図2】コンパイラ18の処理内容を示す図である。FIG. 2 is a diagram showing processing contents of a compiler 18;

【図3】処理順序ファイル作成処理を示す図である。FIG. 3 is a diagram showing a processing order file creation process.

【図4】処理順序ファイル40の構成の一例を示す図で
ある。
FIG. 4 is a diagram showing an example of the configuration of a processing order file 40.

【図5】要素番号セット処理を示す図である。FIG. 5 is a diagram showing an element number setting process.

【図6】同図(A)〜(D)は、処理順序ファイルの一
例を示す図である。
FIGS. 6A to 6D are diagrams illustrating an example of a processing order file.

【図7】フロー要素処理生成処理を示す図である。FIG. 7 is a diagram showing a flow element process generation process.

【図8】ステップ処理生成処理を示す図である。FIG. 8 is a diagram showing a step process generation process.

【図9】ステップ処理及びトランジション処理の基本構
成を示す図である。
FIG. 9 is a diagram showing a basic configuration of step processing and transition processing.

【図10】動作フローから生成されるシーケンスプログ
ラムの一例を示す図である。
FIG. 10 is a diagram illustrating an example of a sequence program generated from an operation flow.

【図11】部品の端子の設定画面を示す図である。FIG. 11 is a diagram illustrating a setting screen of a terminal of a component.

【図12】部品データのデータ構造を示す図である。FIG. 12 is a diagram showing a data structure of component data.

【図13】部品データベース17に登録される部品の入
出力端子を示す図である。
FIG. 13 is a diagram showing input / output terminals of components registered in the component database 17;

【図14】部品の内部処理を示す図である。FIG. 14 is a diagram showing internal processing of a component.

【図15】指令の入力画面を示す図である。FIG. 15 is a view showing a command input screen.

【図16】動作フローの作成画面を示す図である。FIG. 16 is a diagram showing an operation flow creation screen.

【図17】部品端子入力処理を生成するフローチャートFIG. 17 is a flowchart for generating a component terminal input process;

【図18】シーケンスプログラムの一例を示す図(その
1)である。
FIG. 18 is a diagram (part 1) illustrating one example of a sequence program;

【図19】シーケンスプログラムの一例を示す図(その
2)である。
FIG. 19 is a diagram (part 2) illustrating one example of a sequence program;

【図20】シーケンスプログラムの一例を示す図(その
3)である。
FIG. 20 is a diagram (part 3) illustrating one example of a sequence program;

【図21】シーケンスプログラムの一例を示す図(その
4)である。
FIG. 21 is a diagram (part 4) illustrating one example of a sequence program;

【図22】記憶媒体を用いる場合の説明図である。FIG. 22 is an explanatory diagram when a storage medium is used.

【図23】部品に対して複数の指令を定義した場合の部
品の入出力端子を示す図である。
FIG. 23 is a diagram showing input / output terminals of a component when a plurality of commands are defined for the component.

【図24】部品に対して複数の指令を定義した場合の部
品の内部処理を示す図である。
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 ネットファイル 17 部品データベース 18 コンパイラ 40 処理順序ファイル 16 Net file 17 Parts database 18 Compiler 40 Processing order file

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】複数の共通処理ルーチンに対して実行すべ
き処理内容を指示する複数の指令を定義した定義方法に
基づくプログラムの自動生成方法であって、 前記複数の指令の排他管理を必要とする場合に、前記複
数の指令の内で選択された指令のみを有効とし、他の指
令を無効とするプログラムを自動生成することを特徴と
する共通処理ルーチンに対する指令入力処理の自動生成
方法。
1. A method for automatically generating a program based on a definition method defining a plurality of instructions for instructing processing contents to be executed for a plurality of common processing routines, wherein exclusive management of the plurality of instructions is required. A method for automatically generating a command for validating only a command selected from among the plurality of commands and invalidating other commands, wherein a command input process for a common process routine is automatically generated.
【請求項2】前記複数の指令の排他管理を行うプログラ
ムを、前記共通処理ルーチンをコールするメインルーチ
ンの一部として自動生成することを特徴とする請求項1
記載の共通処理ルーチンに対する指令入力処理の自動生
成方法。
2. A program for performing exclusive management of the plurality of instructions is automatically generated as a part of a main routine that calls the common processing routine.
Automatic generation of command input processing for the common processing routine described.
【請求項3】制御対象機器のシーケンス動作を記述した
動作フローに基づいてプログラムを自動生成するシーケ
ンスプログラムの自動生成方法であって、 前記動作フローの各要素毎に前記要素が実行可能な状態
か否かを示す活性情報と、前記要素が実行済か否かを示
す実行済情報と、前記要素の実行を保留状態にする保留
情報とを生成し、 前記各要素の前記活性情報、実行済情報及び保留情報と
に基づいて前記各要素に対応する処理に実行権を与える
シーケンスプログラムを生成することを特徴とする請求
項1又は2記載の共通処理ルーチンに対する指令入力処
理の自動生成方法。
3. An automatic generation method of a sequence program for automatically generating a program based on an operation flow describing a sequence operation of a control target device, wherein each element of the operation flow is in an executable state. Active information indicating whether or not the element has been executed, and execution information indicating whether or not the element has been executed, and suspension information for suspending the execution of the element. 3. A method according to claim 1, wherein a sequence program for giving execution right to a process corresponding to each of the elements is generated based on the information and the hold information.
【請求項4】前記動作フローの前記要素に対応する処理
として、前記要素の前記活性情報が活性、かつ実行済情
報が未実行であるとき、前記要素自体の処理を実行する
と共に、前記実行済情報を実行済にするステップ処理
と、前記要素の活性情報が活性、かつ実行済情報が実行
済、かつ保留情報が非保留のとき、前記要素の活性情報
を非活性、実行済情報を未実行にし、実行権を次の要素
に移動させるトランジション処理とを生成することを特
徴とする請求項3記載の共通処理ルーチンに対する指令
入力処理の自動生成方法。
4. A process corresponding to the element of the operation flow, wherein when the activation information of the element is active and the executed information is not executed, the processing of the element itself is executed and the executed Step processing for making the information executed, and when the activation information of the element is active, the execution information has been executed, and the suspension information is non-suspension, the activation information of the element is inactivated, and the execution information is not executed. 4. A method for automatically generating a command input process for a common processing routine according to claim 3, wherein a transition process for moving the execution right to the next element is generated.
【請求項5】複数の共通処理ルーチンに対して実行すべ
き処理内容を指示する複数の指令を定義し、前記複数の
指令の内で指示された指令のみを有効とし、他の指令を
無効とする排他管理を行えるようにしたことを特徴とす
る共通処理ルーチンに対する指令の定義方法。
5. A method according to claim 1, further comprising defining a plurality of commands for instructing processing contents to be executed with respect to a plurality of common processing routines, making only the command specified among said plurality of commands valid, and invalidating other commands. A method for defining a command for a common processing routine, characterized in that exclusive management is performed.
【請求項6】複数の共通処理ルーチンに対して実行すべ
き処理内容を指示する複数の指令を定義した共通処理ル
ーチンの定義方法に基づいてプログラムを自動生成する
プログラムの自動生成装置であって、 前記複数の指令の内の1つの指令を入力する入力手段
と、 前記複数の指令の排他管理を必要とする場合に、動作フ
ローに基づいて前記入力手段により入力された1つの指
令のみを有効とし、他の指令を無効とするプログラムを
自動生成するプログラム生成手段とを備えることを特徴
とするプログラムの自動生成装置。
6. An automatic program generating apparatus for automatically generating a program based on a method of defining a common processing routine defining a plurality of instructions for instructing processing contents to be executed for a plurality of common processing routines, Input means for inputting one of the plurality of instructions; and when exclusive control of the plurality of instructions is required, only one instruction input by the input means based on an operation flow is validated. And a program generating means for automatically generating a program for invalidating other commands.
【請求項7】前記プログラム生成手段は、前記複数の指
令の排他管理を行うプログラムを、前記共通処理ルーチ
ンとは別のメインルーチンの一部として自動生成するこ
とを特徴とする請求項6記載のプログラムの自動生成装
置。
7. A program according to claim 6, wherein said program generating means automatically generates a program for exclusively controlling said plurality of commands as a part of a main routine different from said common processing routine. Automatic program generator.
【請求項8】制御対象機器のシーケンス動作を記述した
動作フローに基づいてプログラムを自動生成するシーケ
ンスプログラムの自動生成装置であって、 前記動作フローの各要素毎に前記要素が実行可能な状態
か否かを示す活性情報と、前記要素が実行済か否かを示
す実行済情報と、前記要素の実行を保留状態にする保留
情報とを生成する実行情報生成手段を有し、 前記入力手段は、前記複数の指令の内の1つの指令のみ
を選択可能とし、 前記プログラム生成手段は、前記実行情報生成手段によ
り生成される前記要素の活性情報、実行済情報及び保留
情報に基づいて前記要素自体の実行処理であるステップ
処理と、次の要素に実行権を移動するトランジション処
理とを生成することを特徴とする請求項6記載のプログ
ラムの自動生成装置。
8. An automatic sequence program generation apparatus for automatically generating a program based on an operation flow describing a sequence operation of a control target device, wherein each of the operation flows is in an executable state. Activation information indicating whether or not the element has been executed, execution information indicating whether the element has been executed, and execution information generation means for generating hold information for holding the execution of the element in a hold state, the input means And selecting only one command from the plurality of commands. The program generating means is configured to execute the element itself based on the activation information, executed information, and suspension information of the element generated by the execution information generating means. 7. The automatic program generation device according to claim 6, wherein a step process as an execution process of the step (a) and a transition process for shifting an execution right to a next element are generated.
【請求項9】複数の共通処理ルーチンに対して実行すべ
き処理内容を指示する複数の指令を定義した定義方法に
基づくプログラムを自動生成する自動生成プログラムを
記録する記録媒体であって、 前記複数の指令の排他管理を必要とする場合に、前記複
数の指令の内で選択された指令のみを有効とし、他の指
令を無効とする指令入力処理を自動生成する自動生成プ
ログラムを記録したことを特徴とするコンピュータ読取
可能な記録媒体。
9. A recording medium for recording an automatic generation program for automatically generating a program based on a definition method defining a plurality of instructions for specifying processing contents to be executed for a plurality of common processing routines, In the case where exclusive control of commands is required, only an instruction selected from the plurality of commands is made valid, and an automatic generation program for automatically generating a command input process of invalidating other commands is recorded. Characteristic computer-readable recording medium.
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 true JPH11353009A (en) 1999-12-24
JP3890746B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5025833B1 (en) * 2011-09-16 2012-09-12 三菱電機株式会社 Sequence program creation device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5025833B1 (en) * 2011-09-16 2012-09-12 三菱電機株式会社 Sequence program creation device

Also Published As

Publication number Publication date
JP3890746B2 (en) 2007-03-07

Similar Documents

Publication Publication Date Title
JP5039428B2 (en) Programmable controller and PLC system
US20070089063A1 (en) Graphical Programs With FIFO Structure For Controller/FPGA Communications
CN103718155A (en) Runtime system
JP2006504156A (en) Component model for real-time system control
JP2009534766A (en) Method and system for generating an application data editor
Thimbleby Delaying commitment (programming strategy)
US5623664A (en) Interactive memory organization system and method therefor
WO2020039900A1 (en) Information processing apparatus and program
JP6874706B2 (en) How to generate application programs, devices, programs
US20050137727A1 (en) Controller for a machine-tool or production machine
EP0696771A2 (en) A method for programming a data processing system
JPH11353009A (en) Method for automatically generating command input processing to common processing routine, method for defining command for common processing routine and storage medium
JP7352152B2 (en) Information processing systems, programmable displays, and information processing equipment
KR101085114B1 (en) System for providing programable logic controller software development environment
Di Trapani et al. NTGsim: A graphical user interface and a 3D simulator for nonlinear trajectory generation methodology
JP2005326909A (en) Plant engineering system
JPH10247142A (en) System and method for programming process control program
CN111078301A (en) Multi-core arithmetic device and operation method thereof
JP7447574B2 (en) Support equipment, support programs and support methods
CN108008945A (en) Device PCI drives development approach under a kind of LINUX system
JP2005353092A (en) Process control system
JPH09114513A (en) Numerical control system
JP2002073120A (en) Device and method for programming of programmable controller
JPH10289011A (en) Numerically controlled device and background processing customizing method for the device
JP2003076547A (en) System and method for automatically generating control software

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

Effective date: 20041228

Free format text: JAPANESE INTERMEDIATE CODE: A971007

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 (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Year of fee payment: 3

Free format text: PAYMENT UNTIL: 20091215

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Year of fee payment: 3

Free format text: PAYMENT UNTIL: 20091215

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees