JPH07141014A - Nc program down load system - Google Patents

Nc program down load system

Info

Publication number
JPH07141014A
JPH07141014A JP30853893A JP30853893A JPH07141014A JP H07141014 A JPH07141014 A JP H07141014A JP 30853893 A JP30853893 A JP 30853893A JP 30853893 A JP30853893 A JP 30853893A JP H07141014 A JPH07141014 A JP H07141014A
Authority
JP
Japan
Prior art keywords
program
subprogram
sub
main
download
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
JP30853893A
Other languages
Japanese (ja)
Inventor
Yoshiro Matsui
善郎 松井
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.)
Fanuc Corp
Original Assignee
Fanuc Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanuc Corp filed Critical Fanuc Corp
Priority to JP30853893A priority Critical patent/JPH07141014A/en
Publication of JPH07141014A publication Critical patent/JPH07141014A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To economize the capacity of a storage device by calling any required sub program from previously registered sub programs, automatically inserting it into an NC program, constituting the NC program again and down loading it as one NC program. CONSTITUTION:When a sub program prog 1 exists while a main program Owwww is executed, the contents of a sub program Oxxxx to be used for the prog 1 are ready out of registered sub programs Oxxxx, Oyyyy and Ozzzz or the like and down loaded through a communicating means to an NC 10. When the sub program Oxxxx is completely read out and down loaded, processing is returned to the main program Owwww again, and the main program is continuously transferred. The contents of the sub program to be used for the program are not directly stored in the NC program but only the required program is selected and read out, and down loading is performed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、NCプログラムによる
加工制御に関し、特に、セルコントローラからNC機械
へNCプログラムをダウンロードするためのNCプログ
ラムダウンロード方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to machining control by an NC program, and more particularly to an NC program download system for downloading an NC program from a cell controller to an NC machine.

【0002】[0002]

【従来の技術】従来、NC装置による加工をNCプログ
ラムによって行う場合、サブプログラムを含むNCプロ
グラムを、NC装置にダウンロードしながら加工を行う
場合がある。この場合には、例えば、図6の従来のNC
プログラムダウンロード方式を説明する図に示すよう
に、NC装置側に設けられた記憶装置に複数個のサブプ
ログラムをあらかじめ登録しておき、セルコントローラ
からNC装置にサブプログラムを含まない状態のメイン
プログラムをダウンロードする。そして、このダウンロ
ードしたメインプログラムを実行して加工を行う際に、
NC装置のCPUはNC装置側の記憶装置内に登録して
おいた前記サブプログラムの中から、ダウンロードした
メインプログラムが必要とするサブプログラムをその度
ごとに呼出してNCプログラムを実行する。
2. Description of the Related Art Conventionally, when machining by an NC device is performed by an NC program, there are cases where the NC program including a subprogram is downloaded to the NC device for machining. In this case, for example, the conventional NC shown in FIG.
As shown in the diagram for explaining the program download method, a plurality of subprograms are registered in advance in a storage device provided on the NC device side, and a main program in a state where the subprogram is not included in the NC device from the cell controller. to download. And when executing this downloaded main program to process,
The CPU of the NC device calls the subprogram required by the downloaded main program from the subprograms registered in the storage device of the NC device each time to execute the NC program.

【0003】[0003]

【発明が解決しようとする課題】前記した従来のNCプ
ログラムのダウンロード方式では、ダウンロードされた
メインプログラムが必要とするサブプログラムを、NC
装置内に設けられた記憶装置にあらかじめ登録しておく
構成としているため、登録できるサブプログラムの大き
さはNC装置の持つ記憶装置の記憶容量により制限され
るという問題点を有している。
In the above-mentioned conventional NC program download method, the sub program required by the downloaded main program is changed to NC.
Since it is configured to be registered in advance in a storage device provided in the device, there is a problem that the size of a subprogram that can be registered is limited by the storage capacity of the storage device of the NC device.

【0004】前記問題点のため、登録するサブプログラ
ムが大量の記憶容量を必要とし、該必要容量がNC装置
の持つ記憶装置の記憶容量を超えて、該サブプログラム
が該記憶装置内に入りきらない場合が生じるが、これを
解決するものとして、図7に示す他のNCプログラムダ
ウンロード方式が考えられる。この他のNCプログラム
ダウンロード方式では、サブプログラムを登録する記憶
装置をセルコントローラ側に具備させ、セルコントロー
ラ側において、該サブプログラムを利用してサブプログ
ラムを含むNCプログラムを作成する。しかし、該他の
NCプログラムダウンロード方式においては、セルコン
トローラは、サブプログラムを含む長大なNCプログラ
ムを記憶しておく必要があるため、セルコントローラの
記憶装置の容量を大容量とする必要がある。
Due to the above-mentioned problems, the subprogram to be registered requires a large amount of storage capacity, and the required capacity exceeds the storage capacity of the storage device of the NC device, so that the subprogram cannot be stored in the storage device. In some cases, there is no case, but as a solution to this, another NC program download method shown in FIG. 7 can be considered. In the other NC program download method, a storage device for registering a subprogram is provided on the cell controller side, and the cell controller side uses the subprogram to create an NC program including the subprogram. However, in the other NC program download method, the cell controller needs to store a long NC program including a subprogram, and thus the capacity of the storage device of the cell controller needs to be large.

【0005】そこで、本発明は前記した従来のNCプロ
グラムダウンロード方式の問題点を解決し、プログラム
を記憶しておくための記憶装置の容量を節約することが
できるNCプログラムのダウンロード方式を提供するこ
とを目的とする。
Therefore, the present invention solves the above-mentioned problems of the conventional NC program download system and provides an NC program download system capable of saving the capacity of a storage device for storing the program. With the goal.

【0006】[0006]

【課題を解決するための手段】本発明は、セルコントロ
ーラから、サブプログラムを含むNCプログラムをダウ
ンロードしながら加工する場合において、NCプログラ
ムにそのNCプログラムで使用するサブプログラムのサ
ブプログラムファイルを記述しておき、前記セルコント
ローラにおいて、NCプログラムを解析して得られるサ
ブプログラムファイルによって、あらかじめ登録してお
いたサブプログラムの中から必要とするサブプログラム
を呼び出し、その呼び出したサブプログラムをNCプロ
グラムに自動的に挿入することによりNCプログラムの
再構成を行い、1つのNCプログラムとしてダウンロー
ドすることにより、本発明の目的を達成する。
According to the present invention, when a NC program including a subprogram is processed while being downloaded from a cell controller, the subprogram file of the subprogram used in the NC program is described in the NC program. In the cell controller, a subprogram file obtained by analyzing the NC program is used to call a required subprogram from preregistered subprograms, and the called subprogram is automatically converted into the NC program. The NC program is reconstructed by manually inserting the program and downloaded as one NC program, thereby achieving the object of the present invention.

【0007】また、本発明において、NCプログラムは
メインプログラム、及びサブプログラムを含み、サブプ
ログラムファイルの記述は、プログラム中に記述する注
釈文として行うことができ、メインプログラム、及びサ
ブプログラムのいずれのプログラム中にも行うことがで
きるものである。
Further, in the present invention, the NC program includes a main program and a sub program, and the description of the sub program file can be made as a comment statement described in the program. It can also be done during the program.

【0008】本発明において、サブプログラムの呼出し
は、メインプログラム,サブプログラムのいずれからも
行うことができるものである。
In the present invention, the subprogram can be called from either the main program or the subprogram.

【0009】[0009]

【作用】本発明によれば、セルコントローラから、サブ
プログラムを含むNCプログラムをダウンロードしなが
ら加工する場合において、NCプログラムには、そのN
Cプログラムで使用するサブプログラムのサブプログラ
ムファイルを記述しておき、セルコントローラ側には、
使用するサブプログラムをあらかじめ登録し記憶してお
く。そして、セルコントローラにおいて、NCプログラ
ムを解析してNCプログラムで使用するサブプログラム
のサブプログラムファイルの記述を得る。セルコントロ
ーラは、このサブプログラムファイルの記述に基づき、
あらかじめ登録しておいたサブプログラムの中から必要
とするサブプログラムを呼び出し、その呼び出したサブ
プログラムをNCプログラムに自動的に挿入して、NC
プログラムの再構成を行う。さらに、セルコントローラ
は、この再編成したNCプログラムを1つのNCプログ
ラムとして、NC装置にダウンロードする。
According to the present invention, when an NC program including a sub program is processed while being downloaded from the cell controller, the NC program includes the N
Describe the subprogram file of the subprogram used in the C program, and on the cell controller side,
Register and store the subprogram to be used in advance. Then, in the cell controller, the NC program is analyzed to obtain the description of the subprogram file of the subprogram used in the NC program. The cell controller, based on the description of this subprogram file,
Call the required subprogram from the subprograms registered in advance, and automatically insert the called subprogram into the NC program.
Reconfigure the program. Further, the cell controller downloads this reorganized NC program to the NC device as one NC program.

【0010】また、プログラムで使用するサブプログラ
ムを表すサブプログラムファイルは、プログラム中の注
釈文に行うことができ、NCプログラムの解析におい
て、プログラム中のサブプログラムファイルを記述した
注釈文を検出し、その注釈文中のサブプログラムファイ
ルにしたがって、あらかじめ登録しておいたサブプログ
ラの中から必要とするサブプログラムを呼び出すことに
より、サブプログラムを求めることができる。
Further, a subprogram file representing a subprogram used in a program can be added to an annotation statement in the program, and in the analysis of the NC program, an annotation statement describing the subprogram file in the program is detected, A subprogram can be obtained by calling a required subprogram from a subprogram registered in advance according to the subprogram file in the comment statement.

【0011】[0011]

【実施例】以下、本発明の実施例を図を参照しながら詳
細に説明するが、本発明は実施例に限定されるものでは
ない。
Embodiments of the present invention will now be described in detail with reference to the drawings, but the present invention is not limited to the embodiments.

【0012】(本発明を実施するための構成)はじめ
に、本発明のNCプログラムのダウンロード方式を実施
するためのNC装置の一構成例を図3のブロック図を用
いて説明する。
(Configuration for Implementing the Present Invention) First, a configuration example of an NC device for implementing the NC program downloading method of the present invention will be described with reference to the block diagram of FIG.

【0013】図3において、1はプロセッサ(以下、C
PUという)、2はNC装置全体を制御する管理プログ
ラム等のプログラムを格納したROM、3はフロッピー
ディスク9からロードされた各種のシステムプログラム
やデータ及びCPU1による処理結果等を記憶するRA
M、4はNC加工プログラム等のNCデータを記憶する
NCデータ記憶メモリ、5はキーボード等の入力装置、
6はディスクコントローラ、7はCRT等のグラフィッ
クディスプレー(以下、CRTとういう)であり、これ
らの各要素1〜7はバス8によって接続されている。
In FIG. 3, reference numeral 1 is a processor (hereinafter, C).
PU), 2 is a ROM storing programs such as a management program for controlling the entire NC device, 3 is an RA storing various system programs and data loaded from the floppy disk 9 and processing results by the CPU 1.
M, 4 are NC data storage memories for storing NC data such as NC machining programs, 5 is an input device such as a keyboard,
Reference numeral 6 is a disk controller, 7 is a graphic display such as a CRT (hereinafter referred to as CRT), and these respective elements 1 to 7 are connected by a bus 8.

【0014】本発明のNCプログラムのダウンロード方
式は、前記図3に示すNC装置のNCデータ記憶メモリ
4内に、バス8を通して図示していないセルコントロー
ラからNCプログラムをダウンロードするものである。
以下、本発明のNCプログラムのダウンロード方式の構
成を、図1の本発明のNCプログラムのダウンロード方
式の構成図、及び図2の本発明のNCプログラムのダウ
ンロード方式を実現するハードウェアを説明する図を用
いて説明する。
The download method of the NC program of the present invention is to download the NC program from the cell controller (not shown) through the bus 8 into the NC data storage memory 4 of the NC device shown in FIG.
Hereinafter, the configuration of the NC program download method of the present invention, the configuration diagram of the NC program download method of the present invention of FIG. 1, and the hardware for realizing the NC program download method of the present invention of FIG. Will be explained.

【0015】はじめに、図2により、NCプログラムの
ダウンロード方式を実現するハードウェアの構成につい
て説明する。図2において、10,11〜1n(以下、
NC装置11〜1n全体をNC装置10という)はNC
装置であり、20はセルコントローラであり、30はN
Cプログラムを記憶するための記憶手段であり、40は
セルコントローラ20からNC装置10にNCプログラ
ムをダウンロードするための通信手段である。なお、記
憶手段30は、例えば、ハードディスク等の記憶メモリ
を用いることができ、また、通信手段40は、例えばR
S232CやDNC1等の通信プロトコルを用いること
ができる。
First, referring to FIG. 2, a hardware configuration for implementing the NC program download method will be described. In FIG. 2, 10, 11 to 1n (hereinafter,
The entire NC devices 11 to 1n are referred to as NC device 10)
Device, 20 is a cell controller, and 30 is N
A storage means for storing the C program, and 40 is a communication means for downloading the NC program from the cell controller 20 to the NC device 10. The storage unit 30 may be a storage memory such as a hard disk, and the communication unit 40 may be an R memory, for example.
A communication protocol such as S232C or DNC1 can be used.

【0016】NC装置10を実行するNCプログラムは
ハードディスク等の記憶手段30内に格納されており、
NC装置10側には格納されていない。NC装置10
は、記憶手段30からNCプログラムの転送を受けなが
ら、該転送されたNCプログラムを実行する。記憶手段
30からNC装置10へのNCプログラムのダウンロー
ドは、セルコントローラ20により通信手段40を介し
て行われる。セルコントローラ20の制御は、セルコン
トローラ20がもつ基本ソフトにより行われ、通信手段
40の持つ通信プロトコルに応じた通信制御を行う。こ
の通信制御においては、複数台のNC装置11〜1nへ
のNCプログラムの通信を行うことができ、各NC装置
へのそれぞれのNCプログラムの転送のタイミングは、
前記基本ソフトにより制御する。
The NC program for executing the NC device 10 is stored in the storage means 30 such as a hard disk,
It is not stored on the NC device 10 side. NC device 10
Executes the transferred NC program while receiving the transfer of the NC program from the storage means 30. The cell controller 20 downloads the NC program from the storage means 30 to the NC device 10 via the communication means 40. The control of the cell controller 20 is performed by the basic software of the cell controller 20, and the communication control according to the communication protocol of the communication unit 40 is performed. In this communication control, NC programs can be communicated to a plurality of NC devices 11 to 1n, and the transfer timing of each NC program to each NC device is
It is controlled by the basic software.

【0017】次に、図1の本発明のNCプログラムのダ
ウンロード方式の構成図を用いて、本発明のダウンロー
ド方式について説明する。
Next, the download method of the present invention will be described with reference to the block diagram of the download method of the NC program of the present invention in FIG.

【0018】図2の記憶手段30中には、NC装置10
を実行するNCプログラムがメインプログラムとサブプ
ログラムに分割して記憶されている。メインプログラム
は、NCプログラムの内のサブプログラムの部分を除い
て記憶されており、一方、該メインプログラムにおいて
使用されるサブプログラムは、メインプログラムと独立
した状態であらかじめ登録されている。なお、このサブ
プログラムは、当該NC加工に使用するNCプログラム
のメインプログラム中において用いるサブプログラムの
みを登録しておくことも、あるいは、該メインプログラ
ムで使用しないサブプログラムを含む種々のサブプログ
ラムを登録し、必要とするサブプログラムのみを読み出
すようにすることもできる。
In the storage means 30 shown in FIG.
The NC program for executing is divided into a main program and a sub program and stored. The main program is stored excluding the subprogram portion of the NC program, while the subprogram used in the main program is registered in advance in a state independent of the main program. As for this sub-program, only the sub-program used in the main program of the NC program used for the NC machining may be registered, or various sub-programs including sub-programs not used in the main program may be registered. However, it is also possible to read only the required subprogram.

【0019】メインプログラム、及びサブプログラム
は、例えば、「O****」の等の名称が付されて登録
されている。図1においては、メインプログラムには
「Owwww」の名称が付けられ、サブプログラムには
「Oxxxx」,「Oyyyy」,及び「Ozzzz」
の名称で登録されている。また、メインプログラム中に
は、例えば、「./****」で表される注釈文が記述
されており、該注釈文の内で、例えば、「(./pro
gN/O****)」で表される注釈文は、「O***
*」の名称のサブプログラムを表す注釈文として定義し
ておく。該「(./progN/O****)」で表さ
れるサブプログラムを表す注釈文は、メインプログラム
中においてN番目のサブプログラムであることを示すと
ともに、該サブプログラムの内容は「O****」の名
称のサブプログラムであることを示している。
The main program and the sub-program are registered with names such as "O ***". In FIG. 1, the main program is named “Owwwww”, and the subprograms are “Oxxxx”, “Oyyy”, and “Ozzzz”.
It is registered under the name. Further, in the main program, for example, an annotation sentence represented by "./*****" is described, and in the annotation sentence, for example, "(./pro"
gN / O ***) ”, the comment text is“ O ***
It is defined as a comment statement that represents a subprogram named "*". The annotation statement representing the subprogram represented by “(./progN/O***)” indicates that it is the Nth subprogram in the main program, and the content of the subprogram is “O. It indicates that it is a subprogram with the name "***".

【0020】また、メインプログラムあるいはサブプロ
グラムにおいて、サブプログラムO****を用いる場
合には、「(./progN/O****)」の注釈文
で記述されたサブプログラムファイルO****によっ
て、サブプログラムO****にの引用の開始を指示
し、「M98P****」によりサブプログラムの引用
の終了を指示する。また、引用されるサブプログラム
は、その先頭行を「O****」、最終行を「M99」
として、プログラムの実行は「(./progN/O*
***)」の注釈文の次に「O****」の先頭行に進
んでサブプログラムを処理した後、「M99」の最終行
から「M98P****」の行に戻る。
When the subprogram O *** is used in the main program or the subprogram, the subprogram file O ** described by the comment sentence "(./progN/O***)" is used. *** indicates the start of quoting to the subprogram O ***, and “M98P ***” indicates the end of quoting of the subprogram. In addition, the referenced subprogram is "O ***" at the beginning and "M99" at the end.
As for the execution of the program, "(./progN/O*
After proceeding to the first line of "O ***" after the comment sentence of "***)" to process the subprogram, the process returns from the last line of "M99" to the line of "M98P *****".

【0021】(本発明の実施例の作用)セルコントロー
ラ20は、はじめに、NCプログラムのメインプログラ
ム(図中の「Owwww」で表されるプログラム)を順
にダウンロードする。このダウンロードにおいて、通信
されるデータの単位は、使用する通信プロトコルに応じ
て異なり、プログラムの行単位で行われるものとは限ら
ない。このダウンロードにより転送されたプログラム
は、NC装置10内の記憶メモリ内に一時記憶され、順
次NC装置の実行を行う。
(Operation of Embodiment of the Present Invention) The cell controller 20 first downloads a main program (a program represented by "Owwww" in the drawing) of the NC program in order. In this download, the unit of data to be communicated differs depending on the communication protocol used, and is not necessarily performed in units of program lines. The program transferred by this download is temporarily stored in the storage memory in the NC device 10, and sequentially executes the NC device.

【0022】メインプログラムOwwwwの実行中にお
いて、サブプログラムprog1が存在している場合に
は、記憶手段30に登録されているサブプログラム(O
xxxx,Oyyyy,Ozzzz,・・・)から、前
記サブプログラムprog1に使用されるサブプログラ
ムOxxxxの内容を読み出し(図1中の)、該サブ
プログラムの内容を前記メインプログラムOwwwwと
同様にして、通信手段40を介してNC装置10にダウ
ンロードする。前記サブプログラムOxxxxの読み出
し、及びそれに続くダウンロードが終了すると、再びメ
インプログラムOwwwwに戻り(図1中の)、メイ
ンプログラムOwwwwの転送を続行する。
During execution of the main program Owwwww, if the subprogram prog1 exists, the subprogram (O
xxxxxx, Oyyy, Ozzzz, ...), reads out the contents of the subprogram Oxxxx used in the subprogram prog1 (in FIG. 1), and communicates the contents of the subprogram in the same manner as the main program Owwwww. Download to the NC device 10 via the means 40. When the reading of the sub-program Oxxxx and the subsequent download are completed, the program returns to the main program Owwwww (in FIG. 1) again, and the transfer of the main program Owwwww is continued.

【0023】前記で読み出されたサブプログラムOx
xxx中に他のサブプログラムOzzzzが存在する場
合には、サブプログラムOxxxxの読み出しを一時中
断し、サブプログラムOxxxxから他のサブプログラ
ムOzzzzを読み出し(図1中の)、前記メインプ
ログラムOwwww、及びサブプログラムOxxxxと
同様にして通信手段40を介して、NC装置10にダウ
ンロードする。そして、該サブプログラムOzzzzの
読み出しと転送が終了すると、再び前記サブプログラム
Oxxxxに戻り(図1中の)、引き続いてサブプロ
グラムOxxxxのダウンロードを続行する。
Subprogram Ox read out above
If another sub-program Ozzzz is present in xxx, the reading of the sub-program Oxxxx is suspended, the other sub-program Ozzzz is read from the sub-program Oxxxx (in FIG. 1), the main program Owwwww, and the sub-program The program is downloaded to the NC device 10 via the communication means 40 in the same manner as the program Oxxxx. When the reading and transfer of the subprogram Ozzzz are completed, the process returns to the subprogram Oxxxx again (in FIG. 1), and the download of the subprogram Oxxxx continues.

【0024】さらに、引き続くメインプログラムOww
wwの実行中において、別のサブプログラムprog2
が存在している場合には、記憶手段30に登録されてい
るサブプログラム(Oxxxx,Oyyyy,Ozzz
z,・・・)から、サブプログラムprog2に使用さ
れるサブプログラムOyyyyの内容を読み出し(図1
中の)、該サブプログラムの内容を前記メインプログ
ラムOwwwwと同様にして、通信手段40を介してN
C装置10にダウンロードする。前記サブプログラムO
yyyyの読み出し、及びそれに続くダウンロードが終
了すると、再びメインプログラムOwwwwに戻り(図
1中の)、メインプログラムOwwwwの転送を続行
する。
Furthermore, the following main program Oww
While executing ww, another subprogram prog2
Is present, the subprograms (Oxxxxx, Oyyy, Ozzzz, which are registered in the storage means 30 are stored.
From z, ...), the contents of the subprogram Oyyy used for the subprogram prog2 are read (FIG. 1).
The contents of the sub-program in the same manner as the main program Owwww, and N
Download to C device 10. The subprogram O
When the reading of yyyy and the subsequent download are completed, the main program Owwwww is returned again (in FIG. 1), and the transfer of the main program Owwww is continued.

【0025】したがって、本発明のNCプログラムのダ
ウンロード方式においては、メインプログラム及びサブ
プログラムは、該プログラム中に使用されるサブプログ
ラムの内容をNCプログラム中に直接に格納せず、メイ
ンプログラム中にサブプログラムを特定するサブプログ
ラムト等の指標のみを記述するものであり、あらかじめ
登録しておいたサブプログラムの中から前記指標に従っ
て必要とするサブプログラムを選択して読み出し、ダウ
ンロードを行うものである。
Therefore, in the NC program downloading method of the present invention, the main program and the sub-program do not directly store the contents of the sub-program used in the program in the NC program, but the sub-program in the main program. Only an index such as a subprogram for specifying a program is described, and a required subprogram is selected from the previously registered subprograms, read out, and downloaded.

【0026】次に、本前記した発明のNCプログラムの
ダウンロード方式の動作手順を、図4の本発明のNCプ
ログラムのダウンロードのフローチャート、及び図5の
本発明のNCプログラムのサブプログラムの読み出しの
フローチャートを用いて説明する。
Next, the operation procedure of the NC program download method of the present invention described above will be described with reference to the flowchart of FIG. 4 for downloading the NC program of the present invention and the flowchart of FIG. 5 for reading the subprogram of the NC program of the present invention. Will be explained.

【0027】はじめに、図4を用いてNCプログラムの
ダウンロードの動作手順を、ステップSの符号に従って
説明する。
First, the operation procedure for downloading the NC program will be described with reference to FIG.

【0028】ステップS1:セルコントローラは、メイ
ンプログラムのダウンロードを開始する前に、メインプ
ログラム中の注釈文の有無を検出する。メインプログラ
ム中に注釈文がある場合にはステップS5に進み、メイ
ンプログラム中に注釈文がない場合にはステップS2に
進む。
Step S1: The cell controller detects the presence / absence of an annotation sentence in the main program before starting the download of the main program. If there is an annotation sentence in the main program, the process proceeds to step S5, and if there is no annotation sentence in the main program, the process proceeds to step S2.

【0029】ステップS2:前記工程で、メインプログ
ラムのダウンロードの開始時点において、メインプログ
ラム中に注釈文がない場合には、プログラムの転送を開
始してダウンロードを行う。NC装置10は、このダウ
ンロードされたプログラムに従って、NC加工を実行す
る。NC装置10の加工の処理速度とプログラムのダウ
ンロードのタイミングの調整をとるため、ダウンロード
されたプログラムは記憶装置にいったん格納され、該格
納されたプログラムの内容を順次実行する。これによ
り、NC装置10の加工の処理速度にかかわらず、プロ
グラムのダウンロードを行うことができる。
Step S2: In the above process, when there is no comment text in the main program at the time of starting the download of the main program, the transfer of the program is started and the download is performed. The NC device 10 executes NC processing according to the downloaded program. In order to adjust the processing speed of the NC device 10 and the download timing of the program, the downloaded program is once stored in the storage device, and the contents of the stored program are sequentially executed. As a result, the program can be downloaded regardless of the processing speed of the NC device 10.

【0030】ステップS3,ステップS4:メインプロ
グラムの順次の転送において、メインプログラム中の注
釈文の有無を検出する、メインプログラム中に注釈文が
ある場合にはステップS5に進み、メインプログラム中
に注釈文がない場合にはメインプログラムのダウンロー
ドを続行して、該メインプログラムの終了までダウンロ
ードを行う。
Step S3, Step S4: In the sequential transfer of the main program, the presence or absence of the comment sentence in the main program is detected. If there is a comment sentence in the main program, the process proceeds to step S5 and the comment is made in the main program. If there is no sentence, the download of the main program is continued and the download is performed until the end of the main program.

【0031】メインプログラムの終了の検出は、例え
ば、メインプログラムの終了行に「M99」等のメイン
プログラムの終了を表す符号を記述し、該終了の符号を
検出することにより行うことができる。
The end of the main program can be detected, for example, by describing a code indicating the end of the main program such as "M99" in the end line of the main program and detecting the end code.

【0032】ステップS5:前記ステップS1あるいは
ステップS3において、メインプログラム中に注釈文が
ある場合には、この工程において該注釈文がサブプログ
ラムを表す注釈文であるか否かの判定を行う。
Step S5: In the step S1 or S3, if the main program has an annotation sentence, it is determined in this step whether or not the annotation sentence is an annotation sentence representing a subprogram.

【0033】メインプログラム中の注釈文には、単なる
コメントを表す注釈文と、サブプログラムの引用を表す
注釈文とがあり、この工程においてサブプログラムの引
用を表す注釈文のみを選択する。この工程においてサブ
プログラムの引用を表す注釈文がない場合には、前記ス
テップS2のメインプログラムのダウンロードを行う。
一方、この工程においてサブプログラムの引用を表す注
釈文がある場合には、ステップS6の工程に進んでサブ
プログラムの読み出しを行う。
The comment text in the main program includes a comment text that represents a simple comment and a comment text that represents a citation of a subprogram. In this step, only the comment text that represents a citation of a subprogram is selected. In this step, if there is no comment text indicating the citation of the subprogram, the main program in step S2 is downloaded.
On the other hand, if there is an annotation statement indicating the citation of the subprogram in this step, the process proceeds to step S6 to read the subprogram.

【0034】ステップS6:この工程では、サブプログ
ラムを読み出し、読み出したサブプログラムを前記ステ
ップS2においてダウンロードを行う。サブプログラム
の読み出しは、注釈文にサブプログラムファイルにより
示されたサブプログラムを、あらかじめ登録しておいた
サブプログラムから選択し、該サブプログラムの内容を
読み出すことにより行われる。
Step S6: In this step, the subprogram is read and the read subprogram is downloaded in the step S2. The reading of the subprogram is performed by selecting the subprogram indicated by the subprogram file in the annotation text from the subprograms registered in advance and reading the contents of the subprogram.

【0035】以下、このサブプログラムを読み出しの動
作について、図5のNCプログラムのサブプログラムの
読み出しのフローチャートを用いて、ステップTの符号
に従って説明する。
The operation of reading this subprogram will be described below with reference to the step T using the flowchart for reading the subprogram of the NC program of FIG.

【0036】ステップT1:セルコントローラは、サブ
プログラムのダウンロードを開始する前に、サブプログ
ラム中の注釈文の有無を検出する。サブプログラム中に
注釈文がある場合にはステップT5に進み、サブプログ
ラム中に注釈文がない場合にはステップT2に進む。
Step T1: The cell controller detects the presence / absence of a comment sentence in the subprogram before starting the download of the subprogram. If there is a comment sentence in the subprogram, the process proceeds to step T5, and if there is no comment sentence in the subprogram, the process proceeds to step T2.

【0037】ステップT2:前記工程で、サブプログラ
ムのダウンロードの開始時点において、サブプログラム
中に注釈文がない場合には、サブプログラムの転送を開
始し、メインプログラムの転送と同様にしてダウンロー
ドを行う。NC装置10は、このダウンロードされたサ
ブプログラムに従って、NC加工を続行する。このダウ
ンロードされたサブプログラムも、前記メインプログラ
ムと同様にいったん記憶装置に格納され、該格納された
プログラムの内容を順次実行して、NC加工が行われ
る。これにより、NC装置10の加工の処理速度にかか
わらず、サブプログラムのダウンロードを行うことがで
きる。
Step T2: In the above process, when there is no comment text in the subprogram at the start of downloading the subprogram, transfer of the subprogram is started and download is performed in the same manner as transfer of the main program. . The NC device 10 continues the NC processing according to the downloaded subprogram. Like the main program, the downloaded sub program is once stored in the storage device, and the contents of the stored program are sequentially executed to perform NC processing. As a result, the subprogram can be downloaded regardless of the processing speed of the NC device 10.

【0038】ステップT3,ステップT4:サブプログ
ラムの順次の転送において、サブプログラム中の注釈文
の有無を検出する、サブプログラム中にさらに注釈文が
ある場合にはステップT5に進み、サブプログラム中に
注釈文がない場合には該サブプログラムのダウンロード
を続行して、該サブプログラムの終了までダウンロード
を行う。
Step T3, Step T4: In the sequential transfer of subprograms, the presence or absence of comment text in the subprogram is detected. If there are more comment texts in the subprogram, the process proceeds to step T5, and the subprogram If there is no comment text, the download of the subprogram is continued, and the download is performed until the end of the subprogram.

【0039】サブプログラムの終了の検出は、メインプ
ログラムの終了の検出と同様に、サブプログラムの終了
行にM99等のサブプログラムの終了を表す符号を記載
し、該終了の符号を検出することにより行うことができ
る。
As with the detection of the end of the main program, the detection of the end of the subprogram is performed by writing a code indicating the end of the subprogram such as M99 in the end line of the subprogram and detecting the end code. It can be carried out.

【0040】ステップT5:前記ステップT1あるいは
ステップT3において、サブプログラム中に注釈文があ
る場合には、この工程において該注釈文がさらに別のサ
ブプログラムを引用する注釈文であるか否かの判定を行
う。
Step T5: In the step T1 or T3, if there is an annotation statement in the subprogram, it is judged in this step whether or not the annotation statement is an annotation statement that cites another subprogram. I do.

【0041】サブプログラム中の注釈文においても、メ
インプログラム中の注釈文と同様に、単なるコメントを
表す注釈文と、他のサブプログラムの引用を表す注釈文
とがあり、この工程において他のサブプログラムの引用
を表す注釈文のみを選択する。この工程において他のサ
ブプログラムの引用を表す注釈文がない場合には、前記
ステップT2のサブプログラムのダウンロードを行う。
一方、この工程において他のサブプログラムの引用を表
す注釈文がある場合には、ステップT6の工程に進んで
他のサブプログラムの読み出しを行う。
Similarly to the comment text in the main program, the comment text in the subprogram includes a comment text that represents a simple comment and a comment text that refers to a citation of another subprogram. Select only annotations that represent program citations. In this step, if there is no comment text indicating the citation of another subprogram, the subprogram in step T2 is downloaded.
On the other hand, if there is an annotation statement indicating the citation of another subprogram in this step, the process proceeds to step T6 to read the other subprogram.

【0042】ステップT6:この工程では、他のサブプ
ログラムを読み出し、読み出したサブプログラムを前記
ステップT2においてダウンロードを行う。
Step T6: In this step, another subprogram is read, and the read subprogram is downloaded in step T2.

【0043】さらに、該サブプログラム中に他のサブプ
ログラムがある場合には、前記したサブプログラムのフ
ローチャートに従って他のサブプログラムのダウンロー
ドを行う。
Further, when there is another subprogram in the subprogram, the other subprogram is downloaded according to the flowchart of the subprogram described above.

【0044】(実施例の効果)本発明の実施例によれ
ば、サブプログラムをNC装置の記憶装置に格納する必
要がないため、NC装置の記憶装置の記憶容量を節約す
ることができる。また、セルコントローラにおいて、サ
ブプログラムを含む長大なNCプログラムを作成する必
要がないため、セルコントローラ側の記憶装置の記憶容
量を節約することができる。
(Effect of Embodiment) According to the embodiment of the present invention, since it is not necessary to store the subprogram in the storage device of the NC device, the storage capacity of the storage device of the NC device can be saved. Moreover, since it is not necessary to create a long NC program including a subprogram in the cell controller, it is possible to save the storage capacity of the storage device on the cell controller side.

【0045】[0045]

【発明の効果】以上説明したように、本発明によれば、
NCプログラムのダウンロード方式において、プログラ
ムを記憶しておくための記憶装置の容量を節約すること
ができる。
As described above, according to the present invention,
In the NC program download method, the capacity of the storage device for storing the program can be saved.

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

【図1】本発明のNCプログラムのダウンロード方式の
構成図である。
FIG. 1 is a configuration diagram of a download method of an NC program of the present invention.

【図2】本発明のNCプログラムのダウンロード方式を
実現するハードウェアを説明する図である。
FIG. 2 is a diagram illustrating hardware that implements the NC program download method of the present invention.

【図3】本発明のNCプログラムのダウンロード方式を
実施するためのNC装置の一構成例ブロック図である。
FIG. 3 is a block diagram showing an example of the configuration of an NC device for implementing the NC program download method of the present invention.

【図4】本発明のNCプログラムのダウンロードのフロ
ーチャートである。
FIG. 4 is a flowchart for downloading an NC program of the present invention.

【図5】本発明のNCプログラムのサブプログラムの読
み出しのフローチャートである。
FIG. 5 is a flowchart of reading a subprogram of the NC program of the present invention.

【図6】従来のNCプログラムダウンロード方式を説明
する図である。
FIG. 6 is a diagram illustrating a conventional NC program download method.

【図7】従来の他のNCプログラムダウンロード方式を
説明する図である。
FIG. 7 is a diagram illustrating another conventional NC program download method.

【符号の説明】 10,11,〜,1n NC装置 20 セルコントローラ 30 記憶手段 40 通信手段[Explanation of reference numerals] 10, 11, ..., 1n NC device 20 Cell controller 30 Storage means 40 Communication means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 セルコントローラから、サブプログラム
を含むNCプログラムをダウンロードしながら加工する
場合において、前記NCプログラムに、該プログラムで
使用するサブプログラムファイルを記述しておき、前記
セルコントローラにおいて、前記NCプログラムを解析
して、前記サブプログラムファイルに応じたサブプログ
ラムをあらかじめ登録しておいたサブプログラムの中か
ら呼び出し、該呼び出したサブプログラムを前記NCプ
ログラムに自動的に挿入することによりNCプログラム
の再構成を行い、1つのNCプログラムとしてダウンロ
ードすることを特徴とするNCプログラムダウンロード
方式。
1. When processing an NC program including a sub program while downloading from a cell controller, a sub program file used in the program is described in the NC program, and the NC is set in the cell controller. The program is analyzed, a subprogram corresponding to the subprogram file is called from the subprograms registered in advance, and the called subprogram is automatically inserted into the NC program to re-create the NC program. An NC program download method characterized in that it is configured and downloaded as one NC program.
【請求項2】 前記サブプログラムファイルの記述を、
プログラム中の注釈文に行う請求項1記載のNCプログ
ラムダウンロード方式。
2. The description of the subprogram file
The NC program download method according to claim 1, wherein the annotation text is included in the program.
JP30853893A 1993-11-16 1993-11-16 Nc program down load system Pending JPH07141014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30853893A JPH07141014A (en) 1993-11-16 1993-11-16 Nc program down load system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30853893A JPH07141014A (en) 1993-11-16 1993-11-16 Nc program down load system

Publications (1)

Publication Number Publication Date
JPH07141014A true JPH07141014A (en) 1995-06-02

Family

ID=17982238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30853893A Pending JPH07141014A (en) 1993-11-16 1993-11-16 Nc program down load system

Country Status (1)

Country Link
JP (1) JPH07141014A (en)

Similar Documents

Publication Publication Date Title
US4943911A (en) System for loading initial program loader routine into secondary computer without bootstrap ROM
EP0371941A2 (en) Generic application programming interface system and method
JP2681929B2 (en) Program start method
JP3117958B2 (en) Server setting device
US5150474A (en) Method for transferring arguments between object programs by switching address modes according to mode identifying flag
JPH07141014A (en) Nc program down load system
JP3143330B2 (en) Programmable controller
JPH0410081B2 (en)
US7281166B1 (en) User-customizable input error handling
JPH036535B2 (en)
JPH11327681A (en) Virtual system time management system and management method and recording medium recording management program
JPS5870361A (en) Input controlling system
JPH0740236B2 (en) Main memory contents saving method
JPS63116254A (en) System loading processing method
JPS6042492B2 (en) Processing phase execution control method
JPH03160524A (en) Information processor
JPH0668744B2 (en) NCP load module update processing method
JPH05307487A (en) Multi-task monitor
JPH0581017A (en) Program processor
JPS6385938A (en) Controller for multiplex parallel operation of program
JPH0581018A (en) Auxiliary processor
JPS6344240A (en) Program processing control system
EP0264077A2 (en) Buffer address register
JPH01233526A (en) Data access and program calling system
JPS63201740A (en) Data editing system for service processor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040629