JP2820189B2 - Control software execution system for numerical controller - Google Patents

Control software execution system for numerical controller

Info

Publication number
JP2820189B2
JP2820189B2 JP17549093A JP17549093A JP2820189B2 JP 2820189 B2 JP2820189 B2 JP 2820189B2 JP 17549093 A JP17549093 A JP 17549093A JP 17549093 A JP17549093 A JP 17549093A JP 2820189 B2 JP2820189 B2 JP 2820189B2
Authority
JP
Japan
Prior art keywords
numerical
control software
thread
cpu
numerical controller
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.)
Expired - Fee Related
Application number
JP17549093A
Other languages
Japanese (ja)
Other versions
JPH0736529A (en
Inventor
茂樹 南角
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 JP17549093A priority Critical patent/JP2820189B2/en
Publication of JPH0736529A publication Critical patent/JPH0736529A/en
Application granted granted Critical
Publication of JP2820189B2 publication Critical patent/JP2820189B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、数値制御装置の制御
ソフトウェア実行システムに関し、さらに詳しくは、数
値制御装置の制御ソフトウェア(コントロールプログラ
ム)を汎用のマルチスレッドオペレーティングシステム
またはマルチタスクオペレーティングシステム上で実行
できる数値制御装置の制御ソフトウェア実行システムに
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control software execution system for a numerical controller, and more particularly, to a general-purpose multi-thread operating system for controlling software (control program) for a numerical controller.
Also, the present invention relates to a control software execution system for a numerical control device that can be executed on a multitasking operating system .

【0002】[0002]

【従来の技術】図27に示す数値制御装置501のハー
ドウェア構成図を用いて従来の数値制御装置の一般的構
成を説明する。1は、各部の作動を制御したり、数値制
御に必要な演算を行なったりするメインCPUである。
2は、各部を結ぶシステムバスである。3は、数値制御
装置の主要機能を実現する制御ソフトウェアなどを格納
するROM(不揮発性の記憶装置)である。4は、一時
記憶やワークエリアなどに用いるRAM(揮発性の記憶
装置)である。5は、外部との間でシリアル通信により
データのやり取りを行なうSIOインタフェース部であ
る。6は、数値制御装置の運転状態を表示したり、数値
制御装置に与えた指令を確認したりするための表示装置
である。7は、数値制御装置に指令を与えるためのキー
ボード(入力装置)である。8は、サーボモータを制御
するための指令を演算するサーボ制御部である。このサ
ーボ制御部8は、メインCPU1とは別の専用CPUを
備えてもよい。9は、サーボ制御部8から受け取った指
令を増幅してサーボモータへ駆動信号を出力するサーボ
アンプである。10は、工作機械(図示せず)の加工部
を制御するためのサーボモータである。11は、工作機
械との間で、サーボ制御指令以外のデータをやり取りす
るためのプログラムコントローラ部である。12は、メ
インCPU1に与えられる、システムクロック(図示せ
ず)と外部割り込み信号を表している。システムクロッ
クは、数値制御装置全体を制御するためのクロック信号
である。また、外部割り込み信号は、電源異常や非常停
止などのイベント(緊急な出来事)の発生をメインCP
U1に通知するための信号である。
2. Description of the Related Art A general configuration of a conventional numerical controller will be described with reference to a hardware configuration diagram of a numerical controller 501 shown in FIG. Reference numeral 1 denotes a main CPU that controls the operation of each unit and performs calculations necessary for numerical control.
Reference numeral 2 denotes a system bus that connects the components. Reference numeral 3 denotes a ROM (non-volatile storage device) that stores control software for realizing the main functions of the numerical controller. Reference numeral 4 denotes a RAM (volatile storage device) used for temporary storage, a work area, and the like. Reference numeral 5 denotes an SIO interface for exchanging data with the outside through serial communication. Reference numeral 6 denotes a display device for displaying an operation state of the numerical control device and for confirming a command given to the numerical control device. Reference numeral 7 denotes a keyboard (input device) for giving a command to the numerical controller. Reference numeral 8 denotes a servo control unit that calculates a command for controlling the servo motor. The servo control unit 8 may include a dedicated CPU different from the main CPU 1. Reference numeral 9 denotes a servo amplifier that amplifies a command received from the servo control unit 8 and outputs a drive signal to a servo motor. Reference numeral 10 denotes a servomotor for controlling a processing unit of a machine tool (not shown). Reference numeral 11 denotes a program controller for exchanging data other than the servo control command with the machine tool. Reference numeral 12 denotes a system clock (not shown) and an external interrupt signal supplied to the main CPU 1. The system clock is a clock signal for controlling the entire numerical controller. In addition, the external interrupt signal indicates the occurrence of an event (emergency event) such as a power failure or an emergency stop in the main CP.
This is a signal for notifying U1.

【0003】次に、上記数値制御装置501の動作を説
明する。まず、メインCPU1は、ROM3に書き込ま
れている制御ソフトウェアをシステムバス2を通して1
命令ずつ順に読み込んで実行する。図28に、命令読込
後の処理手順を示す。加工プログラム入力処理21で
は、SIOインタフェース部5を通して外部から加工プ
ログラム20を読み込み、RAM4に格納する。そし
て、加工プログラム20をブロック(所定の単位)ごと
に内部データに変換する。補正計算処理22では、ブロ
ックごとの内部データを処理し、増分移動量を算出す
る。また、工具径や工具長などを補正する。さらに、内
部の座標値の更新処理を行なう。設定表示処理23で
は、数値制御装置の各種データを表示装置6に表示す
る。また、キーボード7を用いてオペレータが入力した
各種設定データをRAM4に格納する。補間処理24で
は、補正計算処理22の処理結果を用いて、微小時間ご
との各軸の移動量を算出する。サーボ処理25では、補
間処理24の処理結果を用いて、さらに小さな単位時間
ごとの各軸の移動量に変換する。更に、サーボモータ1
0からのフィードバック制御(図示せず)を行なう。プ
ログラムコントロール処理26では、工作機械との間で
の入出力処理や主軸の制御など、工作機械の周辺の制御
などを行なう。
Next, the operation of the numerical controller 501 will be described. First, the main CPU 1 transmits the control software written in the ROM 3 through the system bus 2.
Read and execute instructions in order. FIG. 28 shows a processing procedure after reading the instruction. In the machining program input process 21, the machining program 20 is read from the outside through the SIO interface unit 5 and stored in the RAM 4. Then, the processing program 20 is converted into internal data for each block (predetermined unit). In the correction calculation process 22, the internal data for each block is processed, and the incremental movement amount is calculated. Also, the tool diameter and tool length are corrected. Further, an internal coordinate value updating process is performed. In the setting display process 23, various data of the numerical control device are displayed on the display device 6. Various setting data input by the operator using the keyboard 7 is stored in the RAM 4. In the interpolation processing 24, the movement amount of each axis for each minute time is calculated using the processing result of the correction calculation processing 22. In the servo processing 25, using the processing result of the interpolation processing 24, the data is converted into a smaller movement amount of each axis per unit time. Furthermore, the servo motor 1
Feedback control (not shown) from 0 is performed. In the program control process 26, peripheral control of the machine tool, such as input / output processing with the machine tool and control of the spindle, is performed.

【0004】さて、上記の数値制御装置01は、図2
7を用いて先に説明したようにメインCPU1に外部割
り込み信号12を入力して割込み処理を行なわせること
で、非常停止などの緊急事態に対処することが出来る。
メインCPU1は、外部割り込み信号12(図27)が
入力されると、予め指定された別処理を実行し、それら
別処理が終了した後に、通常の命令に復帰する。
[0004] Now, the above-mentioned numerical controller 5 01, 2
As described above with reference to FIG. 7, by inputting the external interrupt signal 12 to the main CPU 1 and causing the main CPU 1 to execute the interrupt processing, it is possible to cope with an emergency such as an emergency stop.
When the external interrupt signal 12 (FIG. 27) is input, the main CPU 1 executes another process specified in advance, and returns to a normal instruction after the other process is completed.

【0005】図29は、割り込み処理の概念図である。
30〜36は、通常の命令である。37〜40は、割り
込み命令である。41は、通常の命令への復帰命令であ
る。例えば、メインCPU1が通常の命令33を実行中
に外部割り込み信号12(図27)が入力されると、メ
インCPU1は、通常の命令33の処理終了後、割り込
みを検出し、予め指定されていた割り込み命令37の実
行を開始する。そして、割り込み命令37〜40の実行
を終了した後、復帰命令41を実行して、通常の命令3
4に復帰し、通常の命令35,36を実行する。なお、
割り込み処理の処理時間が長くなると多重割り込みなど
を考慮する必要が出てくるので、割り込み処理の処理時
間をできるだけ短くすることが望ましい。
FIG. 29 is a conceptual diagram of interrupt processing.
30 to 36 are normal instructions. 37 to 40 are interrupt instructions. 41 is a return instruction to a normal instruction. For example, if the external interrupt signal 12 (FIG. 27) is input while the main CPU 1 is executing the normal instruction 33, the main CPU 1 detects the interrupt after the processing of the normal instruction 33 is completed, and the main CPU 1 detects the interrupt and specifies it in advance. Execution of the interrupt instruction 37 is started. After the execution of the interrupt instructions 37 to 40 is completed, the return instruction 41 is executed, and the normal instruction 3 is executed.
4 and the normal instructions 35 and 36 are executed. In addition,
If the processing time of the interrupt processing becomes longer, it becomes necessary to consider multiple interrupts and the like, so it is desirable to shorten the processing time of the interrupt processing as much as possible.

【0006】ところで、上記の数値制御装置501の制
御ソフトウェアは、以下に示すような特徴を有する。 数値制御装置の制御ソフトウェアにより実現すべき機
能の多様性のためソフトウェア量も大きくなり、多人数
で開発される。 数値制御装置の制御ソフトウェアの機能ごとに、処理
に必要な応答時間(ターンアラウンドタイム,デッドラ
イン)が異なる。例えば、サーボ処理25(図28)
は、処理結果の算出が遅れると切削が止って被加工物が
不良品になってしまうので、実時間処理でなくてはなら
ない。一方、表示装置6への表示処理などは、多少遅れ
ても不都合は生じないので、実時間処理でなくてもよ
い。 メインCPU1が実行すべき割り込み処理に、多くの
種類がある。 これらの理由により、数値制御装置501の制御ソフト
ウェアは、一般にリアルタイムオペレーティングシステ
ムの制御のもとで実行される機能ごとのタスクを実行単
位とすることが多い。
The control software of the numerical controller 501 has the following features. Due to the variety of functions to be realized by the control software of the numerical control device, the amount of software is large and the software is developed by many people. The response time (turnaround time, deadline) required for processing differs for each function of the control software of the numerical controller. For example, servo processing 25 (FIG. 28)
However, if the calculation of the processing result is delayed, cutting is stopped and the workpiece becomes defective, so it must be a real-time processing. On the other hand, display processing on the display device 6 and the like do not need to be real-time processing because no inconvenience occurs even if it is slightly delayed. There are many types of interrupt processing to be executed by the main CPU 1. For these reasons, the control software of the numerical controller 501 often uses a task for each function executed under the control of the real-time operating system as an execution unit.

【0007】次に、リアルタイムオペレーティングシス
テムにより各タスクを制御する方法を説明する。あるタ
スクを定期的に実行させたり、あるタスクを実行する時
間を制限したりするために、通常はメインCPU1(図
27)に対してある一定周期で割り込み(図示せず)を
入れる。(これをシステムクロックと呼ぶ)リアルタイ
ムオペレーティングシステムは、システムクロック割り
込みがある度に各タスクの状態を調べ、実行中のタスク
を止めて別のタスクを実行させたりする。(これをスケ
ジューリング、またはディスパッチと呼ぶ)また、リア
ルタイムオペレーティングシステムにおいては、各タス
クに優先順位(実行の優先度)づけを行なう。この優先
順位の意味は、より低い優先順位のタスクを実行中に、
より高い優先順位のタスクを実行する準備ができたとき
は、その優先順位の低いタスクの実行を中断させて優先
順位の高いタスクを実行させることをいう。(これを横
取りという)
Next, a method of controlling each task by the real-time operating system will be described. In order to regularly execute a certain task or to limit the time for executing a certain task, an interrupt (not shown) is usually provided to the main CPU 1 (FIG. 27) at a certain fixed cycle. The real-time operating system (referred to as a system clock) checks the state of each task every time there is a system clock interrupt, and stops the running task to execute another task. (This is called scheduling or dispatch.) In the real-time operating system, priorities (execution priorities) are assigned to tasks. This priority means that while running lower priority tasks,
When ready to execute a task with a higher priority, this means interrupting the execution of the task with a lower priority and executing a task with a higher priority. (This is called stealing)

【0008】図30は、各タスク動作の時間的関係を示
すタイムチャートである。縦軸は各処理の実行状況(実
行または停止)を表し、横軸は時間の経過を表す。な
お、図面作成の都合上、各処理としては、リアルタイム
オペレーティングシステムと,割り込み処理と,(優先
順位が高い順に)サーボ処理タスク,補正計算処理タス
ク,表示設定処理タスクを用いるものとする。P1は、
リアルタイムオペレーティングシステムが動作している
最中に割り込みが発生して制御が割り込み処理に移った
ことを示す。P2は、割り込み処理が終了した後、リア
ルタイムオペレーティングシステムのスケジューラに制
御が返る様子を示す。なお、スケジューラは、リアルタ
イムオペレーティングシステムでスケジューリングを行
なう部分である。P3は、リアルタイムオペレーティン
グシステムのスケジューラにより、次に実行するタスク
としてサーボ処理タスクが選ばれたことを示す。P4
は、サーボ処理タスクが終了した後、リアルタイムオペ
レーティングシステムに制御が返る様子を示す。P5
は、リアルタイムオペレーティングシステムのスケジュ
ーリングによって、次に実行するタスクとして補正計算
処理タスクが選ばれたことを示す。P6は、補正計算処
理タスクが終了した後、リアルタイムオぺレーティング
システムに制御が返る様子を示す。P7は、より優先順
位の高いタスクを実行する準備ができていないので、優
先順位が最も低い表示処理設定処理タスクに移ったこと
を示す。P8は、割り込みが発生したことで表示処理設
定処理タスクを中断し、割り込み処理に制御が移ったこ
とを示す。P9は、割り込み処理を終了した後、リアル
タイムオペレーティングシステムのスケジューラに制御
が返る様子を示す。(一般に、割り込み処理を終了した
後は、もとのタスクに制御は戻らず、オペレーティング
システムのスケジューラに制御が返る。)P10は、再
び表示設定処理タスクに制御が移ったことを示す。P1
1は、システムクロック(図示せず)によってリアルタ
イムオペレーティングシステムのスケジューラに制御が
返ったことを示す。P12は、サーボ処理タスクを実行
する準備ができたので、サーボ処理タスクに移ったこと
を示す。(これは、表示設定タスクがサーボ処理タスク
に実行権を横取りされた例である)P13は、サーボ処
理タスクはその実行を終了した後、自主的に実行権を放
棄して、リアルタイムオペレーティングシステムのスケ
ジューラに制御を返したことを示す。P14は、再び表
示設定処理タスクに制御が移ったことを示す。以降、各
タスクは同様の動作を繰り返して、処理を続ける。
FIG. 30 is a time chart showing the time relationship between each task operation. The vertical axis represents the execution status (execution or stop) of each process, and the horizontal axis represents the passage of time. Note that, for the convenience of drawing creation, a real-time operating system, interrupt processing, a servo processing task, a correction calculation processing task, and a display setting processing task (in descending order of priority) are used as each processing. P1 is
Indicates that an interrupt occurred while the real-time operating system was operating, and control shifted to interrupt processing. P2 indicates a state in which control is returned to the scheduler of the real-time operating system after the completion of the interrupt processing. The scheduler is a part that performs scheduling in the real-time operating system. P3 indicates that the scheduler of the real-time operating system has selected the servo processing task as the task to be executed next. P4
Shows that control returns to the real-time operating system after the servo processing task is completed. P5
Indicates that the correction calculation processing task has been selected as the task to be executed next by the scheduling of the real-time operating system. P6 shows a state in which the control returns to the real-time operating system after the correction calculation processing task is completed. P7 indicates that it is not ready to execute a task with a higher priority, and thus has shifted to a display processing setting processing task with the lowest priority. P8 indicates that the display processing setting processing task is interrupted by the occurrence of the interrupt, and the control is shifted to the interrupt processing. P9 shows a state in which control is returned to the scheduler of the real-time operating system after the completion of the interrupt processing. (Generally, after completing the interrupt processing, control does not return to the original task, but returns to the scheduler of the operating system.) P10 indicates that control has again been transferred to the display setting processing task. P1
1 indicates that control has been returned to the scheduler of the real-time operating system by the system clock (not shown). P12 indicates that preparation for execution of the servo processing task has been made and the processing has shifted to the servo processing task. (This is an example in which the display setting task has intercepted the execution right by the servo processing task.) P13 voluntarily relinquishes the execution right after finishing the execution of the servo processing task, and the real-time operating system Indicates that control has been returned to the scheduler. P14 indicates that the control has returned to the display setting processing task again. Thereafter, each task repeats the same operation and continues processing.

【0009】なお、図30に示したように、システムク
ロック以外の割り込みは不定期に発生するため、数値制
御装置側ではその発生を予想できない。そこで、各タス
クの特性に応じて、処理時間の配分を行なう必要があ
る。例えば、サーボ処理タスクは、前もって所定の単位
時間のサーボモータの一回分の移動量を計算しておくた
めに、所定の単位時間以内に次の移動量を計算しておく
必要がある。つまり、少なくとも所定の単位時間以内に
は繰り返して実行する必要がある。一方、補正計算処理
タスクは、例えば1回の実行で、サーボ処理タスクを3
回だけ実行するために必要なデータを作成できるので、
単位時間3回につき1回だけ実行すれば良い。また、表
示設定処理タスクは他の処理がない時だけ実行すれば足
る。
As shown in FIG. 30, since an interrupt other than the system clock is generated irregularly, the numerical controller cannot predict the occurrence. Therefore, it is necessary to allocate processing time according to the characteristics of each task. For example, the servo processing task needs to calculate the next movement amount within a predetermined unit time in order to calculate the movement amount of one servo motor for a predetermined unit time in advance. That is, it is necessary to repeat the execution at least within a predetermined unit time. On the other hand, the correction calculation processing task is, for example, performed once, and the servo processing task
You can create the data you need to run only once,
It only needs to be executed once per three unit times. It is sufficient to execute the display setting processing task only when there is no other processing.

【0010】以上で述べたように、数値制御装置501
は、リアルタイムオペレーティングシステム上で制御ソ
フトウェアを実行したときに起動される複数のタスクの
共同作業によって数値制御装置としての機能を実現す
る。
As described above, the numerical controller 501
Realizes a function as a numerical control device by <br/> collaboration of a plurality of tasks to be activated when the running control software on the real-time operating system.

【0011】さて、現在、数値制御装置の制御ソフトウ
ェアの開発マシンとしては、ワークステーションが主流
である。そこで、図31に、ワークステーションを用い
た数値制御装置の制御ソフトウェア開発のシステム構成
を例示する。100は、コンパイラ,数値制御装置の制
御ソフトウェアのソースコードやオブジェクトコードな
ど、各種ファイルを格納しているハードディスクであ
る。101は、各種ファイルを一括管理したり、クライ
アントワークステーションの要求に応じてファイルを転
送したりするファイルサーバである。102は、他のネ
ットワークと通信するためのゲートウェイマシンであ
る。103は、各種I/Oデバイスを制御するためのI
/Oサーバである。104は、他のシステムに繋がって
いるネットワークである。105は、システム内を結ぶ
ローカルネットワークである。106〜108は、クラ
イアントワークステーションである。
At present, a workstation is mainly used as a development machine of control software for a numerical control device. Therefore, FIG. 31 illustrates a system configuration of control software development of a numerical control device using a workstation. Reference numeral 100 denotes a hard disk which stores various files such as a source code and an object code of a control software for a numerical controller and a compiler. A file server 101 collectively manages various files and transfers files in response to a request from a client workstation. 102 is a gateway machine for communicating with another network. Reference numeral 103 denotes an I / O device for controlling various I / O devices.
/ O server. Reference numeral 104 denotes a network connected to another system. 105 is a local network connecting the inside of the system. Reference numerals 106 to 108 denote client workstations.

【0012】次に、図32に示す流れ図を用いて、数値
制御装置の制御ソフトウェアを開発する手順を説明す
る。まず、ステップ111では、ファイルサーバ101
からテキストファイルの編集を行なうエディターをロー
カルネットワーク105を通じてクライアントワークス
テーション106〜108へダウンロードする。そし
て、エディターを使ってソースコードを作成する。一般
に、複数の人間がそれぞれクライアントワークステーシ
ョン106〜108(図31)を用いて、機能ごとにソ
ースコードを作成する。
Next, a procedure for developing control software of the numerical controller will be described with reference to a flowchart shown in FIG. First, in step 111, the file server 101
Downloads an editor for editing a text file to the client workstations 106 to 108 via the local network 105. Then, create the source code using an editor. Generally, a plurality of persons use the client workstations 106 to 108 (FIG. 31) to create source codes for each function.

【0013】ステップ112では、ファイルサーバ10
1からコンパイルを行なうコンパイラをローカルネット
ワーク105を通じてクライアントワークステーション
106〜108へダウンロードする。そして、コンパイ
ラを使ってソースコードをコンパイルして、数値制御装
置で実行可能なオブジェクトコードを作成する。なお、
一般に、数値制御装置のメインCPUとクライアントワ
ークステーション106〜108のCPUとは異なるの
で、コンパイラとしては、クロスコンパイラを用いる。
In step 112, the file server 10
1 to download the compiler for compiling to the client workstations 106 to 108 through the local network 105. Then, the source code is compiled using a compiler to create an object code executable by the numerical controller. In addition,
In general, the main CPU of the numerical controller is different from the CPUs of the client workstations 106 to 108, so a cross compiler is used as a compiler.

【0014】ステップ113では、コンパイルエラー
(コンパイルしたときのエラー)が発生したか否か判定
する。コンパイルエラーが発生したらステップ114に
進み、コンパイルエラーが発生しなければステップ11
5に進む。ステップ114では、ソースコードを修正し
て、ステップ112に戻る。
In step 113, it is determined whether or not a compile error (compile error) has occurred. If a compile error occurs, the process proceeds to step 114, and if no compile error occurs, the process proceeds to step 11
Go to 5. In step 114, the source code is corrected, and the process returns to step 112.

【0015】ステップ115では、ファイルサーバ10
1からリンクを行なうためのリンカとロケートを行なう
ためのロケータをローカルネットワーク105を通じて
クライアントワークステーション106〜108へダウ
ンロードする。そして、リンカとロケータを用いてリン
クとロケートを行ない、ロードモジュールを作成する。
リンクは、複数のオブジェクトを1つの機能にまとめ、
さらにそれらを結びつけて、モジュールを生成する作業
である。ロケートは、モジュールをロケートする数値制
御装置のメモリのアドレスを決定する作業である。ステ
ップ116では、ロードモジュールを、他の媒体へコピ
ーする。媒体としては、フロッピーディスク(数値制御
装置がフロッピーディスクドライブを備えているとき)
や、ROMがある。
In step 115, the file server 10
From 1, a linker for linking and a locator for locating are downloaded to the client workstations 106 to 108 through the local network 105. Then, linking and locating are performed using a linker and a locator, and a load module is created.
Links combine multiple objects into one function,
This is the task of creating modules by connecting them. Locating is the task of determining the address of the memory of the numerical controller that locates the module. In step 116, the load module is copied to another medium. Floppy disk as the medium (when the numerical controller has a floppy disk drive)
And there is ROM.

【0016】ステップ118では、数値制御装置は、媒
体からロードモジュールを読み出して、メモリへロード
する。ステップ118では、数値制御装置上でロードモ
ジュールを実行し、意図した通りに動作するか否かを確
認する。意図した通りに動作すれば処理を終了し、意図
した通りに動作しなければ、ステップ114に戻る。ス
テップ118,119,114の一連の処理をデバッグ
と呼ぶ。
In step 118, the numerical controller reads the load module from the medium and loads it into the memory. In step 118, the load module is executed on the numerical controller, and it is confirmed whether or not the load module operates as intended. If it operates as intended, the process ends. If it does not operate as intended, the process returns to step 114. A series of steps 118, 119, and 114 is called debugging.

【0017】ここで、ワークステーションおよびワーク
ステーションのオペレーティングシステムについて説明
する。ワークステーションには、以下に示すような特徴
がある。 ワークステーションにおいては多くのユーザが同時に
使用して、その各ユーザに対して公平なオペレーティン
グシステムのサービスが要求される。つまり、ユーザに
よる優先順位のようなものも普通は存在しないし、また
緊急の割り込みというものもほとんど存在しない。 必ず決まった時間以内に処理しなくてはならない処理
は、ほどんど無い。 そのため、ワークステーションのオペレーティングシス
テムとしては、多数の利用者が端末と対話しながら処理
を行えるタイムシェアリングオペレーティングシステム
を用いることが多い。
Here, the workstation and the operating system of the workstation will be described. The workstation has the following features. A workstation is used by many users at the same time, and each user is required to provide fair operating system services. That is, there is usually no such thing as user priority, and there is almost no emergency interruption. There are few processes that must be processed within a fixed time. For this reason, as a workstation operating system, a time-sharing operating system that allows many users to perform processing while interacting with a terminal is often used.

【0018】タイムシェアリングオペレーティングシス
テムにおいて、あるまとまった処理の単位はプロセスと
呼ばれる。プロセスは、リアルタイムオペレーティング
システムにおけるタスクと類似している。但し、一般
に、リアルタイムオペレーティングシステムのもとでの
各タスクのアドレス空間は1つの同じものである(線形
アドレス空間と呼ぶ)のに対して、タイムシェアリング
オペレーティングシステムでは、プロセスごとに固有な
アドレス空間を持っている。具体例で示せば、リアルタ
イムオペレーティングシステムでは、CPUがアクセス
して出来るアドレス(これを論理アドレス空間と呼ぶ)
が0番地から100000番地まであったと想定する
と、リアルタイムオペレーティングシステムが0番地か
ら10000番地を占め、タスク1が10001番地か
ら20000番地を占め、タスク2が20001番地か
ら28000番地までを占める。タスク1の20000
番地もタスク2の20000番地も同じところを指し、
同じデータを示す。そこで、タスク間でアドレスをやり
取りすることで、お互いのデータなどを参照できる。一
方、タイムシェアリングオペレーティングシステムで
は、プロセスごとに固有なアドレス空間を持っているの
で、プロセス1とプロセス2がどちらもアドレス0番地
からアドレス100000番地までを持っていると想定
すると、プロセス1の20000番地とプロセス2の2
0000番地では実際のメモリ上の異なるところを指す
ので、そのデータも異なる。
In the time-sharing operating system, a certain unit of processing is called a process. A process is similar to a task in a real-time operating system. However, in general, the address space of each task under the real-time operating system is one and the same (referred to as a linear address space), whereas in the time-sharing operating system, an address space unique to each process is used. have. As a specific example, in a real-time operating system, an address that can be accessed by a CPU (this is called a logical address space)
Is assumed to be from address 0 to address 100000, the real-time operating system occupies addresses 0 to 10000, task 1 occupies addresses 10001 to 20000, and task 2 occupies addresses 20001 to 28000. 20,000 for task 1
The address and the 20000 address of task 2 point to the same place,
Shows the same data. Therefore, by exchanging addresses between tasks, it is possible to refer to each other's data. On the other hand, in the time-sharing operating system, each process has a unique address space. Therefore, assuming that both process 1 and process 2 have addresses from address 0 to address 100,000, 20,000 of process 1 is assumed. Address and Process 2 of 2
Since the address 0000 indicates a different place on the actual memory, its data is also different.

【0019】次に、プロセスごとに固有なアドレス空間
の実現方法を説明する。図33は、クライアントワーク
ステーションのメモリ態様図である。130はクライア
ントワークステーション、131はCPU、132はア
ドレス変換機構、133は変換テーブル、134は主記
憶(メモリ)、135はネットワーク、136はファイ
ルサーバ、137はハードディスクである。
Next, a method of realizing an address space unique to each process will be described. FIG. 33 is a diagram of a memory mode of the client workstation. 130 is a client workstation, 131 is a CPU, 132 is an address conversion mechanism, 133 is a conversion table, 134 is a main storage (memory), 135 is a network, 136 is a file server, and 137 is a hard disk.

【0020】さて、クライアントワークステーション1
30において、CPU131で区別できるアドレス空間
(論理アドレス空間)は、一般に、主記憶につけられた
物理的な番地(物理アドレス空間)よりも大きい。そこ
で、仮想記憶の手法により、物理アドレス空間外の論理
アドレスをハードディスクなどの2次記憶装置に割り当
てることで、2次記憶装置をも主記憶とみなせるように
なる。つまり、主記憶の大きさが実装容量に制限されな
くなるので、アドレス空間の制限を気にせずにソフトウ
ェアを作成できるようになる。
Now, the client workstation 1
In 30, the address space (logical address space) that can be distinguished by the CPU 131 is generally larger than the physical address (physical address space) assigned to the main memory. Therefore, by assigning a logical address outside the physical address space to a secondary storage device such as a hard disk by the virtual storage method, the secondary storage device can be regarded as the main storage. That is, the size of the main memory is no longer limited by the mounting capacity, so that software can be created without concern for the limitation of the address space.

【0021】次に、仮想記憶の手法をさらに詳しく説明
する。図33において、CPU131はアドレス変換機
構132に対して論理アドレスを送る。アドレス変換機
構132では、与えられた論理アドレスの一部または全
部を取り出して変換テーブル133の配列の何番目かを
示すインデックスとして用いる。変換テーブル133の
内容が主記憶134のアドレスを示していれば主記憶1
34に対して所定の動作を行なう。また、変換テーブル
133の内容がハードディスク137のブロック番号な
どを示していればファイルサーバ136に対してブロッ
ク番号に対応した内容を要求し、ネットワーク135を
介して内容を受け取る。主記憶134に未使用領域が有
れば、受け取ったデータを未使用領域に格納し、データ
を格納した領域を示すように変換テーブル133の内容
を書き換える。また、主記憶134に未使用領域が存在
しなければ、主記憶134に未使用領域が無ければ、主
記憶134の既使用領域を選び、その内容をハードディ
スク137に書き戻し、その領域を新たに使用する。な
お、主記憶134から変換テーブル133を逆にたどる
ソフトウェアの機能も備えられている。(これをコアマ
ップと呼ぶ)
Next, the method of virtual storage will be described in more detail. In FIG. 33, the CPU 131 sends a logical address to the address conversion mechanism 132. The address translation mechanism 132 extracts a part or all of the given logical address and uses it as an index indicating the number of the array in the translation table 133. If the contents of the conversion table 133 indicate the address of the main memory 134, the main memory 1
A predetermined operation is performed on. If the contents of the conversion table 133 indicate the block number or the like of the hard disk 137, the contents corresponding to the block number are requested to the file server 136, and the contents are received via the network 135. If there is an unused area in the main memory 134, the received data is stored in the unused area, and the contents of the conversion table 133 are rewritten so as to indicate the area where the data is stored. If there is no unused area in the main memory 134, and if there is no unused area in the main memory 134, the used area of the main memory 134 is selected, its contents are written back to the hard disk 137, and the area is newly created. use. It should be noted that a function of software for reversing the conversion table 133 from the main memory 134 is also provided. (This is called the core map)

【0022】さらに、プロセスごとに変換テーブルを持
つことにより、各プロセスが同じ論理アドレス空間を利
用することが出来る。この様子を図34に示す。140
はプロセス1、141はプロセス2、142はプロセス
1の変換テーブル、143はプロセス2の変換テーブ
ル、144は実メモリを示す。いま、プロセス1(14
0)とプロセス2(141)のいずれも、アドレス0番
地(論理アドレスの0番地)をアクセスする場合を想定
する。このとき、プロセス1(140)は、変換テーブ
ル142の0番地の部分を指している。また、プロセス
2(141)は、変換テーブル143の0番地の部分を
指している。ところで、変換テーブル142の0番地と
変換テーブル143の0番地は、実メモリ144上の異
なる領域を指している。つまり、各プロセスが論理アド
レス空間をフルに利用することが出来る。
Further, by having a conversion table for each process, each process can use the same logical address space. This is shown in FIG. 140
Denotes a process 1, 141 denotes a process 2, 142 denotes a conversion table of the process 1, 143 denotes a conversion table of the process 2, and 144 denotes a real memory. Now, process 1 (14
0) and process 2 (141) are assumed to access address 0 (logical address 0). At this time, the process 1 (140) points to the portion of the conversion table 142 at address 0. Further, the process 2 (141) points to a portion at the address 0 of the conversion table 143. The address 0 of the conversion table 142 and the address 0 of the conversion table 143 indicate different areas on the real memory 144. That is, each process can make full use of the logical address space.

【0023】各プロセスは、例えば図35に示すよう
に、論理アドレス空間をいくつかの領域に分けて使用す
る。155は、1つのプロセスのすべての論理アドレス
空間を示す。156は、そのプロセスのテキスト(プロ
グラム)領域を示す。158は、予備領域である。この
予備領域は、普段は未使用領域であるが、データ領域や
スタック領域が不足したときには、図示の矢印の方向
で、データ領域やスタック領域として用いられる。15
7は、そのプロセスが使用するデータ領域を示す。15
9は、スタック領域を示す。
Each process uses the logical address space divided into several areas as shown in FIG. 35, for example. 155 indicates all the logical address spaces of one process. 156 indicates a text (program) area of the process. 158 is a spare area. This spare area is usually an unused area, but is used as a data area or a stack area in the direction of the arrow shown in the figure when the data area or the stack area is insufficient. Fifteen
7 indicates a data area used by the process. Fifteen
9 indicates a stack area.

【0024】図36は、タイムシェアリングオペレーテ
ィングシステムにおけるプロセスモデルを示す。210
は計算機、211はプロセス、212は実体(例えばテ
キストコード)、213は実体において現在実行中のコ
ードを示すプログラムカウンタである。各プロセスは、
アドレス空間や、そのプログラムカウンタや、スタック
や、レジスタ群などを持っている。なお複数のプロセス
間で協調して処理を行なうときには、プロセス間通信の
手段を用いて相互に連絡をとる必要がある。
FIG. 36 shows a process model in the time sharing operating system. 210
Is a computer, 211 is a process, 212 is an entity (for example, a text code), and 213 is a program counter indicating a code currently being executed in the entity. Each process is
It has an address space, its program counter, stack, registers, and so on. When a plurality of processes cooperate with each other, they need to communicate with each other using a means of inter-process communication.

【0025】上記のタイムシェアリングオペレーティン
グシステムでは、図36に示したように各プロセスが固
有のアドレス空間を持つので、プロセスごとの変換テー
ブルの書き換えなどに手間がかかり、プロセスの切り換
えに時間がかかりやすい欠点がある。また、各プロセス
内の実行を行なう実体は1個であるので、複雑な処理を
行なうアプリケーションプログラムに対応しずらくなっ
てきた。そのため、近年、1つのプロセス中に複数の実
体を置き、各実体を共通のアドレス空間のもとであたか
も別々のプロセスであるかのように動かせるマルチスレ
ッドオペレーティングシステムが提案されている。
In the above time sharing operating system, since each process has a unique address space as shown in FIG. 36, it takes time and effort to rewrite a conversion table for each process, and it takes time to switch processes. There is an easy disadvantage. Further, since there is only one entity executing each process, it has become difficult to cope with application programs that perform complicated processing. Therefore, in recent years, a multithread operating system has been proposed in which a plurality of entities are placed in one process, and each entity can be operated as if they are separate processes under a common address space.

【0026】図37に、マルチスレッドオペレーティン
グシステムのモデルを示す。210は計算機、211は
プロセス、212は実体、213はプログラムカウンタ
である。実体212aを、スレッド(またはライトウェ
イトプロセス)と呼ぶ。このスレッドは、プロセスと同
様に、固有のプログラムカウンタやスタックを備えてお
り、他のプロセスとは独立して動く。1つのプロセス内
の全てのスレッドは同じアドレス空間を持っているの
で、共通変数を共有することも容易である。つまり、図
36を用いて先に説明したタイムシェアリングオペレー
ティングシステムのプロセスモデルでは、各プロセスが
1つずつしかスレッドを持てないのに対して、マルチス
レッドオペレーティングシステムのプロセスモデルで
は、1つのプロセスが複数のスレッドを持つことができ
る。
FIG. 37 shows a model of the multi-thread operating system. 210 is a computer, 211 is a process, 212 is an entity, and 213 is a program counter. The entity 212a is called a thread (or a lightweight process). This thread, like the process, has its own program counter and stack, and operates independently of other processes. Since all threads in one process have the same address space, it is easy to share common variables. That is, in the process model of the time sharing operating system described above with reference to FIG. 36, each process has only one thread, whereas in the process model of the multi-thread operating system, one process is You can have multiple threads.

【0027】一般的に、各プロセスが持っていなければ
ならない情報には次のようなものがある。 ・アドレス空間 ・共通変数(大域変数) ・開いているファイルの情報 ・自分が生成したプロセスの情報 ・タイマー情報 ・シグナル情報 ・セマフォーの情報 一方、スレッド毎に持っているべき情報は次のようなも
のがある。 ・プログラムカウンタ ・スタック ・レジスタセット ・自分が生成したスレッドの情報 ・自分自身の状態
Generally, the information that each process must have is as follows. -Address space-Common variables (global variables)-Information on open files-Information on processes created by you-Timer information-Signal information-Semaphore information On the other hand, the information that each thread should have is as follows: There is something.・ Program counter ・ Stack ・ Register set ・ Information of thread created by you ・ State of yourself

【0028】1つのプロセス中のすべてのスレッドは、
プロセスごとに持つべき上記の情報を共有している。一
方、スレッドごとに持つべき上記の情報は、各スレッド
が個々に持っている。例えば図38に示すように、1つ
のプロセスのすべての論理アドレス空間155は、テキ
スト領域156と,データ領域157と,予備領域15
8と,スレッド1のスタック領域220と,スレッド2
のスタック領域221と,スレッド3のスタック領域2
22と,スレッド「N−1」のスタック領域223と,
スレッドNのスタック領域224とに分れている。つま
り、1つのプロセス内の各スレッドが個別に持たねばな
らない領域のみを別個に割り当てることによって、1つ
のプロセス内に複数のスレッドを構成できる。
All threads in one process are:
The above information that each process should have is shared. On the other hand, the above information to be held for each thread is individually held by each thread. For example, as shown in FIG. 38, all the logical address spaces 155 of one process include a text area 156, a data area 157, and a spare area 15
8, the stack area 220 of the thread 1 and the thread 2
Stack area 221 and thread 3 stack area 2
22, a stack area 223 of the thread “N−1”,
And a stack area 224 for the thread N. That is, a plurality of threads can be configured in one process by separately allocating only an area that each thread in one process must individually have.

【0029】次に、マルチスレッドオペレーティングシ
ステムにおけるスケジューリングを説明する。図30を
用いて先に説明したリアルタイムオペレーティングシス
テムではタスクごとにスケジューリング行なったのに対
して、マルチスレッドオペレーティングシステムでは、
スレッドごとにスケジューリングを行なう。但し、マル
チCPUのときにはCPUごとにスレッドが割り当てら
れるので、割り当てられたスレッドごとのスケジューリ
ングを行なえばよい。
Next, the scheduling in the multi-thread operating system will be described. Whereas conducted scheduling for each task for real-time operating system described above with reference to FIG. 30, in a multi-threaded operating system,
Perform scheduling for each thread. However, in the case of a multi-CPU, a thread is assigned to each CPU, so that scheduling may be performed for each assigned thread.

【0030】[0030]

【発明が解決しようとする課題】上記従来の数値制御装
置501では、数値制御装置としての機能を実現するタ
スクは、数値制御装置のリアルタイムオペレーティング
システムの下でしか走らせられない。そのため、数値制
御装置にロードして制御ソフトウェアを実行させなけれ
ばならず、面倒である。この発明は、上記問題点を解決
するためになされたもので、数値制御装置としての機能
を実現するタスクを汎用のマルチスレッドオペレーティ
ングシステムまたはマルチタスクオペレーティングシス
テム上で実行できる数値制御装置の制御ソフトウェア実
行システムを得ることを目的とする。
In the conventional numerical control apparatus 501 [0005] the task of realizing the function of the numerical control device is not brought only run under real-time operating system of the numerical controller. Other Me, must be allowed to run the control software to load on the number value controller, Ru cumbersome der. This invention has been made to solve the above Kitoi problem points, the function as a numerical control device
General-purpose multi-threaded operability
Operating system or multitasking operating system
An object of the present invention is to obtain a control software execution system for a numerical control device that can be executed on a system.

【0031】[0031]

【課題を解決するための手段】請求項1の発明は、リア
ルタイムオペレーティンングシステム上で制御ソフトウ
ェアを実行したときに起動される複数のタスクの共同作
業によって数値制御装置としての機能を実現する数値制
御装置のタスクの機能を、汎用のマルチスレッドオペレ
ーティングシステムまたはマルチタスクオペレーティン
グシステム上で実行するプロセスまたはタスク中のスレ
ッドに割り当てると共に、スレッド間のスケジューリン
グの制御用に1つのスレッドを割り当てることを特徴と
する数値制御装置の制御ソフトウェア実行システムを提
供する。
[Summary of the invention of claim 1, the numerical values to realize the function of the numerical controller by collaboration of a plurality of tasks to be activated when the running control software on the real-time operating rate Tin packaging system control device for the function of the task, allocation to a thread in a process or task executing on a general-purpose multithreaded operating <br/> computing system or multitasking operating <br/> Gushisutemu Rutotomoni, scheduling between threads Rin
Control software execution system for a numerical controller characterized by allocating one thread for controlling
Offer.

【0032】請求項2の発明は、請求項1の数値制御装
置の制御ソフトウェア実行システムにおいて、汎用のマ
ルチスレッドオペレーティングシステムまたはマルチ
スクオペレーティングシステムを用いた計算機と、その
計算機に通信回線を介して接続された数値制御装置とを
具備してなり、前記計算機と前記数値制御装置の間に分
散型共有メモリの機能を持たせ、前記数値制御装置のタ
スクの機能を、前記分散型共有メモリの機能を利用し
て、前記計算機と前記数値制御装置とで分散して処理す
ことを特徴とする数値制御装置の制御ソフトウェア実
行システムを提供する。
According to a second aspect of the present invention, there is provided the numerical control device according to the first aspect.
In location control software execution system, general-purpose multithreaded operating systems or multi-motor
Computer using a disk operating system and its
A numerical control device connected to the computer via a communication line , wherein a partition is provided between the computer and the numerical control device.
With the function of a distributed shared memory,
Using the function of the distributed shared memory
Processing by the computer and the numerical controller.
Providing control software execution system of the numerical controller, characterized in that that.

【0033】請求項3の発明は、請求項1または請求項
2の数値制御装置の制御ソフトウェア実行システムにお
いて、汎用のマルチスレッドオペレーティングシステム
またはマルチタスクオペレーティングシステムを用いた
計算機と、その計算機に通信回線を介して接続された数
値制御装置とを具備してなり、前記計算機は前記数値制
御装置への割り込み要求の有無を監視することを特徴と
する数値制御装置の制御ソフトウェア実行システムを提
供する
[0033] The invention of claim 3 is claim 1 or claim 1.
2 control software execution system
There are a computer using a general-purpose multithreaded operating system or multitasking operating system, it comprises a and a numerical control device connected via a communication line to the computer, wherein the computer the numerical system
A control software execution system for a numerical control device characterized by monitoring the presence or absence of an interrupt request to a control device.
Offer .

【0034】請求項4の発明は、請求項1から請求項3
のいずれかの数値制御装置の制御ソフトウェア実行シス
テムにおいて、複数のCPUカードを有するCPUプー
ルを具備し、そのCPUカード中のCPUを前記数値制
御装置のCPUとして割り当てることを特徴とする数値
制御装置の制御ソフトウェア実行システムを提供する
According to a fourth aspect of the present invention, there is provided the first to third aspects.
Control software execution system for any of the numerical controllers
CPU system with multiple CPU cards
And the CPU in the CPU card is numerically controlled.
There is provided a control software execution system for a numerical control device, which is assigned as a CPU of a control device.

【0035】請求項5の発明は、請求項4の数値制御装
置の制御ソフトウェア実行システムにおいて、前記CP
Uカード中のCPUを前記複数の数値制御装置のCPU
として割り当てることを特徴とする数値制御装置の制御
ソフトウェア実行システム 提供する
According to a fifth aspect of the present invention, there is provided the numerical control device according to the fourth aspect.
The control software execution system of
The CPU in the U-card is replaced by the CPU of the plurality of numerical controllers.
The present invention provides a control software execution system for a numerical control device, wherein

【0036】請求項6の発明は、請求項5の数値制御装
置の制御ソフトウェア実行システムにおいて、前記CP
Uプール中の1つのCPUカードを割り込み検査専用の
CPUカードとして使用することを特徴とする数値制御
装置の制御ソフトウェア実行システムを提供する
According to a sixth aspect of the present invention, there is provided the numerical control device according to the fifth aspect.
The control software execution system of
One CPU card in U pool is dedicated to interrupt inspection
Numerical control characterized by being used as a CPU card
A control software execution system for a device is provided .

【0037】[0037]

【作用】 請求項1の制御ソフトウェア実行システムで
は、汎用のマルチスレッドオペレーティングシステムま
たはマルチタスクオペレーティングシステム上で数値制
御装置の制御ソフトウェアを実行できるようになる
In the control software execution system according to claim 1,
Is a general-purpose multi-threaded operating system or
Or numerical system on multitasking operating system
The control software of the control device can be executed .

【0038】そこで、計算機で数値制御装置の制御ソフ
トウェアの動作を検証しやすくなり、数値制御装置の制
御ソフトウェアの信頼性を向上できる
Therefore, the control software of the numerical controller is controlled by a computer.
Software operation can be easily verified, and
You can improve the reliability of your software .

【0039】また、請求項1の制御ソフトウェア実行シ
ステムでは、数値制御装置の制御ソフトウェアのスケジ
ューリングの制御用に1つのスレッドを生成する。これ
により、計算機の汎用のマルチスレッドオペレーティン
グシステムがスレッド間のスケジューリング機能を備え
ていなくても、汎用のマルチスレッドオペレーティング
システムまたはマルチタスクオペレーティングシステム
上で数値制御装置の制御ソフトウェアを実行できるよう
になる。
Further, in the control software execution system of claim 1, the control software of the numerical controller Sukeji
One thread is created for controlling Turing. this
A general-purpose multi-threaded operating system for computers
System provides scheduling between threads
If not, the control software of the numerical controller can be executed on a general-purpose multi- thread operating system or multi- task operating system.

【0040】請求項2の制御ソフトウェア実行システム
では、計算機と数値制御装置とでタスクを分散して処理
する。これにより、数値制御装置に低性能のCPUを使
用でき、低コストにして効率的に数値制御装置の制御ソ
フトウェアを実行することが出来る
In the control software execution system according to the second aspect , the tasks are distributed and processed by the computer and the numerical controller.
I do. This allows a low-performance CPU to be used for the numerical controller.
Control system for the numerical controller
Software .

【0041】また、請求項2の制御ソフトウェア実行シ
ステムでは、分散型共有メモリの機能を利用して計算機
と数値制御装置とで分散処理する。これにより、1プロ
セス 内の別スレッドを別ノードで分散して走らせること
ができないマルチスレッドオペレーティングシステムを
用いたときにも、計算機と数値制御装置との間でタスク
を分散して処理できるので、数値制御装置に低性能のC
PUを使用でき、低コストにして効率的に数値制御装置
の制御ソフトウェアを実行することが出来る。
Further, the control software execution system according to claim 2 is provided.
The system uses a distributed shared memory function to
And the numerical controller perform distributed processing. With this, one professional
It is run by dispersing a separate thread in the processes in a different node
Can not multi-threaded operating system
When used, tasks between the computer and the numerical controller
Can be processed in a distributed manner.
A PU can be used, and the control software of the numerical controller can be efficiently executed at low cost.

【0042】また、本来は数値制御装置が起動すべきタ
スクを計算機が処理することで、数値制御装置のCPU
を不要にできる。
Also, the computer processes tasks that should be started by the numerical control device, so that the CPU of the numerical control device
Can be eliminated.

【0043】請求項3の制御ソフトウェア実行システム
では、計算機は数値制御装置への外部割り込み要求の有
無を監視する。これにより、数値制御装置のCPUを
くしても割り込み処理に対処でき、数値制御装置の構成
を簡略化できる
[0043] In the control software execution system of claim 3, the computer monitors the presence or absence of external interrupt requests to the numerical control device. As a result, the CPU of the numerical controller is not used.
It is possible to deal with interrupt processing even if the
Can be simplified .

【0044】請求項4の制御ソフトウェア実行システム
では、複数のCPUカードを有するCPUプールを備え
る。これにより、数値制御装置の制御ソフトウェアの
理負荷に応じてCPUを獲得・解放することで処理能力
を調整できる。
According to a fourth aspect of the present invention, the control software execution system includes a CPU pool having a plurality of CPU cards.
You. Thereby , the processing capacity can be adjusted by acquiring and releasing the CPU according to the processing load of the control software of the numerical controller .

【0045】請求項5の制御ソフトウェア実行システム
では、CPUプールの中のCPUを複数の数値制御装置
のCPUとして割り当てる。これにより、複数の数値制
御装置の制御ソフトウェアを同時に実行できる
In the control software execution system according to the fifth aspect , the CPU in the CPU pool is assigned to a plurality of numerical controllers.
Is assigned as a CPU. This allows multiple numerical systems
The control software of the control device can be executed at the same time .

【0046】請求項6の制御ソフトウェア実行システム
では、CPUプールの中の1つのCPUカードを割り込
み検査専用のCPUとして使う。これにより、外部割り
込み信号に迅速に対処することが出来る
[0046] In the control software execution system of claim 6, interrupt one CPU card in the CPU pool
Only used as a CPU dedicated to inspection. This allows external allocation
Swiftly can be dealt with .

【0047】[0047]

【実施例】以下、図に示す実施例によりこの発明をさら
に詳しく説明する。なお、これによりこの発明が限定さ
れるものではない。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. It should be noted that the present invention is not limited by this.

【0048】第1実施例. 図1は、この発明の第1実施例の数値制御装置の制御ソ
フトウェア実行システムの全体構成図である。この制御
ソフトウェア実行システムS1は、数値制御装置200
a1〜200anと、ホスト計算機201と、ハードデ
ィスク202と、表示装置203と、キーボード204
とを備える。数値制御装置200a1〜200anは、
リアルタイムオペレーティングシステムのもとで制御ソ
フトウェアを実行して、数値制御装置としての機能を実
現する。この数値制御装置200a1〜200anのハ
ードウェア構成は、図27を用いて先に説明した従来の
数値制御装置501と同じである。ホスト計算機201
は、汎用のマルチスレッドオペレーティングシステムの
もとで数値制御装置の制御ソフトウェアを実行する。ハ
ードディスク202は、ホスト計算機201の外部記憶
装置である。表示装置203は、ユーザが必要とする各
種の情報を表示する。キーボード204は、ユーザから
の指示などを受け付ける。外部ネットワーク206は、
ホスト計算機201を、汎用のワークステーション(図
示せず)などと結ぶ。
First Embodiment FIG. 1 is an overall configuration diagram of a control software execution system of a numerical controller according to a first embodiment of the present invention. The control software execution system S1 includes a numerical controller 200
a1 to 200an, the host computer 201, the hard disk 202, the display device 203, and the keyboard 204
And Numerical control devices 200a1 to 200an
The control software is executed under a real-time operating system to realize a function as a numerical controller. The hardware configuration of the numerical control devices 200a1 to 200an is the same as that of the conventional numerical control device 501 described above with reference to FIG. Host computer 201
Executes the control software of the numerical controller under a general-purpose multi-thread operating system. The hard disk 202 is an external storage device of the host computer 201. The display device 203 displays various information required by the user. The keyboard 204 receives instructions from a user and the like. The external network 206
The host computer 201 is connected to a general-purpose workstation (not shown) or the like.

【0049】次に、ホスト計算機201により、数値制
御装置の制御ソフトウェアを実行する手順を説明する。
なお、説明の都合上、数値制御装置の制御ソフトウェア
は、予めハードディスク202に格納されているものと
する。まず、ユーザは、キーボード204を用いて数値
制御装置の制御ソフトウェアを実現するプロセスの起動
をホスト計算機201に指示する。ホスト計算機201
のマルチスレッドオペレーティングシステムは、数値制
御装置の制御ソフトウェアを実現するためのプロセスを
ハードディスク202から読み出し、プロセス管理テー
ブルに登録する。
Next, a procedure for executing the control software of the numerical controller by the host computer 201 will be described.
For convenience of explanation, it is assumed that the control software of the numerical controller is stored in the hard disk 202 in advance. First, the user uses the keyboard 204 to instruct the host computer 201 to start a process for implementing the control software of the numerical controller. Host computer 201
The multi-thread operating system reads a process for realizing control software of the numerical controller from the hard disk 202 and registers the process in the process management table.

【0050】プロセス管理テーブルは、概念的には、図
33と図34を用いて先に説明した変換テーブルと類似
している。具体例で説明すれば、プロセス管理テーブル
は、変換テーブル133(図33)の配列の1番目から
M番目までを、図38に示したテキスト領域156を示
すためのスロットとして確保し、変換テーブル133の
配列の「M+1」番目からN番目までを、図38に示し
たデータ領域157を示すためのスロットとして確保し
たものである。
The process management table is conceptually similar to the conversion table described above with reference to FIGS. 33 and 34. More specifically, in the process management table, the first to M-th of the array of the conversion table 133 (FIG. 33) are secured as slots for indicating the text area 156 shown in FIG. Are allocated as slots for indicating the data area 157 shown in FIG. 38.

【0051】次に、ホスト計算機201は、数値制御装
置の制御ソフトウェアの実行状況に伴って、図38に示
したプロセスの論理アドレス空間155内の各領域を順
にハードディスク202から読み出して内部メモリ(図
示せず)へローディングする。
Next, the host computer 201 sequentially reads each area in the logical address space 155 of the process shown in FIG. 38 from the hard disk 202 in accordance with the execution status of the control software of the numerical controller, and reads the area from the internal memory (FIG. (Not shown).

【0052】次に、ホスト計算機201は、数値制御装
置の制御ソフトウェアを実行したときのタスクに相当す
るプロセスを生成する。図2に、プロセスを生成するた
めの流れ図を示す。まず、ステップ241では、マルチ
スレッドオペレーティングシステムに備えられているシ
ステムコールを利用して、数値制御装置としての1機能
を実現している1タスク(数値制御装置のリアルタイム
オペレーティングシステムのもとでの1タスク)と同じ
処理を行なう1スレッドを生成する。具体的には、プロ
セス管理テーブルに新たなスレッドのスタック領域用の
スロットを確保し、マルチスレッドオペレーティングシ
ステムが認識するスレッドの表の中に新たなスレッドを
追加する。
Next, the host computer 201 generates a process corresponding to a task when the control software of the numerical controller is executed. FIG. 2 shows a flowchart for generating a process. First, in step 241, one task realizing one function as a numerical controller (one task under the real-time operating system of the numerical controller) is performed by using a system call provided in the multi-thread operating system. One thread that performs the same processing as task (task) is generated. Specifically, a slot for a stack area of a new thread is secured in the process management table, and the new thread is added to the thread table recognized by the multi-thread operating system.

【0053】ステップ242では、ステップ241で生
成したスレッドに対応した処理を行なう。例えば、数値
制御装置のリアルタイムオペレーティングシステムに対
するシステムコールを、ホスト計算機201のマルチタ
スクオペレーティングシステムのスレッドに対するシス
テムコールに書き換える。なお、変換ライブラリを用い
てシステムコールを変換するならば、書き換え負担を軽
減できる。
At step 242, processing corresponding to the thread generated at step 241 is performed. For example, a system call for the real-time operating system of the numerical controller is rewritten to a system call for a thread of the multitasking operating system of the host computer 201. If the system library is converted using the conversion library, the rewriting load can be reduced.

【0054】ステップ243では、数値制御装置のタス
クに相当するスレッドをすべて生成したか否か判定す
る。すべてのスレッドを生成したならばステップ244
に進み、生成すべきスレッドが残っていればステップ2
41に戻る。なお、すべてのスレッドを生成した時点で
は、ホスト計算機201の内部には、図3の概念図に示
すように、マルチスレッドオペレーティングシステム2
40上に、数値制御装置のタスクと同じ機能を実現する
スレッド1(231)〜スレッド6(236)を含むプ
ロセス211が構成されることになる。
At step 243, it is determined whether or not all the threads corresponding to the tasks of the numerical controller have been generated. If all threads have been created, step 244
Go to step 2 if there are remaining threads to be created
Return to 41. At the time when all the threads are generated, the multi-thread operating system 2 is installed inside the host computer 201 as shown in the conceptual diagram of FIG.
A process 211 including a thread 1 (231) to a thread 6 (236) that realizes the same function as the task of the numerical controller is formed on 40.

【0055】ステップ244では、スレッド間のスケー
ジューリングを行なうスケージューリング方式を決定す
る。例えば、優先順位に応じて各スレッドを走らせるス
ケジューリング機能をホスト計算機201のマルチスレ
ッドオペレーティングシステムが備えている場合には、
システムコールを用いて各スレッドの優先順位を登録す
る。又は、ホスト計算機201のマルチスレッドオペレ
ーティングシステムは、準備ができた順序でスレッドを
走らせるスケジューラを有していることもある。ここ
で、“走る”とは、そのスレッドを構成するテキスト領
域が実メモリ上に存在し、そのテキスト領域をCPUが
処理している状態のことである。
In step 244, a scheduling method for scheduling between threads is determined. For example, when the multi-thread operating system of the host computer 201 has a scheduling function for running each thread according to the priority,
Register the priority of each thread using a system call. Alternatively, the multi-thread operating system of the host computer 201 may have a scheduler that runs threads in a ready order. Here, "run" means a state in which a text area constituting the thread exists in the real memory and the text area is being processed by the CPU.

【0056】図4は、スケジューラによるスケジューリ
ングの一例を示す概念図である。211は、ホスト計算
機201が実行するプロセスである。231〜234
は、数値制御装置のタスクと同じ機能を実現するスレッ
ドである。240は、マルチスレッドオペレーティング
システムである。250は、準備が出来たスレッドの中
から1つのスレッドを選び順に走らせるスケジューラで
ある。251は、他のプロセスである。
FIG. 4 is a conceptual diagram showing an example of scheduling by the scheduler. 211 is a process executed by the host computer 201. 231-234
Is a thread that implements the same function as the task of the numerical controller. 240 is a multi-thread operating system. Reference numeral 250 denotes a scheduler that selects one thread from the ready threads and runs it in order. 251 is another process.

【0057】ステップ245では、数値制御装置の制御
ソフトウェアが最初に初期化タスクを起動し、その初期
化タスクが他のタスクを起動するような方式であるとき
は、初期化タスクと同じ処理を行なうスレッドをシステ
ムコールにより起動する。具体的には、マルチスレッド
オペレーティングシステムのスケジューリング対象のス
レッドの表の中に、初期化タスクと同じ処理を行なうス
レッドを加えればよい。これらの処理により、各スレッ
ドは、予め決定された順序に応じて走ることになる。な
お、数値制御装置の制御ソフトウェアが上記のような方
式でない場合には、従来の数値制御装置の制御ソフトウ
ェアと同じ順序で該当スレッドを起動すればよい。
In step 245, the control software of the numerical controller first activates the initialization task, and if the initialization task activates another task, the same processing as the initialization task is performed. Start a thread by a system call. Specifically, a thread that performs the same processing as the initialization task may be added to the table of threads to be scheduled by the multithread operating system. Through these processes, each thread runs in a predetermined order. If the control software of the numerical control device does not have the above-described method, the threads may be started in the same order as the control software of the conventional numerical control device.

【0058】上記ではホスト計算機201のマルチスレ
ッドオペレーティングシステムの機能を利用してスレッ
ド間のスケジューリングを行なった。しかし、マルチス
レッドオペレーティングシステムがスレッド間のスケジ
ューリング機能を備えていない場合には上記の対応はで
きない
In the above description, the multi-thread
Threading using the features of the threaded operating system
Scheduling between nodes. But multis
Red operating system scheduling between threads
If you do not have a
I can't .

【0059】そこで、この場合は、スレッド間のスケジ
ューリングの制御用に1つのスレッドを生成すればよ
Therefore, in this case, the schedule between threads is
Create one thread for controlling the Turing
No.

【0060】つまり、ホスト計算機201は、数値制御
装置における各タスクをスレッドとするのに加えて、ス
ケジューラ250(図4)と同じ働きをするスケジュー
ラスレッドを生成する。
[0060] That is, the host computer 201, in addition to the task in the numerical control device to the thread, and generates a scan <br/> scheduler 250 scheduler threads that are equivalent to the (Figure 4).

【0061】図5は、ホスト計算機201により生成さ
れたスケジューラスレッドによるスケジューリングの概
念図である。これは、図4を用いて先に説明したスケジ
ューリングの概念に、スケジューラスレッド252を加
えたものである。そして、スケジューラスレッド252
は、マルチスレッドオペレーティングシステム240上
のスケジューラ250から数値制御装置の制御ソフトウ
ェアを実行するプロセス211の実行権を獲得し、スレ
ッド1(231)〜スレッド4(234)のスケジュー
リングをすべて行なう。
FIG. 5 is a conceptual diagram of scheduling by a scheduler thread generated by the host computer 201. This is the concept of scan Keji <br/> Yuringu described earlier with reference to FIG. 4, is obtained by adding a scheduler thread 252. Then, the scheduler thread 252
Acquires the execution right of the process 211 for executing the control software of the numerical controller from the scheduler 250 on the multi-threaded operating system 240, and performs all the scheduling of the threads 1 (231) to 4 (234).

【0062】以上の第1実施例の数値制御装置の制御ソ
フトウェア実行システムによれば、数値制御装置の制御
ソフトウェアのスケジューリングの制御用に1つのスレ
ッド(スケジューラスレッド)を生成するので、ホスト
計算機の汎用のマルチスレッドオペレーティングシステ
ムがスレッド間のスケジューリング機能を備えていなく
ても、ホスト計算機における汎用のマルチスレッドオペ
レーティングシステムのもとで数値制御装置の制御ソフ
トウェアを実行させることができるようになる。そのた
め、制御ソフトウェア開発時のデバッグでは、ホスト計
算機上で開発された制御ソフトウェアをいちいち数値制
御装置にロードして動作を確認する必要がなくなり、開
発期間を短縮できる。また、ホスト計算機上に構築され
たCAD/CAMシステムに数値制御装置のシミュレー
タ機能を組み込む際には、数値制御装置の制御ソフトウ
ェアを汎用のマルチスレッドオペレーティングシステム
上で動くように組み直さなくてよいので、手間がかから
ない。また、ホスト計算機と数値制御装置のオペレーテ
ィングシステム等の違いを考慮したスケジューリングが
不要となるので、数値制御装置の既存のソフトウェアを
短期間で移植できる。
The control software of the numerical controller according to the first embodiment described above.
According to the software execution system , one thread (scheduler thread) is generated for controlling the scheduling of the control software of the numerical controller. Therefore, the general-purpose multi-thread operating system of the host computer does not have a scheduling function between threads. However, general-purpose multi-threaded operation on the host computer
The control software of the numerical controller under the rating system
Software can be executed. That
For debugging during control software development, the host
Control software developed on a computer is numerically controlled
There is no need to check the operation by loading the
The launch period can be shortened. It is also built on the host computer
Simulation of numerical controller in CAD / CAM system
When incorporating the data function, the control software of the numerical controller must be used.
A generic multi-threaded operating system
Since it is not necessary to reassemble to move on, it takes time
Absent. In addition, since there is no need to perform scheduling in consideration of the difference between the host computer and the operating system of the numerical controller, existing software of the numerical controller can be ported in a short period of time.

【0063】なお、上記ではホスト計算機201上で動
作する汎用のマルチスレッドオペレーティングシステム
のもとで数値制御装置の制御ソフトウェアのタスクに相
当するスレッドを走らせたのに対して、数値制御装置に
汎用のマルチスレッドオペレーティングシステムを動作
させ、そのもとで数値制御装置の制御ソフトウェアのタ
スクに相当するスレッドを走らせてもよい。つまり、
値制御装置は、上記のようにホスト計算機201が行な
ったのと同様にして、マルチスレッドオペレーティング
システム上のスレッドとして、数値制御装置の制御ソフ
トウェアを実行する。
In the above description , the thread corresponding to the task of the control software of the numerical controller is run under a general-purpose multi-thread operating system operating on the host computer 201. A multi-thread operating system may be operated, under which a thread corresponding to a task of the control software of the numerical controller may be run. That is, the numerical control device, in the same manner as the host computer 201 as described above was performed, as threads on a multi-threaded operating system, executes the control software of the numerical controller.

【0064】このようにすれば、数値制御装置の制御ソ
フトウェアを汎用のマルチスレッドオペレーティングシ
ステム上で動作するソフトウェアとして開発できるの
で、ホスト計算機で数値制御装置の制御ソフトウェアの
動作を検証しやすくなり、数値制御装置の制御ソフトウ
ェアの信頼性を向上できる。
[0064] Since it developed software running on this manner to lever, the numerical control device generic multithreaded operating system control software, it becomes easy to verify the operation of the control software of the numerical controller by the host computer, The reliability of the control software of the numerical controller can be improved.

【0065】第2実施例. この発明の第2実施例の数値制御装置の制御ソフトウェ
ア実行システムは、前記第1実施例の構成に加えて、ホ
スト計算機と、1つの数値制御装置との間でスレッド間
通信を行なわせ且つ分散型共有メモリの機能を利用し
て、上述のスレッドを分散して走らせるものである
Second Embodiment The control software of the numerical controller according to the second embodiment of the present invention.
The execution system includes an e-mail system in addition to the configuration of the first embodiment.
Between threads between the strike computer and one numerical controller
Make communication and use the function of distributed shared memory
Thus, the above-mentioned threads are distributed and run .

【0066】図6は、第2実施例の数値制御装置の制御
ソフトウェア実行システムSの全体構成図である。こ
の制御ソフトウェア実行システムSは、第1実施例
制御ソフトウェア実行システムS1(図1)とほぼ同じ
構成である。但し、第1実施例では数値制御装置200
a1〜200anがホスト計算機201とは孤立してい
たのに対して、第2実施例では数値制御装置200b1
〜200bnとホスト計算機201とを内部ネットワー
ク205を介して接続した点が異なる。
[0066] Figure 6 is an overall configuration diagram of a control software execution system S 3 of the numerical controller of the second embodiment. The control software execution system S 3 is substantially the same as that of the control software execution system S1 of the first embodiment (FIG. 1). However, in the first embodiment , the numerical controller 200
While a1 to 200an were isolated from the host computer 201, in the second embodiment , the numerical controller 200b1
And a host computer 201 ~200Bn point connected via an internal network 205 is different.

【0067】図7は、数値制御装置200b1のハード
ウェア構成図である。なお、数値制御装置200b2〜
200bnも同じ構成である。1は、各部の作動を制御
したり、数値制御に必要な演算を行なったりするメイン
CPUである。2は、各部を結ぶシステムバスである。
3は、数値制御装置の主要機能を実現する制御ソフトウ
ェアなどを格納するROM(不揮発性の記憶装置)であ
る。4は、一時記憶やワークエリアなどに用いるRAM
(揮発性の記憶装置)である。5は、外部との間でシリ
アル通信によりデータのやり取りを行なうデータSIO
インタフェース部である。6は、数値制御装置の運転状
態を表示したり、数値制御装置に与えた指令を確認した
りするための表示装置である。7は、数値制御装置に指
令を与えるためのキーボード(入力装置)である。8
は、サーボモータを制御するための指令を演算するサー
ボ制御部である。9は、サーボ制御部8から受け取った
指令を増幅してサーボモータへ駆動信号を出力するサー
ボアンプである。10は、工作機械(図示せず)の加工
部を制御するためのサーボモータである。11は、工作
機械との間で、サーボ制御指令以外のデータをやり取り
するためのプログラムコントローラ部である。12は、
メインCPU1に与えられる、システムクロック(図示
せず)と外部割り込み信号を表している。システムクロ
ックは、数値制御装置全体を制御するためのクロック信
号である。また、外部割り込み信号は、電源異常や非常
停止などのイベント(緊急な出来事)の発生をメインC
PU1に通知するための信号である。132は、図33
を用いて先に説明した仮想記憶を実現するためのアドレ
ス変換機構である。207は、内部ネットワーク205
を通じてホスト計算機201や他の数値制御装置200
b2〜200bnとの間で通信を行なうためのネットワ
ークインタフェースである。
FIG. 7 is a hardware configuration diagram of the numerical control device 200b1. Note that the numerical controller 200b2
200bn has the same configuration. Reference numeral 1 denotes a main CPU that controls the operation of each unit and performs calculations necessary for numerical control. Reference numeral 2 denotes a system bus that connects the components.
Reference numeral 3 denotes a ROM (non-volatile storage device) that stores control software for realizing the main functions of the numerical controller. 4 is a RAM used for temporary storage, work area, etc.
(Volatile storage device). 5 is a data SIO for exchanging data with an external device by serial communication.
Interface section. Reference numeral 6 denotes a display device for displaying an operation state of the numerical control device and for confirming a command given to the numerical control device. Reference numeral 7 denotes a keyboard (input device) for giving a command to the numerical controller. 8
Is a servo controller for calculating a command for controlling the servomotor. Reference numeral 9 denotes a servo amplifier that amplifies a command received from the servo control unit 8 and outputs a drive signal to a servo motor. Reference numeral 10 denotes a servomotor for controlling a processing unit of a machine tool (not shown). Reference numeral 11 denotes a program controller for exchanging data other than the servo control command with the machine tool. 12 is
2 shows a system clock (not shown) and an external interrupt signal supplied to the main CPU 1. The system clock is a clock signal for controlling the entire numerical controller. In addition, the external interrupt signal indicates the occurrence of an event (emergency event) such as a power failure or emergency stop.
This is a signal for notifying PU1. 132 corresponds to FIG.
Is an address translation mechanism for realizing the above-described virtual storage using. 207 is an internal network 205
Through the host computer 201 and other numerical control devices 200
This is a network interface for performing communication between b2 and bn.

【0068】上記制御ソフトウェア実行システムS3で
は、ホスト計算機201上に構築された汎用のCAD/
CAMシステムによりCAD/CAMデータを生成し、
そのCAD/CAMデータを数値制御装置の加工プログ
ラムに変換して、その加工プログラムに基づいて加工を
行なわせることが出来る。図8は、ホスト計算機201
上に構築された汎用のCAD/CAMシステムの動作の
概念図である。ホスト計算機201は、CAD/CAM
プロセス340と,データ変換プロセス341と,数値
制御装置の制御ソフトウェアを実現する数値制御装置プ
ロセス342とを生成して起動する。そして、CAD/
CAMプロセス340にはデータ出力用スレッド343
を走らせておく。CAD/CAMプロセス340は通常
の動作によりCAD/CAMデータを作成する。データ
出力用スレッド343は、CAD/CAMデータをデー
タ変換プロセス341のスレッド344に入力する。デ
ータ変換プロセス341では、内部のスレッドによりC
AD/CAMデータを数値制御装置の入力データに変換
し、データ出力スレッド345に渡す。データ出力スレ
ッド345は、数値制御装置の入力データを数値制御装
置プロセス342のデータ入力(設定)スレッド346
に送る。数値制御装置プロセス342は、数値制御装置
の入力データを加工プログラムに変換して、内部ネット
ワーク205を通じて数値制御装置に入力し、加工を行
なわせる。
In the control software execution system S3,
Is a general-purpose CAD /
Generate CAD / CAM data by CAM system,
The CAD / CAM data is processed by the numerical controller
Into a ram and perform machining based on that machining program.
Can be done . FIG. 8 shows the host computer 201.
It is a conceptual diagram of operation | movement of the general purpose CAD / CAM system constructed above . The host computer 201 has a CAD / CAM
A process 340, a data conversion process 341 and a numerical control device process 342 for realizing control software of the numerical control device are generated and activated. And CAD /
The CAM process 340 has a data output thread 343.
Keep running. The CAD / CAM process 340 creates CAD / CAM data by a normal operation. The data output thread 343 inputs the CAD / CAM data to the thread 344 of the data conversion process 341. In the data conversion process 341, the internal thread C
The AD / CAM data is converted into input data of the numerical controller and passed to the data output thread 345. The data output thread 345 converts the input data of the numerical controller into a data input (setting) thread 346 of the numerical controller process 342.
Send to The numerical controller process 342 converts the input data of the numerical controller into a machining program, inputs the converted data to the numerical controller through the internal network 205, and causes the numerical controller to perform machining.

【0069】上記のようにホスト計算機上のCAD/C
AMシステムにより生成されたCAD/CAMデータか
ら数値制御装置の加工プログラムを自動作成すれば、
工プログラムを作成するためのユーザ負担を軽減でき
る。
[0069] on the host computer as described above CAD / C
If the machining program for the numerical control device is automatically created from the CAD / CAM data generated by the AM system, the burden on the user for creating the machining program can be reduced.

【0070】次に、スレッドを分散して走らせることに
ついて説明する
Next, running the threads in a distributed manner
It will be described .

【0071】スレッドの分散の具体例を説明すれば、あ
る数値制御装置が低性能で安価なメインCPUを有して
おり、ホスト計算機201が高性能で高価なCPUを有
しているときには、簡単な処理を行なうスレッドは数値
制御装置に走らせて、複雑な処理を行なうスレッドはホ
スト計算機201に走らせるのが好適である。又、別の
具体例を説明すれば、図28を用いて先に説明した補間
処理24やサーボ処理25を行なうスレッドなどは数値
制御装置に走らせ、加工プログラム入力処理21や補正
計算処理22を行なうスレッドはホスト計算機201に
走らせるのが好適である。
[0071] To describe a specific example of a distributed thread, there numerical control equipment has a cheap main CPU with low performance, when the host computer 201 has a high-performance and expensive CPU is thread performing a simple process is run in the numerical control equipment, a thread that performs complex processing is preferred that run on the host computer 201. Also, if explaining another embodiment, such as a thread that performs an interpolation process 24 and the servo processing 25 described above with reference to FIG. 28 Hashirase the numerical control equipment, a machining program input processing 21 and the correction calculation process 22 The thread to be executed is preferably run on the host computer 201.

【0072】図9は、数値制御装置2001とホスト
計算機201との間で行なわれるスレッド間通信の説明
図である。211は、プロセスである。231はスレッ
ド1、232はスレッド2、233はスレッド3、23
4はスレッド4である。260はノード1、261はノ
ード2である。ここで、ノードとは、ネットワークの枝
の端点にあたる情報処理機器の総称である。例えば、ノ
ード1(260)はホスト計算機201、ノード2(2
61)は数値制御装置2001である。262は、オ
ペレーティングシステム240aのもとでスレッド1と
スレッド2との間の通信を処理するスレッド間通信処理
部である。263は、ノード1とノード2とを結ぶノー
ド間ネットワークである。
FIG . 9 illustrates the communication between threads performed between the numerical controller 200 b 1 and the host computer 201.
FIG . 211 is a process. 231 is thread 1, 232 is thread 2, 233 is thread 3, 23
Reference numeral 4 denotes a thread 4. 260 is a node 1 and 261 is a node 2. Here, the node is a general term for information processing equipment at the end point of a branch of the network. For example, the node 1 (260) is the host computer 201, the node 2 (2
61) is a numerical controller 200 b 1. Reference numeral 262 denotes an inter-thread communication processing unit that processes communication between the thread 1 and the thread 2 under the operating system 240a. Reference numeral 263 denotes an inter-node network connecting the nodes 1 and 2.

【0073】いま、ノード1(260)内のスレッド1
(231)からノード2(261)内のスレッド3(2
33)にメッセージを送る場合を想定する。スレッド1
(231)はシステムコールによって相手スレッドを指
定し、メッセージを送る要求をオペレーティングシステ
ム240aに対して発行する。このシステムコールによ
って制御は、オペレーティングシステム240aに移
る。システムコールの内容を解析することで、制御はス
レッド間通信処理部262に移る。スレッド間通信処理
部262は、相手スレッドがあるノード(ノード2)を
判定し、ノード2(261)に対してノード間ネットワ
ーク263を介してメッセージを送る。そのメッセージ
は、ノード2(261)のスレッド間通信処理部262
に渡り、スレッド間通信処理部262は、指定されたス
レッド3(233)に対してメッセージを渡す。
Now, thread 1 in node 1 (260)
From thread (231) to thread 3 (2) in node 2 (261)
It is assumed that a message is sent to 33). Thread 1
(231) designates a partner thread by a system call and issues a request to send a message to the operating system 240a. Control is transferred to the operating system 240a by this system call. By analyzing the contents of the system call, the control moves to the inter-thread communication processing unit 262. The inter-thread communication processing unit 262 determines a node (node 2) in which the partner thread exists, and sends a message to the node 2 (261) via the inter-node network 263. The message is sent to the inter-thread communication processing unit 262 of the node 2 (261).
, The inter-thread communication processing unit 262 passes the message to the designated thread 3 (233).

【0074】上記の想定では、スレッド1(231)か
らスレッド3(233)に直接にメッセージを送るもの
としたが、マルチスレッドオペレーティングシステムに
よってはメールボックスを用いてメッセージを渡すこと
も出来る。図10は、ノード1(260)内のスレッド
がノード2(261)内のスレッド3(233)にメー
ルボックスを用いてメッセージを送る場合の概念図であ
る。スレッド1(231)はシステムコールによって相
手スレッドのメールボックスを指定し、メッセージを送
る要求をオペレーティングシステム240aに対して発
行する。このシステムコールによって、制御はオペレー
ティングシステム240aに移る。システムコールの内
容を解析することで、制御はスレッド間通信処理部26
2に移る。スレッド間通信処理部262は指定されたメ
ールボックスがあるノード(ノード2)を判定して、ノ
ード2(261)に対してノード間ネットワーク263
を通してメッセージを送る。そのメッセージはノード2
(261)のスレッド間通信処理部262に渡る。スレ
ッド間通信処理部262は、メールボックス264にメ
ッセージを格納する。その後、スレッド間通信処理部2
62は、スレッド3(233)からポートを指定したメ
ッセージ読み込み要求があったらメッセージを渡す。読
み込み要求の方がメッセージの到着よりも速かった場合
には、メッセージが到着するまでスレッド3(233)
を待機させる。
[0074] In the above assumption, it is assumed that directly send a message to the thread 3 (233) from the thread 1 (231), depending on the multi-threaded operating system Ru can also pass a message by using the mail box. FIG. 10 is a conceptual diagram in a case where a thread in the node 1 (260) sends a message to a thread 3 (233) in the node 2 (261) using a mailbox. The thread 1 (231) specifies the mailbox of the partner thread by a system call, and issues a request to send a message to the operating system 240a. This system call transfers control to operating system 240a. By analyzing the contents of the system call, the control is controlled by the inter-thread communication processor 26.
Move to 2. The inter-thread communication processing unit 262 determines the node (node 2) where the designated mailbox is located, and sends the node 2 (261) the inter-node network 263.
Send messages through. The message is node 2
The processing is passed to the inter-thread communication processing unit 262 in (261). The inter-thread communication processing unit 262 stores the message in the mailbox 264. Then, the inter-thread communication processing unit 2
When the thread 3 (233) issues a message reading request specifying a port, the message 62 is passed. If the read request is faster than the message arrives, thread 3 (233) until the message arrives
Wait.

【0075】次に、分散共有メモリの機能を利用して、
スレッドを分散して走らせることについて説明する
Next, utilizing the function of the distributed shared memory,
A description will be given of running threads in a distributed manner .

【0076】プロセス内の別スレッドを別ノードで分
散して走らせることができないマルチスレッドオペレー
ティングシステムでは、分散型共有メモリの機能を利用
して、計算機201と数値制御装置200b1とで分散
して処理する。すなわち、ホスト計算機201に数値制
御装置の制御ソフトウェアの機能を実現するプロセスを
走らせ、1つの数値制御装置200b1にホスト計算機
201のプロセスとは独立したスレッドを走らせる。そ
の際、1プロセス内のスレッドでアドレス空間の共有
、分散型共有メモリの機能により実現する。
In a multithread operating system in which another thread in one process cannot be distributed and run on another node, the function of the distributed shared memory is used.
And distributed between the computer 201 and the numerical controller 200b1.
And process. That is, a process for realizing the function of the control software of the numerical control device is executed in the host computer 201, and one numerical control device 200b1 is connected to the host computer 201b.
A thread independent of the process 201 is run. At that time, the shared address space of the thread in one process, implemented by distributed, shared memory functions.

【0077】図11は、分散型共有メモリの概念図であ
る。ノード1(260)のCPU131が、ある論理ア
ドレスに対応した主記憶134の内容を読むときは、ア
ドレス変換機構132と変換テーブル133を用いて、
主記憶134の物理アドレスを算出して、内容を得る。
例えば、論理アドレスがノード1(260)の主記憶1
34に対応しているならば、ノード1(260)の変換
テーブル133は主記憶134の物理アドレスを算出す
る。また、論理アドレスがノード2(261)の主記憶
134に対応しているならば、ノード1(260)の変
換テーブル133は、ノード間ネットワーク135を介
してノード2(261)の変換テーブル133に主記憶
134の内容の読出しを要求する。
FIG. 11 is a conceptual diagram of a distributed shared memory. When reading the contents of the main memory 134 corresponding to a certain logical address, the CPU 131 of the node 1 (260) uses the address conversion mechanism 132 and the conversion table 133 to read the contents.
The physical address of the main memory 134 is calculated to obtain the contents.
For example, the logical address is the main memory 1 of the node 1 (260).
34, the conversion table 133 of the node 1 (260) calculates the physical address of the main memory 134. If the logical address corresponds to the main memory 134 of the node 2 (261), the conversion table 133 of the node 1 (260) is stored in the conversion table 133 of the node 2 (261) via the inter-node network 135. A request is made to read the contents of the main memory 134.

【0078】上記では、ホスト計算機201と1つの数
値制御装置200b1とに分散してスレッドを走らせた
のに対して、図12に示すように、ホスト計算機201
と複数の数値制御装置200b1〜200bnとに分散
してスレッドを走らせてもよい
In the above description, the host computer 201 and one number
Run threads distributed to the value controller 200b1
On the other hand, as shown in FIG.
And a plurality of numerical controllers 200b1 to 200bn
And run the thread .

【0079】えば、実時間処理が必要な補間処理24
やサーボ処理25(図28)を行なうスレッド231
は、それぞれの数値制御装置200b1〜200bnで
走らせ、実時間処理が不要な加工プログラム入力処理2
1や補正計算処理22(図28)を行なうスレッド23
2は、ホスト計算機201上で共通に走らせるのが好適
である。なお、ホスト計算機201上のスレッド232
は、数値制御装置200b1〜200bn対応で少なく
とも1つずつ走らせる。
[0079] For example, real-time processing is required interpolation processing 24
231 that performs servo processing 25 (FIG. 28)
Is run by each of the numerical control devices 200b1 to 200bn, and is a machining program input process 2 that does not require real-time processing.
1 and a thread 23 for performing the correction calculation process 22 (FIG. 28)
2 is preferably run in common on the host computer 201. The thread 232 on the host computer 201
Run at least one at a time corresponding to the numerical control devices 200b1 to 200bn.

【0080】以上の第2実施例の数値制御装置の制御ソ
フトウェア実行システムによれば、前記第1実施例の効
果に加えて、1プロセス内の別スレッドを別ノードで分
散して走らせることができないマルチスレッドオペレー
ティングシステムを用いたときにも、ホスト計算機20
1と数値制御装置200bとの間でタスクを分散して走
らせるので、数値制御装置には低性能のCPUを使用で
き、低コストにして効率的に数値制御装置の制御ソフト
ウェアを実行することが出来る
The control software of the numerical controller according to the second embodiment described above.
According to the software execution system , the effect of the first embodiment is obtained.
In addition to the result, another thread in one process is separated by another node.
Multi-thread operation that cannot be run
When the hosting system 20 is used,
Since it runs and distribute tasks between 1 and numerical control apparatus 200b, the numerical control apparatus using a low-performance CPU
Control software for numerical controllers efficiently at low cost
Ware can be executed .

【0081】上記では、キーボードと表示装置を備えた
数値制御装置200b1〜200bnを用いたが、キー
ボードと表示装置を備えていない数値制御装置を用いて
もよい。図13に示す制御ソフトウェア実行システムS
7は、これまでの制御ソフトウェア実行システムと同様
の構成であるが、キーボードと表示装置を備えていない
数値制御装置200e1〜200enを用いた点が異な
る。
In the above, a keyboard and a display device are provided.
Numerical control devices 200b1 to 200bn are used,
Using a numerical controller without a board and display
Is also good. The control software execution system S shown in FIG.
7 has the same configuration as the conventional control software execution system, but differs in that numerical control devices 200e1 to 200en without a keyboard and a display device are used.

【0082】図14は、数値制御装置200e1のハー
ドウェア構成図である。なお、数値制御装置200e2
〜200enも同じ構成である。数値制御装置200e
1は、第2実施例の数値制御装置200b1(図7相
当)から、表示装置6とキーボード7とを取り除いた構
成である。
FIG. 14 is a hardware configuration diagram of the numerical controller 200e1. Note that the numerical controller 200e2
~ 200en has the same configuration. Numerical control device 200e
Reference numeral 1 denotes a configuration in which the display device 6 and the keyboard 7 are removed from the numerical control device 200b1 (corresponding to FIG. 7) of the second embodiment.

【0083】図15は、この制御ソフトウェア実行シス
テムS7の動作を示す概念図である。数値制御装置20
0e1の表示設定処理を行なうスレッド273は、他の
スレッド272から表示要求があったとき、自分では表
示処理を行わず、ホスト計算機201の表示装置を制御
するスレッド270に対して内部ネットワーク205を
介して表示要求を送る。スレッド270は表示要求を受
け取ると、表示装置203に対して表示処理を行なう。
つまり、数値制御装置200e1の表示装置に表示する
代りに、ホスト計算機201の表示装置203に表示す
る。(そのときは、ホスト計算機本来の画面を表示でき
なくなるので、表示装置203はホスト計算機本来の画
面または1つの数値制御装置のいずれかの画面を表示す
ることになる)また、ホスト計算機201のキーボード
204が数値制御装置200e1への指示を受け付ける
と、スレッド271は、その指示内容を内部ネットワー
ク205を介して数値制御装置200e1の表示設定処
理を行なうスレッド273へ送る。つまり、数値制御装
置200e1のキーボードを用いて入力する代りに、ホ
スト計算機201のキーボード204を用いて入力す
る。
FIG. 15 is a conceptual diagram showing the operation of the control software execution system S7. Numerical control device 20
The thread 273 performing the display setting process of 0e1 does not perform the display process by itself when receiving a display request from the other thread 272, and sends the thread 270 controlling the display device of the host computer 201 to the thread 270 via the internal network 205. To send a display request. Upon receiving the display request, the thread 270 performs a display process on the display device 203.
That is, instead of displaying on the display device of the numerical control device 200e1, it is displayed on the display device 203 of the host computer 201. (At that time, since the original screen of the host computer cannot be displayed, the display device 203 displays either the original screen of the host computer or the screen of one numerical controller.) When the 204 receives an instruction to the numerical controller 200e1, the thread 271 sends the instruction to the thread 273 for performing the display setting process of the numerical controller 200e1 via the internal network 205. In other words, instead of using the keyboard of the numerical controller 200e1, the input is performed using the keyboard 204 of the host computer 201.

【0084】上記によれば、ホスト計算機201の表示
装置203に1つの数値制御装置の画面を表示すると共
に、ホスト計算機201のキーボード204を用いて1
つの数値制御装置への指示を入力できるようになるの
で、数値制御装置の表示装置やキーボードがいらなくな
り、数値制御装置の構成を簡略化して安価にすることが
出来る。
[0084] According to the above SL, displays the screen of one of the numerical control apparatus to the display device 203 of the host computer 201, using the keyboard 204 of the host computer 201 1
Since it becomes possible to input instructions to the two numerical control devices, a display device and a keyboard of the numerical control device are not required, and the configuration of the numerical control device can be simplified and reduced in cost.

【0085】ホスト計算機201の表示装置としてビッ
トマップディスプレイを用いてもよい。図16は、ビッ
トマップディスプレイを用いた制御ソフトウェア実行シ
ステムの全体構成図である。この制御ソフトウェア実行
システムS8は、前記制御ソフトウェア実行システムS
7とほぼ同じ構成である。但し、数値制御装置200f
1〜200fnを用いた点と、ホスト計算機201の表
示装置203aとしてビットマップディスプレイを用い
た点が異なる。
As a display device of the host computer 201,
A map display may be used. FIG. 16 is a bit
1 is an overall configuration diagram of a control software execution system using a map display . The control software execution system S8 includes the control software execution system S
7 has almost the same configuration. However, the numerical controller 200f
1 to 200 fn and a point that a bitmap display is used as the display device 203 a of the host computer 201.

【0086】図17は、この制御ソフトウェア実行シス
テムS8における表示処理の概念図である。ホスト計算
機201は、ホスト計算機本来の画面である画面1(2
80)と画面2(281)と画面3(282)に対応し
て、画面を制御するスレッド284,285,286を
生成する。数値制御装置200f1では、表示要求があ
ると、実施例7と同様にして、ホスト計算機201のス
レッド284,285,286に対して内部ネットワー
ク205を介して表示要求を送る。そこで、ホスト計算
機201は、ホスト計算機本来の画面と数値制御装置2
00f1の複数の画面を表示装置203aに表示する。
FIG. 17 is a conceptual diagram of the display processing in the control software execution system S8. The host computer 201 displays a screen 1 (2) which is an original screen of the host computer.
80), the screen 2 (281), and the screen 3 (282), the threads 284, 285, and 286 for controlling the screen are generated. Upon receiving a display request, the numerical controller 200f1 sends the display request to the threads 284, 285, 286 of the host computer 201 via the internal network 205, as in the seventh embodiment. Therefore, the host computer 201 is configured to display the original screen of the host computer and the numerical controller 2
A plurality of screens of 00f1 are displayed on the display device 203a.

【0087】上記によれば、ホスト計算機の表示装置に
ホスト計算機本来の画面と1つの数値制御装置の複数の
画面を1度に表示するので、ユーザは多彩な情報を1度
に得ることができるようになり、各種の指示を入力する
際の操作性が向上する。
[0087] According to the above SL, so to display in a plurality of screens once the host computer original screen and one of the numerical control apparatus to the display device of the host computer, the user to obtain a variety of information at a time Operability at the time of inputting various instructions is improved.

【0088】ホスト計算機201の表示装置203a
(図16相当)にホスト計算機本来の画面と複数の数値
制御装置の画面を同時表示できるようにしてもよい。
のためには、図17を用いて先に説明したホスト計算機
201のスレッドを、表示対象の数値制御装置200g
1〜200gnの個数に応じてさらに増やせば良い。
The display device 203a of the host computer 201
(Equivalent to Fig. 16) The original screen of the host computer and multiple numerical values
The screens of the control device may be displayed simultaneously. For this purpose, the thread of the host computer 201 described above with reference to FIG.
It may be further increased according to the number of 1 to 200 gn.

【0089】このようにすれば、ホスト計算機の表示装
置に同時表示された画面からホスト計算機本来の情報と
複数の数値制御装置の情報を1度に得ることが出来るた
め、操作性がさらに良くなる。
[0089] Thus to lever, since it is possible to obtain the simultaneous display screen to the display device of the host computer the information of the host computer original information and a plurality of numerical control device at a time, is better operability Become.

【0090】マウスなどのポインティングデバイスを用
いて任意の数値制御装置に対して指令を与えられるよう
にしてもよい。図18は、マウスを備えた制御ソフトウ
ェア実行システムの全体構成図である。この制御ソフト
ウェア実行システムS10は、図16とほぼ同じ構成で
あるが、マウスMなどのポインティングデバイスを用い
て任意の数値制御装置200h1〜200hnに対して
指令を与えられる点が異なる。
Using a pointing device such as a mouse
Command to any numerical controller.
It may be. FIG. 18 is an overall configuration diagram of a control software execution system including a mouse . The control software execution system S10 is almost the same configuration as FIG. 16, that given a command to any of the numerical controller 200h1~200hn is different using a pointing device such as a mouse M.

【0091】図19は、この制御ソフトウェア実行シス
テムS10における表示処理の概念図である。ホスト計
算機201は、図17を用いて先に説明した画面を制御
するスレッドに加えて、スレッド292を生成する。こ
のスレッド292は、ユーザにより操作されたマウスM
などのポインティングデバイスの動きを検知して、ポイ
ンティングデバイスカーソル291がどの画面にいるか
を判断して、それに応じて例えば画面1(280)を制
御するスレッド293に対してポインティングデバイス
カーソル291を表示するように要求を出す。そのと
き、キーボード204(図18)からの入力は、画面1
(280)への入力とみなして、入力情報を画面1(2
80)を制御するスレッド293に対して送る。スレッ
ド293は、当該数値制御装置(図示せず)(のスレッ
ド)に対して入力情報を送る。
FIG. 19 is a conceptual diagram of the display processing in the control software execution system S10. The host computer 201 generates a thread 292 in addition to the thread for controlling the screen described above with reference to FIG. The thread 292 includes a mouse M operated by the user.
For example, the movement of a pointing device such as a mouse is detected, the screen on which the pointing device cursor 291 is located is determined, and the pointing device cursor 291 is displayed on the thread 293 for controlling the screen 1 (280) accordingly. Make a request to At this time, the input from the keyboard 204 (FIG. 18) is
(280), the input information is displayed on screen 1 (2).
80) to the controlling thread 293. The thread 293 sends input information to (a thread of) the numerical controller (not shown).

【0092】上記によれば、ユーザは、指示を与える数
値制御装置をホスト計算機の画面上のポインティングデ
バイスカーソルにより選択できるので、複数の数値制御
装置に指示を与える場合でもいちいち移動する必要がな
くなる。
[0092] According to the above reporting, the user, since the numerical control apparatus which gives an indication can be selected by a pointing device cursor on the screen of the host computer, each time it is not necessary to move even when giving instructions to a plurality of numerical control device .

【0093】第3実施例. この発明の第3実施例の数値制御装置の制御ソフトウェ
ア実行システムは、前記第1実施例の構成に加えて、
値制御装置200i1〜200in(図示せず)に対す
る外部割り込み信号をホスト計算機で処理できるように
したものである。
Third embodiment. The control software execution system of the numerical control device according to the third embodiment of the present invention can process external interrupt signals for the numerical control devices 200i1 to 200in (not shown) by the host computer in addition to the configuration of the first embodiment. It is like that.

【0094】図20は、数値制御装置200i1のハー
ドウェア構成図である。なお、数値制御装置200i2
〜200inも同じ構成である。数値制御装置200i
1は、第2実施例の数値制御装置200b1(図7)か
ら、メインCPU1とROM3と表示装置6とキーボー
ド7とアドレス変換機構132を取り除き、割り込み信
号処理部300を追加した構成である。この構成は、ホ
スト計算機201のCPUを数値制御装置200i1〜
200inでも使用することで、数値制御装置200の
メインCPU1およびアドレス変換機構132(図7相
当)を不要としたものである。
FIG. 20 is a hardware configuration diagram of the numerical control device 200i1. Note that the numerical controller 200i2
~ 200in has the same configuration. Numerical control device 200i
1 is a configuration in which the main CPU 1, the ROM 3, the display device 6, the keyboard 7, and the address conversion mechanism 132 are removed from the numerical control device 200b1 (FIG. 7) of the second embodiment, and an interrupt signal processing unit 300 is added. In this configuration, the CPU of the host computer 201 is connected to the numerical control devices 200i1 to 200i1.
The use of 200-in also eliminates the need for the main CPU 1 of the numerical controller 200 and the address conversion mechanism 132 (corresponding to FIG. 7).

【0095】次に、この制御ソフトウェア実行システム
S11の動作を説明する。なお、説明の都合上、数値制
御装置200i1についての動作のみを説明するが、数
値制御装置200i2〜200inについても同様であ
る。外部割り込み信号12は、数値制御装置200i1
に対して電源異常や非常停止などのイベント(緊急な出
来事)の処理を要求する時に発生され、数値制御装置2
00i1の割り込み信号処理部300に伝えられる。こ
のとき、割り込み信号処理部300は、外部割り込み信
号12をRAM4などにラッチ(一時的に記憶)してお
く。一方、ホスト計算機201は、RAM4などの内容
を定期的にチェックするスレッドを生成し、外部割り込
み信号12がラッチされていれば、数値制御装置200
i1に対して何らかの要求があったと判定して、ホスト
計算機201上の数値制御装置の制御ソフトウェアを実
現するスレッド(群)に対してそれを知らせる。その後
は、これまでの実施例と同様に動作する。
Next, the operation of the control software execution system S11 will be described. For convenience of description, only the operation of the numerical control device 200i1 will be described, but the same applies to the numerical control devices 200i2 to 200in. The external interrupt signal 12 is transmitted to the numerical controller 200i1
Events such as power failure or emergency stop (emergency
Generated when requesting the processing of
00i1 is transmitted to the interrupt signal processing unit 300. At this time, the interrupt signal processing unit 300 latches (temporarily stores) the external interrupt signal 12 in the RAM 4 or the like. On the other hand, the host computer 201 generates a thread for periodically checking the contents of the RAM 4 and the like, and if the external interrupt signal 12 is latched, the numerical controller 200
It is determined that some request has been made to i1, and this is notified to a thread (group) that implements the control software of the numerical control device on the host computer 201. Thereafter, the operation is performed in the same manner as in the previous embodiments.

【0096】以上の第3実施例の制御ソフトウェア実行
システムによれば、ホスト計算機が数値制御装置への外
部割り込み信号の有無を監視するので、数値制御装置の
CPUを無くしても割り込み処理に対処でき、数値制御
装置の構成を簡略化できる
Execution of control software of the third embodiment described above
According to the system, the host computer monitors the presence or absence of an external interrupt signal to the numerical controller , so that the
Even without CPU, it can handle interrupt processing and numerical control
The configuration of the device can be simplified .

【0097】第4実施例. 図21は、この発明の第4実施例の数値制御装置の制御
ソフトウェア実行システムの全体構成図である。この制
御ソフトウェア実行システムS12は、ハードディスク
202への読み書きを行なうファイルサーバ208と、
CPUプール301と、外部ネットワーク206と接続
したゲートウェイ部2070を備えている。また、数値
制御装置数値制御装置200j1〜200jnのハード
ウェア構成は、200i1〜200in(図20)と同
じである。
Fourth Embodiment FIG. 21 is an overall configuration diagram of a control software execution system of a numerical control device according to a fourth embodiment of the present invention. The control software execution system S12 includes a file server 208 for reading from and writing to the hard disk 202,
A CPU pool 301 and a gateway unit 2070 connected to the external network 206 are provided. The hardware configuration of the numerical control devices 200j1 to 200jn is the same as that of 200i1 to 200in (FIG. 20).

【0098】図22は、CPUプール301の内部構成
図である。CPUプール301のスロットには、複数の
CPUカード302が挿入されている。各CPUカード
302の間は、バス312により結ばれている。これら
CPUカード302は、同種のCPUに統一されていな
くてもよい。各CPUカード302のCPU311,3
13〜325は、それぞれローカルメモリ310,31
2〜326を備えている。
FIG. 22 is an internal configuration diagram of the CPU pool 301. A plurality of CPU cards 302 are inserted into slots of the CPU pool 301. Each CPU card 302 is connected by a bus 312. These CPU cards 302 do not have to be unified to the same type of CPU. CPUs 311 and 3 of each CPU card 302
13 to 325 are local memories 310 and 31 respectively.
2 to 326 are provided.

【0099】次に、この制御ソフトウェア実行システム
S12の動作を説明する。CPUプール301の1つの
CPUカード302にホスト計算機201のCPUの役
目を果たさせる。これをホスト機能CPUカードと呼
ぶ。このホスト機能CPUカードが第3実施例と同様の
処理により数値制御装置200j1〜200jnにCP
Uを割り当てる。例えば、図22においてCPU311
がホスト機能CPUであるとき、数値制御装置200j
1のCPUとしてCPU313を割り当てる。このと
き、数値制御装置200j1の制御ソフトウェアを実行
するスレッドは、ローカルメモリ310とローカルメモ
リ312(図22)にローディングされて、それぞれホ
スト機能CPUのマルチスレッドオペレーティングシス
テムのもとで走る。これらの処理は、第2実施例で述べ
た処理と類似しているが、スレッド間通信はネットワー
クではなくバス312を通して行なう点が異なる。
Next, the operation of the control software execution system S12 will be described. One CPU card 302 in the CPU pool 301 serves as the CPU of the host computer 201. This is called a host function CPU card. This host function CPU card sends the CP to the numerical control devices 200j1-200jn by the same processing as in the third embodiment.
Assign U. For example, in FIG.
Is a host function CPU, the numerical controller 200j
The CPU 313 is assigned as one CPU. At this time, the thread executing the control software of the numerical controller 200j1 is loaded into the local memory 310 and the local memory 312 (FIG. 22), and runs under the multi-thread operating system of the host function CPU. These processes are similar to the processing described in the second embodiment, inter-thread communication point made through the bus 312 differ not a network.

【0100】なお、CPUの能力が不足するとき(例え
ばホスト機能CPUのオペレーティングシステムのもと
で走るスレッドの数がある一定量を越えたようなとき)
は、CPUプール301(図22)内のCPUカード3
02に余裕がある限り新たなCPUカード302を獲得
することで、CPUの処理能力を調整できる。具体的に
は、CPUの処理能力を多く必要とする時には複数のC
PUカード302を使用し、CPUの処理能力がそれほ
ど必要でない時には1つのCPUカード302を使用す
ればよい。
When the capacity of the CPU is insufficient (for example, when the number of threads running under the operating system of the host function CPU exceeds a certain amount).
Is the CPU card 3 in the CPU pool 301 (FIG. 22).
By obtaining a new CPU card 302 as long as there is room in the CPU 02, the processing capacity of the CPU can be adjusted. Specifically, when a large CPU processing capacity is required, a plurality of C
When the PU card 302 is used and the processing capability of the CPU is not so required, one CPU card 302 may be used.

【0101】図23は、新たなCPUカード302を獲
得するときの動作を示す概念図である。320,321
は、ホスト機能CPU311上で走っているスレッドを
示している。322〜323は、数値制御装置200j
1の制御ソフトウェアを実行するCPU313上で走っ
ているスレッドである。
FIG. 23 is a conceptual diagram showing the operation when a new CPU card 302 is acquired. 320, 321
Indicates a thread running on the host function CPU 311. 322 to 323 are numerical control devices 200j
This is a thread running on the CPU 313 that executes the first control software.

【0102】スレッド322は、CPU312上で走っ
ているスレッドの数を周期的に数える。スレッド320
は、スレッド322と周期的にメッセージを交換するこ
とでCPU313上で走っているスレッドの数を認識す
る。スレッドの数が所定値を越えると、スレッド320
は、数値制御装置200h1の処理を行なうCPU31
3を獲得したのと同じ手順で新たなCPUカードを獲得
する。ここでは、説明の都合上、図22におけるCPU
325を新たに獲得するものとする。まず、新たに走ら
せるべきスレッドのコードと、CPU325のオペレー
ティングシステムをハードディスク202(図21)か
ら読み出し、ローカルメモリ326にローディングす
る。初期化スレッドを走らせた後、スレッド322に対
して新たに獲得したCPU325についての情報を送
る。次に、それまでCPU313で走らせていたスレッ
ド322をCPU325に移して走らせる。
The thread 322 periodically counts the number of threads running on the CPU 312. Thread 320
Recognizes the number of threads running on the CPU 313 by periodically exchanging messages with the thread 322. When the number of threads exceeds a predetermined value, the threads 320
Is a CPU 31 that performs processing of the numerical controller 200h1.
A new CPU card is obtained in the same procedure as that for obtaining No. 3. Here, for convenience of explanation, the CPU in FIG.
325 shall be newly acquired. First, the code of the thread to be newly run and the operating system of the CPU 325 are read from the hard disk 202 (FIG. 21) and loaded into the local memory 326. After running the initialization thread, the thread 322 is sent information about the newly acquired CPU 325. Next, the thread 322 that has been running on the CPU 313 is transferred to the CPU 325 and run.

【0103】以上の第4実施例の制御ソフトウェア実行
システムによれば、複数のCPUカードを有するCPU
プールを備えるので、数値制御装置の制御ソフトウェア
の処理負荷に応じてCPUを獲得・解放することで処理
能力を調整できる。
Execution of control software of the fourth embodiment described above
According to the system , a CPU having a plurality of CPU cards
Since the pool is provided, the processing capacity can be adjusted by acquiring and releasing the CPU according to the processing load of the control software of the numerical controller.

【0104】第5実施例. この発明の第5実施例の数値制御装置の制御ソフトウェ
ア実行システムは第4実施例とほぼ同じである。但
し、第4実施例では1度に1つずつの数値制御装置を制
御するのに対して、第5実施例では1度に複数の数値制
御装置を制御できる点が異なる。
Fifth embodiment. The control software execution system of the numerical controller of the fifth embodiment of the present invention is substantially the same as the fourth embodiment. However, with respect to control a numerical control device, one for the fourth embodiment 1 degree, it is that it can control multiple numerical control device 1 degree fifth embodiment differ.

【0105】この制御ソフトウェア実行システムS13
の動作は、第4実施例の制御ソフトウェア実行システム
S12の動作とほぼ同じである。但し、CPUプール3
01(図21)中のホスト機能CPUカード上のスレッ
ドが第4実施例と同様の処理により数値制御装置に順に
CPUを割り当てていく。
This control software execution system S13
Is almost the same as the operation of the control software execution system S12 of the fourth embodiment . However, CPU pool 3
The thread on the host function CPU card in FIG. 21 (FIG. 21) sequentially allocates CPUs to the numerical control device by the same processing as in the fourth embodiment .

【0106】以上の第5実施例の制御ソフトウェア実行
システムS13によれば、CPUプールの中のCPUを
複数の数値制御装置のCPUとして割り当てることがで
きるので、第4実施例による効果に加えて、複数の数値
制御装置の制御ソフトウェアを同時に実行できるように
なる。
Execution of control software of the above fifth embodiment
According to the system S13 , CPUs in the CPU pool can be assigned as CPUs of a plurality of numerical control devices. In addition to the effects of the fourth embodiment , control software of a plurality of numerical control devices can be executed simultaneously. become.

【0107】第6実施例. この発明の第6実施例の数値制御装置の制御ソフトウェ
ア実行システムS14は、第5実施例とほぼ同じであ
る。但し、第6実施例では、CPUプール301(図2
2)中の1つのCPUカード302を割り込み検査専用
のCPUカードとして使用する点が異なる。
Sixth embodiment. The control software execution system S14 of the numerical controller according to the sixth embodiment of the present invention is substantially the same as that of the fifth embodiment . However, in the sixth embodiment , the CPU pool 301 (FIG. 2)
That it uses a single CPU card 302 in 2) as an interrupt inspection dedicated CPU card is different.

【0108】この制御ソフトウェア実行システムS14
の動作は、第5実施例の制御ソフトウェア実行システム
S13の動作とほぼ同じである。但し、CPUカード3
02のローカルメモリへのコードのローディングはホス
ト機能CPUのスレッドが行ない、割り込みを発見した
場合には、当該数値制御装置を制御しているCPUカー
ド302上のスレッドにメッセージを送ってそれを通知
する。また、割り込みが当該数値制御装置に対する最初
の割り込みであった場合には、それをホスト機能CPU
のスレッドに送って、これまで述べたような手順でその
数値制御装置の動作を開始させる。
The control software execution system S14
Is almost the same as the operation of the control software execution system S13 of the fifth embodiment . However, CPU card 3
02 is loaded by the thread of the host function CPU, and when an interrupt is found, a message is sent to a thread on the CPU card 302 that controls the numerical controller to notify the thread. . If the interrupt is the first interrupt to the numerical controller, the interrupt is sent to the host function CPU.
To start the operation of the numerical controller according to the procedure described above.

【0109】以上の第6実施例の制御ソフトウェア実行
システムによれば、CPUプールの中の1つのCPUカ
ードを割り込み検査専用のCPUとして使うので、外部
割り込み信号に迅速に対処することができるようにな
る。
Execution of control software according to the sixth embodiment.
According to the system , since one CPU card in the CPU pool is used as a CPU dedicated to the interrupt check, it is possible to quickly deal with an external interrupt signal.

【0110】図24に示す制御ソフトウェア実行システ
ムS14’は、制御ソフトウェア実行システムS14
ほぼ同じ構成である。但し、CPUカード302のCP
Uごとのローカルメモリ310,312〜326(図2
2相当)に代えて、CPUカード302のCPUで共有
できる共有メモリ330を設けた点と、数値制御装置2
00k1〜200knを用いた点とが異なる。
The control software execution system S14 ' shown in FIG . 24 has substantially the same configuration as the control software execution system S14 . However then, CP of the CPU card 302
The local memory 310, 312 to 326 for each U (FIG. 2)
2), a shared memory 330 that can be shared by the CPU of the CPU card 302 is provided.
And it is different from that using the 00k1~200kn.

【0111】図25は、数値制御装置200k1のハー
ドウェア構成図である。なお、数値制御装置200k2
〜200knは、数値制御装置200k1と同じ構成で
ある。数値制御装置200k1は、実施例11の数値制
御装置200i1(図20)からRAM4を取り除いた
構成である。
FIG. 25 is a hardware configuration diagram of the numerical controller 200k1. Note that the numerical controller 200k2
To 200kn have the same configuration as the numerical control device 200k1. The numerical controller 200k1 has a configuration in which the RAM 4 is removed from the numerical controller 200i1 (FIG. 20) of the eleventh embodiment.

【0112】この制御ソフトウェア実行システムS1
4’の動作は、制御ソフトウェア実行システムS14の
動作とほぼ同じであるが、仮想的な分散型共有メモリを
用いる代りに、実際に同じ物理アドレスでスレッドを走
らせる。このときは、あるプロセス内のスレッドを任意
のノード上で走らせることが出来る。
This control software execution system S1
The operation of 4 'is almost the same as the operation of the control software execution system S14, but instead of using a virtual distributed shared memory, a thread is actually run at the same physical address. At this time, a thread in a certain process can be run on an arbitrary node.

【0113】以上のようにすれば、CPUカードのCP
Uごとにローカルメモリを備えなくても、外部割り込み
信号に迅速に対処することができるようになる
As described above, the CP of the CPU card
External interrupt without local memory for each U
Be able to respond quickly to signals .

【0114】変形実施例. 値制御装置200p1(図示せず)に汎用のマルチス
レッドオペレーティングシステム自体とデータ入力スレ
ッドだけを予め走らせておき、データ入力スレッドは、
ホスト計算機201のデータ出力スレッドから、ホスト
計算機201のハードディスク202内にファイルとし
て管理されている数値制御装置の制御ソフトウェアのコ
ード部分を通信で受け取って、そのコードを数値制御装
置200p1のRAM4に順に格納していく、というよ
うにしてもよい
Modified embodiment. Aft by numerical control device 200P1 (not shown) in advance run only multithreaded operating system itself and the data input thread universal, data entry thread,
From the data output thread of the host computer 201, a code portion of the control software of the numerical control device managed as a file in the hard disk 202 of the host computer 201 is received by communication, and the code is sequentially stored in the RAM 4 of the numerical control device 200p1. I will do it
You may do it .

【0115】このようにすれば、数値制御装置はホスト
計算機からダウンロードされた制御ソフトウェアを実行
できるので、ホスト計算機上で開発された制御ソフトウ
ェアを速やかに実行できるようになる。また、ホスト計
算機は、数値制御装置の制御ソフトウェアをファイルと
して管理するので、管理効率が向上する。
With this configuration, the numerical control device can execute the control software downloaded from the host computer, and thus can quickly execute the control software developed on the host computer. Further, since the host computer manages the control software of the numerical controller as a file, the management efficiency is improved.

【0116】ウンロード対象の数値制御装置1台
限らず、複数台にしてもよい
[0116] of the download target the numerical control device in one
The invention is not limited to this, and a plurality may be used .

【0117】ダウンロード対象の数値制御装置を複数台
とすれば、複数の種類の数値制御装置の制御ソフトウェ
アをファイルとして一括して管理できるため、管理効率
がさらに向上する。
A plurality of numerical control units to be downloaded
Then, since the control software of a plurality of types of numerical control devices can be collectively managed as a file, the management efficiency is further improved.

【0118】数値制御装置にフラッシュROMを追加し
てもよい
A flash ROM was added to the numerical controller.
You may .

【0119】図26は、フラッシュROMを追加した
値制御装置200q1のハードウェア構成図である。な
お、数値制御装置200q2〜200qnも同じ構成で
ある。数値制御装置200q1は、第2実施例の数値制
御装置200b1(図7)に、フラッシュROM113
3を追加した構成である。
FIG. 26 is a hardware configuration diagram of a numerical value control device 200q1 to which a flash ROM has been added . The numerical controllers 200q2 to 200qn have the same configuration. The numerical control device 200q1 includes a flash ROM 113 in the numerical control device 200b1 (FIG. 7) of the second embodiment .
3 is added.

【0120】次に、この数値制御装置200q1に制御
ソフトウェアをダウンロードするときの動作を説明す
る。数値制御装置200q1には、汎用のマルチスレッ
ドオペレーティングシステム自体と,データ入力スレッ
ドと,フラッシュROM書き込みスレッドだけを予め走
らせておく。そして、データ入力スレッドは、ホスト計
算機201のデータ出力スレッドから、ホスト計算機2
01のハードディスク202内にファイルとして管理さ
れている数値制御装置の制御ソフトウェアのコード部分
を通信で受け取って、そのコードを順にフラッシュRO
M書き込みスレッドに渡す。フラッシュROM書き込み
スレッドは、与えられたコードをフラッシュROM11
33に書き込んでいく。
Next, an operation when downloading control software to the numerical controller 200q1 will be described. Only a general-purpose multithread operating system itself, a data input thread, and a flash ROM writing thread are run in advance in the numerical controller 200q1. The data input thread is changed from the data output thread of the host computer 201 to the host computer 2.
01 of the numerical control device, which is managed as a file in the hard disk 202 of the hard disk drive No. 01 by communication, and sequentially transmits the code portion to the flash RO.
Pass to M writing thread. The flash ROM writing thread stores the given code in the flash ROM 11
Write to 33.

【0121】上記によれば、数値制御装置の制御ソフト
ウェアをフラッシュROMに保持しておけるため、数値
制御装置を立ち上げる度に制御ソフトウェアをダウンロ
ードしなくてよい。また、フラッシュROMに書き込ま
れた内容は1度にまとめて消去できるので、制御ソフト
ウェアの書き換え時間を短縮できる。
[0121] According to the above reporting, since definitive holds the control software of the numerical controller to the flash ROM, or not to download the control software every time the launch numerical controller. Further, since the contents written in the flash ROM can be erased all at once, the rewriting time of the control software can be reduced.

【0122】なお、上記説明では、ホスト計算機201
のオペレーティングシステムとして、汎用のマルチスレ
ッドオペレーティングシステムを用いたが、汎用のマル
チタスクオペレーティングシステムを用いても同等であ
In the above description , the host computer 201
As an operating system, but using a general-purpose multithreaded operating system, equivalent Der even using a general-purpose multitasking operating system
You .

【0123】[0123]

【発明の効果】請求項1の制御ソフトウェア実行システ
ムによれば、数値制御装置の制御ソフトウェアのスケジ
ューリングの制御用に1つのスレッドを生成するので、
計算機の汎用のマルチスレッドオペレーティングシステ
ムがスレッド間のスケジューリング機能を備えていなく
ても、計算機における汎用のマルチスレッドオペレーテ
ィングシステムの下で数値制御装置の制御ソフトウェア
を実行させることができるようになる。請求項2の制御
ソフトウェア実行システムによれば、1プロセス内の別
スレッドを別ノードで分散して走らせることができない
マルチスレッドオペレーティングシステムを用いたとき
にも、計算機と数値制御装置との間でタスクを分散して
処理できるので、数値制御装置に低性能のCPUを使用
でき、低コストにして効率的に数値制御装置の制御ソフ
トウェアを実行することが出来る。請求項3の制御ソフ
トウェア実行システムによれば、計算機が数値制御装置
への外部割り込み信号の有無を監視するので、数値制御
装置のCPUを無くしても割り込み処理に対処でき、数
値制御装置の構成を簡略化できる。請求項4の制御ソフ
トウェア実行システムによれば、複数のCPUカードを
有するCPUプールを備えるので、数値制御装置の制御
ソフトウェアの処理負荷に応じてCPUを獲得・解放す
ることで処理能力を調整できる。請求項5の制御ソフト
ウェア実行システムによれば、CPUプールの中のCP
Uを複数の数値制御装置のCPUとして割り当てること
ができるので、複数の数値制御装置の制御ソフトウェア
を同時に実行できる。請求項6の制御ソフトウェア実行
システムによれば、CPUプールの中の1つのCPUカ
ードを割り込み検査専用のCPUとして使うので、外部
割り込み信号に迅速に対処することが出来る
The control software execution system according to claim 1
According to the system, the schedule of the control software
Since one thread is created for controlling Turing,
A general-purpose multi-threaded operating system for computers
System does not have scheduling function between threads
Even a general-purpose multi-threaded operator in a computer
Control software of numerical controller under the operating system
Can be executed. Claim 2
According to the software execution system, another within one process
Threads cannot be distributed and run on different nodes
When using a multi-threaded operating system
The tasks are distributed between the computer and the numerical controller.
Uses a low-performance CPU for the numerical controller because it can process
Control software for the numerical controller efficiently at low cost.
Software. The control software according to claim 3.
According to the hardware execution system, the computer is a numerical controller
Monitors the presence or absence of an external interrupt signal to the
Interrupt processing can be dealt with even without the CPU of the device,
The configuration of the value control device can be simplified. The control software according to claim 4.
According to the hardware execution system, a plurality of CPU cards
Control of the numerical control device
Acquire and release CPU according to software processing load
By doing so, the processing capacity can be adjusted. The control software according to claim 5
According to the hardware execution system, the CP in the CPU pool
U is assigned as a CPU of a plurality of numerical controllers
Control software for multiple numerical controllers
Can be executed simultaneously. Execution of the control software of claim 6
According to the system, one CPU pool in the CPU pool
Since the code is used as a CPU dedicated to interrupt inspection,
An interrupt signal can be quickly dealt with .

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

【図1】この発明の第1実施例の制御ソフトウェア実行
システムの全体構成図である。
FIG. 1 is an overall configuration diagram of a control software execution system according to a first embodiment of the present invention.

【図2】プロセスを生成するための流れ図である。FIG. 2 is a flowchart for creating a process.

【図3】ホスト計算機の内部に構成されたプロセスの概
念図である。
FIG. 3 is a conceptual diagram of a process configured inside a host computer.

【図4】スケジューラによるスケジューリングの概念図
である。
FIG. 4 is a conceptual diagram of scheduling by a scheduler.

【図5】スケジューラスレッドによるスケジューリング
の概念図である。
FIG. 5 is a conceptual diagram of scheduling by a scheduler thread.

【図6】この発明の第2実施例の制御ソフトウェア実行
システムの全体構成図である。
FIG. 6 is an overall configuration diagram of a control software execution system according to a second embodiment of the present invention.

【図7】数値制御装置200b1のハードウェア構成図
である。
FIG. 7 is a hardware configuration diagram of the numerical control device 200b1.

【図8】ホスト計算機上に構築された汎用のCAD/C
AMシステムの動作の概念図である
FIG. 8: General-purpose CAD / C constructed on a host computer
It is a conceptual diagram of operation | movement of an AM system .

【図9】数値制御装置とホスト計算機の間で行なわれる
スレッド間通信の概念図である。
FIG. 9 is a conceptual diagram of inter-thread communication performed between a numerical controller and a host computer.

【図10】メールボックスを介したスレッド間通信の概
念図である。
FIG. 10 is a conceptual diagram of inter-thread communication via a mailbox.

【図11】分散型共有メモリの概念図である。FIG. 11 is a conceptual diagram of a distributed shared memory.

【図12】ホスト計算機と複数の数値制御装置とに分散
する例の概念図である
FIG. 12 is distributed to a host computer and a plurality of numerical controllers
It is a conceptual diagram of the example which performs .

【図13】キーボードと表示装置を備えていない数値制
御装置を用いた制御ソフトウェア実行システムの全体構
成図である。
FIG. 13 is a numerical system without a keyboard and a display device .
1 is an overall configuration diagram of a control software execution system using a control device .

【図14】数値制御装置200e1のハードウェア構成
図である。
FIG. 14 is a hardware configuration diagram of a numerical controller 200e1.

【図15】キーボードと表示装置を備えていない数値制
御装置を用いた制御ソフトウェア実行システムの動作を
示す概念図である。
FIG. 15 is a numerical system without a keyboard and a display device .
It is a conceptual diagram showing operation of a control software execution system using a control device .

【図16】ビットマップディスプレイを用いた制御ソフ
トウェア実行システムの全体構成図である。
FIG. 16 is an overall configuration diagram of a control software execution system using a bitmap display .

【図17】ビットマップディスプレイを用いた制御ソフ
トウェア実行システムにおける表示処理の概念図であ
る。
FIG. 17 is a conceptual diagram of a display process in a control software execution system using a bitmap display .

【図18】マウスを備えた制御ソフトウェア実行システ
ムの全体構成図である。
FIG. 18 is an overall configuration diagram of a control software execution system including a mouse .

【図19】マウスを備えた制御ソフトウェア実行システ
ムにおける表示処理の概念図である。
FIG. 19 is a conceptual diagram of a display process in a control software execution system including a mouse .

【図20】この発明の第3実施例の数値制御装置200
i1のハードウェア構成図である。
FIG. 20 is a numerical controller 200 according to a third embodiment of the present invention .
It is a hardware block diagram of i1.

【図21】この発明の第4実施例における制御ソフトウ
ェア実行システムの全体構成図である。
FIG. 21 is an overall configuration diagram of a control software execution system according to a fourth embodiment of the present invention.

【図22】CPUプールの内部構成図である。FIG. 22 is an internal configuration diagram of a CPU pool.

【図23】新たなCPUカードを獲得するときの動作の
概念図である。
FIG. 23 is a conceptual diagram of the operation when acquiring a new CPU card.

【図24】この発明の変形実施例の制御ソフトウェア実
行システムの全体構成図である。
FIG. 24 is an overall configuration diagram of a control software execution system according to a modified embodiment of the present invention.

【図25】数値制御装置200k1のハードウェア構成
図である。
FIG. 25 is a hardware configuration diagram of a numerical controller 200k1.

【図26】数値制御装置200q1のハードウェア構成
図である。
FIG. 26 is a hardware configuration diagram of a numerical controller 200q1.

【図27】従来の数値制御装置のハードウェア構成図で
ある。
FIG. 27 is a hardware configuration diagram of a conventional numerical controller.

【図28】従来の数値制御装置の処理手順を示す説明図
である。
FIG. 28 is an explanatory diagram showing a processing procedure of a conventional numerical control device.

【図29】割り込み処理の概念図である。FIG. 29 is a conceptual diagram of interrupt processing.

【図30】各タスク動作の時間的関係を示すタイムチャ
ートである。
FIG. 30 is a time chart showing a temporal relationship between task operations.

【図31】ワークステーションを利用した制御ソフトウ
ェア開発システムの構成図である。
FIG. 31 is a configuration diagram of a control software development system using a workstation.

【図32】制御ソフトウェアの開発手順を示す流れ図で
ある。
FIG. 32 is a flowchart showing a procedure for developing control software.

【図33】クライアントワークステーションのメモリ態
様図である。
FIG. 33 is a diagram of a memory mode of a client workstation.

【図34】各プロセスが同じ論理アドレス空間を利用で
きることを示す原理図である。
FIG. 34 is a principle view showing that each process can use the same logical address space.

【図35】1つのプロセスの論理アドレス空間内の領域
図である。
FIG. 35 is an area diagram in a logical address space of one process.

【図36】タイムシェアリングオペレーティングシステ
ムにおけるプロセスモデルの例示図である。
FIG. 36 is an illustration of a process model in a time sharing operating system.

【図37】マルチスレッドオペレーティングシステムに
おけるモデルの例示図である。
FIG. 37 is a view showing an example of a model in a multi-thread operating system.

【図38】1つのプロセスの論理アドレス空間内の別の
領域図である。
FIG. 38 is a diagram of another area in the logical address space of one process.

【符号の説明】[Explanation of symbols]

1 メインCPU 2 システムバス 3 ROM 4 RAM 5 SIOインタフェース部 6 表示装置 7 キーボード 8 サーボ制御部 9 サーボアンプ 10 サーボモータ 11 プログラムコントローラ部 12 外部割り込み信号 132 アドレス変換機構 1133 フラッシュROM S1〜S14 制御ソフトウェア実行システム 200a1,…,200q1 数値制御装置 200kn,…,200qn 数値制御装置 201 ホスト計算機 202 ハードディスク 203,203a 表示装置 204 キーボード 207 ネットワークインタフェース 205,208 内部ネットワーク 206 外部ネットワーク 207 ネットワークインタフェース 301 CPUプール 302 CPUカード 2070 ゲートウェイ部 M マウス 1 Main CPU 2 System bus 3 ROM 4 RAM 5 SIO interface unit 6 Display device 7 Keyboard 8 Servo control unit 9 Servo amplifier 10 Servo motor 11 Program controller unit 12 External interrupt signal 132 Address conversion mechanism 1133 Flash ROM S1-S14 Control software execution 200q1, Numerical control device 200kn,..., 200qn Numerical control device 201 Host computer 202 Hard disk 203, 203a Display device 204 Keyboard 207 Network interface 205, 208 Internal network 206 External network 207 Network interface 301 CPU pool 302 CPU card 2070 Gateway part M mouse

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 リアルタイムオペレーティンングシステ
ム上で制御ソフトウェアを実行したときに起動される複
数のタスクの共同作業によって数値制御装置としての機
能を実現する数値制御装置のタスクの機能を、汎用のマ
ルチスレッドオペレーティングシステムまたはマルチ
スクオペレーティングシステム上で実行するプロセス
たはタスク中のスレッドに割り当てると共に、スレッド
間のスケジューリングの制御用に1つのスレッドを割り
当てることを特徴とする数値制御装置の制御ソフトウェ
ア実行システム。
1. A functional tasks of the numerical controller for realizing a function as a numerical control device by collaboration of a plurality of tasks to be activated when the running control software on the real-time operating rate Tin packaging system, a general-purpose multi thread operating system or multi-data
Disk process or <br/> other to run on the operating system assigned a thread in a task Rutotomoni, thread
One thread to control scheduling between
Control software execution system of the numerical controller, characterized in that shed.
【請求項2】 請求項1の数値制御装置の制御ソフトウ
ェア実行システムにおいて、 汎用のマルチスレッドオペレーティングシステムまたは
マルチタスクオペレーティングシステムを用いた計算機
と、その計算機に通信回線を介して接続された数値制御
装置とを具備してなり、前記計算機と前記数値制御装置
の間に分散型共有メモリの機能を持たせ、前記数値制御
装置のタスクの機能を、前記分散型共有メモリの機能を
利用して、前記計算機と前記数値制御装置とで分散して
処理することを特徴とする数値制御装置の制御ソフトウ
ェア実行システム。
2. The control software of the numerical controller according to claim 1.
A computer using a general-purpose multi- threaded operating system or a multi- tasking operating system, and a numerical controller connected to the computer via a communication line. apparatus
A function of a distributed shared memory between
The function of the task of the device, the function of the distributed shared memory
Utilization, distributed between the computer and the numerical controller
A control software execution system for a numerical control device, characterized by processing .
【請求項3】 請求項1または請求項2の数値制御装置
の制御ソフトウェア実行システムにおいて、汎用のマル
スレッドオペレーティングシステムまたはマルチタス
オペレーティングシステムを用いた計算機と、その計
算機に通信回線を介して接続された数値制御装置とを具
備してなり、前記計算機は前記数値制御装置への割り込
み要求の有無を監視することを特徴とする数値制御装置
の制御ソフトウェア実行システム。
3. A numerical controller according to claim 1 or 2.
In the control software execution system, a general-purpose multithreaded operating system or multitasking
Phrases and computer using the operating system, it comprises a connection numeric control device via a communication line to the computer, wherein the computer interrupt to the numerical control device
A control software execution system for a numerical controller characterized by monitoring the presence or absence of a request .
【請求項4】 請求項1から請求項3のいずれかの数値
制御装置の制御ソフトウェア実行システムにおいて、 複数のCPUカードを有するCPUプールを具備し、そ
のCPUカード中のCPUを前記数値制御装置のCPU
として割り当てる ことを特徴とする数値制御装置の制御
ソフトウェア実行システム。
4. The numerical value according to any one of claims 1 to 3.
In a control software execution system for a control device, a CPU pool having a plurality of CPU cards is provided.
CPU in the CPU card of the above numerical controller
A control software execution system for a numerical control device, characterized in that the control software execution system is assigned as:
【請求項5】 請求項4の数値制御装置の制御ソフトウ
ェア実行システムにおいて、 前記CPUカード中のCPUを前記複数の数値制御装置
のCPUとして割り当てること を特徴とする数値制御装
置の制御ソフトウェア実行システム。
5. The control software of the numerical controller according to claim 4.
In the hardware execution system, the CPU in the CPU card is connected to the plurality of numerical control devices.
A control software execution system for a numerical control device, wherein the control software execution system is assigned as a CPU .
【請求項6】 請求項5の数値制御装置の制御ソフトウ
ェア実行システムにおいて、 前記CPUプール中の1つのCPUカードを割り込み検
査専用のCPUカードとして使用することを特徴とする
数値制御装置の制御ソフトウェア実行システム
6. The control software for a numerical controller according to claim 5.
In the hardware execution system, one CPU card in the CPU pool is interrupt detected.
It is characterized by being used as a CPU card dedicated to inspection
Control software execution system for numerical control devices .
JP17549093A 1993-07-15 1993-07-15 Control software execution system for numerical controller Expired - Fee Related JP2820189B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17549093A JP2820189B2 (en) 1993-07-15 1993-07-15 Control software execution system for numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17549093A JP2820189B2 (en) 1993-07-15 1993-07-15 Control software execution system for numerical controller

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP10165303A Division JP3053797B2 (en) 1998-06-12 1998-06-12 Control software execution system for control unit

Publications (2)

Publication Number Publication Date
JPH0736529A JPH0736529A (en) 1995-02-07
JP2820189B2 true JP2820189B2 (en) 1998-11-05

Family

ID=15996961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17549093A Expired - Fee Related JP2820189B2 (en) 1993-07-15 1993-07-15 Control software execution system for numerical controller

Country Status (1)

Country Link
JP (1) JP2820189B2 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5964838A (en) * 1997-09-30 1999-10-12 Tandem Computers Incorporated Method for sequential and consistent startup and/or reload of multiple processor nodes in a multiple node cluster
JP2000075907A (en) * 1998-09-01 2000-03-14 Yokogawa Electric Corp Production system
JP4501788B2 (en) * 2005-06-13 2010-07-14 セイコーエプソン株式会社 Multi-CPU device and inter-CPU communication method
US7848835B2 (en) * 2006-06-02 2010-12-07 Cymer, Inc. High power laser flat panel workpiece treatment system controller
MX2009002533A (en) * 2006-09-05 2009-06-01 Sunnen Products Co Automatic control of machined parameters by completely integrating a gage system into the machine control.
CN102540973B (en) * 2010-12-09 2013-06-26 中国科学院沈阳计算技术研究所有限公司 Implementation method for command multi-transmitting mechanism of numerical control system
JP2016071407A (en) * 2014-09-26 2016-05-09 ファナック株式会社 Numerical control device using control software in host computer
CN104298175B (en) * 2014-09-26 2015-09-23 华中科技大学 A kind of digital control system based on Intel Virtualization Technology and method
JP6151729B2 (en) * 2015-01-16 2017-06-21 ファナック株式会社 A control system with a function to optimize the control software of a numerical controller according to the machining program
JP7041041B2 (en) * 2018-10-11 2022-03-23 ファナック株式会社 Numerical control device
WO2022050090A1 (en) * 2020-09-07 2022-03-10 株式会社日立産機システム Control system

Also Published As

Publication number Publication date
JPH0736529A (en) 1995-02-07

Similar Documents

Publication Publication Date Title
CN101233489B (en) Adaptive process dispatch in a computer system having a plurality of processors
US5892941A (en) Multiple user software debugging system
US7428485B2 (en) System for yielding to a processor
EP1842132B1 (en) Method for optimising the logging and replay of multi-task applications in a mono-processor or multi-processor computer system
JP2820189B2 (en) Control software execution system for numerical controller
IL156075A (en) Computer multi-tasking via virtual threading
Merzky et al. Design and performance characterization of radical-pilot on leadership-class platforms
EP0387871B1 (en) Extended memory address control system
JP2590045B2 (en) Distributed processing control method and distributed processing system
US20010047512A1 (en) Method and system for linking multiple processors having shared memory
Jones et al. Programming issues raised by a multiprocessor
US7454749B2 (en) Scalable parallel processing on shared memory computers
JP3053797B2 (en) Control software execution system for control unit
JPH06243112A (en) Multiprocessor device
JPH09114693A (en) Program development supporting device and program execution device
JP2814880B2 (en) Control device for computer system constituted by a plurality of CPUs having different instruction characteristics
JP2005108082A (en) Interface method for device driver
Golatowski et al. Framework for validation, test and analysis of real-time scheduling algorithms and scheduler implementations
US5812846A (en) Method and apparatus for passing control from a first process to a second process
CN116775038B (en) Runtime system supporting simultaneous or independent operation of IEC and C++ tasks
Zhang et al. Implementation of Real-Time Scheduling Algorithm on Multi-Core Platform
WO2022025134A1 (en) Control system
Smith A directly coupled multiprocessing system
JPH04299734A (en) Software developing method
Cattaneo et al. Another C threads library

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070828

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080828

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees