JPS63133205A - Data input system for programmable controller - Google Patents

Data input system for programmable controller

Info

Publication number
JPS63133205A
JPS63133205A JP28150586A JP28150586A JPS63133205A JP S63133205 A JPS63133205 A JP S63133205A JP 28150586 A JP28150586 A JP 28150586A JP 28150586 A JP28150586 A JP 28150586A JP S63133205 A JPS63133205 A JP S63133205A
Authority
JP
Japan
Prior art keywords
input
data
output
signal
register
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
JP28150586A
Other languages
Japanese (ja)
Inventor
Masao Aoki
青木 正夫
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 JP28150586A priority Critical patent/JPS63133205A/en
Publication of JPS63133205A publication Critical patent/JPS63133205A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To eliminate the wrong data arithmetic operations by keeping the input data in a register until an instruction is executed based on this input data and therefore securing a sure reading action of a CPU even though the duration of data is shorter than the scan time. CONSTITUTION:The input data DATA 0-7 are read and kept by a register 1d based on the input of a strobe signal STRB and the register 1d clears its contents with input of a clear signal CLS. An FF1e is set by the input of the signal STRB to store that the input data is read and then reset with input of the signal CLS. Meanwhile an output signal BUSY is validated. A decoder 1c transmits a gate signal G based on the control signal sent from a control line 4 to actuate a register 1d and reads the output data with a CPU 2. In such a way, the input data is temporarily stored in the register 1d and then read by the CPU 2 when this unit receives an access.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、プログラマブルコントローラのデータ入力
方式に関するもので、特にパルス状のデータ入力の持続
時間(オン時間)がスキャンタイムより短い複数ビット
のデータ入力に好適な新規なデータ入力方式に関するも
のである。
[Detailed Description of the Invention] [Field of Industrial Application] This invention relates to a data input method for a programmable controller, and particularly relates to multi-bit data in which the duration (on time) of pulse-like data input is shorter than the scan time. The present invention relates to a new data input method suitable for input.

(従来の技術〕 第3図はこの種の従来方式を説明するデータ入カニニッ
トのブロック図で、図において、(1)は絶縁とノイズ
を除去するフィルタ等よりなる入力インタフェース(l
a)とこのインタフェース(la)の出力信号を後述す
る人出力データバス(3)へ出力するための出力ゲート
(lb)及び後述する制御ライン(4)からの制御信号
に基づいてユニットがアクセスされたことを判別すると
共に上記出力ゲート(1b)を制御すべくゲート信号G
を送出するデコーダ(IC)を有するデータ人カニニッ
ト、(2)はプログラマブルコントローラのCPU、(
3)は複数ビットからなるCPUの入出力データバス、
(4)は複数ビットからなるCPUの制御ラインを示す
(Prior art) Figure 3 is a block diagram of a data input unit explaining this type of conventional system.
a) and an output gate (lb) for outputting the output signal of this interface (la) to a human output data bus (3) to be described later, and a control signal from a control line (4) to be described later, the unit is accessed. The gate signal G is used to determine whether the
(2) is the CPU of the programmable controller, (
3) is a CPU input/output data bus consisting of multiple bits,
(4) shows a CPU control line consisting of multiple bits.

次に上記構成に係る従来のデータ入力方式を説明する。Next, a conventional data input method according to the above configuration will be explained.

データ信号DATEO〜DATE7  (8ビット列の
場合)はλカインタフェース(1a)を介して常に出力
ゲート(1b)に入力されており、CPU (2)のプ
ログラムでこのユニット(1)がアクセスされたとき、
デコーダ(IC)からのゲート信号Gにより、入力デー
タは出力ゲート(1b)を介して入出力データバス(3
)を出力されてCPIJ(2)で読み取られ、演算に使
われる。
Data signals DATEO to DATE7 (in the case of 8-bit string) are always input to the output gate (1b) via the λ interface (1a), and when this unit (1) is accessed by the program of the CPU (2), ,
By the gate signal G from the decoder (IC), the input data is passed through the input/output data bus (3) via the output gate (1b).
) is output, read by CPIJ (2), and used for calculations.

ここで、入力データの持続時間(オン時間) Tdとプ
ログラマブルコントローラのスキャンタイムTsとは密
接な関係があり、第4図に示す如く、入力データの持続
時間TdがスキャンタイムTsより大きい場合は1スキ
ャン中常時入力データを読み取ることができ、例えば図
中Aが本ユニットに入力されるデータを演算に使う命令
の実行タイミングとすると、Aがどのタイミングであっ
ても入力データは常に存在し、読み取ることができる。
Here, there is a close relationship between the input data duration (ON time) Td and the scan time Ts of the programmable controller, and as shown in FIG. 4, if the input data duration Td is greater than the scan time Ts, Input data can be read at all times during scanning; for example, if A in the figure is the execution timing of an instruction that uses data input to this unit for calculation, the input data will always exist and be read no matter what timing A is. be able to.

(発明が解決しようとする問題点〕 しかるに、第5図に示すように、入力データの持続時間
TdがスキャンタイムTsより短いTd< Tsの場合
は次のような問題点かある。つまり、図中タイミングA
tではデータは存在して読み取ることができるが、タイ
ミングA2ではデータの持続が終ったあとでデータは存
在してなく、誤ったデータを(:PU (2)は読み取
ることになり、正常なデータが得られないことになる。
(Problems to be Solved by the Invention) However, as shown in FIG. 5, when the duration Td of the input data is shorter than the scan time Ts (Td<Ts), the following problem occurs. Medium timing A
At timing t, the data exists and can be read, but at timing A2, after the data duration ends, the data does not exist, and erroneous data (:PU (2) is read. will not be obtained.

このように、Td< Tsのときが問題で、従来方式の
欠点である。この欠点は、外部の入出力信号を命令の実
行のつとアクセスする、いわゆるダイレクト方式による
入出力制御のプログラマブルコントローラにおいて存在
する。
In this way, a problem occurs when Td<Ts, which is a drawback of the conventional method. This drawback exists in programmable controllers that use a so-called direct method for input/output control, in which external input/output signals are accessed during instruction execution.

そこで、この発明は上記の如〈従来方式における問題点
を解消するためになされたもので、入力データの持続時
間TdがスキャンタイムTsより短くても確実にCPU
に読み取ることができるようにしたプログラマブルコン
トローラのデータ入力方式を提供するものである。
Therefore, the present invention was made to solve the problems in the conventional method as described above, and it is possible to reliably use the CPU even if the duration Td of input data is shorter than the scan time Ts.
The present invention provides a data input method for a programmable controller that can be read into a programmable controller.

〔問題点を解決するための手段〕[Means for solving problems]

この発明に係るプログラマブルコントローラのデータ入
力方式は、複数のビット数よりなる入力データをストロ
ーブ信号の入力に基づいて読み込んで保持しクリア信号
の入力に基づいて記憶内容をクリアするレジスタと、上
記ストローブ信号の入力に基づいてセットされて出力信
号を有効とじ入力データが読み込まれたことを記憶し、
上記クリア信号の入力に基づいてリセットされて出力信
号を無効とするフリップフロップと、CPUのプログラ
ムに基づいて入出力データバスを制御する制御ラインよ
りアクセスされた時にこれを判別してゲート信号を送出
すると共に、データ出力動作完了後上記クリア信号を送
出するデコーダと、上記ゲート信号の入力に基づいて上
記レジスタの出力を入出力データバスへ出力する出力ゲ
ートとを備え、上記入力データを上記ストローブ信号に
より上記レジスタに保持させておき、同時にストローブ
信号を上記フリップフロップで記憶させて外部へ出力し
、プログラムでアクセスされたときに上記デコーダより
ゲート信号を発生させてレジスタの出力を人出力データ
バスへ出力し、その後のタイミングでデコーダよりレジ
スタとフリップフロップをリセットすることを特徴とす
るものである。
The data input method of the programmable controller according to the present invention includes a register that reads and holds input data consisting of a plurality of bits based on the input of a strobe signal, and clears the memory contents based on the input of a clear signal, and the strobe signal. is set based on the input to enable the output signal and remember that the input data has been read;
The flip-flop is reset based on the input of the clear signal to invalidate the output signal, and the control line that controls the input/output data bus based on the CPU program determines when this is accessed and sends out a gate signal. It also includes a decoder that sends out the clear signal after the completion of the data output operation, and an output gate that outputs the output of the register to the input/output data bus based on the input of the gate signal, and outputs the input data to the strobe signal. At the same time, the strobe signal is stored in the above flip-flop and output to the outside, and when accessed by the program, a gate signal is generated from the above decoder and the output of the register is sent to the human output data bus. It is characterized in that the registers and flip-flops are reset by the decoder at the subsequent timing.

(作用) この発明によれば、データが入力されてからそのデータ
を必要とする命令の実行時までレジスタに保持させてお
けるため、データの持続時間がスキャンタイムより短く
ても確実にCPUに読み取ることができる。
(Function) According to this invention, since data can be held in a register from the time it is input until the time when the instruction that requires it is executed, the data can be reliably read by the CPU even if the data duration is shorter than the scan time. be able to.

〔実施例〕〔Example〕

以下、この発明の一実施例を図に基づいて説明する。第
1図において第3図と同一符号は同一部分を示し、(l
d)はストローブ信号、5TRBの入力に基づいて入力
データDATEO〜DATE7を読み込んで保持し、後
述するクリア信号CLSの入力に基づいて記憶内容をク
リアするレジスタ、(le)は上記ストローブ信号5T
RBの入力に基づいてセットされて入力データが読み込
まれたことを記憶し、上記クリア信号CLSの入力に基
づいてリセットされるフリップフロップで、その間出力
信号BtlSYを有効とする。なお、デコーダ(1c)
は本ユニットがアクセスされた時制御ライン(4)から
の制御信号に基づいてこれを判別しゲート信号Gを送出
してレジスタ(1d)の出力データQ0〜Q7を出力ゲ
ート(1b)を介して入出力データバス(3)へ出力し
、CPU (2)で読み取るようになされ、このデータ
出力動作が完了した後のタイミングでクリア信号CLS
を送出してレジスタ(1d)の内容をクリアすると共に
フリップフロップ(le)をリセットするようになって
いる。
Hereinafter, one embodiment of the present invention will be described based on the drawings. In FIG. 1, the same symbols as in FIG. 3 indicate the same parts, and (l
d) is a register that reads and holds input data DATEO to DATE7 based on the input of the strobe signal 5TRB, and clears the stored contents based on the input of the clear signal CLS, which will be described later; (le) is the strobe signal 5T;
The flip-flop is set based on the input of RB to remember that the input data has been read, and is reset based on the input of the clear signal CLS, during which the output signal BtlSY is made valid. In addition, the decoder (1c)
determines when this unit is accessed based on the control signal from the control line (4), sends out the gate signal G, and outputs the output data Q0 to Q7 of the register (1d) through the output gate (1b). It is output to the input/output data bus (3) and read by the CPU (2), and the clear signal CLS is output at the timing after this data output operation is completed.
is sent to clear the contents of the register (1d) and reset the flip-flop (le).

すなわち、上記構成においては、入力データをレジスタ
(1d)で保持しておき、これをこのデータを使う命令
の実行時、つまり本ユニットがアクセスされる迄継続さ
せ、CPU (2)がデータを読み取ってから保持を解
き、次の入力データに備えようとするものである。
That is, in the above configuration, the input data is held in the register (1d), and this is continued until the instruction that uses this data is executed, that is, until this unit is accessed, and the CPU (2) reads the data. It then releases the hold and prepares for the next input data.

上記実施例を第2図のタイミングチャートに基づいて詳
細に説明する。
The above embodiment will be explained in detail based on the timing chart of FIG.

入力データDATEO〜DATE7が有効になってから
ストローブ信号5TRBが有効になるように外部機器(
図示せず)で制御するものとする。
The external device (
(not shown).

入力データDATEO〜DATE7が存在し、タイミン
グBにおいてストロ−プロ信号5TRBが有効になった
とき、入力DATEONDATE7はレジスタ(1d)
へ読み込まれ、その出力Q。−Q7が入力データに応じ
て有効になり、保持される。
When input data DATEO to DATE7 exist and the strobe signal 5TRB becomes valid at timing B, the input DATEONDATE7 is input to the register (1d).
and its output Q. -Q7 is enabled and held according to input data.

次に、スキャンのタイミングAにおいて本入力データを
読み取る命令が実行され、本ユニットがアクセスされた
とき、デコーダ(IC)でこれを識別し、ゲート信号G
を発生させ、レジスタ(1d)の出力q0〜Q7を出力
ゲート(1b)を介して入出力データバス(3)へデー
タDBO〜DB7として出力し、CPtJ (2)で読
み取る。また、このデータ出力動作が完了した後のタイ
ミングCでデコーダ(Ic)よリフリア信号CLSを発
生させ、レジスタ(ld)の内容をクリアするとともに
フリップフロップ(le)をリセットする。
Next, at scan timing A, when the instruction to read the main input data is executed and this unit is accessed, this is identified by the decoder (IC) and the gate signal G
The outputs q0 to Q7 of the register (1d) are output as data DBO to DB7 to the input/output data bus (3) via the output gate (1b) and read by CPtJ (2). Further, at timing C after this data output operation is completed, the decoder (Ic) generates a refractive signal CLS to clear the contents of the register (ld) and reset the flip-flop (le).

ここで、フリップ70ツブ(1e)は、ストローブ信号
5TRBによりセットされ、入力データが読み込まれた
ことを記憶しておく。このフリップフロップ(le)は
、前述のようにレジスタ(ld)の出力Qo””Q7が
入出力データバス(3)へ出力された後のタイミングC
においてクリア信号CLSでリセットされる。つまりフ
リップフロップ(1e)の出力信号BUSYは、データ
が入力されてからCPU(2)が読み取るまで有効で、
データがレジスタ(ld)に読み込まれたことと、CP
t1 (2)がそのデータを読み取ってないことを示す
フラグである。そしてこのBUSY信号は外部機器(図
示せず)において使われ、このBt]SY信号が有効で
あれば次のデータを出力しないように制御しデータが重
複してレジスタ(1d)に読み込まれることを防止する
ように使うことができる。
Here, the flip 70 knob (1e) is set by the strobe signal 5TRB to remember that input data has been read. This flip-flop (le) operates at the timing C after the output Qo""Q7 of the register (ld) is output to the input/output data bus (3) as described above.
It is reset by the clear signal CLS. In other words, the output signal BUSY of the flip-flop (1e) is valid from the time data is input until the CPU (2) reads it.
that the data has been read into the register (ld) and that the CP
t1 (2) is a flag indicating that the data has not been read. This BUSY signal is used in an external device (not shown), and if this Bt]SY signal is valid, it controls not to output the next data and prevents data from being read into the register (1d) in duplicate. It can be used to prevent.

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

以上の説明のように、この発明によれば、データが入力
されてからそのデータを必要とする命令の実行時までデ
ータをレジスタを保持しておけるため、データの持続時
間TdがスキャンタイムTsより短くても確実にCPU
に読み取ることができ、従来の方式のように誤ったデー
タで演算する欠点が解消される。つまり、TdとTsの
関係を考慮しなくてもよいわけで、データを出力してく
る外部機器とプログラマブルコントローラの接続の自由
度が大きくなるメリットがある。
As described above, according to the present invention, data can be held in a register from the time the data is input until the execution of an instruction that requires the data, so that the data duration Td is longer than the scan time Ts. Short but reliable CPU
This eliminates the drawback of conventional methods of calculating with incorrect data. In other words, there is no need to consider the relationship between Td and Ts, which has the advantage of increasing the degree of freedom in connecting the external device that outputs data and the programmable controller.

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

第1図はこの発明のデータ入力方式を説明するデータ入
カニニットのブロック図、第2図はその各部信号波形図
、第3図は第1図に対応する従来例のブロック図、第4
図と第5図はデータとスキャンとの関係を説明する波形
図である。 図中、(1)はデータ入カニニット、 (2)はcpu、    (3)は入出力データバス、
(°4)は制御ライン、(lb)は出力ゲート、(lc
)はデコーダ、  (ld)はレジスタ、(le)はフ
リップフロップ。 なお、各図中、同一符号は同−又は相当部分を示す。
FIG. 1 is a block diagram of a data input unit explaining the data input method of the present invention, FIG. 2 is a signal waveform diagram of each part thereof, FIG. 3 is a block diagram of a conventional example corresponding to FIG. 1, and FIG.
FIG. 5 and FIG. 5 are waveform diagrams illustrating the relationship between data and scanning. In the figure, (1) is the data input crab unit, (2) is the CPU, (3) is the input/output data bus,
(°4) is the control line, (lb) is the output gate, (lc
) is a decoder, (ld) is a register, and (le) is a flip-flop. In each figure, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] 複数のビット数よりなる入力データをストローブ信号の
入力に基づいて読み込んで保持しクリア信号の入力に基
づいて記憶内容をクリアするレジスタと、上記ストロー
ブ信号の入力に基づいてセットされて出力信号を有効と
し入力データが読み込まれたことを記憶し、上記クリア
信号の入力に基づいてリセットされて出力信号を無効と
するフリップフロップと、CPUのプログラムに基づい
て入出力データバスを制御する制御ラインよりアクセス
された時にこれを判別してゲート信号を送出すると共に
、データ出力動作完了後上記クリア信号を送出するデコ
ーダと、上記ゲート信号の入力に基づいて上記レジスタ
の出力を入出力データバスへ出力する出力ゲートとを備
え、上記入力データを上記ストローブ信号により上記レ
ジスタに保持させておき、同時にストローブ信号を上記
フリップフロップで記憶させて外部へ出力し、プログラ
ムでアクセスされたときに上記デコーダよりゲート信号
を発生させてレジスタの出力を入出力データバスへ出力
し、その後のタイミングでデコーダよりレジスタとフリ
ップフロップをリセットすることを特徴とするプログラ
マブルコントローラのデータ入力方式。
A register that reads and holds input data consisting of a plurality of bits based on the input of a strobe signal, and clears the memory contents based on the input of a clear signal, and a register that is set based on the input of the strobe signal to enable the output signal. It is accessed through a flip-flop that stores the fact that the input data has been read and is reset based on the input of the clear signal to invalidate the output signal, and a control line that controls the input/output data bus based on the CPU program. a decoder that determines this when the data is output and sends out a gate signal, and also sends out the clear signal after the data output operation is completed; and an output that outputs the output of the register to the input/output data bus based on the input of the gate signal. The input data is held in the register by the strobe signal, and at the same time, the strobe signal is stored in the flip-flop and outputted to the outside, and when accessed by a program, the gate signal is output from the decoder. A data input method for a programmable controller characterized in that the output of a register is generated and outputted to an input/output data bus, and the register and flip-flop are reset by a decoder at a subsequent timing.
JP28150586A 1986-11-26 1986-11-26 Data input system for programmable controller Pending JPS63133205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28150586A JPS63133205A (en) 1986-11-26 1986-11-26 Data input system for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28150586A JPS63133205A (en) 1986-11-26 1986-11-26 Data input system for programmable controller

Publications (1)

Publication Number Publication Date
JPS63133205A true JPS63133205A (en) 1988-06-06

Family

ID=17640120

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28150586A Pending JPS63133205A (en) 1986-11-26 1986-11-26 Data input system for programmable controller

Country Status (1)

Country Link
JP (1) JPS63133205A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007509707A (en) * 2003-10-29 2007-04-19 ヘマ メトリクス インコーポレイテッド Bag-type cuff for measuring physiological parameter and method for measuring physiological parameter using bag-type cuff

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007509707A (en) * 2003-10-29 2007-04-19 ヘマ メトリクス インコーポレイテッド Bag-type cuff for measuring physiological parameter and method for measuring physiological parameter using bag-type cuff

Similar Documents

Publication Publication Date Title
JPH1083303A (en) Electronic circuit and method for using coprocessor
KR950009687B1 (en) High speed ladder instruction processing apparatus for programnable logic controller
JPS63133205A (en) Data input system for programmable controller
JP2588195B2 (en) Pulse input device
JP2569693B2 (en) Microcomputer
JPS5833764A (en) Time monitor system
JP2585852B2 (en) Buffer control method
JP2990099B2 (en) Trace buffer control method
JP2981275B2 (en) Programmable controller
JPH0612292A (en) Microcomputer
JP2760027B2 (en) I / O device
JPH0784827A (en) Trace device
JPH0315948A (en) Address bus test system
JPS60225948A (en) Debugging device
JPH06197010A (en) Counter with output latch function
JPH023853A (en) Interface method for cpu
JPS6029870A (en) Vector processing unit
JPH0194437A (en) Information processor
JPH0575072B2 (en)
JPH0646411B2 (en) End token output circuit
JPH0520780B2 (en)
JPH11237442A (en) Bus control system of semiconductor-testing device
JPH05122537A (en) Two-dimensional encoder
JPH0378846A (en) Miswrite preventing circuit for memory
JPS63278156A (en) Memory writing control circuit