JPH03265003A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPH03265003A
JPH03265003A JP16272190A JP16272190A JPH03265003A JP H03265003 A JPH03265003 A JP H03265003A JP 16272190 A JP16272190 A JP 16272190A JP 16272190 A JP16272190 A JP 16272190A JP H03265003 A JPH03265003 A JP H03265003A
Authority
JP
Japan
Prior art keywords
offset
cpu
data
calculation
processing
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
JP16272190A
Other languages
Japanese (ja)
Inventor
Shigeki Namikado
茂樹 南角
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 JP16272190A priority Critical patent/JPH03265003A/en
Publication of JPH03265003A publication Critical patent/JPH03265003A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten working time by simultaneously executing repeat calculation dispersively at plural CPU. CONSTITUTION:The arithmetic routine of a common memory CM22 is trans ferred to a local memory LM28 of a sub CPU 27, and an entry address is stored in the memory area of the leading address in the offset routine of the LM28. Then, the transferred flag of the CM22 is turned on. The final shape data on the CM22 is transferred to the LM28 and the leading address is transferred to the final block of the LM28. A CPU 21 executes offset operation. When the arithmetic end flag on the CM is turned on, the result on the LM28 is outputted and afterwards, the offset operation result is outputted through a pulse distributor 108. When the operation start flag on the LM is turned on, the sub CPU 27 operates the prescribed offset shape to the final shape block and when the operation is finished, the operation end flag on the CM22 is turned on. Thus, since the plural CPU 21 and 27 almost simultaneously operating the offset shapes of various offset amounts, the operation time is shortened and the working time is shortened.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は同一処理を複数回行なう必要がある時にその
処理を複数の中央処理装置に分担させる数値制御装置に
関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a numerical control device in which when it is necessary to perform the same processing multiple times, the processing is shared among a plurality of central processing units.

[従来の技術] 第14図は例えば特開昭80−85811号公報に示さ
れた従来の数値制御装置(以下NC装置と記す)の構成
図である。図において、(101)は操作表示盤、(1
02)は中央処理装置(以下CPUと記す)、(103
)はNCデータの読取装置、(104)は加ニブログラ
ムのNCテープ、(105)は不揮発性記憶素子(以下
ROMと記す) 、(10B)はNCと機械間のデータ
をやりとりするデータ入出力装置である。
[Prior Art] FIG. 14 is a configuration diagram of a conventional numerical control device (hereinafter referred to as an NC device) disclosed in, for example, Japanese Patent Laid-Open No. 80-85811. In the figure, (101) is the operation display panel, (1
02) is a central processing unit (hereinafter referred to as CPU), (103
) is the NC data reading device, (104) is the NC tape of the computer program, (105) is the non-volatile memory element (hereinafter referred to as ROM), and (10B) is the data input/output device that exchanges data between the NC and the machine. It is.

(107)は工作機械、(10g)はパルス分配器、(
109)はサーボ回路、(110)はサーボモータ、(
111)は電源を切るとその内容が消えてしまう揮発性
の記憶素子(以下RAMと記す)である。(112)は
ワーキングメモリであり、そして(113)はコモンバ
スである。
(107) is a machine tool, (10g) is a pulse distributor, (
109) is a servo circuit, (110) is a servo motor, (
111) is a volatile memory element (hereinafter referred to as RAM) whose contents disappear when the power is turned off. (112) is a working memory, and (113) is a common bus.

次に動作について説明する。(イ)操作盤(101)上
のサイクルスタート釦が押圧されると、CPU(102
)はNCデータ読取装置(103)をしてNCテープ(
104)から1ブロック分のNCデータを読みとらす。
Next, the operation will be explained. (b) When the cycle start button on the operation panel (101) is pressed, the CPU (102
) uses the NC data reader (103) to read the NC tape (
104) to read one block of NC data.

なお、NCテープには通常の通路データ、G機能命令デ
ータ、M−S−T−機能命令データに加えて領域加工用
のデータが記録されており、NCプログラムの末尾には
プログラムエンドを示すMコード(MO2)が記録され
ている。また、領域加工用データの始めにはそれ以降が
データ領域加工用データであることを示す領域加工指令
が記録され、領域加工用データの終りには領域加工用デ
ータの終りを示すコードが記録されている。
Note that in addition to normal path data, G function command data, and M-S-T- function command data, the NC tape records area processing data, and at the end of the NC program there is an M mark indicating the program end. A code (MO2) is recorded. Also, at the beginning of the area processing data, an area processing command indicating that the subsequent data is data area processing data is recorded, and at the end of the area processing data, a code indicating the end of the area processing data is recorded. ing.

(ロ) CP U (102)はROM (105)に
記憶されている制御プログラムの制御により読みとった
NCデータがプログラムエンドを示す“MO2°である
かとうかを判別し、“MO2”であればNC処理を終了
する。
(b) The CPU (102) determines whether the read NC data is "MO2°" indicating the end of the program under the control of the control program stored in the ROM (105), and if it is "MO2", the NC data is Finish the process.

(ハ)一方、CP U (102)は読みとったNCデ
ータがプログラムエンドを示す“MO2°でなければ、
そのNCデータが領域加工指令であるかどうかを判別す
る。
(c) On the other hand, if the read NC data is not "MO2°" indicating the end of the program, the CPU (102)
It is determined whether the NC data is an area processing command.

(ニ)NCデータが領域加工指令でなければCPU (
102)は通常のNC処理を実行する。例えばNCデー
タがM−S−T−機能命令であればこれらをNC装置と
機械間のインターフェイス回路として機能するデータ入
出力装置(10B)を介して工作機械(107)に出力
し、工作機械(107)からのM−S−T−機能命令処
理完了を示す完了信号によりNCデータ読取装置(10
3)をして次のNCデータを読みとらす。また、NCデ
ータが通路データであれば以下の通路制御処理を実行す
る。
(d) If the NC data is not an area processing command, the CPU (
102) executes normal NC processing. For example, if the NC data is an M-S-T-function command, these are output to the machine tool (107) via the data input/output device (10B) that functions as an interface circuit between the NC device and the machine. The NC data reading device (107) receives a completion signal indicating the completion of M-S-T-function command processing from the
3) to read the next NC data. Further, if the NC data is passage data, the following passage control processing is executed.

すなわち、各軸のインクリメンタル値X1SYi。That is, the incremental value X1SYi of each axis.

Ziを求め、そのインクリメンタル値と指令送り速度F
とから各軸方向の速度成分、Fx、Fy。
Find Zi and find its incremental value and command feed rate F
and the velocity components in each axis direction, Fx, Fy.

Fzを次式 %式% ] (1) より求め、しかる後予め定められている時間61秒(−
8msec)の間に各軸方向に移動すべき移動量ΔX1
ΔY1ΔZを次式 6式%(2) (2) (2) より求め、これらΔX1ΔY1ΔZを時間ΔT毎にパル
ス分配器(10111)に出力する。パルス分配器(1
0g)は入力データ(ΔX1ΔY1Δ2)に基づいて同
時3軸のパルス分配演算を行なって分配パルスXp、Y
p、Zpを発生し、その分配パルスを各軸のサーボ回路
(109X) 、(109Y) 、(109Z)に入力
し、サーボモータ(uoX )  (IIOY )、(
IIOZ)を回転する。これにより、工具はワークに対
し相対的に目標位置に向けて移動する。
Fz is calculated from the following formula % formula % ] (1), and then the predetermined time of 61 seconds (-
The amount of movement ΔX1 that should be moved in each axis direction during 8 msec)
ΔY1ΔZ is obtained from the following formula 6, %(2) (2) (2), and these ΔX1ΔY1ΔZ are output to the pulse distributor (10111) at every time ΔT. Pulse distributor (1
0g) performs simultaneous three-axis pulse distribution calculation based on input data (ΔX1ΔY1Δ2) to generate distributed pulses Xp, Y
p, Zp, and input the distributed pulses to the servo circuits (109X), (109Y), (109Z) of each axis, and drive the servo motors (uoX) (IIOY), (
Rotate IIOZ). As a result, the tool moves toward the target position relative to the workpiece.

また、CP U (102)は61秒毎にワーキングメ
モリ(112)に記憶されている各軸方向現在位置Xa
%YaSZaを次式により Xa±ΔX→Xa        ・・・・・・(3a
)Ya±ΔY −Y a        −−−−・−
(3b)Za±ΔZ −Z a        −−(
3c)更新する(符号は移動方向に依存する)。更に、
CP U (102)は同様に61秒毎にワーキングメ
モリ(112)に記憶されている残移動量Xr1Yr。
In addition, the CPU (102) updates the current position Xa in each axis direction stored in the working memory (112) every 61 seconds.
%YaSZa is calculated as Xa±ΔX→Xa (3a
) Ya±ΔY −Y a −−−−・−
(3b) Za±ΔZ −Z a −−(
3c) Update (sign depends on direction of movement). Furthermore,
The CPU (102) similarly stores the remaining movement amount Xr1Yr in the working memory (112) every 61 seconds.

Zr (Xr、Yr、Zrの初期値はインクリメンタル
値Xi、Yi、Ziである)を次式によりXr−Δx 
−x r        −−(4a)Yr−ΔY −
Y r        −−−−−−(4b)Zr−Δ
Z→Zr        ・・・・・・(4C)更新す
る。そして、CP U (102)はXr−Yr−Z 
r−0−=15) となればNCデータ読取装置(103)により次のNC
データを読みとらす。
Zr (the initial values of Xr, Yr, and Zr are incremental values Xi, Yi, and Zi) is calculated as Xr−Δx by the following formula.
−x r −−(4a)Yr−ΔY −
Y r −−−−−−(4b) Zr−Δ
Z → Zr ...... (4C) Update. And CPU (102) is Xr-Yr-Z
r-0-=15), the next NC is read by the NC data reader (103).
Read the data.

(ホ)一方、ステップ(ハ)の判別処理においてNCデ
ータが領域加工指令であれば領域加工データの終りを示
すコードが読み出されるまで、NCデータ読取装置(1
03)により領域加工データを読み取らせ、RA M 
(111)に格納する。
(e) On the other hand, if the NC data is a region processing command in the determination process of step (c), the NC data reading device (1
03) to read the area processing data, and
(111).

ここで、領域加工としては例えば第15図のようなポケ
ット加工を行なう場合を考える。第16図は第15図の
加工部分の上から見た図であり、図において(120)
が最終加工形状である。このポケット加工をエンドミル
工具によって例えば外側から加工する時、まず最終加工
形状(120)に対してエンドミル工具の半径分のオフ
セット量でオフセット演算を適用してオフセット形状(
121)を求める。
Here, a case will be considered in which, for example, pocket processing as shown in FIG. 15 is performed as area processing. Figure 16 is a top view of the processed part in Figure 15, and in the figure (120)
is the final processed shape. When this pocket machining is performed, for example, from the outside with an end mill tool, first apply an offset calculation to the final machining shape (120) with an offset amount corresponding to the radius of the end mill tool, and the offset shape (
121).

次いで、やはり最終加工形状(120)に対して上記オ
フセット量子所定切込量をオフセット量として最終加工
形状(120)に対してオフセット演算を適用する。以
後同様にして最終加工形状(120)に対して異なるオ
フセット量のオフセット演算を適用してオフセット形状
(122) 、 (123) 、 (124)を順次求
めていく。そして、この求めたオフセット形状を先に説
明した手順に従って加工パスとして出力する。
Next, offset calculation is applied to the final machined shape (120) using the offset quantum predetermined depth of cut as the offset amount. Thereafter, in the same manner, offset calculations with different offset amounts are applied to the final machined shape (120) to sequentially obtain offset shapes (122), (123), and (124). Then, the obtained offset shape is output as a machining path according to the procedure described above.

[発明が解決しようとする課題] 従来のNC装置は以上のように構成されているので、ポ
ケット加工の場合のように同じ演算プログラムを何度も
繰り返す場合には1回の演算が終了するまで次の演算を
始めることができない。例えば第16図の例ではオフセ
ット形状(121)を計算し終えるまで次のオフセット
形状(122)の計算を行うことができず、特に複雑な
形状に対しては演算時間がかかり、結果として加工時間
が長(なるという問題点があった。
[Problems to be Solved by the Invention] Since the conventional NC device is configured as described above, when the same calculation program is repeated many times as in the case of pocket machining, it is difficult to perform the same operation until one calculation is completed. Unable to start next operation. For example, in the example shown in Figure 16, the calculation of the next offset shape (122) cannot be performed until the calculation of the offset shape (121) is completed, and especially for complex shapes, calculation time is required, resulting in machining time. There was a problem that it was long.

また、例えばポケット加工においては加工途中に次のオ
フセット形状の演算を行なうため、加工が一時的に止ま
り工作物に溝ができる等の問題点があった。
Furthermore, in pocket machining, for example, the next offset shape is calculated during the machining process, which causes problems such as the machining temporarily stopping and creating grooves in the workpiece.

ところで、特開昭60−611402号公報にはこの種
のNC装置においてマスター中央処理装置及びスレーブ
中央処理装置を設け、それぞれで演算処理をするように
した技術が開示されているが、スレーブ中央処理装置を
機械側に設けてNC装置本体側との信号線の本数を少な
くするようにしたものでであり、同一の演算プログラム
の繰り返し処理における演算時間を短縮するというもの
ではない。
By the way, Japanese Patent Application Laid-Open No. 60-611402 discloses a technique in which a master central processing unit and a slave central processing unit are provided in this type of NC device, and each performs arithmetic processing. The device is installed on the machine side to reduce the number of signal lines connected to the NC device main body side, and is not intended to shorten the calculation time in repeated processing of the same calculation program.

この発明は、上記のような問題点を解決するためになさ
れたものであり、オフセット形状の演算処理のように同
一の演算プログラムの演算処理を異なった演算データに
基づいて繰り返し実行するような場合に、その演算処理
を複数のCPUに分担させて演算時間を短縮することに
よって加工の途中で停止することがないようにしたNC
装置を得ることを目的とする。
This invention was made in order to solve the above-mentioned problems, and is applicable when the same calculation program is repeatedly executed based on different calculation data, such as offset shape calculation processing. In addition, by dividing the calculation processing among multiple CPUs and shortening the calculation time, an NC that prevents the processing from stopping in the middle of processing.
The purpose is to obtain equipment.

[課題を解決するための手段] この発明に係るNC装置は、所定の演算プログラムの演
算処理を異なる演算データに基づいて繰り返して実行す
る機能を備えたコンピュータ制御によるNC装置におい
て、異なる演算データがそれぞれ割り当てられ、その演
算プログラムを実行する複数のCPUを有する。
[Means for Solving the Problems] An NC device according to the present invention is a computer-controlled NC device having a function of repeatedly executing arithmetic processing of a predetermined arithmetic program based on different arithmetic data. It has a plurality of CPUs that are assigned to each CPU and execute its calculation programs.

また、発明に係るNC装置は、所定の演算プログラムの
演算処理を異なる演算データに基づいて舞り返して実行
する機能を備えたコンピュータ制御によるNC装置にお
いて、異なる演算データがそれぞれ割り当てられ、上記
の演算プログラムを実行する複数の副CPUと、複数の
副CPUの演算データの振り分け及びその演算処理の実
行を制御する1個の主中央処理装置とを有する。
Further, the NC device according to the invention is a computer-controlled NC device having a function of repeating arithmetic processing of a predetermined arithmetic program based on different arithmetic data, in which different arithmetic data are respectively assigned, and the above-mentioned It has a plurality of sub-CPUs that execute arithmetic programs and one main central processing unit that controls the distribution of arithmetic data of the plurality of sub-CPUs and the execution of the arithmetic processing.

[作 用コ この発明においては、複数のCPUがそれぞれ異なる演
算データが割り当てられ、同一の演算プログラムをそれ
ぞれ実行する。
[Operations] In this invention, a plurality of CPUs are assigned different calculation data and each executes the same calculation program.

また、この発明においては、主CPUが副CPUデータ
にそれぞれ演算データを振り分け、更にその演算処理の
実行を制御する。副CPUは主CPUの管理の元で割り
当てられた演算データに基づいてそれぞれ同一の演算プ
ログラムを実行する。
Further, in the present invention, the main CPU allocates calculation data to the sub-CPU data, and further controls execution of the calculation processing. The sub CPUs each execute the same calculation program based on the calculation data assigned under the control of the main CPU.

[実施例] 第1図はこの発明の一実施例に係るNC装置の構成図で
あり、この実施例ではCPUが2個の場合について説明
する。同図において、(21)は全てのCPUを制御す
る主CP U、 (22)はコントロールプログラムや
オフセット形状演算ルーチンさらには最終形状等の形状
データ、ワークエリア等を含んだコモンメモリ、(23
)はコモンメモリ(22)の内容を主CP U(21)
を使用せずに転送するためのダイレクトメモリ・アクセ
スコントローラ(以下DMAC) 、<24)はコモン
バス、(25)は主CPU(21)、D M A C(
23)及びコモンメモリ(22)の内の一つだけがコモ
ンバス(24)にアクセスできるように調停するバスア
ービター (26)は主CP U (21)、D M 
A C(23)等の内の一つだけがコモンメモリ(22
)にアクセスできるように調停するメモリアービターで
ある。(27)は副CP U、 (28)は副CPU(
27)専用のローカルメモリ、(29)はその両者の調
停を行うバスアービターである。
[Embodiment] FIG. 1 is a block diagram of an NC device according to an embodiment of the present invention, and in this embodiment, a case will be explained in which there are two CPUs. In the figure, (21) is the main CPU that controls all CPUs, (22) is the common memory that includes the control program, offset shape calculation routine, shape data such as the final shape, work area, etc.
) saves the contents of the common memory (22) to the main CPU (21).
A direct memory access controller (hereinafter referred to as DMAC) for transfer without using
A bus arbiter (26) arbitrates so that only one of the common bus (23) and the common memory (22) can access the common bus (24).
Only one of A C (23) etc. is common memory (22
) is a memory arbiter that arbitrates for access. (27) is the secondary CPU, (28) is the secondary CPU (
27) Dedicated local memory; (29) is a bus arbiter that mediates between the two.

: (D実m例テハM CP U (27)ノN分(3
0)>(1mの場合を説明したが、この副CP U (
27)の部分(30)が複数個あってもかまわない。
: (D actual m example Teha M CPU (27) no N minute (3
0)>(1m has been explained, but this sub CPU (
There may be a plurality of portions (30) of 27).

第2図〜第4図はこの実施例の動作を示すフローチャー
ト、第5図及び第6図はコモンメモリ(22)及びロー
カルメモリ(28)のデータ構造を示す図である。以下
これらの図を参照しながら第1図の実施例の動作を説明
する。
2 to 4 are flowcharts showing the operation of this embodiment, and FIGS. 5 and 6 are diagrams showing the data structures of the common memory (22) and local memory (28). The operation of the embodiment shown in FIG. 1 will be described below with reference to these figures.

第2図は主CP U (21)の電源投入時又は所定オ
フセット演算出現時に一度だけ行なわれるイニシャル処
理を示すフローチャートであり、まず、コモンメモリ(
22)内にあるオフセット形状の演算ルーチン自体を副
CP U (27)用のローカルメモリ(28)に転送
する(Sll)。次いで、ローカルメモリ(28)上の
オフセットルーチンの先頭アドレスの格納エリア(第5
図(b))にステップ(Sll)で転送したルーチンの
エントリーアドレスを格納する(812)。その後、コ
モンメモリ(22)上の転送済みフラグ(第5図(a)
)をオンする(813)。
FIG. 2 is a flowchart showing the initial processing that is performed only once when the main CPU (21) is powered on or when a predetermined offset calculation appears.
22) The offset shape calculation routine itself is transferred to the local memory (28) for the sub CPU (27) (Sll). Next, the storage area (fifth address) of the start address of the offset routine on the local memory (28) is
The entry address of the routine transferred in step (Sll) is stored in (b) of the figure (812). After that, the transferred flag on the common memory (22) (Fig. 5(a)
) is turned on (813).

第3WJは主CP U (21)のオフセット形状を計
算する時の処理を示すフローチャートである。まず副C
P U (27)のオフセット計算用のオフセット量を
計算する(814)。次いで、この値をローカルメモリ
(28)上のオフセット量の格納エリア(第5図(C)
)へ転送する(315)。
The third WJ is a flowchart showing the process of calculating the offset shape of the main CPU (21). First, sub-C
An offset amount for offset calculation of P U (27) is calculated (814). Next, this value is stored in the offset amount storage area (Fig. 5(C)) on the local memory (28).
) (315).

次にコモンメモリ(22)上にある最終形状データをロ
ーカルメモリ(28)に転送する(S18)。そして、
その先頭アドレスをローカルメモリ(28)上の最終形
状ブロックへ転送する(317)。この時、図には。示
していないがオフセット演算の結果の出力アドレスも転
送しておいても良い。出力アドレスを転送しない時は結
果はある決まったアドレスの部分に作られるために生C
P U (21)はそれを知っている。そして、ローカ
ルメモリ(28)上の演算開始フラグ(第5図(e))
をオンにしてコモンメモリ(22)上の演算終了フラグ
をクリアする(81g)。
Next, the final shape data on the common memory (22) is transferred to the local memory (28) (S18). and,
The start address is transferred to the final shape block on the local memory (28) (317). At this time, in the figure. Although not shown, the output address of the result of the offset calculation may also be transferred. When the output address is not transferred, the result is created at a certain fixed address, so the raw C
P U (21) knows this. Then, the calculation start flag on the local memory (28) (Fig. 5(e))
is turned on to clear the computation end flag on the common memory (22) (81g).

その後、主CP U (21)はその次のオフセット計
算のためのオフセット量を計算して自分のオフセット演
算を行なう(819)。そして、コモンメモリ(22)
上の演算終了フラグ(第5図(a))がオンされるのを
待つ(S20)。これがオンされると、ローカルメモリ
(28)上の結果を出力して(821)その後自分のオ
フセット演算の結果を出力する(922)。
Thereafter, the main CPU (21) calculates the offset amount for the next offset calculation and performs its own offset calculation (819). And common memory (22)
Wait until the above computation end flag (FIG. 5(a)) is turned on (S20). When this is turned on, the result on the local memory (28) is output (821), and then the result of its own offset calculation is output (922).

この出力はパルス分配器(10g)を介して行なう。This output takes place via a pulse distributor (10g).

第4図は副CP U (27)の処理を示すフローチャ
ートである。副CP U (27)のこの処理のプログ
ラム自体は図には示していないが、第2図のオフセット
ルーチン自体の転送の前に転送されているが、或いは図
には示していない副CP U (27)用のローカルR
OMに持っている。副CP U (27)はローカルメ
モリ上の演算開始フラグ(第5図(e))がオンになる
のを待っていて(323) 、オンになれば所定の最終
形状ブロック(第5図(d))に対して所定のオフセッ
ト形状の演算(第5図(b))を行う(S24)。演算
が終了すればコモンメモIJ(22)上の演算終了フラ
グ(第5図(a))をオンにする(825)。
FIG. 4 is a flowchart showing the processing of the sub CPU (27). Although the program itself for this process in the sub CPU (27) is not shown in the figure, it may be transferred before the transfer of the offset routine itself in FIG. 27) Local R for
I have it in OM. The sub CPU (27) waits for the computation start flag (Fig. 5(e)) on the local memory to turn on (323), and when it turns on, it starts a predetermined final shape block (Fig. 5(d)). )), a predetermined offset shape is calculated (FIG. 5(b)) (S24). When the calculation is completed, the calculation completion flag (FIG. 5(a)) on the common memo IJ (22) is turned on (825).

以上のように複数のCP U (21)、(27)が異
なるオフセット量のオフセット形状の演算をほぼ同時に
行なうため、全てのオフセット形状の演算時間が短縮さ
れる。
As described above, since the plurality of CPUs (21) and (27) calculate offset shapes with different offset amounts almost simultaneously, the calculation time for all offset shapes is shortened.

ところで、第1図の実施例ではCP U (27)が1
個の場合について説明したが、副CP U (27)が
複数個ある場合には、第2図のイニシャル処理、第3図
のステップ(S15)〜(S21)の処理及び第4図の
処理を副CPUの個数だけ繰り返せば良い。その場合、
第5図のフラグ、格納エリア等は副cPUの個数分だけ
用意しておく。
By the way, in the embodiment shown in FIG. 1, the CPU (27) is 1
However, if there are multiple sub CPUs (27), the initial processing in FIG. 2, the processing in steps (S15) to (S21) in FIG. 3, and the processing in FIG. It is sufficient to repeat this process as many times as there are sub-CPUs. In that case,
Flags, storage areas, etc. shown in FIG. 5 are prepared for the number of sub-cPUs.

第6図はこの発明の他の実施例に係るNC装置の構成図
である。同図において、(31)は主CPU。
FIG. 6 is a block diagram of an NC device according to another embodiment of the present invention. In the figure, (31) is the main CPU.

(32)は副cpU、(33)は副CP U (2)の
専用のローカルRAMである。(34)は副CP U 
(2)を制御するためのコントロールプログラムの入っ
た不揮発性の記憶装置(以下ローカルROMと記す)で
ある。副CP U (32)、ローカルRA M (3
3)、及びローカルROM (34)はこの3つを1組
として同級あってもかまられないが、以下3組の場合に
ついて説明する。
(32) is a secondary CPU, and (33) is a local RAM dedicated to the secondary CPU (2). (34) is the secondary CPU
(2) This is a non-volatile storage device (hereinafter referred to as local ROM) containing a control program for controlling. Secondary CPU (32), local RAM (3
3) and the local ROM (34) may be in the same class as one set, but a case of three sets will be described below.

第7図〜第9図は主CP U (11)の動作を示すフ
ローチャート、第10図は副CP U (82)の動作
を示すフローチャート、第11図は主CP U (31
)のワーキングメモリ(112)内に備えた各副CPU
対応管理テーブル、第12図は同じくワーキングメモリ
(112)内に備えた関数管理テーブル、第13図は副
CP U (32)用のローカルRA M (33)内
に備えた管理テーブルである。
7 to 9 are flowcharts showing the operation of the main CPU (11), FIG. 10 is a flowchart showing the operation of the sub CPU (82), and FIG. 11 is a flowchart showing the operation of the main CPU (31).
) in the working memory (112) of each sub-CPU.
The correspondence management table, FIG. 12 is a function management table similarly provided in the working memory (112), and FIG. 13 is a management table provided in the local RAM (33) for the sub CPU (32).

ここで、第12図の関数管理テーブルには副CPIJ 
(32)の数だけのエリアがありその1つをポインター
が指している。このポインターは、その数だ、け前に進
めることができて最後のエリアよりもさらに前に進める
と一番先頭を指すようなリングバッファ構造になってい
る。
Here, in the function management table in Figure 12, the sub CPIJ
There are as many areas as (32), and the pointer points to one of them. This pointer has a ring buffer structure in which it can be advanced by that number, and if it is advanced beyond the last area, it will point to the beginning.

次に動作について説明する。Next, the operation will be explained.

通常の動作は従来のCPU (第14図の(102) 
)が行なっていたことをこの実施例の主CP U (3
1)が行なうだけで従来と同じであるので省略する。
Normal operation is performed by a conventional CPU ((102 in Figure 14)
) of this embodiment was performed by the main CPU (3
1) is the same as the conventional method, so it will be omitted.

第7図〜第9図の主CP U (31)のフローチャー
トにおいて、まず、ある演算を行なう必要があった時繰
り返し処理かどうかを判定する(330)。例えば第1
5図及び第16図で示したような加工は同一の最終形状
に対して異なるオフセット量でオフセット計算を行なう
ので繰り返し処理であると判定される。ここで繰り返し
演算でないと判断されれば従来と同じ処理を行なう(S
31)。繰り返し処理の時はまず初期化処理を行なう(
832)。この初期化処理としては第11図に示すCP
U管理テーブルのOクリア、第12図に示す関数管理テ
ーブルの0クリア等を行なう。
In the flowcharts of the main CPU (31) shown in FIGS. 7 to 9, first, when it is necessary to perform a certain calculation, it is determined whether or not it is a repetitive process (330). For example, the first
The processing shown in FIGS. 5 and 16 is determined to be repeated processing because offset calculations are performed using different offset amounts for the same final shape. If it is determined that it is not a repeated operation, the same processing as before is performed (S
31). When repeating processing, first perform initialization processing (
832). As this initialization process, the CP shown in FIG.
The U management table is cleared to O, the function management table shown in FIG. 12 is cleared to zero, etc.

次いで、全での副CP U (32)について以下の処
、理を繰り返したかどうかを調べる(S33)。これは
副CP IJ (32)の数は予め分かつているので(
この例では3個)その回数だけ繰り返したかどうかで判
定する。副CPUの数だけ繰り返していない時はまず該
当する演算プログラム(この例ではオフセット演算プロ
グラム)を既に副CPUに対して転送しているかどうか
の判定を行なう(S34)。
Next, it is checked whether the following processes have been repeated for all sub-CPUs (32) (S33). This is because the number of secondary CP IJ (32) is known in advance (
In this example, the determination is made based on whether or not it has been repeated that number of times (three in this example). If the processing has not been repeated as many times as there are sub-CPUs, it is first determined whether the corresponding calculation program (in this example, the offset calculation program) has already been transferred to the sub-CPU (S34).

この判定は、第11図のCPU管理テーブルの該当する
副CPUの関数IDフィールドが0か或いはそれ以外で
あるかによって行なう。0の時はまだ転送されていない
わけである。なお、この関数IDフィールドには処理プ
ログラムが転送されるとそのプログラムを特定する関数
IDがセットされる。
This determination is made depending on whether the function ID field of the corresponding sub-CPU in the CPU management table of FIG. 11 is 0 or something else. When it is 0, it means that it has not been transferred yet. Note that when a processing program is transferred, a function ID that specifies the program is set in this function ID field.

転送されていない時は主CP U (31)のROM(
105)による演算ルーチン自体をローカルRAM(3
3)に転送する(S35)。そして第13図の演算開始
アドレスにその演算ルーチンの開始アドレスをセットす
る。その時、第11図のCPU管理テーブルの該当する
副CPUの関数IDフィールドに処理プログラム毎に異
なる関数IDをセットする。
When not being transferred, the main CPU (31) ROM (
105) is stored in the local RAM (3
3) (S35). Then, the start address of the calculation routine is set in the calculation start address of FIG. At that time, a different function ID is set for each processing program in the function ID field of the corresponding sub-CPU in the CPU management table shown in FIG.

その時、第12図の関数管理テーブルのポインターの指
すエリアに今転送した先の副CPU番号を代入してポイ
ンターを1つ進める。次いで、その演算の元になるデー
タ(この例では最終形状データ)が既に転送されている
かどうかを調べる(93B)。これは該当する副CP 
IJ (32)のローカルRA M (33)上の入力
データアドレスや入力データブロック数が0でないかど
うかで判定する。少なくともこの2つのデータの内1つ
が0ならば元になるデータは転送されていないと判定す
る。その時は、RA M (111)にあるデータをロ
ーカルRAM (33)に転送して、更に第13図に示
す副CPU用管理テーブルに入力データ先頭アドレス、
入力データブロック数をセットする(S37)。
At that time, the sub CPU number to which the transfer has just been made is assigned to the area pointed to by the pointer in the function management table of FIG. 12, and the pointer is advanced by one. Next, it is checked whether the data (final shape data in this example) that is the basis of the calculation has already been transferred (93B). This is the corresponding sub-CP
The determination is made based on whether the input data address and the number of input data blocks on the local RAM (33) of the IJ (32) are not 0. If at least one of these two data is 0, it is determined that the original data has not been transferred. At that time, the data in RAM (111) is transferred to the local RAM (33), and the input data start address,
The number of input data blocks is set (S37).

次いで、演算用のデータ(この例ではオフセット量)を
ローカルRA M (33)上の第13図に示す副CP
U管理テーブルの関数引数エリアに転送する(838)
。そして、同じ副CPU管理テーブルの演算開始フラグ
フィールドの演算開始フラグをオン。、にしく539)
 、更に第11図の演算中フラグフィールドの演算中フ
ラグをオンにする。以上のステップ(834)〜(S4
0)の処理を副CP U (32)の個数分だけ繰り返
す。そして、全ての副CPUについての繰り返しが終る
と、第12図の関数管理テーブルのポインターは先頭の
エリアを指すことになる。
Next, the data for calculation (in this example, the offset amount) is stored in the sub-CP shown in FIG. 13 on the local RAM (33).
Transfer to function argument area of U management table (838)
. Then, turn on the calculation start flag in the calculation start flag field of the same secondary CPU management table. , Nishiku 539)
, Furthermore, the operation flag in the operation flag field in FIG. 11 is turned on. The above steps (834) to (S4
0) is repeated for the number of sub-CPUs (32). When the repetition for all sub-CPUs is completed, the pointer of the function management table in FIG. 12 will point to the first area.

次いで、そのポインターの示している副CPU番号の副
CP U (32)が演算を終了しているかどうかを調
べる(S41)。これはローカルRA M (33)上
の演算終了フラグフィールドの演算終了フラグ(第13
図参照)がオンになっているかどうかで判定する。もし
、まだオンになっておらず演算が終了していない場合に
は、現在の演算は全て割り当て済みかどうかを判定する
(S41)。これは例えば副CP U (2)は3個し
かなくてオフセット演算は5回あるような場合である。
Next, it is checked whether the sub CPU (32) with the sub CPU number indicated by the pointer has completed its calculation (S41). This is the operation end flag (13th) in the operation end flag field on the local RAM (33).
(see figure) is turned on. If it is not yet turned on and the calculations have not been completed, it is determined whether all the current calculations have been allocated (S41). This is the case, for example, when there are only three sub-CPUs (2) and the offset calculation is performed five times.

そのような場合には先に演算が終了した副CP U (
32)はないかどうかをステップ(S41)と同じ方法
によって調べる。もし、先に演算を終了した副CP U
 (32)があればその副CP U (32)に対して
次の演算を割り当てる、(S44) 、 (845)。
In such a case, the sub CPU (
32) is checked by the same method as in step (S41). If the secondary CPU finishes the calculation first,
(32), the next operation is assigned to that sub CPU (32) (S44), (845).

この時は演算ルーチンと演算する元のデータは済に転送
しているので、演算ルーチンの引数(ここではオフセッ
ト量)だけを転送し直せば良い。また、この時に図では
示していない手段によって出力データを保存しておく。
At this time, since the calculation routine and the original data to be calculated have already been transferred, only the argument of the calculation routine (in this case, the offset amount) needs to be transferred again. Also, at this time, the output data is saved by means not shown in the figure.

ステップ(S41)で調べた際に副CP U、(32)
の演算が終了していれば、その副CP U (32)の
出力データをローカルRA M (33)からRA M
 <111)にコピーする(846)。次いで、RA 
M (111)上の第11図に示すCPU管理テーブル
の演算中フラグフィールドの演算中フラグをオフにして
(847) 、第12図に示すポインターの示す副CP
U番号エリアを0クリアしてポインターを1つ進める(
S4111)。その演算データに対しては従来の例と同
じ処理を行なって工作機械を制御する(S49)。
When checking in step (S41), the secondary CPU (32)
If the calculation has been completed, the output data of the sub CPU (32) is transferred from the local RAM (33) to the RAM
<111) (846). Then R.A.
M (111) Turns off the calculation flag in the calculation flag field of the CPU management table shown in FIG. 11 above (847), and selects the secondary CP indicated by the pointer shown in
Clear the U number area to 0 and advance the pointer by one (
S4111). The same processing as in the conventional example is performed on the calculated data to control the machine tool (S49).

そして、全ての演算が終了しているかどうかを第12図
の関数関理テーブルが全て0になっているかどうかで調
べ(S50) 、もし0になっていないものがあればス
テップ(841)の処理から繰り返す。
Then, it is checked whether all the calculations have been completed by checking whether the function relation table shown in FIG. Repeat from

N10図はローカルROM (34)内にある副CPU
−(32)の制御プログラムを示すフローチャートであ
る。副CP U (32)はローカルRA M (33
)上の副CPUの管理テーブル上の演算開始フラグ(第
13図参照)がオンになるまで何もしないで待機する(
Sho)。オンになれば演算終了フラグをクリアして与
えられた第13図の関数開始アドレスから入力データに
対して演算を行ない、出力データエリアにその演算結果
を出力する(Sol)。そして演算開始フラグをクリア
して演算終了フラグをオンにする(S82)。
The N10 diagram shows the sub CPU in the local ROM (34).
- It is a flowchart which shows the control program of (32). The secondary CPU (32) has a local RAM (33
) Wait without doing anything until the calculation start flag (see Figure 13) on the management table of the secondary CPU turns on (
Sho). When turned on, the calculation end flag is cleared and the calculation is performed on the input data from the given function start address in FIG. 13, and the calculation result is output to the output data area (Sol). Then, the calculation start flag is cleared and the calculation end flag is turned on (S82).

以上の第10図のフローチャートに示される処理は、全
ての副CP U (32)において同様に繰り返される
The process shown in the flowchart of FIG. 10 above is repeated in the same way in all the sub CPUs (32).

この実施例では副CP U (32)は全てそれ自体の
制御プログラムを格納したローカルROM (34)を
備えていたが、むろん各側CP U (32)はローカ
ルRA M (33)だけを備え、一番初めに主CP 
U (31)から副CP U (32)に転送すること
にしてもよい。
In this embodiment, the secondary CPUs (32) all had local ROMs (34) storing their own control programs, but of course each side CPU (32) only had a local RAM (33). Main CP first
You may decide to transfer it from U (31) to the secondary CPU (32).

また、上述の実施例(第1図、第6図)ではいずれもオ
フセット演算の例について説明したが、これはもちろん
別の演算でも可能である。また、逆にオフセット演算に
限定すれば、副CPU上のオフセット演算ルーチンのエ
ントリーは固定にしておけば転送する必要はない。また
、副CPU用のローカルROMが十分大きければオフセ
ット演算ルーチン自体をそのROMに持たせればオフセ
ット演算ルーチン自体の転送は必要なくなる。
Further, in the above-mentioned embodiments (FIGS. 1 and 6), examples of offset calculation have been described, but other calculations are of course possible. Conversely, if the entry is limited to offset calculations, there is no need to transfer the entry for the offset calculation routine on the sub-CPU if it is fixed. Furthermore, if the local ROM for the sub-CPU is sufficiently large and the offset calculation routine itself is stored in the ROM, there is no need to transfer the offset calculation routine itself.

[発明の効果コ 以上のようにこの発明によれば、複数のCPUに繰り返
し計算を分散させて同時に計算を実行させるようにした
ので、繰り返し演算を早く行なうことができ、その結果
加工時間の短いNC装置を得られる効果がある。
[Effects of the Invention] As described above, according to the present invention, iterative calculations are distributed to multiple CPUs so that they can be executed simultaneously, so it is possible to perform the iterative calculations quickly, and as a result, the machining time is shortened. This has the effect of providing an NC device.

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

第1図はこの発明の一実施例に係るNC装置の構成図、
第2図は主CPUのイニシャル処理を示すフローチャー
ト、第3図は主CPUのオフセット演算処理を示すフロ
ーチャート、第4図は主CPUのオフセット演算処理を
示すフローチャート、N5図はコモン及びローカルメモ
リ上のデータ構成を示す図、第6図はこの発明の他の実
施例に係るNC装置の構成図、第7図〜第9図は主CP
Uの動作を説明するフローチャート、第10図は副CP
Uの動作を示すフローチャート、第11図は主CPUの
副CPU対応管理テーブルの説明図、第12図は関数管
理テーブルの説明図、第13図は副CPU用の管理テー
ブルの説明図、第14図は従来のNC装置の構成図、第
15図及び第16図はNC装置における繰り返し演算の
必要なポケット加工の説明図である。 図において、(21)は主CPU、(22)はコモンメ
モリー (23)はDMAC,(25)はバスアービタ
ー(26)はメモリアービター (27)は副CPU、
(28)はローカルRAM、(29)はバスアービター
 (31)は主CPU、(32)は副CPU、(33)
はローカルRAM、 (34)はローカルROMである
。 なお、図中同一符号は同−又は相当部分を示す。
FIG. 1 is a configuration diagram of an NC device according to an embodiment of the present invention;
Figure 2 is a flowchart showing the initial processing of the main CPU, Figure 3 is a flowchart showing the offset calculation processing of the main CPU, Figure 4 is a flowchart showing the offset calculation processing of the main CPU, and Figure N5 is a flowchart showing the offset calculation processing of the main CPU. A diagram showing the data structure, FIG. 6 is a configuration diagram of an NC device according to another embodiment of the present invention, and FIGS. 7 to 9 are diagrams showing the main CP.
A flowchart explaining the operation of U, FIG. 10 is a sub-CP
Flowchart showing the operation of U, FIG. 11 is an explanatory diagram of the main CPU's sub-CPU correspondence management table, FIG. 12 is an explanatory diagram of the function management table, FIG. 13 is an explanatory diagram of the management table for the sub-CPU, and FIG. This figure is a block diagram of a conventional NC device, and FIGS. 15 and 16 are explanatory diagrams of pocket machining that requires repeated calculations in the NC device. In the figure, (21) is the main CPU, (22) is the common memory, (23) is the DMAC, (25) is the bus arbiter, (26) is the memory arbiter, (27) is the sub-CPU,
(28) is local RAM, (29) is bus arbiter, (31) is main CPU, (32) is sub-CPU, (33)
is a local RAM, and (34) is a local ROM. Note that the same reference numerals in the figures indicate the same or equivalent parts.

Claims (2)

【特許請求の範囲】[Claims] (1)所定の演算プログラムの演算処理を異なる演算デ
ータに基づいて繰り返して実行する機能を備えたコンピ
ュータ制御による数値制御装置において、異なる演算デ
ータがそれぞれ割り当てられ、上記演算プログラムを実
行する複数の中央処理装置を有することを特徴とする数
値制御装置。
(1) In a computer-controlled numerical control device that has a function of repeatedly executing arithmetic processing of a predetermined arithmetic program based on different arithmetic data, a plurality of centers are assigned different arithmetic data and execute the arithmetic program. A numerical control device characterized by having a processing device.
(2)所定の演算プログラムの演算処理を異なる演算デ
ータに基づいて繰り返して実行する機能を備えたコンピ
ュータ制御による数値制御装置において、異なる演算デ
ータがそれぞれ割り当てられ、上記演算プログラムを実
行する複数の副中央処理装置と、 前記複数の副中央処理装置の演算データの振り分け及び
その演算処理の実行を制御する1個の主中央処理装置と
を有することを特徴とする数値制御装置。
(2) In a computer-controlled numerical control device that has a function of repeatedly executing arithmetic processing of a predetermined arithmetic program based on different arithmetic data, a plurality of sub-controllers are assigned different arithmetic data and execute the arithmetic program. A numerical control device comprising: a central processing unit; and one main central processing unit that controls distribution of calculation data and execution of calculation processing by the plurality of sub-central processing units.
JP16272190A 1990-02-22 1990-06-22 Numerical controller Pending JPH03265003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16272190A JPH03265003A (en) 1990-02-22 1990-06-22 Numerical controller

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP1691890 1990-02-22
JP2-16918 1990-02-22
JP16272190A JPH03265003A (en) 1990-02-22 1990-06-22 Numerical controller

Publications (1)

Publication Number Publication Date
JPH03265003A true JPH03265003A (en) 1991-11-26

Family

ID=26353363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16272190A Pending JPH03265003A (en) 1990-02-22 1990-06-22 Numerical controller

Country Status (1)

Country Link
JP (1) JPH03265003A (en)

Similar Documents

Publication Publication Date Title
JPS63181005A (en) Parallel processing method for numerical controller
JPS62199338A (en) Automatic prevention device for tool collision
KR830006972A (en) Numerical Control Method and Device
JPS6233604B2 (en)
JPS60127955A (en) Regional work
JPH05324046A (en) Method and device for numerically controlling multiple system
KR910002317B1 (en) Numerical control device
JP2662864B2 (en) Industrial robot controller
JPS6134605A (en) Controlling system of programmable controller
JPH02146607A (en) Interpolation system for nc transfer command
JPH03265003A (en) Numerical controller
EP0310671B1 (en) Numerical control method capable of variably setting positioning precision
JPS619705A (en) Numerically controlled machine tool
JPS63311408A (en) Numerical controller
JPH02151909A (en) Control device for industrial machine
JP3121658B2 (en) Operation control method of processing machine in processing production system
JPS599706A (en) Numerical controlling system
JPS5862702A (en) Numerical controlling method
JP2687119B2 (en) Numerical control unit
JPS6254604A (en) Controlling method for setting of work piece coordinate system
JP3045603B2 (en) Numerical control unit
JPS6249402A (en) Information transfer system in numerical control of four-axes lathe
JP2505526B2 (en) Bitmap management method for tasks
JP2779796B2 (en) Numerical control unit
JPS6027003A (en) Conversational numerical controller