JPH03206503A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPH03206503A
JPH03206503A JP20186490A JP20186490A JPH03206503A JP H03206503 A JPH03206503 A JP H03206503A JP 20186490 A JP20186490 A JP 20186490A JP 20186490 A JP20186490 A JP 20186490A JP H03206503 A JPH03206503 A JP H03206503A
Authority
JP
Japan
Prior art keywords
macro
command
variable
machine tool
numerical control
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
JP20186490A
Other languages
Japanese (ja)
Inventor
Akira Nagamine
永峰 侃
Hideaki Kawamura
川村 英昭
Mitsuto Miyata
宮田 光人
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 JP20186490A priority Critical patent/JPH03206503A/en
Publication of JPH03206503A publication Critical patent/JPH03206503A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To deal with a request produced even to the control of a special machine tool without remodeling the software of a computer numerical controller CNC by programming previously a macro-call instruction to call out a macroinstruction corresponding to a numerical control function. CONSTITUTION:When a macroinstruction is called out of a macro-register memory 24, a system variable contained in a macroinstruction is read out of a variable memory 28. The state information of a machine tool 30 is read based on the system variable, and the prescribed numerical control processing is carried out according to the contents of the state information on the tool 30 and based on the macroinstruction read out of the memory 24. Thus it is possible to carry out variable special processing operations desired by users without remodeling the software of the CNC.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、数値制御装置に係り、特に数値制御装置のソ
フトウエアを改造することなくユーザの希望する種々の
特殊処理が行なえる装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a numerical control device, and particularly to a device that can perform various special processing desired by a user without modifying the software of the numerical control device.

(従来の技術) 数値制御装置は、紙テープ等から指令された指令プログ
ラムに基いて数値制御処理を実行し、該処理結果により
工作機械を駆動してワークに指令通りの加工を施すもの
である。
(Prior Art) A numerical control device executes numerical control processing based on a command program instructed from a paper tape or the like, and drives a machine tool based on the processing result to process a workpiece according to the command.

第1図はかかる従来の数値制御装置のブロック図である
FIG. 1 is a block diagram of such a conventional numerical control device.

テープリーダl1からブロック毎に読込まれた指令プロ
グラムは、まず、処理装置や制御プログラムメモリ等を
内蔵する制御装置12に入力される。ついで、制御装置
12は該指令プログラムに応じた数値制御処理を実行し
、工作機械のサーボモータを駆動してテーブル又は刃物
を移動指令通りに移動゛せしめ、或いは強電制御装置1
3を介して工作機械14のクーラントのオン/オフ、ス
ピンドル正転/逆転/停止等の制御を行なう。
The command program read block by block from the tape reader l1 is first input to the control device 12 which includes a processing device, control program memory, and the like. Next, the control device 12 executes numerical control processing according to the command program and drives the servo motor of the machine tool to move the table or cutter according to the movement command, or the high-power control device 1
Controls such as turning on/off the coolant of the machine tool 14, normal rotation/reverse rotation/stopping of the spindle, etc.

尚、15は原点復帰、ジョグ等を指令するスイッチ、釦
類等を有する操作盤、l6は手動により1ブロックの指
令データ等を入力するマニュアル・データ・インプット
装置(以後MDIという)、17は機械現在位置等を表
示する表示ユニットであり、各装置11〜17(工作機
械14は除く)によりコンピュータ数値制御装置(CN
Cという)が構成されている。
In addition, 15 is an operation panel with switches and buttons for commanding home return, jog, etc., 16 is a manual data input device (hereinafter referred to as MDI) for manually inputting one block of command data, etc., and 17 is a machine. This is a display unit that displays the current position, etc., and each device 11 to 17 (excluding the machine tool 14) is a computer numerical control device (CN
C) is configured.

ところで従来の数値制御装置に与えられていた指令には
、移動指令、速度指令、工作機械に所定の機械動作を指
示する補助機能命令、主軸の回転数を指示する主軸機能
命令、工具交換を指示する工具機能命令、その他準備機
能命令などがあって、それらが順次に読み込まれる時に
、このCNCにおける制御装置12は、それらの指令を
解読して実行していたから、工作機械や処理装置(CP
U)等の内部状態、或はそこに外部からオペレータが設
定した状態信号に応じて指令プログラムの順序を変更す
ることはできなかった。
By the way, the commands given to conventional numerical control devices include movement commands, speed commands, auxiliary function commands that instruct the machine tool to perform predetermined mechanical operations, spindle function commands that instruct the spindle rotation speed, and tool exchange instructions. There are tool function commands to perform and other preparation function commands, etc., and when they are sequentially read, the control device 12 in this CNC decodes and executes those commands, so the machine tool and processing device (CP
It was not possible to change the order of the command programs in accordance with the internal state of the system, such as U), or a state signal set there by an operator from the outside.

(発明が解決しようとする問題点) ところが最近のCNCは機能の向上が要求されてきてお
り、工作機械やNCの状態に応じてその処理内容を指令
プログラムから指令する機能が必要になってきた。また
一般にCNCのソフトウエアは標準的な工作機械の制御
が行なえるように作られているが、工作機械によって、
或いは同種の工作機械でもユーザによって特殊な工作機
械制御が必要とされる場合がある。
(Problem to be solved by the invention) However, in recent years, CNCs have been required to have improved functionality, and it has become necessary to have the ability to command the processing content from a command program depending on the state of the machine tool or NC. . Additionally, CNC software is generally designed to control standard machine tools, but depending on the machine tool,
Or even for the same type of machine tools, the user may require special machine tool control.

このような場合、従来はその都度CNCのソフトウェア
を改造し特殊仕様通りの制御が行なえるようにしていた
。即ち、数値制御メーカは特殊な工作機械制御が要求さ
れる毎にその都度ソフトウェアを改造しており、このた
め多大の労力と時間を必要とし、人件費の増大、ひいて
はコストアップの弊害を招来していた。
In such cases, conventionally the CNC software has been modified each time to enable control in accordance with the special specifications. In other words, numerical control manufacturers modify software each time a special machine tool control is required, which requires a great deal of effort and time, resulting in increased labor costs and, ultimately, increased costs. was.

そこで、従来からパートプログラム中に、定数は異なっ
ているがステートメントそのものは同じという命令群が
存在するとき、その都度プログラムをしなくてもすむよ
うに、そのタルーブにマクロ定義をほどこして、それに
特定シンボルを与えて格納し、マクロ識別名を含むマク
ロ呼出命令がプログラムされた指令プログラムからそれ
を呼び出して数値制御処理を行なおうという考えはあっ
た。
Therefore, in the past, when a part program contains a group of instructions with different constants but the same statement, in order to avoid having to program each time, a macro definition is added to the tarub, and a specific symbol is added to the part program. There was an idea to perform numerical control processing by giving and storing a macro name and calling it from a command program programmed with a macro call command including a macro identification name.

マクロ定義のひとつに、カスタムマクロ、或はユーザマ
クロといわれるプログラム手法がある。
One type of macro definition is a programming method called a custom macro or user macro.

これは、ユーザや機械メーカが作成した一群の命令で構
成される機能を予めNC装置に登録しておき、あたかも
専用のソフトが組み込まれているかの様に、いつでも簡
単な手順で、マクロを呼び出して使用することができる
機能である。
This allows a function consisting of a group of commands created by the user or machine manufacturer to be registered in advance in the NC device, and the macro can be called up at any time using a simple procedure, just as if special software had been installed. This is a function that can be used with

ある一群の命令で構戒されるマクロプログラムは、その
後通常のプログラムに代表命令を書くことにより特殊な
機能を実行できる点では、一種のサブプログラムである
が、通常の指令のみでプログラムが構成されるのではな
く、変数、演算指令、制御指令を使用して構成すること
ができ、更にマクロ呼び出し指令との間で引数(パラメ
ータ)の受け渡しが可能であるため、使用する工作機械
を含む数値制御システムにマッチした仕様や、ユーザ独
自の固定サイクルや自動プログラミングが実現できる。
A macro program that consists of a certain group of instructions is a type of subprogram in that it can then execute a special function by writing representative instructions in a normal program, but it is also a type of subprogram in that a macro program is composed of only normal instructions. Instead, it can be configured using variables, calculation commands, and control commands, and it is also possible to pass arguments (parameters) to and from macro call commands, so numerical control including the machine tool used can be performed. Specifications that match the system, user-specific fixed cycles, and automatic programming can be realized.

ここでは、登録される一群の命令をユーザマクロ本体或
は単にマクロといい、代表命令をユーザマクロ命令、或
はマクロ呼出命令という。
Here, a group of registered commands is referred to as a user macro body or simply a macro, and a representative command is referred to as a user macro command or a macro call command.

ここで変数とは、マクロの中にあって、あるアドレスに
直接に数値を与えるのではなく、マクロを呼び出して実
行する際に定義されている変数に値を与えて使用される
ものであって、これによって、マクロに融通性と汎用性
を付与するものである。
Here, a variable is something that exists in a macro and is used by giving a value to a variable defined when calling and executing a macro, rather than giving a numerical value directly to a certain address. , which gives macros flexibility and versatility.

例えば、変数は#に続く変数番号i(1,2、)によっ
て指定し、 #i と表現することができる。即ち#5、#109、#10
05という様に。
For example, a variable can be specified by the variable number i (1, 2,) following # and can be expressed as #i. i.e. #5, #109, #10
Like 05.

また、変数番号としては、自然数のほか、式を使用する
ことも可能であり、その場合には、#[#100] .
# [#1001−11、# [#6/2]という様に
なる。
In addition to natural numbers, expressions can also be used as variable numbers; in that case, #[#100] .
# [#1001-11, # [#6/2].

さらにアドレスに続く数値を変数で置換することもでき
る。即ちくアドレス〉#i又はくアドレス>−#iとプ
ログラムすれば、変数の値をそのまま、又はその補数を
、そのアドレスの指令値とすることを意味する。
You can also replace the number following the address with a variable. That is, programming kuaddress>#i or kuaddress>-#i means that the value of the variable is used as it is, or its complement is used as the command value for that address.

ところがこのように変更可能なマクロ変数に代入できる
数は、従来では指令プログラム中のマクロ呼出命令であ
るコールステートメント中で直接に指定される数値に限
られている。そのためシングルブロック停止の抑制制御
等の処理機能を直接にプログラムで実行させるとき、こ
うした工作機械が有する・複数種類の数値制御処理機能
に対応した変数を持たせることができず、数値制御装置
の有する多様な機能をユーザが更に独自に拡張してマク
ロ命令を構成するうえで、不十分であった。
However, the number that can be assigned to a macro variable that can be changed in this way is conventionally limited to a value that is directly specified in a call statement that is a macro call instruction in a command program. Therefore, when executing processing functions such as single-block stop suppression control directly in a program, it is not possible to provide variables that correspond to the multiple types of numerical control processing functions that these machine tools have. This was insufficient to allow users to further independently expand various functions and configure macro instructions.

従って、本発明は工作機械に対する特殊な制御が要求さ
れても、数値制御機能に対応するマクロ命令を呼び出す
マクロ呼出命令をプログラムしておくだけで、CNCの
ソフトウェアを何等改造せずに対処できる低コストの数
値制御装置を提供することを目的としている。
Therefore, even if special control is required for a machine tool, the present invention can handle the problem without modifying the CNC software by simply programming a macro call command that calls a macro command corresponding to the numerical control function. The purpose is to provide a cost numerical control device.

(問題点を解決するための手段) この目的は本発明において、マクロ識別名を含むユーザ
マクロ呼出命令がプログラムされた指令プログラムに基
づいて数値制御処理を実行し、該処理結果により工作機
械を駆動してワークに指令通りの加工を施す数値制御装
置において、シングルブロック停止を抑制する機能、フ
ィードホールド指令を無効にする機能、或は送り速度指
令にオーバライドをかける機能を示す信号、及びオバラ
イドされた送り速度を含んでいる前記工作機械とのイン
タフェイスと、このインタフェイスを介して前記工作機
械の状態情報を代表する状態量を変数値とするシステム
変数を記憶した変数メモリと、1ないし複数のシステム
変数を含み前記マクロ識別名により識別可能な複数の機
能命令をマクロ命令として予め記憶しているマクロ登録
メモリと、このマクロ登録メモリから前記マクロ命令を
呼び出したとき前記変数メモリからマクロ命令に含まれ
るシステム変数を読出しこのシステム変数を用いて工作
機械の状態情報を読み取りその内容に応じて前記マクロ
登録メモリから読出されたマクロ命令に従って所定の数
値制御処理を実行するマクロ処理手段とを有することを
特徴とする数値制御装置により達成される。
(Means for Solving the Problem) This purpose is to execute numerical control processing based on a command program in which a user macro calling command including a macro identification name is programmed, and to drive a machine tool based on the processing result. In a numerical control device that processes a workpiece according to commands, a signal indicating a function to suppress a single block stop, a function to disable a feed hold command, a function to override a feed rate command, and a signal indicating a function to override a feed speed command are used. an interface with the machine tool including the feed rate; a variable memory storing system variables whose variable values are state quantities representing state information of the machine tool via this interface; and one or more variable memories. a macro registration memory that stores in advance a plurality of functional instructions that include system variables and can be identified by the macro identifier as macro instructions; and macro processing means for reading out system variables read out and using the system variables to read state information of the machine tool and executing predetermined numerical control processing in accordance with macro commands read out from the macro registration memory according to the contents thereof. This is achieved by a characteristic numerical control device.

(作用) 本発明によれば、マクロ登録メモリ(24)からユーザ
マクロ呼出命令により所定のユーザマクロを呼出し、マ
クロ処理手段(27)において該ユーザマクロに応じた
マクロ処理を実行する際に、システム変数に対応する数
値制御装置或は工作機械の状態量を読みとって、システ
ム変数により規定された機能命令に従ってシステム状態
を判別して、その時点で必要とされる特殊の数値制御処
理機能を選択して実行できる。
(Operation) According to the present invention, when a predetermined user macro is called from the macro registration memory (24) by a user macro call command and the macro processing means (27) executes macro processing according to the user macro, the system It reads the state quantity of the numerical control device or machine tool corresponding to the variable, determines the system state according to the function command specified by the system variable, and selects the special numerical control processing function required at that time. It can be executed by

(実施例) 以下、本発明の実施例を図面に従って詳細に説明する。(Example) Embodiments of the present invention will be described in detail below with reference to the drawings.

第2図は本発明に係るCNCのブロック図である。FIG. 2 is a block diagram of a CNC according to the present invention.

図中、21は指令プログラムが穿孔されている指令テー
プ、22は1又は複数のユーザマクロが穿孔されている
ユーザマクロ指令テープである。
In the figure, 21 is a command tape on which a command program is perforated, and 22 is a user macro command tape on which one or more user macros are perforated.

ここで各ユーザマクロは、第3図の如く少なくとも■マ
クロ識別名(たとえば0 9001)と■後述するシス
テム変数を用いた命令とから構成され、それらの命令の
最終行には、たとえばM99*(*はエンド・オブ・ブ
ロックを、M99はマクロの終りをそれぞれ意味する)
がプログラムされている。
As shown in FIG. 3, each user macro consists of at least (1) a macro identification name (for example, 0 9001) and (2) an instruction using a system variable, which will be described later. * means end of block, M99 means end of macro)
is programmed.

以下に、ユーザマクロの一例を示す。ここで#3001
がシステム変数である。
An example of a user macro is shown below. Here #3001
is a system variable.

09001* #3001=O* WHILE  [#3001LE#20]  DotE
ND  1  * M9 9 * 変数は、その変数番号(3001或は20など)により
、ローカル変数、コモン変数、システム変数に分類され
る。
09001* #3001=O* WHILE [#3001LE#20] DotE
ND 1 * M9 9 * Variables are classified into local variables, common variables, and system variables according to their variable numbers (3001, 20, etc.).

ローカル変数とは、マクロ内でローカルに使用される変
数であって、その変数番号には1〜33が使用される。
A local variable is a variable that is used locally within a macro, and the variable numbers 1 to 33 are used.

即ちある時点で呼び出したマクロで使用しているローカ
ル変数#iと他の時点で呼び出したマクロで使用してい
る#iとは(iが同じ値かどうかを問わず)、別のもの
として扱われる。従って、多重呼び出しのように、マク
ロAから別のマクロBを呼ぶような場合、マクロAで使
用しているローカル変数をマクロBで誤って使用してそ
の値を破壊してしまうというおそれはない。このローカ
ル変数は、引数の受け渡しに使用される。
In other words, local variable #i used in a macro called at one point in time and #i used in a macro called at another point in time (regardless of whether or not i has the same value) are treated as different things. be exposed. Therefore, when macro A calls another macro B, such as in multiple calls, there is no risk that a local variable used in macro A will be accidentally used in macro B and its value will be destroyed. . This local variable is used for passing arguments.

コモン変数の変数番号には100〜199、500〜9
99が使用される。ローカル変数がマクロ内でローカル
に使用されるのに対して、メインプログラム或はそこか
ら呼ばれたサブプログラム、各マクロを通じて、コモン
変数は共通に使用される。従って、あるマクロAで使用
している#iと他のマクロで使用する#iとが同じもの
であって、一方のマクロで演算した結果のコモン変数を
、別のマクロで使用することができる。
Variable numbers for common variables are 100-199, 500-9
99 is used. While local variables are used locally within a macro, common variables are used in common throughout the main program, subprograms called from it, and each macro. Therefore, #i used in one macro A and #i used in another macro are the same, and the common variable resulting from the operation in one macro can be used in another macro. .

更にシステム変数は、後述するシステム変数メモリに格
納されるものであって、ローカル変数やコモン変数とは
異なり、工作機械が有する複数種類の数値制御処理機能
に対応する変数番号(システム符号)が割り当てられて
いて、工作機械或はNC装置の内部状態等の状態量に応
じて決定される変数となるものである。
Furthermore, system variables are stored in the system variable memory described later, and unlike local variables and common variables, variable numbers (system codes) corresponding to the multiple types of numerical control processing functions possessed by the machine tool are assigned. It is a variable that is determined according to state quantities such as the internal state of the machine tool or NC device.

又、上記指令テープ21から読み込まれる指令プログラ
ムには、通常の指令のほかに、マクロ識別名を含むユー
ザマクロ呼出命令(ユーザマクロコール)がプログラム
され、適宜のプログラムス11 テップにて所定のユーザマクロを呼出すことにより、該
ユーザマクロに応じた処理の実行が可能である。このユ
ーザマクロ呼出命令は、少なくともG65(ユーザマク
ロ呼出しのG機能命令)と、例えばP9001 (Pは
9001がマクロ識別名であることを示すワードアドレ
ス、900 1はマクロ識別名)とを有している。
In addition to normal commands, the command program read from the command tape 21 is programmed with a user macro call command (user macro call) including a macro identification name, and is executed by a predetermined user at an appropriate program step 11. By calling a macro, it is possible to execute processing according to the user macro. This user macro calling instruction has at least G65 (G function instruction for user macro calling) and, for example, P9001 (P is a word address indicating that 9001 is a macro identification name, and 9001 is a macro identification name). There is.

23は紙テープリーグであり、指令テープ21,22に
穿孔されている指令を読取る。24はマクロ登録メモリ
であり、ユーザマクロ指令テーブ22から読取られた複
数のユーザマクロが該メモリに記憶される。25は判別
回路であり、26は通常処理部、27はユーザマクロ処
理部である。これら処理部26、27はそれぞれ演算部
、制御部、メモリ等を内蔵している。テープリーダ23
から判別回路25に読込まれた情報がユーザマクロ本体
であれば(ワードアドレスOにより識別する)、これを
マクロ登録メモリ24に転送記憶せしめ、通常指令であ
れば次段の通常処理部26へ送出し、又ユーザマクロ呼
出命令であれば該12 当するユーザマクロ処理部27へ送出する。尚、これら
処理部26、27を共通に構成してちまい。また通常の
指令とユーザマクロ本体とは1つのテープに混在するこ
とはなくそれぞれ別々のテープから入力される。
Reference numeral 23 denotes a paper tape league, which reads commands punched in the command tapes 21 and 22. 24 is a macro registration memory, and a plurality of user macros read from the user macro command table 22 are stored in this memory. 25 is a discrimination circuit, 26 is a normal processing section, and 27 is a user macro processing section. Each of these processing units 26 and 27 includes a calculation unit, a control unit, a memory, and the like. tape reader 23
If the information read into the discrimination circuit 25 is the user macro body (identified by the word address O), it is transferred to the macro registration memory 24 and stored therein, and if it is a normal command, it is sent to the next stage normal processing section 26. However, if it is a user macro calling command, it is sent to the corresponding user macro processing unit 27. Note that these processing units 26 and 27 are configured in common. Further, normal commands and user macro bodies are not mixed on one tape, but are input from separate tapes.

28は、工作機械が有する複数種類の数値制御処理機能
のそれぞれに対応するシステム符号が割り当てられると
ともに該システム符号に割り当てられた機能命令により
実行される処理内容を規定するシステム変数を記憶した
変数メモリであり、通常処理部26及びユーザマクロ処
理部27の双方から参照できるようになっている。各シ
ステム変数#iはその変数番号iに応じてシステム内で
の用途が固定される。
Reference numeral 28 denotes a variable memory in which system codes corresponding to each of the plurality of types of numerical control processing functions possessed by the machine tool are assigned, and system variables that define the processing contents to be executed by the function commands assigned to the system codes are stored. , and can be referenced by both the normal processing section 26 and the user macro processing section 27. The use of each system variable #i within the system is fixed according to its variable number i.

即ち、この変数メモリ28内のマクロ用DI領域では、
#1000〜#1035がそれぞれ工作機械との間で授
受される16ビットの入力信号からなるインタフェース
信号をその変数値として記憶し、マクロ用Do領域では
、#1100〜#1135がそれぞれ工作機械との間で
授受される16ビットの出力信号からなるインタフェー
ス信号をその変数値として記憶し、工具オフセット用領
域では、#2001〜#2099がそれぞれ99種類の
工具のオフセット量をその変数値として記憶し、マクロ
アラーム用領域では、#3000がマクロ中の誤りを検
出したときNC装置をアラームにする信号をその変数値
として記憶し、クロック領域では、#3001、#30
02がそれぞれ基準時刻からの経過時間に関するクロッ
ク信号をその変数値として記憶し、自動運転制御領域で
は、#3003がシングルブロック停止の抑制或はその
解除に関する信号をその変数値として記憶し、位置記憶
域では、#3004がフィードホールド、フィードレー
トオーバライドの無効或はその解除に関する信号をその
変数値として記憶し、モーダル情報領域では、#400
0〜#4012がそれぞれモーダル指令の現在値信号を
その変数値として記憶し、機械座標領域では、#500
1〜#5 1 04が各種機械位置をその変数値として
記憶している。
That is, in the macro DI area in this variable memory 28,
#1000 to #1035 each store an interface signal consisting of a 16-bit input signal exchanged with the machine tool as its variable value, and in the macro Do area, #1100 to #1135 respectively store the interface signal consisting of a 16-bit input signal exchanged with the machine tool. An interface signal consisting of a 16-bit output signal exchanged between the two is stored as its variable value, and in the tool offset area, #2001 to #2099 each store the offset amount of 99 types of tools as its variable value, In the macro alarm area, a signal that alarms the NC device when #3000 detects an error in the macro is stored as a variable value, and in the clock area, #3001, #30
02 stores a clock signal related to the elapsed time from the reference time as its variable value, and in the automatic operation control area, #3003 stores a signal related to suppression or cancellation of single block stop as its variable value, and position storage. In the area, #3004 stores a signal regarding invalidation or cancellation of feed hold and feed rate override as its variable value, and in the modal information area, #400
0 to #4012 respectively store the current value signal of the modal command as its variable value, and in the machine coordinate area, #500
1 to #5 1 04 store various machine positions as variable values.

29は、工作機械、表示ユニット、テープパンチャ等と
の入出力のインタフェースを司るインタフェイス回路で
ある。30は工作機械、31はMDI、32は表示ユニ
ット、33は操作盤である。34はアドレス変換ユニッ
トで、変数番号iを変数メモリ28のアドレスに変換す
る。
Reference numeral 29 denotes an interface circuit that controls input/output interfaces with machine tools, display units, tape punchers, and the like. 30 is a machine tool, 31 is an MDI, 32 is a display unit, and 33 is an operation panel. 34 is an address conversion unit that converts the variable number i into an address of the variable memory 28.

さて、予めユーザマクロ指令テープ22から複数のユー
ザマクロがユーザマクロ登録メモリ24に記憶されてお
り、この状態で指令テープ2lから指令プログラムが読
み込まれたものとする。読み込まれた指令が通常のNC
指令であれば、該NC指令は通常処理部26に入力され
、従来と同様のNC処理が実行される。又、指令がユー
ザマクロ呼出命令であれば、判別回路25はユーザマク
ロ登録メモリ24から該当するユーザマクロを呼び出し
、これをユーザマクロ処理部27に入力し、後述のユー
ザマクロ処理を行う。
Now, it is assumed that a plurality of user macros from the user macro instruction tape 22 are stored in the user macro registration memory 24 in advance, and in this state, an instruction program is read from the instruction tape 2l. The read command is a normal NC
If it is a command, the NC command is input to the normal processing section 26, and the same NC processing as the conventional one is executed. If the command is a user macro calling command, the discrimination circuit 25 calls the corresponding user macro from the user macro registration memory 24, inputs it to the user macro processing section 27, and performs user macro processing to be described later.

なお、指令テープ21、22からユーザマクロたけてな
く指令プログラムをもマクロ登録メモリ24に予め記憶
させておき、該記憶したNC指令1 5 を順次に読み出してNC処理を実行するいわゆるメモリ
運転方式とした場合には、NCの操作盤33上のモード
選択スイッチをテープ編集モードにしてプログラムの読
み込みを行い、その後NC処理に際しては該モード選択
スイッチを自動モードにする。
Note that the so-called memory operation method is used in which not only user macros but also command programs from the command tapes 21 and 22 are stored in the macro registration memory 24 in advance, and the stored NC commands 1 5 are sequentially read out to execute NC processing. In this case, the mode selection switch on the operation panel 33 of the NC is set to tape editing mode to read the program, and then the mode selection switch is set to automatic mode for NC processing.

次に本発明の作用を説明する。Next, the operation of the present invention will be explained.

(A)ユーザマクロの登録 (a)シングルブロック停止抑制マクロ指令テープの正
誤テストに際しては通常、1ブロック毎にテープを停止
させ、スタート釦が押される迄次のブロックに移行しな
いようにする、いわゆるシングルブロック制御が行われ
る。しかし、これではテープの正誤テストに時間がかか
ってしまいユーザによって時間短縮のため、所定のブロ
ックたとえばドリルサイクル(穴明けサイクル)におけ
る位置決め後の穴明けブロック、穴明け完了後の工具引
抜きブロック等を大きな1ブロックと見做し、これらの
ブロックにおいてシングルブロック制御を抑制したい場
合がある。
(A) User Macro Registration (a) Single Block Stop Suppression Macro Command When testing the accuracy of a tape, the tape is usually stopped block by block and does not move to the next block until the start button is pressed. Single block control is performed. However, this takes a long time to test whether the tape is correct or not, and in order to shorten the time, the user may use predetermined blocks such as a drilling block after positioning in a drill cycle, a tool pulling block after drilling is completed, etc. There are cases where it is desired to suppress single block control in these blocks, which are regarded as one large block.

1 6 今、第4図のような穴明けを行う場合、該穴明け指令ブ
ロックについてシングルブロックを抑制したいものとす
れば、以下のユーザマクロを作成してマクロ登録メモリ
24に登録すればよい。
16 Now, when drilling as shown in FIG. 4, if it is desired to suppress single blocks for the drilling command block, the following user macro may be created and registered in the macro registration memory 24.

尚、システム変数# 3003の変数値がlのときシン
グルブロックが抑制され、Oのときシングルブロックの
抑制が解除されるものとする。
It is assumed that when the variable value of system variable #3003 is l, single blocks are suppressed, and when it is O, single blocks are suppressed.

0 9081*・・・・・・・・・・・・・・・・・・
 マクロ識別名# 3003= 1*−・・・・・・・
・・・・・・・ シングルブロック抑制G 002 −
 # 18傘・・・・・・・・・ 穴明けGロIZ−#
26傘・・・・・・・・・ 穴明けGOOZ [#18
* +#26* ] *・・・ 工具引抜き# 300
3= 0*・・・・・・・・・・・・・・・・・・・・
・・・・・・・ 抑制解除M99*   ・・・・・・
・・・・・・・・・・・・・・・・・・・・・ マクロ
終り(b)フィードホールド、フィードレートオーバー
ライドの無効 ユーザによってはネジ切り、タッピングをプログラムす
るときフィードホールドを無効にしたり、オーバライド
を100%に保持したい場合がある。この場合にはフィ
ードホールド、オーバライド無効のシステム変数を1 
3004とし、このシステム変数#3004が1のとき
無効、Oのとき無効解除と決めて、前記(a)のシング
ルブロック停止の抑制マクロと同様に、ユーザマクロを
作成し変数メモリ28内に登録する。尚、以下はユーザ
マクロの一例でタッピングサイクル(G84)にフィー
ドホールド、オーバライド無効を適用したものである。
0 9081*・・・・・・・・・・・・・・・・・・
Macro identification name #3003= 1*-・・・・・・・・・
...... Single block suppression G 002 -
#18 Umbrella・・・・・・ Hole Gro IZ-#
26 Umbrella・・・・・・ Hole GOOZ [#18
* +#26* ] *... Tool removal #300
3 = 0*・・・・・・・・・・・・・・・・・・
...... Suppression release M99* ...
・・・・・・・・・・・・・・・・・・・・・ End of macro (b) Disabling feed hold and feed rate override Some users may disable feed hold when programming thread cutting or tapping. Or you may want to keep the override at 100%. In this case, set the feed hold and override invalid system variables to 1.
3004, and determine that system variable #3004 is invalid when it is 1 and invalidated when it is O, and create a user macro and register it in the variable memory 28 in the same way as the single block stop suppression macro in (a) above. . The following is an example of a user macro in which feed hold and override invalidation are applied to the tapping cycle (G84).

0 9084*・・・・・・・・・ マクロ識別名# 
3003= 11・・・・・・ シングルブロック停止
抑制G 002 − # 18* # 3QO4= 1*・・・・・・ フィードホールド
等無効G 012 − # 26* M05* M04* Z # 26* # 3004= 0*・・・・・・ フィードホールド
等無効解除M05* M03* G 002 # 18* # 3003= 0・・・ シングルブロック停止抑制
解除M99* CB)ユーザマクロ呼出命令 ユーザマクロ呼出命令は、指令テープ21にプログラム
しておくことによりマクロ登録メモリ24から所定のユ
ーザマクロを呼出してユーザマクロ処理部27により数
値制御処理を実行させる命令で、少なくとも G65P(マクロ識別名) が指令される。
0 9084*... Macro identification name #
3003 = 11... Single block stop suppression G 002 - # 18 * # 3 QO4 = 1 *... Feed hold etc. invalid G 012 - # 26 * M05 * M04 * Z # 26 * # 3004 = 0*... Canceling invalidation of feed hold, etc. M05* M03* G 002 #18* #3003= 0... Canceling single block stop suppression M99* CB) User macro call command User macro call command is a command At least G65P (macro identification name) is commanded by a command to call a predetermined user macro from the macro registration memory 24 by programming on the tape 21 and cause the user macro processing section 27 to execute numerical control processing.

さて、指令テープ21からテープリーダ23により指令
が読込まれれば、判別回路25はユーザマクロ呼出命令
か否かの判定を行い、ユーザマクロ呼出命令でなければ
通常処理部26は該指令に基いた処理を行って工作機械
を制御し、一方ユーザマクロ呼出命令であれば、該呼出
命令のワードアドレスPのあとに指示されているマクロ
識別名を有するユーザマクロに含まれるマクロ命令に従
って、マクロ登録メモリ24から所定のシステム符号に
対応する変数レジスタの内容を呼出してユ1 9 一ザマクロ処理部27に引渡し、マクロ処理を実行させ
工作機械をユーザマクロに応じて制御する。
Now, when a command is read by the tape reader 23 from the command tape 21, the determination circuit 25 determines whether it is a user macro call command or not. If it is a user macro call command, the macro registration memory is stored in accordance with the macro command included in the user macro having the macro identification name specified after the word address P of the call command. The contents of the variable register corresponding to a predetermined system code are called from 24 and transferred to the macro processing section 27, which executes macro processing and controls the machine tool according to the user macro.

(発明の効果) 以上、本発明においてはユーザマクロを予め、複数登録
しているマクロ登録メモリからユーザマクロ呼出命令に
より所定のユーザマクロを呼出し、マクロ処理部におい
て該ユーザマクロに応じたマクロ処理を実行する際に、
CNCのソフトウェアをその都度改善するのではなく、
システム符号に割り当てられた機能命令により実行され
る処理内容が、システム変数を任意に変更して工作機械
が有する複数種類の数値制御処理機能に対応したシステ
ム符号を指定するだけで、必要とされる特殊の数値制御
処理機能を選択して実行できる。したがってユーザは何
等CNCのソフトウエアを改造することなく、単に該特
殊制御のユーザマクロを作成し、マクロ登録メモリに記
憶させ、指令テープなどの適所に該ユーザマクロ呼出命
令をプログラムするだけでよい。
(Effects of the Invention) As described above, in the present invention, a predetermined user macro is called from a macro registration memory in which a plurality of user macros are registered in advance by a user macro call command, and the macro processing unit performs macro processing according to the user macro. When executing
Rather than improving CNC software each time,
The processing content to be executed by the function command assigned to the system code can be changed simply by arbitrarily changing the system variables and specifying the system code that corresponds to the multiple types of numerical control processing functions that the machine tool has. Special numerical control processing functions can be selected and executed. Therefore, the user need only create a user macro for the special control, store it in the macro registration memory, and program the user macro call command in an appropriate location on a command tape, etc., without modifying the CNC software in any way.

2 0 この結果、ソフトウェアの改造に要する労力と時間を省
くことができ低コストで、しかもユーザの要望に適合し
たCNCを提供できる。又、ユーザマクロを使用するこ
とによって、機械、システムにマッチした特殊仕様や、
ユーザ独自の固定サイクルや自動プログラミングが実現
可能となった。
20 As a result, the labor and time required for modifying the software can be saved, and a CNC that meets the user's needs can be provided at low cost. In addition, by using user macros, you can create special specifications that match the machine or system.
User-specific canned cycles and automatic programming are now possible.

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

第1図は従来の数値制御装置のブロック図、第2図は本
発明に係るCNCのブロック図、第3図は指令プログラ
ムの一例を示す説明図、第4図は穴明けサイクルの説明
図である。 21・・・指令テープ、22・・・ユーザマクロ指令テ
ープ、23・・・テープリーグ、24・・・マクロ登録
メモリ、25・・・判別回路、26・・・通常処理部、
27・・・ユーザマクロ処理部、28・・・変数メモリ
、29・・・インタフェース回路。
Fig. 1 is a block diagram of a conventional numerical control device, Fig. 2 is a block diagram of a CNC according to the present invention, Fig. 3 is an explanatory diagram showing an example of a command program, and Fig. 4 is an explanatory diagram of a drilling cycle. be. 21... Command tape, 22... User macro command tape, 23... Tape league, 24... Macro registration memory, 25... Discrimination circuit, 26... Normal processing section,
27... User macro processing unit, 28... Variable memory, 29... Interface circuit.

Claims (1)

【特許請求の範囲】[Claims] マクロ識別名を含むユーザマクロ呼出命令がプログラム
された指令プログラムに基づいて数値制御処理を実行し
、該処理結果により工作機械を駆動してワークに指令通
りの加工を施す数値制御装置において、シングルブロッ
ク停止を抑制する機能、フィードホールド指令を無効に
する機能、或は送り速度指令にオーバライドをかける機
能を示す信号、及びオーバライドされた送り速度を含ん
でいる前記工作機械とのインタフェイスと、このインタ
フェイスを介して前記工作機械の状態情報を代表する状
態量を変数値とするシステム変数を記憶した変数メモリ
と、1ないし複数のシステム変数を含み前記マクロ識別
名により識別可能な複数の機能命令をマクロ命令として
予め記憶しているマクロ登録メモリと、このマクロ登録
メモリから前記マクロ命令を呼び出したとき前記変数メ
モリからマクロ命令に含まれるシステム変数を読出しこ
のシステム変数を用いて工作機械の状態情報を読み取り
その内容に応じて前記マクロ登録メモリから読出された
マクロ命令に従って所定の数値制御処理を実行するマク
ロ処理手段とを有することを特徴とする数値制御装置。
A single block is used in a numerical control device that executes numerical control processing based on a command program in which a user macro call command including a macro identification name is programmed, and drives a machine tool based on the processing results to machine a workpiece according to the command. An interface with the machine tool including a signal indicating a function to suppress a stop, a function to disable a feed hold command, or a function to override a feed rate command, and an overridden feed rate; a variable memory storing system variables whose variable values are state quantities representative of the state information of the machine tool through the interface; and a plurality of function instructions including one or more system variables and identifiable by the macro identifier. A macro registration memory is stored in advance as a macro instruction, and when the macro instruction is called from this macro registration memory, a system variable included in the macro instruction is read from the variable memory and the machine tool status information is obtained using this system variable. A numerical control device comprising macro processing means for executing a predetermined numerical control process according to a macro instruction read out from the macro registration memory according to the read content.
JP20186490A 1990-07-30 1990-07-30 Numerical controller Pending JPH03206503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20186490A JPH03206503A (en) 1990-07-30 1990-07-30 Numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20186490A JPH03206503A (en) 1990-07-30 1990-07-30 Numerical controller

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP7099780A Division JPS56168223A (en) 1980-05-28 1980-05-28 Numerical value control system

Publications (1)

Publication Number Publication Date
JPH03206503A true JPH03206503A (en) 1991-09-09

Family

ID=16448158

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20186490A Pending JPH03206503A (en) 1990-07-30 1990-07-30 Numerical controller

Country Status (1)

Country Link
JP (1) JPH03206503A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5295469B1 (en) * 2012-10-30 2013-09-18 三菱電機株式会社 Numerical controller

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56168223A (en) * 1980-05-28 1981-12-24 Fanuc Ltd Numerical value control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56168223A (en) * 1980-05-28 1981-12-24 Fanuc Ltd Numerical value control system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5295469B1 (en) * 2012-10-30 2013-09-18 三菱電機株式会社 Numerical controller
WO2014068650A1 (en) * 2012-10-30 2014-05-08 三菱電機株式会社 Numerical control device
CN103907067A (en) * 2012-10-30 2014-07-02 三菱电机株式会社 Numerical control device

Similar Documents

Publication Publication Date Title
US4209847A (en) Computerized numerical controller for a machine apparatus
US9846424B2 (en) Numerical control apparatus
JPH0467201B2 (en)
US5128857A (en) Sequence control apparatus having separate sequence memory and interlock condition memory
JPH0551419B2 (en)
CN101025622A (en) Numerical controller
EP0230471B1 (en) Manual operation system for machine controlled by numerical control unit
EP0078326B1 (en) Numerical control system
JPH03290707A (en) Numerical controller
JPH03206503A (en) Numerical controller
JPS6347805A (en) Override playback system
JPH03196309A (en) Numerical controller
JPH03206505A (en) Numerical controller
JPH06318109A (en) Numerical controller
JPH03196308A (en) Numerical controller
JPH03206504A (en) Numerical controller
JPH03196307A (en) Numerical controller
JP4549051B2 (en) Machine tool axis control device, machine tool axis control program
JP2588944B2 (en) How to create NC data
WO1989002110A1 (en) Cnc program execution apparatus
JPH055123B2 (en)
JPH0336606A (en) Numerical controller
KR100412740B1 (en) Open-type numerical control apparatus
JP2642451B2 (en) Numerical control unit
JP3060515B2 (en) Production control device