JPS6275710A - Numerical controller provided with character-string variable function of macro - Google Patents

Numerical controller provided with character-string variable function of macro

Info

Publication number
JPS6275710A
JPS6275710A JP21560285A JP21560285A JPS6275710A JP S6275710 A JPS6275710 A JP S6275710A JP 21560285 A JP21560285 A JP 21560285A JP 21560285 A JP21560285 A JP 21560285A JP S6275710 A JPS6275710 A JP S6275710A
Authority
JP
Japan
Prior art keywords
character string
macro
block
character
ram
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
JP21560285A
Other languages
Japanese (ja)
Inventor
Atsushi Shima
淳 島
Naoki Fujita
直樹 藤田
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 JP21560285A priority Critical patent/JPS6275710A/en
Publication of JPS6275710A publication Critical patent/JPS6275710A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce an area for storing macros, by treating character strings used in a macro as character-string variables. CONSTITUTION:A microprocessor 1 reads a macro one block by one block from a magnetic bubble memory 4 and stores commanded character strings in a prescribed area of a RAM 3. Then the microprocessor 1 stores a character string which is formed by adding the character string stored in the prescribed area of the RAM 3 to a character string commanded by the current block in another prescribed area of the RAM 3, or stores a character string which is formed by adding a character string commanded by a read block to the character string stored in the prescribed area of the RAM 3 in another prescribed area of the RAM 3. Therefore, the program quantity of a macro which uses numerous character strings, whose parts are common, can be reduced and effective utilization of a memory can be realized.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマクロに於いて使用する文字列を文字列変数と
して扱うことにより、マクロの記1意領域を少なくする
ことができる数値制御装置に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a numerical control device that can reduce the unique memory area of a macro by treating character strings used in the macro as character string variables. It is something.

〔従来の技術〕[Conventional technology]

定まったサイクルで加工を行なう場合等、そのサイクル
をマクロとしてメモリに予め記1.qさせておき、G6
5を含むブロックによって必要とするマクロを呼出すと
共に引数を指定し、引数が指定されたマクロに従って制
御を行なうと言うことが従来より行なわれている。
When machining is performed in a fixed cycle, the cycle is recorded in memory as a macro in advance.1. Let me go, G6
Conventionally, a necessary macro is called by a block including 5, an argument is specified, and control is performed according to the macro to which the argument is specified.

下記のa〜には長方形を加工する場合のマクロを示した
ものである。
Macros for processing a rectangle are shown in a~ below.

01234−“a 1F(#26EQttO]GOTO100;   ”−
bIF C#27 EQ #0) GOTO110; 
  −cGOTO120ニー’  d N   100   #3000= 123   (D
ATA  ERRORX)   ;  −e   、N
   110   #3000=123   (DAT
A  ERRORY)   1−fN  120  G
oIX#26;       −一−・ gY#27;
              −−−hx −# 26
 ;             −−lY−#27i 
            〜−−jM99;     
          −−kそして、このプログラム番
号1234のマクロを用いて長方形を加工する場合は、
下記lに示ずG65を含むブロックにより上記マクロを
呼出すと共に引数を指定するものである。
01234-“a 1F(#26EQttO]GOTO100; ”-
bIF C#27 EQ #0) GOTO110;
-cGOTO120 knee' d N 100 #3000= 123 (D
ATA ERRORX); -e, N
110 #3000=123 (DAT
A ERRORY) 1-fN 120 G
oIX#26; -1-・gY#27;
---hx -# 26
;--lY-#27i
~---jM99;
--kAnd when processing a rectangle using this macro with program number 1234,
The block containing G65, shown in 1 below, calls the above macro and specifies the argument.

G65P1234  XAx  Yly ;   ・−
一−−l数値制御装置は上記G65を含むブロックβを
読取ると、長方形加工用のマクロa −kを読込み、次
いで変数#26. #27にそれぞれI!x、lyを与
え、次いでマフロブ〜kに従って長方形の加工を行なう
ものである。このように、定まったサイクルで加工を行
なう場合等、そのサイクルをマクロとしてメモリに予め
登録しておくことにより、加ニブログラムの作成を容易
なものとすることが可能となる。
G65P1234 XAx Yly; ・-
1--l When the numerical control device reads block β including the above G65, it reads macros a-k for rectangular processing, and then variables #26. I for each #27! x, ly are given, and then a rectangular shape is processed according to maflob ~k. In this way, when machining is performed in a fixed cycle, by pre-registering the cycle as a macro in the memory, it is possible to easily create a carnivorous program.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかし、上述した従来例には次のような問題点があった
。上記したマクロは引数の指定忘れをチェックするため
、ブロックb、c、e、fを有し、また、プロ、りel
 fには文字列が使用されている。尚、ブロックb、c
はそれぞれ変数#26.#27が指定されていない場合
はN 100 、 N 110の処理を行なえと言う命
令であり、また、ブロックe。
However, the conventional example described above has the following problems. The above macro has blocks b, c, e, and f to check if an argument has been forgotten, and also has blocks b, c, e, and f.
A character string is used for f. Furthermore, blocks b and c
are respectively variable #26. If #27 is not specified, this is an instruction to perform the processing of N 100 and N 110, and block e.

[はそれぞれrDATA ERRORXJ 、  rD
ATA ERRORY」を表示装置に表示せよと言う命
令である。このように、マクロ中に於いて文字列を使用
することがあるが、従来は文字列をマクロ中に於いて直
接指令しなければならなかったため、多種類の文字列を
使用したい場合は、多数の文字例を指令したマクロ文を
用意しなければならず、プログラムが大きくなり、マク
ロを記憶するために多くの領域が必要となる問題があっ
た。
[respectively rDATA ERRORXJ, rD
This is a command to display "ATA ERRORY" on the display device. In this way, strings are sometimes used in macros, but in the past, strings had to be directly commanded in macros, so if you wanted to use many different types of strings, you could It is necessary to prepare a macro statement that commands example characters, which causes the problem that the program becomes large and a large amount of space is required to store the macro.

本発明は前述の如き問題点を解決したものであり、マク
ロに多くの文字列を使用する場合に於いても、マクロを
記↑、aする領域を少なくできるようすることにある。
The present invention solves the above-mentioned problems, and aims to reduce the area in which macros are written even when a large number of character strings are used in macros.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は前述の如き問題点を解決するため、マクロ呼出
指令により、マクロを呼出し、該マクロに従った制御を
行なう数値制御装置に於いて、前記マクロ中の登録指令
により指令された文字列を記1なする記憶手段と、前記
マクロ中の付加指令により指令された文字列を前記記4
9手段に記1.つされている文字列に付加する付加手段
とを設けたものである。
In order to solve the above-mentioned problems, the present invention calls a macro by a macro call command, and in a numerical control device that performs control according to the macro, the character string commanded by the registration command in the macro is The storage means described in item 1 and the character string instructed by the addition command in the macro are stored in item 4.
9 Means 1. This is provided with an addition means for adding to the character string that is being written.

〔実施例〕〔Example〕

第1図は本発明の実施例のブロック線図であり、1はマ
イクロプロセッサ、2はROM、3はRAM、4は磁気
バブルメモリ、5は表示装置、6はテープリーダ、7は
軸制御部、8は増幅器、9はモータ、10は位置検出器
である。また、第2図は、マイクロプロセッサ1の処理
内容の一部を示すフローチャートであり、以下同図を参
照して第1図の動作を説明する。
FIG. 1 is a block diagram of an embodiment of the present invention, in which 1 is a microprocessor, 2 is a ROM, 3 is a RAM, 4 is a magnetic bubble memory, 5 is a display device, 6 is a tape reader, and 7 is an axis control unit. , 8 is an amplifier, 9 is a motor, and 10 is a position detector. Further, FIG. 2 is a flowchart showing part of the processing contents of the microprocessor 1, and the operation of FIG. 1 will be explained below with reference to the same figure.

また、下記のa゛〜n°は長方形を加工する場合のマク
ロの一例を示したものである。尚、これらは磁気バブル
メモリ4に記1.aされているものである。
In addition, the following symbols a-n° show examples of macros for processing a rectangle. Note that these are written in the magnetic bubble memory 4 in 1. a.

0 1234              −m−−a
’#9000= (DATA ERROI?)  ; 
     −’−b’IF (#26  EG  # 
0)  GOTo  100  ;    −−−c’
IF(#27EQ#0)GOTOIIO;    −・
−d゛GOTo  130 ;           
       −−−−e’N  100  #900
0=+  (X)  ;       −f’GOTO
120;                −g’N 
 110  #9000−+  (Y)  ;    
     −h’N  120  #3000= 12
3 #9000;      −−−−−i’N  1
30GOI  X #26 ;          −
−−j’Y#27;                
   −m−−・ k゛X−#26;        
          −−−−l゛Y   #27; 
                 −一−m”M 9
9 ;                      
 −−−−n’マイクロプロセッサ1は前記した形式β
のブロックを読込むと、磁気バブルメモリ4からマクロ
を1ブロツクずつ読込み、第2図のフローチャートに従
った処理を行なう。マイクロプロセッサ1はSJδ取っ
たブロックがr#9000= (文字列)」の形式を有
していると判断した場合は(ステップS3)はあε取っ
たブロックによって指令された文字列をRA M 3の
所定領域#Aに記1.aさせ(ステ。
0 1234 -m--a
'#9000= (DATA ERROI?);
-'-b'IF (#26 EG #
0) GOTo 100; ---c'
IF (#27EQ#0) GOTOIIO; -・
-d゛GOTo 130;
-----e'N 100 #900
0=+ (X); -f'GOTO
120; -g'N
110 #9000-+ (Y);
-h'N 120 #3000= 12
3 #9000; -----i'N 1
30 GOI X #26; -
--j'Y#27;
-m--・k゛X-#26;
-----l゛Y #27;
-1-m"M 9
9;
-----n' microprocessor 1 is of the above format β
When the block is read, macros are read block by block from the magnetic bubble memory 4, and processing according to the flowchart in FIG. 2 is performed. If the microprocessor 1 determines that the block from which SJδ is taken has the format r#9000=(character string) (step S3), it stores in RAM 3 the character string commanded by the block from which Aε is taken. In the predetermined area #A, write 1. Let's do it (Ste.

プS7)、読取ったブロックがr#9000= (文字
列)+;」の形式を有していると判断した場合は(ステ
ップS4)、読取ったブロックにより指令された文字列
の後にRAM3の所定領域#Aに記1.9されている文
字列を追加した文字列をRAM3の所定領域#Bに記憶
させ(ステップS8)、読取ったブロックがr#900
0=+ (文字列)」の形式を有していると判断した場
合は(ステップS5) 、RAM3の所定領域#Aに記
憶されている文字列の後に読取ったブロックで指令され
た文字列を追加した文字列をRAM3の所定領域#Bに
記憶させ(ステップS9)、読取ったブロックが「# 
3000= 123 # 9000Jの形式を有してい
ると判断した場合は(ステップS2) 、RAM3の所
定領域#Bに記憶されている文字列を表示装置5に表示
させるものである。
step S7), if it is determined that the read block has the format r#9000=(character string)+;'' (step S4), a predetermined value in RAM3 is written after the character string commanded by the read block. A character string to which the character string 1.9 written in area #A is added is stored in a predetermined area #B of RAM 3 (step S8), and the read block is r#900.
0 = + (character string)'' (step S5), the character string commanded in the block read after the character string stored in the predetermined area #A of RAM 3 is read. The added character string is stored in a predetermined area #B of RAM 3 (step S9), and the read block is “#”.
If it is determined that the character string has the format 3000=123#9000J (step S2), the character string stored in the predetermined area #B of the RAM 3 is displayed on the display device 5.

例えば、上記したマクロa°〜n°を例にとってマイク
ロプロセッサ1の処理内容を説明すると次のようになる
For example, the processing contents of the microprocessor 1 will be explained as follows, taking the above-mentioned macros a° to n° as an example.

プログラム番号を示すブロックa゛に引続きブロックb
゛を読込むと、マイクロプロセッサ1は該ブロックb゛
がr#9000= (文字列);」の形式を有している
ので(ステップs3)、該ブロックb″により指令され
た文字列rDATA ERRORJをRAM3の所定領
域#Aに記憶させ(ステップs7)、次いでブロックC
゛を読取る(ステップSl)。ブロックC゛を読取るこ
とにより、マイクロプロセッサ1は変数#26が指定さ
れているか否かを判断しくステップ510)、変数#2
6が指定されていると判断した場合はブロックd“を読
込み、指定されていないと判断した場合はプロ・7りf
oを読込む(ステップSL、10)。ステップSIOで
変数#26が指定されていると判断し、ブロックd゛を
読込んだ場合は、マイクロプロセッサ1は変数#27が
指定されているか否かを判断しくステップ5IO)、変
数#27が指定されていると判断した場合はブロックg
”を読込んで長方形の加工を開始しくステップ5IO)
、変数#27が措定されていないと判断した場合はブロ
ックh゛を読込む(ステップSl、10)。
Following block a゛ indicating the program number, block b
When reading ", the microprocessor 1 reads the string rDATA ERRORJ commanded by the block b" because the block b has the format r#9000=(character string); (step s3). It is stored in a predetermined area #A of RAM3 (step s7), and then block C
(Step Sl). By reading block C', microprocessor 1 determines whether variable #26 is specified (step 510), variable #2
If it is determined that 6 is specified, read the block d", if it is determined that it is not specified, read the block 7ri f
o is read (step SL, 10). If it is determined in step SIO that variable #26 is specified and block d is read, the microprocessor 1 determines whether variable #27 is specified (step 5IO) and reads block d''. If it is determined that it is specified, block g
” to start processing the rectangle (Step 5IO)
, if it is determined that variable #27 is not set, block h' is read (step Sl, 10).

そして、ステップSIOで変数#26が指定されていな
いと判断し、ブロックf゛を読込んだ場合は、該ブロッ
クf“がr#9000−+ (文字列)」の形式を有し
ているので(ステップS5)、マイクロプロセッサ1は
RAM3の所定領域Aに記憶されている文字列(この場
合はDATA ERROR)の後に該ブロックf′で指
令された文字列(この場合はX)を追加した文字列rD
ATA ERRORXJをRAM3の所定領域#Bに記
憶させる(ステップS9)。また、ステップSIOで変
数#27が指定されていないと判断し、ブロックh゛を
読込んだ場合は、該ブロックh′がr#9000=+ 
(文字列)」の形式を有しているので(ステップS5)
、マイクロプロセッサ1はRAM3の所定領域へに記憶
されている文字列(この場合はDATA ERROR)
の後に該ブロックh′で指令された文字列(この場合は
Y)を追加した文字列rDATA ERRORYJをR
AM3の所定領域#Bに記憶させる(ステップS9)。
Then, if it is determined in step SIO that variable #26 is not specified and block f is read, the block f has the format r#9000-+ (character string). (Step S5), the microprocessor 1 adds the character string commanded in block f' (X in this case) after the character string (DATA ERROR in this case) stored in the predetermined area A of the RAM 3. Column rD
ATA ERRORXJ is stored in a predetermined area #B of the RAM 3 (step S9). Also, if it is determined in step SIO that variable #27 is not specified and block h' is read, the block h' is r#9000=+
(character string)" (step S5)
, the microprocessor 1 reads the character string (DATA ERROR in this case) stored in a predetermined area of the RAM 3.
R the character string rDATA ERRORYJ, which is followed by the character string commanded in the block h' (Y in this case).
It is stored in a predetermined area #B of AM3 (step S9).

そして、ブロックf゛或いはブロックh゛の処理が終了
すると、マイクロプロセッサ1はブロックi゛を読込む
。ブロックi゛はr # 3000= 123 # 9
000Jの形式を有しているので(ステップS2)、マ
イクロプロセッサ1はRAM3の所定領域#Bに記憶さ
れている文字列(この場合はrDATA ERRORX
」或いはr DATA ERRORYJ ’Iを表示装
置5に表示させた後(ステップS6)、その処理を終了
する。
Then, when the processing of block f' or block h' is completed, microprocessor 1 reads block i'. Block i is r # 3000 = 123 # 9
000J format (step S2), the microprocessor 1 reads the character string (in this case rDATA ERRORX) stored in the predetermined area #B of the RAM 3.
” or r DATA ERRORYJ 'I is displayed on the display device 5 (step S6), and the process is ended.

このように、本実施例はマクロ中のブロックb’によっ
て指令された文字列rDATA IERRORJをRA
M3の所定領域#Aに記憶させておき、この文字列rD
ATA ERRORJを一部とする文字列を指令する場
合は、ブロックf’、h’のように文字列rDATAE
RRORJに追加する文字列のみを指令すれば良いもの
であるから、従来例に比較してマクロのプログラム量を
少ないものとすることができる。特に、一部が共通な文
字列を多数使用する場合は有効である。
In this way, this embodiment converts the character string rDATA IERRORJ commanded by block b' in the macro into RA
This character string rD is stored in a predetermined area #A of M3.
When specifying a character string that includes ATA ERRORJ as a part, use the character string rDATAE like blocks f' and h'.
Since it is only necessary to instruct the character string to be added to RRORJ, the amount of macro programming can be reduced compared to the conventional example. This is especially effective when using a large number of character strings that have some common parts.

尚、上述した実施例に於いてはrDATA ERROR
Jを登録し、rXJ或いはrYJを付加するようにした
が、登録する文字列、付加する文字列はこれに限られる
ものではなく、また、複数種類の文字列を登録しておく
ようにしても良いことは勿論である。
In addition, in the embodiment described above, rDATA ERROR
J is registered and rXJ or rYJ is added, but the character strings to be registered and the character strings to be added are not limited to these.Also, even if multiple types of character strings are registered, Of course it's a good thing.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、マクロ中の登録指令〔実
施例に於いては#9000= (文字列)の形式で表さ
れるブロック〕により指令された文字列を記憶する記憶
手段〔実施例に於いてはRAM3の所定領域#A〕と、
マクロ中の付加指令〔実施例に於いては#9000=+
 (文字列)或いは# 9000=(文字列)十の形式
で表されるブロック〕により指令された文字列を記憶手
段に記憶されている文字列に付加する付加手段(実施例
に於いてはマイクロプロセッサ1でステップS8.9の
処理を行なうことにより実現する)とを備えたものであ
るから、一部が共通な文字列を多数使用するマクロのプ
ログラム量を少なくし、メモリの有効利用を図れる利点
がある。
As explained above, the present invention provides a storage means [embodiment In this case, the predetermined area #A of RAM3] and
Additional command in macro [#9000=+ in the example
(Character string) or #9000 = (Character string) A block expressed in the format of tens] is added to the character string stored in the storage means. This is achieved by performing the processing in step S8.9 on the processor 1), so the amount of macro programs that use a large number of partially common character strings can be reduced, and memory can be used effectively. There are advantages.

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

第1図は本発明の実施例のブロック線図、第2図はマイ
クロプロセッサ1の処理内容を示すフローチャー1・で
ある。 1はマイクロプロセッサ、2はROM、3はRAM、4
は磁気バブルメモリ、5は表示装置、6はテープリーグ
、7は軸制御部、8は増幅器、9はモータ、10は位置
検出器である。 特許出願人 ファナック株式会社 代理人弁理士玉蟲久五部(外2名) 本発明の実施例のブロック線図 第 1 図 一郭と示すフローチャート 第2図
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a flowchart 1 showing the processing contents of the microprocessor 1. 1 is a microprocessor, 2 is a ROM, 3 is a RAM, 4
1 is a magnetic bubble memory, 5 is a display device, 6 is a tape league, 7 is an axis control section, 8 is an amplifier, 9 is a motor, and 10 is a position detector. Patent applicant: FANUC Co., Ltd. Representative Patent Attorney Gobe Tamamushi (2 others) Block diagram of the embodiment of the present invention No. 1 Flowchart shown in Figure 2

Claims (1)

【特許請求の範囲】 マクロ呼出指令により、マクロを呼出し、該マクロに従
った制御を行なう数値制御装置に於いて、前記マクロ中
の登録指令により指令された文字列を記憶する記憶手段
と、 前記マクロ中の付加指令により指令された文字列を前記
記憶手段に記憶されている文字列に付加する付加手段と
を備えたことを特徴とするマクロの文字列変数機能を備
えた数値制御装置。
[Scope of Claims] In a numerical control device that calls a macro in response to a macro call command and performs control according to the macro, a storage means for storing a character string commanded by a registration command in the macro; 1. A numerical control device equipped with a macro character string variable function, characterized in that it is provided with an addition means for adding a character string commanded by an addition command in a macro to a character string stored in the storage means.
JP21560285A 1985-09-28 1985-09-28 Numerical controller provided with character-string variable function of macro Pending JPS6275710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21560285A JPS6275710A (en) 1985-09-28 1985-09-28 Numerical controller provided with character-string variable function of macro

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21560285A JPS6275710A (en) 1985-09-28 1985-09-28 Numerical controller provided with character-string variable function of macro

Publications (1)

Publication Number Publication Date
JPS6275710A true JPS6275710A (en) 1987-04-07

Family

ID=16675147

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21560285A Pending JPS6275710A (en) 1985-09-28 1985-09-28 Numerical controller provided with character-string variable function of macro

Country Status (1)

Country Link
JP (1) JPS6275710A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59123008A (en) * 1982-12-29 1984-07-16 Fanuc Ltd Forming method of part program
JPS59195709A (en) * 1983-04-21 1984-11-06 Fanuc Ltd Data input device of numerical controller
JPS60126712A (en) * 1983-12-14 1985-07-06 Fanuc Ltd Preparing method of nc data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59123008A (en) * 1982-12-29 1984-07-16 Fanuc Ltd Forming method of part program
JPS59195709A (en) * 1983-04-21 1984-11-06 Fanuc Ltd Data input device of numerical controller
JPS60126712A (en) * 1983-12-14 1985-07-06 Fanuc Ltd Preparing method of nc data

Similar Documents

Publication Publication Date Title
KR830006725A (en) Numerical Control Method
US4525776A (en) Arithmetic logic unit arranged for manipulating bits
JPS6275710A (en) Numerical controller provided with character-string variable function of macro
JPH0721793B2 (en) Table processor
US4956765A (en) Apparatus for processing numerical control program
JPH0522944B2 (en)
JPS6149209A (en) Program execution system of numerical controller
JPS63318605A (en) Nc part program generating device
JP2762665B2 (en) Blog programming device for programmable controller
JPS5942332B2 (en) Program loading method
JPS59172007A (en) Numerical controller
WO1986000428A1 (en) Method of correcting system program
JP2708983B2 (en) Program display device
JP2000214921A (en) Display device
JPS61184693A (en) Access system of electronic device
JPS6232540A (en) Information processor
JPS62147555A (en) Integrated circuit incorporating program
JPS61279935A (en) Program processing system
JPS60129837A (en) Signal processing operation processor
JPS60169906A (en) Programmable controller
JPH0470642B2 (en)
JPS61262810A (en) Program generating device
JPH05143391A (en) Memory tracing method for virtual storage type computer
JPH01134393A (en) Font data generator
JPH04215148A (en) Programmable controller