JPH07114404A - Debug system for ladder program - Google Patents

Debug system for ladder program

Info

Publication number
JPH07114404A
JPH07114404A JP5259494A JP25949493A JPH07114404A JP H07114404 A JPH07114404 A JP H07114404A JP 5259494 A JP5259494 A JP 5259494A JP 25949493 A JP25949493 A JP 25949493A JP H07114404 A JPH07114404 A JP H07114404A
Authority
JP
Japan
Prior art keywords
execution
ladder
ladder program
debugging
stop condition
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
JP5259494A
Other languages
Japanese (ja)
Inventor
Kimio Maeda
紀美夫 前田
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 JP5259494A priority Critical patent/JPH07114404A/en
Publication of JPH07114404A publication Critical patent/JPH07114404A/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/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13049Display progress of program, state, highlight, colour

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To enhance the efficiency of debugging by easily confirming an execution state of a ladder program in a debug system for the ladder program executed by a PC (programmable controller). CONSTITUTION:The ladder program 1a to be generated is stored in a memory 1. When an execution condition designation means 2 designates an execution start position and an execution stop condition of the ladder program 1a, an execution stop control means 3 gives a command of starting the execution of the ladder program from the execution start position to a ladder execution means 4 and gives a command of stopping the execution of the ladder program to the ladder execution means 4 when the execution of the ladder program is coincident with the execution stop condition. And, the execution state when the execution is stopped, is displayed on a screen of a display device 6 under the control of a display control means 5.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はPC(プログラマブル・
コントローラ)で実行されるラダー・プログラムのデバ
ッグ方式に関し、特にラダー・プログラムの開発時に動
作テストによって確認を行うラダー・プログラムのデバ
ッグ方式に関する。
The present invention relates to a PC (programmable
The present invention relates to a debugging method of a ladder program executed by a controller, and particularly to a debugging method of a ladder program which is confirmed by an operation test during development of the ladder program.

【0002】[0002]

【従来の技術】従来、作成したラダー・プログラムをデ
バッグする場合には、ラダー・プログラムを実際に連続
して動作させ、その信号状態を画面上に表示して確認し
たり、機械側の実際の動作状態を確認するようにしてい
た。
2. Description of the Related Art Conventionally, when debugging a created ladder program, the ladder program is actually operated continuously and its signal status is displayed and confirmed on the screen, or the actual machine on the machine side is checked. I was trying to check the operating status.

【0003】[0003]

【発明が解決しようとする課題】しかし、画面の表示サ
イクルに対して信号は非常に短時間で変化するので、画
面によってその変化状態を確認することは困難であっ
た。
However, since the signal changes with respect to the display cycle of the screen in a very short time, it is difficult to confirm the changed state on the screen.

【0004】また、近年はラダー・プログラムの量が膨
大になってきているので、プログラムの先頭から動作さ
せてた場合には、確認したい部分が実行されるまで時間
がかかるため、デバッグ作業が困難であった。
In addition, since the amount of ladder programs has become enormous in recent years, when the program is operated from the beginning, it takes time to execute the portion to be confirmed, which makes debugging difficult. Met.

【0005】本発明はこのような点に鑑みてなされたも
のであり、ラダー・プログラムの実行状態の確認を容易
にし、デバッグ作業の効率を高めることのできるラダー
・プログラムのデバッグ方式を提供することを目的とす
る。
The present invention has been made in view of the above circumstances, and provides a debugging method for a ladder program which facilitates confirmation of the execution state of the ladder program and improves the efficiency of the debugging work. With the goal.

【0006】[0006]

【課題を解決するための手段】本発明では上記課題を解
決するために、PC(プログラマブル・コントローラ)
で実行されるラダー・プログラムのデバッグ方式におい
て、作成されたラダー・プログラムを格納するラダー格
納手段と、指令に従って前記ラダー・プログラムの実行
および停止を行うラダー実行手段と、前記ラダー・プロ
グラムの実行開始位置および実行停止条件を指定する実
行条件指定手段と、前記実行開始位置から前記ラダー・
プログラムの実行開始を行うように前記ラダー実行手段
に指令し、前記ラダー・プログラムの実行が前記実行停
止条件に一致したときに前記ラダー・プログラムの実行
停止を行うように前記ラダー実行手段に指令する実行停
止制御手段と、前記実行停止したときの実行状態を画面
上に表示する表示制御手段と、を有することを特徴とす
るラダー・プログラムのデバッグ方式が提供される。
According to the present invention, in order to solve the above problems, a PC (programmable controller) is used.
In a debugging method of a ladder program executed by, ladder storing means for storing the created ladder program, ladder executing means for executing and stopping the ladder program according to a command, and execution start of the ladder program Execution condition specifying means for specifying a position and an execution stop condition, and the ladder
Instructing the ladder executing means to start executing the program, and instructing the ladder executing means to stop executing the ladder program when the execution of the ladder program matches the execution stop condition. A debugging method of a ladder program is provided, which has an execution stop control means and a display control means for displaying the execution state when the execution is stopped on a screen.

【0007】[0007]

【作用】ラダー格納手段には、作成されたラダー・プロ
グラムが格納されている。実行条件指定手段がラダー・
プログラムの実行開始位置および実行停止条件を指定す
ると、実行停止制御手段は、実行開始位置からラダー・
プログラムの実行開始を行うようにラダー実行手段に指
令し、そのラダー・プログラムの実行が実行停止条件に
一致したときにはラダー・プログラムの実行停止を行う
ようにラダー実行手段に指令する。そして、この実行停
止したときの実行状態を表示制御手段が画面上に表示す
る。
The created ladder program is stored in the ladder storage means. Execution condition designation means ladder
When you specify the program execution start position and execution stop condition, the execution stop control means
The ladder execution means is instructed to start the execution of the program, and when the execution of the ladder program matches the execution stop condition, the ladder execution means is instructed to stop the execution of the ladder program. Then, the display control means displays the execution state when the execution is stopped on the screen.

【0008】[0008]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図1は本実施例の機能部分の概念図である。メ
モリ1には、作成されたラダー・プログラム1aが格納
されている。実行条件指定手段2がラダー・プログラム
1aの実行開始位置および実行停止条件を指定すると、
実行停止制御手段3は、実行開始位置からラダー・プロ
グラムの実行開始を行うようにラダー実行手段4に指令
し、そのラダー・プログラムの実行が実行停止条件に一
致したときにはラダー・プログラムの実行停止を行うよ
うにラダー実行手段4に指令する。そして、この実行停
止したときの実行状態を表示制御手段5が表示装置6の
画面上に表示する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a conceptual diagram of the functional portion of this embodiment. The created ladder program 1a is stored in the memory 1. When the execution condition specifying means 2 specifies the execution start position and the execution stop condition of the ladder program 1a,
The execution stop control means 3 instructs the ladder execution means 4 to start executing the ladder program from the execution start position, and when the execution of the ladder program matches the execution stop condition, the execution of the ladder program is stopped. The ladder execution means 4 is instructed to do so. Then, the display control means 5 displays the execution state when the execution is stopped on the screen of the display device 6.

【0009】図2は本発明を実施するための数値制御装
置(CNC)全体のハードウエアのブロック図である。
数値制御装置10には、PMC(プログラマブル・マシ
ン・コントローラ)20が内蔵されている。プロセッサ
11は数値制御装置10全体の制御の中心となるプロセ
ッサであり、バス19を介して、ROM13に格納され
たシステムプログラムを読み出し、このシステムプログ
ラムに従って、数値制御装置10全体の制御を実行す
る。
FIG. 2 is a block diagram of the hardware of the whole numerical controller (CNC) for implementing the present invention.
The numerical controller 10 has a PMC (Programmable Machine Controller) 20 built therein. The processor 11 is a central processor for controlling the entire numerical control device 10, reads the system program stored in the ROM 13 via the bus 19, and executes the control of the entire numerical control device 10 according to this system program.

【0010】共有RAM12は数値制御装置10とPM
C20とのデータの授受を行うためのRAMであり、こ
の共有RAM12を経由して、互いにデータの授受を行
う。また、同時に双方からのアクセスに必要なデータを
格納する。
The shared RAM 12 is the numerical controller 10 and the PM.
A RAM for exchanging data with the C20, and exchanging data with each other via the shared RAM 12. At the same time, it stores the data required for access from both sides.

【0011】RAM14には一時的な計算データ、表示
データ等が格納される。CMOS15は不揮発性メモリ
として構成され、工具補正量、ピッチ誤差補正量、加工
プログラム及びパラメータ等が格納される。CMOSは
図示されていないバッテリでバックアップされ、数値制
御装置10の電源がオフされても不揮発性メモリとなっ
ているので、それらのデータはそのまま保持される。ま
た、CMOS15にはPMC20側に必要なパラメータ
等も格納されている。
The RAM 14 stores temporary calculation data, display data and the like. The CMOS 15 is configured as a non-volatile memory and stores a tool correction amount, a pitch error correction amount, a machining program, parameters and the like. The CMOS is backed up by a battery (not shown) and is a non-volatile memory even when the power supply of the numerical control device 10 is turned off, so that the data is retained as it is. The CMOS 15 also stores parameters and the like required on the PMC 20 side.

【0012】グラフィック制御回路16は各軸の現在位
置、アラーム、パラメータ、画像データ等のディジタル
データを画像信号に変換して出力する。この画像信号は
CRT/MDIユニット30の表示装置31に送られ、
表示装置31に表示される。PMC20側のパラメー
タ、ラダーダイヤグラム等も表示装置31に表示するこ
とができる。このときのデータはPMC20から共有R
AM12を経由して送られてくる。
The graphic control circuit 16 converts digital data such as the current position of each axis, alarms, parameters and image data into an image signal and outputs it. This image signal is sent to the display device 31 of the CRT / MDI unit 30,
It is displayed on the display device 31. Parameters on the PMC 20 side, ladder diagrams, etc. can also be displayed on the display device 31. The data at this time is shared R from the PMC 20.
It is sent via AM12.

【0013】インタフェース17はCRT/MDIユニ
ット30内のキーボード32からのデータを受けて、プ
ロセッサ11に渡す。また、PMC20側へのデータも
キーボード32から入力することができ、そのデータは
共有RAM12を経由して、PMC20側へ送られる。
The interface 17 receives data from the keyboard 32 in the CRT / MDI unit 30 and transfers it to the processor 11. Also, data to the PMC 20 side can be input from the keyboard 32, and the data is sent to the PMC 20 side via the shared RAM 12.

【0014】インタフェース18は外部機器用のインタ
フェースであり、紙テープリーダ、紙テープパンチャ
ー、紙テープリーダ・パンチャー、プリンタ等の外部機
器40が接続される。紙テープリーダからは加工プログ
ラムが読み込まれ、また、数値制御装置(CNC)10
内で編集された加工プログラムを紙テープパンチャーに
出力することができる。また、外部機器としては、自動
プログラミング装置が接続され、そこで作成したシーケ
ンス・プログラムや加工プログラムがインタフェース1
8を介して入力される。
The interface 18 is an interface for an external device, and is connected to an external device 40 such as a paper tape reader, a paper tape puncher, a paper tape reader / puncher, and a printer. The processing program is read from the paper tape reader and the numerical controller (CNC) 10
It is possible to output the editing program edited in the paper tape puncher. Also, as an external device, an automatic programming device is connected, and the sequence program and machining program created there are interface 1
8 is input.

【0015】これら共有RAM12、ROM13等の各
要素は、バス19によってプロセッサ11と結合されて
いる。なお、図ではサーボモータ等を制御する軸制御回
路、サーボアンプ、スピンドル制御回路、スピンドルア
ンプ、手動パルス発生器インタフェース等は省略してあ
る。
Each element such as the shared RAM 12 and the ROM 13 is connected to the processor 11 by a bus 19. In the figure, an axis control circuit for controlling a servo motor, a servo amplifier, a spindle control circuit, a spindle amplifier, a manual pulse generator interface, etc. are omitted.

【0016】PMC(プログラマブル・マシン・コント
ローラ)20にはPMC用のプロセッサ21があり、プ
ロセッサ21はバス25によって、共有RAM12と接
続され、共有RAM12はCNC10のバス19に結合
されている。
A PMC (Programmable Machine Controller) 20 has a PMC processor 21, which is connected to a shared RAM 12 by a bus 25, and the shared RAM 12 is coupled to a bus 19 of a CNC 10.

【0017】また、バス25にはROM22が結合され
ている。ROM22には、PMC20を制御するための
管理プログラムとシーケンス・プログラムが格納されて
いる。本実施例では、シーケンス・プログラムとしては
ラダー・プログラムが使用される。また、ROM22に
は、ラダー・プログラムのデバッグを行うためのプログ
ラムも格納されている。
A ROM 22 is connected to the bus 25. A management program and a sequence program for controlling the PMC 20 are stored in the ROM 22. In this embodiment, a ladder program is used as the sequence program. The ROM 22 also stores a program for debugging the ladder program.

【0018】なお、ROM22に代えて、ROMカセッ
ト用インタフェースを設け、ROMカセットにラダー・
プログラムを格納して、ROMカセット用インタフェー
スに接続する場合もある。このようにすることにより、
簡単にラダー・プログラムをレベルアップしたり変更す
ることができる。
It should be noted that a ROM cassette interface is provided in place of the ROM 22 to allow a ladder cassette to be installed in the ROM cassette.
The program may be stored and connected to the ROM cassette interface. By doing this,
You can easily upgrade or change the ladder program.

【0019】さらに、バス25にはRAM23が結合さ
れており、RAM23には入出力信号が格納され、シー
ケンス・プログラムの実行に従って、その内容は書き換
えられていく。
Further, a RAM 23 is coupled to the bus 25, an input / output signal is stored in the RAM 23, and its contents are rewritten as the sequence program is executed.

【0020】I/O制御回路24はバス25に接続さ
れ、RAM23に格納された出力信号をI/Oユニット
26にシリアル信号に変換して送る。また、I/Oユニ
ット26からのシリアルな入力信号をパラレル信号に変
換してバス25に送る。その信号はプロセッサ21によ
って、RAM23に格納される。
The I / O control circuit 24 is connected to the bus 25 and converts the output signal stored in the RAM 23 into a serial signal and sends it to the I / O unit 26. Also, a serial input signal from the I / O unit 26 is converted into a parallel signal and sent to the bus 25. The signal is stored in the RAM 23 by the processor 21.

【0021】プロセッサ21は、数値制御装置10から
共有RAM12を経由して、M機能指令、T機能指令等
の指令信号を受け、一旦RAM23に格納し、その指令
をROM22に格納されたシーケンス・プログラムに従
って処理し、I/O制御回路24を経由して、I/Oユ
ニット26に出力する。この出力信号によって、機械側
の油圧機器、空圧機器、電磁機器が制御される。
The processor 21 receives command signals such as an M function command and a T function command from the numerical controller 10 via the shared RAM 12, temporarily stores them in the RAM 23, and stores the commands in the sequence program stored in the ROM 22. The data is processed in accordance with the above, and output to the I / O unit 26 via the I / O control circuit 24. The output signal controls hydraulic equipment, pneumatic equipment, and electromagnetic equipment on the machine side.

【0022】また、プロセッサ21はI/Oユニット2
6からの機械側のリミットスイッチ信号、機械操作盤の
操作スイッチの信号等の入力信号を受けて、この入力信
号を一旦RAM23に格納する。PMC20で処理する
必要のない入力信号は共有RAM12を経由してプロセ
ッサ11に送られる。その他の信号はシーケンス・プロ
グラムで処理し、一部の信号はCNC側へ、他の信号は
出力信号として、I/O制御回路24を経由して、I/
Oユニット26から機械側へ出力される。
Further, the processor 21 is the I / O unit 2
An input signal such as a limit switch signal on the machine side and an operation switch signal on the machine operation panel from 6 is received, and the input signal is temporarily stored in the RAM 23. Input signals that do not need to be processed by the PMC 20 are sent to the processor 11 via the shared RAM 12. Other signals are processed by the sequence program, some signals are output to the CNC side, and other signals are output signals via the I / O control circuit 24.
Output from the O unit 26 to the machine side.

【0023】一方、ラダー・プログラムには、各軸の移
動等を制御する命令を含めることができる。これらの指
令はプロセッサ21によって読み出されると、共有RA
M12を経由して、プロセッサ11に送られ、サーボモ
ータを制御する。同様にして、スピンドルモータ等もP
MC側からの指令で制御することもできる。
On the other hand, the ladder program can include instructions for controlling the movement of each axis. When these commands are read by the processor 21, the shared RA
It is sent to the processor 11 via M12 to control the servomotor. Similarly, the spindle motor etc.
It can also be controlled by a command from the MC side.

【0024】また、ROM22に格納されたラダー・プ
ログラム、RAM23に格納された入出力信号は、CR
T/MDIユニット30の表示装置31に表示すること
ができる。
The ladder program stored in the ROM 22 and the input / output signals stored in the RAM 23 are CR
It can be displayed on the display device 31 of the T / MDI unit 30.

【0025】さらに、ROM22のシーケンス・プログ
ラムは共有RAM12、バス19を経由して、インタフ
ェース18に接続されたプリンタにプリントアウトする
ことができる。
Further, the sequence program in the ROM 22 can be printed out to the printer connected to the interface 18 via the shared RAM 12 and the bus 19.

【0026】さらに、インタフェース18にプログラム
作成装置を結合し、プログラム作成装置で作成されたシ
ーケンス・プログラム等をRAM23に転送し、RAM
23のシーケンス・プログラムでPMC20を動作させ
ることもできる。
Further, a program creating device is connected to the interface 18, the sequence program created by the program creating device is transferred to the RAM 23, and the RAM
It is also possible to operate the PMC 20 with a sequence program of 23.

【0027】次にCRT/MDIユニット30で行われ
る本実施例のラダー・プログラムのデバッグ方式の具体
的な手順について説明する。図3はラダー・プログラム
のデバッグ画面を示す図である。表示装置31の表示画
面31aには、デバッグ画面50が表示されている。こ
のデバッグ画面50は、ラダー表示部51、データ表示
部52、コマンドライン53、およびメニュー表示部5
4が上から順に構成されている。
Next, a specific procedure of the ladder program debugging method of the present embodiment performed by the CRT / MDI unit 30 will be described. FIG. 3 is a diagram showing a debug screen of the ladder program. The debug screen 50 is displayed on the display screen 31 a of the display device 31. The debug screen 50 includes a ladder display section 51, a data display section 52, a command line 53, and a menu display section 5.
4 are arranged in order from the top.

【0028】ラダー表示部51には、複数の接点、コイ
ル、機能命令等からなるラダー・プログラムが表示され
ている。データ表示部52には、後述する内部データが
表示される。コマンドライン53は、データ等を書き込
む欄である。メニュー表示部54は、複数のメニュー5
4a〜54kから構成されている。各メニュー54a〜
54kには、デバッグ作業に必要な命令が表示される。
これらメニュー54a〜54kの選択は、図示されてい
ないファンクションキー等により行われる。
The ladder display section 51 displays a ladder program including a plurality of contacts, coils, function commands and the like. The data display section 52 displays internal data described later. The command line 53 is a column for writing data and the like. The menu display section 54 includes a plurality of menus 5.
4a to 54k. Each menu 54a-
At 54k, instructions necessary for debugging work are displayed.
Selection of these menus 54a to 54k is performed by a function key or the like not shown.

【0029】また、デバッグ画面50上ではカーソル5
5が表示され、キー操作により画面上の所望の位置に移
動し、データ入力や命令を行うことができる。このよう
な構成のデバッグ画面50において、まず、1要素単
位、ネット単位、または複数要素のいずれかでデバッグ
を行いたい場合には、メニュー54bの「STEP」を
選択する。
On the debug screen 50, the cursor 5
5 is displayed, and it is possible to move to a desired position on the screen by a key operation and input data or give a command. On the debug screen 50 having such a configuration, first, when it is desired to perform debugging in units of one element, in units of nets, or in a plurality of elements, "STEP" in the menu 54b is selected.

【0030】図4は「STEP」の選択によるデバッグ
操作時のメニュー54a〜54eの表示変化状態を示す
図である。図3に示したデバッグ画面50の初期状態で
は、メニュー54a〜54eのうちメニュー54aには
「SERCH」が、メニュー54bには「STEP」
が、メニュー54cには「BRKCTL」が表示されて
いる。この状態で、まず、オペレータがメニュー54b
の「STEP」を選択すると、メニュー54aは「EL
EMNT」に、メニュー54bは「NET」に、メニュ
ー54cは「BLOCK」にそれぞれ切り替わる。
FIG. 4 is a diagram showing a display change state of the menus 54a to 54e at the time of debugging operation by selecting "STEP". In the initial state of the debug screen 50 shown in FIG. 3, among the menus 54a to 54e, "SERCH" is displayed in the menu 54a and "STEP" is displayed in the menu 54b.
However, "BRKCTL" is displayed in the menu 54c. In this state, first, the operator operates the menu 54b.
When "STEP" is selected, the menu 54a displays "EL
The menu 54b is switched to "NET" and the menu 54c is switched to "BLOCK".

【0031】ここで、「ELEMNT」は、接点、コイ
ルおよび機能命令等の各要素のうち現在のカーソル55
の置かれている1要素を実行させる指令である。「NE
T」は、カーソル55の置かれた1ネットを実行させる
指令である。「ELEMNT」および「NET」は、指
令と同時に実行される。
Here, "ELEMNT" is the current cursor 55 among the elements such as contacts, coils, and function commands.
Is a command to execute one element in which "NE
“T” is a command for executing one net on which the cursor 55 is placed. "ELEMNT" and "NET" are executed simultaneously with the command.

【0032】一方、「BLOCK」は、現在のカーソル
55の位置から所望の要素またはネットまでの複数の要
素を実行させる指令である。「BLOCK」を選択する
と、メニュー54aは「SEARCH」に、メニュー5
4bは「START」にそれぞれ切り替わる。停止位置
である要素またはネットは、「BLOCK」を選択した
後でカーソル55を移動させて指令する。あるいは、コ
マンドライン53で接点やネットの名称を入力し、「S
EARCH」を選択することによりカーソル55が自動
的に移動する。このように実行の範囲の指定ができた
ら、「START」を選択することによりデータが実行
される。
On the other hand, "BLOCK" is a command for executing a plurality of elements from the current position of the cursor 55 to a desired element or net. When "BLOCK" is selected, the menu 54a becomes "SEARCH" and the menu 5
4b is switched to "START". The element or net at the stop position is commanded by moving the cursor 55 after selecting "BLOCK". Alternatively, enter the name of the contact or net on the command line 53 and click "S
The cursor 55 is automatically moved by selecting "EARCH". When the range of execution can be specified in this way, the data is executed by selecting "START".

【0033】このように、所望する要素やネットの実行
が行われると、デバッグ画面50には、実行が終了した
時点での内部データが表示される。図5は内部データを
表示したときのデバッグ画面50を示す図である。画面
では、データ表示部52に、実行終了時点での演算結果
レジスタとして、アキュームレータ(ACC)、スタッ
クポインタ(STK)、オーバフロー(OF)等の内部
データが表示される。オペレータは、この表示された内
部データを参照してラダー・プログラムの状態を確認す
る。
As described above, when the desired element or net is executed, the debug screen 50 displays the internal data at the time when the execution is completed. FIG. 5 is a diagram showing the debug screen 50 when the internal data is displayed. On the screen, the data display unit 52 displays internal data such as an accumulator (ACC), a stack pointer (STK), and an overflow (OF) as a calculation result register at the end of execution. The operator confirms the state of the ladder program by referring to the displayed internal data.

【0034】このような1要素、1ネットおよび複数要
素の実行指令の他に、デバッグ画面50では、トリガ実
行停止およびスキャン実行による実行停止指令も行うこ
とができる。この場合、図3または図5のデバッグ画面
50において、メニュー54cの「BRKCTL」を選
択する。
In addition to the one-element, one-net, and plural-element execution instructions, the debug screen 50 can also issue an execution stop instruction by trigger execution stop and scan execution. In this case, "BRKCTL" of the menu 54c is selected on the debug screen 50 of FIG. 3 or 5.

【0035】図6は「BRKCTL」の選択によるデバ
ッグ操作時のメニュー54a〜54eの表示変化状態を
示す図である。図3または図5のデバッグ画面50にお
いて、オペレータがメニュー54cの「BRKCTL」
を選択すると、メニュー54aは「TRIGER」に、
メニュー54bは「SCAN」にそれぞれ切り替わる。
FIG. 6 is a diagram showing a display change state of the menus 54a to 54e at the time of the debug operation by selecting "BRKCTL". On the debug screen 50 of FIG. 3 or 5, the operator selects “BRKCTL” from the menu 54c.
If you select, the menu 54a becomes "TRIGER",
The menu 54b is switched to "SCAN".

【0036】ここで、「TRIGER」は、トリガ信号
条件による実行停止の指令である。一方、「SCAN」
は、ラダー・プログラムをスキャン単位で実行停止させ
る指令である。オペレータが「TRIGER」を選択す
ると、メニュー54aは「TRGON」に、メニュー5
4bは「TRGOFF」にそれぞれ切り替わる。この状
態でオペレータは、実行停止位置の要素のアドレス、ラ
ダーのレベル、およびデバッグ実行の回数をコマンドラ
イン53上で指定する。
Here, "TRIGER" is an instruction to stop the execution due to the trigger signal condition. On the other hand, "SCAN"
Is a command to stop the execution of the ladder program in scan units. When the operator selects "TRIGER", the menu 54a becomes "TRGON" and the menu 5
4b is switched to "TRG OFF". In this state, the operator specifies the address of the element at the execution stop position, the level of the ladder, and the number of debug executions on the command line 53.

【0037】また、実行停止位置の要素の信号状態がオ
ンになったときに実行停止を行いたい場合には「TRG
ON」を選択し、オフになったときに実行停止を行いた
い場合には「TRGOFF」を選択する。これにより、
設定されたレベルのラダー・プログラムは、指令された
要素の信号状態がオンまたはオフになったときに実行停
止し、これが設定された回数だけ繰り返される。この結
果のデータは、図5で示したようにデータ表示部52に
表示される。
When it is desired to stop the execution when the signal state of the element at the execution stop position is turned on, "TRG
Select "ON" and select "TRG OFF" if you want to stop execution when it is turned off. This allows
The ladder program at the set level stops executing when the signal state of the commanded element turns on or off, and this is repeated the set number of times. The resulting data is displayed on the data display unit 52 as shown in FIG.

【0038】一方、「TRIGER」の代わりに数字を
画面入力した後で「SCAN」を選択すると、入力され
た数字の回数だけスキャン実行が繰り返される。データ
表示等は他の指令とほぼ同じである。
On the other hand, if "SCAN" is selected after inputting a number on the screen instead of "TRIGER", the scanning is repeated as many times as the input number. The data display is almost the same as other commands.

【0039】ところで、上記のような操作によりデバッ
グを行って内部データ等がデバッグ画面50上で表示さ
れた状態では、プロセッサの演算結果レジスタの状態や
機能命令の内部データ等を疑似的に変更することができ
る。すなわち、データ表示部52の内部データを変更す
る場合には、図5に示すように、カーソル56を所望の
位置に移動させ、数字を直接入力する。例えば、アキュ
ームレータ(ACC)のデータを1から0に書き換える
場合には「1」の部分にカーソルを移動させ、「0」を
キー入力する。
By the way, in the state where the internal data and the like are displayed on the debug screen 50 by performing the debugging by the above operation, the state of the operation result register of the processor and the internal data and the like of the function instruction are pseudo-changed. be able to. That is, when changing the internal data of the data display unit 52, as shown in FIG. 5, the cursor 56 is moved to a desired position and a number is directly input. For example, when rewriting the data of the accumulator (ACC) from 1 to 0, the cursor is moved to the part of "1" and "0" is input by the key.

【0040】一方、機能命令の内部データ、あるいは接
点やコイル等の要素のデータを変更する場合には、メニ
ュー54gの「DUMP」を選択する。図7は「DUM
P」選択後のデバッグ画面50の状態を示す図である。
図に示すように、コマンドライン53上には、カーソル
55で指定された機能命令や命令等のデータを先頭にし
て複数のデータが表示される。これらのデータはカーソ
ル56によってその数値を変更する。
On the other hand, when changing the internal data of the function command or the data of elements such as contacts and coils, "DUMP" in the menu 54g is selected. Figure 7 shows “DUM
It is a figure which shows the state of the debug screen 50 after selecting "P".
As shown in the figure, a plurality of data is displayed on the command line 53, with the data such as the function command or command designated by the cursor 55 at the head. The numerical values of these data are changed by the cursor 56.

【0041】こうしてデータの変更が終了すれば、新た
な疑似的なデータによってデバッグが行われる。図8は
以上説明した処理を行うためのプロセッサ側の手順を説
明するフローチャートである。 〔S1〕1要素運転、複数要素運転、ネット運転、トリ
ガ停止運転、およびスキャン停止運転のいずれかのモー
ドを選択設定する。 〔S2〕デバッグの開始位置、および停止条件を設定す
る。 〔S3〕設定された条件に従ってデバッグを開始する。
When the data modification is completed in this way, debugging is performed using new pseudo data. FIG. 8 is a flowchart illustrating the procedure on the processor side for performing the above-described processing. [S1] One of the one-element operation, the multi-element operation, the net operation, the trigger stop operation, and the scan stop operation is selected and set. [S2] A debug start position and a stop condition are set. [S3] Debugging is started according to the set conditions.

【0042】〔S4〕設定された停止条件が成立したか
否かを判断し、成立すればステップS5に進み、そうで
なければステップS4を繰り返す。ステップS4を繰り
返す間は、デバッグ画面50上に信号の変化状態等を表
示する。また、信号状態の設定も変更可能にする。 〔S5〕デバッグを停止し、デバッグ画面50上に内部
データの表示を行う。このとき、データ設定の変更も行
う。 〔S6〕デバッグが終了されたか否かを判断し、終了す
れば本フローチャートを終了し、そうでなければステッ
プS2に戻り、デバッグを繰り返す。
[S4] It is judged whether or not the set stop condition is satisfied, and if it is satisfied, the process proceeds to step S5, and if not, step S4 is repeated. While step S4 is repeated, the signal change state and the like are displayed on the debug screen 50. Also, the setting of the signal state can be changed. [S5] Debugging is stopped and internal data is displayed on the debug screen 50. At this time, the data setting is also changed. [S6] It is determined whether or not the debugging is finished. If it is finished, this flowchart is finished; otherwise, the process returns to step S2 and the debugging is repeated.

【0043】このように、本実施例では、オペレータの
判断で停止条件を設定し、その停止条件の成立時にデバ
ッグ実行を停止し、そのときのアキュームレータ(AC
C)等の内部データをデバッグ画面50で表示するよう
にしたので、所望の信号の状態を容易に確認することが
でき、デバッグ作業が簡単にかつ迅速にできるようにな
る。
As described above, in this embodiment, the stop condition is set by the operator's judgment, the debug execution is stopped when the stop condition is satisfied, and the accumulator (AC
Since the internal data such as C) is displayed on the debug screen 50, the state of the desired signal can be easily confirmed, and the debugging work can be performed easily and quickly.

【0044】また、本実施例では、デバッグ途中で内部
データの内容を変更できるようにしたので、より効率の
よいデバッグ作業が可能となる。
Further, in this embodiment, since the contents of the internal data can be changed during the debugging, more efficient debugging work becomes possible.

【0045】[0045]

【発明の効果】以上説明したように本発明では、指定さ
れた実行開始位置からラダー・プログラムの実行開始を
行い、ラダー・プログラムの実行が指定された実行停止
条件に一致したときにはその実行停止を行うようにし、
この実行停止したときの実行状態を表示制御手段が画面
上に表示するようにしたので、所望の信号の状態を容易
に確認することができ、デバッグ作業が簡単にかつ迅速
にできるようになる。
As described above, according to the present invention, the execution of the ladder program is started from the specified execution start position, and when the execution of the ladder program matches the specified execution stop condition, the execution of the ladder program is stopped. To do it,
Since the display control means displays the execution state when the execution is stopped on the screen, the state of the desired signal can be easily confirmed, and the debugging work can be performed easily and quickly.

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

【図1】本実施例の機能部分の概念図。FIG. 1 is a conceptual diagram of a functional portion of this embodiment.

【図2】本発明を実施するための数値制御装置(CN
C)全体のハードウエアのブロック図である。
FIG. 2 is a numerical controller for implementing the present invention (CN
C) A block diagram of the entire hardware.

【図3】ラダー・プログラムのデバッグ画面を示す図で
ある。
FIG. 3 is a diagram showing a debug screen of a ladder program.

【図4】「STEP」の選択によるデバッグ操作時のメ
ニューの表示変化状態を示す図である。
FIG. 4 is a diagram showing a display change state of a menu at the time of a debug operation by selecting “STEP”.

【図5】内部データを表示したときのデバッグ画面を示
す図である。
FIG. 5 is a diagram showing a debug screen when internal data is displayed.

【図6】「BRKCTL」の選択によるデバッグ操作時
のメニューの表示変化状態を示す図である。
FIG. 6 is a diagram showing a display change state of a menu during a debug operation by selecting “BRKCTL”.

【図7】「DUMP」選択後のデバッグ画面の状態を示
す図である。
FIG. 7 is a diagram showing a state of a debug screen after selecting “DUMP”.

【図8】プロセッサ側の手順を説明するフローチャート
である。
FIG. 8 is a flowchart illustrating a procedure on the processor side.

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

1 メモリ 1a ラダー・プログラム 2 実行条件指定手段 3 実行停止制御手段 4 ラダー実行手段 5 表示制御手段 6 表示装置 10 数値制御装置(CNC) 11 プロセッサ 12 共有RAM 13 ROM 14 RAM 15 CMOS 16 グラフィック制御回路 19 バス 20 PMC(プログラマブル・マシン・コントロー
ラ) 21 プロセッサ 22 ROM 23 RAM 30 CRT/MDIユニット 31 表示装置 31a 表示画面 32 キーボード 50 デバッグ画面 51 ラダー表示部 52 データ表示部 53 コマンドライン 54 メニュー表示部
1 Memory 1a Ladder Program 2 Execution Condition Designating Means 3 Execution Stop Control Means 4 Ladder Execution Means 5 Display Control Means 6 Display Device 10 Numerical Control Unit (CNC) 11 Processor 12 Shared RAM 13 ROM 14 RAM 15 CMOS 16 Graphic Control Circuit 19 Bus 20 PMC (Programmable Machine Controller) 21 Processor 22 ROM 23 RAM 30 CRT / MDI unit 31 Display 31a Display screen 32 Keyboard 50 Debug screen 51 Ladder display 52 Data display 53 Command line 54 Menu display

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 PC(プログラマブル・コントローラ)
で実行されるラダー・プログラムのデバッグ方式におい
て、 作成されたラダー・プログラムを格納するラダー格納手
段と、 指令に従って前記ラダー・プログラムの実行および停止
を行うラダー実行手段と、 前記ラダー・プログラムの実行開始位置および実行停止
条件を指定する実行条件指定手段と、 前記実行開始位置から前記ラダー・プログラムの実行開
始を行うように前記ラダー実行手段に指令し、前記ラダ
ー・プログラムの実行が前記実行停止条件に一致したと
きに前記ラダー・プログラムの実行停止を行うように前
記ラダー実行手段に指令する実行停止制御手段と、 前記実行停止したときの実行状態を画面上に表示する表
示制御手段と、 を有することを特徴とするラダー・プログラムのデバッ
グ方式。
1. A PC (programmable controller)
In a method of debugging a ladder program executed by, ladder storage means for storing the created ladder program, ladder execution means for executing and stopping the ladder program according to a command, and execution start of the ladder program Execution condition designating means for designating a position and an execution stop condition, and commanding the ladder execution means to start execution of the ladder program from the execution start position, and execution of the ladder program becomes the execution stop condition. An execution stop control means for instructing the ladder execution means to stop the execution of the ladder program when they match, and a display control means for displaying the execution state when the execution is stopped on the screen. Ladder program debugging method characterized by:
【請求項2】 前記実行条件指定手段は、1要素単位で
前記実行開始位置および実行停止条件が設定されるよう
に構成されていることを特徴とする請求項1記載のラダ
ー・プログラムのデバッグ方式。
2. The debugging method for a ladder program according to claim 1, wherein the execution condition designating means is configured such that the execution start position and the execution stop condition are set for each element. .
【請求項3】 前記実行条件指定手段は、ネット単位で
前記実行開始位置および実行停止条件が設定されるよう
に構成されていることを特徴とする請求項1記載のラダ
ー・プログラムのデバッグ方式。
3. The debugging method for a ladder program according to claim 1, wherein the execution condition designating unit is configured to set the execution start position and the execution stop condition on a net basis.
【請求項4】 前記実行条件指定手段は、複数要素分の
前記実行開始位置および実行停止条件が設定されるよう
に構成されていることを特徴とする請求項1記載のラダ
ー・プログラムのデバッグ方式。
4. The debugging method of a ladder program according to claim 1, wherein the execution condition designating means is configured to set the execution start position and execution stop condition for a plurality of elements. .
【請求項5】 前記実行停止条件は、所定の信号のトリ
ガ発生時となるように設定されることを特徴とする請求
項1記載のラダー・プログラムのデバッグ方式。
5. The debugging method of a ladder program according to claim 1, wherein the execution stop condition is set so that a trigger of a predetermined signal is generated.
【請求項6】 前記トリガ発生時の実行停止条件は、デ
バッグの実行回数とともに指定されるように構成されて
いることを特徴とする請求項5記載のラダー・プログラ
ムのデバッグ方式。
6. The debugging method for a ladder program according to claim 5, wherein the execution stop condition when the trigger is generated is specified together with the number of times of execution of debugging.
【請求項7】 前記実行停止条件は、スキャン単位で設
定されることを特徴とする請求項1記載のラダー・プロ
グラムのデバッグ方式。
7. The debugging method of a ladder program according to claim 1, wherein the execution stop condition is set in scan units.
【請求項8】 前記スキャン単位の実行停止条件は、デ
バッグの実行回数とともに指定されるように構成されて
いることを特徴とする請求項7記載のラダー・プログラ
ムのデバッグ方式。
8. The ladder program debugging method according to claim 7, wherein the execution stop condition for each scan unit is configured to be specified together with the number of times of execution of debugging.
【請求項9】 前記表示制御手段は、ラダー演算結果レ
ジスタのデータを表示するように構成されていることを
特徴とする請求項1記載のラダー・プログラムのデバッ
グ方式。
9. The debugging method of a ladder program according to claim 1, wherein the display control means is configured to display the data of the ladder operation result register.
【請求項10】 表示画面上で内部データを変更する内
部データ変更手段と、前記変更された内部データに従っ
てデバッグを行う変更データ実行手段と、を有すること
を特徴とする請求項1記載のラダー・プログラムのデバ
ッグ方式。
10. The ladder according to claim 1, further comprising: internal data changing means for changing internal data on a display screen; and changed data executing means for performing debugging in accordance with the changed internal data. Program debugging method.
JP5259494A 1993-10-18 1993-10-18 Debug system for ladder program Pending JPH07114404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5259494A JPH07114404A (en) 1993-10-18 1993-10-18 Debug system for ladder program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5259494A JPH07114404A (en) 1993-10-18 1993-10-18 Debug system for ladder program

Publications (1)

Publication Number Publication Date
JPH07114404A true JPH07114404A (en) 1995-05-02

Family

ID=17334880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5259494A Pending JPH07114404A (en) 1993-10-18 1993-10-18 Debug system for ladder program

Country Status (1)

Country Link
JP (1) JPH07114404A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997017638A1 (en) * 1995-11-09 1997-05-15 Fanuc Ltd Execution control system of sequence program
EP1640829A3 (en) * 2004-09-27 2007-01-24 Fanuc Ltd Programmable controller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997017638A1 (en) * 1995-11-09 1997-05-15 Fanuc Ltd Execution control system of sequence program
US6290403B1 (en) 1995-11-09 2001-09-18 Fanuc Ltd Sequence program execution control system
EP1640829A3 (en) * 2004-09-27 2007-01-24 Fanuc Ltd Programmable controller

Similar Documents

Publication Publication Date Title
US5465215A (en) Numerical control method and apparatus
US5315523A (en) Numerical control apparatus having a work simulation function
US8843885B2 (en) Program creation support device
US5327350A (en) Interactive type numerical control apparatus and method thereof
JP3679844B2 (en) Sequence program execution device
US5298843A (en) Method for restarting punch press machine and numerical controller
JPH103307A (en) Numerical controller
US20190121325A1 (en) Numerical controller
US5659337A (en) Message display system for programmable controller
JPH07114404A (en) Debug system for ladder program
JP5555422B2 (en) Numerical control apparatus and numerical control method
JPH08286712A (en) Editing system for sequence program
EP0578828A1 (en) Screen display method for cnc
JPH06222820A (en) Movable allowance area checking method for numerical controller
JPH06324717A (en) Edit system for sequence program
EP0538482A1 (en) Method for debugging sequential program
EP0425688A1 (en) Method of editing program for program controller
JPH08166805A (en) Editing system for sequence program
JPH07261811A (en) Tracing system for sequence program
JPH04252307A (en) Interactive numerical controller
JPH06175708A (en) Sequence program execution system
EP0440806A1 (en) System for controlling program of pc
JPH08137530A (en) Numerical controller
JPH07210218A (en) Abnormality detecting system for sequence program
JPH10161724A (en) Numerical controller

Legal Events

Date Code Title Description
S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 5

Free format text: PAYMENT UNTIL: 20070719

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100719

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20120719

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20120719

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130719

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees