JPH01177613A - System for displaying nc program - Google Patents

System for displaying nc program

Info

Publication number
JPH01177613A
JPH01177613A JP197988A JP197988A JPH01177613A JP H01177613 A JPH01177613 A JP H01177613A JP 197988 A JP197988 A JP 197988A JP 197988 A JP197988 A JP 197988A JP H01177613 A JPH01177613 A JP H01177613A
Authority
JP
Japan
Prior art keywords
program
subprogram
display
comment
macroprogram
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
JP197988A
Other languages
Japanese (ja)
Inventor
Mitsuto Miyata
宮田 光人
Naoki Fujita
直樹 藤田
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP197988A priority Critical patent/JPH01177613A/en
Publication of JPH01177613A publication Critical patent/JPH01177613A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To automatically display a comment sentence on a display screen by adding the comment sentence to the head part of a subprogram or a macroprogram, storing it into a memory, adding the comment sentence to the calling command of the subprogram or macroprogram and executing a display at the time of displaying an NC program. CONSTITUTION:The comment sentence is added to the head part of the subprogram or macroprogram and stored into a non-volatile memory 104 beforehand. When an NC program displaying mode is activated by operating a function key KPRM, a processor 101 displays each block of the NC program and, simultaneously, executes the display in adding the comment sentence to the calling command of the subprogram or macroprogram. Thus, even when the comment sentence is not inputted to the calling command parts of the subprogram and macroprogram, the display can be automatically executed at the time of displaying the NC program, and what kind of contents the subprogram and macroprogram having can be known by the comment sentence.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明はNCプログラム表示方式に係り、特に−メモリ
に記憶されたサブプログラムまたはマクロプログラムを
呼び出して実行する呼出し命令を含むNCプログラムの
NCプログラム表示方式に関する。
DETAILED DESCRIPTION OF THE INVENTION <Industrial Application Field> The present invention relates to an NC program display method, and particularly to an NC program including a calling instruction for calling and executing a subprogram or macro program stored in a memory. Regarding the display method.

〈従来技術〉 NCプログラムでは、その中に加工に関するコメント文
を指令できるようになっている。第5図はNCプログラ
ムの先頭部分に該NCプログラムによる加工全体のコメ
ント文CMT、を指令した例である。
<Prior Art> In the NC program, it is possible to specify a comment regarding machining. FIG. 5 is an example in which a comment statement CMT for the entire machining by the NC program is commanded at the beginning of the NC program.

このように、コメント文を指令しておけば、プログラム
表示の際に該コメント文をCRTに表示でき、これによ
りプログラムの概要が認識でき便利である。尚、コメン
ト文は一般に左閉じ括弧と右閉じ括弧で括られ、NC装
置は実行に際して該コメント文を無視し、プログラムの
表示の場合のみ該コメント文を他のNC文と共にデイス
プレィ画面に表示する。
By instructing the comment text in this way, the comment text can be displayed on the CRT when displaying the program, which is convenient because the outline of the program can be recognized. Note that a comment statement is generally enclosed in a left closing parenthesis and a right closing parenthesis, and the NC device ignores the comment statement during execution and displays the comment statement on the display screen together with other NC statements only when displaying a program.

一方、NCプログラムにおいてはサブプログラムやマク
ロプログラムを呼び出して実行することができるように
なっており、その指令方法は呼び出しのためのGコード
またはMコードとそのプログラム番号を指定することで
ある。例えばシーケンスNO,165のブロックPN○
1においてrM98  P5678Jはサブプログラム
056I」の呼び出し指令を意味し、シーケンスN O
On the other hand, in an NC program, a subprogram or a macro program can be called and executed, and the command method is to specify a G code or M code for calling and its program number. For example, block PN○ of sequence NO, 165
1, rM98 P5678J means a call command for subprogram 056I, and sequence N O
.

341のブロックPNO2においてrG65P7890
Jはマクロプログラム07890の呼び出し指令を意味
する。
rG65P7890 in block PNO2 of 341
J means a call command for macro program 07890.

ところで、作成したNCプログラムをあとでデイスプレ
ィ画面に表示してどんな加工をどのように実行するのか
等を知るためには前記のコメント文を指令しておくこと
により可能である。しかし、サブプログラムあるいはマ
クロプログラムを用いる場合には、そのサブプログラム
またはマクロプログラムがどんな加工あるいは機能を行
うものであるかはプログラム番号だけでは判断できない
By the way, it is possible to display the created NC program on the display screen later and to know what kind of processing is to be performed and how, etc. by instructing the above-mentioned comment statement. However, when using a subprogram or macro program, it is not possible to determine what kind of processing or function the subprogram or macro program performs based on the program number alone.

このためサブプログラムやマクロプログラムに関するコ
メント文を表示する必要がある。そこで、NCプログラ
ムの先頭部分にコメント文を指令した場合と同様に、従
来の方法ではサブプログラムやマクロプログラムに関す
るコメント文をたとえばNにプログラムにおけるサブプ
ログラム呼出し命令またはマクロプログラム呼出し命令
の後に入力していた。
Therefore, it is necessary to display comment statements regarding subprograms and macro programs. Therefore, in the same way as when a comment statement is specified at the beginning of an NC program, in the conventional method, a comment statement regarding a subprogram or macro program is entered after the subprogram call instruction or macro program call instruction in the program. Ta.

〈発明が解決しようとしている課題〉 しかし、サブプログラムやマクロプログラム呼び出し命
令は1つのNCプログラムの中で同じものが複数箇所で
指令されることがあり、その度毎にコメント文の表示が
必要である。このために従来の方法ではサブプログラム
呼出し命令あるいはマクロプログラム呼出し命令毎にコ
メント文を1つ1つ入力しなければならず、コメント文
人力作業に相当の時間を要するという問題があった。
<Problem to be solved by the invention> However, the same subprogram or macro program call command may be issued at multiple locations in one NC program, and a comment statement must be displayed each time. be. For this reason, in the conventional method, comments must be input one by one for each subprogram call command or macro program call command, and there is a problem in that it takes a considerable amount of time to manually write the comments.

以上から、本発明の目的は、サブプログラムやマクロプ
ログラムの呼び出し命令部分にコメント文を入力しなく
ても、コラン1〜文を自動的にデイスプレィ画面に表示
できるNCプログラム表示方式を提供することである。
In light of the above, an object of the present invention is to provide an NC program display method that can automatically display sentences from colan 1 to the display screen without inputting comment sentences in the call instruction portion of a subprogram or macro program. be.

〈課題を解決するための手段〉 第1図は本発明方式を実現するNC装置のブロック図で
ある。
<Means for Solving the Problems> FIG. 1 is a block diagram of an NC device that implements the method of the present invention.

101はプロセッサ、104は複数のNCプログラムや
サブプログラム、マクロプログラムを記−3= 憶する不揮発性メモリ、105はCRT&MDI装置−
1,05aはCRT、1o5b″′はキーボード、KP
RMはCRT 105 aをNCプログラム表示モード
にするファンクションキーである。
101 is a processor; 104 is a nonvolatile memory that stores multiple NC programs, subprograms, and macro programs; 105 is a CRT&MDI device;
1,05a is CRT, 1o5b'' is keyboard, KP
RM is a function key that puts the CRT 105a into NC program display mode.

〈作用〉 予めサブプログラムまたはマクロプログラムの先頭部分
にコメント文を付加して不揮発性メモリ104に記憶し
ておき、ファンクションキーKPRMを操作してNCプ
ログラム表示モードを起動すると、プロセッサ101は
NCプログラムの各ブロックを表示すると共にサブプロ
グラムまたはマクロプログラムの呼び出し命令に前記コ
メント文を付加して表示する。
<Operation> When a comment is added to the beginning of a subprogram or macro program and stored in the nonvolatile memory 104 in advance, and the function key KPRM is operated to start the NC program display mode, the processor 101 displays the NC program. Each block is displayed, and the comment statement is added to the subprogram or macro program call instruction.

〈実施例〉 第1図は本発明方式を実現するNC装置のブロック図で
ある。
<Embodiment> FIG. 1 is a block diagram of an NC device that implements the method of the present invention.

]、 O]はプロセッサ、102は制御プログラムを記
憶するプログラムメモリ(ROM) 、 103は処理
結果や実行中のNCプログラム等を記憶するRAM、1
04は複数のNCプログラムやサブプログラム、マクロ
プログラムを記憶する不揮発性メモリ、105はCRT
 105 aとキーボード105bを備えたC RT 
& M D I装置である。彰−ボード105bには種
々のキーが設けられており、たとえばCRTをプログラ
ム表示モードにするファンクションキーK P RM等
が設けられている。
], O] is a processor; 102 is a program memory (ROM) that stores a control program; 103 is a RAM that stores processing results, an NC program being executed, etc.;
04 is a nonvolatile memory that stores multiple NC programs, subprograms, and macro programs, and 105 is a CRT.
C RT with 105a and keyboard 105b
& MDI device. The display board 105b is provided with various keys, such as a function key KPRM for setting the CRT to a program display mode.

1、06はNCデータ入力装置、107はパルス補間器
と各軸サーボユニットを有する軸制御部、108はプロ
セッサ101から指令されたM−。
1 and 06 are NC data input devices, 107 is an axis control unit having a pulse interpolator and a servo unit for each axis, and 108 is an M- command given by the processor 101.

S−、T−機能命令等を工作機械に出力し、工作機械か
ら各種信号をプロセッサに入力するインターフェイス、
109は操作盤、110は工作機械である。
S-, T- An interface that outputs function commands etc. to the machine tool and inputs various signals from the machine tool to the processor;
109 is an operation panel, and 110 is a machine tool.

第2図は本発明にかかるNCプログラム表示処理の流れ
図である。以下、第2図の流れ図に従ってNCプログラ
ム表示処理を説明する。
FIG. 2 is a flowchart of NC program display processing according to the present invention. The NC program display process will be explained below according to the flowchart of FIG.

尚、従来の技術にて説明したNCプログラム(たとえば
第5図参照)は既に作成さ九て不揮発性メモリ104に
登録されているものとする。また、NCプログラム内の
シーケンスN00165のブロックPNO,におけるサ
ブプログラム呼出し命令に対応するサブプログラム05
678 (第4図(a))やシーケンスNO,34iの
ブロックPNO2におけるマクロプログラム呼出し命令
に対応するマクロプログラム07890 (第4図(b
))も既に作成されて不揮発性メモリ104に登録され
ているものとする。
It is assumed that the NC program (for example, see FIG. 5) described in the related art section has already been created and registered in the nonvolatile memory 104. Also, subprogram 05 corresponding to the subprogram call instruction in block PNO of sequence N00165 in the NC program.
678 (FIG. 4(a)) and the macro program 07890 (FIG. 4(b)) corresponding to the macro program call instruction in block PNO2 of sequence NO, 34i.
)) has already been created and registered in the nonvolatile memory 104.

オペレータはNCプログラム01234を指定すると共
にキーボード105b上のファンクションキーKPRM
を押圧して、CRT 105 aをプログラム表示モー
ドにする。すると、プロセッサ101は不揮発性メモリ
104に格納されているNCプログラムの先頭から1ブ
ロック読み出してくる(ステッピ201)。尚、コメン
ト表示要求は操作盤109等の外部装置から発生しても
よい。
The operator specifies NC program 01234 and presses the function key KPRM on the keyboard 105b.
Press to put the CRT 105a into program display mode. Then, the processor 101 reads one block from the beginning of the NC program stored in the nonvolatile memory 104 (step 201). Note that the comment display request may be generated from an external device such as the operation panel 109.

1ブロツク分のNC文を読み取れば、プロセッサ101
は該NC文がプログラムエンド(たとえばM2O)かチ
エツクし、M 30であればNCプログラム表示処理を
終了するCステップ202)。
If one block worth of NC statements is read, the processor 101
Then, it is checked whether the NC statement is the program end (for example, M2O), and if it is M30, the NC program display process is ended (C step 202).

しかし、プログラムエンドでなければ、1ブロツク分の
NC文の内容をCRT105aに表示する(ステップ2
03)。次に、読み出した1ブロツク分のNC文の内容
がサブプログラムまたはマクロプログラムの呼び出し命
令(例えばサブプログラムの場合はM2S、マクロプロ
グラムの場合は065等)かどうか判断し、呼び出し命
令でなければステップ201からの処理を繰り返す(ス
テップ204)。
However, if it is not the program end, the contents of one block of NC statements are displayed on the CRT 105a (step 2
03). Next, it is determined whether the content of the read one block of NC statement is a subprogram or macro program call instruction (for example, M2S for a subprogram, 065 for a macro program, etc.), and if it is not a call instruction, step The process from 201 is repeated (step 204).

呼び出し命令であれば、該当するサブプログラムまたは
マクロプログラムの先頭の1ブロツクを読み出しくステ
ップ205)、そのブロックがコメント文を含むかどう
か、換言すれば左閉じ括弧と右閉じ括弧()により囲ま
れた文が存在するかどうか判断し、コメント文が存在し
ていなけ九ば、ステップ201以降の処理を繰り返す(
ステップ206)。
If it is a call instruction, read the first block of the corresponding subprogram or macro program (Step 205), check whether the block contains a comment statement, in other words, whether the block is enclosed by a left closing parenthesis and a right closing parenthesis (). If the comment sentence does not exist, the process from step 201 onward is repeated (
Step 206).

コメント文が存在していれば、例えばサブプログラム0
5678 (第4図(a))の呼出し命令であれば、コ
メント文CMT、r(PARRET、   −7− CHANGE)J をCRT105aに表示する。
If a comment statement exists, for example, subprogram 0
5678 (FIG. 4(a)), the comment sentence CMT,r(PARRET, -7- CHANGE)J is displayed on the CRT 105a.

又、マクロプログラム07890 (第4図(b))の
呼出し命令であれば、コメント文CMT2r(OFFS
ET  MESUARE)J をCR,T105aに表
示しく第3図参照、ステップ207)、以後ステップ2
01以降の処理を繰り返す。
Also, if it is a call instruction for macro program 07890 (Fig. 4(b)), comment statement CMT2r (OFFS
Please display ET MESUARE) J on CR, T105a (see Figure 3, step 207), and hereafter step 2.
Repeat the process from 01 onwards.

〈発明の効果〉 以上本発明によれば、サブプログラムまたはマクロプロ
グラムの先頭部分にコメント文を付加してメモリに記憶
しておき、NCプログラムの表示に際してサブプログラ
ムまたはマクロプログラムの呼び出し命令に該コメント
文を付加して表示するように構成したから、サブプログ
ラムやマクロプログラムの呼び出し命令部分にコメント
文を入力しておかなくても、NCプログラム表示に際し
て自動的に表示でき、サブプログラムおよびマクロプロ
グラムがどの様な内容のものであるかを該コメント文に
より知ることができるようになる。
<Effects of the Invention> According to the present invention, a comment statement is added to the beginning of a subprogram or macro program and stored in memory, and the comment is added to the calling command of the subprogram or macro program when displaying the NC program. Since the structure is configured to display additional statements, the comment statement can be automatically displayed when displaying the NC program without having to enter the comment statement in the call command part of the subprogram or macro program, and the subprogram or macro program can be displayed automatically. It becomes possible to know what kind of content it is based on the comment text.

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

第1図は本発明方式を実現するNC装置のプロツク図、 第2図は本発明方式にかかるNCプログラム表示処理の
流れ図、 第3図は本発明方式のNCプログラムの表示例、第4図
は本発明方式のサブプログラム及びマクロプログラムの
例、 第5図は従来方式のNCプログラムの表示例である。 101・・プロセッサ、 104・・不揮発性メモリ、 105・・CRT&MDI装置、 105a・・CRT、 105b・・キーボード105b、 K P RM・・ファンクションキー
Fig. 1 is a block diagram of an NC device that implements the method of the present invention, Fig. 2 is a flowchart of the NC program display processing according to the method of the present invention, Fig. 3 is a display example of an NC program according to the method of the present invention, and Fig. 4 is a Examples of subprograms and macro programs according to the present invention. FIG. 5 is a display example of a conventional NC program. 101...Processor, 104...Nonvolatile memory, 105...CRT&MDI device, 105a...CRT, 105b...Keyboard 105b, KP RM...Function key

Claims (1)

【特許請求の範囲】 サブプログラムまたはマクロプログラムを呼び出して実
行する呼出し命令を含むNCプログラムのNCプログラ
ム表示方式において サブプログラムまたはマクロプログラムの先頭部分にコ
メント文を付加しておき、NCプログラムの表示に際し
てサブプログラムまたはマクロプログラムの呼び出し命
令にコメント文を付加して表示することを特徴とするN
Cプログラム表示方式。
[Claims] In an NC program display method for an NC program that includes a call instruction that calls and executes a subprogram or macro program, a comment statement is added to the beginning of the subprogram or macro program, and when displaying the NC program, N characterized in that a comment statement is added to and displayed on a subprogram or macro program call instruction.
C program display method.
JP197988A 1988-01-08 1988-01-08 System for displaying nc program Pending JPH01177613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP197988A JPH01177613A (en) 1988-01-08 1988-01-08 System for displaying nc program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP197988A JPH01177613A (en) 1988-01-08 1988-01-08 System for displaying nc program

Publications (1)

Publication Number Publication Date
JPH01177613A true JPH01177613A (en) 1989-07-13

Family

ID=11516648

Family Applications (1)

Application Number Title Priority Date Filing Date
JP197988A Pending JPH01177613A (en) 1988-01-08 1988-01-08 System for displaying nc program

Country Status (1)

Country Link
JP (1) JPH01177613A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05265527A (en) * 1992-03-16 1993-10-15 Fanuc Ltd Operation program preparing method and execution method
JP2021068005A (en) * 2019-10-18 2021-04-30 ファナック株式会社 Programming support device, programming support system, and programming support method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05265527A (en) * 1992-03-16 1993-10-15 Fanuc Ltd Operation program preparing method and execution method
JP2021068005A (en) * 2019-10-18 2021-04-30 ファナック株式会社 Programming support device, programming support system, and programming support method

Similar Documents

Publication Publication Date Title
US4204253A (en) Device for generating and correcting a user program
JPH0219906A (en) Numerical control program correcting system for interactive numerical controller
JPH01177613A (en) System for displaying nc program
JPH07120285B2 (en) How to use the syntax checker and text editor
JPH0554277A (en) Plant monitor device
JPH03257508A (en) Nc automatic programming system for interactive language
JPS6149209A (en) Program execution system of numerical controller
JPH045703A (en) Sequence program generating device
JPS6165314A (en) Graphic display method and apparatus for computer numerical controller
JPH0354607A (en) Program restarting system for automatic operation
JP3327641B2 (en) Numerical control unit
JPH0350672A (en) Interactive type text editor
JPH06301408A (en) Comment adding device of programmable controller
JPH07234714A (en) Numerical controller
JPH09160611A (en) Programmable controller
JPH01282609A (en) Method for setting nc data output form
JPH04155540A (en) Program correcting system by interactive debugger
JP3283055B2 (en) Program editing device
JPH03150603A (en) Set data preserving system
JPH01244501A (en) Pc trace control system
JPH01291307A (en) Working program generating system
JP3221509B2 (en) Robot controller
JPH06324717A (en) Edit system for sequence program
JPH036527B2 (en)
JPH03242736A (en) Abnormality processing system