JPH06149336A - Nc program editing method - Google Patents

Nc program editing method

Info

Publication number
JPH06149336A
JPH06149336A JP29994492A JP29994492A JPH06149336A JP H06149336 A JPH06149336 A JP H06149336A JP 29994492 A JP29994492 A JP 29994492A JP 29994492 A JP29994492 A JP 29994492A JP H06149336 A JPH06149336 A JP H06149336A
Authority
JP
Japan
Prior art keywords
sequence number
program
block
value
registered
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
JP29994492A
Other languages
Japanese (ja)
Inventor
Toshiaki Otsuki
俊明 大槻
Haruhiko Kozai
治彦 香西
Shinichiro Fuse
伸一郎 布施
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 JP29994492A priority Critical patent/JPH06149336A/en
Publication of JPH06149336A publication Critical patent/JPH06149336A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To provide an NC program editing method which can improve the automatic inserting function of the sequence numbers and can easily edit an NC program. CONSTITUTION:An NC program is loaded for insertion of the sequence numbers in a program loading step, and the sequence number initial value N0, the sequence number increase value DELTAn, the major section sequence number increase value DELTAN, and the value 0 of a counter (i) are set in a storage part in an initial setting step. Then it is decided whether a sequence number is registered for each part program or not in a deciding step. If so, the increase value DELTAn is successively added to a sequence number N' in a 1st sequence number setting step. If not, the initial value N0 is defined as a head block and the increase value DELTAn is successively added in a 2nd setting step. Then the value obtained by applying the integer multiplication to the increase value DELTAN is added when a process end block is included in the part program in a 3rd setting step.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はNCプログラム編集方法
に関し、特にNCプログラムにおけるシーケンス番号の
自動挿入機能に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an NC program editing method, and more particularly to a function for automatically inserting a sequence number in an NC program.

【0002】[0002]

【従来の技術】近年、CNC装置における記憶装置およ
び外部編集機器も格段に進歩し高度化しており、それに
伴い取り扱うCNCプログラムの数も飛躍的に増大して
いる。しかるに従来技術によるCNC装置においては、
NCプログラムの所定のブロック(1つの指令単位)の
先頭番地にNを記述しNに続けて5桁以内の数値(整
数)1〜99999からなるシーケンス番号を記述す
る。このシーケンス番号は一般的に加工の順序にしたが
って若い順にプログラムの要所要所、例えば工具交換開
始のときまたはテーブルを移動し新しい加工面に移ると
き等に記述され、作成されたNCプログラムの再編集ま
たは検索等を行うときに利用される。
2. Description of the Related Art In recent years, a storage device and an external editing device in a CNC device have been remarkably advanced and advanced, and accordingly, the number of CNC programs to be handled has been dramatically increased. However, in the conventional CNC device,
N is described at the head address of a predetermined block (one command unit) of the NC program, and N is followed by a sequence number consisting of numerical values (integers) 1 to 99999 within 5 digits. In general, this sequence number is described in the order of youngness in the younger order of the program according to the machining order, for example, at the time of starting the tool change or when moving the table and moving to a new machining surface, and re-editing the created NC program. It is also used when searching.

【0003】NCプログラムにおけるシーケンス番号の
自動挿入機能としては、パーソナルコンピュータ(P
C)等により開発されたものがあるが、これは新規にN
Cプログラムを登録するときにシーケンス番号の初期値
と増分値を予め設定し、NCプログラムの各ブロックの
先頭番地にシーケンス番号を自動的に付加するものであ
る。
As an automatic insertion function of the sequence number in the NC program, a personal computer (P
There are some developed by C) etc., but this is a new N
The initial value and the increment value of the sequence number are preset when the C program is registered, and the sequence number is automatically added to the head address of each block of the NC program.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、登録さ
れたNCプログラムは前述のように多数のプログラムか
らなり、プログラム修正が必要とされ再編集するとき、
先に登録したNCプログラムのシーケンス番号を大幅に
修正する必要が生じる。このような場合、上述の従来技
術によるNCプログラムにおけるシーケンス番号の自動
挿入機能によれば、すでに登録済のNCプログラムにお
ける各ブロック毎のシーケンス番号を、オペレータが自
ら操作して挿入しまたは変更して再編集しなければなら
ず、その再編集操作に多大な時間と労力を費やすという
問題がある。
However, the registered NC program is composed of a large number of programs as described above, and when the program needs to be modified and re-edited,
It is necessary to greatly modify the sequence number of the NC program registered earlier. In such a case, according to the automatic insertion function of the sequence number in the NC program according to the above-mentioned conventional technique, the operator manually operates to insert or change the sequence number for each block in the already registered NC program. There is a problem that it has to be re-edited, and that re-editing operation consumes a great deal of time and labor.

【0005】本発明は上記問題点に鑑み、NCプログラ
ムにおけるシーケンス番号の自動挿入機能において、オ
ペレータがその編集操作に多大な時間と労力を費やすこ
となく容易に編集でき、かつNCプログラムを読み易く
するNCプログラム編集方法を提供することを目的とす
る。
In view of the above problems, the present invention makes it easy for an operator to edit a sequence number in an automatic insertion function of an NC program without spending a lot of time and effort on the editing operation, and makes the NC program easy to read. It is an object to provide an NC program editing method.

【0006】[0006]

【課題を解決するための手段】図1は本発明のNCプロ
グラム編集方法の基本処理を示すフローチャートであ
る。前記目的を達成する本発明のNCプログラム編集方
法は、そのNCプログラムの編集方法において、下記の
各段階から構成される。 (1)プログラムロード段階:シーケンス番号を挿入す
る1以上のパートプログラムからなるNCプログラムを
予めNCプログラム編集装置にロードする。 (2)初期設定段階:NCプログラム編集装置内の記憶
部にシーケンス番号初期値N0 、シーケンス番号増分値
Δnおよび大区分シーケンス番号増分値ΔNの各値を設
定する。 (3)判別段階:NCプログラムをなすパートプログラ
ム毎にシーケンス番号が登録されているか否かを判別す
る。 (4)シーケンス番号第1設定段階:判別段階の判別結
果、パートプログラム内にシーケンス番号N’が登録さ
れているブロックが有るときは、その登録されたシーケ
ンス番号N’はそのままとし、そのシーケンス番号N’
に順次続くブロックであってシーケンス番号が登録され
ていないブロックに、そのシーケンス番号N’と前記設
定したシーケンス番号増分値Δnとを順次加算した値を
新たなシーケンス番号として付加する。 (5)シーケンス番号第2設定段階:判別段階の判別結
果、パートプログラム内にシーケンス番号N’が登録さ
れているブロックが無いときは、そのパートプログラム
の先頭ブロックに前記設定したシーケンス番号初期値N
0 をシーケンス番号として付加し、その先頭ブロックに
順次続くブロックに、そのシーケンス番号初期値N0
前記設定したシーケンス番号増分値Δnとを順次加算し
た値を新たなシーケンス番号として付加する。 (6)シーケンス番号第3設定段階:パートプログラム
内に所定のプログラム工程が終了するコードを示す工程
終了ブロックが有るときは、その工程終了ブロックに順
次続くブロックに、前記設定した大区分シーケンス番号
増分値(ΔN)を整数倍した値を加算して新たなシーケ
ンス番号として付加する。
FIG. 1 is a flow chart showing the basic processing of the NC program editing method of the present invention. The NC program editing method of the present invention which achieves the above object is composed of the following steps in the NC program editing method. (1) Program loading step: An NC program consisting of one or more part programs for inserting sequence numbers is loaded in advance into the NC program editing device. (2) Initial setting stage: The sequence number initial value N 0 , the sequence number increment value Δn, and the large section sequence number increment value ΔN are set in the storage unit in the NC program editing device. (3) Discrimination stage: It is discriminated whether or not a sequence number is registered for each part program forming the NC program. (4) Sequence number first setting stage: As a result of the discrimination in the discrimination stage, when there is a block in which the sequence number N'is registered in the part program, the registered sequence number N'is left as it is and the sequence number N '
A value obtained by sequentially adding the sequence number N ′ and the set sequence number increment value Δn is added as a new sequence number to a block successively following the sequence number and the sequence number is not registered. (5) Sequence number second setting step: As a result of the determination in the determination step, when there is no block in which the sequence number N'is registered in the part program, the sequence number initial value N set in the head block of the part program is set.
0 is added as a sequence number, and a value obtained by sequentially adding the sequence number initial value N 0 and the set sequence number increment value Δn is added to a block successively following the first block as a new sequence number. (6) Third step of setting sequence number: When there is a process end block indicating a code for ending a predetermined program process in the part program, the set major division sequence number increment is added to the blocks successively following the process end block. A value obtained by multiplying the value (ΔN) by an integer is added and added as a new sequence number.

【0007】[0007]

【作用】本発明のNCプログラム編集方法は、NCプロ
グラム内に予めシーケンス番号が登録されていないとき
は、シーケンス番号初期値N0 を先頭ブロックのシーケ
ンス番号とし、次のブロックからシーケンス番号増分値
Δnを順次加算した新たなシーケンス番号を付加し、N
Cプログラム内に予めシーケンス番号が登録されている
ときは、登録されたシーケンス番号N’を残し、シーケ
ンス番号N’に続くブロックにシーケンス番号が付加さ
れていないときはそのブロックからシーケンス番号増分
値Δnを順次加算した新たなシーケンス番号を付加す
る。NCプログラムをなすパートプログラム内に所定の
プログラム工程が終了するコードを示す工程終了ブロッ
クが有るときは、大区分シーケンス番号増分値ΔNを整
数倍した値を加算して新たなシーケンス番号として付加
するる。それゆえ、NCプログラム内にプログラムの内
容を考慮してシーケンス番号が付加され、NCプログラ
ムが読み易くなる。また、シーケンス番号がすでに登録
されているNCプログラムに対してもそのシーケンス番
号を残したまま、あるいは書き換えて新たにシーケンス
番号を自動挿入できるのでシーケンス番号挿入に要する
時間と労力を大幅に削減できる。
According to the NC program editing method of the present invention, when the sequence number is not registered in advance in the NC program, the sequence number initial value N 0 is used as the sequence number of the first block, and the sequence number increment value Δn from the next block. N is added by adding a new sequence number
When the sequence number is registered in advance in the C program, the registered sequence number N'is left, and when the sequence number is not added to the block following the sequence number N ', the sequence number increment value Δn from that block is added. Is added in sequence to add a new sequence number. When there is a process end block indicating a code for ending a predetermined program process in the part program forming the NC program, a value obtained by multiplying the major division sequence number increment value ΔN by an integer is added and added as a new sequence number. . Therefore, a sequence number is added to the NC program in consideration of the contents of the program, and the NC program is easy to read. Further, even for an NC program in which a sequence number has already been registered, a new sequence number can be automatically inserted with the sequence number left or rewritten, so that the time and labor required for inserting the sequence number can be greatly reduced.

【0008】[0008]

【実施例】図2は本発明の実施例によるNCプログラム
編集方法においてシーケンス番号有りの処理を示すフロ
ーチャートである。このNCプログラム編集方法の処理
は下記の各ステップから構成される。なお下記において
Sに続く数字はステップ番号を示す。 (ステップS1):オペレータは予めシーケンス番号を
自動挿入する多数のNCプログラム、例えばワーク加工
または工具交換のNCプログラムを多数含む所定長のN
CプログラムをNC装置にロードし、シーケンス番号初
期値N0 、シーケンス番号増分値Δnおよび大区分シー
ケンス番号増分値ΔNをそれぞれ設定し、NC装置内の
カウンタiの値を0に設定する。ここで、シーケンス番
号初期値N0 とは前記所定長のNCプログラムの先頭に
記述されたブロックに挿入するシーケンス番号を示す値
である。シーケンス番号増分値Δnとはそのシーケンス
番号のブロックに順次続くブロックのシーケンス番号に
順次加算される増分値である。大区分シーケンス番号増
分値ΔNとは前記所定長のNCプログラム内におけるE
OB(エンド・オブ・ブロック)で区切られる個々のN
Cプログラム(以下パートプログラムという)におけ
る、例えば工具交換または加工工程の切り換わり直後の
NCプログラムの先頭ブロックにプログラムの内容が変
わったことを識別するために付加するシーケンス番号の
増分値である。
FIG. 2 is a flow chart showing the processing with a sequence number in the NC program editing method according to the embodiment of the present invention. The processing of this NC program editing method includes the following steps. In the following, the number following S indicates a step number. (Step S1): The operator has a predetermined length of N program including a large number of NC programs for automatically inserting sequence numbers in advance, for example, NC programs for workpiece machining or tool exchange.
The C program is loaded into the NC device, the sequence number initial value N 0 , the sequence number increment value Δn, and the major segment sequence number increment value ΔN are set, and the value of the counter i in the NC device is set to 0. Here, the sequence number initial value N 0 is a value indicating the sequence number to be inserted in the block described at the beginning of the NC program of the predetermined length. The sequence number increment value Δn is an increment value that is sequentially added to the sequence numbers of blocks successively following the block of that sequence number. The large sequence number increment value ΔN means E in the NC program of the predetermined length.
Individual N separated by OB (End of Block)
In a C program (hereinafter referred to as a part program), for example, it is an increment value of a sequence number added to identify that the content of the program has changed in the head block of the NC program immediately after the tool change or the switching of the machining process.

【0009】(ステップS2):NC装置のプロセッサ
は上記設定されたシーケンス番号初期値N0 、シーケン
ス番号増分値Δnおよび大区分シーケンス番号増分値Δ
Nの各値を記憶部の対応する各レジスタに格納し、大区
分シーケンス番号増分値N0のレジスタに格納されたデ
ータをシーケンス番号Nの値を格納するレジスタのデー
タとして書き込む。 (ステップS3):前記所定長のNCプログラム内の何
れかのブロックにシーケンス番号の記述があるか否か
を、例えばNCプログラム内の各ブロックの先頭番地
に、少なくとも1つNが記述されているか否かを判別す
ることにより検索し、そのNCプログラム内にシーケン
ス番号の記述が有りと判別されたときはステップS4へ
進み、無しと判別されたときはステップS21へ進む。
(Step S2): The processor of the NC unit sets the sequence number initial value N 0 , the sequence number increment value Δn, and the large segment sequence number increment value Δ set as described above.
Each value of N is stored in each corresponding register of the storage unit, and the data stored in the register of the large sequence number increment value N 0 is written as the data of the register storing the value of the sequence number N. (Step S3): Whether or not any block in the NC program of the predetermined length has a sequence number description, for example, at least one N is described at the head address of each block in the NC program. When it is determined that the sequence number is described in the NC program, the process proceeds to step S4, and if it is determined that the sequence number is not present, the process proceeds to step S21.

【0010】(ステップS4):NCプログラムをなす
パートプログラムに対し順次そのパートプログラム内に
シーケンス番号例えばN’がすでに登録されているか否
かをステップS3と同様に判別し、登録されているとき
はステップS5へ、登録されていないときはステップS
8へそれぞれ進む。 (ステップS5):NCプログラムをなすパートプログ
ラムに対し順次そのパートプログラム内に工程の終了を
示すコード、例えばM60が有るか否かを判別し、無し
のときはステップS6へ進み、有りのときはステップS
34へ進む。 (ステップS6):そのパートプログラムにおける最初
のブロックの先頭番地にシーケンス番号Nを挿入する。 (ステップS7):N=N+Δnを算出し、ステップS
11へ進む。
(Step S4): It is judged in the same manner as in step S3 whether or not a sequence number such as N'is already registered in the part program forming the NC program in sequence. If it is registered, Step S5, if not registered, step S5
Go to 8 respectively. (Step S5): For the part program forming the NC program, it is sequentially determined whether or not there is a code indicating the end of the process in the part program, for example, M60, and if there is not, the process proceeds to step S6, and if there is, Step S
Proceed to 34. (Step S6): The sequence number N is inserted at the head address of the first block in the part program. (Step S7): N = N + Δn is calculated, and step S
Proceed to 11.

【0011】(ステップS8):NCプログラムをなす
パートプログラムに対し順次そのパートプログラム内に
工程の終了を示すコード、例えばM60が有るか否かを
判別し、無しのときはステップS9へ進み、有りのとき
はステップS44へ進む。 (ステップS9):シーケンス番号N’をそのまま挿入
する。 (ステップS10):N=N’+Δnを算出し、ステッ
プS11へ進む。 (ステップS11):そのパートプログラムがそのNC
プログラムの最後のパートプログラムか否かを、そのパ
ートプログラムの最終ブロックにM30の指令が有るか
否かにより判別し、有りのときは終了し、無しのときは
ステップS4へ戻る。
(Step S8): For the part program forming the NC program, it is sequentially judged whether or not there is a code indicating the end of the process, for example, M60, in the part program. If so, the process proceeds to step S44. (Step S9): The sequence number N'is inserted as it is. (Step S10): N = N '+ Δn is calculated, and the process proceeds to step S11. (Step S11): The part program is the NC
Whether or not it is the last part program of the program is determined by whether or not there is an instruction of M30 in the last block of the part program. If it is present, the process ends. If it is not present, the process returns to step S4.

【0012】図3は本発明の実施例によるNCプログラ
ム編集方法においてシーケンス番号無しの処理を示すフ
ローチャートである。 (ステップS21):NCプログラムをなすパートプロ
グラムに対し順次そのパートプログラム内に工程の終了
を示すコード、例えばM60が有るか否かを判別し、無
しのときはステップS22へ進み、有りのときはステッ
プS24へ進む。 (ステップS22):そのパートプログラムにおける最
初のブロックの先頭番地にシーケンス番号Nを挿入す
る。 (ステップS23):N=N+Δnを算出し、ステップ
S27へ進む。 (ステップS24):カウンタiの値に1を加算する。 (ステップS25):そのパートプログラムにおける最
初のブロックの先頭番地にシーケンス番号Nを挿入す
る。 (ステップS26):N=N0 +ΔN×iを算出しステ
ップS27へ進む。 (ステップS27):そのパートプログラムがそのNC
プログラムの最後のパートプログラムか否かを、そのパ
ートプログラムの最終ブロックにM30の指令が有るか
否かにより判別し、YESのときは終了し、NOのとき
はステップS21へ戻る。
FIG. 3 is a flow chart showing a process without a sequence number in the NC program editing method according to the embodiment of the present invention. (Step S21): For the part program forming the NC program, it is sequentially judged whether or not there is a code indicating the end of the process, for example, M60, in the part program. If there is no code, the process proceeds to step S22, and if there is, a code. It proceeds to step S24. (Step S22): The sequence number N is inserted at the head address of the first block in the part program. (Step S23): N = N + Δn is calculated, and the process proceeds to step S27. (Step S24): 1 is added to the value of the counter i. (Step S25): The sequence number N is inserted at the head address of the first block in the part program. (Step S26): N = N 0 + ΔN × i is calculated, and the process proceeds to step S27. (Step S27): The part program is the NC
Whether or not it is the last part program of the program is determined by whether or not there is an instruction of M30 in the last block of the part program. If YES, the process ends. If NO, the process returns to step S21.

【0013】以上シーケンス番号が登録されていないN
Cプログラムにのみ大区分シーケンス番号増分値が付加
される場合を説明したが、シーケンス番号が登録されて
いるNCプログラムに対しても大区分シーケンス番号増
分値が付加される場合がある。この場合の処理について
図2を参照にして以下に説明する。シーケンス番号が登
録されているNCプログラムに対しても大区分シーケン
ス番号増分値を付加する場合は、前述のステップS4の
次にその判別結果が何れの場合でも、処理中のパートプ
ログラム内に工程終了を示すコードが有るか否かを判別
するための前述のステップS5またはステップS8を実
行する。
N for which the sequence number is not registered
Although the case where the major section sequence number increment value is added only to the C program has been described, the major section sequence number increment value may be added to the NC program in which the sequence number is registered. The processing in this case will be described below with reference to FIG. In the case of adding the large segment sequence number increment value to the NC program in which the sequence number is registered, the process end in the part program being processed regardless of the determination result after step S4. The above step S5 or step S8 for determining whether or not there is a code indicating

【0014】一方において、ステップS4でシーケンス
番号が登録されていないと判別されたときで、かつステ
ップS5の判別結果、処理中のパートプログラム内に工
程終了を示すコードが有りと判別されたときは下記の処
理を実行する。 (ステップS34):カウンタiの値に1を加算する。 (ステップS35):そのパートプログラムにおける最
初のブロックの先頭番地にシーケンス番号Nを挿入す
る。 (ステップS36):N=N+ΔN×iを算出後ステッ
プS11へ進む。 ステップS5の判別結果でそのパートプログラム内に工
程終了を示すコードが無しのときは前述のステップS
6、ステップS7を実行する。
On the other hand, when it is determined in step S4 that the sequence number is not registered, and when it is determined in step S5 that there is a code indicating the end of the process in the part program being processed, Perform the following process. (Step S34): 1 is added to the value of the counter i. (Step S35): The sequence number N is inserted at the head address of the first block in the part program. (Step S36): After calculating N = N + ΔN × i, the process proceeds to step S11. If there is no code indicating the process end in the part program as a result of the determination in step S5, the above-mentioned step S
6. Execute step S7.

【0015】他方において、ステップS4でシーケンス
番号が登録されていると判別されたときで、かつステッ
プS8の判別結果、処理中のパートプログラム内に工程
終了を示すコードが有りと判別されたときは下記の処理
を実行する。 (ステップS44):カウンタiの値に1を加算する。 (ステップS45):シーケンス番号N’をそのまま挿
入する。 (ステップS46):N=N’+ΔN×iを算出後ステ
ップS11へ進む。 ステップS8の判別結果でそのパートプログラム内に工
程終了を示すコードが無しのときは前述のステップS
9、ステップS10を実行する。
On the other hand, when it is determined in step S4 that the sequence number is registered, and when it is determined in step S8 that there is a code indicating the end of the process in the part program being processed, Perform the following process. (Step S44): 1 is added to the value of the counter i. (Step S45): The sequence number N'is inserted as it is. (Step S46): After calculating N = N '+ ΔN × i, the process proceeds to step S11. If there is no code indicating the process end in the part program as a result of the determination in step S8, the above step S
9. Execute step S10.

【0016】しかるに、ステップS3において、NCプ
ログラム内にシーケンス番号の記述がある場合でもオペ
レータが判断してNCプログラムのシーケンス番号を一
括して編集し直したいときは、ステップS21へ移行す
ることも可能である。この場合、最初に上述のシーケン
ス番号自動挿入モードを半自動挿入モードに切り換え
る。このモード変更は、例えばNC装置のCRT画面上
にファンクションキーを表示し、オペレータが自動挿入
モードか半自動挿入モードかを選択して切り換え、自動
挿入モードのときは上述のフローチャートのステップS
3を実行し、半自動モードのときはシーケンス番号が予
め登録されているNCプログラムに対し、新規にシーケ
ンス番号を書き換えたいか否かを、さらに設けたファン
クションキーで選択し、新規にシーケンス番号を書き換
えたいときは上述のステップS21に移行し書き換えた
くないときはステップS4へ移行するように処理され
る。また、これらのファンクションキーはNC装置内部
の所定のパラメータのデータを1または0に設定するこ
とによっても実現できる。
However, in step S3, if the operator decides to edit the sequence numbers of the NC program all together, even if the NC program has a sequence number description, the sequence can be shifted to step S21. Is. In this case, the sequence number automatic insertion mode described above is first switched to the semi-automatic insertion mode. For this mode change, for example, a function key is displayed on the CRT screen of the NC device, and the operator selects and switches between the automatic insertion mode and the semi-automatic insertion mode. In the automatic insertion mode, step S of the above-mentioned flowchart.
3 is executed, and in the semi-automatic mode, select whether or not you want to rewrite the sequence number for the NC program in which the sequence number is registered in advance with the function key provided, and rewrite the sequence number newly. If desired, the process proceeds to step S21 described above, and if it is not desired to rewrite, the process proceeds to step S4. Further, these function keys can also be realized by setting data of a predetermined parameter inside the NC device to 1 or 0.

【0017】図4はシーケンス番号が付加されていない
NCプログラムにシーケンス番号を挿入するNCプログ
ラム生成過程の例を示す図であり、(A)は生成前の、
(B)は生成後のNCプログラムを示す図である。
FIG. 4 is a diagram showing an example of an NC program generation process for inserting a sequence number into an NC program to which a sequence number is not added. FIG.
(B) is a diagram showing the NC program after generation.

【0018】図4は、シーケンス番号初期値N0 =10
00、シーケンス番号増分値Δn=10、大区分シーケ
ンス番号増分値ΔN=1000の場合のシーケンス番号
の自動挿入例を示す。パートプログラムのブロックの先
頭アドレスが1000となり、以下増分10が加算さ
れ、M60の工具交換の工程終了指令のブロックの直後
のブロックはシーケンス番号初期値N0 =1000に大
区分シーケンス番号増分値ΔN=1000とカウンタi
の乗算値とを加算した値がシーケンス番号として記述さ
れることが判る。
FIG. 4 shows the sequence number initial value N 0 = 10.
00, a sequence number increment value Δn = 10, and a major segment sequence number increment value ΔN = 1000, an example of automatic insertion of sequence numbers will be shown. The start address of the block of the part program becomes 1000, and the increment 10 is added to the block. Immediately after the block of the M60 tool change process command, the block immediately after the block has a sequence number initial value N 0 = 1000. 1000 and counter i
It can be seen that the value obtained by adding the product of and is written as the sequence number.

【0019】図5はシーケンス番号が付加されているN
Cプログラムにシーケンス番号を挿入するNCプログラ
ム生成過程の例を示す図であり、(A)は生成前の、
(B)は生成後のNCプログラムを示す図である。
FIG. 5 shows N with sequence numbers added.
It is a figure which shows the example of the NC program production | generation process which inserts a sequence number in C program, (A) before production | generation.
(B) is a diagram showing the NC program after generation.

【0020】図5は、シーケンス番号初期値N’=10
0および200がパートプログラム中に記述されている
場合で、シーケンス番号増分値Δn=10の場合のシー
ケンス番号の自動挿入例を示す。このNCプログラムは
M30のエンド・オブ・テープで終了する。
FIG. 5 shows the sequence number initial value N '= 10.
An example of automatic insertion of sequence numbers when 0 and 200 are described in the part program and the sequence number increment value Δn = 10 is shown. This NC program ends with the M30 End of Tape.

【0021】[0021]

【発明の効果】以上説明したように本発明のNCプログ
ラム編集方法によれば、NCプログラムにおけるシーケ
ンス番号の自動挿入機能が改善され、オペレータがその
編集操作に多大な時間と労力を費やすことのなく容易に
編集でき、かつNCプログラムの内容毎にシーケンス番
号により識別できるのでNCプログラムが読み易くなり
検索等が容易となる。
As described above, according to the NC program editing method of the present invention, the automatic sequence number insertion function in the NC program is improved, and the operator does not spend a great deal of time and effort on the editing operation. Since it can be easily edited and can be identified by the sequence number for each content of the NC program, the NC program is easy to read and search or the like is easy.

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

【図1】本発明のNCプログラム編集方法の基本処理を
示すフローチャートである。
FIG. 1 is a flowchart showing basic processing of an NC program editing method of the present invention.

【図2】本発明の実施例によるNCプログラム編集方法
においてシーケンス番号有りの処理を示すフローチャー
トである。
FIG. 2 is a flowchart showing processing with a sequence number in the NC program editing method according to the embodiment of the present invention.

【図3】本発明の実施例によるNCプログラム編集方法
においてシーケンス番号無しの処理を示すフローチャー
トである。
FIG. 3 is a flowchart showing processing without a sequence number in the NC program editing method according to the embodiment of the present invention.

【図4】シーケンス番号が付加されていないNCプログ
ラムにシーケンス番号を挿入するNCプログラム生成過
程の例を示す図であり、(A)は生成前の、(B)は生
成後のNCプログラムを示す図である。
FIG. 4 is a diagram showing an example of an NC program generation process of inserting a sequence number into an NC program to which a sequence number is not added, where (A) shows the NC program before generation and (B) shows the NC program after generation. It is a figure.

【図5】シーケンス番号が付加されているNCプログラ
ムにシーケンス番号を挿入するNCプログラム生成過程
の例を示す図であり、(A)は生成前の、(B)は生成
後のNCプログラムを示す図である。
FIG. 5 is a diagram showing an example of an NC program generation process of inserting a sequence number into an NC program to which a sequence number is added, (A) showing an NC program before generation and (B) showing an NC program after generation. It is a figure.

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

1…プログラムロード段階 2…初期設定段階 3…判別段階 4…シーケンス番号第1設定段階 5…シーケンス番号第2設定段階 6…シーケンス番号第3設定段階 1 ... Program loading stage 2 ... Initial setting stage 3 ... Judgment stage 4 ... Sequence number first setting stage 5 ... Sequence number second setting stage 6 ... Sequence number third setting stage

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 NCプログラムにシーケンス番号を付加
するNCプログラム編集方法において、 シーケンス番号を付加する1以上のパートプログラムか
らなるNCプログラムを、予めNCプログラムを編集す
るNCプログラム編集装置にロードするプログラムロー
ド段階と、 前記NCプログラム編集装置内の記憶部にシーケンス番
号初期値(N0 )、シーケンス番号増分値(Δn)およ
び大区分シーケンス番号増分値(ΔN)の各値を設定す
る初期設定段階と、 前記パートプログラム毎にシーケンス番号が登録されて
いるか否かを判別する判別段階と、 前記判別結果、前記パートプログラム内にシーケンス番
号(N’)が登録されているブロックが有るときは、そ
の登録されたシーケンス番号(N’)はそのままとし、
該シーケンス番号(N’)に順次続くブロックであって
シーケンス番号が登録されていないブロックに、前記シ
ーケンス番号(N’)と前記シーケンス番号増分値(Δ
n)とを順次加算した値を新たなシーケンス番号として
付加するシーケンス番号第1設定段階と、 前記判別結果に従って、前記パートプログラム内にシー
ケンス番号(N’)が登録されているブロックが無いと
きは、前記パートプログラムの先頭ブロックに前記シー
ケンス番号初期値(N0 )をシーケンス番号として付加
し、前記先頭ブロックに順次続くブロックに、前記シー
ケンス番号初期値(N0 )と前記シーケンス番号増分値
(Δn)とを順次加算した値を新たなシーケンス番号と
して付加するシーケンス番号第2設定段階と、 前記パートプログラム内に所定のプログラムの工程が終
了したことを示す工程終了ブロックが有るときは、その
工程終了ブロックに続くブロックに、前記大区分シーケ
ンス番号増分値(ΔN)を整数倍した値を加算して新た
なシーケンス番号として付加するシーケンス番号第3設
定段階と、からなることを特徴とするNCプログラム編
集方法。
1. An NC program editing method for adding a sequence number to an NC program, wherein the NC program consisting of one or more part programs for adding a sequence number is loaded into an NC program editing device for editing the NC program in advance. An initial setting step of setting each value of a sequence number initial value (N 0 ), a sequence number increment value (Δn) and a major division sequence number increment value (ΔN) in a storage section in the NC program editing device; A determination step of determining whether or not a sequence number is registered for each of the part programs, and, as a result of the determination, if there is a block in which the sequence number (N ′) is registered in the part program, the block is registered. The sequence number (N ')
The sequence number (N ′) and the sequence number increment value (Δ) are added to a block that sequentially follows the sequence number (N ′) and has no registered sequence number.
n) is sequentially added as a new sequence number, and a sequence number first setting step is performed. According to the determination result, when there is no block in which the sequence number (N ′) is registered in the part program, , The sequence number initial value (N 0 ) is added to the first block of the part program as a sequence number, and the sequence number initial value (N 0 ) and the sequence number increment value (Δn) are added to blocks sequentially following the first block. ) And a sequence number second setting step for adding a value as a new sequence number, and if there is a process end block indicating that the process of a predetermined program has ended in the part program, the process end In the block following the block, a value obtained by multiplying the large section sequence number increment value (ΔN) by an integer And a sequence number third setting step of adding and adding as a new sequence number.
JP29994492A 1992-11-10 1992-11-10 Nc program editing method Pending JPH06149336A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29994492A JPH06149336A (en) 1992-11-10 1992-11-10 Nc program editing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29994492A JPH06149336A (en) 1992-11-10 1992-11-10 Nc program editing method

Publications (1)

Publication Number Publication Date
JPH06149336A true JPH06149336A (en) 1994-05-27

Family

ID=17878839

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29994492A Pending JPH06149336A (en) 1992-11-10 1992-11-10 Nc program editing method

Country Status (1)

Country Link
JP (1) JPH06149336A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010116413A1 (en) * 2009-04-07 2010-10-14 三菱電機株式会社 Control device for profiling electric discharge machine

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010116413A1 (en) * 2009-04-07 2010-10-14 三菱電機株式会社 Control device for profiling electric discharge machine
CN102387888A (en) * 2009-04-07 2012-03-21 三菱电机株式会社 Control device for profiling electric discharge machine
JP5241917B2 (en) * 2009-04-07 2013-07-17 三菱電機株式会社 Control device for Die-sinker EDM
US8612044B2 (en) 2009-04-07 2013-12-17 Mitsubishi Electric Corporation Control device for die-sinking electrical discharge machine

Similar Documents

Publication Publication Date Title
US5459682A (en) Microcomputer with plural registers and function for selecting them
EP0148273A1 (en) Numerical control apparatus
JPH06149336A (en) Nc program editing method
KR100432407B1 (en) Ladder circuit editing device
US6952811B1 (en) Ladder circuit editing system
JPH02151908A (en) Numerical controller with simulation function
JP2993538B2 (en) Numerical controller with multiple program functions
EP1389748A2 (en) Numerical controller
JPH0750480B2 (en) Text data editing device
JPS6045854A (en) File transition control system
JPH01166103A (en) Numerical controller
JPH064214B2 (en) Machining sequence control method for numerically controlled machine tools
JPH0778008A (en) Program device for programmable controller
JP2000132518A (en) Small electronic computer
JPH0375942A (en) Editing history control system for file
JPH04367029A (en) Programming device for programmable controller
JP3138664B2 (en) Input control parts
JP3267313B2 (en) Relocation method of multiple operation programs
JPH0628342A (en) Word processor
JPH0496106A (en) Ladder program editing system
JPH0693206B2 (en) Loader command processor
JPH02274454A (en) Cad/cam device
JPH04263320A (en) Program version controller
JPH08286712A (en) Editing system for sequence program
JPH0628348A (en) Word processor