JPS6128124B2 - - Google Patents

Info

Publication number
JPS6128124B2
JPS6128124B2 JP55150468A JP15046880A JPS6128124B2 JP S6128124 B2 JPS6128124 B2 JP S6128124B2 JP 55150468 A JP55150468 A JP 55150468A JP 15046880 A JP15046880 A JP 15046880A JP S6128124 B2 JPS6128124 B2 JP S6128124B2
Authority
JP
Japan
Prior art keywords
memory
routine
memory module
signal
power
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.)
Expired
Application number
JP55150468A
Other languages
Japanese (ja)
Other versions
JPS5775307A (en
Inventor
Kenji Nishikido
Hideaki Nakamura
Kyoto Hirase
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 JP55150468A priority Critical patent/JPS5775307A/en
Publication of JPS5775307A publication Critical patent/JPS5775307A/en
Publication of JPS6128124B2 publication Critical patent/JPS6128124B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/058Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1188Detection of inserted boards, inserting extra memory, availability of boards

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Safety Devices In Control Systems (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 この発明はプログラマブル・ロジツク・コント
ローラ(以下PLCと称す)に関し、特にユーザメ
モリがMNOS不揮発性メモリで構成され、かつこ
のメモリがコントローラ本体に対して着脱交換自
在なモジユール構造となつているものに関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a programmable logic controller (hereinafter referred to as PLC), and in particular has a modular structure in which the user memory is composed of MNOS nonvolatile memory, and this memory is detachable and replaceable from the controller body. Concerning what has become.

PLCでは、ユーザプログラムを格納するメモリ
は勿論不揮発性化されなければならず、またプロ
グラムの変更(データの書換え)が容易に行なえ
ることも要求される。これらの観点から従来の
PLCでは、高速読み書きが可能で極めて消費電力
の少ない揮発性のIC−RAMをユーザプログラム
メモリとして用い、このメモリにバツテリバツク
アツプ回路を付設して実質的に不揮発性化してい
るのが一般的であり、一部には、本発明の対象と
なるMNOS不揮発性メモリを用いているものもあ
る。
In a PLC, the memory that stores the user program must of course be nonvolatile, and the program must also be easily changed (data rewritten). From these points of view, conventional
PLCs generally use volatile IC-RAM, which can be read and written at high speed and has extremely low power consumption, as user program memory, and this memory is equipped with a battery backup circuit to make it essentially non-volatile. Some of them use MNOS nonvolatile memory, which is the subject of the present invention.

MNOS不揮発性メモリとしては、例えば東京芝
浦電気株式会社のTMM−1421等が知られてい
る。MNOS不揮発性メモリは、不揮発性の
EPROMエリアと、これと同容量の揮発性RAM
エリアの2種構造となつており、外部から与える
メモリゲート信号により、EPROMエリアのデー
タ全部をRAMエリアに短時間で一度に転送(こ
れを読出しコピーと称する)させることができる
とともに、EPROMエリアのデータを消去し、
RAMエリアのデータ全部をEPROMエリアに短
時間で一度に転送(これを書込みコピーと称す
る)させることができる。そして、RAMエリア
に対しては外部から高速に読み書きが行なえる。
従つて、RAMエリアに対するアクセスと、上記
メモリゲート信号によるEPROMエリアとRAM
エリア間の読出し、書込みコピーを適宜制御すれ
ば、ユーザプログラムメモリに要求される。前述
した条件(不揮発性化と高速読み書き)を満足さ
せることができる。
As an MNOS nonvolatile memory, for example, TMM-1421 manufactured by Tokyo Shibaura Electric Co., Ltd. is known. MNOS non-volatile memory is a non-volatile
EPROM area and the same amount of volatile RAM
It has a two-type area structure, and it is possible to transfer all the data in the EPROM area to the RAM area at once in a short time (this is called a read copy) by using a memory gate signal applied from the outside. erase data,
All data in the RAM area can be transferred to the EPROM area at once in a short time (this is called a write copy). The RAM area can be read and written from outside at high speed.
Therefore, access to the RAM area and access to the EPROM area and RAM by the above memory gate signal
If read and write copies between areas are appropriately controlled, the user program memory is required. The above-mentioned conditions (non-volatility and high-speed reading/writing) can be satisfied.

またPLCにおいては、複数種類のユーザプログ
ラムを必要に応じて選択して実行させ得るよう
に、ユーザプログラムメモリをモジユール構造に
し、PLC本体に着脱交換自在にしたものがある。
この種PLCは、例えば複数種類の製品A,B…を
制御態様を変更することで選択的に製産し得る製
産ラインの制御装置として利用され、各製品A,
B,…を製産するためのユーザプログラムをそれ
ぞれのメモリモジユールに格納しておき、これら
メモリモジユールを必要に応じて選択的にPLC本
体に装着するような形で利用されるのである。
Furthermore, some PLCs have a user program memory that has a modular structure and is detachable from the PLC body so that multiple types of user programs can be selected and executed as needed.
This type of PLC is used, for example, as a control device for a production line that can selectively produce multiple types of products A, B, etc. by changing the control mode.
A user program for manufacturing B,... is stored in each memory module, and these memory modules are used by selectively attaching them to the PLC main body as needed.

ところで、上述したMNOS不揮発性メモリにて
ユーザプログラムのメモリモジユールを構成した
従来のPLCでは、次のような問題があつた。PLC
本体の中央処理装置は、メモリモジユールの上述
したEPROMエリアに格納されているデータ(ユ
ーザプログラム)をRAMエリアに読出しコピー
するイニシヤライズ動作を行なつた後、RAMエ
リアにアクセスしてプログラムを実行する訳であ
る。従来のPLCの場合、上述のイニシヤライズ動
作は電源投入直後に行なわれるように構成されて
おり、メモリモジユールの交換を電源オフ状態で
行なう正しい使用法が守られていれば何ら問題は
生じない。しかし、電源を投入したままの状態で
誤つてメモリモジユールを交換した場合、新たに
装着されたメモリモジユールに対しては上記イニ
シヤライズ動作は行なわれないまま、プログラム
実行動作が行なわれてしまう。非装着状態で動作
電源の印加されていないメモリモジユールにあつ
ては、当然そのRAMエリアのデータは揮発して
いる。このメモリモジユールをPLA本体に装着
することでこれに動作電源が印加されたとき、そ
のRAMエリアの各メモリセルは“0”になるか
“1”になるかは特定されず、RAMエリアのデー
タはまつたくランダムなものとなる。上記のイニ
シヤライズ動作がなされないでプログラム実行に
移るということは、上述のようにRAMエリアの
まつたくでたらめなデータをプログラムと見なし
た制御が行なわれるということであつて、これは
極めて重大な誤動作であり、制御対象機器を危険
な状態に陥らせてしまうことにもなる。
By the way, a conventional PLC in which a memory module for a user program is configured using the above-mentioned MNOS nonvolatile memory has the following problems. PLC
The central processing unit of the main unit performs an initialization operation that reads and copies the data (user program) stored in the above-mentioned EPROM area of the memory module to the RAM area, and then accesses the RAM area and executes the program. This is the translation. In the case of a conventional PLC, the above-mentioned initialization operation is configured to be performed immediately after power is turned on, and no problem will occur if the correct usage method of replacing the memory module with the power off is followed. However, if the memory module is mistakenly replaced while the power is still on, the program execution operation will be performed on the newly installed memory module without performing the above-mentioned initialization operation. When a memory module is not installed and no operating power is applied to it, the data in its RAM area is naturally volatile. By attaching this memory module to the PLA main body, when operating power is applied to it, it is not specified whether each memory cell in the RAM area becomes "0" or "1"; The data will be completely random. Shifting to program execution without performing the above initialization operation means that control is performed that treats random data in the RAM area as a program, as described above, and this is a very serious malfunction. This may put the controlled equipment into a dangerous situation.

この発明は上述した従来の問題点に鑑みなされ
たもので、その目的は、PLC本体に電源投入した
ままの状態でメモリモジユールを着脱交換する誤
操作を行なつても、新たに装着されたメモリモジ
ユールに対して上述のイニシヤライズ動作をまず
最初に行なうように構成し、フエイルセーフ機能
を持たせたPLCを提供することにある。
This invention was made in view of the above-mentioned conventional problems, and its purpose is to prevent the newly installed memory from being removed even if the user erroneously attaches or detaches the memory module while the PLC main unit is powered on. The object of the present invention is to provide a PLC that is configured to perform the above-mentioned initialization operation on a module first and has a fail-safe function.

以下、この発明の一実施例を図面に基づいて詳
細に説明する。
Hereinafter, one embodiment of the present invention will be described in detail based on the drawings.

第1図において、1はPLC本体、2はメモリモ
ジユールをそれぞれ示し、メモリモジユール2は
コネクタ3を介してPLC本体1に着脱交換自在と
なつている。
In FIG. 1, reference numeral 1 indicates a PLC main body, and reference numeral 2 indicates a memory module, and the memory module 2 can be attached to and detached from the PLC main body 1 via a connector 3.

PLC本体1には、システムプログラム(インタ
プリタプログラム)をフアームウエア化して内蔵
したいわゆるマイクロコンピユータからなる中央
処理装置4(以下CPUと称す)と、商用交流電
源を受けて所定の直流電源に変換する電源回路5
と、外部入出力端子IN,OUT等とCPU4のイン
ターフエースである入出力制御回路6と、メモリ
ゲート制御回路7とが備えられている。電源回路
5からは零ボルトラインVoと、正電源ラインV
+と、負電源ラインV−とが導出されており、
PLC本体1内の上記各回路は零ボルトラインVo
と正電源ラインV+から給電されて動作する。ま
たコネクタ3に接続されたメモリモジユール2中
のMNOS不揮発性メモリ8(以下単にメモリと称
す)に対しては、接続点J3およびJ4を介して正電
源ラインV+と負電源ラインV−から給電され
る。さらに、コネクタ3の接続点J5には零ボルト
ラインVoが結線されており、メモリモジユール
2側においてコネクタ3の接続点J5と接続点J1
が結線されており、PLC本体1において接続点J1
は抵抗Rを介して正電源ラインV+に接続されて
いる。従つて、PLC本体1における接続点J1の電
位(これを信号ECと称す)は、図のようにメモ
リモジユール2がコネクタ3に正しく接続されて
いれば、零ボルトラインVoの電位(これを低レ
ベル“0”という)となり、メモリモジユール2
がコネクタ3から外されていると、信号ECは抵
抗Rを通じて正電源ラインV+にプルアツプさ
れ、高レベル“1”となる。すなわち、この信号
ECの電位によつてメモリモジユール2が装着さ
れているか否かが検出できるようになつている。
この着脱検出信号ECは入出力制御回路6の1つ
の入力となり、CPU4はこの入出力制御回路6
を介して信号ECの状態を取込むようになつてい
る。
The PLC main body 1 includes a central processing unit 4 (hereinafter referred to as CPU) consisting of a so-called microcomputer that incorporates a system program (interpreter program) as firmware, and a power source that receives commercial AC power and converts it into a specified DC power. circuit 5
, an input/output control circuit 6 which is an interface between external input/output terminals IN, OUT, etc. and the CPU 4, and a memory gate control circuit 7. From the power supply circuit 5, there is a zero volt line Vo and a positive power line V.
+ and a negative power supply line V- are derived,
Each of the above circuits in the PLC body 1 is connected to the zero volt line Vo.
It operates by being supplied with power from the positive power supply line V+. Furthermore, the MNOS nonvolatile memory 8 (hereinafter simply referred to as memory) in the memory module 2 connected to the connector 3 is connected to the positive power line V+ and the negative power line V- through the connection points J3 and J4 . Powered by Furthermore, the zero-volt line Vo is connected to the connection point J 5 of the connector 3, and the connection point J 5 of the connector 3 and the connection point J 1 are connected on the memory module 2 side. Connection point J 1
is connected to the positive power supply line V+ via a resistor R. Therefore, if the memory module 2 is correctly connected to the connector 3 as shown in the figure, the potential of the connection point J1 in the PLC main body 1 (this is called the signal EC) will be the potential of the zero volt line Vo (this is called the signal EC). is called low level “0”), and the memory module 2
When the signal EC is disconnected from the connector 3, the signal EC is pulled up to the positive power supply line V+ through the resistor R and becomes a high level "1". That is, this signal
Whether or not the memory module 2 is installed can be detected based on the potential of EC.
This attachment/detachment detection signal EC becomes one input of the input/output control circuit 6, and the CPU 4
The state of the signal EC is acquired via the EC signal.

電源回路5からは電源状態信号MSが導出さ
れ、入出力制御回路6の1つの入力として印加さ
れる。電源状態信号MSは、電源回路5の交流入
力が正常に印加されているとき“1”で、交流入
力の電圧が極端に低下した場合や、電源スイツチ
をオフにしたり、あるいは停電等で交流入力がま
つたく印加されない場合に“0”となる。なお、
電源状態信号MSが“1”から“0”に立下つて
も、すぐに電源回路5の直流出力V+,V−がな
くなるのではなく、電源回路5のコンデンサ等の
作用により、直流出力V+,V−は多少の時間安
定に保たれる。CPU4は入出力制御回路6を介
して電源状態信号MSを取込む。
A power state signal MS is derived from the power supply circuit 5 and applied as one input to the input/output control circuit 6. The power status signal MS is "1" when the AC input of the power supply circuit 5 is normally applied, and when the voltage of the AC input drops extremely, the power switch is turned off, or the AC input is interrupted due to a power outage, etc. It becomes "0" when it is not applied strongly. In addition,
Even when the power supply status signal MS falls from "1" to "0", the DC outputs V+, V- of the power supply circuit 5 do not disappear immediately, but due to the action of the capacitor of the power supply circuit 5, the DC outputs V+, V- V- remains stable for some time. The CPU 4 receives the power state signal MS via the input/output control circuit 6.

メモリモゲート制御回路7は、コネクタ3の接
続点J2を介してメモリモジユール2のメモリ8に
対して、上述したようにEPROMエリアのデータ
をRAMエリアに転送する読出しコピーと、RAM
エリアのデータをEPROMエリアに転送する書込
みコピーとを行なわせるためのメモリゲート信号
MGを発生する回路であつて、入出力制御回路6
を介してCPU4から与えられるリード信号MRが
“1”になつたときメモリゲート信号MGを読出
しコピーモードにし、ライト信号MWが“1”に
なつたときメモリゲート信号MGを書き込みコピ
ーモードにするように構成されている。
The memory mogate control circuit 7 provides a read copy for transferring the data in the EPROM area to the RAM area, and a RAM transfer function to the memory 8 of the memory module 2 via the connection point J2 of the connector 3.
Memory gate signal for performing write copy to transfer area data to EPROM area
The input/output control circuit 6 is a circuit that generates MG.
When the read signal MR given from the CPU 4 via becomes "1", the memory gate signal MG is set to read copy mode, and when the write signal MW becomes "1", the memory gate signal MG is set to write copy mode. It is composed of

またコネクタ3の接続点JBを介してCPU4と
メモリ8を結ぶバスラインは、メモリ8のRAM
エリアに対してCPU4がアクセスしてデータを
読み書きするバスラインであつて、アドレスバ
ス、データバス、読み書き制御ラインを含んでい
る。
In addition, the bus line connecting the CPU 4 and the memory 8 via the connection point J B of the connector 3 is connected to the RAM of the memory 8.
This is a bus line through which the CPU 4 accesses the area to read and write data, and includes an address bus, a data bus, and a read/write control line.

次に、上記のように構成されたPLCの動作を第
2図のフローチヤートに従つて説明する。このフ
ローチヤートはCPU4の処理手順、すなわち
CPU4中にフアームウエア化されているシステ
ムプログラムの構成を示すものである。
Next, the operation of the PLC configured as described above will be explained according to the flowchart shown in FIG. This flowchart shows the processing procedure of CPU4, i.e.
This shows the configuration of a system program implemented as firmware in the CPU 4.

まずメモリモジユール2がコネクタ3を介して
PLC本体1に正しく結合されている状態で、電源
スイツチをオンにした場合の動作を順次説明す
る。最初のルーチン1では、CPU4自身のイニ
シヤライズを行なうとともに、入出力制御回路6
のイニシヤライズを行なう。続くルーチン2,
3,4はメモリモジユール2に対する電源投入時
イニシヤライズ処理(上述した読出しコピー)を
実行する。具体的には、入出力制御回路6からメ
モリゲート制御回路7に与えるリード信号MRを
ルーチン2で“1”にし、ルーチン3では読出し
コピーに必要な予め設定した時間TRだけ待ち、
時間TRを経過してからルーチン4にて上記リー
ド信号MRを“0”に戻す。つまり、ルーチン
2,3,4によりメモリゲート制御回路7に対し
て幅TRのパルス信号をリード信号MRとして出
力する。これを受けてメモリゲート制御回路7
は、メモリ8に与えるメモリゲート信号MGを読
出しコピーモードにし、メモリ8のEPROMエリ
アに格納されているデータ(ユーザプログラム
等)を一度にRAMエリアに転送させる。
First, memory module 2 is connected via connector 3.
The operation when the power switch is turned on with the PLC main body 1 properly connected will be explained in sequence. In the first routine 1, the CPU 4 itself is initialized and the input/output control circuit 6 is initialized.
Initialize. Next routine 2,
3 and 4 execute initialization processing (the above-mentioned read copy) for the memory module 2 when the power is turned on. Specifically, the read signal MR given from the input/output control circuit 6 to the memory gate control circuit 7 is set to "1" in routine 2, and in routine 3, the routine waits for a preset time T R necessary for reading and copying.
After time T R has elapsed, the read signal MR is returned to "0" in routine 4. That is, routines 2, 3, and 4 output a pulse signal having a width T R to the memory gate control circuit 7 as a read signal MR. In response to this, the memory gate control circuit 7
reads the memory gate signal MG applied to the memory 8 and sets it to the copy mode, thereby transferring the data (user program, etc.) stored in the EPROM area of the memory 8 to the RAM area at once.

次のルーチン5では、上述した着脱検出信号
ECが“1”から“0”に立下つたか否かを判定
する。この説明状況ではメモリモジユール2は当
初からコネクタ3に正しく装着されているので、
着脱検出信号ECは継続して“0”となつてお
り、従つてルーチン5ではNOと判定され、ルー
チン6に進む。このルーチン6では上記着脱検出
信号ECが“1”か否か、すなわちメモリモジユ
ール2が装着されていないのかどうかを判定する
が、この説明状況では上述のようにEC=“0”で
あるのでNOと判定され、ルーチン7へ進む。こ
のルーチン7では、上述した電源状態信号MSが
“1”か否かを判定する。電源状態が正常でMS=
“1”であると、ルーチン7でYESと判定され、
メインルーチン8に進む。
In the next routine 5, the above-mentioned attachment/detachment detection signal is
Determine whether EC has fallen from "1" to "0". In this explanation situation, memory module 2 has been correctly installed in connector 3 from the beginning, so
The attachment/detachment detection signal EC continues to be "0", so the determination in routine 5 is NO, and the routine proceeds to routine 6. In this routine 6, it is determined whether the above-mentioned insertion/removal detection signal EC is "1", that is, whether the memory module 2 is not installed. The determination is NO, and the process proceeds to routine 7. In this routine 7, it is determined whether the above-mentioned power state signal MS is "1". Power status is normal and MS=
If it is “1”, it is judged as YES in routine 7,
Proceed to main routine 8.

メインルーチン8は、ユーザプログラムを解読
実行する処理と、必要な表示を図示しない表示装
置で行なわせる表示処理等を含むものである。そ
の内のユーザプログラムの解読実行処理は、メモ
リ8の上述した読出しコピー動作によつて
EPROMエリアからRAMエリアに転送されたユ
ーザプログラムをCPU4がアクセスして解読実
行する訳である。このメインルーチン8を1巡す
ると前述のルーチン5に戻る。すなわち、EC=
“0”でMS=“1”である場合は、ルーチン5→
6→7→8が繰返される。
The main routine 8 includes processing for decoding and executing the user program, display processing for causing necessary display to be performed on a display device (not shown), and the like. The decoding/execution process of the user program is carried out by the above-mentioned reading and copying operation of the memory 8.
This means that the CPU 4 accesses and decodes and executes the user program transferred from the EPROM area to the RAM area. After going through this main routine 8 once, the process returns to the aforementioned routine 5. That is, EC=
If “0” and MS="1", routine 5 →
6→7→8 is repeated.

次に、上述した通常の動作状態において、電源
スイツチをオフにしないで、メモリモジユール2
をコネクタ3から抜取つた場合の動作を説明す
る。この場合、上記着脱検出信号ECが“0”か
ら“1”に変化するので、ルーチン6の実行時に
YESと判定され、ルーチン9に進むことにな
る。ルーチン9では、例えば外部出力端子OUT
をすべてオフにする等、所定の待機状態を設定す
る。その後ルーチン5に戻るので、メモリモジユ
ール2が接着されていない状態ではルーチン5→
6→9が繰返される。なお、例えば外部出力端子
OUTの1つに表示ランプを接続し、上記ルーチ
ン9にてその表示ランプを点灯させ、使用者にメ
モリモジユール2が装着されていない旨を報知
し、注意を喚起するように構成するのが好まし
い。
Next, under the normal operating conditions described above, without turning off the power switch, turn on the memory module 2.
The operation when the connector is removed from the connector 3 will be explained. In this case, the above-mentioned attachment/detachment detection signal EC changes from “0” to “1”, so when routine 6 is executed,
The determination is YES, and the routine proceeds to routine 9. In routine 9, for example, the external output terminal OUT
Set a predetermined standby state, such as turning off all. After that, it returns to routine 5, so if memory module 2 is not glued, routine 5→
6 → 9 is repeated. In addition, for example, the external output terminal
An indicator lamp is connected to one of the OUT terminals, and the indicator lamp is turned on in the above routine 9 to inform the user that the memory module 2 is not installed and to call attention to it. preferable.

次に、上述のようにメモリモジユール2が装着
されておらず、PLC本体1には電源が投入されて
いるという状態において、メモリモジユール2を
コネクタ3に装着した場合の動作を説明する。こ
の場合、上記着脱検出信号ECが“1”から
“0”に立下るので、ルーチン5の実行時にこの
立下りが検出され、ルーチン10側へ進む。ルー
チン10では予め設定された僅かな時間△Tの経
過を待ち、時間△Tを経過してから続くルーチン
11,12,13へ進む。このルーチン11,1
2,13は前述したルーチン2,3,4とまつた
く同じで、メモリゲート制御回路7に対して幅T
Rのパルス信号をリード信号MRとして出力する
ルーチンである。これを受けてメモリゲート制御
回路7は、メモリ8に与えるメモリゲート信号
MGを読出しコピーモードにするので、新たに装
着されたメモリモジユール2に対してイニシヤラ
イズ処理がなされ、メモリ8のEPROMエリアに
格納されているデータ(ユーザプログラム等)が
一度にRAMエリアに転送される。この後、ルー
チン5→6→7→8が繰返される通常の動作が移
るので、前述したような従来のPLCにおける誤動
作は生じないのである。
Next, the operation will be described when the memory module 2 is attached to the connector 3 in a state where the memory module 2 is not attached and the PLC main body 1 is powered on as described above. In this case, since the attachment/detachment detection signal EC falls from "1" to "0", this fall is detected when routine 5 is executed, and the routine proceeds to routine 10. In routine 10, the routine waits for a short preset time ΔT to elapse, and after the elapse of time ΔT, the program proceeds to routines 11, 12, and 13. This routine 11,1
2 and 13 are exactly the same as the routines 2, 3, and 4 described above, and the width T is set for the memory gate control circuit 7.
This is a routine that outputs the R pulse signal as the read signal MR. In response to this, the memory gate control circuit 7 sends a memory gate signal to the memory 8.
Since the MG is set to read copy mode, the newly installed memory module 2 is initialized, and the data (user program, etc.) stored in the EPROM area of memory 8 is transferred to the RAM area at once. Ru. After this, the routine 5->6->7->8 is repeated, which is the normal operation, so that the above-mentioned malfunction in the conventional PLC does not occur.

なお、メモリモジユール2の装着(信号ECの
立下り)が検出されてから、メモリモジユール2
に対してイニシヤライズ処理を行なうのを、ルー
チン10によつて時間△Tだけ遅らせているの
は、次の理由による。この実施例では、コネクタ
3における接続点J1とJ5がそれぞれ結合すること
により着脱検出信号ECが“0”になるように構
成しているが、メモリモジユール2の装着時に接
続点J1とJ5が結合していても、他の接続点が結合
していないという過渡状態もあり得るので、イニ
シヤライズ処理を多少遅らせて実行しているので
ある。ところで、コネクタ3として基板コネクタ
を採用するとき、メモリモジユール2の基板エツ
ジの接触導体のうち、上記接続点J1とJ5に対応す
るものを他のものより短かくし、他の接続点が完
全結合状態になつてから、接続点J1とJ5が結合す
るように構成すると良い。
Note that after the installation of memory module 2 is detected (falling edge of signal EC), memory module 2
The reason why the initialization process is delayed by the time ΔT by routine 10 is as follows. In this embodiment, the attachment/detachment detection signal EC is set to "0" when the connection points J 1 and J 5 of the connector 3 are connected to each other. However, when the memory module 2 is attached, the connection point J 1 Even if J5 and J5 are connected, there may be a transient state in which other connection points are not connected, so the initialization process is executed with a slight delay. By the way, when adopting a board connector as the connector 3, among the contact conductors on the board edge of the memory module 2, those corresponding to the above connection points J1 and J5 are made shorter than the other ones, and the other connection points are It is preferable to configure the connection points J 1 and J 5 to be connected after the state is completely connected.

また本実施例においては、ルーチン5→6→7
→8を繰返す通常の動作状態で、停電等によつて
電源回路5の交流入力がなくなつた場合、直流電
源がなくなるまでの間に、次のようにCPU4内
の必要なデータをメモリ8に退避させる処理を行
なう。退避させるデータは、電源が復旧して動作
を再開する場合に必要となるデータである。この
場合、上記電源状態信号ECが“0”になり、ル
ーチン7からルーチン14側へ進む。ルーチン1
4ではCPU4中の必要なデータをメモリ8の
RAMエリアの空いているエリアに書き込む。次
にルーチン15,16,17はメモリゲート制御
回路7に予め定めた幅TWのパルス信号の上記ラ
イト信号MWを出力するルーチンである。メモリ
制御回路7は、このライト信号MWを受けて、メ
モリ8に与えるメモリゲート信号MGを上述した
書込みコピーモードにし、メモリ8のRAMエリ
アのユーザプログラムおよび上記退避データを
EPROMエリアに一度に転送させる。その結果、
退避データも不揮発状態で記憶され、動作再開時
にこれがRAMエリアを介してCPU4に読取られ
る。
Further, in this embodiment, routine 5→6→7
→ Repeat step 8. If the AC input to the power supply circuit 5 is lost due to a power outage etc. in the normal operating state, the necessary data in the CPU 4 will be transferred to the memory 8 as follows until the DC power supply disappears. Perform evacuation processing. The data to be saved is data that will be required when the power is restored and operation is restarted. In this case, the power state signal EC becomes "0" and the routine advances from routine 7 to routine 14. Routine 1
4, the necessary data in CPU 4 is transferred to memory 8.
Write to an empty area in the RAM area. Next, routines 15, 16, and 17 are routines for outputting the write signal MW, which is a pulse signal having a predetermined width T W , to the memory gate control circuit 7. Upon receiving this write signal MW, the memory control circuit 7 sets the memory gate signal MG given to the memory 8 to the above-mentioned write copy mode, and writes the user program and the above-mentioned saved data in the RAM area of the memory 8.
Transfer to EPROM area at once. the result,
The saved data is also stored in a nonvolatile state, and is read by the CPU 4 via the RAM area when the operation is resumed.

以上詳細に説明したように、この発明は、ユー
ザプログラムメモリがMNOS不揮発性メモリで構
成され、かつコントローラ本体に対して着脱交換
自在なモジユール構造となつているPLCにおい
て、上記メモリモジユールがコントローラ本体に
装着されているか否かを検出する着脱検出手段
と、この着脱検出手段により上記メモリモジユー
ルが装着されたことが検出されたとき、該メモリ
モジユールに対してそのRAMエリアにその
EPROMエリアのデータをコピーさせるメモリゲ
ート信号を供給する信号発生手段とを設けたこと
を特徴とするもので、これにより、電源を投入し
たままでメモリモジユールを装着しても、前述し
た従来のPLCのような誤動作を生じることがなく
なるのである。
As explained in detail above, the present invention provides a PLC in which the user program memory is composed of MNOS nonvolatile memory and has a modular structure that is detachable and replaceable from the controller body, in which the memory module is attached to the controller body. an attachment/detachment detection means for detecting whether or not the memory module is attached to the memory module; and when the attachment/detachment detection means detects that the memory module is attached, a
The device is characterized in that it is equipped with a signal generating means that supplies a memory gate signal to copy data in the EPROM area, and as a result, even if the memory module is installed with the power turned on, it will not work as described above. This eliminates malfunctions that occur with PLCs.

なお、着脱検出手段として実施例に示したよう
な構成に限定されないのは勿論である。
Note that, of course, the attachment/detachment detection means is not limited to the configuration shown in the embodiment.

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

第1図は本発明の一実施例によるPLCのブロツ
ク図、第2図は第1図におけるCPU4の動作を
規定したプログラムの構成を示すフローチヤート
である。 1……PLC本体、2……メモリモジユール、3
……コネクタ、4……中央処理装置(CPU)、7
……メモリゲート制御回路、8……ユーザプログ
ラムメモリ。
FIG. 1 is a block diagram of a PLC according to an embodiment of the present invention, and FIG. 2 is a flowchart showing the structure of a program that defines the operation of the CPU 4 in FIG. 1...PLC main body, 2...memory module, 3
... Connector, 4 ... Central processing unit (CPU), 7
...Memory gate control circuit, 8...User program memory.

Claims (1)

【特許請求の範囲】[Claims] 1 ユーザプログラムメモリがMNOS不揮発性メ
モリで構成され、かつこのメモリがコントローラ
本体に対して着脱交換自在なモジユール構造をと
つているプログラマブル・ロジツク・コントロー
ラにおいて、上記メモリモジユールがコントロー
ラ本体に装着されているか否かを検出する着脱検
出手段と、この着脱検出手段により上記メモリモ
ジユールが装着されたことが検出されたとき、該
メモリモジユールに対してそのRAMエリアにそ
のEPROMエリアのデータをコピーさせるメモリ
ゲート信号を供給する信号発生手段とを設けたこ
とを特徴とするプログラマブル・ロジツク・コン
トローラ。
1. In a programmable logic controller in which the user program memory is composed of MNOS nonvolatile memory, and this memory has a modular structure that can be detached from and replaced with the controller body, the memory module is installed in the controller body. attachment/detachment detection means for detecting whether or not the memory module is installed; and when the attachment/detachment detection means detects that the memory module is installed, the memory module is caused to copy data of its EPROM area to its RAM area. 1. A programmable logic controller comprising signal generating means for supplying a memory gate signal.
JP55150468A 1980-10-27 1980-10-27 Programmable logical controller Granted JPS5775307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP55150468A JPS5775307A (en) 1980-10-27 1980-10-27 Programmable logical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP55150468A JPS5775307A (en) 1980-10-27 1980-10-27 Programmable logical controller

Publications (2)

Publication Number Publication Date
JPS5775307A JPS5775307A (en) 1982-05-11
JPS6128124B2 true JPS6128124B2 (en) 1986-06-28

Family

ID=15497568

Family Applications (1)

Application Number Title Priority Date Filing Date
JP55150468A Granted JPS5775307A (en) 1980-10-27 1980-10-27 Programmable logical controller

Country Status (1)

Country Link
JP (1) JPS5775307A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01149107A (en) * 1987-12-07 1989-06-12 Fanuc Ltd Numerical controller
US4835670A (en) * 1988-01-21 1989-05-30 Honeywell Inc. Microcomputer fuel burner control having safety interlock means
JPH01194001A (en) * 1988-01-29 1989-08-04 Fanuc Ltd Control transfer device for contents of memory at time of repair
JPH0230502U (en) * 1988-08-22 1990-02-27

Also Published As

Publication number Publication date
JPS5775307A (en) 1982-05-11

Similar Documents

Publication Publication Date Title
US6336174B1 (en) Hardware assisted memory backup system and method
US8510584B1 (en) Ultra low power sleep mode
US7295051B2 (en) System and method for monitoring a power supply level
EP0256815A2 (en) Preventing data loss in computers
US8151130B2 (en) Plural voltage level detection upon power drop for switching to standby mode with or without complete state saving interrupt processing
US20060284655A1 (en) Circuit and method for monitoring the integrity of a power supply
EP2183749A1 (en) Enhanced write abort mechanism for non-volatile memory
JPH08161886A (en) Storage device
JPS6159531A (en) Microprogram loader
US20090040842A1 (en) Enhanced write abort mechanism for non-volatile memory
JPS6128124B2 (en)
JP4590543B2 (en) Game machine
US20200105312A1 (en) NVDIMM System with UPS power source
KR100242518B1 (en) Method of controlling data writing into on-board microcomputer
JP2007156864A (en) Data retention unit
US6888267B2 (en) Battery backed memory with low battery voltage trip, disconnect and lockout
US6760672B2 (en) Automatic detection of battery-backed data integrity in volatile memory
CN207473585U (en) Power-down protection apparatus and electronic equipment
JPS61141059A (en) Terminal equipment
JP3087650B2 (en) Automatic power recovery method
JPH03100848A (en) Memory back-up device using eeprom
TWI713039B (en) Semiconductor storing apparatus and flash memory operation method
JPH0724917Y2 (en) Backup power supply circuit
JP2002091632A (en) Computer system
JPH0436426B2 (en)