JP2006099639A - Program generating device, controller, and computer program - Google Patents

Program generating device, controller, and computer program Download PDF

Info

Publication number
JP2006099639A
JP2006099639A JP2004287522A JP2004287522A JP2006099639A JP 2006099639 A JP2006099639 A JP 2006099639A JP 2004287522 A JP2004287522 A JP 2004287522A JP 2004287522 A JP2004287522 A JP 2004287522A JP 2006099639 A JP2006099639 A JP 2006099639A
Authority
JP
Japan
Prior art keywords
program
variable
group
control
groups
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004287522A
Other languages
Japanese (ja)
Inventor
Noritaka Nishiyama
典孝 西山
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.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
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 Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2004287522A priority Critical patent/JP2006099639A/en
Publication of JP2006099639A publication Critical patent/JP2006099639A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Numerical Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To avoid redundant and careless occurrence of common parameters between programs so as to facilitate development by multiple people, and utilization of existing program resources when developing a control program of a controller controlling multiple control object devices in a unified manner. <P>SOLUTION: A program management part 29 of a cell facility controller 21 gathers two or more control programs stored in a program storage area 32 in groups by common attribute, and divides the entire program into two or more groups to manage. Then, a parameter management part 32 divides two or more parameters stored in a parameter storage area 36 into a local parameter group effective only inside each control program, and a group parameter group effective only inside a group managed by the program management part, determines whether or not a used parameter belongs to any one of parameter groups in the process of executing a program execution part 28, and manages parameter values in a corresponding parameter group area of the parameter storage area 36 in accordance with the determination result. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、1つ以上の工業用ロボットを含む複数の制御対象機器を統括的に制御するように構成される制御装置に実行させる制御プログラムを作成するためのプログラム作成装置,及び前記制御装置、並び前記プログラム作成装置又は前記制御装置を構成するCPUによって実行されるコンピュータプログラムに関する。   The present invention provides a program creation device for creating a control program to be executed by a control device configured to centrally control a plurality of control target devices including one or more industrial robots, and the control device, The present invention also relates to a computer program executed by a CPU constituting the program creation device or the control device.

図11は、コンベアによって搬送されるワークを工業用ロボットを用いて加工する生産ライン1の一構成例を示す斜視図である。直線状のコンベア2は、行き用のコンベア2F,戻り用のコンベア2Bの2本からなり、行き用のコンベア2Fの途中部位にロボット3及び加工機4が配置されている。そして、ロボット3の僅かに上流には、パレット検出用のセンサ6が配置されている。また、加工機4の下流側隣には、部品供給装置7が配置されている。   FIG. 11 is a perspective view showing a configuration example of a production line 1 that processes a workpiece conveyed by a conveyor using an industrial robot. The linear conveyor 2 is composed of two conveyors, an outward conveyor 2F and a return conveyor 2B, and the robot 3 and the processing machine 4 are arranged in the middle of the outgoing conveyor 2F. A pallet detection sensor 6 is disposed slightly upstream of the robot 3. Further, a component supply device 7 is arranged next to the downstream side of the processing machine 4.

上記構成における加工処理の流れを概略的に説明する。
(0)作業者によって生産ライン1の起動ボタンが操作されると、初期化処理として、各部に配置されている図示しないセンサの入力信号が参照され、安全状態がチェックされると共に、各ユニットにおけるアクチュエータなどの原位置が確認される。それらがOKであれば、電源やエアなどの供給が開始されてコンベア2が起動される。すると、コンベア2Fの上流側より、パレット8に載置されたワーク9が前工程より供給される。
The flow of processing in the above configuration will be schematically described.
(0) When the start button of the production line 1 is operated by the worker, as an initialization process, input signals of sensors (not shown) arranged in the respective parts are referred to, the safety state is checked, and each unit The original position of the actuator etc. is confirmed. If they are OK, supply of power, air, etc. is started and the conveyor 2 is started. Then, the work 9 placed on the pallet 8 is supplied from the upstream side from the upstream side of the conveyor 2F.

(1)パレット8が、コンベア2F上を搬送され所定位置に到達したことがセンサ6により検出される。
(2)すると、ロボット3のハンドがワーク9上に移動して当該ワーク9を把持し、上昇させる。
(3)ロボット3は加工機4に問合せを行い、「投入OK」の応答があれば、把持したワーク9を加工機4の投入位置に移動させ、一旦ハンド切替えを行うと加工機4による加工済みのワーク9を把持し、再びハンド切替えを行って未加工のワーク9を投入位置に投入する。
(1) The sensor 6 detects that the pallet 8 has been conveyed on the conveyor 2F and has reached a predetermined position.
(2) Then, the hand of the robot 3 moves onto the work 9 to grip and raise the work 9.
(3) The robot 3 makes an inquiry to the processing machine 4, and if there is a response of “input OK”, the gripped work 9 is moved to the input position of the processing machine 4, and once the hand is switched, the processing by the processing machine 4 is performed. The already-worked workpiece 9 is gripped, the hand is switched again, and the unmachined workpiece 9 is loaded into the loading position.

(4)続いて、ロボット3は、加工済みのワーク9をコンベア2Fの下流側に移動させ、パレット8に載置する。尚、パレット8は、コンベア2Fの上流側と下流側との間を、図示しないリフタを介してコンベア2Fの下方側を移動して移送されるようになっている。
(5)次に、ロボット3は、部品供給装置7にハンドを移動させて当該装置7より供給される別のワーク10をチャックすると、(4)のパレット位置まで移動させ、加工済みのワーク9にワーク10を組み付ける。
(6)そして、コンベア2F上のワークストッパを解除して、組付け後のワーク11が載置されたパレット8を下流側に搬出する。
(4) Subsequently, the robot 3 moves the processed workpiece 9 to the downstream side of the conveyor 2F and places it on the pallet 8. The pallet 8 is moved between the upstream side and the downstream side of the conveyor 2F by moving below the conveyor 2F via a lifter (not shown).
(5) Next, when the robot 3 moves the hand to the component supply device 7 and chucks another workpiece 10 supplied from the device 7, the robot 3 moves to the pallet position of (4) and moves the processed workpiece 9. Assemble work 10 to
(6) Then, the work stopper on the conveyor 2F is released, and the pallet 8 on which the work 11 after assembly is placed is carried downstream.

その後、下流側においていつかの工程が実施された後、パレット8は戻り用のコンベア2Bに乗せ替えられて上流側に搬送される。
上記のような構成においては、ロボット3の他に、コンベア2や加工機4等も同時に制御する必要がある。また、各設備に配置されているセンサ6などによって出力される信号の状態も監視しながら、必要に応じてロボット3やコンベア2などを停止させるなどの制御も必要となる。
Thereafter, after some process is performed on the downstream side, the pallet 8 is transferred to the return conveyor 2B and conveyed to the upstream side.
In the above configuration, it is necessary to simultaneously control the conveyor 2 and the processing machine 4 in addition to the robot 3. In addition, it is necessary to control the robot 3 and the conveyor 2 to be stopped as necessary while monitoring the state of signals output from the sensors 6 arranged in each facility.

図12は、従来、上記のような生産ライン1について制御を行う制御系の構成を概略的に示すものである。即ち、ロボット3は専用のロボットコントローラ12によって制御され、コンベア2についてはモーションコントローラ13によって制御される。また、加工機4は加工機用制御装置14によって制御される。
そして、これらのコントローラ12〜14は、プログラマブルロジックコントローラ(PLC)15によって統括的に制御されるようになっている。また、PLC15には、加工状態などを画像で監視するための例えばCCD(Charge Coupled Device)で構成されるカメラ16及びそのカメラ16を制御する視覚コントローラ17や、各種のセンサ6などによって入力される信号及びバルブ等へ出力される信号なども与えられている。また、部品供給装置7は、供給装置コントローラ18によって制御される。尚、図8と同様の制御系の構成は、例えば特許文献1に開示されている。
FIG. 12 schematically shows the configuration of a control system that conventionally controls the production line 1 as described above. That is, the robot 3 is controlled by a dedicated robot controller 12, and the conveyor 2 is controlled by a motion controller 13. The processing machine 4 is controlled by a processing machine control device 14.
These controllers 12 to 14 are generally controlled by a programmable logic controller (PLC) 15. Further, the PLC 15 is input by a camera 16 constituted by, for example, a CCD (Charge Coupled Device) for monitoring a processing state or the like with an image, a visual controller 17 for controlling the camera 16, various sensors 6, and the like. A signal and a signal output to a valve or the like are also given. The component supply device 7 is controlled by a supply device controller 18. The configuration of the control system similar to that in FIG. 8 is disclosed in, for example, Patent Document 1.

近年、製品コスト低減のため、設備コスト低減が強く望まれており、部品費低減や設計・調整工数の低減が必須となっている。コスト低減のためには、ハード的アプローチとして使用部品点数の削減(例えばPLC、視覚装置、操作盤の統合など)が有効である。また、ソフト的アプローチとしては、ソフトの汎用化・標準化(例えば、言語の統一など)が有効である。更に、システム的アプローチとしては、設備内で最も汎用的な装置であるロボットに機能を集約して設備をシンプル化することが有効であろう。   In recent years, in order to reduce product cost, reduction of equipment cost is strongly desired, and reduction of parts cost and design / adjustment man-hours are indispensable. In order to reduce costs, it is effective to reduce the number of parts used (for example, integration of PLC, visual device, operation panel, etc.) as a hardware approach. As a software approach, generalization and standardization of software (for example, language unification) is effective. Furthermore, as a system approach, it would be effective to simplify the facility by consolidating functions into the robot, which is the most general-purpose device in the facility.

ところで、上記のようにロボットコントローラにPLCの設備制御機能を搭載することを想定すると、そのコントローラにおいて、ロボットを含む各制御対象についての制御プログラム、或いは、各機能を実現するための複数の制御プログラムを搭載することになる。その場合、それらのプログラム間においてデータの授受を行うことになる。
例えば、特許文献2には、統合的な制御装置におけるソフトウエア構造として、各ユーザタスクA〜Dにおいてのみ有効であるローカル変数A〜Dと、それらのタスクA〜Dにおいて共通に使用される、即ち何れのタスクからであってもデータの読み書きが可能な変数であるグローバル変数とを使用したものが開示されている。
特開2001−92517号公報 特開平6−301412号公報,図7参照
By the way, assuming that the equipment control function of the PLC is installed in the robot controller as described above, a control program for each control target including the robot or a plurality of control programs for realizing each function in the controller. Will be installed. In that case, data is exchanged between these programs.
For example, in Patent Document 2, as a software structure in an integrated control device, local variables A to D that are valid only in each user task A to D and commonly used in those tasks A to D are used. That is, what uses a global variable which is a variable capable of reading and writing data from any task is disclosed.
JP 2001-92517 A See Japanese Patent Application Laid-Open No. 6-301411, FIG.

しかしながら、特許文献2に開示されているように、何れか2つのプログラム間において共有する変数をグローバル変数として使用した場合には、以下のような問題が発生することが想定される。即ち、上述したように統合的な制御装置を構成した場合は、多くのプログラムモジュールも一纏まりに搭載されることになる。そして、各プログラムモジュールは、複数の作成者によってコーディングされるが、その場合、プログラム間で使用されていたグローバル変数の名称が、重複するおそれがある。   However, as disclosed in Patent Document 2, when a variable shared between any two programs is used as a global variable, the following problem is assumed to occur. That is, when an integrated control device is configured as described above, many program modules are also loaded together. Each program module is coded by a plurality of creators. In this case, there is a possibility that the names of global variables used between programs overlap.

また、例えば製造ラインの変更により制御対象の一部が入れ替わるなどした場合は、それに伴い制御装置のプログラムの一部を変更する必要があるが、その際には、前記制御装置が変更前に使用していたプログラムの一部も変更することになる。その場合も、新たに作成したプログラム内で使用したグローバル変数名が、作成済のプログラム内で使用されているグローバル変数の名称が重複することがある。   In addition, for example, when a part of the control target is changed due to a change in the production line, it is necessary to change a part of the program of the control device accordingly. In that case, the control device is used before the change. A part of the program that had been changed will also be changed. Even in this case, the name of the global variable used in the newly created program may overlap with the name of the global variable used in the already created program.

更に、図13にはより具体的な例を示す。既存の設備Xにおいては、ロボットXのプログラム(AX1,AX2)間で共通するグローバル変数と、搬送装置Xのプログラム(BX1、BX2)間で共通するグローバル変数とを使い分けており、もう1つの既存の設備Y側においても、グローバル変数を同様に使用していたとする。そして、これらで使用されていたロボットXのプログラム(AX1,AX2)、搬送装置(コンベア)Yのプログラム(BY1、BY2)とを、新たな設備Zのプログラムに転用する場合を想定すると、グローバル変数の名称が重複することで、両者に割り当てていた領域のアドレスが干渉することも考えられる。以上のような場合には、変数名を変更する処置が必要となる。   FIG. 13 shows a more specific example. In the existing facility X, the global variable common between the programs (AX1, AX2) of the robot X and the global variable common between the programs (BX1, BX2) of the transfer device X are separately used. It is assumed that the global variable is used in the same way on the equipment Y side. Assuming that the program (AX1, AX2) of the robot X and the program (BY1, BY2) of the transfer device (conveyor) Y used in these are transferred to the program of the new equipment Z, the global variable It can be considered that the addresses of the areas assigned to both interfere with each other due to overlapping names. In such cases, it is necessary to change the variable name.

変数名の変更は、プログラムの細部を理解した上で行う必要があるため非常に面倒である。また、一部の変更を忘れても気付きにくくデバッグを繰り返すこともあり、プログラムの転用を効率よく行うことができないという問題がある。
本発明は上記事情に鑑みてなされたものであり、その目的は、1つ以上の工業用ロボットを含む複数の制御対象機器を統括的に制御する制御装置について、制御対象の一部が変更された場合でも、既存のプログラムを容易に転用して対応することが可能となるプログラム作成装置,及び前記制御装置,並びにそれらの装置を構成するCPUによって実行されるコンピュータプログラムを提供することにある。
Changing variable names is very troublesome because it is necessary to understand the details of the program. In addition, even if you forget some changes, it is difficult to notice, and debugging may be repeated, and there is a problem that the program cannot be diverted efficiently.
The present invention has been made in view of the above circumstances, and the object of the present invention is to change a part of the control target for a control apparatus that comprehensively controls a plurality of control target devices including one or more industrial robots. Even in such a case, the present invention is to provide a program creation device that can easily adapt an existing program and a computer program that is executed by the control device and a CPU that constitutes the device.

請求項1記載のプログラム作成装置によれば、プログラム管理手段は、プログラム記憶手段に記憶される複数の制御プログラムを共通する属性毎にグループにまとめ、プログラム全体を複数のグループに分けて管理する。そして、変数管理手段は、変数記憶手段に記憶される複数の変数を、ユーザの指定に応じて、各制御プログラム内だけ有効となるローカル変数群と、プログラム管理手段によって管理されるグループ内だけ有効となるグループ変数群とに分けて管理する。   According to the program creation device of the first aspect, the program management means collects a plurality of control programs stored in the program storage means into groups for each common attribute, and manages the whole program by dividing it into a plurality of groups. Then, the variable management means is configured to make a plurality of variables stored in the variable storage means effective only in each control program and only in a group managed by the program management means in accordance with a user designation. It is divided and managed as a group variable group.

即ち、複数のプログラム間で共通に参照可能な変数の有効範囲を、プログラム管理手段によって管理される制御プログラムのグループ内に限定することができる。従って、従来のようにグローバル変数を使用する場合とは異なり、複数のプログラムを多数のプログラマが作成する場合でも、共通変数の名称を作成段階で管理して重複することを回避する必要がなくなる。また、制御対象機器の変更などに応じて、既存のプログラムを流用したり或いはプログラムの一部を変更することで新たな構成に対応した制御プログラム群を用意する場合も、同様に共通変数の重複が問題にならなくなる。   That is, the effective range of variables that can be commonly referred to among a plurality of programs can be limited to a group of control programs managed by the program management means. Therefore, unlike the conventional case where global variables are used, even when a large number of programmers create a plurality of programs, it is not necessary to manage the names of common variables at the creation stage to avoid duplication. Similarly, when a control program group corresponding to a new configuration is prepared by diverting an existing program or changing a part of the program in accordance with a change in the control target device, the duplication of common variables is similarly performed. Is no longer a problem.

請求項2記載のプログラム作成装置によれば、変数管理手段は、入れ子構造に階層化された複数のグループ内の上位グループで定義されたグループ変数群に属する変数は、当該上位グループ及びその下位グループ内の制御プログラムでも参照可能となるように管理する。従って、共通変数の参照可能範囲をより柔軟に設定することができる。   According to the program creation device of claim 2, the variable management means includes a variable belonging to the group variable group defined by the upper group in the plurality of groups hierarchized in the nested structure, the upper group and its lower group. It is managed so that it can be referred to in the control program inside. Therefore, the referenceable range of the common variable can be set more flexibly.

請求項3記載の制御装置によれば、変数管理手段は、プログラム実行手段による実行の過程において、使用される変数が何れの変数群に属しているかを判定し、その判定結果に応じて、変数記憶手段における対応する変数群領域にて変数値を管理する。従って、請求項1又は2記載のプログラム作成装置によって作成された制御プログラムを、ローカル変数,グループ変数を機能通りに使い分けて実行することができる。   According to the control device of claim 3, the variable management means determines in which variable group the variable to be used belongs in the course of execution by the program execution means, and the variable is determined according to the determination result. Variable values are managed in the corresponding variable group area in the storage means. Therefore, the control program created by the program creation device according to claim 1 or 2 can be executed by properly using local variables and group variables according to functions.

請求項4記載の制御装置によれば、請求項1記載のプログラム作成装置の機能と、請求項2記載の制御装置の機能とを併せ持つので、制御装置単体によって、制御プログラムを実行可能な形式に変換してプログラム管理及び変数管理を行い、且つ、変換したプログラムを実行することが可能となる。
請求項5記載の制御装置によれば、請求項4記載の制御装置に対して、請求項2記載のプログラム作成装置と同様の機能を付与することができる。
According to the control device of claim 4, since it has both the function of the program creation device of claim 1 and the function of the control device of claim 2, the control device can be executed in a format that can be executed by a single control device. It is possible to perform program management and variable management after conversion, and to execute the converted program.
According to the control device according to claim 5, the same function as the program creation device according to claim 2 can be given to the control device according to claim 4.

(第1実施例)
以下、本発明の第1実施例について図1乃至図8を参照して説明する。尚、図11及び図12と同一部分には同一符号を付して説明を省略し、以下異なる部分についてのみ説明する。図1は、図11に示す生産ライン1と同様の構成を制御対象機器として、それらを本発明のセル設備制御装置(プログラム作成装置)21によって制御する場合の構成を機能ブロック図で示すものである。尚、「セル」とは、生産ライン1のようにロボット3を中心として構成される一纏まりの加工処理を行なう単位を言う。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. The same parts as those in FIGS. 11 and 12 are denoted by the same reference numerals, description thereof is omitted, and only different parts will be described below. FIG. 1 is a functional block diagram showing a configuration in the case where the same configuration as that of the production line 1 shown in FIG. 11 is controlled and controlled by the cell facility control device (program creation device) 21 of the present invention. is there. Note that “cell” refers to a unit for performing a batch of processing processes centered on the robot 3 as in the production line 1.

セル設備制御装置21は、コントローラ12,13,17及びPLC15に代わり、生産ライン1を構成するコンベア2,ロボット3,加工機4,部品供給装置7,カメラ16,IDタグのリーダライタ19などを制御対象機器として統括的に制御するコントローラである。また、セル設備制御装置21には、ティーチングペンダント22やパーソナルコンピュータ(PC)23が接続されており、ユーザは、これらを介して制御プログラムの作成を行ったり、入力操作や動作状況のモニタなどを行なうようになっている。   The cell equipment control device 21 includes a conveyor 2, a robot 3, a processing machine 4, a component supply device 7, a camera 16, an ID tag reader / writer 19 and the like constituting the production line 1 instead of the controllers 12, 13, 17 and the PLC 15. It is a controller that performs overall control as a control target device. In addition, a teaching pendant 22 and a personal computer (PC) 23 are connected to the cell facility control device 21, and a user can create a control program, monitor an input operation, an operation status, and the like via these. To do.

更に、セル設備制御装置21は、具体的には図示しないが、CPUやメモリ,ハードディスク,I/Oなどから構成されている。そして、図1では、セル設備制御装置21の内部機能をブロック化して示しているが、これらは上記のハードウエアとソフトウエアとによって実現される機能である。更にまた、セル設備制御装置21は、各制御対象機器を統括的に制御するのみならず、その制御を行うためのプログラムを作成する機能をも備えている。   Furthermore, although not specifically shown, the cell facility control device 21 includes a CPU, a memory, a hard disk, an I / O, and the like. In FIG. 1, the internal functions of the cell facility control device 21 are shown as blocks. These are functions realized by the hardware and software described above. Furthermore, the cell facility control device 21 has not only the overall control of each control target device but also a function of creating a program for performing the control.

以下、セル設備制御装置21の構成について説明する。セル設備制御装置21は、ティーチングペンダント22やパーソナルコンピュータ23とはマンマシンI/F(インターフェイス)通信部24を介して例えばシリアル通信を行うようになっている。マンマシンI/F通信部24を介して受信したデータは、データ管理部25に与えられる。プログラム作成部(プログラム作成手段)26はプログラムエディタであり、ユーザは、セル設備制御装置21側のプログラム作成部26を起動して、プログラムの作成を行なうことも可能である。   Hereinafter, the configuration of the cell facility control device 21 will be described. The cell facility control device 21 performs serial communication with the teaching pendant 22 and the personal computer 23 via a man-machine I / F (interface) communication unit 24, for example. Data received via the man-machine I / F communication unit 24 is given to the data management unit 25. The program creation unit (program creation means) 26 is a program editor, and the user can also activate the program creation unit 26 on the cell facility control device 21 side to create a program.

コンパイル部(プログラム変換手段,コンピュータプログラム)27は、プログラム作成部26において作成されたプログラムを、プログラム実行部(プログラム実行手段,コンピュータプログラム)28が直接実行可能な形式(オブジェクト)に変換(コンパイル)するものである。プログラム管理部(プログラム管理手段,コンピュータプログラム)29は、コンパイル部27が変換を行う過程において、各制御プログラムを、ユーザの指定に応じたプログラムグループ(PG)に分類し、メモリ30のプログラム記憶領域(プログラム記憶手段)31に配置するようになっている。   The compiling unit (program conversion means, computer program) 27 converts (compiles) the program created by the program creation unit 26 into a format (object) that can be directly executed by the program execution unit (program execution means, computer program) 28. To do. A program management unit (program management means, computer program) 29 classifies each control program into a program group (PG) according to a user's designation in the process of conversion by the compiling unit 27, and a program storage area in the memory 30. (Program storage means) 31 is arranged.

また、変数管理部(変数管理手段,コンピュータプログラム)32も、コンパイル部27が変換を行う過程において、各制御プログラム中で定義されている変数の属性に応じて、各変数をグローバル/グループ/ローカルの変数領域33〜35に分類し、メモリ30の変数記憶領域(変数記憶手段)36に配置するようになっている。尚、この変数記憶領域36には、プログラムを実行することで各変数を介して読書きされたデータ値も格納されるようになっており、プログラムの実行時には、変数記憶領域36が参照される。   In addition, the variable management unit (variable management means, computer program) 32 also sets each variable globally / group / locally according to the attribute of the variable defined in each control program in the process in which the compiling unit 27 performs conversion. Are arranged in the variable storage area (variable storage means) 36 of the memory 30. The variable storage area 36 also stores data values read and written through each variable by executing the program, and the variable storage area 36 is referred to when the program is executed. .

ここで、プログラムグループとしては、制御対象機器の種類に応じてロボット制御PG37,搬送装置制御PG38,部品供給制御PG39,ID読書き制御PG40,加工機I/F制御PG41,視覚装置制御PG42などに分類される。即ち、これらのプログラムグループは、基本的に同種類の制御対象機器を制御するためのプログラムモジュールの集合である。尚、具体的には図示しないが、全体を統括的に制御するためのメインプログラムは別に存在しており、上記のプログラムグループ37〜42に属するプログラムは、メインプログラムを実行する際に必要に応じて呼び出され、サブルーチン的に利用されるようになっている。   Here, the program group includes a robot control PG 37, a transport device control PG 38, a component supply control PG 39, an ID read / write control PG 40, a processing machine I / F control PG 41, a visual device control PG 42, and the like according to the type of control target device. being classified. That is, these program groups are basically a set of program modules for controlling the same type of control target device. Although not specifically shown, there is a separate main program for overall control of the entire program, and the programs belonging to the program groups 37 to 42 are necessary when executing the main program. Is called and used as a subroutine.

プログラム実行部28は、制御プログラムを実行する場合には、プログラム管理部29を介してメモリ30より実行対象のプログラムを読み出して実行する。その際には、変数管理部32を介して各プログラム中で使用されている変数の属性を判別して実行するようになっている。プログラム実行部28がロボット制御PG37に属するプログラムを実行すると、ロボット制御部43を介してロボット3が制御される。また、プログラム実行部28がその他のPG38〜42に属するプログラムを実行すると、外部機器通信部44を介してコンベア2や部品供給装置7等が制御される。   When executing the control program, the program execution unit 28 reads the execution target program from the memory 30 via the program management unit 29 and executes it. In that case, the variable management unit 32 is used to determine and execute the attribute of the variable used in each program. When the program execution unit 28 executes a program belonging to the robot control PG 37, the robot 3 is controlled via the robot control unit 43. When the program execution unit 28 executes other programs belonging to the PGs 38 to 42, the conveyor 2, the component supply device 7, and the like are controlled via the external device communication unit 44.

尚、上記構成において、セル設備制御装置21の制御プログラムは、例えば、パーソナルコンピュータ23において作成されてコンパイルされる場合も想定している。即ち、セル設備制御装置21のコンパイル部27,プログラム管理部29及び変数管理部32の機能をパーソナルコンピュータ23側に搭載しておけば、同様の形態でプログラム作成が可能である。その場合には、パーソナルコンピュータ23よりマンマシンI/F通信部24を介して実行形式のプログラムがセル設備制御装置21側に転送され、メモリ30のプログラム記憶領域31に記憶される。また、コンパイルされた結果として管理されるプログラム中の各変数は、変数記憶領域36に記憶される。   In the above configuration, it is assumed that the control program of the cell facility control device 21 is created and compiled in the personal computer 23, for example. That is, if the functions of the compiling unit 27, the program management unit 29, and the variable management unit 32 of the cell facility control device 21 are installed on the personal computer 23 side, a program can be created in the same manner. In that case, the execution format program is transferred from the personal computer 23 to the cell facility control apparatus 21 via the man-machine I / F communication unit 24 and stored in the program storage area 31 of the memory 30. Each variable in the program managed as a result of compilation is stored in the variable storage area 36.

次に、本実施例の作用について図2乃至図6も参照して説明する。図2には、ユーザがセル設備制御装置21側のプログラム作成部26を起動して、制御プログラムを作成する場合に、変数の定義を行う手順を説明するためのフローチャートである。ユーザは、作成中のプログラム内で使用する変数が、全てのプログラムで共通に使用する変数か否かを判断し(ステップA1)、共通に使用する変数であれば(「YES」)、定義済みのグローバル変数を利用する(ステップA4)。ステップA4の実行後はステップA11に移行する。即ち、これは従来より使用されているグローバル変数である。   Next, the operation of the present embodiment will be described with reference to FIGS. FIG. 2 is a flowchart for explaining a procedure for defining variables when the user activates the program creation unit 26 on the cell facility control device 21 side to create a control program. The user determines whether or not the variable used in the program being created is a variable that is commonly used in all programs (step A1). Are used (step A4). After execution of step A4, the process proceeds to step A11. That is, this is a global variable used conventionally.

一方、ステップA1において、対象となる変数が全プログラムで共通に使用されるものでない場合は(「NO」)、プログラムがグループ化されているか否かを判断する(ステップA5)。グループ化されている場合は(「YES」)、当該変数が、作成中のプログラムが属するグループ内で共通に使用する変数か否かを判断し(ステップA6)、共通に使用する変数であれば(「YES」)、当該変数が、前記グループに属する他のプログラムにおいて既に定義済みか否かを判断する(ステップA7)。そして、定義済みでなければ(「NO」)当該変数をグループ変数として定義し(ステップA8)、定義済みであれば(「YES」)、定義済みのグループ変数の利用を宣言する(ステップA9)。ステップA8,A9の実行後はステップA11に移行する。   On the other hand, if the target variable is not commonly used in all programs (“NO”) in step A1, it is determined whether the programs are grouped (step A5). If it is grouped (“YES”), it is determined whether or not the variable is a variable that is commonly used in the group to which the program being created belongs (step A6). ("YES"), it is determined whether or not the variable has already been defined in another program belonging to the group (step A7). If not defined ("NO"), the variable is defined as a group variable (step A8). If defined ("YES"), the use of the defined group variable is declared (step A9). . After execution of steps A8 and A9, the process proceeds to step A11.

また、ステップA5又はA6で「NO」と判断した場合は、当該変数は作成中のプログラムにおいてのみ有効なローカル変数として定義する(ステップA10)。それから、次に使用する変数があるかどうかを判断し(ステップA11)、変数があれば(「YES」)ステップA1に戻り、変数がなければ(「NO」)終了する。   If “NO” is determined in step A5 or A6, the variable is defined as a local variable effective only in the program being created (step A10). Then, it is determined whether there is a variable to be used next (step A11). If there is a variable ("YES"), the process returns to step A1, and if there is no variable ("NO"), the process is terminated.

例えば、プログラム中において、ローカル,グループの各変数をAA,BBとすると、夫々以下のように記述することで定義する。
ローカル変数 : DEFINT AA
グループ変数 : GROUP DEFINT BB
また、ステップA9において、上記の変数BBのように定義済みのグループ変数の利用を宣言する場合には、例えば、以下のように記述する。
EXTERN DEFINT BB
以上のように変数を定義して記述された各制御プログラムは、メモリ30のプログラム記憶領域31に配置される。
For example, if local and group variables are AA and BB in the program, they are defined by describing them as follows.
Local variable: DEFINT AA
Group variable: GROUP DEFINT BB
In step A9, when declaring the use of a predefined group variable such as the above variable BB, for example, it is described as follows.
EXTERN DEFINT BB
Each control program described by defining variables as described above is arranged in the program storage area 31 of the memory 30.

次に、図3は、ユーザが記述作成したプログラムを、コンパイル部27によって実行形式に変換する場合に、変数管理部32が行う変数管理処理の内容を示すフローチャートである。変数管理部32は、ステップB1,B2において変数がグローバル変数,グループ変数の何れであるかを判断する。グローバル変数であれば(ステップB1,「YES」)、当該変数を変数記憶領域36のグローバル変数領域33に登録すると共に、グローバル変数の識別コードを割り当てる(ステップB5)。また、グループ変数であれば(ステップB2,「YES」)、当該変数を、変数記憶領域36において所属しているプログラムグループの変数領域34に登録すると共に、グループ変数の識別コードを割り当てる(ステップB6)。尚、ステップB5,B6の実行後はステップB4に移行する。   Next, FIG. 3 is a flowchart showing the contents of variable management processing performed by the variable management unit 32 when a program created by the user is converted into an execution format by the compiling unit 27. The variable management unit 32 determines whether the variable is a global variable or a group variable in steps B1 and B2. If it is a global variable (step B1, “YES”), the variable is registered in the global variable area 33 of the variable storage area 36, and an identification code of the global variable is assigned (step B5). If it is a group variable (step B2, “YES”), the variable is registered in the variable area 34 of the program group to which the variable storage area 36 belongs, and an identification code of the group variable is assigned (step B6). ). In addition, after execution of steps B5 and B6, the process proceeds to step B4.

また、変数がグローバル変数,ローカル変数の何れでもない場合は(ステップB2,「NO」)、当該変数はローカル変数であるから、変数記憶領域36において所属しているプログラムのローカル変数領域35に登録すると共に、ローカル変数の識別コードを割り当てる(ステップB3)。それから、次に宣言されている変数があれば(ステップB4,「YES」)ステップB1に戻り、変数がなければ(「NO」)処理を終了する。   If the variable is neither a global variable nor a local variable (step B2, “NO”), since the variable is a local variable, it is registered in the local variable area 35 of the program belonging to the variable storage area 36. At the same time, an identification code of a local variable is assigned (step B3). Then, if there is a variable declared next (step B4, “YES”), the process returns to step B1, and if there is no variable (“NO”), the process is terminated.

次に、図4は、プログラム実行部28が実行形式に変換されたプログラムを実行する場合に、変数管理部32によって行われる変数処理の内容を示すフローチャートである。プログラム実行部28は、1行分の識別コードを認識すると(ステップC1)、変数コードがあるか否かを判断する(ステップC2)。変数コードでなければ(「NO」)、その他のコードについての判断を行い(ステップC7)、ステップC6に移行する。   Next, FIG. 4 is a flowchart showing the contents of variable processing performed by the variable management unit 32 when the program execution unit 28 executes a program converted into an execution format. When recognizing the identification code for one line (step C1), the program execution unit 28 determines whether there is a variable code (step C2). If it is not a variable code ("NO"), a determination is made for other codes (step C7), and the process proceeds to step C6.

変数コードであれば(ステップC2,「YES」)、先ず当該変数がグローバル変数かどうか判断し(ステップC3)、グローバル変数であれば(「YES」)、変数記憶領域36のグローバル変数領域33より、当該変数に応じたデータを取得する(ステップC8)。また、当該変数がグローバル変数ではなくグループ変数であれば(ステップC4,「YES」)、変数記憶領域36のグループ変数領域34より、当該変数に応じたデータを取得する(ステップC9)
また、当該変数がグループ変数でなければ(ステップC4,「NO」)ローカル変数であるから、変数記憶領域36のローカル変数領域35より、当該変数に応じたデータを取得する(ステップC5)。それから、次の識別コードがあれば(ステップC6,「YES」)ステップC1に戻り、識別コードがなければ(「NO」)処理を終了する。
If it is a variable code (step C2, “YES”), it is first determined whether or not the variable is a global variable (step C3). If it is a global variable (“YES”), it is determined from the global variable area 33 in the variable storage area 36. Then, data corresponding to the variable is acquired (step C8). If the variable is not a global variable but a group variable (step C4, “YES”), data corresponding to the variable is obtained from the group variable area 34 of the variable storage area 36 (step C9).
Since the variable is not a group variable (step C4, “NO”), it is a local variable, and therefore data corresponding to the variable is obtained from the local variable area 35 of the variable storage area 36 (step C5). Then, if there is a next identification code (step C6, “YES”), the process returns to step C1, and if there is no identification code (“NO”), the process is terminated.

図5は、プログラムグループのイメージと、プログラムソースの具体的な記述例を示す。LIB1,LIB2は夫々独立したプログラムグループであり、LIB1内のプログラムSUB1内においてグループ変数BBが定義され、同グループ内のプログラムSUB2内では、「EXTERN」により前記グループ変数BBの利用を宣言している。また、LIB2内のプログラムSUB12,SUB22間においても同様にグループ変数BBが定義されているが、夫々のグループ内でのみ有効な変数であるから名称が重複していても何等問題はない。   FIG. 5 shows an image of the program group and a specific description example of the program source. LIB1 and LIB2 are independent program groups, a group variable BB is defined in the program SUB1 in LIB1, and the use of the group variable BB is declared by “EXTRN” in the program SUB2 in the same group. . The group variable BB is similarly defined between the programs SUB12 and SUB22 in the LIB 2, but there is no problem even if the names are duplicated because the variables are valid only in each group.

図6は、グループ変数の具体的な使用例を示すものである。図6において、カメラ16についてのプログラムグループである視覚装置制御PG42に、自動運転プログラム42A,操作盤プログラム42Bがあるとする。自動運転プログラム42Aでは、ワークを検出すると、セル設備制御装置21がリードコマンドをカメラ16に発行し、カメラ16の計測データを取得する。ここでは例えば、ワークに印字されている文字を検査するため、マスタ文字(基準となる文字位置)とのX,Y座標のずれ量と回転角度を取得する。そして、自動運転プログラム42Aは、取得した計測データを、視覚装置制御PG42に対応するグループ変数領域34に格納する。
上記の処理が行われた後に、操作盤プログラム42Bが起動され、ティーチングペンダント22の操作盤画面において上記計測データを表示する必要がある場合、操作盤プログラム42Bは、上記グループ変数領域34におけるグループ変数を参照して、ティーチングペンダント22の画面に計測データを表示する。
FIG. 6 shows a specific use example of the group variable. In FIG. 6, it is assumed that the visual device control PG 42 which is a program group for the camera 16 includes an automatic driving program 42A and an operation panel program 42B. In the automatic operation program 42 </ b> A, when a workpiece is detected, the cell facility control device 21 issues a read command to the camera 16 and acquires measurement data of the camera 16. Here, for example, in order to inspect the character printed on the workpiece, the deviation amount and rotation angle of the X and Y coordinates from the master character (reference character position) are acquired. Then, the automatic driving program 42A stores the acquired measurement data in the group variable area 34 corresponding to the visual device control PG42.
After the above processing is performed, when the operation panel program 42B is activated and it is necessary to display the measurement data on the operation panel screen of the teaching pendant 22, the operation panel program 42B displays the group variable in the group variable area 34. The measurement data is displayed on the screen of the teaching pendant 22 with reference to FIG.

また、図7は、ローカル/グループ/グローバルの各変数の関係を、モデル的に示すものである。ここではA,B,Cの3つのプログラムグループがあり、各グループには、夫々2つのプログラム(A1,A2),(B1,B2),(C1,C2)が属している。この場合、ローカル変数は、各プログラムA1〜C2の夫々においてのみ参照される変数であり、グループ変数は、各プログラムグループA,B,Cの夫々において共通に参照される変数である。そして、グローバル変数は、全てのプログラムA1〜C2により共通に参照される変数である。   FIG. 7 shows the relationship between local / group / global variables as a model. Here, there are three program groups A, B, and C, and two programs (A1, A2), (B1, B2), and (C1, C2) belong to each group. In this case, the local variable is a variable that is referred to only in each of the programs A1 to C2, and the group variable is a variable that is commonly referred to in each of the program groups A, B, and C. The global variable is a variable commonly referred to by all the programs A1 to C2.

更に、図8は、図13相当図であり、2つの既存設備X,Yにおいて使用していたプログラムを転用して、新たな設備Zにて使用するプログラムを作成する場合を示す。この場合、ロボットXのプログラム(AX1,AX2)間で共通するグループ変数と、搬送装置Yのプログラム(BY1、BY2)間で共通するグループ変数とは、夫々のプログラムグループ内でのみ有効であるから、新たな設備Zに転用した場合でも、図13に示すケースのように変数に割り当てていた領域のアドレスが干渉することはない。   Further, FIG. 8 is a view corresponding to FIG. 13 and shows a case where a program used in the new equipment Z is created by diverting the program used in the two existing equipments X and Y. In this case, the group variable common between the programs (AX1, AX2) of the robot X and the group variable common between the programs (BY1, BY2) of the transfer device Y are effective only within each program group. Even when diverted to a new facility Z, the address of the area assigned to the variable does not interfere as in the case shown in FIG.

以上のように本実施例によれば、セル設備制御装置21のプログラム管理部29は、プログラム記憶領域32に記憶される複数の制御プログラムを共通する属性毎にグループにまとめ、プログラム全体を複数のグループに分けて管理する。そして、変数管理部32は、変数記憶領域36に記憶される複数の変数を、ユーザの指定に応じて、各制御プログラム内だけ有効となるローカル変数群と、プログラム管理部によって管理されるグループ内だけ有効となるグループ変数群とに分けて管理する。   As described above, according to the present embodiment, the program management unit 29 of the cell facility control apparatus 21 groups a plurality of control programs stored in the program storage area 32 into groups for each common attribute, Manage in groups. Then, the variable management unit 32 stores a plurality of variables stored in the variable storage area 36 according to the user's specification, a local variable group that is valid only in each control program, and a group managed by the program management unit. Only the group variables that are valid are managed separately.

即ち、複数のプログラム間で共通に参照可能な変数の有効範囲を、プログラム管理部29によって管理される制御プログラムのグループ内に限定することができる。従って、従来のようにグローバル変数を使用する場合とは異なり、複数のプログラムを多数のプログラマが作成する場合でも、グループ変数の名称を作成段階で管理して重複することを回避する必要がなくなる。また、制御対象機器の変更などに応じて、既存のプログラムを流用したり或いはプログラムの一部を変更することで新たな構成に対応した制御プログラム群を用意する場合も、同様に共通変数の重複が問題にならなくなる。従って、プログラムの作成効率、或いは既存のプログラムを転用する場合の作業効率を大きく向上させることができる。   That is, the effective range of variables that can be commonly referred to among a plurality of programs can be limited to a group of control programs managed by the program management unit 29. Therefore, unlike the conventional case where global variables are used, even when a large number of programmers create a plurality of programs, it is not necessary to manage the names of group variables at the creation stage to avoid duplication. Similarly, when a control program group corresponding to a new configuration is prepared by diverting an existing program or changing a part of the program in accordance with a change in the control target device, the duplication of common variables is similarly performed. Is no longer a problem. Therefore, it is possible to greatly improve the efficiency of creating a program or the work efficiency when diverting an existing program.

即ち、グローバル変数はシステム側で定義されており、変数の各データ型に対応する宣言数はパラメータで決まっており、ある範囲を持つ。また、各プログラマが制御プログラムを作成する場合、管理が容易となるようにグローバル変数を連続的に取るケースが殆どである。そのため、限定されたグローバル変数領域を複数のプログラムが使用する場合、図13に示したような干渉が発生する可能性がある。   That is, the global variable is defined on the system side, and the number of declarations corresponding to each data type of the variable is determined by the parameter and has a certain range. In addition, when each programmer creates a control program, in most cases, global variables are taken continuously so as to facilitate management. Therefore, when a plurality of programs use a limited global variable area, interference as shown in FIG. 13 may occur.

これに対して、グループ変数は、グループ変数領域34内において(図1では1つにまとめられているが)所属するプログラムグループ毎に格納される。従って、異なるグループ変数については同じパス(プログラムグループのルートからのアドレス)が存在せず、[ルート→所属プログラムグループ→グループ変数名]が1対1で決まることになるため、変数間の干渉が発生しないのである。   On the other hand, the group variable is stored for each program group to which the group variable belongs in the group variable area 34 (although it is grouped into one in FIG. 1). Therefore, the same path (address from the root of the program group) does not exist for different group variables, and [root → affiliated program group → group variable name] is determined on a one-to-one basis. It does not occur.

また、変数管理部32は、プログラム実行部28による実行の過程において、使用される変数が何れの変数群に属しているかを判定し、その判定結果に応じて、変数記憶領域36における対応する変数群領域にて変数値を管理するので、ローカル変数,グループ変数を機能通りに使い分けて制御プログラムを実行することができる。そして、セル設備制御装置21によれば、当該制御装置21単体によって、制御プログラムを実行可能な形式に変換してプログラム管理及び変数管理を行い、且つ、変換したプログラムを実行することが可能となる。   In addition, the variable management unit 32 determines which variable group the variable to be used belongs to in the course of execution by the program execution unit 28, and according to the determination result, the corresponding variable in the variable storage area 36 Since the variable values are managed in the group area, it is possible to execute the control program by properly using local variables and group variables according to their functions. And according to the cell equipment control apparatus 21, it becomes possible to perform the program management and the variable management by converting the control program into an executable format by the control apparatus 21 alone, and to execute the converted program. .

(第2実施例)
図9及び図10は本発明の第2実施例を示すものであり、第1実施例と同一部分には同一符号を付して説明を省略し、以下異なる部分についてのみ説明する。第2実施例では、プログラムグループを入れ子構造に階層化して定義することを可能としており、それに伴って、グループ変数についても、階層化されている上位グループと下位グループとの間において有効となるようにしたものである。
(Second embodiment)
9 and 10 show a second embodiment of the present invention. The same parts as those in the first embodiment are denoted by the same reference numerals and the description thereof is omitted, and only different parts will be described below. In the second embodiment, it is possible to define program groups by nesting them in a nested structure, and accordingly, group variables are also effective between the upper and lower groups that are hierarchized. It is a thing.

即ち、図9に示すように、上位のプログラムグループAに対して、下位のプログラムグループB,C,Dが属するように定義されている。この場合、グループ変数GB,GC,GDは、第1実施例と同様に夫々のプログラムグループB,C,D内に属するプログラム間でのみ有効な変数である。これに対してグループ変数GXは、プログラムグループA,B,Cの何れかに属するプログラム間でも有効となるものである。   That is, as shown in FIG. 9, the lower program groups B, C, and D are defined to belong to the upper program group A. In this case, the group variables GB, GC, GD are effective only between programs belonging to the respective program groups B, C, D as in the first embodiment. On the other hand, the group variable GX is effective between programs belonging to any of the program groups A, B, and C.

図10は、第1実施例における図3のコンパイル処理時において、変数管理部32がステップB6にて行う処理を示すフローチャートである。変数管理部32は、先ず、変換対象のプログラム内に「EXTERN」宣言があるか否かを判断する(ステップD1)。「EXTERN」宣言がなければ(「NO」)グループ変数を使用していないということであるから処理を終了する。   FIG. 10 is a flowchart showing the process performed by the variable management unit 32 in step B6 during the compilation process of FIG. 3 in the first embodiment. The variable management unit 32 first determines whether or not there is an “EXTERN” declaration in the program to be converted (step D1). If there is no “EXTERN” declaration (“NO”), it means that the group variable is not used, and the process ends.

ステップD1において「EXTERN」宣言があれば(「YES」)、同じグループ内の他のファイル(プログラムファイル)を開き(ステップD2)、そのプログラム内に「GROUP」宣言があるかどうかを判断する(ステップD3)。「GROUP」宣言がなければ(「NO」)同じグループ内の他のファイルがあるかどうかを判断し(ステップD4)、ファイルがあれば(「YES」)そのファイルについてステップD2,D3の処理を行なう。   If there is an “EXTERN” declaration in step D1 (“YES”), another file (program file) in the same group is opened (step D2), and it is determined whether there is a “GROUP” declaration in the program (step D2). Step D3). If there is no “GROUP” declaration (“NO”), it is determined whether or not there is another file in the same group (step D4). If there is a file (“YES”), the processing of steps D2 and D3 is performed for that file. Do.

一方、ステップD4において、同じグループ内の他のファイルがなければ(「NO」)、変数管理部32は、当該グループの上位にグループが定義されているかどうかを判断する(ステップD5)。上位グループが存在すれば(「YES」)その上位グループに移動して(ステップD6)、上位グループ内のファイルについてステップD2,D3の処理を行なう。また、この時点で上位グループが存在しない場合は(「NO」)、「EXTERN」宣言のみが存在し、「GROUP」宣言が存在しないというプログラムミスであるから、コンパイルエラーとして異常処理を行なう(ステップD9)。   On the other hand, in step D4, if there is no other file in the same group (“NO”), the variable management unit 32 determines whether a group is defined above the group (step D5). If the upper group exists (“YES”), the process moves to the upper group (step D6), and the processes in steps D2 and D3 are performed on the files in the upper group. If the upper group does not exist at this time (“NO”), only the “EXTERN” declaration exists and the “GROUP” declaration does not exist. D9).

以上の処理において何れかのファイル内に「GROUP」宣言が存在すれば、(ステップD3,「YES」)「EXTERN」宣言された変数と「GROUP」宣言された変数との名称が同じか否かを判断し(ステップD7)、両者が同じであれば(「YES」)それらの変数同士を関連づける処理を行い(ステップD8)、ステップD1に戻る。また、両変数名が異なる場合は(「NO」)ステップD4に移行する。   If there is a “GROUP” declaration in any file in the above processing (step D3, “YES”), whether or not the name of the variable declared “EXTERN” and the variable declared “GROUP” are the same. (Step D7), if both are the same ("YES"), a process of associating those variables is performed (step D8), and the process returns to step D1. If the variable names are different ("NO"), the process proceeds to step D4.

以上のように第2実施例によれば、変数管理部32は、入れ子構造に階層化された複数のグループ内の上位グループで定義されたグループ変数群に属する変数は、当該上位グループ及びその下位グループ内の制御プログラムでも参照可能となるように管理するので、グループ変数の参照可能範囲をより柔軟に設定することができる。   As described above, according to the second embodiment, the variable management unit 32 determines that a variable belonging to a group variable group defined by a higher group in a plurality of groups hierarchized in a nested structure includes the upper group and its lower group. Since it is managed so that it can be referred to even in the control program within the group, the referenceable range of the group variable can be set more flexibly.

本発明は上記し且つ図面に記載した実施例にのみ限定されるものではなく、以下のような変形または拡張が可能である。
制御対象機器は、生産ライン1に限ることなく、少なくとも1つの工業用ロボットを含むものであれば、個別の応用形態に応じて適宜選択を行って実施すれば良い。
グローバル変数は、必要に応じて使用すれば良い。
セル設備制御装置21の制御プログラムをパーソナルコンピュータ23において作成しコンパイルする場合には、セル設備制御装置21側には、プログラム作成部26及びコンパイル部27の機能は不要であり、実行形式に変換されたプログラムを実行するための機能部分だけを備えていれば良い。
プログラムの階層化は、3階層以上行っても良い。
The present invention is not limited to the embodiments described above and shown in the drawings, and the following modifications or expansions are possible.
The device to be controlled is not limited to the production line 1 and may be appropriately selected according to the individual application form as long as it includes at least one industrial robot.
Global variables can be used as needed.
When the control program for the cell facility control device 21 is created and compiled by the personal computer 23, the functions of the program creation unit 26 and the compilation unit 27 are not necessary on the cell facility control device 21 side, and are converted into an execution format. It is only necessary to provide a functional part for executing the program.
The program may be hierarchized in three or more layers.

本発明の第1実施例であり、セル設備制御装置の構成を中心として示す機能ブロック図The functional block diagram which is 1st Example of this invention and shows centering on the structure of a cell equipment control apparatus ユーザが制御プログラムを作成する場合に、変数の定義を行う手順を説明するためのフローチャートFlowchart for explaining the procedure for defining variables when the user creates a control program プログラムをコンパイル部によって実行形式に変換する場合に、変数管理部が行う変数管理処理の内容を示すフローチャートFlowchart showing the contents of variable management processing performed by the variable management unit when the program is converted into an executable format by the compilation unit プログラム実行部が実行形式に変換されたプログラムを実行する場合に、変数管理部によって行われる変数処理の内容を示すフローチャートA flowchart showing the contents of variable processing performed by the variable management unit when the program execution unit executes a program converted into an execution format プログラムソースの具体的な記述例を示す図Figure showing a specific description example of program source グループ変数の具体的な使用例を示す図Figure showing a specific example of using group variables ローカル/グループ/グローバルの各変数の関係を、モデル的に示す図Diagram showing the relationship between local / group / global variables 2つの既存設備X,Yにおいて使用していたプログラムを転用して、新たな設備Zにて使用するプログラムを作成する場合を示す図The figure which shows the case where the program used in the new equipment Z is created by diverting the program used in the two existing equipments X and Y 本発明の第2実施例を示す図7相当図FIG. 7 equivalent diagram showing a second embodiment of the present invention. 図3のコンパイル処理時において、変数管理部がステップB6にて行う処理を示すフローチャートThe flowchart which shows the process which a variable management part performs in step B6 at the time of the compilation process of FIG. コンベアによって搬送されるワークを、工業用ロボットを用いて加工する生産ラインの一構成例を示す斜視図The perspective view which shows one structural example of the production line which processes the workpiece conveyed by the conveyor using an industrial robot 従来の制御系の構成を示す機能ブロック図Functional block diagram showing the configuration of a conventional control system 図8相当図Equivalent to FIG.

符号の説明Explanation of symbols

図面中、2はコンベア(制御対象機器)、3はロボット(工業用ロボット,制御対象機器)、4は加工機(制御対象機器)、7は部品供給装置(制御対象機器)、16はカメラ(制御対象機器)、21はセル設備制御装置、26はプログラム作成部(プログラム作成手段)、27はコンパイル部(プログラム変換手段,コンピュータプログラム)、28はプログラム実行部(プログラム実行手段,コンピュータプログラム)、29はプログラム管理部(プログラム管理手段,コンピュータプログラム)、31はプログラム記憶領域(プログラム記憶手段)、32は変数管理部(変数管理手段)、36は変数記憶領域(変数記憶手段,コンピュータプログラム)を示す。   In the drawings, 2 is a conveyor (control target device), 3 is a robot (industrial robot, control target device), 4 is a processing machine (control target device), 7 is a component supply device (control target device), and 16 is a camera ( Control target equipment), 21 is a cell facility control device, 26 is a program creation unit (program creation unit), 27 is a compilation unit (program conversion unit, computer program), 28 is a program execution unit (program execution unit, computer program), 29 is a program management section (program management means, computer program), 31 is a program storage area (program storage means), 32 is a variable management section (variable management means), and 36 is a variable storage area (variable storage means, computer program). Show.

Claims (10)

1つ以上の工業用ロボットを含む複数の制御対象機器を統括的に制御するように構成される制御装置によって実行される制御プログラムを作成するためのプログラム作成装置において、
ユーザによって作成される複数の制御プログラムを、前記制御装置が備えているプログラム実行手段が直接実行可能となる形式に変換するプログラム変換手段と、
このプログラム変換手段によって変換された制御プログラムが記憶されるプログラム記憶手段と、
このプログラム記憶手段に記憶される複数の制御プログラムを共通する属性毎にグループにまとめ、プログラム全体を複数のグループに分けて管理するプログラム管理手段と、
前記制御プログラムにおいて使用される変数が記憶される変数記憶手段と、
前記複数の変数を、ユーザの指定に応じて、各制御プログラム内だけ有効となるローカル変数群と、前記プログラム管理手段によって管理されるグループ内だけ有効となるグループ変数群とに分けて管理する変数管理手段とを備えたことを特徴とするプログラム作成装置。
In a program creation device for creating a control program executed by a control device configured to centrally control a plurality of control target devices including one or more industrial robots,
A program conversion means for converting a plurality of control programs created by a user into a format that can be directly executed by a program execution means provided in the control device;
Program storage means for storing the control program converted by the program conversion means;
A plurality of control programs stored in the program storage unit are grouped for each common attribute, and a program management unit that manages the entire program divided into a plurality of groups,
Variable storage means for storing variables used in the control program;
Variables for managing the plurality of variables by dividing them into a local variable group that is effective only in each control program and a group variable group that is effective only in a group managed by the program management means, according to the user's specification. A program creation device comprising management means.
前記プログラム管理手段は、前記複数のグループの内、更にユーザによって指定された複数のグループを入れ子構造に階層化して管理可能に構成され、
前記変数管理手段は、前記階層化された複数のグループ内の上位グループにおいて定義されたグループ変数群に属する変数は、当該上位グループ及びその下位グループ内の制御プログラムでも参照可能となるように管理することを特徴とする請求項1記載のプログラム作成装置。
The program management means is configured to be capable of managing a plurality of groups specified by the user in a hierarchy in a nested structure among the plurality of groups,
The variable management means manages a variable belonging to a group variable group defined in a higher group in the plurality of hierarchized groups so that the variable can be referred to in a control program in the higher group and its lower group. The program creation device according to claim 1.
請求項1又は2記載のプログラム作成装置によって作成された制御プログラムを実行する制御装置であって、
前記プログラム変換手段によって変換された状態で、前記プログラム記憶手段及び前記変数記憶手段に記憶されているものと同一の内容が記憶されているプログラム記憶手段及び変数記憶手段と、
これらの記憶手段に記憶されている制御プログラム及び変数を参照して実行するプログラム実行手段と、
前記プログラム実行手段による実行の過程において、使用される変数が何れの変数群に属しているかを判定し、その判定結果に応じて、前記変数記憶手段における対応する変数群領域にて変数値を管理する変数管理手段とを備えたことを特徴とする制御装置。
A control device that executes a control program created by the program creation device according to claim 1 or 2,
Program storage means and variable storage means in which the same contents as those stored in the program storage means and variable storage means are stored in a state converted by the program conversion means;
Program execution means for referring to control programs and variables stored in these storage means;
In the course of execution by the program execution means, it is determined to which variable group the variable to be used belongs, and the variable value is managed in the corresponding variable group area in the variable storage means according to the determination result And a variable management means.
プログラム実行手段が制御プログラムを実行することで、1つ以上の工業用ロボットを含む複数の制御対象機器を統括的に制御するように構成される制御装置において、
ユーザによって作成される制御プログラムが記憶されるプログラム記憶手段と、
このプログラム記憶手段に記憶される複数の制御プログラムを、前記プログラム実行手段が直接実行可能となる形式に変換するプログラム変換手段と、
前記プログラム記憶手段に記憶される複数の制御プログラムを共通する属性毎にグループにまとめ、プログラム全体を複数のグループに分けて管理するプログラム管理手段と、
前記制御プログラムにおいて使用される変数が記憶される変数記憶手段と、
前記複数の変数を、ユーザの指定に応じて、各制御プログラム内だけ有効となるローカル変数群と、前記プログラム管理手段によって管理されるグループ内だけ有効となるグループ変数群とに分けて管理し、前記プログラム実行手段による実行の過程において、使用される変数が何れの変数群に属しているかを判定し、その判定結果に応じて、前記変数記憶手段における対応する変数群領域にて変数値を管理する変数管理手段とを備えたことを特徴とする制御装置。
In a control device configured to centrally control a plurality of control target devices including one or more industrial robots by executing a control program by a program execution unit,
Program storage means for storing a control program created by a user;
A program conversion means for converting a plurality of control programs stored in the program storage means into a format that can be directly executed by the program execution means;
A plurality of control programs stored in the program storage unit are grouped for each common attribute, and a program management unit that manages the entire program divided into a plurality of groups;
Variable storage means for storing variables used in the control program;
The plurality of variables are managed separately according to a user's specification, a local variable group that is effective only in each control program, and a group variable group that is effective only in a group managed by the program management means, In the course of execution by the program execution means, it is determined to which variable group the variable to be used belongs, and the variable value is managed in the corresponding variable group area in the variable storage means according to the determination result And a variable management means.
前記プログラム管理手段は、前記複数のグループの内、更にユーザによって指定された複数のグループを入れ子構造に階層化して管理可能に構成され、
前記変数管理手段は、前記階層化された複数のグループ内の上位グループにおいて定義されたグループ変数群に属する変数は、当該上位グループ及びその下位グループ内の制御プログラムでも参照可能となるように管理することを特徴とする請求項4記載の制御装置。
The program management means is configured to be capable of managing a plurality of groups specified by the user in a hierarchy in a nested structure among the plurality of groups,
The variable management means manages the variables belonging to the group variable group defined in the upper group in the plurality of hierarchized groups so that the variables can be referred to in the upper group and the control program in the lower group. The control device according to claim 4.
1つ以上の工業用ロボットを含む複数の制御対象機器を統括的に制御するように構成される制御装置によって実行される制御プログラムを作成するためのプログラム作成装置において、当該プログラム作成装置を構成するCPUによって実行されるコンピュータプログラムであって、
ユーザによって作成される複数の制御プログラムを、前記制御装置が備えているプログラム実行手段が直接実行可能となる形式に変換させ、
変換させた制御プログラムをプログラム記憶手段に記憶させ、
このプログラム記憶手段に記憶される複数の制御プログラムを共通する属性毎にグループにまとめ、プログラム全体を複数のグループに分けて管理させ、
前記制御プログラムにおいて使用される変数を変数記憶手段に記憶させ、
前記複数の変数を、ユーザの指定に応じて、各制御プログラム内だけ有効となるローカル変数群と、前記プログラム管理手段によって管理されるグループ内だけ有効となるグループ変数群とに分けて管理させることを特徴とするコンピュータプログラム。
In a program creation device for creating a control program executed by a control device configured to centrally control a plurality of control target devices including one or more industrial robots, the program creation device is configured. A computer program executed by a CPU,
A plurality of control programs created by the user are converted into a format that can be directly executed by the program execution means provided in the control device,
Store the converted control program in the program storage means,
A plurality of control programs stored in the program storage means are grouped for each common attribute, the entire program is divided into a plurality of groups and managed,
Storing variables used in the control program in a variable storage means;
The plurality of variables are managed separately according to a user's specification into a local variable group that is effective only in each control program and a group variable group that is effective only in a group managed by the program management means. A computer program characterized by the above.
前記複数のグループの内、更にユーザによって指定された複数のグループを入れ子構造に階層化して管理させ、
前記階層化された複数のグループ内の上位グループにおいて定義されたグループ変数群に属する変数を、当該上位グループ及びその下位グループ内の制御プログラムでも参照可能となるように管理させることを特徴とする請求項6記載のコンピュータプログラム。
Among the plurality of groups, a plurality of groups designated by the user are further managed in a nested structure.
The variable belonging to the group variable group defined in the upper group in the plurality of hierarchized groups is managed so that it can be referred to by the control program in the upper group and its lower group. Item 7. The computer program according to Item 6.
請求項1又は2記載のプログラム作成装置によって作成された制御プログラムを実行する制御装置において、当該制御装置を構成するCPUによって実行されるコンピュータプログラムであって、
前記制御プログラムが実行可能な形式に変換された状態で、前記プログラム記憶手段及び前記変数記憶手段に記憶されているものと同一の内容が記憶されているプログラム記憶手段及び変数記憶手段より、記憶されている制御プログラム及び変数を参照して実行させ、
前記実行の過程において、使用される変数が何れの変数群に属しているかを判定し、その判定結果に応じて、前記変数記憶手段における対応する変数群領域にて変数値を管理させることを特徴とするコンピュータプログラム。
A control device for executing a control program created by the program creation device according to claim 1 or 2, wherein the computer program is executed by a CPU constituting the control device,
In a state in which the control program is converted into an executable format, the same contents as those stored in the program storage unit and the variable storage unit are stored by the program storage unit and the variable storage unit. Execute by referring to the control program and variables
In the execution process, it is determined to which variable group the variable to be used belongs, and according to the determination result, the variable value is managed in the corresponding variable group area in the variable storage means, A computer program.
制御プログラムを実行することで、1つ以上の工業用ロボットを含む複数の制御対象機器を統括的に制御するように構成される制御装置において、当該制御装置を構成するCPUによって実行されるコンピュータプログラムであって、
ユーザによって作成され、プログラム記憶手段に記憶されている複数の制御プログラムを、前記CPUが直接実行可能となる形式に変換させ、
前記プログラム記憶手段に記憶される複数の制御プログラムを共通する属性毎にグループにまとめ、プログラム全体を複数のグループに分けて管理させ、
前記制御プログラムにおいて使用される変数を変数記憶手段に記憶させ、
前記複数の変数を、ユーザの指定に応じて、各制御プログラム内だけ有効となるローカル変数群と、前記プログラム管理手段によって管理されるグループ内だけ有効となるグループ変数群とに分けて管理させ、前記制御プログラムの実行の過程において、使用される変数が何れの変数群に属しているかを判定させ、その判定結果に応じて、前記変数記憶手段における対応する変数群領域にて変数値を管理させることを特徴とするコンピュータプログラム。
A computer program that is executed by a CPU that constitutes the control device in a control device configured to centrally control a plurality of control target devices including one or more industrial robots by executing the control program Because
A plurality of control programs created by the user and stored in the program storage means are converted into a format that can be directly executed by the CPU,
A plurality of control programs stored in the program storage means are grouped for each common attribute, the entire program is divided into a plurality of groups and managed,
Storing variables used in the control program in a variable storage means;
The plurality of variables are managed separately according to a user's specification, a local variable group that is effective only in each control program, and a group variable group that is effective only in a group managed by the program management means, In the process of executing the control program, it is determined to which variable group the variable to be used belongs, and the variable value is managed in the corresponding variable group area in the variable storage unit according to the determination result A computer program characterized by the above.
前記複数のグループの内、更にユーザによって指定された複数のグループを入れ子構造に階層化して管理させ、
前記階層化された複数のグループ内の上位グループにおいて定義されたグループ変数群に属する変数は、当該上位グループ及びその下位グループ内の制御プログラムでも参照可能となるように管理させることを特徴とする請求項9記載のコンピュータプログラム。

Among the plurality of groups, a plurality of groups designated by the user are further managed in a nested structure.
The variable belonging to the group variable group defined in the upper group in the plurality of hierarchized groups is managed so that it can be referred to by the control program in the upper group and its lower group. Item 10. The computer program according to Item 9.

JP2004287522A 2004-09-30 2004-09-30 Program generating device, controller, and computer program Pending JP2006099639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004287522A JP2006099639A (en) 2004-09-30 2004-09-30 Program generating device, controller, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004287522A JP2006099639A (en) 2004-09-30 2004-09-30 Program generating device, controller, and computer program

Publications (1)

Publication Number Publication Date
JP2006099639A true JP2006099639A (en) 2006-04-13

Family

ID=36239352

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004287522A Pending JP2006099639A (en) 2004-09-30 2004-09-30 Program generating device, controller, and computer program

Country Status (1)

Country Link
JP (1) JP2006099639A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017102720A (en) * 2015-12-02 2017-06-08 株式会社安川電機 Machine control program generation device, machine control system, library generation method, machine control program addition method, and control method
US9842291B2 (en) 2015-06-19 2017-12-12 Denso Wave Incorporated Protective cover
WO2020008855A1 (en) * 2018-07-03 2020-01-09 オムロン株式会社 Compiler device and compiling method
WO2020008867A1 (en) * 2018-07-03 2020-01-09 オムロン株式会社 Control device and control method
JP2021023679A (en) * 2019-08-07 2021-02-22 株式会社オリンピア Game machine
JP2021023678A (en) * 2019-08-07 2021-02-22 株式会社オリンピア Game machine
CN114556242A (en) * 2019-10-03 2022-05-27 欧姆龙株式会社 Program development device and program for realizing the same
EP4027208A4 (en) * 2019-09-04 2023-09-20 OMRON Corporation Program development device, project creation method, and program for implementing program development device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9842291B2 (en) 2015-06-19 2017-12-12 Denso Wave Incorporated Protective cover
JP2017102720A (en) * 2015-12-02 2017-06-08 株式会社安川電機 Machine control program generation device, machine control system, library generation method, machine control program addition method, and control method
CN112272821A (en) * 2018-07-03 2021-01-26 欧姆龙株式会社 Control device and control method
WO2020008867A1 (en) * 2018-07-03 2020-01-09 オムロン株式会社 Control device and control method
JP2020008942A (en) * 2018-07-03 2020-01-16 オムロン株式会社 Compilation device and compilation method
JP2020008941A (en) * 2018-07-03 2020-01-16 オムロン株式会社 Control device and control method
WO2020008855A1 (en) * 2018-07-03 2020-01-09 オムロン株式会社 Compiler device and compiling method
US11157297B2 (en) 2018-07-03 2021-10-26 Omron Corporation Control device and control method for preventing unintentional overwriting of data
US11226814B2 (en) 2018-07-03 2022-01-18 Omron Corporation Compiler device and compiling method
JP2021023679A (en) * 2019-08-07 2021-02-22 株式会社オリンピア Game machine
JP2021023678A (en) * 2019-08-07 2021-02-22 株式会社オリンピア Game machine
EP4027208A4 (en) * 2019-09-04 2023-09-20 OMRON Corporation Program development device, project creation method, and program for implementing program development device
CN114556242A (en) * 2019-10-03 2022-05-27 欧姆龙株式会社 Program development device and program for realizing the same
EP4040242A4 (en) * 2019-10-03 2023-11-01 OMRON Corporation Program development device, and program for implementing program development device

Similar Documents

Publication Publication Date Title
US8327316B2 (en) Compilation model
Nilsson et al. Integrated architecture for industrial robot programming and control
Backhaus et al. Digital description of products, processes and resources for task-oriented programming of assembly systems
Wang et al. A review of function blocks for process planning and control of manufacturing equipment
US6161051A (en) System, method and article of manufacture for utilizing external models for enterprise wide control
US6157864A (en) System, method and article of manufacture for displaying an animated, realtime updated control sequence chart
Hong et al. A PC-based open robot control system: PC-ORC
Xu et al. STEP-NC and function blocks for interoperable manufacturing
CN113039499B (en) Object tagging to support tasks through autonomous machines
Smith et al. Message-based Part State Graphs (MPSG): a formal model for shop-floor control implementation
WO2018176025A1 (en) System and method for engineering autonomous systems
JP2006099639A (en) Program generating device, controller, and computer program
US7831316B2 (en) Device and method for programming and/or executing programs for industrial automation systems
Regulin et al. Improving transferability between different engineering stages in the development of automated material flow modules
Bourne CML: a meta-interpreter for manufacturing
Schuetz et al. Highly reconfigurable production systems controlled by real-time agents
Hamilton et al. Implementing STEP-NC: Exploring possibilities for the future of advanced manufacturing
US11169510B2 (en) Engineering system and method for planning an automation system
Thapa et al. Auto-generation of IEC standard PLC code using t-MPSG
CN106415417A (en) Method for operating an automation arrangement
Aiello et al. An agile methodology for manufacturing control systems development
KR101085114B1 (en) System for providing programable logic controller software development environment
Laguionie et al. A multi-process manufacturing approach based on STEP-NC data model
Komenda et al. Sustainable utilization of industrial robotic systems by facilitating programming through a human and process centred declarative approach
Qu et al. Distributed control application platform-a control platform for advanced manufacturing systems