JP4501781B2 - Programmable controller - Google Patents

Programmable controller Download PDF

Info

Publication number
JP4501781B2
JP4501781B2 JP2005154688A JP2005154688A JP4501781B2 JP 4501781 B2 JP4501781 B2 JP 4501781B2 JP 2005154688 A JP2005154688 A JP 2005154688A JP 2005154688 A JP2005154688 A JP 2005154688A JP 4501781 B2 JP4501781 B2 JP 4501781B2
Authority
JP
Japan
Prior art keywords
program
read
flag
memory
processing unit
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.)
Active
Application number
JP2005154688A
Other languages
Japanese (ja)
Other versions
JP2006331130A (en
Inventor
大 中井
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 Corp
Panasonic Electric Works Co Ltd
Original Assignee
Panasonic Corp
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 Panasonic Corp, Matsushita Electric Works Ltd filed Critical Panasonic Corp
Priority to JP2005154688A priority Critical patent/JP4501781B2/en
Publication of JP2006331130A publication Critical patent/JP2006331130A/en
Application granted granted Critical
Publication of JP4501781B2 publication Critical patent/JP4501781B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、シーケンスプログラムに従って機器を制御するプログラマブルコントローラに関するものである。   The present invention relates to a programmable controller that controls equipment according to a sequence program.

一般に、プログラマブルコントローラは、機器を接続する機器インターフェイスと、シーケンスプログラムを格納するプログラムメモリと、シーケンスプログラムを実行して機器を制御する主処理部とを備える。シーケンスプログラムは、使用者がプログラムメモリに書き込む場合のほか、プログラムメモリにあらかじめ格納され使用者による改変を認めない場合がある。   In general, the programmable controller includes a device interface for connecting devices, a program memory for storing a sequence program, and a main processing unit that executes the sequence program to control the device. The sequence program is stored in advance in the program memory in addition to the case where the user writes in the program memory, and the user may not allow modification.

ところで、シーケンスプログラムは、プログラマブルコントローラとは別に設けた外部装置としての支援装置(一般に、パーソナルコンピュータで適宜のプログラムを実行する構成が採用されている)を用いて作成され、支援装置でデバッグを行った後にプログラムメモリに書き込まれる。したがって、プログラマブルコントローラでは、支援装置のような外部装置を接続するためのサービスインターフェイスを備えている(たとえば、特許文献1参照)。支援装置は、シーケンスプログラムをプログラムメモリに書き込むだけではなく、プログラムメモリからシーケンスプログラムを読み出す機能を備え、読み出したシーケンスプログラムの確認や修正の機能を備えることが多い。
特開平8−179812号公報(第3頁、図1)
By the way, the sequence program is created using a support device as an external device provided separately from the programmable controller (generally, a configuration in which an appropriate program is executed by a personal computer is adopted), and debugging is performed by the support device. After that, it is written to the program memory. Therefore, the programmable controller includes a service interface for connecting an external device such as a support device (see, for example, Patent Document 1). The support apparatus not only writes the sequence program to the program memory but also has a function of reading the sequence program from the program memory, and often has a function of checking and correcting the read sequence program.
JP-A-8-179812 (page 3, FIG. 1)

上述したように、プログラマブルコントローラにはサービスインターフェイスが設けられているから、サービスインターフェイスに支援装置を接続すれば、使用者であってもシーケンスプログラムを読み出すことができる。したがって、シーケンスプログラムの内容が読み出され特定のアルゴリズムが無断で勝手に利用されたり、改変を認めていないシーケンスプログラムが読み出されて改変されたりするなどの問題が生じる可能性がある。つまり、プログラマブルコントローラでは、プログラムメモリに格納したシーケンスプログラムについては十分な保護がなされていないのが現状である。   As described above, since the service interface is provided in the programmable controller, the sequence program can be read even by the user by connecting the support device to the service interface. Therefore, there is a possibility that the content of the sequence program is read and a specific algorithm is used without permission, or a sequence program that is not permitted to be modified is read and modified. That is, in the programmable controller, the sequence program stored in the program memory is not sufficiently protected at present.

本発明は上記事由に鑑みて為されたものであり、その目的は、プログラムメモリに格納されたシーケンスプログラムを複数台のプログラマブルコントローラの間で複製できるようにしながらも、シーケンスプログラムがサービスインターフェイスに接続される外部装置へ読み出されるのを禁止できるようにしたプログラマブルコントローラを提供することにある。 The present invention has been made in view of the above reasons, and its purpose is to connect a sequence program to a service interface while allowing a sequence program stored in a program memory to be copied between a plurality of programmable controllers. Another object of the present invention is to provide a programmable controller capable of prohibiting reading to an external device .

請求項1の発明は、制御対象となる機器の制御手順を示すシーケンスプログラムが格納される書換可能なプログラムメモリと、プログラムメモリに格納されたシーケンスプログラムに従って機器を制御するプロセッサを有した主処理部と、主処理部と通信可能であってシーケンスプログラムを作成しプログラムメモリに書き込む外部装置を接続するためのサービスインターフェイスと、プログラムメモリとの間でシーケンスプログラムの授受が可能な外部記憶装置を着脱可能に接続する拡張インターフェイスとを備え、主処理部は、プログラムメモリに格納されたシーケンスプログラムについてサービスインターフェイスから外部装置への読み出しを禁止する読出禁止処理部と、セット時に読出禁止処理部を有効にする読出禁止フラグが格納されるフラグ格納部とを備え、さらに、主処理部は、外部記憶装置が拡張インターフェイスに接続されている状態でサービスインターフェイスに接続した外部装置からプログラム書出命令が与えられたときに、フラグ格納部に読出禁止フラグがセットされていれば、プログラムメモリからシーケンスプログラムを外部記憶装置に転送して保存させるとともに、読出禁止フラグを主処理部のフラグ格納部から外部記憶装置に転送して保存させ、シーケンスプログラムを保存している外部記憶装置が拡張インターフェイスに接続されている状態でサービスインターフェイスに接続した外部装置からプログラム読込命令が与えられたときに、シーケンスプログラムを外部記憶装置からプログラムメモリに転送するとともに、外部記憶装置に読出禁止フラグが保存されていれば、読出禁止フラグを外部記憶装置から主処理部のフラグ格納部に転送してセットさせることを特徴とする。 The invention according to claim 1 is a main processing unit having a rewritable program memory storing a sequence program indicating a control procedure of a device to be controlled, and a processor for controlling the device according to the sequence program stored in the program memory When a service interface for connecting an external device to write to create a communicable sequence program in the program memory and the main processing unit, an external storage device can exchange the sequence program with the program memory detachable and a expansion interface that connected, the main processing unit, a read inhibition processing section for prohibiting the reading of the sequence program stored in the program memory to the external device from the service interface, the read inhibition processing unit during cell Tsu DOO Read disable flag to be enabled is stored And a flag storage unit which, furthermore, the main processing unit, when the output program certificate from an external device external storage device is connected to the service interface in a state connected to the expansion interface instruction is given, the flag storage unit If the read prohibition flag is set , the sequence program is transferred from the program memory to the external storage device and stored , and the read prohibition flag is transferred from the flag storage unit of the main processing unit to the external storage device and stored. When a program read command is given from an external device connected to the service interface while the external storage device storing the sequence program is connected to the expansion interface , the sequence program is transferred from the external storage device to the program memory . In addition, reading to external storage devices is prohibited If lag is stored, characterized in that to set forward the read disable flag from the external storage device in the flag storage unit of the main processor.

この構成によれば、サービスインターフェイスから外部装置へのシーケンスプログラムの読み出しを禁止することができるから、プログラムメモリに格納されたシーケンスプログラムの外部装置による読み出しを禁止して、シーケンスプログラムのノウハウが他人に知られたり、シーケンスプログラムが盗用されたりするのを防止することができる。つまり、シーケンスプログラムが保護される。
すなわち、読出禁止フラグがセットされているか否かによりシーケンスプログラムの読み出しが禁止されるか否かが決まるから、読出禁止フラグを設定しない状態ではシーケンスプログラムの読み出しと書き込みとを自由に行うことができ、シーケンスプログラムの作成作業が容易になる。また、シーケンスプログラムをプログラムメモリに格納した後に使用者に引き渡す際には読出禁止フラグを設定すれば、シーケンスプログラムの読み出しが禁止されるからシーケンスプログラムが保護される。
さらに、外部記憶装置を用いてシーケンスプログラムを運ぶことにより、制御対象となる機器の設置場所とは異なる場所でシーケンスプログラムを作成することができる。つまり、シーケンスプログラムを作成した提供者は、シーケンスプログラムを作成し外部記憶装置に書き出して、その外部記憶装置を使用者に送付すれば、使用者のプログラマブルコントローラに外部記憶装置からシーケンスプログラムを読み込ませることで、シーケンスプログラムを使用することが可能になる。しかも、読出禁止フラグを外部記憶装置に格納しておけば、外部記憶装置によってシーケンスプログラムとともに読出禁止フラグも運ばれ、使用者のプログラマブルコントローラのフラグ格納部に読出禁止フラグがセットされるから、使用者によるシーケンスプログラムの読み出しを防止してシーケンスプログラムを保護することができる。
請求項2の発明では、請求項1の発明において、前記主処理部は、前記外部記憶装置からプログラムメモリにシーケンスプログラムを転送する際に、シーケンスプログラムの転送が終了した後に外部記憶装置のシーケンスプログラムを消去することを特徴とする。
この構成によれば、外部記憶装置からプログラムメモリへのシーケンスプログラムの転送が1回限りになるから、1個の外部記憶装置から複数台のプログラマブルコントローラにシーケンスプログラムが転送されることはなく、シーケンスプログラムの無制限な複製を防止することができる。
According to this configuration, the reading of the sequence program from the service interface to the external device can be prohibited. Therefore, the reading of the sequence program stored in the program memory by the external device is prohibited, and the know-how of the sequence program can be shared with others. It can be prevented that the sequence program is known or stolen. That is, the sequence program is protected.
That is, whether or not reading of the sequence program is prohibited is determined depending on whether or not the read prohibition flag is set, so that the sequence program can be freely read and written without setting the read prohibition flag. This makes it easier to create sequence programs. In addition, if the read prohibition flag is set when the sequence program is stored in the program memory and then delivered to the user, the sequence program is protected because reading of the sequence program is prohibited.
Furthermore, by carrying the sequence program using an external storage device, the sequence program can be created at a location different from the installation location of the device to be controlled. In other words, if the provider who created the sequence program creates the sequence program, writes it to the external storage device, and sends the external storage device to the user, the user's programmable controller reads the sequence program from the external storage device. This makes it possible to use a sequence program. Moreover, if the read prohibition flag is stored in the external storage device, the read prohibition flag is also carried along with the sequence program by the external storage device, and the read prohibition flag is set in the flag storage portion of the user's programmable controller. The sequence program can be protected by preventing the user from reading the sequence program.
According to a second aspect of the present invention, in the first aspect of the invention, when the main processing unit transfers the sequence program from the external storage device to the program memory, the sequence program of the external storage device after the transfer of the sequence program is completed It is characterized by erasing.
According to this configuration, since the transfer of the sequence program from the external storage device to the program memory is limited to one time, the sequence program is not transferred from one external storage device to a plurality of programmable controllers. Unrestricted duplication of programs can be prevented.

請求項3の発明では、請求項1または請求項2の発明において、前記主処理部は、前記フラグ格納部に読出禁止フラグを一旦セットすると、フラグ格納部からの読出禁止フラグのリセットを禁止することを特徴とする。 In the invention of claim 3, in the invention of claim 1 or claim 2, wherein the main processing unit, said flag storage unit temporarily sets Then the read prohibition flag to prohibit reset of the read inhibit flag from flag storage unit It is characterized by that.

この構成によれば、フラグ格納部に読出禁止フラグが一旦設定された後には、シーケンスプログラムをサービスインターフェイスから読み出すことはできなくなる。 According to this configuration, after reading out prohibiting flag is temporarily set to the flag storage unit, Succoth read out the sequence program from the service interface can not.

請求項4の発明では、請求項1または請求項2の発明において、前記主処理部は、前記フラグ格納部に読出禁止フラグがセットされている状態からリセットされると前記プログラムメモリの内容を消去することを特徴とする。 According to a fourth aspect of the present invention, in the first or second aspect of the invention, the main processing unit erases the contents of the program memory when reset from a state in which the read prohibition flag is set in the flag storage unit. It is characterized by doing.

この構成によれば、読出禁止フラグがセットされているとシーケンスプログラムの読み出しが禁止され、また読出禁止フラグのリセットは可能であるが、リセットすればプログラムメモリの内容が消去されるから、読出禁止フラグをリセットしてもシーケンスプログラムは読み出せない。つまり、シーケンスプログラムの読み出しが禁止されているのであり、シーケンスプログラムが保護される。しかも、読出禁止フラグをリセットすれば、シーケンスプログラムを読み書きできる状態に戻すことになるから、シーケンスプログラムを組み直したり、他の用途に用いたりすることが可能になる。   According to this configuration, reading of the sequence program is prohibited when the read prohibition flag is set, and the read prohibition flag can be reset. However, if the reset is performed, the contents of the program memory are erased. Even if the flag is reset, the sequence program cannot be read. That is, reading of the sequence program is prohibited, and the sequence program is protected. In addition, if the read prohibition flag is reset, the sequence program is returned to a state where it can be read and written, so that the sequence program can be reassembled or used for other purposes.

請求項5の発明では、請求項1ないし請求項4のいずれかの発明において、前記主処理部は、前記外部装置から前記サービスインターフェイスを通して前記プログラムメモリにシーケンスプログラムを書き込むことを禁止する書込禁止処理部を備えるとともに、あらかじめ登録したパスワードと一致するパスワードが外部装置から入力されたときに書込禁止処理部を無効にすることを特徴とする。 According to a fifth aspect of the present invention, in any of the first to fourth aspects, the main processing unit prohibits writing of a sequence program from the external device to the program memory through the service interface. A processing unit is provided, and the write prohibition processing unit is invalidated when a password that matches a previously registered password is input from an external device.

この構成によれば、シーケンスプログラムの書き込みの可否をパスワードを用いて選択するから、プログラムメモリに不用意にシーケンスプログラムを書き込む可能性を低減することができ、誤操作によるシーケンスプログラムの破壊や改変を防止することができる。しかも、適正なパスワードによってシーケンスプログラムの書き込みが可能になるから、シーケンスプログラムのバージョンアップなどのメンテナンスは行うことができる。   According to this configuration, since the password is used to select whether or not the sequence program can be written, the possibility of inadvertently writing the sequence program to the program memory can be reduced, and the sequence program can be prevented from being destroyed or altered by an erroneous operation. can do. Moreover, since the sequence program can be written with an appropriate password, maintenance such as version upgrade of the sequence program can be performed.

請求項6の発明では、請求項1ないし請求項5のいずれかの発明において、前記主処理部は、前記プログラムメモリから前記外部記憶装置にシーケンスプログラムを転送する際に暗号化するとともに、前記外部記憶装置から前記プログラムメモリにシーケンスプログラムを転送する際に復号化する暗号化・復号化部を備えることを特徴とする。 According to the invention of claim 6, in the invention of any one of claims 1 to 5 , the main processing unit encrypts the sequence program when transferring it from the program memory to the external storage device, and An encryption / decryption unit that decrypts the sequence program when the sequence program is transferred from the storage device to the program memory is provided.

この構成によれば、外部記憶装置に格納されたシーケンスプログラムは暗号化されているから、外部記憶装置からシーケンスプログラムを読み出そうとしても容易に知られることがなく、シーケンスプログラムを保護することができる。   According to this configuration, since the sequence program stored in the external storage device is encrypted, it is not easily known even if an attempt is made to read the sequence program from the external storage device, and the sequence program can be protected. it can.

請求項7の発明では、請求項6の発明において、前記暗号化・復号化部は、前記外部装置により暗号キーを設定可能であることを特徴とする。 The invention according to claim 7 is the invention according to claim 6, wherein the encryption / decryption unit can set an encryption key by the external device.

この構成によれば、暗号キーを用いることによりシーケンスプログラムの暗号化が容易にでき、しかも暗号キーは外部装置により任意に設定することができるから、特別な仕様のプログラマブルコントローラを用いることなく外部記憶装置に格納するシーケンスプログラムの暗号化が可能になる。   According to this configuration, the encryption of the sequence program can be facilitated by using the encryption key, and the encryption key can be arbitrarily set by the external device, so that it is possible to store the external program without using a special specification programmable controller. The sequence program stored in the apparatus can be encrypted.

本発明の構成によれば、サービスインターフェイスから外部装置へのシーケンスプログラムの読み出しを禁止することができるから、プログラムメモリに格納されたシーケンスプログラムの外部装置による読み出しを禁止することができ、シーケンスプログラムのノウハウが他人に知られたり、シーケンスプログラムが盗用されたりするのを防止することができ、結果的に、シーケンスプログラムが保護されるという利点を有する。
さらに、シーケンスプログラムを作成した提供者は、シーケンスプログラムを作成し外部記憶装置に書き出して、その外部記憶装置を使用者に送付すれば、使用者のプログラマブルコントローラに外部記憶装置からシーケンスプログラムを読み込ませることで、シーケンスプログラムを使用することが可能になる。しかも、読出禁止フラグを外部記憶装置に格納しておけば、外部記憶装置によってシーケンスプログラムとともに読出禁止フラグも運ばれ、使用者のプログラマブルコントローラのフラグ格納部に読出禁止フラグがセットされるから、使用者によるシーケンスプログラムの読み出しを防止してシーケンスプログラムを保護することができる。
According to the configuration of the present invention, reading of the sequence program from the service interface to the external device can be prohibited, so that reading of the sequence program stored in the program memory by the external device can be prohibited. It is possible to prevent the know-how from being known to others or the sequence program from being stolen, and as a result, the sequence program is protected.
Further, if the provider who created the sequence program creates the sequence program, writes it to the external storage device, and sends the external storage device to the user, the user's programmable controller reads the sequence program from the external storage device. This makes it possible to use a sequence program. Moreover, if the read prohibition flag is stored in the external storage device, the read prohibition flag is also carried along with the sequence program by the external storage device, and the read prohibition flag is set in the flag storage portion of the user's programmable controller. The sequence program can be protected by preventing the user from reading the sequence program.

以下に説明する実施形態では、プログラマブルコントローラ(以下、「PLC」と略称する)のシーケンスプログラム(以下、「プログラム」と略称する)を作成してPLCに搭載する提供者と、提供者がプログラムを搭載したPLCを使用する使用者とを想定する。PLCは書換可能なプログラムメモリを有し、プログラムメモリにプログラムが格納される。本発明では、基本的には、プログラムを少なくとも1回はプログラムメモリに書込可能であるが、使用者においてはプログラムメモリからプログラムを読み出すことができないようにしてある。また、プログラムの実行中により変化しPLCに設けたデータメモリに格納されるデータについては書込可能かつ読出可能としてある。   In the embodiment described below, a provider that creates a sequence program (hereinafter abbreviated as “program”) of a programmable controller (hereinafter abbreviated as “PLC”) and loads it on the PLC; Assume a user who uses the installed PLC. The PLC has a rewritable program memory, and the program is stored in the program memory. In the present invention, basically, the program can be written into the program memory at least once, but the user cannot read the program from the program memory. In addition, data that changes during execution of the program and is stored in a data memory provided in the PLC is writable and readable.

プログラムメモリにプログラムを1回しか書き込めない場合を除いては、プログラムメモリに新たなプログラムを書き込む際には、プログラムメモリの内容を一旦消去し、その上で、プログラムメモリにプログラムを格納する。したがって、プログラムの修正のためにプログラムの書換が必要であるときには、プログラムメモリの内容を消去して修正後のプログラムを格納する。一方、データメモリに対しては、書込と読出とが可能であるから、プログラムの実行中に生じるデータの監視が可能であって、データの監視によりPLCの動作を把握することができる。以下に具体的に説明する。   Except when the program can be written only once in the program memory, when writing a new program in the program memory, the contents of the program memory are once erased, and then the program is stored in the program memory. Therefore, when the program needs to be rewritten to correct the program, the contents of the program memory are erased and the corrected program is stored. On the other hand, since data can be written to and read from the data memory, data generated during the execution of the program can be monitored, and the operation of the PLC can be grasped by monitoring the data. This will be specifically described below.

以下に説明する実施形態の基本構成を図1に示す。この構成では、マイクロプロセッサを主構成とする主処理部10を備え、プログラムメモリ11に格納されたプログラムを主処理部10で実行するように構成される。主処理部10はシステムプログラムを格納したシステムメモリを含むものとする。プログラムメモリ11には不揮発性のメモリを用い、システムメモリにはROMを用いる。また、プログラムの実行に必要なデータおよびプログラムの実行に伴って発生ないし変化するデータを一時的に格納するデータメモリ12と、制御対象である機器を接続する機器インターフェイス13とが設けられる。データメモリ12にはRAMを用いる。機器インターフェイス13は、機器に指示を与えるための出力インターフェイスと、機器の動作を監視するために機器からのデータを取り込む入力インターフェイスとを備える。 A basic configuration of an embodiment described below is shown in FIG. In this configuration, the main processing unit 10 mainly including a microprocessor is provided, and the program stored in the program memory 11 is executed by the main processing unit 10. The main processing unit 10 includes a system memory that stores a system program. The program memory 11 is a non-volatile memory, and the system memory is a ROM. Further, a data memory 12 for temporarily storing data necessary for executing the program and data generated or changed with the execution of the program, and a device interface 13 for connecting a device to be controlled are provided. A RAM is used as the data memory 12. The device interface 13 includes an output interface for giving an instruction to the device and an input interface for capturing data from the device to monitor the operation of the device.

さらに、支援装置のような外部機器を着脱可能に接続するサービスインターフェイス14と、各種機能のユニットを着脱可能に接続する拡張インターフェイス15とを備える。サービスインターフェイス14には、RS232C規格、RS422規格、USB規格の少なくともいずれかの汎用の通信用のインターフェイスが用いられる。また、拡張インターフェイス15は、ユニットを着脱可能に接続するコネクタを備え、コネクタに接続するユニットの機能に応じてPLCの機能を拡張する。   Furthermore, a service interface 14 for detachably connecting an external device such as a support device and an expansion interface 15 for detachably connecting units having various functions are provided. As the service interface 14, a general-purpose communication interface of at least one of the RS232C standard, the RS422 standard, and the USB standard is used. The expansion interface 15 includes a connector for detachably connecting the unit, and expands the function of the PLC according to the function of the unit connected to the connector.

サービスインターフェイス14に接続される支援装置は、プログラムの作成とデバッグとの機能、プログラムメモリ11にプログラムを書き込む機能、プログラムメモリ11の内容の消去を指示する機能を備える。サービスインターフェイス14に接続可能な外部装置としては、支援装置のほか、データメモリ12のデータの変化を読み出すことによりPLCの動作を監視し必要に応じて機器の制御をPLCに指示する監視制御装置を用いる場合もある。監視制御装置としてはタッチパネル式の操作表示部を備えるものを用いるのが望ましい。   The support device connected to the service interface 14 has a function of creating and debugging a program, a function of writing a program in the program memory 11, and a function of instructing deletion of the contents of the program memory 11. As an external device that can be connected to the service interface 14, in addition to the support device, a monitoring control device that monitors the operation of the PLC by reading data changes in the data memory 12 and instructs the PLC to control the device as necessary. Sometimes used. As the monitoring control device, it is desirable to use a device having a touch panel type operation display unit.

拡張インターフェイス15のコネクタには、機器インターフェイス13と同仕様の入出力を可能とする入出力用のユニットや、機器インターフェイス13とは異仕様の入出力を可能とする入出力用のユニットが接続可能になっている。したがって、コネクタに接続するユニットの機能に応じて、機器インターフェイス13の入出力の点数を増加させたり、アナログ入力の機能を付加したりパルスの入出力の機能を付加したりすることが可能になる。あるいはまた、プログラムメモリ11に格納したプログラムを他のPLCに転送する際に用いる外部記憶装置を備えた記憶用のユニットをコネクタに接続することも可能である。このユニットを接続すれば、プログラムメモリ11に格納したプログラムをユニットに設けた外部記憶装置に取り込んだ後に、このユニットを他のPLCに接続して当該プログラムを他のPLCに読み込ませることが可能になる。拡張インターフェイス15にはサービスインターフェイス14と同様に外部装置との通信を可能にする通信用のユニットも接続可能である。   The connector of the extension interface 15 can be connected to an input / output unit that enables input / output with the same specifications as the device interface 13 or an input / output unit that allows input / output with different specifications from the device interface 13. It has become. Therefore, according to the function of the unit connected to the connector, the number of input / output points of the device interface 13 can be increased, an analog input function can be added, and a pulse input / output function can be added. . Alternatively, a storage unit having an external storage device used when transferring a program stored in the program memory 11 to another PLC can be connected to the connector. If this unit is connected, after the program stored in the program memory 11 is taken into an external storage device provided in the unit, it is possible to connect this unit to another PLC and read the program into another PLC. Become. Similarly to the service interface 14, a communication unit that enables communication with an external device can be connected to the extension interface 15.

上述したPLCでは、図2に示すように、電源が投入(S1)されると、初期化処理(S2)がなされ、次に動作モードが判定される(S3)。動作モードとしては、プログラムメモリ11に格納されたプログラムを実行する実行モードと、プログラムを実行せずにプログラムのメンテナンスなどを行うプログラムモードとが選択可能になっている。実行モードとプログラムモードとは、手操作するモード切換スイッチ16で選択する。   In the above-described PLC, as shown in FIG. 2, when the power is turned on (S1), an initialization process (S2) is performed, and then an operation mode is determined (S3). As the operation mode, an execution mode for executing the program stored in the program memory 11 and a program mode for performing maintenance of the program without executing the program can be selected. The execution mode and the program mode are selected by the mode switch 16 that is manually operated.

実行モードでは、まず機器インターフェイス13と拡張インターフェイス15のリフレッシュ(書き直し)を行い(S4)、次にプログラムを実行する(S5)。つまり、プログラムを最初から最後まで1回実行する。プログラムを実行すれば通信サービス(S6)に移行する。一方、プログラムモードが選択されている場合には、機器インターフェイス13のリフレッシュ(S4)とプログラムの実行(S5)とは行われず、ただちに通信サービス(S6)に移行する。実行モードとプログラムモードとのいずれにおいても、通信サービスが終了した後には動作モードの判定(S3)に戻る。   In the execution mode, the device interface 13 and the expansion interface 15 are first refreshed (rewritten) (S4), and then the program is executed (S5). That is, the program is executed once from the beginning to the end. When the program is executed, the communication service (S6) is entered. On the other hand, when the program mode is selected, the device interface 13 is not refreshed (S4) and the program is executed (S5), and the process immediately shifts to the communication service (S6). In both the execution mode and the program mode, after the communication service ends, the process returns to the operation mode determination (S3).

通信サービス(S6)では、実行モードかプログラムモードかにかかわらず、サービスインターフェイス14に外部装置が接続されているか、または拡張インターフェイス15に通信用のユニットを介して外部装置が接続されているかを判定し、接続されているときには外部装置と通信することにより命令の有無を確認し、命令があれば命令に応答する。命令の種類と命令に対する応答とについては後述する。プログラムモードにおける通信サービス(S6)では、外部装置が接続されていない場合でも、拡張インターフェイス15に記憶用のユニットが接続されているかを確認し、接続されているときにはプログラムメモリ11と記憶用のユニットとの間でのプログラムの転送を可能にする。   In the communication service (S6), it is determined whether an external device is connected to the service interface 14 or an external device is connected to the extension interface 15 via a communication unit regardless of the execution mode or the program mode. Then, when connected, the presence of an instruction is confirmed by communicating with an external device, and if there is an instruction, it responds to the instruction. The type of command and the response to the command will be described later. In the communication service (S6) in the program mode, even if no external device is connected, it is checked whether a storage unit is connected to the expansion interface 15, and if connected, the program memory 11 and the storage unit are connected. Transfer of programs to and from.

以下では、通信サービスにおいて、外部装置からの命令の有無を確認した後の動作について説明する。記憶用のユニットが接続されている場合の動作については後述する。通信サービスにおいては、外部装置と通信することにより命令の有無を確認し、命令が存在するときには当該命令を受け取って命令の内容を解析する。つまり、主処理部10には命令を解析する命令解析部21が設けられている。命令解析部21はシステムプログラムを実行することにより実現される。   In the following, an operation after confirming the presence / absence of a command from an external device in a communication service will be described. The operation when the storage unit is connected will be described later. In the communication service, the presence / absence of a command is confirmed by communicating with an external device, and when the command exists, the command is received and the content of the command is analyzed. That is, the main processing unit 10 is provided with an instruction analysis unit 21 that analyzes an instruction. The instruction analysis unit 21 is realized by executing a system program.

図1の構成では、外部装置からPLCに与えられる命令の種類として、「プログラム読出」「プログラム書込」「データ読出」「データ書込」「プログラム読出禁止設定」「プログラム読出禁止解除」「プログラム書出」「プログラム読込」「パスワードプロテクト設定」「パスワードプロテクト解除」「暗号キー設定」の11命令が用意されている。ただし、外部装置では、必ずしも11命令のすべてを与えられなくてもよく、「プログラム読出」「プログラム書込」「データ読出」の3命令を含んでいればよい。また、上述した11命令以外の命令を与えることができるように構成してもよい。 In the configuration of FIG. 1 , “program read” “program write” “data read” “data write” “program read prohibition setting” “program read prohibition release” “program read” Eleven commands are prepared: “write”, “program read”, “password protection setting”, “password protection cancellation”, and “encryption key setting”. However, the external device does not necessarily need to be provided with all 11 instructions, and may include three instructions of “program read”, “program write”, and “data read”. Moreover, you may comprise so that instructions other than the 11 instructions mentioned above can be given.

「プログラム読出」命令は、PLCのプログラムメモリ11に格納されたプログラムを外部装置に転送させる命令であるが、図1に示すPLCでは、外部装置からの「プログラム読出」命令に対し、いかなる場合にもプログラムメモリ11から外部装置へのプログラムの転送を禁止する。そのため、システムプログラムによって読出禁止処理部22を実現している。読出禁止処理部22では、外部装置から「プログラム読出」命令を受け取っても、外部装置に対して読出不可のメッセージを返す処理を行うだけであって他の処理を行わない。したがって、外部装置では「プログラム読出」命令をPLCに与えると、読出不可のメッセージを受け取るのみであり、「プログラム読出」命令は実質的に無効になる。 The “program read” command is a command for transferring a program stored in the program memory 11 of the PLC to an external device . However, in the PLC shown in FIG. 1 , in any case in response to the “program read” command from the external device. The program transfer from the program memory 11 to the external device is also prohibited. Therefore, the read prohibition processing unit 22 is realized by the system program. Even when a “program read” command is received from the external device, the read prohibition processing unit 22 only performs processing for returning a non-readable message to the external device, and does not perform other processing. Therefore, when the “program read” command is given to the PLC in the external device, only a message that cannot be read is received, and the “program read” command is substantially invalidated.

上述のように「プログラム読出」命令は実質的に無効であるが、外部装置からプログラムメモリ11にプログラムを書き込むための「プログラム書込」命令は実行される。命令解析部21において「プログラム書込」命令が検出されると、まずプログラムメモリ11の内容を消去する。その後、プログラム解析命令で指定されているプログラムの転送を外部装置に要求し、プログラムを転送させる。さらに、外部装置から転送されたプログラムをプログラムメモリ11に書き込む。このように、プログラムメモリ11の内容を一旦消去してからプログラムをプログラムメモリ11に書き込むから、プログラムの不要な断片が残ることによる誤動作を防止できる。プログラムの書き込みが終了すれば、外部装置に対して書込終了のメッセージを通知する。   As described above, the “program read” instruction is substantially invalid, but the “program write” instruction for writing the program from the external device to the program memory 11 is executed. When the instruction analyzer 21 detects a “program write” instruction, the contents of the program memory 11 are first erased. Thereafter, the external device is requested to transfer the program specified by the program analysis instruction, and the program is transferred. Further, the program transferred from the external device is written into the program memory 11. In this way, since the contents of the program memory 11 are once erased and then the program is written into the program memory 11, it is possible to prevent malfunction due to the remaining unnecessary fragments of the program. When the writing of the program is completed, a writing completion message is notified to the external device.

上述したように、PLCには外部装置として監視制御装置が接続可能であり、監視制御装置ではデータメモリ12に一時記憶されるデータを読み出すことにより、PLCの動作状態や機器の動作状態を把握する。したがって、データは読み出しと書き込みとが自由にできるようにしてある。すなわち、データメモリ12からデータを読み出すための「データ読出」命令を設けてあり、「データ読出」命令ではデータメモリ12のどのデータを読み出すかを指定する。したがって、命令解析部21において「データ読出」命令が検出されると、指定されたデータがデータメモリ12から抽出され、当該データが外部装置に転送される。   As described above, a monitoring control device can be connected to the PLC as an external device, and the monitoring control device reads the data temporarily stored in the data memory 12 to grasp the operation state of the PLC and the operation state of the device. . Therefore, the data can be freely read and written. In other words, a “data read” command for reading data from the data memory 12 is provided, and the “data read” command specifies which data is read from the data memory 12. Therefore, when the “data read” command is detected in the command analysis unit 21, the designated data is extracted from the data memory 12, and the data is transferred to the external device.

一方、データメモリ12にデータを書き込むための「データ書込」命令ではデータメモリ12のどのデータを書き込むかを指定する。したがって、命令解析部21で「データ書込」命令が検出されると、データメモリ12における指定されたデータを書き換える。「プログラム書込」命令と同様に、データの書き込みが終了すれば、外部装置に対して終了のメッセージを通知する。このようにデータメモリ12の特定のデータを指定してデータを変更することが可能であるから、種々データを用いてPLCの動作を検査することが可能になる。   On the other hand, a “data write” command for writing data to the data memory 12 designates which data in the data memory 12 is to be written. Therefore, when the “data write” command is detected by the command analysis unit 21, the designated data in the data memory 12 is rewritten. Similar to the “program write” command, when the data writing is completed, the external device is notified of the termination message. In this way, it is possible to specify specific data in the data memory 12 and change the data, so it is possible to inspect the operation of the PLC using various data.

上述したように、図1に示す構成における読出禁止処理部22では、外部装置から与えられる「プログラム読出」命令に対してメッセージを返すだけであって、実質的に何の処理も行わないから、プログラムの読み出しが禁止されることになる。したがって、外部装置によってプログラムが読み出されることが防止され、プログラムの保守性が高くなる。 As described above, the read prohibition processing unit 22 in the configuration shown in FIG. 1 simply returns a message in response to the “program read” command given from the external device, and does not perform any processing. Reading of the program is prohibited. Therefore, the program is prevented from being read by the external device, and the maintainability of the program is improved.

基本構成では、「プログラム読出」命令をどのような場合にも無視する構成としたが、以下に説明する構成では、主処理部10において、読出禁止処理部22の有効と無効とを切り換えるための読出禁止フラグを格納するフラグ格納部10a(図1参照)を設けている。読出禁止処理部22は読出禁止フラグのセットによって有効になり、読出禁止フラグがセットされていなければ読出禁止処理部22は無効になる。読出禁止処理部22が無効であるとは「プログラム読出」命令が受け付けられることを意味する。また、読出禁止フラグがセットされ読出禁止処理部22が有効になると「プログラム読出」命令が無視される。読出禁止フラグは初期状態ではセットされていないが、読出禁止フラグを一旦セットすると、以後は読出禁止フラグをリセットして元の状態に復帰させることはできなくなる。つまり、当初は読出禁止処理部22は無効の状態であるが、読出禁止フラグをセットして読出禁止処理部22が有効になる状態に切り換えると、以後は読出禁止処理部22を無効にすることができなくなり、プログラムの読み出しが禁止される。言い換えると、読出禁止フラグはセットされていない状態からセットされた状態に不可逆的に変更が可能になっている。 In the basic configuration , the “program read” instruction is ignored in any case. However, in the configuration described below, the main processing unit 10 switches between enabling and disabling the read prohibition processing unit 22. A flag storage unit 10a (see FIG. 1) for storing a read prohibition flag is provided. The read prohibition processing unit 22 is enabled by setting the read prohibition flag. If the read prohibition flag is not set, the read prohibition processing unit 22 is disabled. When the read prohibition processing unit 22 is invalid, it means that a “program read” command is accepted. When the read prohibition flag is set and the read prohibition processing unit 22 is enabled, the “program read” instruction is ignored. The read prohibition flag is not set in the initial state, but once the read prohibition flag is set, the read prohibition flag cannot be reset and returned to the original state thereafter. In other words, the read prohibition processing unit 22 is initially in an invalid state, but if the read prohibition flag is set and the read prohibition processing unit 22 is switched to a valid state, the read prohibition processing unit 22 is invalidated thereafter. Cannot be read, and reading of the program is prohibited. In other words, the read prohibition flag can be irreversibly changed from a state where it is not set to a state where it is set.

上述のように読出禁止フラグをセットした後にはリセットすることができないように、読出禁止フラグの設定変更を一方向として逆方向の設定変更を禁止するには、逆方向の設定変更を許す機能を提供しなければよい。つまり、リセットのための命令を用意しなければよい。ただし、読出禁止フラグの逆方向への設定変更をさらに確実に防止する場合には、ワンタイムプログラマブルメモリのように1回だけ設定変更が可能なメモリを読出禁止フラグに用いる。読出禁止フラグの設定変更は、外部装置から「プログラム読出禁止設定」命令をPLCに与えることにより行う。すなわち、命令解析部21において「プログラム読出禁止設定」命令が検出されると、読出禁止フラグの設定をセットされていない状態からセットされた状態に変更し、読出禁止フラグがセットされたことを外部装置に通知する。   In order to prevent the setting change of the reading prohibition flag from being set in one direction and prohibiting the setting change in the reverse direction so that it cannot be reset after setting the reading prohibition flag as described above, a function for allowing the setting change in the reverse direction is permitted. If not provided. That is, it is not necessary to prepare an instruction for resetting. However, in order to further reliably prevent the setting change in the reverse direction of the read prohibition flag, a memory that can be changed only once, such as a one-time programmable memory, is used as the read prohibition flag. The setting of the read prohibition flag is changed by giving a “program read prohibition setting” command from the external device to the PLC. That is, when the instruction analysis unit 21 detects a “program read prohibition setting” instruction, the setting of the read prohibition flag is changed from the unset state to the set state, and the fact that the read prohibition flag is set is externally set. Notify the device.

この構成では、上述したように、読出禁止処理部22の有効と無効とを選択する読出禁止フラグを設けているから、命令解析部21において「プログラム読出」命令が検出されたときには、読出禁止フラグがセットされているか否かを確認し、読出禁止フラグがセットされておらず読出禁止処理部22が無効になっているときには、プログラムメモリ11に格納されたプログラムを外部装置に転送する。一方、読出禁止フラグがセットされ読出禁止処理部22が有効になっているときには、基本構成と同様に、外部装置に対してプログラムの読出不可のメッセージを返す処理を行う。 In this configuration , as described above, the read prohibition flag for selecting whether the read prohibition processing unit 22 is valid or invalid is provided. When the “program read” instruction is detected in the instruction analysis unit 21, the read prohibition flag is detected. Is set, and if the read prohibition flag is not set and the read prohibition processing unit 22 is disabled, the program stored in the program memory 11 is transferred to the external device. On the other hand, when the read prohibition flag is set and the read prohibition processing unit 22 is enabled, a process of returning a message indicating that the program cannot be read is performed to the external device as in the basic configuration .

この構成では、プログラムを作成してプログラムメモリ11に格納する提供者においては、読出禁止処理部22の無効が読出禁止フラグにより選択されている状態でデバッグの終了したプログラムをPLCから外部装置に読み込み、当該プログラムを他のPLCに書き込むことができる。このように、読出禁止フラグをセットしていなければ、PLCにプログラムを読み書きすることについて制約条件がないから、プログラムの開発、テスト、デバッグの作業を容易に行うことができる。 In this configuration , the provider who creates the program and stores it in the program memory 11 reads the program that has been debugged from the PLC to the external device in a state where the invalidity of the read prohibition processing unit 22 is selected by the read prohibition flag. The program can be written to another PLC. As described above, if the read prohibition flag is not set, there is no restriction on reading and writing the program to and from the PLC, so that the program development, testing, and debugging can be easily performed.

デバッグの作業が終了した後に使用者に出荷する際には、読出禁止処理部22を有効にするように読出禁止フラグをセットすることにより、使用者ではプログラムを読み出せなくなり、使用者によるプログラムの読出を防止することができる。他の構成および動作は基本構成と同様である。 When debugging work is shipped to the user after the completion, by setting the read prohibit flag to enable reading prohibition processing unit 22, Ri no longer be read program by the user, used for business Can prevent reading of the program. Other configurations and operations are the same as the basic configuration .

ところで、上述した構成では、読出禁止フラグのセットによりプログラムの読出を禁止する構成ではあるが、プログラムの書込については基本構成と同様に許容されている。このようにプログラムの書込が許容されていることは、使用者によるプログラムの変更が可能であるということである。プログラムを作成しPLCにプログラムをプログラムメモリ11に格納する提供者は、一般にプログラムを管理しているが、使用者では必ずしもプログラムを管理しているとは限らないから、使用者により変更されたプログラムは再現できない場合がある。 By the way, in the configuration described above , the program is prohibited from being read by setting the read prohibition flag, but the program writing is permitted as in the basic configuration . The fact that writing of a program is permitted in this way means that the user can change the program. A provider who creates a program and stores the program in the program memory 11 in the PLC generally manages the program. However, since the user does not always manage the program, the program is changed by the user. May not be reproducible.

このような事情に鑑みて、以下の構成では、プログラムメモリ11からのプログラムの読出を禁止するだけではなく書込も禁止してある。すなわち、主処理部10には読出禁止処理部22だけではなく書込禁止処理部23(図1参照)も設けてあり、書込禁止処理部23の有効と無効とは読出禁止処理部22と同様にフラグ格納部10aに格納される読出禁止フラグで選択する。PLCの未使用状態では読出禁止処理部22と書込禁止処理部23とはともに無効であって、「プログラム読出」命令と「プログラム書込」命令とはともに実行可能な状態になっている。一方、読出禁止フラグの設定変更がなされると、読出禁止処理部22と書込禁止処理部23とがともに有効になり、「プログラム読出」命令と「プログラム書込」命令とはともに無視される。 In view of such circumstances, in the following configuration , not only reading of the program from the program memory 11 but also writing is prohibited. That is, the main processing unit 10 is provided not only with the read prohibition processing unit 22 but also with a write prohibition processing unit 23 (see FIG. 1). Similarly, the selection is made by the read prohibition flag stored in the flag storage unit 10a. When the PLC is not used, both the read prohibition processing unit 22 and the write prohibition processing unit 23 are invalid, and both the “program read” command and the “program write” command are executable. On the other hand, when the setting of the read prohibition flag is changed, both the read prohibition processing unit 22 and the write prohibition processing unit 23 are enabled, and both the “program read” command and the “program write” command are ignored. .

読出禁止フラグの設定変更は上述した構成と同様に外部装置からPLCに適宜の命令(たとえば、プログラム読出禁止」命令)を与えることによって行ってもよいが、ここでは、命令を与えるのではなく、プログラムメモリ11にプログラムを書き込むことによって読出禁止フラグの設定変更が自動的になされるように、主処理部10において読出禁止フラグ変更処理部24(図1参照)を設けている。読出禁止フラグ変更処理部24では、命令解析部21において「プログラム書込」命令を検出した後、プログラムメモリ11へのプログラムの書き込みが正常終了すると、自動的に読出禁止フラグの設定変更を行う。したがって、プログラムメモリ11に対してプログラムは1回だけ書き込みが可能であり、以後はプログラムを書き込むことも読み出すこともできなくなる。つまり、プログラムをプログラムメモリ11に1回書き込めば、以後はプログラムの変更ができなくなる。 The setting change of the read prohibition flag may be performed by giving an appropriate command (for example, a program read prohibition command) from the external device to the PLC in the same manner as the above-described configuration , but here, the command is not given. A read prohibition flag change processing unit 24 (see FIG. 1) is provided in the main processing unit 10 so that the setting change of the read prohibition flag is automatically performed by writing a program in the program memory 11. The read prohibition flag change processing unit 24 automatically changes the setting of the read prohibition flag when writing of the program to the program memory 11 is normally completed after the instruction analyzer 21 detects the “program write” command. Therefore, the program can be written to the program memory 11 only once, and thereafter, the program cannot be written or read. In other words, once the program is written into the program memory 11, the program cannot be changed thereafter.

上述したように、読出禁止処理部22および書込禁止処理部23の有効と無効とを選択する読出禁止フラグを設定するから、命令解析部21において「プログラム読出」命令が検出されたときには、上述した構成と同様に、読出禁止フラグの設定状態を確認するのであるが、プログラムメモリ11にプログラムが書き込まれていれば読出禁止フラグは「プログラム読出」命令を無効にする状態になっているから、外部装置に対してプログラムの読出不可のメッセージを返す処理を行う。つまり、読出禁止フラグによって「プログラム読出」命令が有効であるときにはプログラムメモリ11にプログラムが存在しない状態であるから、プログラムを外部装置によって読み出すことはできない。 As described above, since setting the read inhibit flag for selecting and enable or disable the reading prohibition processing unit 22 and the write inhibit processing unit 23, when the "program read" instruction is detected in the instruction analyzing unit 21, described above As in the configuration described above, the setting state of the read prohibition flag is confirmed. However, if a program is written in the program memory 11, the read prohibition flag is in a state of invalidating the “program read” instruction. A process of returning a message indicating that the program cannot be read is performed to the external device. That is, when the “program read” instruction is valid by the read prohibition flag, there is no program in the program memory 11 and therefore the program cannot be read by the external device.

一方、図3のように、命令解析部21において「プログラム書込」命令が検出されると、読出禁止フラグの設定状態を確認し(S11)、読出禁止フラグにより書込禁止処理部23の不使用が選択されているときには、プログラムの書込を許可し、「プログラム書込」命令に続いて外部装置から転送されるプログラムをプログラムメモリ11に書き込む(S12)。プログラムの書込が正常に終了すれば、読出禁止フラグの設定変更を行い(S13)、外部装置に対して終了のメッセージを通知する(S14)。一方、プログラムメモリ11にプログラムがすでに書き込まれているときには、読出禁止フラグがセットされて書込禁止処理部23が有効になっているから、読出禁止フラグの設定状態を確認した後(S11)、外部装置に対してプログラムの書込不可のメッセージを返す処理(S15)を行う。   On the other hand, as shown in FIG. 3, when the “program write” instruction is detected in the instruction analysis unit 21, the setting state of the read prohibition flag is confirmed (S11), and the write prohibition processing unit 23 is informed by the read prohibition flag. When the use is selected, the program writing is permitted, and the program transferred from the external device is written in the program memory 11 following the “program writing” command (S12). If the program writing ends normally, the setting of the read prohibition flag is changed (S13), and an end message is notified to the external device (S14). On the other hand, when the program has already been written in the program memory 11, the read prohibition flag is set and the write prohibition processing unit 23 is enabled. After confirming the setting state of the read prohibition flag (S11), A process of returning a message indicating that the program cannot be written to the external device is performed (S15).

以上説明したように、プログラムメモリ11にプログラムを登録すると、以後はプログラムの読出と書込とができなくなるから、使用者によるプログラムの改変が禁止され、プログラムの管理が容易になる。他の構成および動作は上述した構成と同様である。 As described above, when registering a program in the program memory 11, thereafter because it becomes impossible and the reading and writing of the program, is prohibited modification of the program by the user, the management of the program is facilitated. Other configurations and operations are the same as those described above .

上述の構成では読出禁止フラグの設定を1回変更すると読出禁止フラグの設定を元に戻せないようにしているが、このような読出禁止フラグを実現するにはワンタイムプログラマブルメモリのような特別な構成が必要になる。そこで、以下の構成では、読出禁止フラグを不可逆に設定するのではなく、読出禁止フラグの可逆性を保っておき、読出禁止フラグを「プログラム読出」命令が無効である状態から有効である状態に変更したときに、プログラムメモリ11からプログラムを消去することによって、プログラムの読み出しが禁止されるようにしてある。 In the configuration described above, once the setting of the read prohibition flag is changed, the read prohibition flag cannot be restored to the original setting. In order to realize such a read prohibition flag, a special one such as a one-time programmable memory is used. Configuration is required. Therefore, in the following configuration , instead of setting the read prohibition flag irreversibly, the reversibility of the read prohibition flag is maintained, and the read prohibition flag is changed from a state where the “program read” instruction is invalid to a valid state. When the program is changed, reading the program is prohibited by deleting the program from the program memory 11.

すなわち、命令解析部21において「プログラム読出禁止設定」命令が検出されたときには読出禁止フラグの設定を「プログラム読出」命令が無効になるように変更するのであるが、「プログラム読出禁止設定解除」命令が検出されたときには、まずプログラムメモリ11の内容を消去した後に、「プログラム読出」命令が有効になるように読出禁止フラグの設定を変更する。また、読出禁止フラグの設定を変更した後には外部装置に対して終了のメッセージを返す処理を行う。 That is, although of changing the settings of the read out inhibition flag to "Program read" instruction is disabled, "the program read prohibition setting when" Program read prohibition setting "instruction is detected in the instruction decoder 21 When the “release” command is detected, the contents of the program memory 11 are first erased, and then the setting of the read prohibition flag is changed so that the “program read” command becomes valid. Further, after changing the setting of the read prohibition flag, a process of returning an end message to the external device is performed.

本構成では、「プログラム読出禁止設定」命令と「プログラム読出禁止設定解除」命令とを用いることにより読出禁止フラグを可逆的に変更することができるが、「プログラム読出禁止設定解除」命令を用いてプログラムの読み出しを可能にすると、プログラムメモリ11からプログラムが消去されるから、プログラムを読み出すことができず、実質的に使用者によるプログラムの読み出しが禁止される。 In this configuration , the read prohibit flag can be reversibly changed by using the “program read prohibit setting” instruction and the “program read prohibit setting cancel” instruction, but the “program read prohibit setting cancel” instruction is used. If the program can be read, the program is erased from the program memory 11, so that the program cannot be read, and the user is substantially prohibited from reading the program.

本構成を採用すれば、プログラムを作成しPLCに搭載する提供者ではプログラムの書き込みと読み込しとを自由に行うことができ、その後、読出禁止フラグを設定してプログラムの読み出しを禁止すればプログラムを読み出すことはできなくなる。ただし、読出禁止フラグの設定は使用者であっても変更可能であって、プログラムの読み出しを可能にする状態に読出禁止フラグの設定を変更することは使用者にもできる。もっとも、上述のようにプログラムの読み出しを可能にするように読出禁止フラグを変更すると、プログラムメモリ11からプログラムが消去されるから、使用者がプログラムを読み出すことはできない。つまり、「プログラム読出禁止設定解除」命令を用いるとPLCをプログラムの搭載されていない初期状態に戻すことになる。 If this configuration is adopted, a provider who creates a program and installs it in the PLC can freely write and read the program, and then set a read prohibition flag to prohibit reading the program. The program cannot be read. However, the setting of the read prohibition flag can be changed even by the user, and the user can change the setting of the read prohibition flag so that the program can be read. However, if the read prohibition flag is changed so that the program can be read as described above, the program cannot be read by the user because the program is erased from the program memory 11. That is, if the “program read prohibition setting release” instruction is used, the PLC is returned to the initial state where no program is installed.

上述した構成のように、読出禁止フラグをセットすることにより「プログラム書込」命令を無効にすることができる場合でも、本構成のように読出禁止フラグのリセットを可能にしておけば、プログラムを何度でも書き込むことが可能であり、PLCにプログラムを搭載した後でもプログラムのデバッグのようなメンテナンスが可能になる。他の構成および動作は上述の構成と同様である。 Even if the “program write” instruction can be invalidated by setting the read prohibition flag as in the configuration described above , if the read prohibition flag can be reset as in this configuration , the program can be executed. The program can be written any number of times, and maintenance such as program debugging can be performed even after the program is installed in the PLC. Other configurations and operations are the same as those described above .

上述した構成のように、読出禁止フラグがセットされることによりプログラムの読み出しが禁止され、かつプログラムの書き込みは許可されている場合には、使用者が「プログラム書込」命令を安易に使用してプログラムを書き込むと、使用者が書き込んだプログラムを提供者では把握できなくなることがあり、プログラムのメンテナンスができなくなることがある。一方、プログラムメモリ11にプログラムを一旦書き込むと、以後はプログラムメモリ11にプログラムを書き込むことができなくなる構成を採用すれば、使用者によるプログラムの改変を防止することができるが、提供者にとってもプログラムのメンテナンスができなくなるという不都合を生じることがある。また、読出禁止フラグのセットとリセットとを可能にしながらも、読出禁止フラグのリセットによってプログラムが消去される構成を採用すると、誤操作によって読出禁止フラグをリセットするとPLCを使用することができなくなる。 As in the configuration described above , when reading of a program is prohibited by setting the read prohibition flag and writing of the program is permitted, the user can easily use the “program write” command. When the program is written, the provider may not be able to grasp the program written by the user, and the program may not be maintained. Hand, once the write programs in program memory 11, if adopted it becomes impossible to write a program in the program memory 11 configuration, it is possible to prevent the modification of the program by the user, the provider In some cases, the program cannot be maintained. Also, while enabling the setting and resetting of the read out inhibition flag, when employing the configuration in which the program by the reset of the read inhibit flag is cleared, it is not possible to use a PLC Resetting the read prohibit flag by misoperation .

そこで、本構成では、上述した構成において、「プログラム書込」命令にパスワードプロテクトの機能を付加している。また、必ずしも必要ではないが、「プログラム読出」命令についてもパスワードプロテクトの機能を付加している。パスワードプロテクトとは、パスワードを用いてプロテクトフラグのセットとリセットとを可能にし、プロテクトフラグがセットされているときには、プログラムの書き込みと読み出しとを禁止する機能を意味する。 Therefore, in this configuration , a password protect function is added to the “program write” command in the configuration described above . Further, although not necessarily required, a password protection function is also added to the “program read” command. Password protection means a function that enables setting and resetting of a protection flag using a password, and prohibits program writing and reading when the protection flag is set.

すなわち、命令解析部21において「プログラム読出」命令あるいは「プログラム書込」命令が検出されたときに、図4に示すように、まずプロテクトフラグがセットされているか否かを判断し(S21)、プロテクトフラグがセットされていなければ、上述の構成と同様に動作する。要するに、「プログラム読出」命令に対してプロテクトフラグがセットされていなければ、読出禁止フラグがセットされているか否かが判定され(S22)、読出禁止フラグがセットされていなければプログラムメモリ11からプログラムが外部装置に転送される(S23)。また、読出禁止フラグがセットされていると(S22)、外部装置に対してプログラムの読出不可のメッセージを返す処理を行う(S24)。「プログラム書込」命令に対しては読出禁止フラグの判断をしないから、プロテクトフラグがセットされていなければ、プログラムをプログラムメモリ11に書き込んだ後に、外部装置に終了を通知する。一方、プロテクトフラグがセットされている場合には、「プログラム読出」命令と「プログラム書込」命令とのいずれにおいても読出不可あるいは書込不可の通知を外部装置に返す(S24)。 That is, when a “program read” command or a “program write” command is detected in the command analyzer 21, it is first determined whether or not a protect flag is set as shown in FIG. 4 (S21). If the protect flag is not set, the operation is the same as that described above . In short, if the protect flag is not set for the “program read” instruction, it is determined whether or not the read prohibit flag is set (S22). If the read prohibit flag is not set, the program is read from the program memory 11. Is transferred to the external device (S23). If the read prohibition flag is set (S22), a process of returning a program unreadable message to the external device is performed (S24). Since the read prohibition flag is not determined for the “program write” instruction, if the protect flag is not set, the program is written to the program memory 11 and then the end is notified to the external device. On the other hand, when the protect flag is set, a notification indicating that reading or writing is impossible is returned to the external device in both the “program read” command and the “program write” command (S24).

要するに、プロテクトフラグによってプログラムの安易な書込を防止し、プログラムメモリ11からのプログラムの読出に関してはプロテクトフラグと読出禁止フラグとにより二重に保護することになる。   In short, easy writing of a program is prevented by the protect flag, and reading of the program from the program memory 11 is double protected by the protect flag and the read prohibition flag.

ところで、プロテクトフラグは「パスワードプロテクト設定」命令を用いてセットし、「パスワードプロテクト解除」命令を用いてリセットする。すなわち、命令解析部21において「パスワードプロテクト設定」命令が検出されると、主処理部10では、プロテクトフラグをフラグ格納部10a(図1参照)にセットする。次にプロテクトフラグの解除に用いるパスワードが自動的に発生し外部装置に転送される。その後、外部装置には終了が通知される。また、命令解析部21において、「パスワードプロテクト解除」命令が検出されると、図5に示すように、パスワードの入力が促され(S31)、入力したパスワードが一致する場合には(S32)、プロテクトフラグがリセットされ(S33)、また入力したパスワードが不一致の場合には、外部装置に対してプロテクトフラグのリセットができない旨が通知される(S34)。   By the way, the protect flag is set by using a “password protect setting” command and reset by using a “password protect cancel” command. That is, when a “password protection setting” command is detected in the command analysis unit 21, the main processing unit 10 sets a protection flag in the flag storage unit 10a (see FIG. 1). Next, a password used to cancel the protect flag is automatically generated and transferred to the external device. Thereafter, the external device is notified of the end. When the command analysis unit 21 detects a “password protection cancellation” command, as shown in FIG. 5, the user is prompted to enter a password (S31). If the entered passwords match (S32), The protect flag is reset (S33), and if the input passwords do not match, the external device is notified that the protect flag cannot be reset (S34).

本構成では、提供者がパスワードを設定すれば、使用者はプロテクトフラグを安易に解除することができず、プロテクトフラグをセットしておけば、仮に使用者がパスワードを知ったとしてもプロテクトフラグを解除しなければプログラムメモリ11へのプログラムの書込ができないから、誤操作によるプログラムの書込を禁止することができる。つまり、使用者がプログラムメモリ11に格納されたプログラムを安易に書き換える可能性を低減し、また誤操作によってプログラムが破損する可能性を低減することができる。 In this configuration , if the provider sets a password, the user cannot easily release the protect flag. If the protect flag is set, the protect flag is set even if the user knows the password. Since the program cannot be written to the program memory 11 unless it is released, the program can be prohibited from being written by an erroneous operation. That is, it is possible to reduce the possibility that the user easily rewrites the program stored in the program memory 11, and to reduce the possibility that the program is damaged by an erroneous operation.

本構成では、プロテクトフラグに関する機能を読出禁止フラグを不可逆にセットする構成に付加しているが、読出禁止フラグを可逆的に変更する構成にプロテクトフラグに関する機能を付加してもよい。 In this configuration , the function relating to the protection flag is added to the configuration for setting the read prohibition flag irreversibly, but the function relating to the protection flag may be added to the configuration for reversibly changing the read prohibition flag .

本構成では、図6に示すように、拡張インターフェイス15に外部記憶装置として記憶用のユニット(以下、「メモリユニット」と呼ぶ)31を接続することによって、プログラムメモリ11に格納されたプログラムを他のPLCに転送する動作について説明する。また、上述した構成と同様に、PLCには読出禁止フラグが設定されるものとする。 In this configuration , as shown in FIG. 6, by connecting a storage unit (hereinafter referred to as “memory unit”) 31 as an external storage device to the expansion interface 15, another program stored in the program memory 11 can be stored. The operation of transferring to the PLC will be described. Similarly to the configuration described above, a read prohibition flag is set in the PLC.

メモリユニット31は、PLCの器体30に設けた拡張インターフェイス15のコネクタ(図示せず)に着脱可能に装着される。メモリユニット31をPLCに装着した状態で、命令解析部21において「プログラム書出」命令が検出されると、プログラムメモリ11に格納されたプログラムがメモリユニット31に転送される。ただし、「プログラム書出」命令が検出されたときに、PLCにメモリユニット31が装着されていなければ、外部装置に対して書出不能のメッセージを返す処理を行う。上述のようにPLCにプログラムの読み出しを禁止する読出禁止フラグが設定されていることを前提にしているから、「プログラム書出」命令により、プログラムメモリ11からメモリユニット31にプログラムが書き出された後、読出禁止フラグもメモリユニット31に転送される。なお、プロテクトフラグが設定されているときにはプロテクトフラグも転送される。このようにしてプログラムおよび読出禁止フラグ(プロテクトフラグがある場合はプロテクトフラグも含む)をPLCからメモリユニット31に転送し終わると、終了のメッセージが外部装置に送られる。 The memory unit 31 is detachably attached to a connector (not shown) of the expansion interface 15 provided in the PLC body 30. When the “program write” command is detected by the command analysis unit 21 with the memory unit 31 mounted on the PLC, the program stored in the program memory 11 is transferred to the memory unit 31. However, when the “program write” command is detected, if the memory unit 31 is not attached to the PLC, a process of returning a message that cannot be written to the external device is performed. As described above, since it is assumed that the read prohibition flag for prohibiting the reading of the program is set in the PLC, the program is written from the program memory 11 to the memory unit 31 by the “program write” instruction. Thereafter, the read prohibition flag is also transferred to the memory unit 31. Name your, protect flag is also transferred when the flop Rotekutofuragu has been set. When the program and the read prohibition flag (including the protect flag if there is a protect flag) are thus transferred from the PLC to the memory unit 31, an end message is sent to the external device.

「プログラム書出」命令は「プログラム読込」命令と対であって、メモリユニット31がPLCに装着された状態で「プログラム読込」命令が命令解析部21において検出されると、メモリユニット31に格納されたプログラムがPLCのプログラムメモリ11に転送される。「プログラム読込」命令が検出されたときに、当該PLCにメモリユニット31が装着されていなければ、外部装置に対して読込不能のメッセージを返す処理を行う。「プログラム読込」命令によってメモリユニット31からプログラムメモリ11にプログラムが転送された後には、読出禁止フラグ(プロテクトフラグがある場合にはプロテクトフラグも)が転送され、終了のメッセージが外部装置に送られる。   The “program read” command is paired with the “program read” command. When the “program read” command is detected by the command analysis unit 21 with the memory unit 31 mounted on the PLC, the “program read” command is stored in the memory unit 31. The transferred program is transferred to the program memory 11 of the PLC. If the memory unit 31 is not attached to the PLC when the “program read” command is detected, a process of returning an unreadable message to the external device is performed. After the program is transferred from the memory unit 31 to the program memory 11 by the “program read” instruction, a read prohibition flag (also a protect flag if there is a protect flag) is transferred, and an end message is sent to the external device. .

上述したメモリユニット31は、PLCとの間でプログラムおよび読出禁止フラグ(必要に応じてプロテクトフラグ)の受け渡しが可能であるが、メモリユニット31は拡張インターフェイス15に接続されるものであり、サービスインターフェイス14に接続する外部装置とは、コネクタの形状だけではなくデータの伝送方式が異なるから、メモリユニット31に書き出されたプログラムは普通には読み出すことができない。したがって、メモリユニット31にプログラムを転送してもプログラムは保護される。   The memory unit 31 described above can exchange a program and a read prohibition flag (a protection flag if necessary) with the PLC. However, the memory unit 31 is connected to the expansion interface 15 and is connected to the service interface. 14 is different not only in the shape of the connector but also in the data transmission method from the external device connected to 14, so that the program written in the memory unit 31 cannot be read normally. Therefore, even if the program is transferred to the memory unit 31, the program is protected.

上述した構成により、プログラムを格納した1個のメモリユニット31があれば、複数台のPLCにプログラムを書き込むことが可能になる。また、PLCの使用者に対して提供者がプログラムを書き込んだメモリユニット31を送付すれば、PLCに最新のプログラムを書き込むことができ、しかもメモリユニット31からPLCにプログラムを転送した後にはプログラムの読出を禁止する読出禁止フラグも転送されるから、プログラムのノウハウなどを保護しつつもプログラムのバージョンアップを容易に行うことができる。また、メモリユニット31からPLCにプログラムを転送する際に読出禁止フラグも転送されるから、提供者においてはメモリユニット31からPLCにプログラムを転送する試験をしてみれば、読出禁止フラグが正しく設定されているか否かを容易に確認することができる。   With the configuration described above, if there is one memory unit 31 storing a program, the program can be written to a plurality of PLCs. If the provider sends the memory unit 31 in which the program is written to the PLC user, the latest program can be written in the PLC, and after the program is transferred from the memory unit 31 to the PLC, the program Since the reading prohibition flag for prohibiting reading is also transferred, it is possible to easily upgrade the program while protecting the know-how of the program. In addition, since the read prohibition flag is also transferred when the program is transferred from the memory unit 31 to the PLC, if the provider performs a test for transferring the program from the memory unit 31 to the PLC, the read prohibition flag is set correctly. It can be easily confirmed whether or not it is done.

プログラムの読出を禁止する読出禁止フラグがPLCにセットされていない場合であっても、メモリユニット31にプログラムを書き出す際に外部装置からセットを指示することを可能とすれば、PLCに読出禁止フラグが設定されている場合と同様に、他のPLCにおいてプログラムの読出を禁止することができる。なお、読出禁止フラグのセットは指定できるが、読出禁止フラグのリセットは指定できないようにしてある。   Even if the read prohibit flag for prohibiting the reading of the program is not set in the PLC, if the setting can be instructed from an external device when the program is written in the memory unit 31, the read prohibit flag is displayed in the PLC. Similarly to the case where is set, reading of a program can be prohibited in another PLC. Note that the read prohibit flag can be set, but the read prohibit flag cannot be reset.

上述の構成例では、PLCにメモリユニット31を接続し、「プログラム書出」命令を外部装置から与えると、PLCのプログラムがメモリユニット31にいつでも転送されるから、プログラムが登録されたPLCが1台あれば、当該PLCからメモリユニット31にプログラムを書き出し、メモリユニット31に格納されたプログラムを他のPLCで読み込めば、複数台のPLCに同じプログラムを転送することが可能になる。つまり、プログラムの読出に対する保護がなされているものの、プログラムの複製に対する保護がなされていない。そこで、複製を防止するためにPLCにおいて読出禁止フラグが設定されているときに、メモリユニット31への書き出しを禁止する構成を採用してもよい。   In the above configuration example, when the memory unit 31 is connected to the PLC and a “program write” command is given from an external device, the PLC program is transferred to the memory unit 31 at any time. If there is a device, the same program can be transferred to a plurality of PLCs by writing the program from the PLC to the memory unit 31 and reading the program stored in the memory unit 31 with another PLC. That is, the program is protected against reading, but the program is not protected against copying. Therefore, a configuration may be adopted in which writing to the memory unit 31 is prohibited when a read prohibition flag is set in the PLC in order to prevent duplication.

この構成を採用すれば、メモリユニット31を用いても、あらかじめプログラムが書き込まれたPLCからプログラムを読み出すことができないから、当該PLCからのプログラムの複製を防止することができる。ただし、この構成を採用してもメモリユニット31にプログラムが書き込まれていれば、複数台のPLCにプログラムを書き込むことができるから、複数台のPLCへのプログラムの複製を完全に防止できるわけではない。   If this configuration is adopted, even if the memory unit 31 is used, since the program cannot be read from the PLC in which the program has been written in advance, the duplication of the program from the PLC can be prevented. However, even if this configuration is adopted, if the program is written in the memory unit 31, the program can be written in a plurality of PLCs, so that the duplication of the program to the plurality of PLCs cannot be completely prevented. Absent.

そこで、メモリユニット31からPLCにプログラムを転送する際に、プログラムの転送が終了した後にメモリユニット31のプログラムを消去する構成を採用してもよい。プログラムの消去はPLCからプログラムの書込を終了した旨の通知がなされたときに行われるようにしておけばよい。このように、メモリユニット31からPLCへのプログラムの転送を1回限りにすれば、1個のメモリユニット31から複数台のPLCにプログラムが転送されることはなく、プログラムの無制限な複製を防止することができる。なお、メモリユニット31においてPLCへのプログラムの転送回数を示すカウンタを内蔵しておけば、プログラムの転送を許容された所定回数(所定台数)だけ行うことも可能である。   Therefore, when transferring a program from the memory unit 31 to the PLC, a configuration may be adopted in which the program in the memory unit 31 is deleted after the transfer of the program is completed. The program erasing may be performed when the PLC notifies that the program writing has been completed. As described above, if the transfer of the program from the memory unit 31 to the PLC is performed only once, the program is not transferred from one memory unit 31 to a plurality of PLCs, and unlimited copying of the program is prevented. can do. If the memory unit 31 has a built-in counter indicating the number of program transfers to the PLC, the program can be transferred a predetermined number of times (a predetermined number).

PLCのプログラムメモリ11に格納されたプログラムをメモリユニット31を用いて他のPLCに転送する場合であっても、上述した各種の技術を採用すれば、外部装置を用いることによっては、メモリユニット31とPLCとのいずれからもプログラムを読み出すことはできないが、十分な知識を有する使用者であれば、PLCからプログラムが転送されたメモリユニット31を分解すればプログラムを読み出すことが可能になる場合がある。   Even when the program stored in the program memory 11 of the PLC is transferred to another PLC using the memory unit 31, if the various techniques described above are employed, the memory unit 31 may be used depending on the use of an external device. The program cannot be read from either the PLC or the PLC, but if the user has sufficient knowledge, it may be possible to read the program by disassembling the memory unit 31 to which the program has been transferred from the PLC. is there.

そこで、PLCからメモリユニット31にプログラムを転送する際に暗号化し、メモリユニット31からPLCにプログラムを転送する際には復号化するのが望ましい。そのため、主処理部10には暗号化と復号化とを行う暗号化・復号化部25を設ける。この構成を採用すれば、メモリユニット31には暗号化されたプログラムが格納されるから、たとえメモリユニット10を分解してもプログラムを容易には解読することができず、開発したプログラムをより確実に保護できる。 Therefore, it is desirable that encryption is performed when the program is transferred from the PLC to the memory unit 31, and decryption is performed when the program is transferred from the memory unit 31 to the PLC. Therefore, the main processing unit 10 is provided with an encryption / decryption unit 25 that performs encryption and decryption. If this configuration is adopted, since the encrypted program is stored in the memory unit 31, even if the memory unit 10 is disassembled, the program cannot be easily deciphered, and the developed program is more reliable. Can be protected.

また、プログラムを格納したメモリユニット31を標準品のPLCに装着しても暗号化されたプログラムをPLCで実行することはできず、専用のPLCが必要であるから、提供者は暗号化および復号化の機能を備える専用のPLCを提供することによりプログラムの開発費用を回収することが可能になる。また、使用者が暗号化されたプログラムを解読しようとしても時間がかかるから、暗号化していない場合よりもプログラムを確実に保護することができる。   Even if the memory unit 31 storing the program is attached to a standard PLC, the encrypted program cannot be executed by the PLC, and a dedicated PLC is required. By providing a dedicated PLC having the function of making it possible, it becomes possible to recover the development cost of the program. Further, since it takes time even if the user tries to decrypt the encrypted program, the program can be protected more securely than when the user does not encrypt the program.

上述の例では専用のPLCを用いてプログラムの暗号化および復号化を行うことになるが、汎用のPLCを用いても暗号キーを任意に設定可能とすれば、暗号キーの設定者以外にはプログラムの復号ができなくなるから、専用のPLCを用いる場合と同様の機能を汎用のPLCに与えることができる。すなわち、暗号キーを用いた暗号化と復号化とが可能になるようにシステムプログラムを変更して暗号化・復号化部25を主処理部10に設けておき、さらに外部装置から暗号キーを設定可能として、プログラムに暗号キーを埋め込んでおけば、暗号キーを知る者以外はPLCからメモリユニット31にプログラムを転送させることができないから、暗号キーを通知しなければ使用者によるプログラムの複製を防止することができる。他の構成および動作は上述した各構成と同様である。 In the above example, the program is encrypted and decrypted using a dedicated PLC. However, if the encryption key can be arbitrarily set even using a general-purpose PLC, it is necessary for anyone other than the person who set the encryption key. Since it becomes impossible to decode the program, the general-purpose PLC can be provided with the same function as when a dedicated PLC is used. That is, the system program is changed so that encryption and decryption using an encryption key are possible, and the encryption / decryption unit 25 is provided in the main processing unit 10, and further, the encryption key is set from an external device If the encryption key is embedded in the program, only the person who knows the encryption key can transfer the program from the PLC to the memory unit 31. Therefore, the user cannot copy the program unless the encryption key is notified. can do. Other configurations and operations are the same as each configuration described above.

上述した例では拡張インターフェイス15にメモリユニット31を接続しているが、拡張インターフェイス15にはメモリユニット31ではなく他の外部記憶装置を接続してもよい。   In the example described above, the memory unit 31 is connected to the expansion interface 15. However, instead of the memory unit 31, another external storage device may be connected to the expansion interface 15.

本発明の実施形態を示すブロック図である。It is a block diagram which shows embodiment of this invention. 同上の基本動作を示す動作説明図である。It is operation | movement explanatory drawing which shows basic operation same as the above. 同上の一例におけるプログラム書込命令に対する動作説明図である。It is operation | movement explanatory drawing with respect to the program write command in an example same as the above . 同上の他例におけるプログラム読出命令に対する動作説明図である。It is operation | movement explanatory drawing with respect to the program read command in the other example same as the above . 図4に示した例におけるパスワードプロテクト解除命令に対する動作説明図である。 FIG. 5 is an operation explanatory diagram for a password protect release command in the example shown in FIG. 4 . 本発明の実施形態を示す外観斜視図である。It is an external appearance perspective view which shows embodiment of this invention.

符号の説明Explanation of symbols

10 主処理部
10a フラグ格納部
11 プログラムメモリ
12 データメモリ
13 機器インターフェイス
14 サービスインターフェイス
15 拡張インターフェイス
21 命令解析部
22 読出禁止処理部
23 書込禁止処理部
24 読出禁止フラグ変更処理部
25 暗号化・復号化部
30 器体
31 メモリユニット(外部記憶装置)
DESCRIPTION OF SYMBOLS 10 Main processing part 10a Flag storage part 11 Program memory 12 Data memory 13 Equipment interface 14 Service interface 15 Extended interface 21 Instruction analysis part 22 Read prohibition process part 23 Write prohibition process part 24 Read prohibition flag change process part 25 Encryption / decryption 30 unit 31 memory unit (external storage device)

Claims (7)

制御対象となる機器の制御手順を示すシーケンスプログラムが格納される書換可能なプログラムメモリと、プログラムメモリに格納されたシーケンスプログラムに従って機器を制御するプロセッサを有した主処理部と、主処理部と通信可能であってシーケンスプログラムを作成しプログラムメモリに書き込む外部装置を接続するためのサービスインターフェイスと、プログラムメモリとの間でシーケンスプログラムの授受が可能な外部記憶装置を着脱可能に接続する拡張インターフェイスとを備え、主処理部は、プログラムメモリに格納されたシーケンスプログラムについてサービスインターフェイスから外部装置への読み出しを禁止する読出禁止処理部と、セット時に読出禁止処理部を有効にする読出禁止フラグが格納されるフラグ格納部とを備え、さらに、主処理部は、外部記憶装置が拡張インターフェイスに接続されている状態でサービスインターフェイスに接続した外部装置からプログラム書出命令が与えられたときに、フラグ格納部に読出禁止フラグがセットされていれば、プログラムメモリからシーケンスプログラムを外部記憶装置に転送して保存させるとともに、読出禁止フラグを主処理部のフラグ格納部から外部記憶装置に転送して保存させ、シーケンスプログラムを保存している外部記憶装置が拡張インターフェイスに接続されている状態でサービスインターフェイスに接続した外部装置からプログラム読込命令が与えられたときに、シーケンスプログラムを外部記憶装置からプログラムメモリに転送するとともに、外部記憶装置に読出禁止フラグが保存されていれば、読出禁止フラグを外部記憶装置から主処理部のフラグ格納部に転送してセットさせることを特徴とするプログラマブルコントローラ。 A rewritable program memory in which a sequence program indicating a control procedure of a device to be controlled is stored, a main processing unit having a processor for controlling the device according to the sequence program stored in the program memory, and communication with the main processing unit and service interface for connecting an external device to write to create a program memory a sequence program be possible, the expansion interface for detachably connecting an external storage device can exchange the sequence program with the program memory the provided, the main processing unit, a read inhibition processing section for prohibiting the reading of the sequence program stored in the program memory to the external device from the service interface, the read prohibit flag to enable reading prohibition processing unit during cell Tsu DOO flag stored storage unit Comprising a further main processing unit, when the external storage device exits the program manual instructions from an external device connected to the service interface in a state connected to the expansion interface is provided, the read prohibit flag in the flag storage unit If it is set, the sequence program is transferred from the program memory to the external storage device and saved, and the read prohibition flag is transferred from the flag storage unit of the main processing unit to the external storage device and saved to save the sequence program. When a program read command is given from an external device connected to the service interface while the external storage device is connected to the expansion interface , the sequence program is transferred from the external storage device to the program memory, and the external storage device Read prohibition flag is stored in Lever, programmable controller, characterized in that to set forward the read disable flag from the external storage device in the flag storage unit of the main processor. 前記主処理部は、前記外部記憶装置からプログラムメモリにシーケンスプログラムを転送する際に、シーケンスプログラムの転送が終了した後に外部記憶装置のシーケンスプログラムを消去することを特徴とする請求項1記載のプログラマブルコントローラ。 The programmable processing according to claim 1, wherein the main processing unit erases the sequence program of the external storage device after the transfer of the sequence program is completed when the sequence program is transferred from the external storage device to the program memory. controller. 前記主処理部は、前記フラグ格納部に読出禁止フラグを一旦セットすると、フラグ格納部からの読出禁止フラグのリセットを禁止することを特徴とする請求項1または請求項2記載のプログラマブルコントローラ。 3. The programmable controller according to claim 1 , wherein the main processing unit prohibits resetting of the read prohibition flag from the flag storage unit once the read prohibition flag is set in the flag storage unit . 前記主処理部は、前記フラグ格納部に読出禁止フラグがセットされている状態からリセットされると前記プログラムメモリの内容を消去することを特徴とする請求項1または請求項2記載のプログラマブルコントローラ。 3. The programmable controller according to claim 1 , wherein the main processing unit erases the contents of the program memory when reset from a state in which a read prohibition flag is set in the flag storage unit . 前記主処理部は、前記外部装置から前記サービスインターフェイスを通して前記プログラムメモリにシーケンスプログラムを書き込むことを禁止する書込禁止処理部を備えるとともに、あらかじめ登録したパスワードと一致するパスワードが外部装置から入力されたときに書込禁止処理部を無効にすることを特徴とする請求項1ないし請求項4のいずれか1項に記載のプログラマブルコントローラ。 The main processing unit includes a write prohibition processing unit that prohibits writing of a sequence program from the external device to the program memory through the service interface, and a password that matches a previously registered password is input from the external device. the programmable controller according to any one of claims 1 to 4, characterized in that disabling the write-protected processing unit when. 前記主処理部は、前記プログラムメモリから前記外部記憶装置にシーケンスプログラムを転送する際に暗号化するとともに、前記外部記憶装置から前記プログラムメモリにシーケンスプログラムを転送する際に復号化する暗号化・復号化部を備えることを特徴とする請求項1ないし請求項5のいずれか1項に記載のプログラマブルコントローラ。 The main processing unit encrypts when transferring a sequence program from the program memory to the external storage device, and encrypts / decrypts when transferring a sequence program from the external storage device to the program memory The programmable controller according to claim 1, further comprising a conversion unit . 前記暗号化・復号化部は、前記外部装置により暗号キーを設定可能であることを特徴とする請求項6記載のプログラマブルコントローラ。The programmable controller according to claim 6, wherein the encryption / decryption unit can set an encryption key by the external device.
JP2005154688A 2005-05-26 2005-05-26 Programmable controller Active JP4501781B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005154688A JP4501781B2 (en) 2005-05-26 2005-05-26 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005154688A JP4501781B2 (en) 2005-05-26 2005-05-26 Programmable controller

Publications (2)

Publication Number Publication Date
JP2006331130A JP2006331130A (en) 2006-12-07
JP4501781B2 true JP4501781B2 (en) 2010-07-14

Family

ID=37552746

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005154688A Active JP4501781B2 (en) 2005-05-26 2005-05-26 Programmable controller

Country Status (1)

Country Link
JP (1) JP4501781B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4924898B2 (en) * 2007-09-27 2012-04-25 スズキ株式会社 Engine start-up control device
US9471812B2 (en) * 2012-03-06 2016-10-18 Freescale Semiconductor, Inc. Method for implementing security of non-volatile memory
DE112012007242T5 (en) 2012-12-20 2016-01-14 Mitsubishi Electric Corp. Control system, program transmission device, authentication server, program protection method, program transmission method and program for program transmission device
KR101539253B1 (en) * 2014-06-17 2015-07-28 주식회사 엔에스이 A PLC device provided with a function for managing program quality
JP2019149763A (en) * 2018-02-28 2019-09-05 オムロン株式会社 Data processing method, control system, and control device
JP6757386B2 (en) 2018-10-23 2020-09-16 株式会社キーエンス Programmable logic controller and program creation support device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002328706A (en) * 2001-04-27 2002-11-15 Omron Corp Programmable controller system
JP2004005389A (en) * 2002-01-10 2004-01-08 Omron Corp Unit, plc and processing method for user program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62100805A (en) * 1985-10-28 1987-05-11 Omron Tateisi Electronics Co Programmable controller
JPH05233036A (en) * 1992-02-18 1993-09-10 Keyence Corp Control sequence program reader for programmable controller
JPH06110512A (en) * 1992-09-25 1994-04-22 Matsushita Electric Works Ltd Programmable controller
JPH08179812A (en) * 1994-12-22 1996-07-12 Matsushita Electric Works Ltd Programmable controller
JP3461234B2 (en) * 1996-01-22 2003-10-27 株式会社東芝 Data protection circuit
JP3688827B2 (en) * 1996-10-25 2005-08-31 三菱電機株式会社 Peripheral device of programmable controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002328706A (en) * 2001-04-27 2002-11-15 Omron Corp Programmable controller system
JP2004005389A (en) * 2002-01-10 2004-01-08 Omron Corp Unit, plc and processing method for user program

Also Published As

Publication number Publication date
JP2006331130A (en) 2006-12-07

Similar Documents

Publication Publication Date Title
JP4501781B2 (en) Programmable controller
KR101016076B1 (en) Programmable indicator, and control system
JP5419776B2 (en) Semiconductor device and data processing method
JPWO2007125911A1 (en) Data processing apparatus, method, program, integrated circuit, program generation apparatus
JP5055490B2 (en) Semiconductor memory device
JP2004228786A (en) Data access control method by tamper-resistant microprocessor and cache memory mount processor
KR102007532B1 (en) Hardware security module with means to selectively activate or inhibit debugging and corresponding debugging method
US20120310379A1 (en) Programmable controller
JP2012118884A (en) Processor and semiconductor device
JP2014235326A (en) System, information processing apparatus, secure module, and verification method
CN102236765B (en) Method and device for protecting programmable logic controller (PLC) safely
US9311460B2 (en) Programmable controller system, tool device, tool program, storage medium, and programmable controller
JP2009025907A (en) Semiconductor integrated circuit device and signal processing method therefor
JP2008152551A (en) Software option setting system and setting method
JP2007507020A (en) Method for reloading software into the boot sector of a programmable read-only memory
JP5759827B2 (en) MEMORY SYSTEM, INFORMATION PROCESSING DEVICE, MEMORY DEVICE, AND MEMORY SYSTEM OPERATION METHOD
JP2014157483A (en) Controller and information processing device
JP4471120B2 (en) Programmable controller
EP2523057B1 (en) Programmable controller system, tool device, tool program and recording medium
JP5761880B2 (en) Automobile
CN104573566A (en) Method for setting system working mode of mobile data terminal
JP4953316B2 (en) Storage device and information processing system
JP5603993B2 (en) Electrical unit and data processing method
JP4529071B2 (en) Process control device
JP2007074701A (en) Method for encrypting and decrypting information security and recording media readable by personal computer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070703

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090723

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090728

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090928

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100118

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100330

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100412

R151 Written notification of patent or utility model registration

Ref document number: 4501781

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140430

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250