JPH06110525A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPH06110525A
JPH06110525A JP28092992A JP28092992A JPH06110525A JP H06110525 A JPH06110525 A JP H06110525A JP 28092992 A JP28092992 A JP 28092992A JP 28092992 A JP28092992 A JP 28092992A JP H06110525 A JPH06110525 A JP H06110525A
Authority
JP
Japan
Prior art keywords
sentence
block
statement
single block
program
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
JP28092992A
Other languages
Japanese (ja)
Inventor
Takao Yoneda
孝夫 米田
Yoshimi Takeya
吉視 竹谷
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.)
Toyoda Koki KK
Original Assignee
Toyoda Koki KK
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 Toyoda Koki KK filed Critical Toyoda Koki KK
Priority to JP28092992A priority Critical patent/JPH06110525A/en
Publication of JPH06110525A publication Critical patent/JPH06110525A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To completely perform the debugging work of an NC program with single block execution by effectively utilizing a structured description format so as to process the condition judge part of a conditioned control sentence and the processing part of a branch destination as different blocks. CONSTITUTION:The control condition discrimination part of the conditioned control sentence and the processing part of the branch destination are defined as different blocks. For example, the block of an IF sentence is partitioned like a figure and when one block is executed from a pointer (1) and a 'condition expression' is true, single block stop is performed by a pointer (2) or when it is false, single block stop is performed by a pointer (3). In this case, both of an NC sentence and a macro sentence are available for sentences 1 and 2. Since the condition discrimination and the machine operation are not executed in one block, the program debugging of a structured NC language is enabled on the same operation environment as the conventional single block execution.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は数値制御装置に関し、特
に、構造化されたプログラム記述フォーマットを採用可
能な数値制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a numerical control device, and more particularly to a numerical control device capable of adopting a structured program description format.

【0002】[0002]

【従来の技術】CNC装置上のNCプログラム言語の実
行形式はプログラムエンドまで停止しないで連続実行す
る連続運転形式と、ブロック実行毎に停止するシングル
ブロック実行形式とを持っている。シングルブロック実
行はNCプログラムデバッグ時に多く用いられる。ブロ
ックには機械動作を記述したNC文ブロックとプログラ
ムの流れを制御するマクロ文ブロックがあり、共にEO
Bのコードにて区切られている。従来のこの種のNC装
置は、EOBのコードにて区切られた文を一つのブロッ
クとして実行するものであった。
2. Description of the Related Art The execution format of the NC program language on a CNC device has a continuous operation format in which it is continuously executed without stopping until the program end, and a single block execution format in which it is stopped every block execution. Single block execution is often used when debugging NC programs. Blocks include NC statement blocks that describe machine operations and macro statement blocks that control the flow of programs.
Separated by the B code. A conventional NC device of this type executes a sentence delimited by EOB code as one block.

【0003】[0003]

【発明が解決しようとする課題】ところで、マクロ文の
プログラム記述フォーマットはCNC装置により様々で
ある。例えば、図1のような構造化されていないプログ
ラム記述フォーマットではマクロ文とNC文とが分離し
ているため問題は生じない。しかし、現在ISOで提唱
されている構造化されたプログラム記述フォーマットを
採用した場合、従来のブロック制御方法では、一つのブ
ロック内にマクロ文とNC文の混在が可能なため、ブロ
ック実行において作業者が次の機械動作を明確に判断で
きないという問題点があった。例えば、図2に示す構造
化されたプログラム記述フォーマットの場合、ブロック
実行時に作業者は条件式をその場で評価できないことか
ら、軸移動が行われるか否かの判断がつかない。このた
め、作業者に不安を与えるという問題点があった。本発
明は上記の問題点を解決するためなされたものであり、
その目的とするところは、構造化されたNC言語の記述
フォーマットを活かし、シングルブロック実行によるN
Cプログラムのデバッグ作業を安全に行うことができる
数値制御装置を提供することにある。
By the way, the program description format of the macro statement varies depending on the CNC device. For example, in the unstructured program description format as shown in FIG. 1, since the macro statement and the NC statement are separated, no problem occurs. However, when the structured program description format currently proposed by ISO is adopted, in the conventional block control method, a macro statement and an NC statement can be mixed in one block, so that an operator is required to execute the block. Had a problem that the next machine operation could not be clearly determined. For example, in the case of the structured program description format shown in FIG. 2, since the operator cannot evaluate the conditional expression on the spot at the time of executing the block, it is impossible to judge whether or not the axis movement is performed. Therefore, there is a problem that the worker is anxious. The present invention has been made to solve the above problems,
The purpose is to utilize the structured description format of the NC language and execute N by single block execution.
It is an object of the present invention to provide a numerical controller capable of safely performing a debugging operation of a C program.

【0004】[0004]

【課題を解決するための手段】上記の目的を達成するた
め、本発明では、数値制御プログラムを1ブロックずつ
読出して実行し被制御装置を制御するようにした数値制
御装置において、前記読出した数値制御プログラムの内
容が条件文であるかを判定する判定手段と、この判定手
段にて条件文であると判定されたときこの条件文の内容
を判定する内容判定手段と、この内容判定手段の結果に
応じて実行される次命令の前で動作を停止させる動作停
止手段と、次命令の実行を指示するトリガ信号を与える
トリガ信号出力手段とを備えた数値制御装置が提供され
る。
In order to achieve the above object, in the present invention, in a numerical controller for controlling a controlled device by reading and executing a numerical control program block by block, the read numerical value is controlled. Determination means for determining whether the content of the control program is a conditional statement, content determination means for determining the content of the conditional statement when the determination means determines that the content is a conditional statement, and the result of the content determination means There is provided a numerical controller provided with an operation stopping means for stopping the operation before the next instruction executed according to the above, and a trigger signal output means for giving a trigger signal for instructing the execution of the next instruction.

【0005】[0005]

【作用】上記のように構成された数値制御装置では、プ
ログラムが1ブロックずつ読出されたとき、判定手段に
より読出されたブロックが条件文であるかを判定し、条
件文である場合には、内容判定手段にてこの条件文の内
容を判定し、内容判定手段の結果に応じて動作停止手段
が次命令の前で動作を停止させ、トリガ信号出力手段よ
りトリガ信号が出力されたときに動作を再開する。
In the numerical controller configured as described above, when the program is read block by block, the determining means determines whether or not the read block is a conditional statement. The content determining means determines the content of this conditional statement, and the operation stopping means stops the operation before the next instruction according to the result of the content determining means, and operates when the trigger signal is output from the trigger signal output means. To resume.

【0006】[0006]

【実施例】本発明の実施例について図面を参照し説明す
る。図4において、10はアンギュラスライド研削盤、
20は数値制御装置である。研削盤10は砥石車Gを軸
承する砥石台11と工作物Wを載置する工作物テーブル
13とをそなえている。そして、砥石台11及び工作物
テーブル13は、駆動回路16、17によってそれぞれ
回転駆動されるサーボモータ12、14によって移動さ
れるようになっている。各サーボモータ12、14には
アブソリュートエンコーダ18、19が取り付けられて
いる。
Embodiments of the present invention will be described with reference to the drawings. In FIG. 4, 10 is an angular slide grinder,
20 is a numerical control device. The grinder 10 includes a grindstone base 11 that supports the grindstone G and a work table 13 on which a work W is placed. The grindstone 11 and the workpiece table 13 are moved by servomotors 12 and 14 which are rotationally driven by drive circuits 16 and 17, respectively. Absolute encoders 18 and 19 are attached to the servomotors 12 and 14, respectively.

【0007】前記数値制御装置20は主としてCPU2
1、RAM24、ROM25、CPU21の速度管理基
準用タイマとしてのリアルタイムクロック(以下「RT
C」と略記する。)22、パルス発生回路23、インタ
ーフェース26、27、29によって構成され、パルス
発生回路23から送出される指令パルスが駆動回路1
6、17に供給されるようになっている。一方、インタ
ーフェース26には表示制御回路37が接続され、その
表示制御回路37にはCRT表示装置38が接続されて
いる。また、インターフェース27にはNCプログラム
を構成するNCデータを記憶したバブルカセット入出力
装置34と各種データの入力及びCPU21への動作の
再開を指令するトリガ信号を出すトリガスイッチ36a
を備えたキーボード36が接続されている。
The numerical controller 20 is mainly a CPU 2
1, a RAM 24, a ROM 25, a real time clock (hereinafter referred to as “RT
It is abbreviated as "C". ) 22, a pulse generation circuit 23, and interfaces 26, 27, 29, and the command pulse sent from the pulse generation circuit 23 is the drive circuit 1
6 and 17 are supplied. On the other hand, a display control circuit 37 is connected to the interface 26, and a CRT display device 38 is connected to the display control circuit 37. Further, the interface 27 is provided with a bubble cassette input / output device 34 storing NC data constituting an NC program, a trigger switch 36a for outputting various data and a trigger signal for instructing the CPU 21 to restart the operation.
A keyboard 36 equipped with is connected.

【0008】図5はシングルブロック実行時のCPU2
1の処理を示すフローチャートである。動作が開始され
ると、ステップ101でカウンタIに1をセットし、ス
テップ102で動作を停止させ、ステップ103でスタ
ートスイッチが押されて動作指令が来るのを待つ。動作
指令が発っせられるとステップ104に進み、第I番目
のデータブロックを読み出す。ステップ105ではその
指令がデータエンドか否かを調べ、データエンドであれ
ばステップ106に進み処理を終了する。一般にはデー
タエンドではないのでステップ107に進む。
FIG. 5 shows the CPU 2 when executing a single block.
It is a flowchart which shows the process of 1. When the operation is started, the counter I is set to 1 in step 101, the operation is stopped in step 102, and the start switch is pressed in step 103 to wait for an operation command. When the operation command is issued, the process proceeds to step 104 to read the I-th data block. In step 105, it is checked whether or not the command is the data end, and if it is the data end, the process proceeds to step 106 to end the processing. Generally, it is not the data end, so the routine proceeds to step 107.

【0009】ステップ107では読み出された命令が条
件文か否かを調べる。条件文とは、IF文、WHILE
文、FOR文、CASE文等である。条件文でなければ
ステップ108に進み、次文を実行してステップ117
に進み、カウンタIを歩進させる。条件文であればステ
ップ109に進み、ステップ110でその条件を満足し
ているか否かを調べる。満足していればステップ111
に進み、満足時の続きの文が有るか否かを調べる。続き
の文が有ればステップ112に進み、満足時の実行文の
前で停止をする。そして、ステップ115で再びスター
トスイッチが押されて動作指令が来るのを待つ。動作指
令が有ればステップ116に進み、次文を実行してステ
ップ117に進み、カウンタIを歩進させてステップ1
02に戻る。ステップ111で続きの文がなければ、ス
テップ117に飛ぶ。またステップ110でその条件を
満足していなければステップ113に進み、不満足時の
実行文が有るか否かを調べる。不満足時の実行文が有れ
ばステップ114に進み不満足時の実行文の前で停止
し、ステップ115でトリガスイッチ36aが押されて
トリガ信号が出力されるのを待つ。ステップ113で不
満足時の実行文が無ければ、ステップ117に飛び、カ
ウンタIを歩進させてステップ102に戻る。
In step 107, it is checked whether the read instruction is a conditional statement. Conditional statements are IF statements and WHILE
A sentence, a FOR sentence, a CASE sentence, etc. If it is not a conditional statement, the process proceeds to step 108, the next statement is executed, and step 117
Then, the counter I is incremented. If it is a conditional sentence, the process proceeds to step 109, and it is checked in step 110 whether the condition is satisfied. Step 111 if satisfied
Proceed to and check if there is a continuation sentence for satisfaction. If there is a succeeding sentence, the process proceeds to step 112, and the process is stopped before the execution sentence at the time of satisfaction. Then, in step 115, the start switch is pressed again and the operation command is waited for. If there is an operation command, the process proceeds to step 116, the next sentence is executed and the process proceeds to step 117, and the counter I is incremented to step 1
Return to 02. If there is no subsequent sentence in step 111, the process jumps to step 117. If the condition is not satisfied in step 110, the process proceeds to step 113, and it is checked whether or not there is an executable statement at the time of dissatisfaction. If there is an executable statement at the time of dissatisfaction, the process proceeds to step 114, stops before the executable statement at the time of dissatisfaction, and waits for the trigger switch 36a to be pressed and a trigger signal to be output at step 115. If there is no executable statement at the time of dissatisfaction in step 113, the process jumps to step 117, the counter I is incremented, and the process returns to step 102.

【0010】以上の処理により条件付制御文の条件判別
部と分岐先の処理部とを別ブロックとした。例えば、I
F文のブロックは図3のように区切られ、ポインタよ
り1ブロック実行すると「条件式」が真であるならばポ
インタでシングルブロック停止し、偽であるならばポ
インタにてシングルブロック停止する。ここで、文
1、文2はNC文でもマクロ文でもかまわない。上記の
ように、条件判別と機械動作が1ブロック内で実行され
ることがないので、従来のシングルブロック実行と同じ
操作環境で構造化NC言語のプログラムデバッグが可能
になる。
By the above processing, the condition determining unit of the conditional control statement and the processing unit of the branch destination are provided as separate blocks. For example, I
Blocks of the F statement are separated as shown in FIG. 3. When one block is executed by the pointer, the single block is stopped by the pointer if the "conditional expression" is true, and the single block is stopped by the pointer if it is false. Here, sentence 1 and sentence 2 may be NC sentences or macro sentences. As described above, since the condition determination and the machine operation are not executed in one block, the structured NC language program can be debugged in the same operating environment as the conventional single block execution.

【0011】[0011]

【発明の効果】本発明は、上記の構成を有し条件付制御
文の条件判別部と分岐先の処理部とを別ブロックとして
処理するようにしたものであるから、構造化されたNC
言語の記述フォーマットを活かし、シングルブロック実
行によるNCプログラムのデバッグ作業を安全に行うこ
とができるという優れた効果がある。
As described above, the present invention has the above-mentioned configuration and processes the condition determination unit of the conditional control statement and the processing unit of the branch destination as separate blocks.
By utilizing the language description format, the NC program can be debugged safely by single block execution.

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

【図1】 構造化されていないNC言語フォーマットに
よる記述例を示す図である。
FIG. 1 is a diagram showing a description example in an unstructured NC language format.

【図2】 構造化されたNC言語フォーマットによる記
述例を示す図である。
FIG. 2 is a diagram showing a description example in a structured NC language format.

【図3】 IF文のブロックを示す図である。FIG. 3 is a diagram showing a block of an IF statement.

【図4】 全体構成を示すブロック図である。FIG. 4 is a block diagram showing an overall configuration.

【図5】 シングルブロック実行時のCPUの処理を示
すフローチャートである。
FIG. 5 is a flowchart showing the processing of the CPU when executing a single block.

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

20 数値制御装置 21 CPU 36a トリガスイッチ 20 Numerical control device 21 CPU 36a Trigger switch

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 数値制御プログラムを1ブロックずつ読
出して実行し被制御装置を制御するようにした数値制御
装置において、前記読出した数値制御プログラムの内容
が条件文であるかを判定する判定手段と、この判定手段
にて条件文であると判定されたときこの条件文の内容を
判定する内容判定手段と、この内容判定手段の結果に応
じて実行される次命令の前で動作を停止させる動作停止
手段と、次命令の実行を指示するトリガ信号を与えるト
リガ信号出力手段とを備えた数値制御装置。
1. A numerical control device for controlling a controlled device by reading and executing a numerical control program block by block, and a judging means for judging whether or not the read numerical control program content is a conditional statement. , A content determining means for determining the content of the conditional sentence when the determining means determines that the conditional statement is present, and an operation for stopping the operation before the next instruction executed according to the result of the content determining means A numerical controller provided with a stop means and a trigger signal output means for giving a trigger signal for instructing execution of the next instruction.
JP28092992A 1992-09-26 1992-09-26 Numerical controller Pending JPH06110525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28092992A JPH06110525A (en) 1992-09-26 1992-09-26 Numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28092992A JPH06110525A (en) 1992-09-26 1992-09-26 Numerical controller

Publications (1)

Publication Number Publication Date
JPH06110525A true JPH06110525A (en) 1994-04-22

Family

ID=17631900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28092992A Pending JPH06110525A (en) 1992-09-26 1992-09-26 Numerical controller

Country Status (1)

Country Link
JP (1) JPH06110525A (en)

Similar Documents

Publication Publication Date Title
KR970033457A (en) Memory means access control method and numerical control device in numerical control device
JP2002373008A (en) Numerical controller
JPH06110525A (en) Numerical controller
GB2117929A (en) A numerical controller
JPH02151909A (en) Control device for industrial machine
JP3460747B2 (en) Numerical control unit
JPS60168206A (en) Numerical control device
JPS60263209A (en) Working restart controlling method of numerically controlled machine tool
JPS63143607A (en) Numerical controller
KR900005248A (en) Numerical Control Device
JPH0354607A (en) Program restarting system for automatic operation
JPH02159605A (en) Numerical controller
JPS6149206A (en) Process operation method
KR0136142B1 (en) The method of graphic simulation using numerical control apparatus
JPH0314105A (en) Re-forward motion method for numerical controller
JPH0277904A (en) Nc data origination method
JPS61267137A (en) System for controlling interrupting action
JPS63316105A (en) Simulation device for programmable controller
JPH02300801A (en) Numerical controller
JPH09160620A (en) Numerical controller
Carter Computer numerical control software
JPH0760340B2 (en) Numerical control device user program execution method
JPH09325808A (en) Control method for driving equipment
JPH01177613A (en) System for displaying nc program
JPS62174805A (en) Numerical control system