JPH03288206A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH03288206A
JPH03288206A JP2089843A JP8984390A JPH03288206A JP H03288206 A JPH03288206 A JP H03288206A JP 2089843 A JP2089843 A JP 2089843A JP 8984390 A JP8984390 A JP 8984390A JP H03288206 A JPH03288206 A JP H03288206A
Authority
JP
Japan
Prior art keywords
stop
address
sequence program
calculation
arithmetic stop
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
JP2089843A
Other languages
Japanese (ja)
Inventor
Teruyo Yamaguchi
山口 照代
Yutaka Sawada
豊 沢田
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 JP2089843A priority Critical patent/JPH03288206A/en
Publication of JPH03288206A publication Critical patent/JPH03288206A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To set plural arithmetic stop addresses without complicating the hardware by updating the arithmetic stop address set to an arithmetic stop register during execution of a sequence program. CONSTITUTION:An arithmetic stop point memory 9 stores plural arithmetic stop points which serve as the addresses where the stop of execution is desired for a sequence program. Then an arithmetic stop point address setting means 2 selects one of arithmetic stop points stored in the memory 9 and sets it to an arithmetic stop register 8 as an arithmetic stop address. Thus an arithmetic stop point is selected in accordance with execution of a branch instruction and set to the register 8 as an arithmetic stop address despite the presence of such a branch instruction like a JMP instruction contained in the sequence program. As a result, plural arithmetic stop addresses can be set without complicating the hardware.

Description

【発明の詳細な説明】 [産業上の利用分野コ この発明は、プログラマブルコントローラに関し、さら
に詳しくは、デバッグ作業等における操作性を向上させ
たプログラマブルコントローラに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a programmable controller, and more particularly to a programmable controller with improved operability in debugging work and the like.

[従来の技術] 第4図は、従来のプログラマブルコントローラの一例の
ブロック図である。
[Prior Art] FIG. 4 is a block diagram of an example of a conventional programmable controller.

このプログラマブルコントローラ(51)において、(
2)はCPU、(3)はシーケンスプログラムを実行す
るシーケンス論理演算部、(54)はCPUの行う演算
を記憶するシステムROM。
In this programmable controller (51), (
2) is a CPU, (3) is a sequence logic operation unit that executes a sequence program, and (54) is a system ROM that stores operations performed by the CPU.

(5)はCPUでの演算結果を一時的に格納する演算用
メモリ、(6)は外部インタフェース、(7)はシーケ
ンスプログラムメモリ、(8)は演算停止アドレスを設
定する演算停止レジスタである。
(5) is an arithmetic memory for temporarily storing the arithmetic results of the CPU, (6) is an external interface, (7) is a sequence program memory, and (8) is an arithmetic stop register for setting an arithmetic stop address.

次に、動作について説明する。Next, the operation will be explained.

プログラマブルコントローラ(51)の運転方法には通
常運転と部分運転の2種類の方法がある。
There are two methods of operating the programmable controller (51): normal operation and partial operation.

通常運転は、シーケンスプログラムメモリ(7)に格納
されたシーケンスプログラムのアビ1フ0番地から順に
命令を実行していき、END命令まで実行すると、実行
順序が0番地に戻る。ここで、運転状態を確認して、停
止状態であれば停止の処理をする。また、実行状態であ
ればシーケンスプログラムのO番地からEND命令まで
を繰り返す。
In normal operation, instructions are executed in order from address 0 of the sequence program stored in the sequence program memory (7), and when the instructions are executed up to the END instruction, the execution order returns to address 0. Here, the operating state is checked, and if it is in a stopped state, processing is performed to stop it. Furthermore, if it is in the execution state, the sequence program is repeated from address O to the END command.

部分運転は、デバッグ作業等で使用される方法であって
、シーケンスプログラムメモリ(7)に格納されたシー
ケンスプログラムのアビ1フ0番地から順に命令を実行
するが、実行シーケンスプログラムアドレスが演算停止
レジスタ(8)に設定された演算停止アドレスに到達す
ると実行を停止する。
Partial operation is a method used in debugging work, etc., in which instructions are executed sequentially from address 1f 0 of the sequence program stored in the sequence program memory (7), but when the execution sequence program address is the operation stop register. When the calculation stop address set in (8) is reached, execution is stopped.

[発明が解決しようとする課題] 上記従来のプログラマブルコントローラ(51)の部分
運転において、例えば、第5図(a)に示すように、シ
ーケンスプログラムメモリ(7)のシーケンスプログラ
ム中にJMP命令が含まれる場合に、第5図(b)に示
すように、JMP命令の実行によりジャンプされるアド
レスNを演算停止アドレスとして演算停止レジスタ(8
)に設定してしまうと、シーケンスプログラムの実行が
停止されなくなる問題点がある。
[Problems to be Solved by the Invention] In the partial operation of the conventional programmable controller (51), for example, as shown in FIG. 5(a), a JMP instruction is included in the sequence program of the sequence program memory (7). In this case, as shown in FIG. 5(b), the address N jumped by the execution of the JMP instruction is set as the operation stop address and the operation stop register (8
), there is a problem that the execution of the sequence program will not be stopped.

そこで、演算停止レジスタ(8)を複数個設けて、複数
の演算停止アドレスを設定できるようにし、JMP命令
を実行してもどれがの演算停止アドレスでシーケンスプ
ログラムの実行が停止されるようにすることが考えられ
る。
Therefore, a plurality of operation stop registers (8) are provided so that multiple operation stop addresses can be set, so that even if a JMP instruction is executed, execution of the sequence program is stopped at which operation stop address. is possible.

しかし、演算停止レジスタ(8)を複数個設けると、シ
ーケンス論理演算部(3)のハードウェアも変更する必
要があり、ハードウェアが複雑化する問題点がある。
However, if a plurality of operation stop registers (8) are provided, it is necessary to change the hardware of the sequence logic operation section (3), and there is a problem that the hardware becomes complicated.

そこで、この発明の目的は、ハードウェアを複雑にする
ことなく、複数の演算停止アドレスを設定できるように
したプログラマブルコントローラを提供することにある
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a programmable controller that can set a plurality of operation stop addresses without complicating the hardware.

[課題を解決するための手段] この発明のプログラマブルコントローラは、演算停止レ
ジスタに格納された演算停止アドレスまで到達するとプ
ログラムの実行を停止する機能を備えたプログラマブル
コントローラにおいて、シーケンスプログラムの実行を
停止させたいアドレスである演算停止ポイントを複数個
格納する演算停止ポイントメモリと、シーケンスプログ
ラム実行中に前記演算停止ポイントメモリに格納された
複数の演算停止ポイントの1つを選択して演算停止アド
レスとして前記演算停止レジスタに設定する演算停止ア
ドレス設定手段とを具備したことを構成上の特徴とする
ものである。
[Means for Solving the Problems] The programmable controller of the present invention is a programmable controller having a function of stopping program execution when a calculation stop address stored in a calculation stop register is reached, which stops execution of a sequence program. A calculation stop point memory that stores a plurality of calculation stop points that are addresses to which the calculation is desired, and one of the plurality of calculation stop points stored in the calculation stop point memory during sequence program execution is selected as the calculation stop address to perform the calculation. The configuration is characterized in that it includes a calculation stop address setting means for setting in the stop register.

[作用コ この発明のプログラマブルコントローラでは、演算停止
アドレス設定手段は、前記演算停止ポイントメモリに格
納された複数の演算停止ポイントの1つをシーケンスプ
ログラム実行中に選択し、演算停止アドレスとして演算
停止レジスタに設定する。
[Operation] In the programmable controller of the present invention, the operation stop address setting means selects one of the plurality of operation stop points stored in the operation stop point memory during execution of the sequence program, and sets it as the operation stop address in the operation stop register. Set to .

そこで、シーケンスプログラム中にJMP命令などの分
岐命令が含まれている場合でも、分岐命令の実行に応じ
た演算停止ポイントが選択されて演算停止アドレスとし
て演算停止レジスタに設定されるようになり、確実にシ
ーケンスプログラムの実行を停止できるようになる。
Therefore, even if a sequence program includes a branch instruction such as a JMP instruction, the calculation stop point corresponding to the execution of the branch instruction is selected and set in the calculation stop register as the calculation stop address, making it reliable. It becomes possible to stop the execution of the sequence program.

[実施例] 以下、図に示す実施例に基づいてこの発明をさらに詳細
に説明する。なお、これによりこの発明が限定されるも
のではない。
[Example] Hereinafter, the present invention will be described in more detail based on the example shown in the drawings. Note that this invention is not limited to this.

第1図は、この発明の一実施例のプログラマブルコント
ローラ(1)を示すブロック図である。
FIG. 1 is a block diagram showing a programmable controller (1) according to an embodiment of the present invention.

このプログラマブルコントローラ(1)において、(2
)はCPU、(3)はシーケンス論理演算部、(4)は
システムROM、(5)は演算用メモリ、(6)は外部
インタフェース、(7)はシーケンスプログラムメモリ
、(8)は演算停止レジスタ、(9)は複数の演算停止
ポイントを格納する演算停止ポイントメモリである。
In this programmable controller (1), (2
) is the CPU, (3) is the sequence logic operation unit, (4) is the system ROM, (5) is the operation memory, (6) is the external interface, (7) is the sequence program memory, and (8) is the operation stop register. , (9) is a calculation stop point memory that stores a plurality of calculation stop points.

次に動作について説明する。Next, the operation will be explained.

演算停止ポイントメモリ(9)には、第3図(C)に示
すように、予め演算停止ポイントNaとNbとが設定さ
れている。
As shown in FIG. 3(C), calculation stop points Na and Nb are set in advance in the calculation stop point memory (9).

また、シーケンスプログラムメモリ(7)には、第3図
(a)に示すようなJMP命令を含むシーケンスプログ
ラムが格納されている。
Further, the sequence program memory (7) stores a sequence program including a JMP instruction as shown in FIG. 3(a).

シーケンスプログラムの実行開始時には、第3図(b)
の上側に示すように、演算停止ポイントメモリ(9)に
格納されている演算停止ポイントNa、Nbの中で最も
0番地に近い演算停止ポイントNaが演算停止レジスタ
(8)に設定される。
At the start of execution of the sequence program, as shown in Fig. 3(b)
As shown above, the calculation stop point Na closest to address 0 among the calculation stop points Na and Nb stored in the calculation stop point memory (9) is set in the calculation stop register (8).

シーケンスプログラムの実行が進み、JMP命令が実行
されると、それを契機として、CPU(2)は、システ
ムROM (4)に格納された手順に従って、第2図に
示すような処理を行う。次に、その処理について説明す
る。
As the sequence program progresses and the JMP command is executed, the CPU (2) uses this as an opportunity to perform the processing shown in FIG. 2 in accordance with the procedure stored in the system ROM (4). Next, the processing will be explained.

まず、ステップ(Sl)にて通常運転か部分運転かを判
断する。通常運転のときは無処理で終了し、部分運転の
ときはステップ(S2)に進む。
First, in step (Sl), it is determined whether the operation is normal operation or partial operation. In normal operation, the process ends without any processing, and in partial operation, the process proceeds to step (S2).

ステップ(S2)にて、演算停止ポイントメモリ(9)
に格納された演算停止ポイントNa、Nbの中からJM
P先アドレスXaより小さくなく最も近い演算停止ポイ
ントNbを見つける。
At step (S2), the calculation stop point memory (9)
JM from the calculation stop points Na and Nb stored in
Find the calculation stop point Nb that is not smaller than the P destination address Xa and is the closest.

次に、ステップ(S3)にて、第3図(b)の下側に示
すように、前記見つけた演算停止ポイントNbを演算停
止アドレスとして演算停止レジスタ(8)に設定し、処
理を終了する。
Next, in step (S3), as shown in the lower part of FIG. 3(b), the found calculation stop point Nb is set as the calculation stop address in the calculation stop register (8), and the process ends. .

上記処理により、演算停止アドレスNbでシーケンスプ
ログラムの実行が停止されることになる。
Through the above processing, execution of the sequence program is stopped at the calculation stop address Nb.

上記第2図の処理は、JMP命令の実行を契機としてい
るが、JMP命令の使用頻度は少ないため、処理時間の
増加は問題にならない。
The processing shown in FIG. 2 is triggered by the execution of the JMP command, but since the JMP command is used infrequently, the increase in processing time is not a problem.

なお、第2図のステップ(Sl)における運転方法の判
別は、運転方法判別用フラグを設けて、その運転方法判
別用フラグを予め設定しておき、その運転方法判別用フ
ラグをチエツクすることにより簡単に行いうる。
Note that the driving method determination in step (Sl) in FIG. 2 is performed by providing a driving method determining flag, setting the driving method determining flag in advance, and checking the driving method determining flag. It's easy to do.

他の実施例としては、演算用メモリ(5)の内部にエリ
アを確保して演算停止ポイントメモリ(9)を設けたも
のが挙げられる。
Another example is one in which an area is secured inside the calculation memory (5) and a calculation stop point memory (9) is provided.

また、他の実施例としては、第2図に示すごとき演算停
止アドレス設定処理の開始をJMP命令の実行を契機と
するに限らず、サブルーチン命令のような他の分岐命令
をも契機とするものが挙げられる。
In addition, as another example, the start of the calculation stop address setting process as shown in FIG. 2 is not limited to the execution of the JMP instruction, but is also triggered by other branch instructions such as subroutine instructions. can be mentioned.

さらに、他の実施例としては、演算停止アドレスとする
演算停止ポイントを演算停止ポイントメモリ(9)に登
録した順番に選択するようにしたものが挙げられる。
Furthermore, as another embodiment, the calculation stop points to be used as calculation stop addresses are selected in the order in which they are registered in the calculation stop point memory (9).

[発明の効果] この発明のプログラマブルコントローラによれば、1つ
の演算停止レジスタに設定する演算停止アドレスをシー
ケンスプログラムの実行中に更新していくため、ハード
ウェアの複雑化を招くことなく、複数の演算停止アドレ
スを設定できるようになる。従って、デパック作業等の
操作性が向上する。また、コストアップも回避できる。
[Effects of the Invention] According to the programmable controller of the present invention, the operation stop address set in one operation stop register is updated during execution of the sequence program, so multiple operations can be performed without complicating the hardware. You can now set the calculation stop address. Therefore, the operability of depacking work etc. is improved. Moreover, cost increases can also be avoided.

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

第1図はこの発明の一実施例のプログラマブルコントロ
ーラのブロック図、第2図はこの発明に係る演算停止ア
ドレス設定処理のフロー図、第3図(a)は第1図の装
置のシーケンスプログラムメモJJの例示図、第3図(
b)は第1図の装置の演算停止レジスタの例示図、第3
図(C)は第1図の装置の演算停止ポイントメモリの例
示図、第4図は従来のプログラマブルコントローラの一
例のブロック図、第5図(a)は第4図の装置のシーケ
ンスプログラムメモリの例示図、第5図(b)は第4図
の装置の演算停止レジスタの例示図である。 図において、(1)(51)はプログラマブルコントロ
ーラ、(2)はCPU、(3)はシーケンス論理演算部
、(7)はシーケンスプログラムメモリ、(8)は演算
停止レジスタ、(9)は演算停止ポイントメモリである
。 なお、同一符号は、同一または相当する部分を示す。
FIG. 1 is a block diagram of a programmable controller according to an embodiment of the present invention, FIG. 2 is a flow diagram of calculation stop address setting processing according to the present invention, and FIG. 3(a) is a sequence program memo of the device shown in FIG. 1. Illustrative diagram of JJ, Figure 3 (
b) is an example diagram of the arithmetic stop register of the device in Fig. 1;
Figure (C) is an example diagram of the operation stop point memory of the device in Figure 1, Figure 4 is a block diagram of an example of a conventional programmable controller, and Figure 5 (a) is an illustration of the sequence program memory of the device in Figure 4. An illustrative diagram, FIG. 5(b), is an illustrative diagram of the operation stop register of the apparatus of FIG. 4. In the figure, (1) and (51) are the programmable controller, (2) is the CPU, (3) is the sequence logic operation unit, (7) is the sequence program memory, (8) is the operation stop register, and (9) is the operation stop. It is a point memory. Note that the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】 1、演算停止レジスタに格納された演算停止アドレスま
で到達するとシーケンスプログラムの実行を停止する機
能を備えたプログラマブルコントローラにおいて、 演算停止ポイントを複数個格納する演算停 止ポイントメモリと、シーケンスプログラム実行中に前
記演算停止ポイントメモリに格納された複数の演算停止
ポイントの1つを選択して演算停止アドレスとして前記
演算停止レジスタに設定する演算停止アドレス設定手段
とを具備したことを特徴とするプログラマブルコントロ
ーラ。
[Claims] 1. In a programmable controller having a function of stopping execution of a sequence program when reaching a calculation stop address stored in a calculation stop register, the programmable controller comprises: a calculation stop point memory that stores a plurality of calculation stop points; A calculation stop address setting means for selecting one of a plurality of calculation stop points stored in the calculation stop point memory during execution of a sequence program and setting the selected one in the calculation stop register as a calculation stop address. programmable controller.
JP2089843A 1990-04-04 1990-04-04 Programmable controller Pending JPH03288206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2089843A JPH03288206A (en) 1990-04-04 1990-04-04 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2089843A JPH03288206A (en) 1990-04-04 1990-04-04 Programmable controller

Publications (1)

Publication Number Publication Date
JPH03288206A true JPH03288206A (en) 1991-12-18

Family

ID=13982046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2089843A Pending JPH03288206A (en) 1990-04-04 1990-04-04 Programmable controller

Country Status (1)

Country Link
JP (1) JPH03288206A (en)

Similar Documents

Publication Publication Date Title
JPS59133610A (en) Programmable controller
JPH03288206A (en) Programmable controller
JPH0227447A (en) Debugging system
JP3012618B1 (en) Debugging method of inspected program and its debugging method
JP3413860B2 (en) Debug method
JPS61202239A (en) Information processor
JPH02214946A (en) Debugging system
JPS63163543A (en) Information processor
JPS61147335A (en) Parameter registration system of job
JPH04369727A (en) Arithmetic unit
JPS61240341A (en) Microprogram controller
JPS61221943A (en) Arithmetic processor
JPH0477840A (en) Collection system for fault analysis system
JPH03233703A (en) Sequence controller
JPH01161444A (en) Virtual machine system
JPS6258339A (en) Instruction fetching controller
JPH01220042A (en) Central processing unit
JPH0214333A (en) Debug device for data flow program
JPH03105527A (en) Constituting system for program counter in pipeline computer
JPS62171026A (en) Pipe line arithmetic unit
JPH0384639A (en) Self-diagnostic device for information processor
JP2001067246A (en) Debug device and debug method, and recording medium for recording program for debug
JPH05100719A (en) Programmable controller
JPH04335434A (en) Nethod and device for control capable of fuzzy inference and control processing
JPS63282526A (en) System for controlling electronic computer