JPH05289713A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH05289713A
JPH05289713A JP8879392A JP8879392A JPH05289713A JP H05289713 A JPH05289713 A JP H05289713A JP 8879392 A JP8879392 A JP 8879392A JP 8879392 A JP8879392 A JP 8879392A JP H05289713 A JPH05289713 A JP H05289713A
Authority
JP
Japan
Prior art keywords
input
reset
signal
input terminal
terminal
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.)
Granted
Application number
JP8879392A
Other languages
Japanese (ja)
Other versions
JP3341164B2 (en
Inventor
Seiji Uematsu
誠司 植松
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.)
Koyo Electronics Industries Co Ltd
Original Assignee
Koyo Electronics Industries Co Ltd
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 Koyo Electronics Industries Co Ltd filed Critical Koyo Electronics Industries Co Ltd
Priority to JP08879392A priority Critical patent/JP3341164B2/en
Publication of JPH05289713A publication Critical patent/JPH05289713A/en
Application granted granted Critical
Publication of JP3341164B2 publication Critical patent/JP3341164B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To fetch an input signal through a reset input terminal of a counter when the terminal is not used. CONSTITUTION:A counter circuit 6 which can decide the input or the non-input of the reset input signal, an E<2>PROM 5 which decides whether a reset input terminal X6 to which the reset input signal of the circuit 6 is supplied is used as a normal input terminal or not are provided. Then a CPU 1 fetches the signal of the terminal X6 as an input signal when the circuit 6 decides the non-input of the reset input signal and when the E<2>PROM 5 decides to use the terminal X6 as a normal input terminal.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はカウンタを内蔵したプロ
グラマブルコントローラ(以下PCという)、特にカウ
ンタのリセット入力端子の利用に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller (hereinafter referred to as a PC) having a built-in counter, and more particularly to use of a reset input terminal of the counter.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】従来こ
の種のPCに内蔵された高速カウンタにはリセット信号
及びカウンタ信号がそれぞれ入力するが、それはそれぞ
れ専用の端子から取り込むようになっている。ところ
が、システムのアプリケーションによっては、高速カウ
ンタを使用してもリセット入力を使用しない場合があ
る。そのような場合においても、その端子はリセット入
力のみを取り込み、ユーザーはそれを通常の入力端子と
して利用することができなかった。従って、入力信号の
端子の個数が制約されている小規模のPCにとっては不
都合であった。
2. Description of the Related Art Conventionally, a reset signal and a counter signal are input to a high-speed counter incorporated in a PC of this type, but they are taken from dedicated terminals. However, depending on the application of the system, the reset input may not be used even if the high speed counter is used. Even in such a case, the terminal took in only the reset input and the user could not use it as a normal input terminal. Therefore, this is inconvenient for a small-scale PC in which the number of input signal terminals is limited.

【0003】本発明は、このような問題点を解決するた
めになされたものであり、カウンタのリセット端子を使
用しない場合には、その端子から入力信号を取り込むこ
とができるようにしたPCを提供することを目的とす
る。
The present invention has been made in order to solve such a problem, and provides a PC capable of taking in an input signal from the terminal when the reset terminal of the counter is not used. The purpose is to do.

【0004】[0004]

【課題を解決するための手段】本発明に係るPCは、リ
セット入力信号を入力するかどうかを選択できるカウン
タ回路と、カウンタ回路のリセット入力信号が供給され
るリセット入力端子を通常の入力端子として利用するか
どうかが設定される記憶手段と、カウンタ回路がリセッ
ト入力信号を入力しないように選択され、かつ記憶手段
がリセット入力端子を通常の入力端子として利用するも
のとして設定されたとき、入力転送時に、リセット入力
端子の信号を入力信号として取り込む演算手段とを有す
る。
A PC according to the present invention uses a counter circuit which can select whether to input a reset input signal and a reset input terminal to which the reset input signal of the counter circuit is supplied as a normal input terminal. When the storage means to be used is set and the counter circuit is selected not to input the reset input signal, and the storage means is set to use the reset input terminal as a normal input terminal, the input transfer is performed. At the same time, it has an arithmetic means for taking in the signal of the reset input terminal as an input signal.

【0005】[0005]

【作用】本発明においては、カウンタ回路がリセット入
力信号を入力しないように選択され、かつ記憶手段がリ
セット入力端子を通常の入力端子として利用するものと
して設定されたときには、リセット入力端子の信号を入
力信号として取り込むことができる。このため、入力信
号の端子数を機械的に増加させずに、実質的に増加させ
ることができる。
In the present invention, when the counter circuit is selected not to input the reset input signal and the storage means is set to use the reset input terminal as a normal input terminal, the signal of the reset input terminal is changed. It can be captured as an input signal. Therefore, the number of terminals of the input signal can be substantially increased without mechanically increasing it.

【0006】[0006]

【実施例】図1は本発明の一実施例に係るPCの構成を
示すブロック図である。このPCは、図示のように、C
PU1、ROM2、RAM3、I/Oポート4、E
ROM5、及びカウンタ回路6から構成されている。R
OM2にはCPU1の演算処理を司どるシステムプログ
ラムが格納されており、RAM3には入出力データ等が
格納される。I/Oポート4は、外部から信号を入力
し、或いは演算の実行結果を出力するインタフェースで
あり、この実施例においては例えば出力端子は16点で
あり、入力端子は6点(X0〜X5)あるものとする。
PROM5は、電源がOFFになってもそこに格納
されたデータは消滅しないので、継続的に使用されるデ
ータ、プログラム等が格納される。カウンタ回路6はリ
セット入力端子(X6)からリセット信号を入力し、カ
ウント入力端子(X7)からカウント信号を入力する。
このリセット入力端子(X6)からの信号線はI/Oポ
ート4の入力端子側にも接続されている。そして、カウ
ンタ回路6は後述するようにリセット力信号を入力する
かどうかを選択できる機能を持っている。
1 is a block diagram showing the configuration of a PC according to an embodiment of the present invention. This PC is C
PU1, ROM2, RAM3, I / O port 4, E 2 P
It is composed of a ROM 5 and a counter circuit 6. R
The OM 2 stores a system program that controls the arithmetic processing of the CPU 1, and the RAM 3 stores input / output data and the like. The I / O port 4 is an interface for inputting a signal from the outside or outputting an execution result of a calculation. In this embodiment, for example, 16 output terminals and 6 input terminals (X0 to X5) are provided. There is.
Since the data stored in the E 2 PROM 5 is not erased even when the power is turned off, continuously used data, programs and the like are stored. The counter circuit 6 inputs a reset signal from the reset input terminal (X6) and a count signal from the count input terminal (X7).
The signal line from the reset input terminal (X6) is also connected to the input terminal side of the I / O port 4. The counter circuit 6 has a function of selecting whether or not to input the reset force signal as described later.

【0007】図2はEPROM5のレジスタ5aに格
納されているデータを示した図である。このレジスタ5
aにはリセット入力端子をリセット入力として使用する
か或いは通常の入力端子として使用するかを選択するデ
ータが格納される。例えばリセット入力端子を通常の入
力端子として使用する場合にはコード「3」を設定し、
本来のリセット入力端子として使用する場合にはコード
「4」を設定する。なお、このデータは、設定ミスを避
けるために数値を設定しているが、フラグを設定しても
よい。
FIG. 2 is a diagram showing the data stored in the register 5a of the E 2 PROM 5. This register 5
In a, data for selecting whether to use the reset input terminal as a reset input or a normal input terminal is stored. For example, when using the reset input terminal as a normal input terminal, set code "3",
Set code "4" when used as the original reset input terminal. Although a numerical value is set for this data in order to avoid setting mistakes, a flag may be set.

【0008】図3はカウンタ回路6の入力部分の構成を
示したブロック図である。レジスタ61にはリセット信
号を入力するかどうかを定めるフラグが設定され、例え
ばリセット入力信号を入力しない場合には「0」が設定
され、リセット入力信号を入力する場合には「1」が設
定される。この設定はCPU1からレジスタ61に書き
込む。アンドゲート62はレジスタ61の設定信号とリ
セット入力信号とを入力し、レジスタ61に「0」が設
定されている場合にはリセット入力信号を阻止し、
「1」が設定されている場合にはリセット入力信号をカ
ウンタ63のリセット端子Rに出力する。
FIG. 3 is a block diagram showing the configuration of the input portion of the counter circuit 6. A flag that determines whether to input a reset signal is set in the register 61. For example, "0" is set when the reset input signal is not input, and "1" is set when the reset input signal is input. It This setting is written in the register 61 from the CPU 1. The AND gate 62 inputs the setting signal and the reset input signal of the register 61, blocks the reset input signal when "0" is set in the register 61,
When “1” is set, the reset input signal is output to the reset terminal R of the counter 63.

【0009】図4はPCの全体の処理過程を示すフロー
チャートであり、図5はその内の入力転送の詳細を示し
たフローチャートである。運転を開始するに、リセット
入力端子を本体のリセット入力端子として使用するか又
は通常の入力端子として使用するかどうかを予め決定
し、そして、通常の入力端子として使用する場合は図2
のデータレジスタ5aにコード「3」を格納する。リセ
ット入力端子として使用する場合にはデータレジスタ5
aにコード「4」を格納する。また、カウンタ回路6の
レジスタ61には、リセット信号を取り込まない場合に
は「0」を格納し、リセット信号を取り込む場合には
「1」を格納しておく。
FIG. 4 is a flow chart showing the overall processing steps of the PC, and FIG. 5 is a flow chart showing the details of the input transfer. Before starting the operation, it is determined in advance whether the reset input terminal is used as the reset input terminal of the main body or the normal input terminal, and when the reset input terminal is used as the normal input terminal, FIG.
The code "3" is stored in the data register 5a. Data register 5 when used as a reset input terminal
The code “4” is stored in a. Further, "0" is stored in the register 61 of the counter circuit 6 when the reset signal is not fetched and "1" is stored when the reset signal is fetched.

【0010】運転を開始すると、図4に示すように、C
PU1は入力転送によりI/Oポート4を介して入力信
号を取り込み、それをRAM3に格納する(S1)。CPU
1は全ての入力信号を取り込むと、次にROM2又はE
PROM5に格納されたプログラムに基づいて既に取
り込んである入力データを使用して演算処理を行い、演
算結果をRAM3に一旦格納する(S2)。次に、CPU1
はその演算結果を読み出してI/Oポート4を介して出
力する(S3)。以上の演算処理が電源がオフになるまで又
は停止指令があるまでサイクリックに繰り返される。
When the operation is started, as shown in FIG.
The PU1 takes in an input signal through the I / O port 4 by input transfer and stores it in the RAM 3 (S1). CPU
1 takes in all input signals, then ROM2 or E
2 Based on the program stored in the PROM 5, the arithmetic processing is performed using the input data that has already been fetched, and the calculation result is temporarily stored in the RAM 3 (S2). Next, CPU1
Reads out the calculation result and outputs it through the I / O port 4 (S3). The above arithmetic processing is cyclically repeated until the power is turned off or there is a stop command.

【0011】入力転送においては、図5に示すように、
CPU1は入力端子X0〜X5の入力信号のI/Oポー
ト4を介して取り込み、それをRAM3に格納する(S1
1) 。この処理は従来の処理を同じである。次に、E
PROM5のレジスタ5aに格納されているコードを読
み出す(S12) 。そして、そのコードが「4」であるかど
うかを判断し(S13) 、「4」であると判断された場合に
はリセット入力端子X6を本来のカウンタ6のリセット
入力端子として処理し(S14) 、この入力転送においては
何等処理をしない(S14) 。そのコードが「4」でないと
判断されたときは(S13) 、すなわち「3」である場合に
は、この時レジスタ61には「0」が設定されておりリ
セット信号を取り込まないよう処理されており、リセッ
ト入力端子(X6)を通常の入力端子として処理し、リ
セット入力端子X6のデータをP/Oポート4を介して
取り込みRAM3に格納する(S15) 。
In input transfer, as shown in FIG.
The CPU 1 fetches the input signals of the input terminals X0 to X5 via the I / O port 4 and stores it in the RAM 3 (S1
1). This process is the same as the conventional process. Then E 2
The code stored in the register 5a of the PROM 5 is read (S12). Then, it is determined whether or not the code is "4" (S13), and if it is determined to be "4", the reset input terminal X6 is processed as the original reset input terminal of the counter 6 (S14). , No processing is performed in this input transfer (S14). When it is determined that the code is not "4" (S13), that is, when it is "3", "0" is set in the register 61 at this time and the reset signal is processed so as not to be taken in. Therefore, the reset input terminal (X6) is processed as a normal input terminal, and the data of the reset input terminal X6 is fetched through the P / O port 4 and stored in the RAM 3 (S15).

【0012】[0012]

【発明の効果】以上のように本発明によれば、一定の条
件下においてリセット入力端子の信号を入力信号として
取り込むことができるようにしたので、入力端子数を機
械的に増加させずに、実質的に増加させることができ、
入力端子の個数が制約されているPCにおいては、多く
のユーザーアプリケーションに使用できるようになる。
As described above, according to the present invention, the signal of the reset input terminal can be taken in as an input signal under a certain condition, so that the number of input terminals can be increased without mechanical increase. Can be increased substantially,
A PC having a limited number of input terminals can be used for many user applications.

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

【図1】本発明の一実施例に係るPCの構成を示すブロ
ック図である。
FIG. 1 is a block diagram showing a configuration of a PC according to an embodiment of the present invention.

【図2】EPROMに格納されているデータを示した
図である。
FIG. 2 is a diagram showing data stored in an E 2 PROM.

【図3】カウンタ回路6の入力部分の構成を示したブロ
ック図である。
FIG. 3 is a block diagram showing a configuration of an input portion of a counter circuit 6.

【図4】PCの全体の処理過程を示すフローチャートで
ある。
FIG. 4 is a flowchart showing the overall processing steps of the PC.

【図5】図4の入力転送の詳細を示したフローチャート
である。
5 is a flowchart showing details of the input transfer of FIG.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 リセット入力信号を入力するかどうかを
選択できるカウンタ回路と、 前記カウンタ回路のリセット入力信号が供給されるリセ
ット入力端子を通常の入力端子として利用するかどうか
が設定される記憶手段と、 前記カウンタ回路がリセット入力信号を入力しないよう
に選択され、かつ前記記憶手段がリセット入力端子を通
常の入力端子として利用するものとして設定されたと
き、入力転送時に、リセット入力端子の信号を入力信号
として取り込む演算手段とを有するプログラマブルコン
トローラ。
1. A counter circuit capable of selecting whether or not to input a reset input signal, and storage means for setting whether or not to use a reset input terminal supplied with the reset input signal of the counter circuit as a normal input terminal. When the counter circuit is selected not to input the reset input signal and the storage means is set to use the reset input terminal as a normal input terminal, the signal of the reset input terminal is transferred at the time of input transfer. A programmable controller having an arithmetic means for receiving as an input signal.
JP08879392A 1992-04-09 1992-04-09 Programmable controller Expired - Fee Related JP3341164B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08879392A JP3341164B2 (en) 1992-04-09 1992-04-09 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08879392A JP3341164B2 (en) 1992-04-09 1992-04-09 Programmable controller

Publications (2)

Publication Number Publication Date
JPH05289713A true JPH05289713A (en) 1993-11-05
JP3341164B2 JP3341164B2 (en) 2002-11-05

Family

ID=13952735

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08879392A Expired - Fee Related JP3341164B2 (en) 1992-04-09 1992-04-09 Programmable controller

Country Status (1)

Country Link
JP (1) JP3341164B2 (en)

Also Published As

Publication number Publication date
JP3341164B2 (en) 2002-11-05

Similar Documents

Publication Publication Date Title
EP0102242B1 (en) Data processing apparatus
KR920010431A (en) Information processing device and information processing method using the same
EP0497485A2 (en) Computer for implementing two-operand instructions
JP2003058381A (en) Processor realizing exception processing setting by program
JPH05289713A (en) Programmable controller
JP2594130B2 (en) Semiconductor circuit
JPS6167148A (en) Microcomputer
US5677996A (en) Fuzzy computer
JP2968321B2 (en) Data processing device
JPH01156823A (en) Microprocessor unit
JPS633338A (en) Pipeline register
JPH0689182A (en) Down load device for data flow processor
JPH01145730A (en) Data destination control system
JPH05289714A (en) Programmable controller
JPS58169243A (en) Instruction processor
JPH0410031A (en) Microprogram controller
JPS60178524A (en) One-chip microcomputer
JPS63118839A (en) Advance control system for instruction address of instruction processor
JPH03149620A (en) Microprocessor
JPH05108852A (en) Data driving type data processor
JPH01118926A (en) Pipeline processor
JPH06131173A (en) Microprogram control system
JPH0620071A (en) Data driven information processor
JPH05258124A (en) Interface circuit
JPH02205987A (en) Arithmetic processing system

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Year of fee payment: 6

Free format text: PAYMENT UNTIL: 20080823

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

Year of fee payment: 7

Free format text: PAYMENT UNTIL: 20090823

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

Free format text: PAYMENT UNTIL: 20100823

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110823

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees