JPS62162105A - Flow chart type programmable controller - Google Patents

Flow chart type programmable controller

Info

Publication number
JPS62162105A
JPS62162105A JP61003402A JP340286A JPS62162105A JP S62162105 A JPS62162105 A JP S62162105A JP 61003402 A JP61003402 A JP 61003402A JP 340286 A JP340286 A JP 340286A JP S62162105 A JPS62162105 A JP S62162105A
Authority
JP
Japan
Prior art keywords
buffer
information
instruction
user program
address
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
JP61003402A
Other languages
Japanese (ja)
Inventor
Takashi Hinoyama
隆 日野山
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP61003402A priority Critical patent/JPS62162105A/en
Publication of JPS62162105A publication Critical patent/JPS62162105A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To improve program debugging function by making it possible to know not only the course of execution of a user program but also control input/output signal information of a point of time and internal control information. CONSTITUTION:A trace instruction is set at an arbitrary point in a user program. When the trace information is read out from a user program memory 5, control input/output signal information and internal control information designated by the operand section of the trace instruction are stored in a buffer B2. Processing is made until the buffer 2 is filled. Information stored in buffers B1 and B2 can be displayed in the CRT of a console 4 or printed out by switching to a tool service mode and giving command to read information by the console 4. Thus, the program debugging is made based on information outputted to outside.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 この発明は、フローチャート方式で記述されたユーザプ
ログラムtその流れに沿って直列逐次処理するフローチ
ャート式プログラマブルコントローラ(以下PCと称す
)の改良に関する。
DETAILED DESCRIPTION OF THE INVENTION <Industrial Application Field> The present invention relates to an improvement in a flowchart type programmable controller (hereinafter referred to as PC) that serially processes a user program t written in a flowchart type along its flow.

〈従来の技術〉 フローチャート式PCは、ラダーチャート式などの他の
プログラミング方式に比べ、大規模な制御全効率よく記
述できるが、プログラムのデバッグがしにくいという欠
点がめる。
<Prior Art> A flowchart type PC allows large-scale control to be described more efficiently than other programming methods such as a ladder chart type, but it has the disadvantage that it is difficult to debug programs.

フローチャート式PCのデバッグはトレースと称するや
フ方で行なわれている。つまり、ユーザプログラムを実
行させ、フローチャート上のある点をどのような経路で
処理が進行していくのかを調べるのでろる〇 そのため従来のフローチャート式PCでは、トレース機
能の実現手段として、ユーザプログラム処理過程で頭次
実行される各命令のアドレスの最新実行の複数ステップ
分ヲ頭番に更新しながらバッファに記憶する実行順序記
憶手段と、実行される命令のアドレスと予め設定され之
トリガアドレスとを比較して両者の一致を検出する手段
と、上記トリガアドレスとの一致が検出されてから所定
ステップ後に上記実行順序記憶手段による上記バッファ
の内容更新を停止する手段と、上記バッファの内容を外
部に読み出す手段とを設けている。
Debugging of a flowchart type PC is carried out by a method called tracing. In other words, it is necessary to execute a user program and check the route through which processing progresses at a certain point on a flowchart. Therefore, in conventional flowchart type PCs, user program processing is used as a means of realizing the trace function. Execution order storage means stores in a buffer the address of each instruction executed first in the process while updating the address of the most recent execution of the plurality of steps to the first number, and compares the address of the instruction to be executed with a preset trigger address. means for detecting a match between the two, means for stopping the execution order storage means from updating the contents of the buffer after a predetermined step after the match with the trigger address is detected, and means for reading the contents of the buffer to the outside. and.

〈発明が解決しようとする問題点〉 従来のトレース機能によれば、フローチャート(S−ザ
ブログラム)上の任意の点を上記トリガアドレスとして
設定しておくと、その点の前後をどのような経路で制御
が流れたかを、上記実行順序記憶手段のバッファの内容
から知ることができる。これはデバッグ全行なう上で非
常に有益な情報である。しかし、これだけでは充分なデ
バッグが行なえない。制御の流れが分っても、める点(
ステップ)を通過したときの制御入出力信号情報や内部
制御情報が分らないため、能率の工いデバッグ作業が行
なえない。
<Problems to be Solved by the Invention> According to the conventional trace function, if an arbitrary point on a flowchart (S-program) is set as the trigger address, the route before and after that point can be controlled. It is possible to know from the contents of the buffer of the execution order storage means whether the execution sequence has been executed or not. This is very useful information for all debugging efforts. However, this alone is not sufficient for debugging. Even if you understand the flow of control, there are some points (
Since the control input/output signal information and internal control information when passing through the step) are not known, efficient debugging cannot be performed.

この発明は上述した従来の問題点に鑑みなされたもので
、その目的は、従来のトレース機能に加え、ある点に制
御が進んだ時点において必要と思われる制御入出力信号
情報や内部制御情報全採取できるようにし念70−チャ
ート式PCを提供することにめる。
This invention was made in view of the above-mentioned conventional problems, and in addition to the conventional trace function, the purpose of this invention is to provide all the control input/output signal information and internal control information that are considered necessary when control progresses to a certain point. We decided to provide a 70-chart type PC so that it can be collected.

く問題点を解決するための手段〉 そこでこの発明では、ユーザプログラム中に設定された
特定命令の実行時に該命令で指定されている特定の制御
入出力信号情報および内部制御情報を第2バッファに記
憶する手段と、この第2バッファの内容全外部に読み出
す手段とを付加した。
Means for Solving Problems> Therefore, in the present invention, when a specific instruction set in a user program is executed, specific control input/output signal information and internal control information specified by the instruction are stored in a second buffer. A means for storing and a means for reading out the entire contents of this second buffer are added.

〈実施例〉 第1図はこの発明の一実施例によるPCの全体的な構成
を示している。このPCは、CPU(演算処理部)1と
、システムプログラムメモリ2と。
<Embodiment> FIG. 1 shows the overall configuration of a PC according to an embodiment of the present invention. This PC includes a CPU (arithmetic processing unit) 1 and a system program memory 2.

7ステムワーキングメモリ3と、プログラミングコンソ
ール4と5ユーザプログラムメモリ5と。
7 stem working memory 3, programming console 4 and 5 user program memory 5.

入力回路6と、出力回路7と、データメモリ8とを備え
ている。
It includes an input circuit 6, an output circuit 7, and a data memory 8.

入力回路6に多数の制御入力信号源が接続される。出力
回路6は多数の制御出力信号IJI/−に有し、これに
制御対象機器が接続される。またタイマやカウンタの制
御機能を実現したり、内部補助リレーを使った制御を行
なうために、データメモリ8にはタイマエリア、カウ/
タエリア、内部補助リレーエリアなどが設定されていて
、これをユーザプログラムで任意に使用できる。このデ
ータメモリ8の内容が前述した内部制御情報であり。
A number of control input signal sources are connected to the input circuit 6. The output circuit 6 has a large number of control output signals IJI/-, to which a device to be controlled is connected. In addition, in order to realize timer and counter control functions and to perform control using internal auxiliary relays, data memory 8 has a timer area, counter
area, internal auxiliary relay area, etc. are set, and these can be used arbitrarily by the user program. The contents of this data memory 8 are the aforementioned internal control information.

制御入出力信号情報というのは入力回路6および出力回
路7の入出力信号の状態のことでめる。
The control input/output signal information refers to the states of input/output signals of the input circuit 6 and the output circuit 7.

CPUIば、フローチャート方式で記述されたユーザプ
ログラムの各命令をメモリ5から順次読み出して処理し
、制御入出力信号状態および内部制御情報に従った制御
の流れを作り出し、その結果として制御出力信号および
内部制御情報を更新していく。
The CPU sequentially reads each instruction of a user program written in a flowchart format from the memory 5, processes it, creates a control flow according to control input/output signal states and internal control information, and as a result controls output signals and internal control information. The control information will be updated.

プログラミングコンソール4は、キーボードなどの人力
装肚とCRTなどの表示装置、さらにはプリンタなどの
出力装置金有する。このコンソール4でプロダラミ/グ
操作全行なう他、この発明の要部に係わるデバッグ操作
2行なう。
The programming console 4 has a human input device such as a keyboard, a display device such as a CRT, and an output device such as a printer. This console 4 is used to perform all programming/programming operations, as well as two debugging operations related to the essential parts of the present invention.

第2図は上記PCの動作の概要を示すフローチャートで
ろる。
FIG. 2 is a flowchart showing an overview of the operation of the PC.

ステップ200でイニンギル処理を行ない、ステップ2
10でコンソール4の動作モードの設定がユーザプログ
ラムの実行モードかツールサービスモードかを判定する
。ツールサービスモードであれはステップ211に進み
、コンソール4から与えられる各種のコマンドを処理す
る。
Iningill processing is performed in step 200, and step 2
At step 10, it is determined whether the operation mode setting of the console 4 is a user program execution mode or a tool service mode. In the tool service mode, the process advances to step 211 and processes various commands given from the console 4.

上記ツールサービスモードにおいて、任意のトリガアド
レスAtヲ設定するとともにトンース要求フラグ全オン
またはオフにする入力操作上行なう。また、ユーザプロ
グラム中の任意の点に前述の特定命令を挿入する入力操
作を行なう。
In the tool service mode, an arbitrary trigger address At is set, and all tone request flags are turned on or off by an input operation. In addition, an input operation is performed to insert the above-mentioned specific command at an arbitrary point in the user program.

上記特定命令のこと全本実施列ではトレース命令と名付
けた。トレース命令は、制御入出力信号情報および内部
制御情報の任意のものを採取するための命令で、操作コ
ードとオペランド部からなる。オペ271部で採取した
い情報を指令する。
The above specific instruction is named the trace instruction in the entire implementation series. The trace instruction is an instruction for collecting any control input/output signal information and internal control information, and consists of an operation code and an operand part. Command the information you want to collect in the 271st part of the operation.

つまり、制御入出力信号には個別番号(I10アドレス
と言う)が付いており、その番号に1つめるいは複数の
制御入出力信号を指定できる。同様に。
That is, each control input/output signal is assigned an individual number (referred to as an I10 address), and one or more control input/output signals can be designated to that number. Similarly.

データメモリ8の内部制御情報のうちの任意のものをメ
モリアトVス(あるいはタイマ番号、カラ/り番号、内
部補助リレ一番号)で指定する。
Any of the internal control information of the data memory 8 is designated by a memory address (or timer number, color/relay number, internal auxiliary relay number).

第2図のフローチャートにおけるユーザプログラムの実
行モードの動作全説明する。
The entire operation of the user program execution mode in the flowchart of FIG. 2 will be explained.

いまトレース要求フラグ上オフにしであるとすると、ス
テップ220からステップ221に進み、プログラムカ
ウンタで指定されるアドレスA1 の命令をユーザプロ
グラムメモリ8から読み取フ、その命令が上記トレース
命令でなければステップ222→223と進んで命令を
実行する。その後ステップ224でプログラムカラ/り
の内容Ai  を更新し、ステップ220に戻る。
If the trace request flag is currently turned off, the process proceeds from step 220 to step 221, where the instruction at address A1 specified by the program counter is read from the user program memory 8. If the instruction is not the above-mentioned trace instruction, step 222 →Proceed to 223 and execute the command. Thereafter, in step 224, the contents Ai of the program color/re are updated, and the process returns to step 220.

したがって、トレース要求フラグがオフで、またトレー
ス命令も設定されていなければ、ステップ220−22
1→222→223→224の処理?繰返す。
Therefore, if the trace request flag is off and the trace command is not set, step 220-22
1 → 222 → 223 → 224 processing? Repeat.

トリガアドレスAt が設定され−かつトレース要求フ
ラグがオンになっていると、ステップ230でプログラ
ムカラ/りの命令アドレスAiヲバッ7アB1にストア
する。次にステップ231で一致フラグFがオ/″t”
になっているか否か?判定する。初期状態にては一致フ
ラグFはオフ“0“であり、その場合はステップ232
 K進み、命令アドレスAi  とトリガアドレスAt
  とが一致するか否かを判定する。一致しなければそ
のままステップ221に進み、一致したときはステップ
233で一致フラグFkオ/″1″にしてからステップ
221 K進む。F=“1′になると、ステップ240
が実行され。
If the trigger address At is set and the trace request flag is on, in step 230 the instruction address Ai of the program color is stored in the buffer B1. Next, in step 231, the match flag F is set to O/"t".
Is it? judge. In the initial state, the match flag F is off "0", in which case step 232
K advance, instruction address Ai and trigger address At
Determine whether or not they match. If they do not match, the process directly advances to step 221; if they do match, the match flag Fk is set to "1" in step 233, and then the process advances to step 221K. When F=“1′, step 240
is executed.

トレース安来フラグがここでオフになる。The trace Yasugi flag is turned off here.

バッファBlは命令アドレス′fclflえば1o個格
納できる容量があり、ステップ230では/フトレジス
タ式に最新の命令アドレスAl  fストアしていき、
最新の10ステップ分の命令アドレスがここに格納され
る。そしてAi =Atになってがらlステップ後には
ステップ230は実行されなくなり。
The buffer Bl has a capacity to store 10 instruction addresses 'fclfl, and in step 230, the latest instruction address Alf is stored in the /ft register format.
The instruction addresses for the latest 10 steps are stored here. Then, step 230 is no longer executed after l steps after Ai = At.

コ バッファB1の内容はそのまま温存される。The contents of co-buffer B1 are preserved as is.

次にトレース命令の実行について説明する。ユーザプロ
グラム中の任意の点(ステップ)にトレース命令が設定
してあり、そのトレース命令がステップ221でユーザ
プログラムメモリ5から読み出されると、ステップ22
2→250と進み、ζこでこの命令が実行される。つま
シ、トレース命令ノオペラ/ド部で指定されている制御
入出力信号情報および内部制御情報をバッファB2にス
トアするーこのバッファB2一杯になるまで、ステップ
250の実行ごとに上記の処理を行なう。
Next, execution of a trace instruction will be explained. A trace command is set at an arbitrary point (step) in the user program, and when the trace command is read from the user program memory 5 in step 221, the trace command is read out from the user program memory 5 in step 22.
The process proceeds from 2 to 250, and this instruction is executed at ζ. The control input/output signal information and internal control information specified in the opera/do portion of the trace instruction are stored in the buffer B2.The above processing is performed every time step 250 is executed until the buffer B2 is full.

バク7アBlおよびB2にストアされた情報は。The information stored in B7A B1 and B2 is.

ツールサービスモードに切り換えてコンソール4にて情
報読み出しのコマンドを与えることで、コンソール4の
CRTK表示したりグリ/ドアウドできる。このように
外部出力され念情報に基づいてプログラムデバッグ全行
なう。
By switching to the tool service mode and giving a command to read information on the console 4, it is possible to display the CRTK on the console 4 and perform grid/door operations. All program debugging is performed based on the externally outputted information in this way.

なお、上記トレース命令は必要なくなったらユーザプロ
グラム中から削除する。
Note that the above trace command is deleted from the user program when it is no longer needed.

〈発明の効果〉 以上詳細に説明したように、この発明に係るフローチャ
ート式PCにあっては、ユーザプログラムの実行経路だ
けでなく、ある時点の制御入出力信号情報や内部制御情
報を知ることができるので、プログラムデバッグ機能が
従来より大幅に向上する。
<Effects of the Invention> As explained in detail above, in the flowchart type PC according to the present invention, it is possible to know not only the execution path of the user program but also control input/output signal information and internal control information at a certain point in time. This greatly improves program debugging capabilities compared to conventional methods.

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

第1図はこの発明の一実施例によるPCのブロック図、
第2図は同上PCの動作を示すフローチャートである。 B1・・・第1バッファ、B2・・・第2バッファ。
FIG. 1 is a block diagram of a PC according to an embodiment of the present invention.
FIG. 2 is a flowchart showing the operation of the above PC. B1...first buffer, B2...second buffer.

Claims (1)

【特許請求の範囲】[Claims] フローチャート方式で記述されたユーザプログラムをそ
の流れに沿って直列逐次処理するフローチャート式プロ
グラマブルコントローラにおいて、ユーザプログラム処
理過程で順次実行される各命令のアドレスの最新実行の
複数ステップ分を順番に更新しながら第1バッファに記
憶する実行順序記憶手段と、実行される命令のアドレス
と予め設定されたトリガアドレスとを比較して両者の一
致を検出する手段と、上記トリガアドレスとの一致が検
出されてから所定ステップ後に上記実行順序記憶手段に
よる上記第1バッファの内容更新を停止する手段と、ユ
ーザプログラム中に設定された特定命令の実行時に該命
令で指定されている特定の制御入出力信号情報および内
部制御情報を第2バッファに記憶する状態記憶手段と、
上記第1バッファおよび第2バッファの内容を外部に読
み出す手段とを設けたことを特徴とするフローチャート
式プログラマブルコントローラ。
In a flowchart type programmable controller that serially processes a user program written in a flowchart format along its flow, the address of each instruction that is executed sequentially in the user program processing process is updated in sequence by the number of steps of the latest execution. an execution order storage means for storing in a first buffer; a means for comparing an address of an instruction to be executed with a preset trigger address to detect a match between the two; and a predetermined step after a match with the trigger address is detected. means for later stopping the update of the contents of the first buffer by the execution order storage means, and specific control input/output signal information and internal control information specified by the specific instruction set in the user program when the instruction is executed. state storage means for storing in a second buffer;
A flowchart type programmable controller characterized by further comprising means for reading the contents of the first buffer and the second buffer to the outside.
JP61003402A 1986-01-13 1986-01-13 Flow chart type programmable controller Pending JPS62162105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61003402A JPS62162105A (en) 1986-01-13 1986-01-13 Flow chart type programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61003402A JPS62162105A (en) 1986-01-13 1986-01-13 Flow chart type programmable controller

Publications (1)

Publication Number Publication Date
JPS62162105A true JPS62162105A (en) 1987-07-18

Family

ID=11556380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61003402A Pending JPS62162105A (en) 1986-01-13 1986-01-13 Flow chart type programmable controller

Country Status (1)

Country Link
JP (1) JPS62162105A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01223503A (en) * 1988-03-03 1989-09-06 Fanuc Ltd Program execution control system for pc
JPH0242505A (en) * 1988-08-03 1990-02-13 Fanuc Ltd Trace control system for program controller
EP0436019A1 (en) * 1987-08-27 1991-07-10 Fanuc Ltd. Signal trace control system for pmc
JPH03250201A (en) * 1990-01-19 1991-11-08 Mitsubishi Electric Corp Method for printing out program by programming device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0436019A1 (en) * 1987-08-27 1991-07-10 Fanuc Ltd. Signal trace control system for pmc
EP0436019A4 (en) * 1987-08-27 1992-10-14 Fanuc Ltd. Signal trace control system for pmc
JPH01223503A (en) * 1988-03-03 1989-09-06 Fanuc Ltd Program execution control system for pc
JPH0242505A (en) * 1988-08-03 1990-02-13 Fanuc Ltd Trace control system for program controller
JPH03250201A (en) * 1990-01-19 1991-11-08 Mitsubishi Electric Corp Method for printing out program by programming device

Similar Documents

Publication Publication Date Title
JPS62162105A (en) Flow chart type programmable controller
JPH06242819A (en) Signal state control system for programmable controller
JP4542494B2 (en) Programmable display device, debugging support program, and debugging device control method
EP0435139A2 (en) A programmable controller for executing SFC language programs
JPH0410081B2 (en)
JPH0283749A (en) Internal interruption control system for microprocessor
JPH08286734A (en) Programmable display device
JP3413860B2 (en) Debug method
JPS5949609A (en) Programmable controller equipped with simulation performing function
JP2001067246A (en) Debug device and debug method, and recording medium for recording program for debug
JPS5835648A (en) Program execution controlling system
JPH0458303A (en) Programmable controller
JPH06101045B2 (en) Data flow type information processing device simulation device
JPS59183405A (en) Programmable controller
JPH10207737A (en) Emulator and emulation system
JPS63180139A (en) Microcomputer for evaluation of program
JPH0281141A (en) Trace control system
JPH02110706A (en) Data display system for pc
JPS61269703A (en) Programmable controller
JPH0214333A (en) Debug device for data flow program
JPH05307487A (en) Multi-task monitor
JPS63172307A (en) Programmable controller
JPH04284543A (en) Microcomputer program tracing device
JPS60123938A (en) Debugging system of program
JPH08307526A (en) Simulate system for electronic exchange