JP4440172B2 - Programmable controller - Google Patents
Programmable controller Download PDFInfo
- Publication number
- JP4440172B2 JP4440172B2 JP2005167126A JP2005167126A JP4440172B2 JP 4440172 B2 JP4440172 B2 JP 4440172B2 JP 2005167126 A JP2005167126 A JP 2005167126A JP 2005167126 A JP2005167126 A JP 2005167126A JP 4440172 B2 JP4440172 B2 JP 4440172B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- memory
- expansion
- cpu
- execution
- 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 - Fee Related
Links
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、圧縮されたプログラムを展開して実行する機能を有するプログラマブルコントローラに関するものである。 The present invention relates to a programmable controller having a function of expanding and executing a compressed program.
プログラマブルコントローラ(以下、PLCともいう)は、演算処理装置(CPU)、メモリ、通信手段などを備え、プログラミングツール等により通信手段を通してプログラムをメモリに予め記憶させておき、演算実行時にはCPUがプログラムをメモリから読み出しながら演算処理する。PLCとは元来、ハードウェアのリレー回路をソフトウェアプログラム化して実行するものであって、例えばセンサスイッチの入力に対する停止信号出力のように安全装置のような使用をされることもあり、ハードウェアリレー回路に近づけるような高速なプログラム処理が要求される。 A programmable controller (hereinafter also referred to as PLC) includes an arithmetic processing unit (CPU), a memory, communication means, and the like. A program is stored in the memory in advance through communication means by a programming tool or the like, and the CPU executes the program at the time of executing the calculation. Arithmetic processing is performed while reading from the memory. The PLC is originally executed by making a hardware relay circuit into a software program, and may be used as a safety device such as a stop signal output for the sensor switch input. High-speed program processing that is close to the relay circuit is required.
またPLCは、様々な機器の制御、複雑な制御に使用されるようになっており、さらにファンクションブロックダイヤグラム等の視覚的なプログラミングを行うツールによってプログラムが自動的に変換・生成されることもあることから、PLCの演算処理するプログラムは肥大化してきている。ただし、このような複雑で大容量のプログラムは、機能ごとに幾つかのプログラムに分割されることが多い。 The PLC is used for various equipment control and complex control, and the program may be automatically converted and generated by a visual programming tool such as a function block diagram. For this reason, programs for processing the PLC have been enlarged. However, such a complicated and large-capacity program is often divided into several programs for each function.
このように、PLCにおいては、大容量のプログラムを、高速にプログラム処理することが求められているが、その反面、メモリ容量の増大による製造コスト高は避けなければならない。そこで、大容量のプログラムを圧縮してPLCに搭載することが考えられるが、CPUが直接アクセスするメモリに、プログラムを圧縮状態で記憶すると、展開処理に要する時間を考慮しなくてはならず、CPUのプログラム処理速度を向上させることはできない。 As described above, in the PLC, it is required to process a large-capacity program at a high speed, but on the other hand, high manufacturing cost due to an increase in memory capacity must be avoided. Therefore, it is conceivable to compress a large-capacity program and mount it in the PLC. However, if the program is stored in a memory directly accessed by the CPU, the time required for the expansion process must be taken into consideration. The program processing speed cannot be improved.
そこで、特許文献1においては、マイクロコンピュータにおいて、CPUからプログラムのロード命令が発行されると、ROMから圧縮された実行プログラムが必要量だけ加工部へ送られ、加工部にて伸張、加工されて実行プログラムとなってRAMへ格納され、CPUはRAMへ格納されたプログラムに従って処理を行い、実行中のプログラムの続きがまだRAMへ格納されていない処理へ続く場合には、CPUは再びROMに格納されている圧縮された実行プログラムをRAMへロードする命令をROMと加工部へ発行するようにしている。
Therefore, in
しかしながら、特許文献1に示された従来の技術では、CPUはプログラムの展開済み部分の演算処理が完了した後、加工部へプログラムを展開する命令を発行し、加工部によるプログラムの展開完了を待ってから演算処理を再開することとなる。このため、特許文献1では、本来のプログラム演算処理時間以外に、プログラムを展開している間の待ち時間が掛かり、全体としてのプログラム実行にかかる時間が長くなるという問題点があった。
However, in the conventional technique disclosed in
本発明は、上記に鑑みてなされたものであって、全体としての演算処理時間を延ばすことなく圧縮されたプログラムを演算処理することができるプログラマブルコントローラを得ることを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to obtain a programmable controller capable of performing arithmetic processing on a compressed program without extending the arithmetic processing time as a whole.
上述した課題を解決し、目的を達成するために、本発明のプログラマブルコントローラは、圧縮された複数のプログラムを展開する展開手段と、前記展開手段で展開された複数のプログラムを順次実行するCPUとを備え、前記展開手段は、前記CPUでのプログラム実行に並行して、次に実行するプログラムを展開するようにしたことを特徴とする。 In order to solve the above-described problems and achieve the object, a programmable controller according to the present invention includes a decompression unit that decompresses a plurality of compressed programs, and a CPU that sequentially executes the plurality of programs decompressed by the decompression unit. The expansion means expands a program to be executed next in parallel with the program execution by the CPU.
この発明によれば、展開手段がプログラムを展開する処理とCPUがプログラムを実行する処理とが並列して処理されるので、CPU側では展開による待ち時間がなくなり、これにより全体としてのプログラム演算処理時間を短くすることができるという効果を奏する。 According to the present invention, since the processing for expanding the program by the expansion means and the processing for executing the program by the CPU are performed in parallel, there is no waiting time due to expansion on the CPU side. There is an effect that the time can be shortened.
以下に、本発明にかかるプログラマブルコントローラの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 Embodiments of a programmable controller according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
図1は、この発明の実施の形態に係るプログラマブルコントローラ(PLC)を示すものである。PLCは、プログラムを演算処理するCPU1と、プログラム,データなどの圧縮処理を実行する圧縮手段2と、プログラム,データなどの展開処理を実行する展開手段3と、プログラミングツール(図示せず)等との通信を行うための通信手段4と、プログラムを記憶するメモリ(一次メモリ5および二次メモリ6)を備えている。
FIG. 1 shows a programmable controller (PLC) according to an embodiment of the present invention. The PLC includes a
プログラムやデータを記憶するメモリは、一次メモリ5と二次メモリ6によって構成されている。二次メモリ6は拡張や交換の可能な外部メモリを含んでいてよい。プログラミングツール等から通信手段4を介して受信したプログラムは、二次メモリ6に記憶される。一次メモリ5にはCPU1によって演算処理可能なプログラムが記憶される。
A memory for storing programs and data includes a
展開手段3および圧縮手段2は、CPU1と独立して動作できることを特徴としている。これにより、CPU1の演算処理時間に影響を与えることなく、同時並行的にプログラムの展開および圧縮を実行でき、かつCPU1を介することなくメモリに記憶されたプログラムを読み出し、またプログラムをメモリへ書き込むことができる。
The expansion means 3 and the compression means 2 are characterized in that they can operate independently of the
プログラミングツール等からPLCに送信されるプログラムやデータには、データの名前がつけられており、名前によってデータの種類を区別できる。よって、プログラムやユーザが作成したテキスト情報等のデータサイズが大きくなると予想されるデータについては、予めPLCにそのデータの種類が登録され、PLCがそのデータの種類によって、あまりサイズの大きくならないデータと区別可能である。このときのデータの種類は、ユーザがプログラム作成時に任意に設定するパラメータ等で登録できるものとし、例えば、プログラムとともに二次メモリ6に書き込まれる。
The name of the data is given to the program and data transmitted to the PLC from a programming tool or the like, and the type of data can be distinguished by the name. Therefore, for data that is expected to increase in data size such as text information created by a program or user, the data type is registered in advance in the PLC, and the PLC does not increase in size depending on the data type. It can be distinguished. The type of data at this time can be registered by a parameter or the like arbitrarily set by the user when creating the program, and is written in the
通信手段4はプログラミングツールやその他の装置とプログラムやデータを送受信するとき、相手側装置が展開手段3または圧縮手段2と等価な展開または圧縮の機能を有しているか識別する。これによって、通信の相手側の装置が展開機能を有している場合には、圧縮したままのプログラムやデータを送信し、通信の相手側の装置が圧縮機能をを有している場合には、圧縮したままのプログラムやデータを送信するよう相手側の装置に要求する。
When the communication unit 4 transmits / receives a program or data to / from a programming tool or other device, the communication unit 4 identifies whether the counterpart device has an expansion or compression function equivalent to the expansion unit 3 or the
尚、メモリ(一次メモリ5および二次メモリ6)には複数のプログラムやデータを記憶することが可能である。プログラムが複数の場合、それらの実行順序はパラメータに設定される。パラメータとは、PLCの動作に必要な設定情報であり、プログラミングツール等によってプログラムと共に送信され、他のプログラムやデータと同様にPLCのメモリ(一次メモリ5および/または二次メモリ6)に記憶される。
A plurality of programs and data can be stored in the memory (
このように構成されたPLCにおいて、まず、PLCがプログラミングツール等とプログラムやデータを送受信するときの動作を説明する。 First, the operation of the PLC configured as described above when the PLC transmits / receives a program or data to / from a programming tool or the like will be described.
PLCは、プログラミングツールやその他の機器からのデータを通信手段4を介して受信すると、パラメータによりデータの名前を識別することによりプログラムや圧縮するべき種類のデータであるかどうかを判定する。プログラムまたは圧縮すべきデータならば圧縮手段2により圧縮してから二次メモリ6に記憶する。圧縮すべき種類でないデータは、そのまま二次メモリ6に記憶する。また、圧縮手段2と等価なデータ圧縮機能を有するプログラミングツールやその他の機器により、既に圧縮されているプログラムやデータを受信した場合は、そのまま二次メモリ6に記憶する。
When the PLC receives data from a programming tool or other device via the communication unit 4, the PLC determines whether the data is a program or a kind of data to be compressed by identifying the name of the data by a parameter. If it is a program or data to be compressed, it is compressed by the compression means 2 and then stored in the
一方、PLCからプログラミングツールやその他の機器へプログラムまたはデータを送信するときは、圧縮して記憶されたプログラムやデータは展開手段3により展開され、圧縮前の状態に戻してから送信される。なお、送信する相手のプログラミングツールその他の機器が展開手段3と等価な圧縮データの展開機能を有する場合は、圧縮したままのデータを送信する。 On the other hand, when a program or data is transmitted from the PLC to a programming tool or other device, the compressed program and data are expanded by the expansion means 3 and transmitted after returning to the state before compression. Note that when the other programming tool or other device to be transmitted has a compressed data expansion function equivalent to the expansion means 3, the compressed data is transmitted.
つぎに、圧縮されて二次メモリ6に記憶されたプログラムを展開して実行するときの動作を説明する。この場合、一次メモリ5は、2つのプログラムを記憶する容量を備えているものとして説明する。
Next, the operation when the compressed program stored in the
展開手段3は、二次メモリ6に記憶されたパラメータを参照してプログラムの実行順序を確認し、圧縮されて二次メモリ6に記憶された複数のプログラムのうち、最初に実行するプログラム(第1のプログラム)を読み出して展開して一次メモリ5に記憶する。展開が完了すると、展開手段3は、第1のプログラムが展開完了した旨を示す展開完了通知をCPU1に送信するとともに、2番目のプログラム(第2のプログラム)をCPU1からの実行完了通知の受信に関係なく最初のプログラム(第1のプログラム)に続いて連続して展開処理して一次メモリ5に記憶する。2番目のプログラムの展開処理が終了すると、展開手段3は、第2のプログラムが展開完了した旨を示す展開完了通知をCPU1に送信する。
The decompressing means 3 refers to the parameters stored in the
CPU1は、展開完了通知を受信すると、一次メモリ5に展開された第1のプログラムの演算処理を実行する。CPU1は、第1のプログラムの演算処理の実行が完了すると、第1のプログラムの実行が完了した旨を示す実行完了通知を展開手段3に送信する。さらに、CPU1は、展開手段3から第2のプログラムが展開完了した旨を示す展開完了通知が送られてきている場合は、一次メモリ5に展開された第2のプログラムの演算処理を続いて実行する。
When the
展開手段3は、第1のプログラムの実行完了通知を受信すると、二次メモリ6に記憶された次のプログラム(第3のプログラム)を展開して、一次メモリ5上の第1のプログラムに上書きする。展開が完了すると、展開手段3は、第3のプログラムの展開が完了した旨を示す展開完了通知をCPU1に送信する。
Upon receiving the first program execution completion notice, the expansion means 3 expands the next program (third program) stored in the
CPU1は、第2のプログラムの実行が完了すると、第2のプログラムの実行が完了した旨を示す実行完了通知を展開手段3に送信する。展開手段3は、第2のプログラムの実行完了通知を受けると、次に実行するプログラム(第4のプログラム)を展開して、一次メモリ5上の第2のプログラムに上書きし、さらに第4のプログラムの展開が完了した旨を示す展開完了通知をCPU1に通知する。
When the execution of the second program is completed, the
CPU1は、第2のプログラムの実行完了通知した後、展開手段3から展開完了の通知を受けると、第3のプログラムの演算処理を実行し、完了したらその旨を示す実行完了通知を展開手段3に通知する。続いて、第4のプログラムについての展開完了の通知を受信している場合は、第4のプログラムについて演算処理を実行する。以降、この手順を繰り返すことにより、限られた一次メモリ5の容量の中で複数のプログラムを入れ替えながら順次演算処理を実行する。
When the
なお、一般に、PLCでは、一連のプログラムを最後まで実行すると、また最初から同じ一連のプログラムを繰り返し実行することが多い。このような場合は、CPU1が最後のプログラムの実行中に、展開手段3が最初の第1のプログラムを展開するようにする。このような場合、2巡目以降においては、展開手段3は、2番目のプログラム(第2のプログラム)を展開する際、CPU1から最後のプログラムの実行完了通知した後、展開処理を実行する。
In general, in a PLC, when a series of programs is executed to the end, the same series of programs is often repeatedly executed from the beginning. In such a case, the expansion means 3 expands the first first program while the
このように、本実施の形態によれば、展開手段3は、CPU1でのプログラム実行に並行して、次に実行するプログラムを展開するようにしたので、CPU1側では展開による待ち時間がなくなり、これにより全体としてのプログラム演算処理時間を短くすることができ、高速のプログラム処理が可能となる。
As described above, according to the present embodiment, the expansion means 3 expands the program to be executed next in parallel with the execution of the program in the
なお、PLCが使用される分野では、ユーザが、プログラムを実行させてから調整のためプログラムの一部を変更することが多いが、本PLCは、一連のプログラムの実行中にその一部を変更する場合は、二次メモリ6に記憶されているプログラムのみを書き換えればよい。従って、プログラムが書き換えられた後、該プログラムを展開手段3が展開して一次メモリ5に記憶することによって、CPU3が実行する一次メモリ5上のプログラムは自動的に、変更後のプログラムに置き換えられる。
In the field where the PLC is used, the user often changes a part of the program for adjustment after executing the program, but this PLC changes a part of the program during the execution of a series of programs. When doing so, it is only necessary to rewrite the program stored in the
以上のように、本発明にかかるプログラマブルコントローラは、圧縮されたプログラムを展開して実行する機能を有するプログラマブルコントローラとして有用である。 As described above, the programmable controller according to the present invention is useful as a programmable controller having a function of expanding and executing a compressed program.
1 CPU
2 圧縮手段
3 展開手段
4 通信手段
5 一次メモリ
6 二次メモリ
1 CPU
2 Compression means 3 Expansion means 4 Communication means 5
Claims (2)
展開後のプログラムがN(N≧2)個記憶可能な第2のメモリと、
前記第1のメモリに記憶された圧縮されたプログラムを順次展開し、展開後のプログラムを第2のメモリに記憶する、CPUと独立して動作可能な展開手段と、
前記第2のメモリに記憶されたプログラムを順次実行するCPUと、
を備え、
前記展開手段は、前記第1のメモリから第2のメモリへのプログラムの展開記憶が完了する毎に展開完了をCPUに通知し、
前記CPUは、展開手段から展開完了の通知を受けると、前のプログラムの実行終了後、前記第2のメモリに記憶されているプログラムを実行すると共に、プログラムの実行が完了すると実行完了を前記展開手段に通知し、
前記展開手段は、最初のプログラムからN番目のプログラムまでについては前記CPUからの実行完了の受信に関係なく連続してプログラムを前記第1のメモリから第2のメモリに展開し、N+1番目以降のプログラムについては、第2のメモリに記憶されているプログラムのうち、CPUの実行完了を受信したプログラムの記憶領域への上書きによる展開処理を実行することを特徴とするプログラマブルコントローラ。 A first memory for storing a plurality of compressed programs;
A second memory capable of storing N (N ≧ 2) programs after expansion;
Expansion means operable to be independent of the CPU, sequentially expanding the compressed program stored in the first memory, and storing the expanded program in the second memory ;
A CPU for sequentially executing the programs stored in the second memory ;
With
The expansion means notifies the CPU of the completion of expansion every time the expansion and storage of the program from the first memory to the second memory is completed,
When the CPU receives a notification of expansion completion from the expansion means, the CPU executes the program stored in the second memory after completion of the execution of the previous program. Inform the means,
The expansion means continuously expands the program from the first memory to the second memory from the first program to the Nth program regardless of the reception of completion of execution from the CPU. As for the program, a programmable controller that executes expansion processing by overwriting the storage area of the program that has received completion of execution of the CPU among the programs stored in the second memory .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005167126A JP4440172B2 (en) | 2005-06-07 | 2005-06-07 | Programmable controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005167126A JP4440172B2 (en) | 2005-06-07 | 2005-06-07 | Programmable controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2006343845A JP2006343845A (en) | 2006-12-21 |
| JP4440172B2 true JP4440172B2 (en) | 2010-03-24 |
Family
ID=37640795
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005167126A Expired - Fee Related JP4440172B2 (en) | 2005-06-07 | 2005-06-07 | Programmable controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4440172B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7063222B2 (en) * | 2018-10-02 | 2022-05-09 | オムロン株式会社 | Control systems, support devices and programs |
-
2005
- 2005-06-07 JP JP2005167126A patent/JP4440172B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2006343845A (en) | 2006-12-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6739498B2 (en) | In-vehicle control device and program writing device | |
| CN107924168B (en) | Relay device, control method of relay device, and readable recording medium | |
| JP4440172B2 (en) | Programmable controller | |
| JP4593095B2 (en) | Program writing device, program writing system, transmission device, and program | |
| JP3412342B2 (en) | Image drawing apparatus and data decompression method | |
| JP2006268377A (en) | Program start-up controller and program start-up control method | |
| TW201945993A (en) | Data processing apparatus, task control method and program | |
| JP2004341824A (en) | Programming device for programmable controller | |
| JP4813823B2 (en) | Test system and test method | |
| JP2010134830A (en) | Programmable controller, cpu unit, analog input unit, and analog output unit | |
| JP5951041B2 (en) | Programmable display | |
| JPH0628150A (en) | Method for compressing program capacity | |
| JP5287630B2 (en) | Control system, control system communication method, communication unit, and communication unit communication method | |
| US10372644B2 (en) | Programmable controller | |
| JP6901430B2 (en) | Control device and editing device | |
| JPH0575840U (en) | controller | |
| JP4084937B2 (en) | Data output device, data input device, data output method, data input method, medium recording data output program, medium recording data input program, and data input / output system | |
| WO2023021848A1 (en) | Control device and control method for control device | |
| JP4251551B2 (en) | Inspection ROM system | |
| JP2005339257A (en) | Image processing apparatus and image processing system | |
| JPH1185518A (en) | Control device | |
| JPH0462080A (en) | Printing device | |
| CN110554661A (en) | Ladder-shaped display device | |
| JP2006217007A (en) | Interface device for compression / decompression module | |
| JPH02287682A (en) | Bit map image data saving device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20071217 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090917 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090929 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091130 |
|
| 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: 20100105 |
|
| 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: 20100106 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130115 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130115 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |