JPH04242804A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPH04242804A
JPH04242804A JP50491A JP50491A JPH04242804A JP H04242804 A JPH04242804 A JP H04242804A JP 50491 A JP50491 A JP 50491A JP 50491 A JP50491 A JP 50491A JP H04242804 A JPH04242804 A JP H04242804A
Authority
JP
Japan
Prior art keywords
program
chart
executed
graphic
logic circuit
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
JP50491A
Other languages
Japanese (ja)
Inventor
Masahiro Hirasawa
雅弘 平沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP50491A priority Critical patent/JPH04242804A/en
Publication of JPH04242804A publication Critical patent/JPH04242804A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/35Nc in input of data, input till input file format
    • G05B2219/35293Execute program and check block of data, on interrupt display block
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/35Nc in input of data, input till input file format
    • G05B2219/35336Display locus and corresponding actual block

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To present a numerical controller which displays a program to be checked along its flow as a chart diagram. CONSTITUTION:An arbitrary NC program is selected from a storage device 6 and is analyzed and is converted to a chart code corresponding to the chart diagram based on analysis data, and the chart diagram is displayed on the screen of a CRT 14 based on this chart code. The chart diagram of an executed block or the like is identifiably plotted by changing the color or the like. Thus, the NC program is quickly checked, and the block in which the NC program is the cause of trouble is easily recognized if the trouble occurs during execution.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は数値制御装置の加工用に
作成されたNCプログラムのアルゴリズムを簡単、かつ
正確に検査できるようにした数値制御装置に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a numerical control device that allows the algorithm of an NC program created for machining the numerical control device to be easily and accurately inspected.

【0002】0002

【従来の技術】図6は従来の数値制御装置の構成を示す
ブロック図である。図において、3はNCプログラムが
記憶されている外部記憶媒体としてのフロッピーディス
クであり、2はそのフロッピーディスク3に記憶されて
いるNCプログラムを読み込むフロッピーディスク入力
装置である。4は紙テープ(図示せず)のNCプログラ
ムを入力するテープ読み取り装置であり、5はNCプロ
グラムを作成したり、或いは後述する記憶装置6内に記
憶してあるNCプログラムを指定しそのプログラムを実
行させる等の各種の指示を与えるキーボードである。6
はフロッピーディスク入力装置2、テープ読み取り装置
4又はキーボード5から入力したNCプログラムを記憶
する記憶装置であり、7はNCプログラムの演算処理を
実行させるスタートスイッチである。8はキーボード5
により指定されて実行するNCプログラムを解析するプ
ログラム解析装置であり、9はプログラム解析装置8に
より解析したNCプログラムの情報(例えば、移動ベク
トル等)を格納するバッファメモリである。
2. Description of the Related Art FIG. 6 is a block diagram showing the configuration of a conventional numerical control device. In the figure, 3 is a floppy disk as an external storage medium in which an NC program is stored, and 2 is a floppy disk input device for reading the NC program stored in the floppy disk 3. 4 is a tape reading device for inputting an NC program from a paper tape (not shown); 5 is a tape reader for creating an NC program, or designating an NC program stored in a storage device 6, which will be described later, and executing the program; This is a keyboard that gives various instructions such as 6
is a storage device that stores the NC program input from the floppy disk input device 2, the tape reader 4, or the keyboard 5, and 7 is a start switch for executing the arithmetic processing of the NC program. 8 is keyboard 5
9 is a buffer memory that stores information (for example, movement vectors, etc.) on the NC program analyzed by the program analysis device 8.

【0003】13はバッファメモリ9に格納されている
情報をもとに、後述するCRT表示装置14用のアドレ
スにデータを格納するグラフィック解析装置であり、1
7はグラフィック解析装置13によりCRT装置14用
に変換されたデータを格納するグラフィックビデオラム
である。このグラフィックビデオラム17は1画面(1
024ドット×1024ドット)のマトリックスに対応
したアドレスを持つメモリであり、メモリ上の1ビット
のデータに“1”を格納するとそのビットに対応するC
RT表示画面の画素にドットが描かれる。18はグラフ
ィックビデオラム17と同じ構成を持つメモリであるグ
ラフィックプレーンである。通常、グラフィックプレー
ン18は複数存在し、各プレーンにより色が指定されて
おり、複数のプレーンを重ね合わせる事により複数の色
でグラフィックを描画する。
Reference numeral 13 denotes a graphic analysis device that stores data at an address for a CRT display device 14, which will be described later, based on information stored in the buffer memory 9;
Reference numeral 7 denotes a graphic video RAM that stores data converted for use by the CRT device 14 by the graphic analysis device 13. This graphic video ram 17 has one screen (1
It is a memory that has addresses corresponding to a matrix of 024 dots x 1024 dots), and when "1" is stored in one bit of data on the memory, the C corresponding to that bit is
Dots are drawn on pixels on the RT display screen. A graphic plane 18 is a memory having the same configuration as the graphic video RAM 17. Usually, there are a plurality of graphic planes 18, and each plane specifies a color, and by overlapping the plurality of planes, graphics are drawn in a plurality of colors.

【0004】14はCRT表示装置であり、1はプログ
ラム解析装置8及びグラフィック解析装置13を制御す
る論理回路である。19は上述の各部を総称したNC制
御部である。30はNC制御部19より機械を制御させ
る指令を受け取る機械制御部である。20は機械制御部
30が制御する機械本体部であり、この機械本体部20
においては稼動テーブル22上に被加工物であるワーク
23を載せ、加工物である電極24との間に電圧を印加
し加工を行う。この稼動テーブル22のX軸方向及びY
軸方向の移動はX,Y軸モータ21によりなされる。
14 is a CRT display device, and 1 is a logic circuit that controls the program analysis device 8 and the graphic analysis device 13. Reference numeral 19 denotes an NC control section which collectively refers to the above-mentioned sections. 30 is a machine control unit that receives instructions from the NC control unit 19 to control the machine. 20 is a machine main body section controlled by the machine control section 30, and this machine main body section 20
In this process, a workpiece 23, which is a workpiece, is placed on a movable table 22, and a voltage is applied between it and an electrode 24, which is a workpiece, to perform processing. The X-axis direction and the Y-axis direction of this movable table 22
Movement in the axial direction is performed by X and Y axis motors 21.

【0005】次に、動作について説明するまず、作業者
は検査したいNCプログラムをフロッピーディスク3か
らフロッピーディスク読み取り装置2を介して読み取る
か、或いは紙テープからテープ読み取り装置4を介して
読み取る。或いは、キーボード5を操作してCRT表示
装置14上にNCプログラムを作成する。これらの入力
装置より入力したNCプログラムは、一旦、記憶装置6
に記憶される。このようにしてNCプログラムを記憶し
た後、実行するNCプログラムをキーボード5により指
定する。
Next, the operation will be explained. First, an operator reads an NC program to be inspected from a floppy disk 3 through the floppy disk reader 2 or from a paper tape through the tape reader 4. Alternatively, the user operates the keyboard 5 to create an NC program on the CRT display device 14. The NC program input from these input devices is temporarily stored in the storage device 6.
is memorized. After storing the NC program in this manner, the user specifies the NC program to be executed using the keyboard 5.

【0006】その後、スタートスイッチ7を押すことに
より、論理回路1はプログラム解析装置8に実行するプ
ログラムの解析を行わせるための起動信号を送信する。 プログラム解析装置8は記憶装置6からNCプログラム
を1ブロック又は複数ブロック単位で読み出してNCプ
ログラムの解析を行う。その解析結果は、移動ベクトル
や移動速度等の情報としてバッファメモリ9に書き込む
Thereafter, by pressing the start switch 7, the logic circuit 1 transmits a start signal for causing the program analysis device 8 to analyze the program to be executed. The program analysis device 8 reads the NC program from the storage device 6 in units of one block or a plurality of blocks and analyzes the NC program. The analysis results are written into the buffer memory 9 as information such as movement vectors and movement speeds.

【0007】次に、論理回路1はクラフィック解析装置
13に対してバッファメモリ9の情報をグラフィック描
画させる為の起動信号を送信する。クラフィック解析装
置13はバッファメモリ9内の情報により1画面のどの
部分に描画させるか各軸のスケール、表示領域のアドレ
ス等を計算して自動スケールを行い、図7に示す様にC
RT表示装置14上に表示させるために、各軸のスケー
ル、表示領域のアドレス等のデータをクラフィックビデ
オラム17上に書き込む。更に、プログラム解析装置8
の解析結果よりNCプログラムの直線補間や円弧補間等
を判断し、始点及び終点のアドレス計算を行い、クラフ
ィックビデオラム17上のドットマトリックス上にデー
タを書き込む。
Next, the logic circuit 1 sends an activation signal to the graphics analysis device 13 to cause the information in the buffer memory 9 to be drawn graphically. The graphics analysis device 13 performs automatic scaling by calculating the scale of each axis, the address of the display area, etc. in which part of one screen is to be drawn based on the information in the buffer memory 9, and performs automatic scaling as shown in FIG.
In order to display it on the RT display device 14, data such as the scale of each axis and the address of the display area are written on the graphic video RAM 17. Furthermore, a program analysis device 8
Based on the analysis result, linear interpolation, circular interpolation, etc. of the NC program is determined, addresses of the start point and end point are calculated, and data is written on the dot matrix on the graphic video RAM 17.

【0008】クラフィックビデオラム17上に書き込ま
れたデータは、そのままグラフィックプレーン18上に
転送され、CRT表示装置14においてクラフィック描
画される。その後、グラィック解析装置13は描画完了
信号を論理回路1に送信する。論理回路1は、その信号
を受け取ると、プログラム解析装置8に対して次のブロ
ックの解析を行わせるべく起動信号を送信する。プログ
ラムの終了になるまで上記動作が繰り返される。
The data written on the graphic video RAM 17 is transferred as is to the graphic plane 18, and graphically drawn on the CRT display device 14. Thereafter, the graphic analysis device 13 transmits a drawing completion signal to the logic circuit 1. When the logic circuit 1 receives the signal, it transmits an activation signal to the program analysis device 8 to cause it to analyze the next block. The above operation is repeated until the program ends.

【0009】また、実際の加工に際しては、論理回路1
はプログラム解析装置8により解析されたデータをもと
に移動量を計算して機械制御部30に移動量を送る。機
械制御部30は各軸のモータ21に移動データを送り、
それにより稼動テーブル22を移動させる。また、Z軸
モータ21により電極24が移動しワーク23との間に
印加された電圧により加工が行われる。
In addition, during actual processing, the logic circuit 1
calculates the amount of movement based on the data analyzed by the program analysis device 8 and sends the amount of movement to the machine control section 30. The machine control unit 30 sends movement data to the motor 21 of each axis,
As a result, the operating table 22 is moved. Further, the electrode 24 is moved by the Z-axis motor 21, and machining is performed by a voltage applied between the electrode 24 and the workpiece 23.

【0010】0010

【発明が解決しようとする課題】従来の数値制御装置は
、以上のようにグラフィック描画によりNCプログラム
を検査するか、或いはZ軸座標をずらして電極24とワ
ーク23との間に電圧の印加を実際にさせないようにし
て実行させる為、実行レベルでの検査となっている。 近年、放電現象により被加工物を加工する放電加工装置
等のNCプログラムは、類似パターンをサブプログラム
化して呼び出すようなプログラムパターンが多いことや
、計測や条件分岐により多様な動きを少ないプログラム
で実施することが多いことから複雑なNCプログラムに
なってきており、そのNCプログラムを検査した時に異
常な動作をした場合にはNCプグラム内のどの部分がミ
スなのか分かりにくかった。
[Problems to be Solved by the Invention] Conventional numerical control devices inspect NC programs by graphic drawing as described above, or apply voltage between the electrode 24 and the workpiece 23 by shifting the Z-axis coordinate. In order to execute without actually causing it, the inspection is performed at the execution level. In recent years, NC programs for electrical discharge machining machines that machine workpieces using electrical discharge phenomena have many program patterns that call similar patterns as subprograms, and it is difficult to perform a variety of movements with fewer programs through measurement and conditional branching. As a result, NC programs have become complex, and if an abnormal operation occurs when the NC program is inspected, it is difficult to determine which part of the NC program is at fault.

【0011】本発明は、上記の問題点を解消する為にな
されたものであり、検査するプログラムをチャート図で
表示することによりNCプログラムを簡潔に理解でき、
また実行したNCプログラムのブロック等をチャート図
の色等を変えて表示することのより、プログラムの流れ
を容易に理解できるようにし、また、NCプログラム内
のミスした部分を簡単・迅速に検査できるようにした数
値制御装置を得ることを目的とする。
The present invention has been made to solve the above problems, and by displaying the program to be inspected in the form of a chart, the NC program can be easily understood.
In addition, by displaying the blocks of the executed NC program by changing the color of the chart, etc., the flow of the program can be easily understood, and mistakes in the NC program can be easily and quickly inspected. The purpose of this invention is to obtain a numerical control device that does the following.

【0012】0012

【課題を解決するための手段】本発明の一の態様に係る
数値制御装置は、加工に必要なプログラムを記憶する記
憶装置と、この記憶装置から任意のNCプログラムを選
択する論理回路と、この論理回路によって選択されたN
Cプログラムを解析するNCプログラム解析装置と、こ
のプログラム解析装置により解析された解析データをそ
れぞれ対応したチャートコードに変換する変換装置と、
このチャートコードに基づいてチャート図を表示する表
示装置とを有する。
[Means for Solving the Problems] A numerical control device according to one aspect of the present invention includes a storage device for storing programs necessary for machining, a logic circuit for selecting an arbitrary NC program from the storage device, and a logic circuit for selecting an arbitrary NC program from the storage device. N selected by logic circuit
an NC program analysis device that analyzes a C program; a conversion device that converts the analysis data analyzed by the program analysis device into corresponding chart codes;
It has a display device that displays a chart diagram based on this chart code.

【0013】この発明の他の態様に係る数値制御装置は
、表示装置として、チャート図を表示する際に、NCプ
ログラムの実行したブロック及び実行中のブロックに対
応するチャート図の色等を変えて識別描画する表示装置
を有する。
[0013] A numerical control device according to another aspect of the present invention, as a display device, changes the color etc. of the chart diagram corresponding to the executed block and the block currently being executed when displaying the chart diagram. It has a display device for drawing identification.

【0014】[0014]

【作用】本発明においては、複雑なNCプログラムであ
ってもチャート図に変換されてそれがプログラムの流れ
に沿って表示装置に表示される。
According to the present invention, even a complicated NC program is converted into a chart and displayed on the display device along the flow of the program.

【0015】また、本発明においては、NCプログラム
の実行したブロック及び実行中のブロックのチャート図
をその色等を変えて描画しているので、実行されたプロ
グラの流れや現在どのブロックのプログラムが実行中で
あるかを容易に把握することができる。
[0015] Furthermore, in the present invention, the charts of executed blocks and blocks currently being executed in the NC program are drawn in different colors, so that it is easy to see the flow of the executed program and which block of the program is currently being executed. You can easily check whether it is being executed.

【0016】[0016]

【実施例】図1は本発明の一実施例に係る数値制御装置
の構成を示すブロック図である。図において図6と同一
符号のものは同一又は相当部を示すものとする。10は
バッファメモリ9に格納された情報、即ちNCプログラ
ムをチャートコードに変換する変換装置である。11は
NCプログラムに対応したチャート図のコードを格納し
てあるチャート図変換テーブルであり、12はチャート
図変換テーブル11により変換されたチャートコード及
び該当するプログラムをCRT表示装置14に表示する
ために、CRT表示用の表示アドレスを付加した表示デ
ータ等を格納するチャート図データテーブルである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing the configuration of a numerical control device according to an embodiment of the present invention. In the figures, the same reference numerals as those in FIG. 6 indicate the same or equivalent parts. Reference numeral 10 denotes a conversion device that converts the information stored in the buffer memory 9, that is, the NC program, into a chart code. Reference numeral 11 denotes a chart conversion table that stores chart code corresponding to the NC program, and reference numeral 12 indicates a table for displaying the chart code converted by the chart conversion table 11 and the corresponding program on the CRT display device 14. , a chart data table that stores display data to which a display address for CRT display is added.

【0017】次に、本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

【0018】まず、作業者はNCプログラムのチャート
図をCRT表示装置14上に表示させるために、図2の
画面に基づいてNCプログラムを指定する。
First, in order to display a chart of the NC program on the CRT display device 14, the operator specifies the NC program based on the screen shown in FIG.

【0019】図2はCRT表示装置14の表示画面を示
す図である。最初は何も表示しておらず、チャート図に
変換するNCプログラムが指定され、キーボード5の“
インプット”キーを押すと、論理回路1が各装置を制御
してチャート図及び該当するプログラムをCRT表示装
置14の画面上に表示する。その過程を図1を用いて説
明する。
FIG. 2 is a diagram showing a display screen of the CRT display device 14. As shown in FIG. At first, nothing is displayed, but an NC program to convert it to a chart is specified, and the “
When the "input" key is pressed, the logic circuit 1 controls each device to display a chart and a corresponding program on the screen of the CRT display device 14. This process will be explained using FIG. 1.

【0020】キーボード5の“インプット”キーが押さ
れると、論理回路1はプログラム解析装置8に対してプ
ログラムの解析を行うべく起動信号を送信する。プログ
ラム解析装置8は、図2の画面により指定されたNCプ
ログラムを記憶装置6から1ブロック取り出して、プロ
グラムの解析を行い、解析した移動ベクトル等をバッフ
ァメモリ9に書き込み、そして、ブロックの解析が完了
すると論理回路1に対して完了信号を送信する。
When the "input" key on the keyboard 5 is pressed, the logic circuit 1 sends an activation signal to the program analysis device 8 to analyze the program. The program analysis device 8 takes out one block of the NC program specified by the screen shown in FIG. Upon completion, a completion signal is sent to the logic circuit 1.

【0021】次に、論理回路1は解析したデータをチャ
ート図に変換する為に変換装置10に対して起動信号を
送信する。変換装置10は、解析結果すなわち、バッフ
ァメモリ9に格納された内容に基づいてチャート図変換
テーブル11からNCプログラムに対応したチャートコ
ードを選び出し、チャート図データテーブル12上にそ
のチャートコード及び該当するプログラムを格納し、論
理回路1に対して完了信号を送信する。
Next, the logic circuit 1 sends a start signal to the conversion device 10 in order to convert the analyzed data into a chart. The conversion device 10 selects a chart code corresponding to the NC program from the chart diagram conversion table 11 based on the analysis result, that is, the contents stored in the buffer memory 9, and displays the chart code and the corresponding program on the chart diagram data table 12. is stored, and a completion signal is sent to logic circuit 1.

【0022】図3はチャート図変換テーブル11のテー
ブルの内容を示した図である。Gコードとそれに対応し
たチャートコードとが対応して格納されている。このテ
ーブルのチャート図は説明の便宜上図示したものであり
、実際の装置においては必ずしも必要はない。
FIG. 3 is a diagram showing the contents of the chart/diagram conversion table 11. G codes and chart codes corresponding to the G codes are stored in correspondence with each other. The chart diagram of this table is shown for convenience of explanation, and is not necessarily necessary in an actual device.

【0023】図4はャート図データテーブル12の内容
を示した図であり、各ブロックに対応したチャートコー
ド、プログラム等が格納される。
FIG. 4 is a diagram showing the contents of the chart data table 12, in which chart codes, programs, etc. corresponding to each block are stored.

【0024】次に、論理回路1は次のブロックを解析す
るためプログラム解析装置8に起動信号を送信し、プロ
グラムエンド(%)を解析するまで、上記の動作を繰り
返す。
Next, the logic circuit 1 sends a start signal to the program analysis device 8 to analyze the next block, and repeats the above operation until the program end (%) is analyzed.

【0025】指定したプログラムの解析が完了すると、
論理回路1はグラフィック解析装置13に対してグラフ
ィック解析を行わせるべく起動信号を送信する。グラフ
ィック解析装置13はチャート図データテーブル12の
データに基づいてチャート図をグラフィックビデオラム
17上に設定する。その際、グラフィック解析装置13
は個々のチャート図を結ぶ直線を計算してグラフィック
ビデオラム17にデータを設定する。グラフィックビデ
オラム17に設定したデータは、グラフィックプレーン
18の特定の色のグラフィックプレーン18に設定する
。例えば緑のグラフィックプレーン18にチャート図を
設定した場合には、CRT画面に緑のチャート図が表示
される。
[0025] When the analysis of the specified program is completed,
The logic circuit 1 sends an activation signal to the graphic analysis device 13 to cause it to perform graphic analysis. The graphic analysis device 13 sets a chart on the graphic video RAM 17 based on the data in the chart data table 12. At that time, the graphic analysis device 13
calculates straight lines connecting individual chart figures and sets data in the graphic video RAM 17. The data set in the graphic video RAM 17 is set in the graphic plane 18 of a specific color of the graphic plane 18. For example, when a chart is set on the green graphic plane 18, the green chart is displayed on the CRT screen.

【0026】また、実行したブロック及び実行中のブロ
ックのチャート図を色を変えて表示する場合は次によう
にして処理される。まず、キーボード5により実行する
NCプログラムを指定する。次に、スタートスイッチ7
を押すことにより、NCプログラムが起動される。論理
回路1は、プログラム解析装置8に対してNCプログラ
ムの解析をさせるための起動信号を送信する。プログラ
ム解析装置8は、1ブロック又は複数ブロックのNCプ
ログラムを記憶装置6より取り出し、NCプログラムの
解析を行う。解析した結果はバッファメモリ9に格納す
るプログラム解析装置8は、プログラムの解析が完了し
たら論理回路1に完了信号を送信する。論理回路1はバ
ッファメモリ9の内容により、移動データ等を計算し機
械制御部30に転送する。機械制御部30では、移動デ
ータをもとにモータ21を動かして、稼動テーブル22
及び電極24を移動させ、加工を行う。このとき、現実
行中のブロックは実行ブロックカウンタ15の計数値に
より示される。グラフィック解析装置13は実行ブロッ
クカウンタ15より実行したブロックをプロットし、チ
ャート図データテーブル12に実行したブロックを記憶
する。例えば図4に示すように、実行を開始したブロッ
クがあると、「実行有りブロック」のフラグをセットす
る。
Further, when the charts of executed blocks and blocks currently being executed are displayed in different colors, the process is performed as follows. First, an NC program to be executed is specified using the keyboard 5. Next, start switch 7
By pressing , the NC program is started. The logic circuit 1 transmits an activation signal to the program analysis device 8 to cause it to analyze the NC program. The program analysis device 8 retrieves one or more blocks of NC programs from the storage device 6 and analyzes the NC programs. The program analysis device 8, which stores the analyzed results in the buffer memory 9, sends a completion signal to the logic circuit 1 when the program analysis is completed. The logic circuit 1 calculates movement data and the like based on the contents of the buffer memory 9 and transfers it to the machine control section 30. The machine control unit 30 moves the motor 21 based on the movement data and controls the operation table 22.
Then, the electrode 24 is moved to perform processing. At this time, the block currently being executed is indicated by the count value of the execution block counter 15. The graphic analysis device 13 plots the executed blocks from the execution block counter 15 and stores the executed blocks in the chart data table 12. For example, as shown in FIG. 4, if there is a block that has started execution, a flag of "block with execution" is set.

【0027】グラフィック解析装置13がチャート図デ
ータテーブル12の内容よりチャート図をグラフィック
ビデオラム17に設定するのは、先に述べた通りであり
、実行したブロック及び実行中のブロックは、グラフィ
ックプレーン18の違う色(緑以外)のプレーンにチャ
ート図を書き込み、先のプレーンと重ねあわせて表示す
ることにより、CRT表示装置14上に色の異なるチャ
ート図が表示される。なお、実行したブロック及び実行
中のブロックは点滅表示によってもよく、また、実行完
了のブロッッを色による識別表示をし、実行中のブロッ
クは点滅表示による識別表示によってもよい。
As described above, the graphic analysis device 13 sets a chart in the graphic video RAM 17 based on the contents of the chart data table 12, and blocks that have been executed and blocks that are currently being executed are stored in the graphic plane 18. By writing a chart on a plane of a different color (other than green) and displaying it overlapping with the previous plane, a chart with a different color is displayed on the CRT display device 14. Note that the executed blocks and the blocks currently being executed may be displayed by flashing, or blocks that have completed execution may be identified by color, and blocks currently being executed may be identified by blinking.

【0028】図5はNCプログラムをチャート図に変換
しCRT表示装置14に表示するアルゴリズムの詳細を
示したフローチャートであり、このフローチャートに基
づいてそのアルゴリズムを説明する。
FIG. 5 is a flowchart showing details of an algorithm for converting an NC program into a chart and displaying it on the CRT display device 14, and the algorithm will be explained based on this flowchart.

【0029】まず、初期設定として開始のチャート図を
表示するアドレス、そのチャート図に対応するチャート
コード及びチャート図に変換するNCプログラム名をチ
ャート図データテーブル12に書き込む(S1)。次に
、記憶装置6に格納されたNCプログラムの1ブロック
を取り出す(S2)。その取り出したNCプログラムが
“%”つまりプログラムエンドかどうかチェックする(
S3)。プログラムエンドでない場合には、そのNCプ
ログラムとチャート図変換テーブル11の最初のアドレ
スの内容とを比較する(S4)。一致した場合には、チ
ャート図データテーブル12に対応したチャート図のチ
ャートコードをそのNCプログラムと共に書き込む(S
5)。また、CRT表示装置14のどの位置に表示させ
るか、グラフィックビデオラム17上のアドレスを計算
してチャート図テーブル12にアドレスを書き込む(S
6〜S8)。
First, as an initial setting, an address for displaying a starting chart, a chart code corresponding to the chart, and an NC program name for converting the chart are written into the chart data table 12 (S1). Next, one block of the NC program stored in the storage device 6 is retrieved (S2). Check whether the retrieved NC program is "%", that is, the program end (
S3). If it is not the program end, the NC program is compared with the contents of the first address of the chart conversion table 11 (S4). If they match, write the chart code of the corresponding chart in the chart data table 12 together with its NC program (S
5). In addition, the address on the graphic video ram 17 is calculated to determine where on the CRT display device 14 the display should be made, and the address is written in the chart table 12 (S
6-S8).

【0030】アドレスの計算時には、描画するチャート
図が分岐するチャート図かどうかを判断し(S6)、分
岐するチャート図であるならばCRT座標上のX軸及び
Y軸のオフセット量を加算した表示アドレスをチャート
図テーブル12に書き込む(S7)。また、分岐するチ
ャート図でない場合には、CRT座標上のY軸のオフセ
ット量のみを加算した表示アドレスをチャート図テーブ
ル12に書き込む(S8)。次に、次のブロックのNC
プログラムの変換を行う為に、グラフィック解析装置1
3に内蔵したブロックカウンタをカウントアップする(
S9)。
When calculating the address, it is determined whether the chart to be drawn is a branching chart (S6), and if it is a branching chart, the display is performed by adding the offset amounts of the X-axis and Y-axis on the CRT coordinates. The address is written into the chart table 12 (S7). If the chart is not a branching chart, a display address obtained by adding only the Y-axis offset amount on the CRT coordinates is written in the chart table 12 (S8). Next, the next block's NC
Graphic analysis device 1 in order to convert the program.
Count up the block counter built into 3 (
S9).

【0031】また、取り出したブロックのNCプログラ
ムとチャート図変換テーブル11の最初のアドレスの内
容とが一致してない時は(S4)、チャート図変換テー
ブル11の次のアドレスの内容を取り出し(S10)、
チャート図変換テーブル11がテーブルエンドかどうか
チェックする(S11)。そして、テーブルエンドでな
いと判断された場合には、上述の場合と同様にして取り
出したブロックのNCプログラムとチャート図変換テー
ブル11の内容とを比較する処理を行う(S4)。また
、上記の比較処理を繰返してチャート図変換テーブル1
1から読み出した内容がテーブルエンドとなった場合に
は(S11)、該当するもの無しとし、この場合には例
えばチャートコード「1」をチャート図データテーブル
12に設定する。
Furthermore, if the NC program of the retrieved block does not match the contents of the first address of the chart conversion table 11 (S4), the contents of the next address of the chart conversion table 11 are retrieved (S10). ),
It is checked whether the chart diagram conversion table 11 is at the table end (S11). If it is determined that it is not the table end, the NC program of the extracted block is compared with the contents of the chart diagram conversion table 11 in the same way as in the case described above (S4). Also, repeat the above comparison process to create chart diagram conversion table 1.
If the content read from 1 is the end of the table (S11), it is determined that there is no corresponding item, and in this case, for example, a chart code "1" is set in the chart data table 12.

【0032】以上の演算動作をチャート図に表示しよう
とするNCプログラムのプログラムエンドまで繰り返す
(S3)。そして、全てのブロックについての変換が完
了した後、グラフィク解析装置13によりグラフィック
ビデオラム17上に描画する(S13〜S15)。描画
する過程は次のとおりである。
The above calculation operations are repeated until the program end of the NC program to be displayed on the chart (S3). After the conversion of all blocks is completed, the graphics analysis device 13 draws them on the graphic video RAM 17 (S13 to S15). The drawing process is as follows.

【0033】まず、チャート図データテーブル12から
データを取り出す。チャート図データテーブル12には
、先に述べたように描画するチャート図のチャートコー
ド及び描画先のアドレスが書き込まれているので、アド
レスに指定された領域にチャート図を描画する(S13
)。チャート図はコードのまま表示されるのではなく、
グラフィック解析装置13内にチャート図をドットデー
タにしたフォントデータがあり、チャート図のチャート
コードと対応したフォントデータをグラフイックビデオ
ラム17上に描画する。また、そのチャート図に対応し
たNCプログラムも、チャート図を描画するアドレスに
X軸方向に所定のオフセット量を加算した領域に描画す
る(S14)。チャート図データテーブル12の全デー
タがグラフィックビデオラム17上に描画した時にこの
変換処理が終了する(S15)。
First, data is extracted from the chart data table 12. As described above, the chart code of the chart to be drawn and the drawing destination address are written in the chart data table 12, so the chart is drawn in the area specified by the address (S13).
). Chart diagrams are not displayed as code, but
The graphic analysis device 13 contains font data in which the chart is converted into dot data, and the font data corresponding to the chart code of the chart is drawn on the graphic video ram 17. Further, the NC program corresponding to the chart is also drawn in an area obtained by adding a predetermined offset amount in the X-axis direction to the address for drawing the chart (S14). This conversion process ends when all data in the chart data table 12 is drawn on the graphic video RAM 17 (S15).

【0034】なお、上述の実施例においては放電加工装
置に適用される数値制御装置の例について説明したが、
本発明は他の装置にも同様に適用されることはいうまで
もなく、また、NCプログラムをチャート図に変換しC
RT表示装置14に表示するアルゴリズムも図5に示さ
れた例に限定されるものではなく必要に応じて適宜変更
でき、チャート図のパターンも図示の例に限定されるも
のではない。
[0034] In the above embodiment, an example of a numerical control device applied to an electrical discharge machining device was explained.
Needless to say, the present invention can be similarly applied to other devices, and can also be used to convert NC programs into charts.
The algorithm displayed on the RT display device 14 is not limited to the example shown in FIG. 5, and can be changed as necessary, and the pattern of the chart is also not limited to the example shown.

【0035】[0035]

【発明の効果】以上のように本発明によれば、複雑なN
Cプログラムであってもチャート図に変換されてそれが
プログラムの流れに沿って表示装置に表示されるように
したので、プログラムの迅速な検査が可能になっている
[Effects of the Invention] As described above, according to the present invention, complex N
Even a C program is converted into a chart and displayed on a display device along the flow of the program, making it possible to quickly inspect the program.

【0036】また、本発明によれば、NCプログラムの
実行したブロック及び実行中のブロックのチャート図を
その色等を変えて識別描画しているので、実行されたプ
ログラムの流れや現在どのブロックのプログラムが実行
中であるかを容易に把握することができ、例えば実行中
にトラブルが発生した場合にはどのブロックのプログラ
ムが原因であるかを容易に把握することができる。
Furthermore, according to the present invention, the charts of executed blocks and blocks currently being executed in the NC program are drawn for identification by changing their colors, so that the flow of the executed program and which block is currently being displayed can be clearly drawn. It is possible to easily determine whether a program is being executed, and for example, if a trouble occurs during execution, it is possible to easily determine which program block is causing the problem.

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

【図1】本発明の一実施例の数値制御装置の構成を示し
たブロック図である。
FIG. 1 is a block diagram showing the configuration of a numerical control device according to an embodiment of the present invention.

【図2】図1の実施例のCRT表示装置の画面表示を示
した図である。
FIG. 2 is a diagram showing a screen display of the CRT display device of the embodiment of FIG. 1;

【図3】図1の実施例のチャート図変換テーブルの内容
を示した図である。
FIG. 3 is a diagram showing the contents of a chart conversion table in the embodiment of FIG. 1;

【図4】図1の実施例のチャート図データテーブルの内
容を示した図である。
FIG. 4 is a diagram showing the contents of a chart data table in the embodiment of FIG. 1;

【図5】図1の実施例の動作を示すフローチャートであ
る。
FIG. 5 is a flowchart showing the operation of the embodiment of FIG. 1;

【図6】従来の数値制御装置の構成を示したブロック図
である。
FIG. 6 is a block diagram showing the configuration of a conventional numerical control device.

【図7】図6の装置におけるCRT表示装置の画面表示
を示した図である。
7 is a diagram showing a screen display of a CRT display device in the apparatus of FIG. 6. FIG.

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

6;記憶装置 8;プログラム解析装置 9;バッファメモリ 10;変換器 11;チャート図変換テーブル 12;チャート図データテーブル 13;グラフィック解析装置 14;CRT表示装置 17;グラフィックビデオラム 6; Storage device 8; Program analysis device 9; Buffer memory 10; converter 11; Chart diagram conversion table 12; Chart diagram data table 13; Graphic analysis device 14; CRT display device 17; Graphic video ram

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  加工に必要なプログラムを記憶する記
憶装置と、この記憶装置から任意の加工プログラム(以
下NCプログラムという)を選択する論理回路と、この
論理回路によって選択されたNCプログラムを解析する
NCプログラム解析装置と、このプログラム解析装置に
より解析された解析データをそれぞれ対応したチャート
コードに変換する変換装置と、このチャートコードに基
づいたチャート図を表示する表示装置とを有する数値制
御装置。
Claim 1: A storage device that stores programs necessary for machining, a logic circuit that selects an arbitrary machining program (hereinafter referred to as an NC program) from this storage device, and an analysis of the NC program selected by the logic circuit. A numerical control device that includes an NC program analysis device, a conversion device that converts analysis data analyzed by the program analysis device into corresponding chart codes, and a display device that displays a chart diagram based on the chart code.
【請求項2】  表示装置として、NCプログラムを実
行したブロック及び実行中のブロックに対応したチャー
ト図を識別描画する表示装置を有する請求項1記載の数
値制御装置。
2. The numerical control device according to claim 1, further comprising a display device for identifying and drawing charts corresponding to blocks in which the NC program has been executed and blocks that are being executed.
JP50491A 1991-01-08 1991-01-08 Numerical controller Pending JPH04242804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP50491A JPH04242804A (en) 1991-01-08 1991-01-08 Numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP50491A JPH04242804A (en) 1991-01-08 1991-01-08 Numerical controller

Publications (1)

Publication Number Publication Date
JPH04242804A true JPH04242804A (en) 1992-08-31

Family

ID=11475595

Family Applications (1)

Application Number Title Priority Date Filing Date
JP50491A Pending JPH04242804A (en) 1991-01-08 1991-01-08 Numerical controller

Country Status (1)

Country Link
JP (1) JPH04242804A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013114425A (en) * 2011-11-28 2013-06-10 Jtekt Corp Numerical controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013114425A (en) * 2011-11-28 2013-06-10 Jtekt Corp Numerical controller

Similar Documents

Publication Publication Date Title
US4960061A (en) Embroidering machine
JPS5971515A (en) Graphic display device
GB2136173A (en) Device traces flow of executed instructions
JPH04242804A (en) Numerical controller
JPS61812A (en) Numerical controller
JPS61249109A (en) Interactive program generating system for numerical control device
JPH0397489A (en) Sewing data producing device for sewing machine
JPS6031611A (en) Method for testing working trace control program
JPH04252307A (en) Interactive numerical controller
JPS59189413A (en) Numerical control device provided with graphic display device
JPH06210543A (en) Automatic tool route data inspection device
JP2997600B2 (en) Display control device
JPS62224435A (en) Working program inspection device
JPS63292304A (en) Display method for locus of tool movement in numerical controller
JP2573209Y2 (en) Tool path display device for NC equipment
JPS62121513A (en) Numerical controller
JPS62121515A (en) Numerical controller
JPH01303532A (en) Rule monitoring device
JPH02306305A (en) Method and device for generating control program
JP3473305B2 (en) Monitor device and monitor display method
JPS6316377A (en) Input system for graphic data
JPS61230844A (en) Automatic program generator
JP2020091646A (en) Recognition device, system and recognition method
JPH036527B2 (en)
JPH0394306A (en) Method for plotting locus of tool