JPH03167603A - Pre-read controller for nc program - Google Patents

Pre-read controller for nc program

Info

Publication number
JPH03167603A
JPH03167603A JP30652089A JP30652089A JPH03167603A JP H03167603 A JPH03167603 A JP H03167603A JP 30652089 A JP30652089 A JP 30652089A JP 30652089 A JP30652089 A JP 30652089A JP H03167603 A JPH03167603 A JP H03167603A
Authority
JP
Japan
Prior art keywords
numerical data
read
ahead
program
block
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
JP30652089A
Other languages
Japanese (ja)
Inventor
Noriya Kawai
河井 典也
Mitsutaka Sumita
住田 光隆
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP30652089A priority Critical patent/JPH03167603A/en
Publication of JPH03167603A publication Critical patent/JPH03167603A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To suppress the increase of the memory using frequency and to reduce the processing time of the numerical data by compressing, saving and restoring the changing extent of the pre-read numerical data during a correction mode. CONSTITUTION:A conversion means 2 reads a block 11a of a working program 1. When the block 11a is not equal to the end of an NC program, a program written into the block 11a is analyzed and converted into the numerical data. This data is stored in a numerical data buffer 31a of a buffer 3. A CPU 4 decides whether the stored block 11a is kept in a correction mode or not. If a correcting calculation is not finished yet and the stored data requires no compressing/saving process, a pre-read operation is required for execution of the correcting calculation. In such a case, the reading position of the program 1 is advanced to the next block 11b. Then the data is stored in a buffer 31b and compared with the data stored in the buffer 31a, and a changing extent produced between both data is stored in a changing extent store buffer 6. This operation is repeated for execution of the correcting calculations with use of those data stored in the buffers 31a - 31c.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は数値制御装置に読込まれるNCプログラムの
複数ブロックを先読みしてメモリに格納する先読み制御
装置、特にメモリ使用量の低減化に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a read-ahead control device that reads in advance multiple blocks of an NC program read into a numerical control device and stores them in memory, and particularly relates to a reduction in memory usage. It is.

[従来の技術] 数値制御装置の処理速度を向上させるために、加工プロ
グラムを読取るフエツチサイクルと実行サイクルとをオ
ーバラップさせて、実効上フエツチサイクルにかかる時
間を無視できるようにするNCプログラムの先読み制御
が従来・から行われている。
[Prior Art] In order to improve the processing speed of a numerical control device, an NC program is created in which a fetch cycle for reading a machining program overlaps an execution cycle so that the time required for the fetch cycle can be effectively ignored. Look-ahead control has traditionally been performed.

第4図は従来のNCプログラムの先読み制御を示す模式
図である。図において、〈l〉は複数のブロック(ll
a)〜(lLn)を有するNCプログラム、(2)はN
Cプログラム(1)の各ブロック(lla)〜(fin
)を読込み数値データに変換する数値データ変換手段、
(3)は記憶手段に設けられた先読み数値データバッフ
7列であり、先読み数値データバッファ列(3)には数
値データ変換手段(2)で変換された各ブロック(ll
a)〜(fin)の数値データをそれぞれ格納する先読
み数値データバッファ(31a)〜(31n)を有する
FIG. 4 is a schematic diagram showing prefetch control of a conventional NC program. In the figure, <l> represents a plurality of blocks (ll
a) NC program with ~(lLn), (2) is N
Each block (lla) to (fin) of C program (1)
) into numerical data;
(3) is seven columns of pre-read numerical data buffers provided in the storage means, and the pre-read numerical data buffer column (3) contains each block (ll
It has pre-read numerical data buffers (31a) to (31n) that store numerical data of a) to (fin), respectively.

次に、上記のように構成されたNCプログラムの先読み
制御を第5図のフローチャートを参照して説明する。
Next, the prefetch control of the NC program configured as described above will be explained with reference to the flowchart of FIG.

まず、数値データ変換手段(2)でNCプログラム(1
)の1ブロック(lla)を読込み(ステップS5l)
、そのブロック(lla)がNCプログラムエンドであ
るか否かを判断する(ステップS52)。読込んだブロ
ック(lla)がNCプログラムエンドでないときは読
込んだブロック(lla)に記載されたプログラムを解
析して数値データに変換し、変換した数値データを先読
み数値データバッフ7列(3〉の対応する先読み数値デ
ータバッファ(31a)に格納する(ステップS53)
First, the numerical data conversion means (2) is used to convert the NC program (1
) is read (step S5l).
, it is determined whether the block (lla) is the NC program end (step S52). If the read block (lla) is not at the end of the NC program, the program written in the read block (lla) is analyzed and converted into numerical data, and the converted numerical data is sent to the pre-read numerical data buffer 7 columns (3> (Step S53)
.

次に、先読み数値データバッファ(31a)に格納した
先読み数値データの内容から、NCプログラム(1)の
先読,みが更に必要かどうかを判定し(ステップS54
).、先読みが必要であるときはNCプログラム(1)
の読込み位置を次のブロック(Llb)に進め(ステッ
プS55)、次の1ブロック(llb)を読込む(ステ
ップS 51)。以後同様にして順次先読みが必要な各
ブロック(lie)〜(lln)を読込んで各ブロック
に対応する先読み数値データを作成して、各々先読み数
値データバッファ(3lb)〜(31n)に格納する。
Next, from the contents of the pre-read numerical data stored in the pre-read numerical data buffer (31a), it is determined whether or not further pre-reading of the NC program (1) is necessary (step S54).
). , NC program (1) when pre-reading is required.
The reading position is advanced to the next block (Llb) (step S55), and the next block (llb) is read (step S51). Thereafter, each block (lie) to (lln) that requires pre-reading is sequentially read in the same manner, and pre-read numerical data corresponding to each block is created and stored in the pre-read numerical data buffers (3lb) to (31n), respectively.

NCプログラム(1)の先読みが不必要になったら、先
読み数値データバッフ7列ク3)に格納された先読み数
値データを用い不図示の機械制御手段で工具移動データ
を作成し(ステップ35B)、工具移動データを出力し
て工具を移動させて加工を行う(ステップS57)。
When the pre-reading of the NC program (1) becomes unnecessary, tool movement data is created by a machine control means (not shown) using the pre-read numerical data stored in the pre-read numerical data buffer 7 column 3) (step 35B), The tool movement data is output and the tool is moved to perform machining (step S57).

以上の処理をNCプログラム〈1)のプログラムエンド
まで繰り返して行い、NCプログラムエンドに達したと
きに終了する。
The above processing is repeated until the program end of the NC program <1) is reached, and the process ends when the NC program end is reached.

[発明が解決しようとする課題] 従来のNCプログラムの先読み制御は上記のように構成
されているので、NCプログラム(1)の先読みブロッ
ク数を増やそうとすると、先読み数値データバッフ7列
(3)の先読み数値データバッファ(31.a)〜(3
1n)の数も増加させなければなららす、記憶手段のメ
モリ使用量が増加して数値制御装置がコスト高になると
いう問題点があった。
[Problems to be Solved by the Invention] Since the look-ahead control of the conventional NC program is configured as described above, when trying to increase the number of look-ahead blocks of the NC program (1), the number of look-ahead numerical data buffers (7 columns (3)) Prefetch numerical data buffer (31.a) to (3
1n), the amount of memory used by the storage means increases, and the cost of the numerical control device increases.

この発明はかかる問題点を解決するためになされたもの
であり、NCプログラムの先読みブロック数を増加して
もメモリ使用量の増加を極力小さく抑えることができる
と共に、NCプログラムの各ブロック毎の数値データの
記憶手段への格納,取り出し処理時間を小さく抑えるこ
とができるNCプログラムの先読み制御装置を得ること
を目的とするものである。
This invention was made in order to solve such problems, and it is possible to suppress the increase in memory usage as much as possible even if the number of read-ahead blocks of the NC program is increased, and the numerical value of each block of the NC program can be kept as small as possible. The object of the present invention is to provide a prefetch control device for an NC program that can reduce processing time for storing and retrieving data from a storage means.

[課題を解決するための手段コ この発明に係るNCプログラムの先読み制御装置は、記
憶手段にNCプログラムの各ブロックの先読み数値デー
タを格納する複数の先読み数値データバッファと変化分
保存バッフ7とを設け、格納処理手段で連続する複数の
先読み数値データバッファに格納.された各先読み数値
データを比較し、前ブロックの.先読み数値データに対
する後ブロックの先読み数値データの変化分を取り出し
て圧縮し変化分保存バッファに格納する。この変化分が
取り出された先読み数値データバッファの先読み数値デ
ータは無効処理手段で無効とし、この先読み数値データ
バッファを空バッファにする。
[Means for Solving the Problems] The NC program lookahead control device according to the present invention includes a plurality of lookahead numerical data buffers for storing lookahead numerical data of each block of the NC program and a change storage buffer 7 in a storage means. The data is stored in multiple consecutive prefetch numerical data buffers by the storage processing means. Compare each look-ahead numerical data that has been read, and compare the previous block's numeric data. The change in the pre-read numerical data of the subsequent block with respect to the pre-read numerical data is extracted, compressed, and stored in a change storage buffer. The pre-read numerical data in the pre-read numerical data buffer from which this change has been extracted is invalidated by the invalidation processing means, and the pre-read numerical data buffer is made an empty buffer.

無効処理手段で無効とされた先読み数値データを取り出
すときは、復元処理手段で先読み数値データバッファに
格納されている前ブロックの先読み数値データと変化分
保存バッファに格納された変化分から無効にされた先読
み数値データを復元して取り出す。
When retrieving the look-ahead numerical data that has been invalidated by the invalidation processing means, the restoration processing means uses the look-ahead numerical data of the previous block stored in the look-ahead numerical data buffer and the changed value stored in the change storage buffer to retrieve the invalidated numerical data. Restore and retrieve the look-ahead numerical data.

また、格納処理手段における後ブロックの先読み数値デ
ータ変化分の圧縮退避処理は、前ブロックのNCプログ
ラム指令を指令補正量分だけ補正する補正モード中に動
作させることが好ましい。
Further, it is preferable that the compression/save processing for the change in the pre-read numerical data of the subsequent block in the storage processing means is performed during a correction mode in which the NC program command of the previous block is corrected by the command correction amount.

[作 用] この発明においては、NCプログラムの連続する複数の
ブロックの先読み数値データバッファに格納された各先
読み数値データを比較し、前ブロックの先読み数値デー
タに対する後ブロックの先読み数値データの変化分を取
り出し圧縮して変化分保存バッファに格納し、変化分保
存バッファに変化分が格納された後ブロックの先読み数
値データを先読み数値データバッファ内で無効とする。
[Operation] In this invention, each of the pre-read numerical data stored in the pre-read numerical data buffer of a plurality of consecutive blocks of the NC program is compared, and the change in the pre-read numerical data of the subsequent block with respect to the pre-read numerical data of the previous block is calculated. is extracted, compressed, and stored in a change storage buffer, and after the change is stored in the change storage buffer, the pre-read numerical data of the block is invalidated in the pre-read numerical data buffer.

そして、この先読み数値データバッファに次ブロックの
先読み数値データを格納する。この処理を繰り返すこと
により、先読み数値データバッファの使用量を抑制する
Then, the next block's pre-read numerical data is stored in this pre-read numerical data buffer. By repeating this process, the amount of use of the prefetch numerical data buffer is suppressed.

また、先読み数値データバッファ内で無効とされた後ブ
ロックの先読み数値データは前ブロックの先読み数値デ
ータと変化分保存バッファに格納された変化分により順
次復元して取り出す。
Furthermore, the pre-read numerical data of the subsequent block that has been invalidated in the pre-read numerical data buffer is sequentially restored and retrieved using the pre-read numerical data of the previous block and the change stored in the change storage buffer.

この先読み数値データの変化分の圧縮,退避及び復元処
理を先読みが頻繁に発生する可能性がある補正モード中
に実行することにより、先読みが頻繁には起きない非補
正モード中に圧縮処理等に要するオーバヘッド処理時間
が処理時間に加算されることを防止する。
By executing the compression, saving, and restoration processing for changes in this look-ahead numerical data during the correction mode where look-ahead may occur frequently, compression processing etc. can be performed during the non-correction mode where look-ahead does not occur frequently. To prevent required overhead processing time from being added to processing time.

[実施例コ 第1図はこ.の発明の一実施例を示すブロック図であり
、図において、クl)〜(3)は第4図に示した従来例
の模式図と全く同じものを示す。(4)は命令を解説し
実行する中央処理装置、(5)は記憶手段であり、記憶
手段(5)には第2図の模式図に示すように、NCプロ
グラム(1)の各ブロック毎に数値データ変換手段(2
)で先読み変換された数値データを順次格納する複数の
先読み数値データバッファ(以下、数値データバッファ
という)(31a)〜(31c)からなる先読み数値デ
ータバッファ列(3)と変化分保存バッファ(6)とを
有する。
[Example Figure 1 is here. 4 is a block diagram showing an embodiment of the invention, and in the figure, 1) to 3) indicate exactly the same thing as the schematic diagram of the conventional example shown in FIG. 4. FIG. (4) is a central processing unit that explains and executes instructions, (5) is a storage means, and as shown in the schematic diagram of Fig. 2, each block of the NC program (1) is stored in the storage means (5). numeric data conversion means (2
), a read-ahead numerical data buffer array (3) consisting of a plurality of read-ahead numerical data buffers (hereinafter referred to as numerical data buffers) (31a) to (31c) that sequentially store numerical data pre-read converted, and a change storage buffer (6). ).

(ア)は格納処理手段であり、格納処理手段(7〉は連
続する複数の数値データバッファ(31a)〜(31.
c)に順次格納された先読み数値データ(以下、数値デ
ータという)を比較し、前ブロックの数値データに対す
る後ブロックの数値データの変化分を取り出して圧縮し
、圧縮した変化分のデータを変化分保存バッファ(6)
に格納する。(8)は無効処理手段であり、無効処理手
段(8)は変化分が取り出された数値データバッファの
数値データを無効とし、この数値データバッファを空バ
ッファにする。
(A) is a storage processing means, and the storage processing means (7>) is a plurality of consecutive numerical data buffers (31a) to (31.
Compare the look-ahead numerical data (hereinafter referred to as numerical data) sequentially stored in c), extract and compress the change in the numerical data of the subsequent block with respect to the numerical data of the previous block, and use the data of the compressed change as the change. Save buffer (6)
Store in. Numeral (8) is an invalidation processing means, and the invalidation processing means (8) invalidates the numerical data in the numerical data buffer from which the change has been taken out, and makes this numerical data buffer an empty buffer.

(9)は復元処理手段であり、復元処理手段(9)は無
効にされた後ブロックの数値データを先読み数値データ
バッファ列(3)に格納された数値データと変化分保存
バッファ(6)に格納された変化分のデータから復元し
て出力する。
(9) is a restoration processing means, and the restoration processing means (9) stores the numerical data of the invalidated block into the numerical data stored in the look-ahead numerical data buffer column (3) and the change storage buffer (6). Restore and output from the stored change data.

(10)は機緘制御手段であり、機槻制御手段({0)
は先読み数値データバッフ7列(3)あるいは復元処理
手段(9)から送られる先読み数値データから工具移動
データや機械シーケンスデータを作成する。
(10) is a mechanism control means, and a mechanism control means ({0)
creates tool movement data and machine sequence data from the pre-read numerical data sent from the pre-read numerical data buffer 7 column (3) or the restoration processing means (9).

次に、上記のように構成されたNCプログラムの先読み
制御装置の動作を第2図に示した模式図及び第3図に示
したフローチャートを参照して説明する。なお、第2図
の模式図において、(301)は復元された先読み数値
データ列を示す。
Next, the operation of the NC program prefetch control device configured as described above will be explained with reference to the schematic diagram shown in FIG. 2 and the flowchart shown in FIG. 3. In the schematic diagram of FIG. 2, (301) indicates the restored pre-read numerical data string.

上記のように構成された先読み制御装置においては、ま
ず数値データ変換手段(2)で加工プログラム(1)の
1ブ,ロック(lla)を読込み(ステップS31)、
そのブロック(11.a)がNCプログラムエンドであ
るか否かを判断する(ステップS32)。
In the look-ahead control device configured as described above, first block 1 of the machining program (1), lock (lla), is read by the numerical data conversion means (2) (step S31),
It is determined whether the block (11.a) is the end of the NC program (step S32).

読込んたブロック(lla)がNCプログラムエンドで
ないときは、このブロック(lla)に記載されたプロ
グラムを解析して数値データに変換し、亥換した数値デ
ータを先読み数値データバッファ列(3)の数値データ
バッファ(31a)に格納する(ステップS33)。
If the read block (lla) is not at the end of the NC program, the program written in this block (lla) is analyzed and converted into numerical data, and the converted numerical data is stored in the pre-read numerical data buffer column (3). It is stored in the numerical data buffer (31a) (step S33).

次に、数値データバッファ(31a)に格納されたブロ
ック(lI.a)が補正モード中であるか否かを中央処
理装置(4)で判定し(ステップS34)、補正モード
中であり補正計算が完了していなければ(ステップS3
5,  836) 、数値データバッファ(31a)に
格納された数値データが圧縮退避を必要とする種類のも
のであるか否かを判定し(ステップS37)、圧縮退避
を必要としないときには補正計算を行うために、NCプ
ログラム(1)の先読みが更に必要か否かを判定し(ス
テップ838)、先読みが必要なときにはNCプログラ
ム(1)の読込み位置を次のブロック(flb)に進め
る(ステップS39)。
Next, the central processing unit (4) determines whether or not the block (lI.a) stored in the numerical data buffer (31a) is in the correction mode (step S34), and determines whether the block (lI.a) is in the correction mode or not and performs correction calculation. is not completed (step S3).
5, 836), it is determined whether the numerical data stored in the numerical data buffer (31a) is of a type that requires compression and saving (step S37), and if it does not require compression and saving, correction calculation is performed. In order to perform this, it is determined whether or not further pre-reading of the NC program (1) is necessary (step 838), and if pre-reading is necessary, the reading position of the NC program (1) is advanced to the next block (flb) (step S39). ).

その後、再び数値データ変換手段(2)で次のブロック
(llb>を読込み(ステップS31)、そのブロック
(llb)がNCプログラムエンドでないときにはプロ
グラムを数値データに変換して、数値データバッファ(
3lb)に格納する(ステップ833)。
After that, the numerical data converting means (2) again reads the next block (llb> (step S31), and if that block (llb) is not the end of the NC program, converts the program into numerical data, and converts the program into the numerical data buffer (step S31).
3lb) (step 833).

この数値データバッファ(8lb)に格納されたブロッ
ク(llb)が補正モード中であり補正計算が完了して
いないときには(ステップ334〜S36)、数値デー
タバッファ(3lb)に格納された数値データが圧縮退
避を必要とする種類のもの、例えば工具径補正計算中の
移動なしブロック等であるか否かを判定し(ステップS
37)、圧縮退避を必要とするものであるときは、数値
データバッファ(3lb)の数値データを1つ前の数値
データバッファ(31a)に格納された数値データと比
較し、変化分を取り出し圧縮して変化分保存バッファ(
6)へ格納し、数値データバッファ(3lb)の内容を
無効とし、次のブロック(lie)の先読みのために空
ける(ステップS 40)。
When the block (llb) stored in this numerical data buffer (8lb) is in the correction mode and the correction calculation is not completed (steps 334 to S36), the numerical data stored in the numerical data buffer (3lb) is compressed. It is determined whether the object is of a type that requires evacuation, such as a non-moving block during tool radius correction calculation (step S).
37) If the data requires compression and saving, compare the numerical data in the numerical data buffer (3lb) with the numerical data stored in the previous numerical data buffer (31a), extract the changes, and compress. and save the change buffer (
6), invalidates the contents of the numerical data buffer (3lb), and makes space available for pre-reading of the next block (lie) (step S40).

ここで、数値データバッファ(3lb)の数値データと
1つ前の数値データバッファ(31a)の数値データと
の比較は、各数値データバッファ(3lb),(31a
)の内容にかかわらず、2つの数値データバッファ<3
 lb) . (31 a)の内容を先頭から固定長単
位で比較し、その変化分を固定長単位で変化分保存バッ
ファ(6〉に格納する。逆に変化分を変化分保存バッフ
ァ(8)から取り出すときも上記固定長単位で取り出す
Here, the comparison between the numerical data of the numerical data buffer (3lb) and the numerical data of the previous numerical data buffer (31a) is performed for each numerical data buffer (3lb), (31a).
) regardless of the contents of the two numeric data buffers <3
lb). Compare the contents of (31 a) in fixed length units from the beginning, and store the changes in fixed length units in the change storage buffer (6>). Conversely, when extracting the changes from the change storage buffer (8) is also extracted in fixed length units.

また、この変化分保存バッファ(6)はリングバッファ
構造をとり、変化分の格納および取り出しはリング番号
を比較して行うことにより多重化している。
The change storage buffer (6) has a ring buffer structure, and changes are stored and retrieved in multiplexed format by comparing ring numbers.

次に、補正計算を行うためにNCプログラム(1.)の
先読みが必要か否かを判定し、先読みが必要であればN
Cプログラム(1)の次のブロック(1 1c)を読込
む(ステ1ソプS33. S39. S31)。
Next, it is determined whether or not pre-reading of the NC program (1.) is necessary to perform correction calculations, and if pre-reading is necessary, N
The next block (1 1c) of the C program (1) is read (Step 1 S33. S39. S31).

読込んだブロック(lie)の数値データを先に空けた
数値データバッファ(3lb)に格納する(ステップS
33)。以降、同様にしてNCプログラム(1)の先読
みブロックに対応する数値データを作成し、圧縮退避し
ない数値データだけを数値データバッフ7 (31a)
 〜(31c)に格納する。
The numerical data of the read block (lie) is stored in the previously vacated numerical data buffer (3lb) (step S
33). Thereafter, create numerical data corresponding to the look-ahead block of the NC program (1) in the same way, and save only the numerical data that will not be compressed and saved to the numerical data buffer 7 (31a).
~(31c).

第2図の模式図においては、NCプログラム(1)のブ
ロック(lla) , (lie) . (llf)が
圧縮退避をしないブロックを示し、ブロック(llb)
.(lid),(J Ie)の各数値データの変化分を
変化分保存バッファ(6〉に圧縮退避した場合を示す。
In the schematic diagram of FIG. 2, blocks (lla), (lie) . (llf) indicates a block that is not compressed and saved, and block (llb)
.. A case is shown in which the changes in numerical data of (lid) and (JIe) are compressed and saved in the change storage buffer (6>).

そして、NCプログラム指令を指令補正量分だけ補正す
る補正計算を行うときは補正の対象となる数値データバ
ッファ(31a)〜(31c)に格納された数値データ
を用いて補正計算を行う(ステップS35)。
When performing a correction calculation to correct the NC program command by the command correction amount, the correction calculation is performed using the numerical data stored in the numerical data buffers (31a) to (31c) to be corrected (step S35). ).

この補正計算が完了し(ステップS36)、あるいはN
Cプログラム(1)の先読みが必要でなくなったときに
は(ステップ838)  復元処理手段(9)で先頭の
数値データバッファ(31a)から順に数値データ(3
2a)〜(331’)を取り出して機械制御手段(lO
)に送り、機械制御手段(10)で工具移動データを作
成し,(ステップS41)、工具移動データを出力して
加、工を行う(ステップS42)。
This correction calculation is completed (step S36), or N
When pre-reading of the C program (1) is no longer necessary (step 838), the restoration processing means (9) sequentially reads numerical data (3) from the first numerical data buffer (31a).
2a) to (331') are taken out and the mechanical control means (lO
), the machine control means (10) creates tool movement data (step S41), and outputs the tool movement data to perform machining (step S42).

このとき、例えばNCプログラム(1)の圧縮退避した
ブロック(llb)の数値データを復元するには(ステ
ップS43)、変化分保存バッファ(6)に圧縮退避し
てあった数値データの変化分と、先に比較した数値デー
タバッファ(31a)の数値データから、圧縮退避する
前の数値データ(32b)を復元して取り出す(ステッ
プS44)。
At this time, for example, in order to restore the numerical data of the compressed and saved block (llb) of the NC program (1) (step S43), it is necessary to restore the numerical data compressed and saved in the change storage buffer (6). , the numerical data (32b) before being compressed and saved is restored and extracted from the numerical data in the numerical data buffer (31a) compared earlier (step S44).

この処理を順次行ない、NCプログラム<1)の各ブロ
ック(lla) 〜(llf)の数値データ(32a)
 〜(32r)を数値データ列(301)に示すように
取り出す。
This process is performed sequentially to obtain numerical data (32a) for each block (lla) to (llf) of the NC program <1).
~(32r) is extracted as shown in the numerical data string (301).

なお、上記実施例においては、数値データバッファ列(
3)を3個の数値データバッファ(31a)〜(31c
)で構成した場合について説明したが、数値データバッ
ファの数はメモリ使用量に応じて任意の個数に選定する
ことができる。
Note that in the above embodiment, the numerical data buffer string (
3) into three numerical data buffers (31a) to (31c).
), the number of numerical data buffers can be selected to any desired number depending on the amount of memory used.

[発明の効果] この発明は以上説明したように、NCプログラムの連続
する複数のブロックの先読み数値データバッファに格納
された各先読み数値データを比較し、前ブロックの先読
み数値データに対する後ブロックの先読み数値データの
変化分を取り出し圧縮して変化分保存バッファに格納し
、変化分保存バッファに変化分が圧縮退避された後ブロ
ックの先読み数値データを先読み数値データバッファ内
.で無効とし、この先読み数値データバッファに次ブロ
ックの先読み数値データを格納するようにしたので、先
読み数値データバッファの使用量を小さく抑えることが
できるから、NCプログラムの先読みブロックが増加し
ても記憶装置の使用量を増加する必要がなく、記憶装置
の価格低減を図ることができる。
[Effects of the Invention] As described above, the present invention compares each piece of pre-read numerical data stored in the pre-read numerical data buffer of a plurality of consecutive blocks of an NC program, and compares the pre-read numerical data of the subsequent block with the pre-read numerical data of the previous block. The changes in the numerical data are extracted, compressed, and stored in the change storage buffer, and after the changes are compressed and saved in the change storage buffer, the pre-read numerical data of the block is stored in the pre-read numerical data buffer. Since the next block's read-ahead numerical data is stored in this read-ahead numerical data buffer, the amount of use of the read-ahead numerical data buffer can be kept small, so even if the number of read-ahead blocks in the NC program increases, it will not be stored. There is no need to increase the usage of the device, and the cost of the storage device can be reduced.

また、先読み数値データの変化分を変化分保存バッファ
に圧縮退避及び取り出すことを、NCプログラムの先読
みか頻繁に起きる補正モード中に行なうことにより、先
読みがあまり起きない非補正モード中には先読み数値デ
ータの変化分の圧縮退避および復元に要するオーバーヘ
ット処理時間が実処理時間に加算されないから、数値制
御装置全体の処理時,間の増加を防ぐこともできる。
In addition, by compressing and saving the changes in the look-ahead numerical data to the change storage buffer and taking them out during the NC program's look-ahead or frequently occurring correction mode, the look-ahead value can be saved during the non-correction mode where look-ahead does not occur often. Since the overhead processing time required for compressing, saving and restoring data changes is not added to the actual processing time, it is possible to prevent an increase in the processing time of the entire numerical control device.

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

第1図はこの発明の実施例を示すブロック図、第2図は
上記実施例の動作を説明する模式図、第3図は上記実施
例の動作手順を示すフローチャート、第4図は従来例を
示す模式図、第5図は従来例の動作手順を示すフローチ
ャートである。 (1)・・・加工プログラム、(2〉・・・数値データ
変換手段、(3)・・・先読み数値データバッファ列、
(4)・・・中央処理手段、(5)・・・記憶手段、(
6)・・・変化分保存バッファ、(ア)・・・格納処理
手段、(8)・・・無効処理手段、ク9)・・・復元処
理手段、(10〉・・・機械制御手段、(1.1a)〜
(lln>・・・NCプログラムのブロック、(31a
)〜(3tn)・・・先読み数値データバッファ。 f;お、図中同一符号は同一又は相当部分を示す。
Fig. 1 is a block diagram showing an embodiment of the present invention, Fig. 2 is a schematic diagram explaining the operation of the above embodiment, Fig. 3 is a flowchart showing the operation procedure of the above embodiment, and Fig. 4 is a conventional example. The schematic diagram shown in FIG. 5 is a flowchart showing the operating procedure of the conventional example. (1)...Machining program, (2>...Numeric data conversion means, (3)...Ahead-read numerical data buffer string,
(4)...Central processing means, (5)...Storage means, (
6) Change storage buffer, (a) Storage processing means, (8) Invalidation processing means, H9) Restoration processing means, (10> Machine control means, (1.1a) ~
(lln>...NC program block, (31a
)~(3tn)...Pre-read numerical data buffer. f; The same reference numerals in the figures indicate the same or corresponding parts.

Claims (2)

【特許請求の範囲】[Claims] (1)数値データ変換手段でNCプログラムを複数ブロ
ック先読みして各ブロック毎の数値データに変換し、変
換した各ブロックの先読み数値データを記憶手段に設け
られた複数の先読み数値データバッファに格納するNC
プログラムの先読み制御装置において、 記憶手段に設けられた変化分保存バッファと、連続する
複数の先読み数値データバッファに格納された各先読み
数値データを比較し、前ブロックの先読み数値データに
対する後ブロックの先読み数値データの変化分を取り出
し圧縮して上記変化分保存バッファに格納する格納処理
手段と、該格納処理手段で変化分が取り出された先読み
数値データバッファの先読み数値データを無効として空
バッファにする無効処理手段と、該無効処理手段で無効
にされた先読み数値データを前ブロックの先読み数値デ
ータと変化分保存バッファに格納された変化分から復元
する復元処理手段とを備えたことを特徴とするNCプロ
グラムの先読み制御装置。
(1) A numerical data conversion means reads in advance a plurality of blocks of the NC program, converts it into numerical data for each block, and stores the converted read-ahead numerical data of each block in a plurality of read-ahead numerical data buffers provided in a storage means. N.C.
In a program read-ahead control device, a change storage buffer provided in a storage means is compared with each read-ahead numerical data stored in a plurality of consecutive read-ahead numerical data buffers, and the read-ahead numerical data of a subsequent block is compared with the read-ahead numerical data of a previous block. storage processing means for extracting and compressing changes in numerical data and storing the compressed data in the change storage buffer; and invalidation of the look-ahead numerical data buffer from which changes have been taken out by the storage processing means to invalidate the read-ahead numerical data and make the buffer empty. An NC program comprising: a processing means; and a restoration processing means for restoring the look-ahead numerical data invalidated by the invalidation processing means from the look-ahead numerical data of the previous block and changes stored in a change storage buffer. Look-ahead control device.
(2)上記格納処理手段をNCプログラム指令を指令補
正分だけ補正する補正モード中に動作させ、多重先読み
を行うときには補正の対象にならないい各ブロックの先
読み数値データの変化分を圧縮して変化分保存バッファ
に格納する請求項1記載のNCプログラムの先読み制御
装置。
(2) The storage processing means is operated during a correction mode in which the NC program command is corrected by the command correction amount, and when multiple read-ahead is performed, changes in the read-ahead numerical data of each block that is not subject to correction are compressed and changed. 2. The NC program prefetch control device according to claim 1, wherein the NC program is stored in a minute storage buffer.
JP30652089A 1989-11-28 1989-11-28 Pre-read controller for nc program Pending JPH03167603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30652089A JPH03167603A (en) 1989-11-28 1989-11-28 Pre-read controller for nc program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30652089A JPH03167603A (en) 1989-11-28 1989-11-28 Pre-read controller for nc program

Publications (1)

Publication Number Publication Date
JPH03167603A true JPH03167603A (en) 1991-07-19

Family

ID=17958016

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30652089A Pending JPH03167603A (en) 1989-11-28 1989-11-28 Pre-read controller for nc program

Country Status (1)

Country Link
JP (1) JPH03167603A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546217A (en) * 1991-08-19 1993-02-26 Okuma Mach Works Ltd Numeric value controller
CN104570959A (en) * 2013-10-18 2015-04-29 发那科株式会社 Numerical controller provided with program pre-reading function
JP2020184169A (en) * 2019-05-07 2020-11-12 ファナック株式会社 Control device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546217A (en) * 1991-08-19 1993-02-26 Okuma Mach Works Ltd Numeric value controller
CN104570959A (en) * 2013-10-18 2015-04-29 发那科株式会社 Numerical controller provided with program pre-reading function
CN104570959B (en) * 2013-10-18 2016-08-17 发那科株式会社 Possesses the numerical control device pre-reading function of program
US10191472B2 (en) 2013-10-18 2019-01-29 Fanuc Corporation Numerical controller provided with program pre-reading function
JP2020184169A (en) * 2019-05-07 2020-11-12 ファナック株式会社 Control device

Similar Documents

Publication Publication Date Title
JP3540109B2 (en) Data compression method and apparatus
JPH0158547B2 (en)
JPH04296937A (en) Hardware-data-string-operatiion controller and method for performing main-storage-string operation
KR0166048B1 (en) Data compression apparatus and method for compressed algorithm
KR950001485A (en) Operation Processing Method and Micro Computer
JPH03167603A (en) Pre-read controller for nc program
CN107592541B (en) Image decompression method and system
US5623556A (en) System and method of extracting binary image data
JP2959519B2 (en) Graphics display
US20040186868A1 (en) Digital signal processor for supporting floating point operation
JP3631144B2 (en) Data compression method and apparatus using embedded run-length coding using mathematical run processing
JPH04284551A (en) Device equipped with rom storing compressed data
JPH08328817A (en) Computer system and data expandor used in same
JPH03287297A (en) Character generating circuit
JPS5991576A (en) Method for controlling picture displaying information
CN113377819A (en) Hash table rolling searching method, system and chip
JPH0462633A (en) Numerical data comparator
JPS61100836A (en) System for processing comparison and instruction of moving instruction logic
JP2002215437A (en) Structured sequential file
JPH04186405A (en) Digital control device
JPH03280094A (en) Information processor
JPH04253239A (en) Virtual memory system
JPS62126447A (en) Address conversion method
JPS5814392A (en) Information processor
JPH05158507A (en) Instrumentation controller