JPH11219211A - Numerically controlled machine tool and control method therefor - Google Patents

Numerically controlled machine tool and control method therefor

Info

Publication number
JPH11219211A
JPH11219211A JP3366698A JP3366698A JPH11219211A JP H11219211 A JPH11219211 A JP H11219211A JP 3366698 A JP3366698 A JP 3366698A JP 3366698 A JP3366698 A JP 3366698A JP H11219211 A JPH11219211 A JP H11219211A
Authority
JP
Japan
Prior art keywords
task
control
operation system
processing
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3366698A
Other languages
Japanese (ja)
Inventor
Toshihiko Inoue
利彦 井上
Isamu Inatsuru
勇 稲鶴
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.)
Yamazaki Mazak Corp
Original Assignee
Yamazaki Mazak 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 Yamazaki Mazak Corp filed Critical Yamazaki Mazak Corp
Priority to JP3366698A priority Critical patent/JPH11219211A/en
Publication of JPH11219211A publication Critical patent/JPH11219211A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To simplify the transplantation of a program for processing an output/ input related task for controlling the output or input of data and to prevent time and labor from being taken in the new addition of hardware or the like. SOLUTION: A controller 1 is provided with a first memory part storing a real time OS 10 and a second memory part storing a second OS 40 independent of the real time OS 10 and the real time OS 10 and the second OS 40 are freely selectively operatable. The real time OS 10 is provided with a working operation related task 20 for computing and outputting a control command based on a working program 21 and the second OS 40 is provided with the output/input related task 51 for controlling the output or input of the data by a communication cable and a display, etc.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、サーボ制御タス
ク、PLC制御タスク、周期モニタタスク等のような加
工動作関連タスクを処理すると共に、画面表示制御タス
クや通信制御タスク等のような出入力関連タスクを処理
する主制御装置をもった数値制御工作機械及びその制御
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention processes a machining operation related task such as a servo control task, a PLC control task, a period monitor task and the like, and also performs input / output related tasks such as a screen display control task and a communication control task. The present invention relates to a numerically controlled machine tool having a main controller for processing tasks and a control method therefor.

【0002】[0002]

【従来の技術】図5は、数値制御工作機械における従来
の制御方法の一例を示した各タスクの処理概念図であ
る。従来、数値制御工作機械の主制御装置においては、
該主制御装置のOS(オペレーションシステム:Operat
ion System)の管理下で、一定のOS基本周期毎に各種
のタスクを処理するようになっている。例えば図5に示
すように、1つのOS基本周期Pにおいて、サーボ制御
タスク(サーボ軸の制御に関するもの)、PLC制御タ
スク(アクチェータ等の制御に関するもの)、周期モニ
タタスク(送り速度や主軸の回転数等の監視に関するも
の)等のような加工動作関連タスク60と、画像表示制
御タスク(加工の進展状況等の画像表示に関するも
の)、通信制御タスク(他のコンピュータとの通信等に
関するもの)等のような出入力関連タスク61が処理さ
れるようになっている。通常このような工作機械用の主
制御装置では、業務用や家庭用を問わず広く使用されて
いるパソコン用のOS(以下、このようなOSを「汎用
OS」と称する)とは大きく異なった、数値制御工作機
械独自のOS(以下、このようなOSを「リアルタイム
OS」と称する)が使用されている。リアルタイムOS
では、1つのOS基本周期Pにおいて、加工動作関連タ
スク60の処理時間が長くなり出入力関連タスク61が
省略されるようなことはあるが、この加工動作関連タス
ク60の処理時間が最大限長くなっても、加工動作関連
タスク60の一部が省略されるようなことはない。即
ち、正確な加工を保証するため、加工を直接制御するた
めの加工動作関連タスク60は、1つのOS基本周期P
において必ず処理されるようにプログラムされている。
2. Description of the Related Art FIG. 5 is a conceptual diagram of processing of each task showing an example of a conventional control method in a numerically controlled machine tool. Conventionally, in the main control device of a numerically controlled machine tool,
Operating system (Operat: Operat) of the main controller
Under the management of the ion system, various tasks are processed at a constant OS basic cycle. For example, as shown in FIG. 5, in one OS basic cycle P, a servo control task (related to control of a servo axis), a PLC control task (related to control of an actuator or the like), a cycle monitor task (feed speed or rotation of a spindle). Processing operation-related tasks 60 such as monitoring of numbers, etc., image display control tasks (related to image display such as progress of processing, etc.), communication control tasks (related to communication with other computers, etc.), etc. An input / output related task 61 such as described above is processed. Usually, such a main controller for a machine tool is significantly different from an OS for a personal computer (hereinafter, such an OS is referred to as a “general-purpose OS”) that is widely used regardless of whether it is for business use or for home use. An OS unique to a numerical control machine tool (hereinafter, such an OS is referred to as a “real-time OS”) is used. Real-time OS
In one OS basic period P, the processing time of the processing operation-related task 60 may be long and the input / output-related task 61 may be omitted. However, the processing time of the processing operation-related task 60 is maximized. Even so, a part of the processing operation related task 60 is not omitted. That is, in order to guarantee accurate machining, the machining operation related task 60 for directly controlling the machining includes one OS basic cycle P
Is programmed to always be processed.

【0003】[0003]

【発明が解決しようとする課題】ところで従来では、加
工動作関連タスク60だけでなく出入力関連タスク61
もリアルタイムOSで処理されるようになっているの
で、当然、この出入力関連タスク61は、リアルタイム
OSに依存したプログラムとなっていた。しかし工作機
械独自のリアルタイムOSに依存するプログラムでは汎
用性に欠け、プログラムの移植が困難になり不都合であ
る。また、補助記憶装置やプリンタ等のハードウエアを
新規増設するような場合にも、そのドライバをリアルタ
イムOSに依存した形でプログラムしなければならず、
手間がかかり不都合である。
Conventionally, not only the processing operation related task 60 but also the input / output related task 61 is used.
The input / output-related task 61 is, of course, a program that depends on the real-time OS. However, a program that depends on a real-time OS unique to a machine tool lacks versatility, and it is difficult to port the program, which is inconvenient. In addition, even when new hardware such as an auxiliary storage device or a printer is newly added, the driver must be programmed in a form depending on the real-time OS.
This is troublesome and inconvenient.

【0004】本発明は上記事情に鑑み、画面表示制御タ
スクや通信制御タスク等のような出入力関連タスクを処
理するプログラムの移植が簡単になり、ハードウエアの
新規増設等に手間がかからず好都合な、数値制御工作機
械及びその制御方法を提供することを目的とする。
In view of the above circumstances, the present invention makes it easy to port a program for processing input / output-related tasks such as a screen display control task and a communication control task, and does not have to add new hardware. It is an object to provide an advantageous numerically controlled machine tool and its control method.

【0005】[0005]

【課題を解決するための手段】即ち本発明のうち第1の
発明は、機械駆動部及び該機械駆動部を駆動自在な駆動
装置(71a、71b)を有し、前記駆動装置(71
a、71b)を駆動制御自在な駆動制御装置(72a、
72b)を設け、データの出力又は入力を行うデータ出
入力手段(2、4)が備えられていると共に、前記駆動
制御装置(72a、72b)に、制御指令を伝送自在に
接続された主制御装置(1)を設けた数値制御工作機械
(70)において、前記主制御装置(1)は、第1のオ
ペレーションシステム(10)を格納した第1のメモリ
(6a)及び、前記第1のオペレーションシステム(1
0)とは独立した形の第2のオペレーションシステム
(40)を格納した第2のメモリ(6b)を有し、前記
主制御装置(1)では、前記第1のメモリ(6a)に格
納された前記第1のオペレーションシステム(10)及
び、前記第2のメモリ(6b)に格納された前記第2の
オペレーションシステム(40)が選択的に動作自在と
なっており、前記第1のオペレーションシステム(1
0)は、加工プログラム(21)に基づいて前記制御指
令を演算出力する制御指令演算出力タスク(20)を有
し、前記第2のオペレーションシステム(40)は、前
記データ出入力手段(2、4)によるデータの出力又は
入力を制御する出入力制御タスク(51)を有して構成
される。
That is, a first aspect of the present invention comprises a mechanical drive unit and drive units (71a, 71b) capable of driving the mechanical drive unit.
a, 71b) can be driven and controlled.
72b) and data input / output means (2, 4) for outputting or inputting data, and a main control connected to the drive control devices (72a, 72b) so as to be able to transmit control commands freely. In a numerically controlled machine tool (70) provided with a device (1), the main control device (1) includes a first memory (6a) storing a first operation system (10) and the first operation. System (1
0) has a second memory (6b) storing a second operation system (40) in a form independent of the first operation memory (6a) in the main controller (1). The first operation system (10) and the second operation system (40) stored in the second memory (6b) are selectively operable, and the first operation system (1
0) has a control command calculation output task (20) for calculating and outputting the control command based on a machining program (21), and the second operation system (40) includes the data input / output means (2, It has an input / output control task (51) for controlling the output or input of data according to 4).

【0006】また本発明のうち第2の発明は、第1の発
明の数値制御工作機械(70)において、前記第1のオ
ペレーションシステム(10)は、前記第2のオペレー
ションシステム(40)を動作させる第2処理タスク
(31)を有している。
According to a second aspect of the present invention, in the numerical control machine tool (70) according to the first aspect, the first operation system (10) operates the second operation system (40). A second processing task (31) to be performed is provided.

【0007】また本発明のうち第3の発明は、第1の発
明の数値制御工作機械(70)において、前記第1のオ
ペレーションシステム(10)はリアルタイムオペレー
ションシステムであり、前記第2のオペレーションシス
テム(40)は汎用オペレーションシステムである。
A third aspect of the present invention is the numerically controlled machine tool (70) according to the first aspect, wherein the first operation system (10) is a real-time operation system, and the second operation system is (40) is a general-purpose operation system.

【0008】また本発明のうち第4の発明は、第2の発
明の数値制御工作機械(70)において、前記第1のオ
ペレーションシステム(10)は、前記制御指令演算出
力タスク(20)又は前記第2処理タスク(31)の処
理命令を選択的に順次出力するスケジューラ(10c)
及び、該スケジューラ(10c)からの命令に基づい
て、前記制御指令演算出力タスク(20)又は前記第2
処理タスク(31)の処理を行う処理機能(10a)を
有している。
According to a fourth aspect of the present invention, in the numerical control machine tool (70) according to the second aspect, the first operation system (10) includes the control command calculation output task (20) or the control command calculation output task (20). A scheduler (10c) for selectively sequentially outputting the processing instructions of the second processing task (31)
And, based on an instruction from the scheduler (10c), the control command calculation output task (20) or the second
It has a processing function (10a) for performing the processing of the processing task (31).

【0009】また本発明のうち第5の発明では、第1の
発明の数値制御工作機械(70)において制御を行う際
には、前記第1のオペレーションシステム(10)によ
り前記制御指令演算出力タスク(20)を処理完了可能
な長さの所定の基本周期(P)を設定しておき、前記基
本周期(P)に基づいて時刻を計測しつつ、1つの基本
周期(P)内でまず前記第1のオペレーションシステム
(10)により前記制御指令演算出力タスク(20)を
処理し、該制御指令演算出力タスク(20)の処理が完
了したのを確認し、前記基本周期(P)内の残りの時間
で前記第2のオペレーションシステム(40)により前
記出入力制御タスク(51)を処理するようにして構成
される。
According to a fifth aspect of the present invention, when control is performed in the numerically controlled machine tool (70) of the first aspect, the control command calculation output task is performed by the first operation system (10). A predetermined basic period (P) having a length capable of completing the processing of (20) is set, and the time is measured based on the basic period (P). The first operation system (10) processes the control command calculation output task (20), confirms that the processing of the control command calculation output task (20) is completed, and checks the remaining in the basic cycle (P). The input / output control task (51) is processed by the second operation system (40) at the time of (1).

【0010】また本発明のうち第6の発明では、第5の
発明の制御方法において、前記第2のオペレーションシ
ステム(40)による前記出入力制御タスク(51)の
処理は、前記第1のオペレーションシステム(10)上
でエミュレーションする形で前記第2のオペレーション
システム(40)を動作させて行うようにした。
According to a sixth aspect of the present invention, in the control method of the fifth aspect, the processing of the input / output control task (51) by the second operation system (40) is the first operation. The second operation system (40) is operated by emulation on the system (10).

【0011】なお、括弧内の番号等は、図面における対
応する要素を示す便宜的なものであり、従って、本記述
は図面上の記載に限定拘束されるものではない。
It should be noted that the numbers in parentheses and the like are for convenience showing the corresponding elements in the drawings, and therefore, the present description is not limited to the description on the drawings.

【0012】[0012]

【発明の実施の形態】以下、本発明の実施例を図面に基
づき説明する。図1は、リアルタイムOS等による各種
タスクの管理態様を概念的に示した図、図2は、各タス
クの処理概念図、図3は、CNC旋盤を示した概念図、
図4は、リアルタイムOSによる制御内容を示したフロ
ーチャートである。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram conceptually showing a management mode of various tasks by a real-time OS or the like, FIG. 2 is a conceptual diagram of processing of each task, FIG. 3 is a conceptual diagram showing a CNC lathe,
FIG. 4 is a flowchart showing the control contents by the real-time OS.

【0013】数値制御工作機械であるCNC旋盤70
は、図3に示すようにマシン部分である機械本体71及
び主制御装置である制御装置1から構成されており、制
御装置1はCPU3及びこれに接続された、ディスプレ
イ4、CPUレジスタ5、メモリ6、ハードディスク
(不図示)、キーボード(不図示)、通信用出入力機
(不図示)等によって構成されたコンピュータとなって
いる。なお制御装置1には、図3に示すように前記通信
用出入力機を介して接続した通信ケーブル2によって図
示しない他のコンピュータ等が、該制御装置1との間で
データをやり取りし得る形で接続されている。また機械
本体71は、その内部に図3に示すように複数のモータ
71a(図3では1つのみ図示)及び複数のアクチェー
タ71b(図3では1つのみ図示)を、図示しない所定
の機械駆動部(例えば、ワーク主軸、刃物台、ATC装
置など)における駆動をそれぞれ行う形で有しており、
各モータ71aには該モータ71aを駆動制御するモー
タ駆動制御装置72a(図3では1つのみ図示)が、そ
して各アクチェータ71bには該アクチェータ71bを
駆動制御するアクチェータ駆動制御装置72b(図3で
は1つのみ図示)がそれぞれ設けられている。また、各
モータ71aにはセンサ71c(図3では1つのみ図
示)が、各アクチェータ71bにはセンサ71d(図3
では1つのみ図示)が、それぞれの駆動量等を検知する
形で設置されている。そして、モータ駆動制御装置72
a、アクチェータ駆動制御装置72b、センサ71c、
71dと、前記制御装置1との間は、電気信号(制御指
令信号や検知信号など)をやり取りし得る形でケーブル
等により接続されている。
CNC lathe 70 as a numerically controlled machine tool
As shown in FIG. 3, the control device 1 includes a machine body 71 as a machine portion and a control device 1 as a main control device. The control device 1 includes a CPU 3 and a display 4, a CPU register 5, a memory connected thereto. 6, a computer constituted by a hard disk (not shown), a keyboard (not shown), a communication input / output device (not shown), and the like. It should be noted that the control device 1 has a form in which another computer or the like (not shown) can exchange data with the control device 1 via a communication cable 2 connected via the communication input / output device as shown in FIG. Connected by The machine body 71 includes a plurality of motors 71a (only one is shown in FIG. 3) and a plurality of actuators 71b (only one is shown in FIG. 3) as shown in FIG. (For example, a work spindle, a tool post, an ATC device, etc.).
Each motor 71a has a motor drive controller 72a (only one is shown in FIG. 3) for driving and controlling the motor 71a, and each actuator 71b has an actuator drive controller 72b (FIG. 3) for driving and controlling the actuator 71b. (Only one is shown). Each motor 71a has a sensor 71c (only one is shown in FIG. 3), and each actuator 71b has a sensor 71d (FIG. 3).
In FIG. 1, only one is shown), but is installed in such a manner as to detect the respective drive amounts and the like. Then, the motor drive control device 72
a, actuator drive control device 72b, sensor 71c,
71d and the control device 1 are connected by a cable or the like so that an electric signal (a control command signal, a detection signal, or the like) can be exchanged.

【0014】制御装置1には図1に示すようにリアルタ
イムOS10が、該制御装置1の起動OSとしてインス
トールされており、リアルタイムOS10は、その機能
として、処理機能10a、タイマ10b、スケジューラ
10c、タスクマネージャ10d、割込み処理機能10
e等を有している。また制御装置1には、OSエミュレ
ーションプログラム30が、前記リアルタイムOS10
上で動作する形でインストールされていると共に、汎用
OSの1つである第2OS40が、前記OSエミュレー
ションプログラム30によって提供される仮想アーキテ
クチャにおいて動作する形でインストールされている。
第2OS40はその機能として、処理機能40a、タス
クマネージャ40b、スケジューラ40c、通信用ドラ
イバ40d等を有している。更に制御装置1には出入力
関連プログラム50が、前記第2OS40上で動作する
形でインストールされている。
As shown in FIG. 1, a real-time OS 10 is installed in the control device 1 as a boot OS of the control device 1, and the real-time OS 10 includes a processing function 10a, a timer 10b, a scheduler 10c, a task Manager 10d, interrupt processing function 10
e etc. The control device 1 also has an OS emulation program 30 that stores the real-time OS 10
A second OS 40, which is one of the general-purpose OSs, is installed so as to operate on the virtual architecture provided by the OS emulation program 30.
The second OS 40 has, as its functions, a processing function 40a, a task manager 40b, a scheduler 40c, a communication driver 40d, and the like. Further, an input / output related program 50 is installed in the control device 1 so as to operate on the second OS 40.

【0015】CNC旋盤70及びその制御装置1等は以
上のように構成されているので、該制御装置1による制
御は以下のように行われる。まず制御装置1でリアルタ
イムOS10を起動させる。即ち、リアルタイムOS1
0のプログラムが図示しないハードディスク又はROM
(読み出し専用メモリ)等から読み取られ、メモリ6の
第1メモリ部6aに格納される。リアルタイムOS10
が起動されると、該リアルタイムOS10のタスクマネ
ージャ10dは、加工制御の際に必要となるタスクを生
成し初期化する。例えば図1に示すように、各モータ駆
動制御装置72aに指令を出すためのサーボ制御タスク
11、各アクチェータ駆動制御装置72bに指令を出す
ためのPLC制御タスク12、各センサ71c、71d
からの検知信号により機械本体71における各機械駆動
箇所での駆動量等を検出するための周期モニタタスク1
3等の、複数の加工動作関連タスク20を生成し初期化
すると共に、OSエミュレーションプログラム30を実
行するための第2OSタスク31を生成し初期化する。
即ち、リアルタイムOS10は、複数の加工動作関連タ
スク20及び第2OSタスク31を有している。
Since the CNC lathe 70 and its controller 1 are constructed as described above, the control by the controller 1 is performed as follows. First, the control device 1 activates the real-time OS 10. That is, the real-time OS1
0 hard disk or ROM not shown
(Read only memory) and the like, and stored in the first memory unit 6a of the memory 6. Real-time OS10
Is started, the task manager 10d of the real-time OS 10 generates and initializes a task required for processing control. For example, as shown in FIG. 1, a servo control task 11 for issuing a command to each motor drive control device 72a, a PLC control task 12 for giving a command to each actuator drive control device 72b, and each sensor 71c, 71d
Monitor task 1 for detecting the drive amount at each machine drive position in the machine body 71 based on the detection signal from the
3, a plurality of machining operation-related tasks 20 are generated and initialized, and a second OS task 31 for executing the OS emulation program 30 is generated and initialized.
That is, the real-time OS 10 has a plurality of machining operation-related tasks 20 and a second OS task 31.

【0016】またタスクマネージャ10dによるタスク
の生成及び初期化と共に、リアルタイムOS10の処理
機能10aはOSエミュレーションプログラム30を起
動する。該OSエミュレーションプログラム30が起動
されると、このプログラム30によってエミュレーショ
ンされる形で第2OS40が起動される(この際に該第
2OS40の通信用ドライバ40d等も初期化され
た)。なお、この第2OS40のプログラムはメモリ6
の第2メモリ部6bに格納される。第2OS40が起動
されると、該第2OS40のタスクマネージャ40b
は、図1に示すように、前記出入力関連プログラム50
を実行するための複数の出入力関連タスク51、即ち画
像表示制御タスク41及び通信制御タスク42を生成し
初期化する。即ち、第2OS40は、複数の出入力関連
タスク51を有している。
The processing function 10a of the real-time OS 10 activates the OS emulation program 30 when the task is generated and initialized by the task manager 10d. When the OS emulation program 30 is started, the second OS 40 is started in a form emulated by the program 30 (at this time, the communication driver 40d and the like of the second OS 40 are also initialized). The program of the second OS 40 is stored in the memory 6
Is stored in the second memory unit 6b. When the second OS 40 is started, the task manager 40b of the second OS 40
Is, as shown in FIG.
Are generated and initialized, ie, an image display control task 41 and a communication control task 42. That is, the second OS 40 has a plurality of input / output related tasks 51.

【0017】一方、リアルタイムOS10が起動される
と、該リアルタイムOS10のタイマ10bが一定のO
S基本周期Pをサイクルとして時刻のカウントを始める
(1つのOS基本周期Pが終わると時刻がリセットされ
て次のOS基本周期Pの時刻をカウントし始めるといっ
た形で行う)。ところでリアルタイムOS10のタスク
マネージャ10dは、タスク管理ファイルTKFを有
し、このタスク管理ファイルTKFに基づいた情報を提
供自在になっている。このタスク管理ファイルTKFに
は、リアルタイムOS10上の各タスク11、12、1
3、31に対し、これらの優先順位を決定するプイライ
オリティが記録されている。例えば本実施例では、各加
工動作関連タスク20のプイライオリティが第2OSタ
スク31よりも高く、複数の加工動作関連タスク20の
中では、サーボ制御タスク11、PLC制御タスク1
2、周期モニタタスク13、……、の順にプライオリテ
ィ(優先順位)が高くなっている。更にタスク管理ファ
イルTKFには、各タスク11、12、13、31に対
し、1つのOS基本周期Pにおいて該タスク11、1
2、13、31をドーマント状態(休止状態)からレデ
ィ状態(実行可能状態)とする、それぞれ個別の時刻を
記録している。本実施例では例えば図2に示すように、
1つのOS基本周期Pにおける開始時刻である時刻T0
にサーボ制御タスク11が、その後の時刻T1にPLC
制御タスク12が、その後の時刻T2に周期モニタタス
ク13が、……、といった形で各加工動作関連タスク2
0が順次レディ状態になり、更にその後の時刻T3に第
2OSタスク31がレディ状態になるようになってい
る。
On the other hand, when the real-time OS 10 is started, the timer 10b of the real-time OS 10
The counting of the time is started with the S basic cycle P as a cycle (the time is reset when one OS basic cycle P ends, and the counting of the time of the next OS basic cycle P is started). The task manager 10d of the real-time OS 10 has a task management file TKF, and can freely provide information based on the task management file TKF. The task management file TKF includes the tasks 11, 12, 1 and
For 3 and 31, the priorities for determining these priorities are recorded. For example, in this embodiment, the priority of each machining operation related task 20 is higher than the second OS task 31, and among the plurality of machining operation related tasks 20, the servo control task 11, the PLC control task 1
2, the priority (priority) is higher in the order of the period monitor task 13,.... Further, the task management file TKF includes, for each of the tasks 11, 12, 13, 31 in one OS basic period P,
Individual times at which the states 2, 13, and 31 are changed from the dormant state (pause state) to the ready state (executable state) are recorded. In this embodiment, for example, as shown in FIG.
Time T0 which is the start time in one OS basic cycle P
The servo control task 11 starts PLC control at time T1.
At the subsequent time T2, the control task 12 causes the period monitor task 13 to execute each processing operation-related task 2 in the form of.
0 are sequentially in a ready state, and at a subsequent time T3, the second OS task 31 is in a ready state.

【0018】その後、制御装置1の図示しないハードデ
ィスク等に保存されていた加工プログラム21が呼び出
され、該加工プログラム21が実行される。この加工プ
ログラム21には、例えば主軸の駆動や工具刃先の送り
等に関する指示が記されており、該加工プログラム21
に記された内容どおりに主軸や工具を動かして加工を行
うことにより所望する加工がなされるようになってい
る。以下、加工プログラム21の実行について説明す
る。即ち、リアルタイムOS10のスケジューラ10c
は、図4に示すように、タイマ10bがカウントする時
刻及びタスクマネージャ10dのタスク管理ファイルT
KFに基づいて、同一のOS基本周期P内で未処理のタ
スク(例えばタスクマネージャ10dには各タスク1
1、12、13、31に対する「処理」・「未処理」を
示すフラグがそれぞれ設けられており、例えば各タスク
のフラグの値は、同一のOS基本周期P内で未処理の場
合は「未処理」、処理済みの場合は「処理」となるよう
になっている。)のうちレディ状態になったタスクが発
生したかどうかを判定している(ステップSTP1)。
Thereafter, the machining program 21 stored on a hard disk (not shown) of the control device 1 is called, and the machining program 21 is executed. In the machining program 21, instructions relating to, for example, driving of the spindle and feeding of the tool edge are described.
The desired machining can be performed by moving the spindle and the tool in accordance with the contents described in (1). Hereinafter, execution of the machining program 21 will be described. That is, the scheduler 10c of the real-time OS 10
Is the time counted by the timer 10b and the task management file T of the task manager 10d, as shown in FIG.
Based on the KF, unprocessed tasks within the same OS basic cycle P (for example, each task 1
Flags indicating “processed” and “unprocessed” are provided for 1, 12, 13, and 31, respectively. For example, if the value of the flag of each task is unprocessed within the same OS basic period P, “unprocessed” is set. "Processing", and if the processing has been completed, the processing is "processing". In step STP1, it is determined whether or not a ready task has occurred.

【0019】例えば1つのOS基本周期Pの開始時刻で
ある時刻T0がタイマ10bによりカウントされると、
図2に示すようにスケジューラ10cはタスク管理ファ
イルTKFに基づいて、この時刻T0においてレディ状
態になった未処理のサーボ制御タスク11が発生したと
判定する。そしてスケジューラ10cはタスク管理ファ
イルTKFに基づいて、レディ状態になったタスクのう
ちプライオリティが最高のタスクを検出する(ステップ
STP2)。この場合には、レディ状態になった未処理
のタスクがサーボ制御タスク11だけなので、このサー
ボ制御タスク11を検出する。更にスケジューラ10c
では、前記検出されたサーボ制御タスクが第2OSタス
ク31であるかどうかを判定する(ステップSTP
3)。この場合は第2OSタスクでないので、スケジュ
ーラ10cは、前記検出したサーボ制御タスク11を処
理するように処理機能10aに命令を出す。処理機能1
0aは上述した加工プログラム21を順次解釈してお
り、スケジューラ10cからの前記命令に従って、現在
解釈している指示におけるサーボ制御に関する処理をサ
ーボ制御タスク11として行う(ステップSTP4)。
即ち、このサーボ制御タスク11の処理により、各モー
タ71aの駆動に関する指令が各モータ駆動制御装置7
2aに伝送され、これら指示に基づいて各モータ駆動制
御装置72aが各モータ71aを駆動させる。この時点
でスケジューラ10cは、該サーボ制御タスク11の処
理が完了したかどうかを判定しており(ステップSTP
5)、サーボ制御タスク11の処理が完了した際には、
スケジューラ10cは、該サーボ制御タスク11の処理
が完了したことを判定し、再びステップSTP1に戻
る。
For example, when the time T0 which is the start time of one OS basic cycle P is counted by the timer 10b,
As shown in FIG. 2, the scheduler 10c determines, based on the task management file TKF, that an unprocessed servo control task 11 that has become ready at this time T0 has occurred. Then, based on the task management file TKF, the scheduler 10c detects the task with the highest priority among the tasks in the ready state (step STP2). In this case, since only the servo control task 11 is in the ready state, the servo control task 11 is detected. Furthermore, the scheduler 10c
Then, it is determined whether the detected servo control task is the second OS task 31 (step STP).
3). In this case, since it is not the second OS task, the scheduler 10c issues a command to the processing function 10a to process the detected servo control task 11. Processing function 1
0a sequentially interprets the machining program 21 described above, and performs a process related to the servo control in the currently interpreted instruction as the servo control task 11 in accordance with the instruction from the scheduler 10c (step STP4).
That is, by the processing of the servo control task 11, a command relating to the drive of each motor 71a is transmitted to each motor drive control device 7.
2a, and each motor drive control device 72a drives each motor 71a based on these instructions. At this point, the scheduler 10c determines whether the processing of the servo control task 11 has been completed (step STP
5) When the processing of the servo control task 11 is completed,
The scheduler 10c determines that the processing of the servo control task 11 has been completed, and returns to step STP1 again.

【0020】このステップSTP1でも上述した手順と
同様にして、スケジューラ10cがタスク管理ファイル
TKFに基づいて、この時刻においてレディ状態になっ
た未処理のタスクが発生したかどうか判定する。例えば
サーボ制御タスク11のみが処理済みの場合、時刻T1
に満たない時点ではレディ状態になった未処理のタスク
が無く、時刻T1を過ぎ時刻T2に満たない時点ではP
LC制御タスク12が未処理でレディ状態になり、時刻
T2を過ぎ時刻T3に満たない時点ではPLC制御タス
ク12及び周期モニタタスク13等が未処理でレディ状
態になる。また例えばサーボ制御タスク11とPLC制
御タスク12が処理済みの場合、時刻T2に満たない時
点ではレディ状態になった未処理のタスクが無く、時刻
T2を過ぎ時刻T3に満たない時点では周期モニタタス
ク13等が未処理でレディ状態になる。そこでスケジュ
ーラ10cは、未処理でレディ状態になったタスクが少
なくとも1つ発生したと判定すると(なおステップST
P1の時点で、未処理でレディ状態になったタスクが無
い場合には、このステップSTP1を繰り返す)、ステ
ップSTP2に進む。ステップSTP2では、スケジュ
ーラ10cはタスク管理ファイルTKFに基づいて、レ
ディ状態になったタスクのうちプライオリティが最高の
タスクを検出する。例えばサーボ制御タスク11のみが
処理済みの場合にはPLC制御タスク12が、サーボ制
御タスク11とPLC制御タスク12が処理済みの場合
には周期モニタタスク13が、プライオリティが最高の
タスクとして検出される。
In this step STP1, in the same manner as described above, the scheduler 10c determines, based on the task management file TKF, whether or not an unprocessed task that has become ready at this time has occurred. For example, if only the servo control task 11 has been processed, the time T1
When there is no unprocessed task in the ready state at a time less than the time T1, and at a time less than the time T2 after the time T1, P
The LC control task 12 is in an unprocessed and ready state. At a point in time after the time T2 and less than the time T3, the PLC control task 12 and the cycle monitor task 13 are in an unprocessed and ready state. For example, when the servo control task 11 and the PLC control task 12 have been processed, there is no unprocessed task in the ready state at a time less than time T2, and a periodic monitor task at a time after time T2 and less than time T3. 13 is unprocessed and becomes ready. Thus, the scheduler 10c determines that at least one unprocessed and ready task has occurred (step ST10).
If there is no unprocessed and ready task at the time of P1, this step STP1 is repeated), and the process proceeds to step STP2. In step STP2, the scheduler 10c detects the task having the highest priority among the tasks in the ready state based on the task management file TKF. For example, when only the servo control task 11 has been processed, the PLC control task 12 is detected as the task having the highest priority, and when the servo control task 11 and the PLC control task 12 have been processed, the cycle monitor task 13 is detected. .

【0021】ステップSTP3に進み、スケジューラ1
0cでは、前記検出されたタスクが第2OSタスク31
であるかどうかを判定する。前記検出されたタスクがP
LC制御タスク12や周期モニタタスク13等の加工動
作関連タスク20である場合は、第2OSタスクでない
ので、スケジューラ10cは、前記検出したタスクを処
理するように処理機能10aに命令を出す。ステップS
TP4に進み、例えば前記検出したタスクがPLC制御
タスク12である場合には、処理機能10aは、スケジ
ューラ10cからの前記命令に従って、現在解釈してい
る指示におけるPLC制御に関する処理をPLC制御タ
スク12として行い、また例えば前記検出したタスクが
周期モニタタスク13である場合には、処理機能10a
は、スケジューラ10cからの前記命令に従って、現在
解釈している指示における周期モニタに関する処理を周
期モニタタスク13として行う。即ち、PLC制御タス
ク12の処理により、各アクチェータ71bの駆動に関
する指令が各アクチェータ駆動制御装置72bに伝送さ
れ、これら指示に基づいて各アクチェータ駆動制御装置
72bが各アクチェータ71bを駆動させる。また、周
期モニタタスク13の処理により、各センサ71c、7
1dから伝送されて来た検知信号に基づいて解析を行
い、機械本体71における各機械駆動箇所での駆動量等
を検出する。このようにタスクの処理を行うと共に、ス
ケジューラ10cは、該タスクの処理が完了したかどう
かを判定しており(ステップSTP5)、該タスクの処
理が完了した際には、スケジューラ10cは、該タスク
の処理が完了したことを判定し、再びステップSTP1
に戻る。
Proceeding to step STP3, the scheduler 1
0c, the detected task is the second OS task 31
Is determined. The detected task is P
If the task is a machining operation-related task 20 such as the LC control task 12 or the cycle monitor task 13, the scheduler 10c issues an instruction to the processing function 10a to process the detected task because the task is not the second OS task. Step S
Proceeding to TP4, for example, when the detected task is the PLC control task 12, the processing function 10a sets the process related to the PLC control in the currently interpreted instruction as the PLC control task 12 in accordance with the instruction from the scheduler 10c. If the detected task is the periodic monitor task 13, the processing function 10a
Performs, as the cycle monitor task 13, a process related to the cycle monitor in the currently interpreted instruction according to the instruction from the scheduler 10c. That is, by the processing of the PLC control task 12, a command related to driving of each actuator 71b is transmitted to each actuator drive control device 72b, and each actuator drive control device 72b drives each actuator 71b based on these instructions. In addition, by the processing of the cycle monitor task 13, each sensor 71c, 7c
Analysis is performed based on the detection signal transmitted from 1d, and the drive amount at each machine drive location in the machine main body 71 is detected. In addition to performing the processing of the task as described above, the scheduler 10c determines whether or not the processing of the task has been completed (step STP5). It is determined that the processing of step STP1 has been completed, and step STP1 is performed again.
Return to

【0022】ところで、このステップSTP1の時点
で、全ての加工動作関連タスク20が処理済みとなって
おり、時刻が時刻T3を過ぎている場合には、図2に示
すようにスケジューラ10cはタスク管理ファイルTK
Fに基づいて、この時刻においてレディ状態になった未
処理の第2OSタスク31が発生したと判定する。そし
てステップSTP2に進み、スケジューラ10cはタス
ク管理ファイルTKFに基づいて、レディ状態になった
タスクのうちプライオリティが最高のタスクを検出す
る。この場合には第2OSタスク31がプライオリティ
が最高のタスクとして検出され、ステップSTP3に進
んでスケジューラ10cでは、前記検出された第2OS
タスク31が第2OSタスク31であると判定する。ス
テップSTP3での判定結果に基づき、リアルタイムO
S10の割込み処理機能10eは、制御装置1のメモリ
6内に形成されているCPUレジスタ情報メモリ部25
(図3参照)に保存されているCPUレジスタ情報RI
Nを取り出してCPUレジスタ5に伝送する(ステップ
STP104)。ステップSTP104の後、処理機能
10aは第2OSタスク31を処理する(ステップST
P105)。即ち、OSエミュレーションプログラム3
0を介して第2OS40上で、出入力関連タスク51で
ある画像表示制御タスク41と通信制御タスク42が第
2OS40の処理機能40aによって交互に処理され
る。例えば画像表示制御タスク41の処理により、上述
した周期モニタタスク13等によって得られた、機械本
体71における各機械駆動箇所での移動駆動状況に関す
るデータが画像として作成されてモニタに出力される。
また例えば通信制御タスク42の処理により、機械本体
71における各機械駆動箇所での移動駆動状況に関する
データが、第2OS40の通信用ドライバ40dによっ
て通信ケーブル2を介して他のコンピュータ等に出力さ
れる。
By the way, at the time of this step STP1, all the processing operation-related tasks 20 have been processed, and if the time has passed the time T3, the scheduler 10c performs task management as shown in FIG. File TK
Based on F, it is determined that an unprocessed second OS task 31 that has become ready at this time has occurred. Then, the process proceeds to step STP2, where the scheduler 10c detects the task having the highest priority among the tasks in the ready state based on the task management file TKF. In this case, the second OS task 31 is detected as the task having the highest priority, and the process proceeds to step STP3, where the scheduler 10c checks the detected second OS task.
It is determined that the task 31 is the second OS task 31. Based on the determination result in step STP3, the real-time O
The interrupt processing function 10e of S10 is performed by the CPU register information memory unit 25 formed in the memory 6 of the control device 1.
(See FIG. 3) CPU register information RI stored
N is taken out and transmitted to the CPU register 5 (step STP104). After step STP104, the processing function 10a processes the second OS task 31 (step ST
P105). That is, the OS emulation program 3
On the second OS 40 via 0, the image display control task 41 and the communication control task 42, which are input / output related tasks 51, are alternately processed by the processing function 40a of the second OS 40. For example, by the process of the image display control task 41, data relating to the movement drive status at each machine drive location in the machine main body 71 obtained by the above-described cycle monitor task 13 and the like is created as an image and output to the monitor.
Further, for example, by the processing of the communication control task 42, data relating to the movement drive status at each machine drive location in the machine main body 71 is output to another computer or the like via the communication cable 2 by the communication driver 40 d of the second OS 40.

【0023】ところでステップSTP105が行われる
と共に、リアルタイムOS10のスケジューラ10cは
タスク管理ファイルTKFに基づいて、レディ状態にな
った未処理のタスクが発生したかどうかを判定している
(ステップSTP106)。タイマ10bがカウントす
る時刻が時刻T3を過ぎOS基本周期Pの終了時刻未満
である場合には、レディ状態になった未処理のタスクが
無いので、そのままステップSTP105が続行される
が、OS基本周期Pの終了時刻、従って次のOS基本周
期Pの開始時刻である時刻T0の場合には、サーボ制御
タスク11が未処理でレディ状態になる。従って次のO
S基本周期Pの時刻T0になると、ステップSTP10
6において、スケジューラ10cはタスク管理ファイル
TKFに基づいて、レディ状態になった未処理のタスク
11が発生したことを判定する。ステップSTP107
に進んで、割込み処理機能10eは、現在、処理機能1
0aで処理している内容(現在のCPU3の状態)をC
PUレジスタ情報RINとして、CPUレジスタ5を介
してCPUレジスタ情報メモリ部25に伝送して保存
し、処理機能10aによる第2OSタスク31の処理を
中断させ、また第2OS40のスケジューラ40cは出
入力関連タスク51を中断させ(この中断は1つのタス
クの処理途中で中断してもよい)、上述したステップS
TP2に戻る。
By the way, at the same time that the step STP105 is performed, the scheduler 10c of the real-time OS 10 determines whether or not an unprocessed task in the ready state has occurred based on the task management file TKF (step STP106). If the time counted by the timer 10b passes the time T3 and is less than the end time of the OS basic period P, there is no unprocessed task in the ready state, and the step STP105 is continued. In the case of the end time of P, that is, the time T0 which is the start time of the next OS basic cycle P, the servo control task 11 is not processed and is in the ready state. Therefore, the next O
At time T0 of the S basic cycle P, step STP10
In 6, the scheduler 10c determines, based on the task management file TKF, that an unprocessed task 11 in the ready state has occurred. Step STP107
The interrupt processing function 10e is currently in the processing function 1
0a (the current state of the CPU 3)
The PU function is transmitted as the PU register information RIN to the CPU register information memory unit 25 via the CPU register 5 and stored therein, so that the processing of the second OS task 31 by the processing function 10a is interrupted, and the scheduler 40c of the second OS 40 51 (this interruption may be interrupted during the processing of one task), and the above-described step S
Return to TP2.

【0024】以降、上述した手順と同様にして、ステッ
プSTP1〜STP5を順次繰り返して行うことによ
り、前回のOS基本周期Pの次のOS基本周期Pにおい
ても、サーボ制御タスク11、PLC制御タスク12、
周期モニタスク13等の加工動作関連タスク20を処理
し、その後、ステップSTP1からステップSTP10
4に入り、ステップSTP104、STP105を行う
形で第2OSタスク31を処理し、従って第2OS40
上で画像表示制御タスク41と通信制御タスク42を交
互に処理し、次いでステップSTP106、STP10
7からステップSTP2に進む形で、更に次のOS基本
周期Pに入っていく、といった形で処理が行われる。こ
のようにOS基本周期Pごとに各タスク20、31の処
理を行う形で加工プログラム21が実行される。なおス
テップSTP104では、リアルタイムOS10の割込
み処理機能10eが、CPUレジスタ情報メモリ部25
に保存されているCPUレジスタ情報RINを取り出し
てCPUレジスタ5に伝送し、更に該CPUレジスタ5
からCPUレジスタ情報RINを受け取ることによりC
PU3は、該CPUレジスタ情報RINをもった状態に
なり、従って処理機能10aが前回第2OSタスク31
を中断する際の状態となるので、これに続くステップS
TP105では、画像表示制御タスク41及び通信制御
タスク42等の出入力関連タスク51を、その中断直前
の状態から続けて行う。これにより、途中で中断したタ
スクを再び初めから行うようなことがなく処理時間を節
約できる。なおリアルタイムOS10では、1つのOS
基本周期Pにおいて、加工動作関連タスク20の処理時
間が長くなり第2OSタスク31が省略されることは可
能であるが、この加工動作関連タスク20の処理時間が
最大限長くなっても、加工動作関連タスク20の一部が
省略されることはないように、各タスクの処理時間配分
等が予め設定されているので、加工を直接制御するため
の各加工動作関連タスク20は、1つのOS基本周期P
において必ず処理され、その結果、正確な加工動作が保
証されている。
Thereafter, steps STP1 to STP5 are sequentially and repeatedly performed in the same manner as described above, so that the servo control task 11 and the PLC control task 12 can be performed even in the OS basic cycle P subsequent to the previous OS basic cycle P. ,
The processing operation-related task 20 such as the periodic monitor disk 13 is processed, and thereafter, the process proceeds from step STP1 to step STP10.
4 and processes the second OS task 31 by performing steps STP104 and STP105.
Above, the image display control task 41 and the communication control task 42 are alternately processed, and then steps STP106 and STP10
7, the process proceeds to step STP2, and further enters the next OS basic period P. As described above, the machining program 21 is executed in such a manner that the processes of the tasks 20 and 31 are performed for each OS basic cycle P. In step STP104, the interrupt processing function 10e of the real-time OS 10
The CPU register information RIN stored in the CPU register 5 is extracted and transmitted to the CPU register 5, and
Receiving the CPU register information RIN from C
PU3 enters the state having the CPU register information RIN, and accordingly, the processing function 10a
Is interrupted, so that step S
In the TP 105, input / output related tasks 51 such as the image display control task 41 and the communication control task 42 are continuously performed from the state immediately before the interruption. As a result, the task interrupted on the way is not performed again from the beginning, and the processing time can be saved. In the real-time OS 10, one OS
In the basic cycle P, the processing time of the processing operation-related task 20 can be increased and the second OS task 31 can be omitted. Since the processing time distribution of each task is set in advance so that a part of the related tasks 20 is not omitted, each machining operation related task 20 for directly controlling the machining is performed by one OS basic. Period P
, And as a result, an accurate machining operation is guaranteed.

【0025】以上のように制御装置1では、加工動作関
連タスク20はリアルタイムOS10上で処理される
が、出入力関連タスク51は第2OS40上で処理され
るようになっているので、出入力関連プログラム50
は、汎用OSである第2OS40に依存したプログラム
でよい。従って、制御装置1で使用する出入力関連プロ
グラム50は汎用性が高く、これら出入力関連プログラ
ム50等のプログラムの移植が簡単になる。また、第2
OS40の通信用ドライバ等の各種ドライバも該第2O
S40に依存したものとなるので、ハードウエアの新規
増設等を行う際にも汎用性の高い各種ドライバを簡単に
移植でき手間がかからず好都合である。また、第2OS
40上で作動させるプログラム等に関する操作は、汎用
OSである第2OS40に関する操作を修得すればよ
く、リアルタイムOS10の操作の修得のような専門性
が必要なく好都合である。特に画面操作機能(HMI:
HumanMachine Interface)を実現するタイプの汎用OS
を採用すると操作は非常に容易になり好都合である。
As described above, in the control device 1, the processing operation-related task 20 is processed on the real-time OS 10, but the input / output-related task 51 is processed on the second OS 40. Program 50
May be a program that depends on the second OS 40 that is a general-purpose OS. Therefore, the input / output related programs 50 used in the control device 1 have high versatility, and the porting of the input / output related programs 50 and the like is simplified. Also, the second
Various drivers such as a communication driver of the OS 40 are also provided in the second O.
Since it depends on S40, various versatile drivers can be easily ported even when new hardware is added or the like, which is convenient and convenient. Also, the second OS
The operation related to the program or the like to be operated on the OS 40 may be performed by learning the operation related to the second OS 40 which is a general-purpose OS, and it is convenient because there is no need for specialty like learning the operation of the real-time OS 10. Especially the screen operation function (HMI:
General-purpose OS that realizes HumanMachine Interface)
The operation is very easy and convenient.

【0026】なお、本実施例では数値制御工作機械の一
例としてCNC旋盤70を挙げているが、その他の例と
して、マシニングセンタやレーザ加工機などでもよい。
また、上述した実施例では出入力関連タスク51の例と
して、画像表示制御タスク41と通信制御タスク42を
挙げているが、その他にも、印刷出力を制御するタスク
なども可能である。
In this embodiment, the CNC lathe 70 is given as an example of the numerically controlled machine tool. However, as another example, a machining center or a laser processing machine may be used.
In the above-described embodiment, the image display control task 41 and the communication control task 42 are given as examples of the input / output-related task 51. However, other tasks such as controlling a print output are also possible.

【0027】[0027]

【発明の効果】以上説明したように本発明のうち第1の
発明は、機械駆動部及び該機械駆動部を駆動自在なモー
タ71a、アクチェータ71b等の駆動装置を有し、前
記駆動装置を駆動制御自在なモータ駆動制御装置72
a、アクチェータ駆動制御装置72b等の駆動制御装置
を設け、データの出力又は入力を行う通信ケーブル2、
ディスプレイ4等のデータ出入力手段が備えられている
と共に、前記駆動制御装置に、制御指令を伝送自在に接
続された制御装置1等の主制御装置を設けた数値制御工
作機械において、前記主制御装置は、リアルタイムOS
10等の第1のオペレーションシステムを格納した第1
メモリ部6a等の第1のメモリ及び、前記第1のオペレ
ーションシステムとは独立した形の第2OS40等の第
2のオペレーションシステムを格納した第2メモリ部6
b等の第2のメモリを有し、前記主制御装置では、前記
第1のメモリに格納された前記第1のオペレーションシ
ステム及び、前記第2のメモリに格納された前記第2の
オペレーションシステムが選択的に動作自在となってお
り、前記第1のオペレーションシステムは、加工プログ
ラム21等の加工プログラムに基づいて前記制御指令を
演算出力する加工動作関連タスク20(例えば、サーボ
制御タスク11、PLC制御タスク12等)等の制御指
令演算出力タスクを有し、前記第2のオペレーションシ
ステムは、前記データ出入力手段によるデータの出力又
は入力を制御する出入力関連タスク51(例えば、画像
表示制御タスク41、通信制御タスク42等)等の出入
力制御タスクを有して構成される。このように第1のオ
ペレーションシステムは、サーボ制御タスク11やPL
C制御タスク12等の制御指令演算出力タスク、従って
加工動作に影響するタスクを処理するためのオペレーシ
ョンシステムであるため、制御指令演算出力タスク等の
処理時間管理において所定の特徴(いわゆる「リアルタ
イムOS」等で見られる特徴)を備えていなければなら
ないが、第2のオペレーションシステムは加工動作に直
接影響しないタスク、即ち出入力制御タスクを処理する
ためのオペレーションシステムであるため、上述した所
定の特徴を備えていない他のオペレーションシステム
(いわゆる「汎用OS」等)でよくなる。また、出入力
制御タスクは第2のオペレーションシステムで処理する
ので、該出入力制御タスクに関するプログラムは第2の
オペレーションシステムに依存したプログラム(即ち、
第1のオペレーションシステムに依存しないプログラ
ム)となることから、該出入力制御タスクに関するプロ
グラムは汎用性が高いものとなり、該出入力制御タスク
に関連したプログラムの移植が簡単になる。更に、第2
のオペレーションシステムで使用する通信用ドライバ等
の各種ドライバも該第2のオペレーションシステムに依
存したもの(即ち、第1のオペレーションシステムに依
存しないもの)となるので、ハードウエアの新規増設等
を行う際にも汎用性の高い各種ドライバを簡単に移植で
き手間がかからず好都合である。
As described above, the first aspect of the present invention has a mechanical drive unit and a drive device such as a motor 71a and an actuator 71b capable of driving the mechanical drive unit, and drives the drive device. Controllable motor drive controller 72
a, a drive control device such as an actuator drive control device 72b, and a communication cable 2 for outputting or inputting data;
A numerical control machine tool provided with data input / output means such as a display 4 and a main control device such as a control device 1 connected to the drive control device so as to be capable of transmitting control commands; The device is a real-time OS
The first storing the first operating system such as 10
A second memory unit 6 storing a first memory such as a memory unit 6a and a second operating system such as a second OS 40 independent of the first operating system.
b, etc., and in the main controller, the first operation system stored in the first memory and the second operation system stored in the second memory The first operation system is selectively operable, and the first operation system includes a machining operation-related task 20 for calculating and outputting the control command based on a machining program such as a machining program 21 (for example, a servo control task 11, a PLC control task). The second operation system has an input / output related task 51 (for example, an image display control task 41) for controlling data output or input by the data input / output means. , A communication control task 42, etc.). As described above, the first operation system includes the servo control task 11 and the PL
Since this is an operation system for processing a control command calculation output task such as the C control task 12 and therefore a task that affects the machining operation, a predetermined feature (a so-called “real-time OS”) is used in the processing time management of the control command calculation output task and the like. Etc.), but the second operation system is an operation system for processing a task which does not directly affect the machining operation, that is, an input / output control task. Other operation systems that are not provided (such as a so-called “general-purpose OS”) can be used. Further, since the input / output control task is processed by the second operating system, the program related to the input / output control task is a program dependent on the second operating system (ie, a program that depends on the second operating system).
Since the program is not dependent on the first operation system), the program related to the input / output control task has high versatility, and the porting of the program related to the input / output control task is simplified. Furthermore, the second
Since various drivers such as a communication driver used in the operating system of the above also depend on the second operating system (ie, do not depend on the first operating system), when new hardware is added, etc. However, it is convenient because various versatile drivers can be easily ported.

【0028】また本発明のうち第2の発明は、第1の発
明の数値制御工作機械において、前記第1のオペレーシ
ョンシステムは、前記第2のオペレーションシステムを
動作させる第2OSタスク31等の第2処理タスクを有
している。つまり、第1の発明による効果に加えて、第
2のオペレーションシステムは、第1のオペレーション
システムの処理する1つのタスクにおいて動作するよう
になっているので、第1のオペレーションシステムにお
いて、制御指令演算出力タスクと第2処理タスクの処理
時間管理を適切に設定していれば(即ち、制御指令演算
出力タスクを第2処理タスクよりも優先させるように設
定しておけば)、第2処理タスクにおける前記第2のオ
ペレーションシステムで処理する出入力制御タスクと、
制御指令演算出力タスクとの間の処理時間管理も適切に
行える(即ち、制御指令演算出力タスクを出入力制御タ
スクよりも優先させることができる)。これにより、例
えば出入力制御タスクのタスクの数を増やしたり減らし
たりしても、これら出入力制御タスクと制御指令演算出
力タスクとの処理優先関係は常に適切に保たれるので好
都合である。
According to a second aspect of the present invention, in the numerically controlled machine tool according to the first aspect, the first operation system includes a second OS task 31 such as a second OS task 31 for operating the second operation system. Has a processing task. That is, in addition to the effect of the first invention, the second operating system operates in one task processed by the first operating system. If the processing time management of the output task and the second processing task is properly set (that is, if the control command calculation output task is set to have a higher priority than the second processing task), An input / output control task processed by the second operating system;
The processing time between the control command calculation output task and the control command calculation output task can be appropriately managed (that is, the control command calculation output task can be prioritized over the input / output control task). Thus, even if, for example, the number of tasks of the input / output control task is increased or decreased, the processing priority relationship between the input / output control task and the control command calculation output task is always appropriately maintained, which is advantageous.

【0029】また本発明のうち第3の発明は、第1の発
明の数値制御工作機械において、前記第1のオペレーシ
ョンシステムはリアルタイムオペレーションシステム
(即ち、Real Time Operation System:加工の動作に直
接影響を与えるタスクの処理を1つの基本周期において
必ず処理するように設定されている数値制御工作機械独
自のオペレーションシステム)であり、前記第2のオペ
レーションシステムは汎用オペレーションシステム(業
務用や家庭用を問わず広く使用されているパソコン用の
オペレーションシステム、例えばマイクロソフト社の
「Windows95」(登録商標)やアップル社の「Mac OS8」
(登録商標)などがその例である)であるので、第1の
発明による効果に加えて、出入力制御タスクに関するプ
ログラムは汎用オペレーションシステムに依存したプロ
グラムとなることから、該出入力制御タスクに関するプ
ログラムは汎用性が高いものとなり、該出入力制御タス
クに関連したプログラムの移植が簡単になる。また、第
2のオペレーションシステムで使用する通信用ドライバ
等の各種ドライバも汎用オペレーションシステムに依存
したものとなるので、ハードウエアの新規増設等を行う
際にも汎用性の高い各種ドライバを簡単に移植でき手間
がかからず好都合である。更に、第2のオペレーション
システム上で作動させるプログラム等に関する操作は、
汎用オペレーションシステムに関する操作を修得すれば
よく、リアルタイムオペレーションシステムの操作の修
得のような専門性が必要なく好都合である。
According to a third aspect of the present invention, in the numerical control machine tool according to the first aspect, the first operation system has a direct effect on a real time operation system (ie, a real time operation system). The second operation system is a general-purpose operation system (whether for business use or for home use), which is a numerical control machine tool original operation system that is set so that processing of a given task is always performed in one basic cycle. A widely used PC operation system, such as Microsoft's "Windows95" (registered trademark) or Apple's "Mac OS8"
(Registered trademark) is an example thereof). In addition to the effects of the first aspect, the program related to the input / output control task depends on the general-purpose operation system. The program becomes highly versatile, and porting of the program related to the input / output control task becomes easy. In addition, since various drivers such as communication drivers used in the second operation system also depend on the general-purpose operation system, various general-purpose drivers can be easily ported even when new hardware is added. It is convenient because it does not require much work. Further, operations related to a program or the like operated on the second operation system include:
It is only necessary to learn the operation of the general-purpose operation system, which is convenient because there is no need for specialty like the operation of the real-time operation system.

【0030】また本発明のうち第4の発明は、第2の発
明の数値制御工作機械において、前記第1のオペレーシ
ョンシステムは、前記制御指令演算出力タスク又は前記
第2処理タスクの処理命令を選択的に順次出力するスケ
ジューラ10c等のスケジューラ及び、該スケジューラ
からの命令に基づいて、前記制御指令演算出力タスク又
は前記第2処理タスクの処理を行う処理機能10a等の
処理機能を有しているので、第2の発明による効果に加
えて、第1のオペレーションシステムにおいて、制御指
令演算出力タスクと第2処理タスクの処理時間管理をス
ケジューラを介して適切に行うことができるので好都合
である。
According to a fourth aspect of the present invention, in the numerical control machine tool according to the second aspect, the first operation system selects the control command calculation output task or the processing instruction of the second processing task. And a processing function such as a processing function 10a for processing the control command calculation output task or the second processing task based on an instruction from the scheduler. In addition to the effects of the second invention, in the first operation system, the processing time of the control command calculation output task and the second processing task can be appropriately managed through the scheduler, which is advantageous.

【0031】また本発明のうち第5の発明では、第1の
発明の数値制御工作機械において制御を行う際には、前
記第1のオペレーションシステムにより前記制御指令演
算出力タスクを処理完了可能な長さの所定のOS基本周
期P等の基本周期を設定しておき、前記基本周期に基づ
いて時刻を計測しつつ、1つの基本周期内でまず前記第
1のオペレーションシステムにより前記制御指令演算出
力タスクを処理し、該制御指令演算出力タスクの処理が
完了したのを確認し、前記基本周期内の残りの時間で前
記第2のオペレーションシステムにより前記出入力制御
タスクを処理するようにして構成されるので、加工動作
に直接影響する制御指令演算出力タスクは基本周期ごと
に確実に処理されることにより、加工における信頼性が
高くなっている。また、出入力制御タスクは第2ののオ
ペレーションシステムで処理するので、該出入力制御タ
スクに関するプログラムは第2のオペレーションシステ
ムに依存したプログラム(即ち、第1のオペレーション
システムに依存しないプログラム)となることから、該
出入力制御タスクに関するプログラムは汎用性が高いも
のとなり、該出入力制御タスクに関連したプログラムの
移植が簡単になる。更に、第2のオペレーションシステ
ムで使用する通信用ドライバ等の各種ドライバも該第2
のオペレーションシステムに依存したもの(即ち、第1
のオペレーションシステムに依存しないもの)となるの
で、ハードウエアの新規増設等を行う際にも汎用性の高
い各種ドライバを簡単に移植でき手間がかからず好都合
である。
According to a fifth aspect of the present invention, when control is performed on the numerically controlled machine tool of the first aspect, the first operation system is capable of completing the control command calculation output task. A basic cycle such as a predetermined OS basic cycle P is set, and while the time is measured based on the basic cycle, the control command calculation output task is first performed by the first operation system within one basic cycle. And confirm that the processing of the control command calculation output task is completed, and process the input / output control task by the second operation system in the remaining time within the basic cycle. Therefore, the control command calculation output task that directly affects the machining operation is reliably processed for each basic cycle, thereby increasing the reliability in machining. Further, since the input / output control task is processed by the second operating system, the program related to the input / output control task is a program that depends on the second operating system (that is, a program that does not depend on the first operating system). Therefore, the program related to the input / output control task has high versatility, and the porting of the program related to the input / output control task is simplified. Further, various drivers such as a communication driver used in the second operation system are also provided in the second operation system.
That depend on the operating system of the
This does not depend on the operation system of the present invention), so that even when newly adding hardware, various versatile drivers can be easily ported, which is convenient and convenient.

【0032】また本発明のうち第6の発明では、第5の
発明の制御方法において、前記第2のオペレーションシ
ステムによる前記出入力制御タスクの処理は、前記第1
のオペレーションシステム上でエミュレーションする形
で前記第2のオペレーションシステムを動作させて行う
ようにしたので、第5の発明による効果に加えて、1つ
のCPUを使って第1及び第2のオペレーションシステ
ムからなる2つのOS環境を実現できるので好都合であ
る。
According to a sixth aspect of the present invention, in the control method of the fifth aspect, the processing of the input / output control task by the second operating system is performed by the first operation method.
The second operation system is operated by emulating on the operation system of the first embodiment. Therefore, in addition to the effect of the fifth invention, the first and second operation systems can be implemented by using one CPU. This is convenient because two OS environments can be realized.

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

【図1】図1は、リアルタイムOS等による各種タスク
の管理態様を概念的に示した図である。
FIG. 1 is a diagram conceptually showing a management mode of various tasks by a real-time OS or the like.

【図2】図2は、各タスクの処理概念図である。FIG. 2 is a conceptual diagram of processing of each task.

【図3】図3は、CNC旋盤を示した概念図である。FIG. 3 is a conceptual diagram showing a CNC lathe.

【図4】図4は、リアルタイムOSによる制御内容を示
したフローチャートである。
FIG. 4 is a flowchart showing control contents by a real-time OS.

【図5】図5は、数値制御工作機械における従来の制御
方法の一例を示した各タスクの処理概念図である。
FIG. 5 is a conceptual processing diagram of each task showing an example of a conventional control method in a numerically controlled machine tool.

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

1……主制御装置(制御装置) 2……データ出入力手段(通信ケーブル) 4……データ出入力手段(ディスプレイ) 6a……第1のメモリ(第1メモリ部) 6b……第2のメモリ(第2メモリ部) 10……第1のオペレーションシステム(リアルタイム
OS) 10a……処理機能 10c……スケジューラ 20……制御指令演算出力タスク(加工動作関連タス
ク) 21……加工プログラム 31……第2処理タスク(第2OSタスク) 40……第2のオペレーションシステム(第2OS) 51……出入力制御タスク(出入力関連タスク) 70……数値制御工作機械 71a……駆動装置(モータ) 71b……駆動装置(アクチェータ) 72a……駆動制御装置(モータ駆動制御装置) 72b……駆動制御装置(アクチェータ駆動制御装置) P……基本周期(OS基本周期)
DESCRIPTION OF SYMBOLS 1 ... Main control device (control device) 2 ... Data input / output means (communication cable) 4 ... Data input / output means (display) 6a ... 1st memory (1st memory part) 6b ... 2nd Memory (second memory unit) 10 First operation system (real-time OS) 10a Processing function 10c Scheduler 20 Control command calculation output task (processing operation-related task) 21 Processing program 31 Second processing task (second OS task) 40 second operating system (second OS) 51 input / output control task (input / output related task) 70 numerical control machine tool 71a driving device (motor) 71b ... Drive device (actuator) 72a Drive control device (motor drive control device) 72b Drive control device (actuator drive control device) ) P ...... fundamental period (OS basic cycle)

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】機械駆動部及び該機械駆動部を駆動自在な
駆動装置を有し、前記駆動装置を駆動制御自在な駆動制
御装置を設け、データの出力又は入力を行うデータ出入
力手段が備えられていると共に、前記駆動制御装置に、
制御指令を伝送自在に接続された主制御装置を設けた数
値制御工作機械において、 前記主制御装置は、第1のオペレーションシステムを格
納した第1のメモリ及び、前記第1のオペレーションシ
ステムとは独立した形の第2のオペレーションシステム
を格納した第2のメモリを有し、 前記主制御装置では、前記第1のメモリに格納された前
記第1のオペレーションシステム及び、前記第2のメモ
リに格納された前記第2のオペレーションシステムが選
択的に動作自在となっており、 前記第1のオペレーションシステムは、加工プログラム
に基づいて前記制御指令を演算出力する制御指令演算出
力タスクを有し、 前記第2のオペレーションシステムは、前記データ出入
力手段によるデータの出力又は入力を制御する出入力制
御タスクを有して構成した数値制御工作機械。
1. A device comprising: a mechanical drive unit; a drive unit capable of driving the machine drive unit; a drive control unit capable of controlling the drive unit; and data input / output means for outputting or inputting data. And the drive control device includes:
In a numerical control machine tool provided with a main control device connected to transmit control commands freely, the main control device is independent of a first memory storing a first operation system and the first operation system. And a second memory storing a second operation system in the form described above, wherein the main control device stores the first operation system stored in the first memory and the second memory stored in the second memory. The second operation system is selectively operable; the first operation system has a control command calculation output task for calculating and outputting the control command based on a machining program; Has an input / output control task for controlling output or input of data by the data input / output means. Numerically controlled machine tool configured.
【請求項2】前記第1のオペレーションシステムは、前
記第2のオペレーションシステムを動作させる第2処理
タスクを有していることを特徴とする請求項1記載の数
値制御工作機械。
2. The numerically controlled machine tool according to claim 1, wherein said first operating system has a second processing task for operating said second operating system.
【請求項3】前記第1のオペレーションシステムはリア
ルタイムオペレーションシステムであり、前記第2のオ
ペレーションシステムは汎用オペレーションシステムで
あることを特徴とする請求項1記載の数値制御工作機
械。
3. The numerically controlled machine tool according to claim 1, wherein said first operation system is a real-time operation system, and said second operation system is a general-purpose operation system.
【請求項4】前記第1のオペレーションシステムは、前
記制御指令演算出力タスク又は前記第2処理タスクの処
理命令を選択的に順次出力するスケジューラ及び、該ス
ケジューラからの命令に基づいて、前記制御指令演算出
力タスク又は前記第2処理タスクの処理を行う処理機能
を有していることを特徴とする請求項2記載の数値制御
工作機械。
4. The scheduler according to claim 1, wherein said first operation system selectively outputs processing instructions of said control command calculation output task or said second processing task sequentially, and said control command is issued based on an instruction from said scheduler. The numerically controlled machine tool according to claim 2, further comprising a processing function of performing a calculation output task or the second processing task.
【請求項5】請求項1記載の数値制御工作機械において
制御を行う際には、 前記第1のオペレーションシステムにより前記制御指令
演算出力タスクを処理完了可能な長さの所定の基本周期
を設定しておき、 前記基本周期に基づいて時刻を計測しつつ、1つの基本
周期内でまず前記第1のオペレーションシステムにより
前記制御指令演算出力タスクを処理し、該制御指令演算
出力タスクの処理が完了したのを確認し、前記基本周期
内の残りの時間で前記第2のオペレーションシステムに
より前記出入力制御タスクを処理するようにして構成し
た、数値制御工作機械の制御方法。
5. When performing control in the numerically controlled machine tool according to claim 1, the first operation system sets a predetermined basic cycle long enough to complete the processing of the control command calculation output task. In the meantime, while the time is measured based on the basic cycle, the control command calculation output task is first processed by the first operation system within one basic cycle, and the processing of the control command calculation output task is completed. And controlling the input / output control task by the second operating system in the remaining time within the basic cycle.
【請求項6】前記第2のオペレーションシステムによる
前記出入力制御タスクの処理は、前記第1のオペレーシ
ョンシステム上でエミュレーションする形で前記第2の
オペレーションシステムを動作させて行うようにしたこ
とを特徴とする請求項5記載の、数値制御工作機械の制
御方法。
6. The processing of the input / output control task by the second operating system is performed by operating the second operating system in a form emulated on the first operating system. The control method for a numerically controlled machine tool according to claim 5, wherein
JP3366698A 1998-01-30 1998-01-30 Numerically controlled machine tool and control method therefor Pending JPH11219211A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3366698A JPH11219211A (en) 1998-01-30 1998-01-30 Numerically controlled machine tool and control method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3366698A JPH11219211A (en) 1998-01-30 1998-01-30 Numerically controlled machine tool and control method therefor

Publications (1)

Publication Number Publication Date
JPH11219211A true JPH11219211A (en) 1999-08-10

Family

ID=12392791

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3366698A Pending JPH11219211A (en) 1998-01-30 1998-01-30 Numerically controlled machine tool and control method therefor

Country Status (1)

Country Link
JP (1) JPH11219211A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007257106A (en) * 2006-03-22 2007-10-04 Fuji Electric Fa Components & Systems Co Ltd Programmable controller
JP2011134197A (en) * 2009-12-25 2011-07-07 Hitachi Industrial Equipment Systems Co Ltd Programmable controller and time division method for a plurality of processes in programmable controller
JP4752984B1 (en) * 2011-03-15 2011-08-17 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program
JP4894961B1 (en) * 2011-03-15 2012-03-14 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program
US8504176B2 (en) 2011-03-15 2013-08-06 Omron Corporation CPU unit of PLC, system program for PLC, and recording medium storing system program for PLC

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007257106A (en) * 2006-03-22 2007-10-04 Fuji Electric Fa Components & Systems Co Ltd Programmable controller
JP2011134197A (en) * 2009-12-25 2011-07-07 Hitachi Industrial Equipment Systems Co Ltd Programmable controller and time division method for a plurality of processes in programmable controller
JP4752984B1 (en) * 2011-03-15 2011-08-17 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program
JP4894961B1 (en) * 2011-03-15 2012-03-14 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program
WO2012124133A1 (en) * 2011-03-15 2012-09-20 オムロン株式会社 Cpu of plc, system program for plc, and recording medium storing system program for plc
WO2012124141A1 (en) * 2011-03-15 2012-09-20 オムロン株式会社 Plc cpu unit, system program for plc, and storage medium having system program for plc stored therein
CN102792237A (en) * 2011-03-15 2012-11-21 欧姆龙株式会社 PLC CPU unit, system program for PLC, and storage medium having system program for PLC stored therein
US8504176B2 (en) 2011-03-15 2013-08-06 Omron Corporation CPU unit of PLC, system program for PLC, and recording medium storing system program for PLC
CN102792237B (en) * 2011-03-15 2015-05-13 欧姆龙株式会社 PLC CPU unit
US9618922B2 (en) 2011-03-15 2017-04-11 Omron Corporation CPU of PLC, system program for PLC, and recording medium storing system program for PLC

Similar Documents

Publication Publication Date Title
US7561927B2 (en) Numerical controller which can call program described in script language
CN1781659B (en) Controller
US20100274385A1 (en) Control system for controlling an industrial robot
JP4311349B2 (en) Numerical control system
US20080103625A1 (en) Numerical controller with machining resume function
EP1471404A2 (en) Numerical control apparatus for machine tool
JP2004318762A (en) Numerical control device
KR910002317B1 (en) Numerical control device
JPH11219211A (en) Numerically controlled machine tool and control method therefor
JP6638979B2 (en) Numerical control device with machining process management function and machining process management program
JP2673543B2 (en) Excessive Error Detection Method in Servo Motor Control
JP2735209B2 (en) Numerical control unit
US4328448A (en) Method for programmably controlling the sequence of execution of data blocks in a program
CN112650148A (en) Multi-axis motion control system and method
JPH08106320A (en) Automatic machine and control method for automatic machine
CN111324086A (en) Numerical controller
JP2687119B2 (en) Numerical control unit
JP2001154719A (en) Method for interpolating free curve
JP7492006B2 (en) Numerical Control System
JP7256703B2 (en) Controllers, control systems, and machine learning devices
JPH02151909A (en) Control device for industrial machine
WO1989002110A1 (en) Cnc program execution apparatus
WO2023084597A1 (en) Numerical control device and storage medium
WO2023209754A1 (en) Servo adjustment system
WO2023135685A1 (en) Numerical control device and storage medium