JPS61269705A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPS61269705A
JPS61269705A JP11164185A JP11164185A JPS61269705A JP S61269705 A JPS61269705 A JP S61269705A JP 11164185 A JP11164185 A JP 11164185A JP 11164185 A JP11164185 A JP 11164185A JP S61269705 A JPS61269705 A JP S61269705A
Authority
JP
Japan
Prior art keywords
processor
general
command
programmable controller
response
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
JP11164185A
Other languages
Japanese (ja)
Inventor
Tetsuo Doi
土井 哲雄
Atsushi Takashima
淳 高島
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 JP11164185A priority Critical patent/JPS61269705A/en
Publication of JPS61269705A publication Critical patent/JPS61269705A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To facilitate the debugging processing, etc., of a programmable controller by providing a control circuit which executes one step of a user program in response to a command from a general processor in a dedicated processor. CONSTITUTION:The one-step execution control circuit 107 which executes one step of the user program in response to a command from the general processor 9 is provided in the dedicated processor 10. When a one-step execution command for debugging, etc., is supplied from a programming console 7 to the processor 9, the processor 9 sends out 1 as both the least significant digit bit and the 1st bits of a data bus DB to access a circuit 107 at the same time. Then, an internal FF is set for a maximum time required for one step of a basic instruction and a clock pulse CP is supplied to a program counter 10. At this time, clock pulses CP are supplied to the counter by two machine cycles and one step of the basic instruction is executed in the processor 10 in response to the command from the processor 9.

Description

【発明の詳細な説明】 (発明の分野) この発明は、命令実行速度の高速化を達成したプログラ
マブル・コントローラの改良に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of the Invention) The present invention relates to an improvement in a programmable controller that achieves increased instruction execution speed.

(発明の概要) この発明では、応用命令実行用の汎用プロセッサと基本
命令実行用の専用プロセッサとを併用して命令実行速度
の高速化を達成したスキャニング方式のプログラマブル
・コントローラにおいて、前記専用プロセッサ内に前記
汎用プロセッサからのコマンドに応答して、ユーザプロ
グラムの1ステップ実行を可能とする制御回路を内蔵し
、これによりこの種併用型プログラマブル・コントロー
ラにおけるデバッグ処理等の容易化を図ったものである
(Summary of the Invention) The present invention provides a scanning-type programmable controller that uses both a general-purpose processor for executing application instructions and a dedicated processor for executing basic instructions to achieve faster instruction execution speed. The controller has a built-in control circuit that enables single-step execution of a user program in response to commands from the general-purpose processor, thereby facilitating debugging and other operations in this type of combined programmable controller. .

(従来技術とその問題点) 第6図に従来の一般的なプログラマブル・コントローラ
のハードウェア構成を示す。
(Prior art and its problems) FIG. 6 shows the hardware configuration of a conventional general programmable controller.

このプログラマブル・コントローラは、汎用のマイクロ
プロセッサ1.ROMで構成されたシステムメモリ2.
バッテリバックアップまたはFROM等で構成されたユ
ーザプログラムメモリ3゜RAMで構成されたI10メ
モリ4.入カニニット5.出カニニット6及びプログラ
ミングコンソール7を主体として構成されている。
This programmable controller uses a general-purpose microprocessor 1. System memory composed of ROM2.
3. User program memory configured with battery backup or FROM, etc.; 4. I10 memory configured with RAM; 4. Crab knit 5. It is mainly composed of an output unit 6 and a programming console 7.

なお、8はシステムメモリ2.ユーザプログラムメモリ
3.I10メモリ4をチップセレクトするためのアドレ
スデコーダである。
Note that 8 is system memory 2. User program memory 3. This is an address decoder for chip selecting the I10 memory 4.

また、よく知られているように、システムメモリ2内に
はプログラマブル・コントローラの基本動作を司どる制
御プログラム及びインタプリタプログラムなどが格納さ
れており、またユーザプログラムメモリ3内には例えば
ユーザが任意に設定したラダー図に対応した一連の命令
が記憶されており、更にI10メモリ4内には入カニニ
ット5から読込まれた入力データ、出カニニット6へ送
出するための出力データが記憶されている。
Furthermore, as is well known, the system memory 2 stores control programs and interpreter programs that govern the basic operations of the programmable controller, and the user program memory 3 stores, for example, programs that the user can freely program. A series of commands corresponding to the set ladder diagram are stored, and input data read from the input unit 5 and output data to be sent to the output unit 6 are also stored in the I10 memory 4.

このプログラマブル・コントローラにあっては、マイク
ロプロセッサ1内の汎用レジスタの1つをプログラムカ
ウンタ1aとして割り当て、このプログラムカウンタ1
aの内容によりユーザプログラムメモリ3を順次アクセ
スするようにしている。
In this programmable controller, one of the general-purpose registers in the microprocessor 1 is assigned as a program counter 1a, and this program counter 1
The user program memory 3 is accessed sequentially depending on the contents of a.

従って、デバッグ処理等の際にプログラミングコンソー
ル7から1ステップ実行指令が発せられた場合には、プ
ログラムカウンタ1aで指定される1命令をユーザプロ
グラムメモリ3から読出し、これをシステムプログラム
に従って実行するとともに、その実行終了を検出して、
プログラムカウンタ1aの歩進を停止させるだけでよい
Therefore, when a one-step execution command is issued from the programming console 7 during debugging or the like, one instruction specified by the program counter 1a is read from the user program memory 3, and executed according to the system program. Detecting the end of its execution,
It is sufficient to simply stop the progress of the program counter 1a.

このように、汎用マイクロプロセッサ1だけを用いたプ
ログラマブル・コントローラにあっては、1ステップ実
行処理を簡単に行なうことができるが、その反面汎用マ
イクロプロセッサでビット処理を行なうには時間がかか
り、入出力応答性には限界がある。
In this way, a programmable controller that uses only the general-purpose microprocessor 1 can easily perform one-step execution processing, but on the other hand, it takes time to perform bit processing with a general-purpose microprocessor, and There are limits to output responsiveness.

そこで、最近のプログラマブル・コントローラにあって
は、LD、AND、OR,OUT等の基本命令について
はビット処理を得意とする専用のマイクロプロセッサを
使用し、CNT、TIM等の応用命令についてはデータ
処理を得意とする汎用マイクロプロセッサを使用する構
成が採用されている。
Therefore, in recent programmable controllers, a dedicated microprocessor that is good at bit processing is used for basic instructions such as LD, AND, OR, and OUT, and data processing is used for applied instructions such as CNT and TIM. The configuration uses a general-purpose microprocessor that specializes in

しかしながら、このような応用命令実行用の汎用プロセ
ッサと基本命令実行用の専用プロセッサとを併用するプ
ログラマブル・コントローラにあっては、専用プロセッ
サ側にプログラムカウンタを内蔵するようにしているた
め、汎用プロセッサ側からプログラムカウンタを管理す
ることが困難で、この結果1ステップ実行処理を可能と
するためには極めて複雑な回路構成を採用せざるを得な
いという問題点があった。
However, in programmable controllers that use both a general-purpose processor for executing application instructions and a dedicated processor for executing basic instructions, the dedicated processor side has a built-in program counter, so the general-purpose processor side Therefore, it is difficult to manage the program counter from the start, and as a result, an extremely complicated circuit configuration must be adopted in order to enable one-step execution processing.

(発明の目的) この発明の目的は、応用命令実行用の汎用プロセッサと
基本命令実行用の専用プロセッサとを併用するようにし
たスキャニング方式のプログラマブル・コントローラに
おいて、簡単な回路構成によって1ステップ実行処理を
可能とすることにおる。
(Objective of the Invention) An object of the present invention is to provide a scanning-type programmable controller that uses a general-purpose processor for executing application instructions and a dedicated processor for executing basic instructions, and that uses a simple circuit configuration to process one-step execution. We aim to make this possible.

(発明の構成と効果) この発明は上記の目的を達成するために、応用命令実行
用の汎用プロセッサと基本命令実行用の専用プロセッサ
とを併用するようにしたスキャニング方式のプログラマ
ブル・コントローラにおいて; 前記汎用プロセッサからのコマンドに応答して、ユーザ
プログラムの1ステップ実行を可能とする制御回路を前
記専用プロセッサ内に設けたことを特徴とする。
(Structure and Effects of the Invention) In order to achieve the above object, the present invention provides a scanning-type programmable controller that uses both a general-purpose processor for executing application instructions and a dedicated processor for executing basic instructions; The present invention is characterized in that a control circuit is provided in the special-purpose processor to enable one-step execution of a user program in response to a command from a general-purpose processor.

このような構成によれば、極めて簡単な回路構成によっ
て、しかも汎用プロセッサ側では単純なコマンド送出処
理を行なうだけで、1ステップ実行処理を可能とするこ
とができる。
According to such a configuration, it is possible to perform one-step execution processing with an extremely simple circuit configuration and by simply performing a simple command sending process on the general-purpose processor side.

(実施例の説明) 第1図は、本発明に係るプログラマブル・コントローラ
のハードウェア構成を示すブロック図である。なお、同
図において第6図に示した従来例と同一構成部分につい
ては、同符号を付して説明は省略する。
(Description of Embodiments) FIG. 1 is a block diagram showing the hardware configuration of a programmable controller according to the present invention. In this figure, the same components as those of the conventional example shown in FIG. 6 are designated by the same reference numerals, and the explanation thereof will be omitted.

このプログラマブル・コントローラは、応用命令実行用
の汎用プロセッサ9と、基本命令実行用の専用プロセッ
サ10とを主体として構成されている。
This programmable controller mainly consists of a general-purpose processor 9 for executing application instructions and a dedicated processor 10 for executing basic instructions.

専用プロセッサ10内には、ユーザプログラムメモリ3
をアクセスするためのプログラムカウンタ101.ユー
ザプログラムメモリ3から読み出された命令を解読する
命令解読機102.解読された命令を実行する演算回路
103が設けられるほか、汎用プロセッサ9のアドレス
バスまたは専用プロセッサ10内のプログラムカウンタ
101を択一的にユーザプログラムメモリ3に接続する
マルチプレクサ104.同様に汎用プロセッサ9のアド
レスバスまたは命令解読機102から得られるアドレス
バスをI10メモリ4に択一的に接続するマルチプレク
サ105及びプログラムカウンタ101.ユーザプログ
ラムメモリ3.I10メモリ4のデータバスを、汎用マ
イクロプロセッサ9に択一的に接続するマルチプレクサ
106とが設けられている。
The dedicated processor 10 includes a user program memory 3.
program counter 101. An instruction decoder 102 for decoding instructions read from the user program memory 3. In addition to an arithmetic circuit 103 for executing the decoded instructions, a multiplexer 104 . Similarly, a multiplexer 105 and a program counter 101 . User program memory 3. A multiplexer 106 is provided for selectively connecting the data bus of the I10 memory 4 to the general-purpose microprocessor 9.

なお、ここまでの構成については、従来各種の文献で公
知であるため詳細な説明は省略するが、要するに専用プ
ロセッサ10ではプログラムカウンタ101を零にリセ
ットした後、ユーザプログラムメモリ3から順次命令を
読み出すとともに、これが基本命令である場合に限り命
令解読機102、演算回路103で解読及び実行を行な
い、他方応用命令と解読された場合には、汎用プロセッ
サ9に対して割込み指令を与え、制御権を汎用プロセッ
サ側に手渡す。
The configuration up to this point is well known in various documents, so a detailed explanation will be omitted, but in short, the dedicated processor 10 resets the program counter 101 to zero, and then sequentially reads instructions from the user program memory 3. In addition, only when this is a basic instruction, the instruction decoder 102 and arithmetic circuit 103 decode and execute it.On the other hand, when it is decoded as an application instruction, an interrupt command is given to the general-purpose processor 9, and control authority is given. Hand over to the general-purpose processor side.

すると、汎用プロセッサ9側では、その時点におけるプ
ログラムカウンタ101の内容を読込み、これに基づい
てユーザプログラムメモリ3をアクセスして、該当する
命令を汎用プロセッサ9へと読込んで、該当する応用命
令の実行処理を行なうものである。
Then, the general-purpose processor 9 side reads the contents of the program counter 101 at that point, accesses the user program memory 3 based on this, reads the corresponding instruction into the general-purpose processor 9, and executes the corresponding application instruction. It performs processing.

このように、応用命令実行用の汎用プロセッサと基本命
令実行用の専用プロセッサとを併用するプログラマブル
・コントローラにおいて、本発明の特徴は汎用プロセッ
サ9からのコマンドに応答して、ユーザプログラムの1
ステップ実行を可能とする1ステップ実行制御回路10
7を専用プロセッサ10内に設けた点にある。
As described above, in a programmable controller that uses both a general-purpose processor for executing application instructions and a dedicated processor for executing basic instructions, the feature of the present invention is that in response to a command from the general-purpose processor 9, one of the user programs
1-step execution control circuit 10 that enables step execution
7 is provided within the dedicated processor 10.

1ステップ実行制御回路107の詳細を第2図に示す。Details of the one-step execution control circuit 107 are shown in FIG.

同図に示す如く、この]ステップ実実行制御路は当該回
路の特定アドレスを検出するアドレスデコーダ1071
と、このアドレスデコーダ1071の出力に応答して、
汎用マイクロプロセッサ9のデータバスDBの第1ビツ
ト目DB1゜第1ビツト目DB1の内容をそれぞれ読込
む2個のD型フリップフロップ1072.1073と、
フリップフロップ1072から出力される5TOP信号
を所定時間遅延させる2個の遅延用り型フリップフロッ
プ1074.1075と、フリップフロップ1073か
ら出力される5TART信号でセットされ、かつ遅延後
の5TOP信号でリセットされるRSフリップフロップ
1076と、このフリップフロップ1076のQ出力で
プログラムカウンタ用のクロックCP7をゲート制御す
るアンドゲート1077と、RESET信号またはフリ
ップフロップ1076のQ出力で択一的にリセットされ
るタイミングパルス発生回路1078を主体として構成
されている。
As shown in the figure, this step actual execution control path is connected to an address decoder 1071 that detects a specific address of the circuit.
In response to the output of this address decoder 1071,
Two D-type flip-flops 1072 and 1073 read the contents of the first bit DB1 of the data bus DB of the general-purpose microprocessor 9, respectively;
Two delay flip-flops 1074 and 1075 delay the 5TOP signal output from the flip-flop 1072 for a predetermined time, and are set by the 5TART signal output from the flip-flop 1073 and reset by the delayed 5TOP signal. an RS flip-flop 1076, an AND gate 1077 that gate-controls the program counter clock CP7 with the Q output of this flip-flop 1076, and a timing pulse generator that is alternatively reset by the RESET signal or the Q output of the flip-flop 1076. It is mainly configured with a circuit 1078.

以上の構成において、プログラミングコンソール7から
デバッグ等のために1ステップ実行指令が汎用プロセッ
サ9に与えられた場合、汎用プロセッサ9としてはデー
タバスDBのDBO,DBlの双方に1″を送出し、同
時に1ステップ実行制御回路107をアクセスすればよ
い。
In the above configuration, when a one-step execution command is given to the general-purpose processor 9 for debugging or the like from the programming console 7, the general-purpose processor 9 sends 1'' to both DBO and DBl of the data bus DB, and simultaneously It is sufficient to access the one-step execution control circuit 107.

するとフリップフロップ1076は、基本命令の1ステ
ツプに要する最大時間だけセット状態に保持され、クロ
ックパルスCP7をプログラムカウンタ101へ供給す
る(第3図、第4図参照)。
The flip-flop 1076 is then held in the set state for the maximum time required for one step of the basic instruction, and supplies a clock pulse CP7 to the program counter 101 (see FIGS. 3 and 4).

ここで、第5図に示されるように基本命令の中でLD、
OR,ANDについては1マシンサイクルM1を必要と
し、またOUT、KRについては2マシンサイクルMl
、M2を必要とする。
Here, as shown in FIG. 5, among the basic commands, LD,
One machine cycle M1 is required for OR and AND, and two machine cycles M1 are required for OUT and KR.
, M2 is required.

従って、2マシンサイクル分だけクロックパルスCP7
をプログラムカウンタPCへ供給してやれば、汎用プロ
セッサ9からのコマンドに応答して専用プロセッサ10
内において基本命令の1ステップ実行を行なわせること
ができるわけである。
Therefore, the clock pulse CP7 is equal to 2 machine cycles.
is supplied to the program counter PC, the dedicated processor 10 responds to the command from the general-purpose processor 9.
This allows one-step execution of a basic instruction within the program.

このように本発明にあっては、データバスDBのDBO
,DBIにそれぞれ“1″を送る形で専用プロセッサ1
0に対してコマンドを与えることにより専用プロセッサ
10内において基本命令の1ステップ実行を行なわせる
ことができ、またそのための具体的な回路としても、第
2図に示す如く、単にフリップフロップとわずかのゲー
ト素子を組合せるだけで済み、専用プロセッサ10を例
えばゲートアレイで構成する場合でも簡単に製作するこ
とができる。
In this way, in the present invention, the DBO of the data bus DB
, the dedicated processor 1 by sending "1" to each DBI.
By giving a command to 0, it is possible to execute one step of a basic instruction within the dedicated processor 10, and the specific circuit for this purpose is simply a flip-flop and a small number of circuits, as shown in Figure 2. It is only necessary to combine the gate elements, and the dedicated processor 10 can be easily manufactured even if it is constituted by, for example, a gate array.

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

第1図は本発明に係るプログラマブル・コントローラの
ハードウェア構成を示すブロック図、第2図は1ステッ
プ実行制御回路の詳細を示す回路図、第3図は第2図に
おける各部の信号状態を示すタイムチャート、第4図は
第2図における各部の信号状態を示すタイムチャート、
第5図は各命令とマシンサイクルとの関係を示すタイム
チャー1−1第6図は従来のプログラマブル・コントロ
ーラの一例を示すブロック図である。
Fig. 1 is a block diagram showing the hardware configuration of the programmable controller according to the present invention, Fig. 2 is a circuit diagram showing details of the one-step execution control circuit, and Fig. 3 shows signal states of each part in Fig. 2. Time chart, Figure 4 is a time chart showing the signal status of each part in Figure 2,
FIG. 5 is a time chart 1-1 showing the relationship between each instruction and a machine cycle. FIG. 6 is a block diagram showing an example of a conventional programmable controller.

Claims (1)

【特許請求の範囲】[Claims] (1)応用命令実行用の汎用プロセッサと基本命令実行
用の専用プロセッサとを併用するようにしたスキャニン
グ方式のプログラマブル・コントローラにおいて; 前記汎用プロセッサからのコマンドに応答して、ユーザ
プログラムの1ステップ実行を可能とする制御回路を前
記専用プロセッサ内に設けたことを特徴とするプログラ
マブル・コントローラ。
(1) In a scanning-type programmable controller that uses both a general-purpose processor for executing application instructions and a dedicated processor for executing basic instructions; executing one step of a user program in response to a command from the general-purpose processor; A programmable controller characterized in that a control circuit that enables said dedicated processor is provided within said dedicated processor.
JP11164185A 1985-05-24 1985-05-24 Programmable controller Pending JPS61269705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11164185A JPS61269705A (en) 1985-05-24 1985-05-24 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11164185A JPS61269705A (en) 1985-05-24 1985-05-24 Programmable controller

Publications (1)

Publication Number Publication Date
JPS61269705A true JPS61269705A (en) 1986-11-29

Family

ID=14566461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11164185A Pending JPS61269705A (en) 1985-05-24 1985-05-24 Programmable controller

Country Status (1)

Country Link
JP (1) JPS61269705A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54102940A (en) * 1978-01-31 1979-08-13 Nec Corp Information process system
JPS5533298A (en) * 1978-08-24 1980-03-08 Texas Instruments Inc Programmable inteligent process controller
JPS57111639A (en) * 1980-12-29 1982-07-12 Fujitsu Ltd Program debugging system
JPS57203162A (en) * 1981-06-08 1982-12-13 Toshiba Corp One-chip microcomputer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54102940A (en) * 1978-01-31 1979-08-13 Nec Corp Information process system
JPS5533298A (en) * 1978-08-24 1980-03-08 Texas Instruments Inc Programmable inteligent process controller
JPS57111639A (en) * 1980-12-29 1982-07-12 Fujitsu Ltd Program debugging system
JPS57203162A (en) * 1981-06-08 1982-12-13 Toshiba Corp One-chip microcomputer

Similar Documents

Publication Publication Date Title
JPS62179033A (en) Ic microprocessor
JPS61269705A (en) Programmable controller
JP2784001B2 (en) Instruction processing circuit of programmable controller
JP2758624B2 (en) Speed control method of micro program
JP2808757B2 (en) Microprocessor for debugging
JP2575025B2 (en) In-circuit emulator
JPH05298088A (en) Microcomputer
JPH0411895B2 (en)
JPS6148001A (en) Programmable controller
JPS6128144A (en) Executing device of tracing
JP2618703B2 (en) High-speed operation processing method of programmable sequence controller
JPS6310444B2 (en)
JPH02263256A (en) Microcomputer and controller
JPH0683986A (en) Single chip microcomputer
JPS58213370A (en) Processor of microprogram control system
JPS59106048A (en) Microprocessor system
JPH1153224A (en) Watch dog timer and microcomputer
JPH02176830A (en) Interruption control system
JPH01161541A (en) Single-chip microcomputer for evaluation
JPH0259828A (en) Support device for development of microcomputer
JPS6349941A (en) Arithmetic processing unit
JPS6148189B2 (en)
JPH04353927A (en) Micro processor
JPS61264432A (en) Sequence arithmetic controller
JPH04162150A (en) Watchdog timer control circuit