JPH0290223A - A/d conversion unit for sequencer - Google Patents

A/d conversion unit for sequencer

Info

Publication number
JPH0290223A
JPH0290223A JP24174088A JP24174088A JPH0290223A JP H0290223 A JPH0290223 A JP H0290223A JP 24174088 A JP24174088 A JP 24174088A JP 24174088 A JP24174088 A JP 24174088A JP H0290223 A JPH0290223 A JP H0290223A
Authority
JP
Japan
Prior art keywords
sequencer
cpu
unit
flag
input
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
JP24174088A
Other languages
Japanese (ja)
Inventor
Satoshi Yamamoto
聡 山本
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP24174088A priority Critical patent/JPH0290223A/en
Publication of JPH0290223A publication Critical patent/JPH0290223A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

PURPOSE:To eliminate the need for the generation of an input signal which can not be used for sequence control by controlling a switch element by a CPU and applying an A/D flag for controlling data access to a sequencer A/D conversion unit to a sequencer CPU unit based on a switching output. CONSTITUTION:In an A/D conversion unit I, a CPU 5 controls a relay RY through a latch circuit 13 and a photocoupler 14 and turns on a relay contact (r) in the case of turning on an A/D flag, and at the time of turning off the A/D flag, turns off the relay contact (r). When the relay contact (r) is turned on, current for emitting a light emitting diode LED1 in a photocoupler 15 on the input unit II side flows, a phototransistor PT1 is turned on and an 'L' signal is inputted to an input unit internal circuit 16 as an X0 input and fetched into the sequencer CPU unit as an A/D flag. Consequently, it is unnecessary to generate an input signal which can not be used for sequence control.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はシーケンサ用A/D変換ユニットに関する物で
ある。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an A/D conversion unit for a sequencer.

[従来の技術] 第4図は本発明者が既に特願昭63−94037号とし
て出願した従来例の回路を示しており、この従来例では
第5図のフローチャートに示すA/D変換処理を行う。
[Prior Art] Fig. 4 shows a circuit of a conventional example, which the present inventor has already filed as Japanese Patent Application No. 63-94037. In this conventional example, the A/D conversion process shown in the flowchart of Fig. 5 is conduct.

この従来例ではプログラムメモリ6に格納しであるプロ
グラムに沿ってCPU5が各部の制御及び信号処理を行
うようになっており、電源立ち上げ後、共有メモリ4を
クリアし、且つ後述するA/Dフラグをオフし、しかる
後にモード判定をCPU5で行う、このモードには各チ
ャンネルのA/D変換処理形!@(A/D変換特性、A
/D変換値データの平均処理指定)の設定を行うSET
モードとSETモードに設定された各チャンネル毎のA
/D変換処理形態に基づいてサイクリックに各アナログ
入力をA/Dコンバータ1でA/D変換し、このA/D
変換データをラッチ回路2とデータバス3を介して共有
メモリ4に格納するRUNモードとがある。
In this conventional example, the CPU 5 controls each part and performs signal processing according to a program stored in the program memory 6. After the power is turned on, the shared memory 4 is cleared and the A/D The flag is turned off, and then the mode is determined by the CPU 5. This mode includes A/D conversion processing for each channel! @(A/D conversion characteristics, A
/D conversion value data average processing specification) SET
A for each channel set to mode and SET mode
A/D converter 1 cyclically A/D converts each analog input based on the A/D conversion processing format.
There is a RUN mode in which converted data is stored in the shared memory 4 via the latch circuit 2 and data bus 3.

モード判定がSETモードであればA/Dフラグをオフ
し、上述のSETモード処理を行う。またRUNモード
であればA/Dフラグがオンがオフからの判定を行い、
オフであれば各チャンネル毎に1度ずつ各アナログ入力
をA/Dコンバータ1でA/D変換し、このA/D変換
データをラッチ回路2とデータバス3を介して共有メモ
リ4に格納し、オンであればSETモード時に設定され
た各入力チャンネル毎のA/D変換処理形態に基づ<:
A/D変換処理を行う。
If the mode determination is SET mode, the A/D flag is turned off and the above-mentioned SET mode processing is performed. Also, in RUN mode, the A/D flag is determined from on to off.
If it is off, each analog input is A/D converted once for each channel by the A/D converter 1, and this A/D converted data is stored in the shared memory 4 via the latch circuit 2 and data bus 3. , if it is on, it is based on the A/D conversion processing form for each input channel set in SET mode <:
Performs A/D conversion processing.

ここでA/D変換ユニットの動作はシーケンサのCPU
ユニットの制御がちは独立しているなめ、A/D変換ユ
ニットがシーケンサ用CPUユニットからのA/D変換
データアクセス(シーケンサ用CPUユニット側からの
共有メモリ4に対するアクセス)に対して準備ができて
いるかどうかをシーケンサ用CPUユニットに対して明
確にする必要がある。その信号が第5図のフローチャー
ト中rA/Dフラグ」である。
Here, the operation of the A/D conversion unit is controlled by the sequencer CPU.
Unit control is independent, so the A/D conversion unit is ready for A/D conversion data access from the sequencer CPU unit (access to shared memory 4 from the sequencer CPU unit). It is necessary to make it clear to the sequencer CPU unit whether the This signal is "rA/D flag" in the flowchart of FIG.

つまり従来のA/D変換ユニットはユニット自身にシー
ケンサ用CPUユニットに対する入力信号を持たせ、こ
の入力信号の一つXOをr A/Dフラグ」としてシー
ケンサ用CPUのシーケンサ入力信号処理の際にシーケ
ンサ用CPUに取り込み、第6図に示すようなシーケン
スプログラムを実行することにより、シーケンサ用CP
UユニットからのA/D変換データアクセスに対して有
効なA/D変換データをシーケンサ用CPUユニットに
与えていた。第6図に示すrREADJ命令はシーケン
サ用CPUユニットからA/D変換ユニット上の共有メ
モリ4を読むシーケンス制御応用命令であり、「XO」
はREAD命令実行条件を示す。
In other words, the conventional A/D conversion unit has its own input signal for the sequencer CPU unit, and one of these input signals By loading it into the CPU for the sequencer and executing the sequence program as shown in Figure 6, the CPU for the sequencer
Valid A/D conversion data was given to the sequencer CPU unit for A/D conversion data access from the U unit. The rREADJ command shown in FIG. 6 is a sequence control application command that reads the shared memory 4 on the A/D conversion unit from the sequencer CPU unit, and is an "XO" command.
indicates the READ instruction execution condition.

尚第4図中7はCPU5からアドレスバス8を通じて入
力するアドレスデータに基づいてラッチ回路2のC8信
号、共有メモリ4のC8信号、プログラムメモリ6のC
8信号を作成するとともにバッファ回路8のCK倍信号
作成するためのアドレスデコーダ、9はシーケンサ用C
PUユニットからアドレスバス10を通じて与えられる
アドレスデータに基づいてバッファ回n8のOE倍信号
共有メモリ4のε1信号を作成するためのアドレスデコ
ーダである。バッファ回路12は上述の「A/Dフラグ
」をデータバス11を通じてシーケンサ用CPUユニッ
トへ与えるためのバ・ソファ回路である。共有メモリ4
へのデータの読み出し、書き込みはCPU5のRD倍信
号WT倍信号びシーケンサ用CPUユニット側からのC
PURD信号CPUWT信号により夫々行われる。
In addition, 7 in FIG. 4 indicates the C8 signal of the latch circuit 2, the C8 signal of the shared memory 4, and the C8 signal of the program memory 6 based on the address data input from the CPU 5 through the address bus 8.
Address decoder for creating 8 signals and CK times signal of buffer circuit 8, 9 is C for sequencer
This is an address decoder for creating the ε1 signal of the shared memory 4, which is the OE multiplied signal of the buffer circuit n8, based on the address data given from the PU unit through the address bus 10. The buffer circuit 12 is a buffer circuit for providing the above-mentioned "A/D flag" to the sequencer CPU unit via the data bus 11. shared memory 4
Reading and writing of data to and from the RD double signal of the CPU 5 and the WT double signal from the CPU unit for the sequencer
This is done by the PURD signal and the CPUWT signal, respectively.

[発明が解決しようとする課題〕 ところでシーケンサ用CPUユニットの入力信号処理の
最小データ単位が16ビツトであったため、従来のA/
D変換ユニットはシーケンサ用CPUユニットに対して
入力信号を16点持つことになるが、その16点の白信
号としてはrA/Dフラグ」の1点()l)だけが有効
で、残り15点(Xi・・・)はシーケンサが制御でき
る入力接点数を減らすだけのものであった。
[Problems to be Solved by the Invention] By the way, since the minimum data unit for input signal processing of the sequencer CPU unit is 16 bits, the conventional A/
The D conversion unit has 16 points of input signals to the sequencer CPU unit, but of the 16 points, only one point ()l) of "rA/D flag" is valid as a white signal, and the remaining 15 points (Xi...) was merely to reduce the number of input contacts that can be controlled by the sequencer.

本発明は上述の問題点に鑑みて為されたもので、その目
的とするところはシーケンサは制御できない入力接点を
作ることなく rA/Dフラグ」をシーケンサ用CPU
ユニットに対して入力信号として与えることができるA
/D変換ユニットを提供するにある。
The present invention was made in view of the above-mentioned problems, and its purpose is to transmit the rA/D flag to the sequencer CPU without creating input contacts that the sequencer cannot control.
A that can be given as an input signal to the unit
/D conversion unit.

[課題を解決するための手段] 本発明は信号処理を行うCPUと、アナログ値をA/D
変換するA/Dコンバータと、シーケンサ用CPUユニ
ット及び上記CPUの両方からアクセス可能でシーケン
サ用CPUユニットの間においてA/D変換データをや
りとりするための共有メモリと、上記CPUにより制御
するスイッチ要素とを備えことを特徴とするものである
[Means for Solving the Problems] The present invention includes a CPU that performs signal processing, and an A/D system that converts analog values into
An A/D converter to be converted, a shared memory that is accessible from both the sequencer CPU unit and the CPU and for exchanging A/D conversion data between the sequencer CPU unit, and a switch element controlled by the CPU. It is characterized by having the following.

[作用] 而して本発明のシーケンサ用A/D変換ユニットは動作
状態に応じてシーケンサ用CPUユニットから行うシー
ケンサ用A/D変換ユニットへのデータアクセスを制御
するためのA/Dフラグを上記スイッチ要素をCPUで
制御してそのスイッチング出力でシーケンサ用CPUユ
ニットに与えることにより、シーケンス制御に使用でき
ない入力信号を発生させる必要がなくなったのである。
[Function] The sequencer A/D conversion unit of the present invention uses the above A/D flag for controlling data access from the sequencer CPU unit to the sequencer A/D conversion unit according to the operating state. By controlling the switching elements with the CPU and providing the switching output to the sequencer CPU unit, it is no longer necessary to generate input signals that cannot be used for sequence control.

[実施例] 以下本発明を実施例によって説明する。[Example] The present invention will be explained below with reference to Examples.

第1図は一実施例の回路を示しており、A/D変換ユニ
ット■側にrA/Dフラグ」をシーケンサ用CPUユニ
ットに与えるためにラッチ回路13と、ラッチ回路13
の出力が”L”になると発光素子LED、が発光してホ
トトランジスタPT。
FIG. 1 shows a circuit of one embodiment, in which a latch circuit 13 is provided on the A/D conversion unit side to give the rA/D flag to the sequencer CPU unit;
When the output of becomes "L", the light emitting element LED emits light and the phototransistor PT.

がオンするホトカブラ14と、ホトカブラ14のホトト
ランジスタP r oを介して電源入力端子Tと共通端
子T2との間に接続されたリレーRYと、信号出力端子
T、と共通端子T2との間に接続されたリレーRYのリ
レー接点rとで構成されるA/Dフラグ出力手段を従来
のバッファ回路12及びアドレスデコーダ回路9に代え
て設け、一方策2図に示すようにシーケンサ用CPUユ
ニット側に設けられる入カニニット■には電源出力端子
T、′と入力端子X0との間に発光ダイオードLED、
を入力用電源に対して順方向に接続したホトカブラ14
のホトトランジスタPT、の出力を取り込む入力内部回
路16を備え、上記電源出力端子TI′をシーケンサ用
A/D変換ユニットIの電源入力端子T1に接続し、グ
ランドに接続した共通端子COMをA/D変換ユニット
■の共通端子T2に接続し、また入力端子x0をA/D
変換ユニット■の信号出力端子T、に接続しである。
is turned on, the relay RY connected between the power input terminal T and the common terminal T2 via the phototransistor Pro of the photocoupler 14, and the signal output terminal T and the common terminal T2. One solution is to provide an A/D flag output means consisting of the relay contact r of the connected relay RY in place of the conventional buffer circuit 12 and address decoder circuit 9, and as shown in FIG. A light emitting diode LED is installed between the power supply output terminals T and ' and the input terminal
Photocoupler 14 connected in the forward direction with respect to the input power supply
The power output terminal TI' is connected to the power input terminal T1 of the sequencer A/D conversion unit I, and the common terminal COM connected to the ground is connected to the A/D converter unit I. Connect to common terminal T2 of D conversion unit ■, and input terminal x0 to A/D
It is connected to the signal output terminal T of the conversion unit ■.

而してA/D変換ユニットIでは第5図のフローチャー
ト中のrA/Dフラグ」をオンさせるときにはCPU5
によりラッチ回路13とホトカブラ14を通じてリレー
RYを制御してリレー接点rをオンさせ、rA/Dフラ
グ」をオフさせるときにはリレー接点rをオフさせる。
Therefore, in the A/D conversion unit I, when turning on the "rA/D flag" in the flowchart of FIG.
The relay RY is controlled through the latch circuit 13 and the photocoupler 14 to turn on the relay contact r, and when the rA/D flag is turned off, the relay contact r is turned off.

従ってリレー接点rがオンすると入カニニット■側のホ
トカブラ15の発光ダイオードLEDに発光電流が流れ
てホトトランジスタPT、がオンし、入カニニット内部
回路16には”L”の信号がX0人力として入り、更に
シーケンサ用CPUユニットにrA/Dフラグ」として
取り込まれる。
Therefore, when the relay contact r turns on, a light emitting current flows through the light emitting diode LED of the photocoupler 15 on the side of the input unit ■, turning on the phototransistor PT, and an “L” signal enters the internal circuit 16 of the input unit as X0 input. Furthermore, it is taken into the sequencer CPU unit as an rA/D flag.

このようにシーケンス制御に使用できない入力信号を特
別に発生させることなく rA/Dフラグ」をシーケン
サ用A/D変換ユニットIがらシーケンサ用CPUユニ
ット■へ与えることができるのである。
In this way, the "rA/D flag" can be given from the sequencer A/D conversion unit I to the sequencer CPU unit (2) without specially generating an input signal that cannot be used for sequence control.

尚第3図に示すようにリレーRYの代わりにトランジス
タTrのような半導体スイッチング素子を用いても良い
Incidentally, as shown in FIG. 3, a semiconductor switching element such as a transistor Tr may be used instead of the relay RY.

[発明の効果コ 本発明は信号処理を行うcPUと、アナログ値をA/D
変換するA/Dコンバータと、シーケンサ用CPUユニ
ット及び上記CPUの両方からアクセス可能でシーケン
サ用CPUユニットの間においてA/D変換データをや
りとりするための共有メモリと、上記CPUにより制御
するスイッチ要素とを備え、動作状態に応じてシーケン
サ用CPUユニットから行うシーケンサ用A/D変換ユ
ニットへのデータアクセスを制御するためのA/Dフラ
グを上記スイッチ要素をCPUで制御してそのスイッチ
ング出力でシーケンサ用CPUユニットに与えるので、
従来のようにシーケンス制御に使用できない入力信号を
発生させる必要がなく、しかもシーケンサ用CPUユニ
ットからのシーケンサ入力信号処理用として必要だった
アドレスデコーダ回路などの回路が不要になるという効
果が有る。
[Effects of the invention] The present invention uses a cPU that performs signal processing and an A/D converter that processes analog values.
An A/D converter to be converted, a shared memory that is accessible from both the sequencer CPU unit and the CPU and for exchanging A/D conversion data between the sequencer CPU unit, and a switch element controlled by the CPU. The A/D flag for controlling data access from the sequencer CPU unit to the sequencer A/D conversion unit according to the operating state is controlled by the CPU, and the switching output is used for the sequencer. Since it is given to the CPU unit,
It is not necessary to generate an input signal that cannot be used for sequence control as in the conventional method, and furthermore, there is an effect that a circuit such as an address decoder circuit required for processing a sequencer input signal from a sequencer CPU unit is not required.

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

第1図は本発明の一実施例の回路図、第2図は同上の要
部の回路図、第3図は本発明の別の実施例の要部の回路
図、第4図は従来例の回路図、第5図は同上の動作説明
用のフローチャート、第6図は同上のプログラム説明図
であり、1はA/Dコンバータ、4は共有メモリ、5は
CPU、13はラッチ回路、RYはリレー 14はホト
カブラ、rはリレー接点である。 代理人 弁理士 石 1)長 七 16図 手続補正書く自発) 1、事件の表示 昭和63特許願第241740号 2、発明の名称 シークンサ用A/D変換ユニット 3、補正をする者 事件との関係  特許出願人 住 所 大阪府門真市大字門真1048番地名称(58
3)松下電工株式会社 代表者  三  好  俊  夫 4、代理人 郵便番号 530 住 所 大阪市北区梅田1丁目12番17号5、補正命
令の日付 自  発 6、補正により増加する請求項の数 なし7、補正の対
象  明細書
Fig. 1 is a circuit diagram of an embodiment of the present invention, Fig. 2 is a circuit diagram of a main part of the same as above, Fig. 3 is a circuit diagram of a main part of another embodiment of the invention, and Fig. 4 is a conventional example. 5 is a flowchart for explaining the operation of the same as above, and FIG. 6 is a diagram for explaining the same program as above, 1 is an A/D converter, 4 is a shared memory, 5 is a CPU, 13 is a latch circuit, RY is a relay, 14 is a photocoupler, and r is a relay contact. Agent: Patent Attorney Ishi 1) Voluntary action to amend Figure 716 procedure) 1. Indication of the case Showa 63 Patent Application No. 241740 2. Name of the invention A/D conversion unit for sequencer 3. Person making the amendment Relationship with the case Patent applicant address: 1048 Kadoma, Kadoma City, Osaka Prefecture Name (58
3) Matsushita Electric Works Co., Ltd. Representative Toshio Miyoshi 4 Agent postal code 530 Address 1-12-17-5 Umeda, Kita-ku, Osaka City Date of amendment order 6 Number of claims increased by amendment None 7. Subject of amendment Specification

Claims (1)

【特許請求の範囲】[Claims] (1)信号処理を行うCPUと、アナログ値をA/D変
換するA/Dコンバータと、シーケンサ用CPUユニッ
ト及び上記CPUの両方からアクセス可能でシーケンサ
用CPUユニットの間においてA/D変換データをやり
とりするための共有メモリと、上記CPUにより制御す
るスイッチ要素とを備え、動作状態に応じてシーケンサ
用CPUユニットから行うシーケンサ用A/D変換ユニ
ットへのデータアクセスを制御するためのA/Dフラグ
を上記スイッチ要素のスイッチング出力でシーケンサ用
CPUユニットに与えることを特徴とするシーケンサ用
A/D変換ユニット。
(1) The CPU that performs signal processing, the A/D converter that converts analog values into A/D, and the sequencer CPU unit that can be accessed from both the CPU unit and the above CPU, and A/D conversion data can be exchanged between the sequencer CPU unit. An A/D flag is provided with a shared memory for communication and a switch element controlled by the CPU, and is used to control data access from the sequencer CPU unit to the sequencer A/D conversion unit depending on the operating state. An A/D conversion unit for a sequencer, characterized in that the switching output of the switch element is applied to a CPU unit for a sequencer.
JP24174088A 1988-09-27 1988-09-27 A/d conversion unit for sequencer Pending JPH0290223A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24174088A JPH0290223A (en) 1988-09-27 1988-09-27 A/d conversion unit for sequencer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24174088A JPH0290223A (en) 1988-09-27 1988-09-27 A/d conversion unit for sequencer

Publications (1)

Publication Number Publication Date
JPH0290223A true JPH0290223A (en) 1990-03-29

Family

ID=17078837

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24174088A Pending JPH0290223A (en) 1988-09-27 1988-09-27 A/d conversion unit for sequencer

Country Status (1)

Country Link
JP (1) JPH0290223A (en)

Similar Documents

Publication Publication Date Title
KR850001566A (en) Micro computer
JPH0290223A (en) A/d conversion unit for sequencer
US4627035A (en) Switching circuit for memory devices
EP0156162A2 (en) Programmable controller
JPS5971557A (en) Semiconductor integrated circuit device
JPS57100579A (en) Control system of printer
JP2754700B2 (en) I / O device
JPH1097303A (en) I/o switching device of sequencer
JPS61112204A (en) Input/output for remote process
JPH0419898A (en) Non-volatile memory provided with automatic read circuit
JPS6349870A (en) Microcomputer
JP2919841B2 (en) Testing method for data processing equipment
JPS63173361A (en) Integrated circuit
JPH029372Y2 (en)
JPH03100713A (en) Shaped system for input/output
JPH02206935A (en) Line switching device
JPH04347351A (en) Engine controller
JPS57197637A (en) Interface circuit for multipoint data input
JPH0594547A (en) Microprocessor
JPS638803A (en) Programmable controller
JPS5819087B2 (en) Bus driver direction switching method
JPH0514290B2 (en)
JPS59100906A (en) Sequence controller
JPS62149220A (en) Integrated circuit
JPS62213519A (en) Source controller