JPH0216646A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0216646A
JPH0216646A JP63167327A JP16732788A JPH0216646A JP H0216646 A JPH0216646 A JP H0216646A JP 63167327 A JP63167327 A JP 63167327A JP 16732788 A JP16732788 A JP 16732788A JP H0216646 A JPH0216646 A JP H0216646A
Authority
JP
Japan
Prior art keywords
instruction
programmable controller
executed
counter
counter area
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
JP63167327A
Other languages
Japanese (ja)
Inventor
Yumiko Ishiguro
石黒 由美子
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 JP63167327A priority Critical patent/JPH0216646A/en
Publication of JPH0216646A publication Critical patent/JPH0216646A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、シーケンスプログラムの実行回数をカウン
トし記憶するプログラマブルコントローラに関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a programmable controller that counts and stores the number of executions of a sequence program.

〔従来の技術〕[Conventional technology]

第6図は従来のプログラマブルコントローラのシステム
構成図で、(1)はプログラミングおよびモニタ機能を
持った周辺機器、(2)はシーケンスプログラムを実行
するプログラムを格納したROM 、 (3)はワーク
RAM 、 (4)は入力信号を演算部に送る人力部、
(5)はcpu  (演算部)、(8)は演算結果を出
力する出力部である。
Figure 6 is a system configuration diagram of a conventional programmable controller, in which (1) peripheral equipment with programming and monitoring functions, (2) ROM storing a program for executing sequence programs, (3) work RAM, (4) is a human power section that sends input signals to the calculation section;
(5) is a CPU (computation unit), and (8) is an output unit that outputs the computation results.

従来のプログラマブルコントローラは、上記のように構
成され、周辺機器(1)によってCPII (5)の演
算状態及び動作状態をモニタする。例えば、第7図(a
)のようなプログラムの場合、ロードxOの立ち上がり
時にデバイスMOは1スキヤンだけONするので、第7
図(b)に示すように、モニタのタイミングがa%bの
ときは、デバイスMOの状態がOFF状態として確認さ
れる。
A conventional programmable controller is configured as described above, and monitors the calculation state and operating state of the CPII (5) by means of the peripheral device (1). For example, in Figure 7 (a
), the device MO is turned ON for one scan at the rise of the load xO, so the 7th
As shown in Figure (b), when the monitor timing is a%b, the state of the device MO is confirmed to be OFF.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来のプログラマブルコントローラは以上のように構成
されているので、立ち上がり時に一回だけ実行する命令
はモニタ間隔にON、 OFFされて、命令が実行され
たか否かを確認するのが難しいという問題点があった。
Since conventional programmable controllers are configured as described above, there is a problem in that an instruction that is executed only once at startup is turned on and off at the monitor interval, making it difficult to confirm whether the instruction has been executed or not. there were.

この発明は、上記のような問題点を解消するためになさ
れたもので、命令が実行されたか否かを記憶できると共
に、その実行回数が記憶できるプログラマブルコントロ
ーラを得ることを目的とする。
The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a programmable controller that can store whether an instruction has been executed or not, as well as the number of times the instruction has been executed.

〔課題を解決するための手段〕[Means to solve the problem]

この発明に係るプログラマブルコントローラは、プログ
ラマブルコントローラのメモリ内に°、シーケンスプロ
グラムの各ステップ毎に命令の実行回数をカウントし、
記憶するカウンタエリアを備えたものである。
The programmable controller according to the present invention stores in the memory of the programmable controller, counts the number of executions of an instruction for each step of a sequence program,
It is equipped with a counter area for storing information.

(作用) この発明におけるプログラマブルコントローラは、シー
ケンスプログラムの各命令の実行回数をカウントするこ
とにより、命令が実行されたか否かを確認するのが難し
かった命令もその確認が可能となる。
(Operation) By counting the number of times each instruction in a sequence program is executed, the programmable controller of the present invention can confirm whether or not an instruction has been executed, even if it is difficult to confirm whether or not the instruction has been executed.

(実施例) 以下、この発明の一実施例を図に基づいて説明する。第
1図において、(1)〜(6)は第6図に示す従来のも
のと同一部分を示し、(7)はシーケンスプログラムの
実行回数を記憶するカウンタエリアである。
(Example) Hereinafter, an example of the present invention will be described based on the drawings. In FIG. 1, (1) to (6) indicate the same parts as the conventional one shown in FIG. 6, and (7) is a counter area for storing the number of executions of a sequence program.

なお、プログラム実行回数をモニタする場合は、周辺装
置(1)にて実行回数を確認したいプログラムの範囲を
指定し、プログラマブルコントローラ本体のカウンタエ
リア(7)から指定された範囲のメモリの内容を通信装
置を介して周辺装置(1)に読み込み、その結果を周辺
装置のCRTに表示することができる。
When monitoring the number of program executions, specify the range of the program whose execution number you want to check using the peripheral device (1), and communicate the memory contents of the specified range from the counter area (7) of the programmable controller main body. The data can be read into the peripheral device (1) through the device, and the results can be displayed on the CRT of the peripheral device.

上記のように構成されたプログラマブルコントローラの
カウンタエリア(7) は、第3図のように各ステップ
毎にカウンタを持ち、シーケンスプログラムの出力命令
が実行された時に第2図に示すようなそのステップに対
応したカウンタの値が1ずつ加算され、非実行時は無処
理である。
The counter area (7) of the programmable controller configured as above has a counter for each step as shown in Figure 3, and when the output command of the sequence program is executed, the counter area (7) of the programmable controller configured as above has a counter for each step as shown in Figure 2. The value of the counter corresponding to is incremented by 1, and no processing is performed when it is not executed.

従って、第7図(a)のように、ロードxOの立ち上が
り時に1スキヤンだけ実行するようなプログラムの場合
もカウンタエリアをモニタすることによって命令が実行
されたか否かを確認することができる。
Therefore, even in the case of a program that executes only one scan at the rise of the load xO as shown in FIG. 7(a), it is possible to check whether the instruction has been executed by monitoring the counter area.

これをさらに第4.5図に基づいて詳細に説明すると、
第7図(a)のようなシーケンスプログラムを実行する
場合、まずCPU (5)はOステップの命令LDXO
を実行する。その時第5図(b)のLD命令の処理を行
う、この場合、LDXOにより、CPU (5)のある
レジスタにxOの内容(第5図(a)参照)(ONかO
FFか)が書かれるので、その内容がONかOFFかを
判断する(第5図(b)Sl)、ONの場合は、0ステ
ツプのフラグをONにしく第5図(b)S2)、実行ス
テップ(この場合は0)のカウンタの内容を+tする(
45図(b)53)。そして、命令コードに、その命令
が何ステップ命令かが書かれているので、そのステップ
数を現在のステップにプラスして処理を戻す。
This will be further explained in detail based on Figure 4.5.
When executing a sequence program as shown in FIG. 7(a), the CPU (5) first executes the O step instruction LDXO.
Execute. At that time, the LD instruction shown in FIG. 5(b) is processed. In this case, the LDXO stores the contents of xO (see FIG. 5(a)) in a certain register of the CPU (5) (ON or OFF).
FF?) is written, so judge whether the content is ON or OFF (S1 in Figure 5(b)).If ON, set the 0 step flag to ON (S2 in Figure 5(b)). Add t to the counter content of the execution step (0 in this case) (
Figure 45 (b) 53). Then, since the instruction code indicates how many steps the instruction is, the number of steps is added to the current step and the process is returned.

次に1ステツプの命令がPLSであるため、第5図(C
)のPLS命令の処理を行う。尚、PLS命令は、条件
がOFFからONに変化した時のみ実行される命令であ
る。 PLS命令は、前回実行した時のフラグ(初回は
OFF )から現在の入力条件の変化を比べる。この場
合、フラグの内容がOFFであり、現在の入力条件がO
Nのため(第5図(c)S5)、フラグがOFFからO
Nへの変化であるため、デバイスMOがONシ(第5図
(c)S6)、実行ステップ(この場合はO)のカウン
タを+1する(第5図(c)S7)。
Next, since the one-step instruction is PLS, as shown in Fig. 5 (C
) processes the PLS command. Note that the PLS instruction is an instruction that is executed only when the condition changes from OFF to ON. The PLS instruction compares changes in the current input conditions from the flag from the previous execution (which was OFF the first time). In this case, the content of the flag is OFF, and the current input condition is OFF.
Because of N (Fig. 5(c) S5), the flag changes from OFF to O.
Since the change is to N, the device MO is ON (S6 in FIG. 5(c)), and the counter of the execution step (O in this case) is incremented by 1 (S7 in FIG. 5(c)).

次に、LD命令と同様、命令コード内に、PLS命令が
何ステップ命令であるかが書かれているので(PLS命
令は3)、そのステップ数を現在のステップにプラスし
て(3+1)処理を戻す。最後にEND命令の時は実行
ステップ(この場合は4)のカウンタを+1し、ステッ
プ番号をOにして処理を戻す。
Next, like the LD instruction, the number of steps for the PLS instruction is written in the instruction code (PLS instruction is 3), so add that number of steps to the current step (3+1) and process. Return. Finally, when the END command is issued, the counter of the execution step (4 in this case) is incremented by 1, the step number is set to O, and the process is returned.

このようにして、CPU (51は命令が実行されたか
を判断している。
In this way, the CPU (51) determines whether the instruction has been executed.

〔発明の効果〕〔Effect of the invention〕

以上のようにこの発明によれば、システムの中にカウン
タエリアを設けたので、命令が実行されたか否かを確認
するのが難しかった命令も容易に確認できるという効果
がある。
As described above, according to the present invention, since a counter area is provided in the system, it is possible to easily confirm whether or not an instruction has been executed, even if it is difficult to confirm whether the instruction has been executed or not.

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

第1図はこの発明の一実施例を示すプログラマブルコン
トローラのシステム構成図、第2図は上記実施例におけ
るカウント動作のフローチャート、第3図はカウンタエ
リアの詳細図、第4図と第5図(a)〜(d)はcpu
の制御を説明する説明図と動作フローチャート、第6図
は従来のシステム構成図、第7図(a)、(b)は簡単
なプログラム例とそのタイミングチャートである。 図中、(5)はcpu 、  (7)はカウンタエリア
。 なお、各図中、同一符号は同−又は相当部分を示す。
FIG. 1 is a system configuration diagram of a programmable controller showing an embodiment of the present invention, FIG. 2 is a flowchart of the counting operation in the above embodiment, FIG. 3 is a detailed diagram of the counter area, and FIGS. 4 and 5 ( a) to (d) are CPU
FIG. 6 is a conventional system configuration diagram, and FIGS. 7(a) and 7(b) are simple program examples and their timing charts. In the figure, (5) is the CPU and (7) is the counter area. In each figure, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] プログラマブルコントローラのメモリ内に、シーケンス
プログラムの各ステップ毎に命令の実行回数をカウント
し、記憶するカウンタエリアを備えたことを特徴とする
プログラマブルコントローラ。
A programmable controller comprising a counter area in a memory of the programmable controller that counts and stores the number of executions of an instruction for each step of a sequence program.
JP63167327A 1988-07-05 1988-07-05 Programmable controller Pending JPH0216646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63167327A JPH0216646A (en) 1988-07-05 1988-07-05 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63167327A JPH0216646A (en) 1988-07-05 1988-07-05 Programmable controller

Publications (1)

Publication Number Publication Date
JPH0216646A true JPH0216646A (en) 1990-01-19

Family

ID=15847691

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63167327A Pending JPH0216646A (en) 1988-07-05 1988-07-05 Programmable controller

Country Status (1)

Country Link
JP (1) JPH0216646A (en)

Similar Documents

Publication Publication Date Title
JP2526688B2 (en) Programmable controller and partial execution method of sequence program
US4722043A (en) Control system with changable time-shared execution of ladder and non-ladder programs
JPH0216646A (en) Programmable controller
JPH0827645B2 (en) Programmable controller
JPH082727Y2 (en) Programmable sequencer
JP2902888B2 (en) Programmable controller
JPH0283749A (en) Microprocessor internal interrupt control method
JPS61151745A (en) Interruption processing system
JPH04174008A (en) Sequence controller with operation confirming function
US5497481A (en) Microcomputer computer system having plural programmable timers and preventing memory access operations from interfering with timer start requests
JPH0720721Y2 (en) Programmable controller programmer
JPH04235604A (en) Programmable controller
JPH07104664A (en) Programmable controller
JPH04275603A (en) Programmable controller
JPH0462093B2 (en)
JPH04230533A (en) Interruption control circuit
JPS61286936A (en) Step operation control system
JPH0193270A (en) Reservation data processing integrated circuit
JPS58221448A (en) microcomputer
JPH02171802A (en) programmable controller
JPS63126007A (en) Programmable controller
JPH02226307A (en) Numerical controller
JPS6285348A (en) Self-monitoring circuit for signal processor
JPH05233026A (en) Microcomputer circuit
JPS63310007A (en) Data storage control equipment