JP2007058256A - Programmable controller - Google Patents
Programmable controller Download PDFInfo
- Publication number
- JP2007058256A JP2007058256A JP2005239271A JP2005239271A JP2007058256A JP 2007058256 A JP2007058256 A JP 2007058256A JP 2005239271 A JP2005239271 A JP 2005239271A JP 2005239271 A JP2005239271 A JP 2005239271A JP 2007058256 A JP2007058256 A JP 2007058256A
- Authority
- JP
- Japan
- Prior art keywords
- bank
- program
- address
- memory
- mpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
Description
プログラマブルコントローラの高速RUN中変更のアドレス生成方式及びプログラム実行装置に関する。 The present invention relates to an address generation method and a program execution device that are changed during high-speed RUN of a programmable controller.
ユーザが作成したプログラムを実行する装置において、プログラムを実行中に、新たに別のプログラムを周辺機器から転送し、実行するプログラムを運転中に切り替える場合に、旧プログラム実行状態から新プログラム実行状態に移行する間のプログラム停止状態を少なくするための技術としてプログラムを格納するメモリを2つ以上のバンク構成とし、一方のバンクを実行中に、もう一方のバンクに新しいプログラムを転送可能とする方式が一般的に用いられる。但しサブルーチン等の共通に使用される処理プログラムは各バンクにそれぞれ格納するか、バンクエリア外に別メモリを設ける必要があった。 In a device that executes a user-created program, when a program is being executed, another program is transferred from the peripheral device, and when the program to be executed is switched during operation, the old program execution state is changed to the new program execution state. As a technique to reduce the program halt state during the transition, there is a system that has a memory for storing programs in two or more banks, and a new program can be transferred to the other bank while one bank is running Generally used. However, it is necessary to store commonly used processing programs such as subroutines in each bank or to provide a separate memory outside the bank area.
また、特許文献1(特開2000−105724号公報)には、メモリのアドレスを制御するアドレス制御回路に関して開示されている。 Japanese Patent Laid-Open No. 2000-105724 discloses an address control circuit that controls the address of a memory.
ユーザプログラムの命令には、その命令自体をプロセッサで実行可能な基本命令もあるが、高機能命令の場合は、実際の処理プログラムはユーザプログラム以外のエリアに予め登録しておき、ユーザプログラムではその処理プログラムをコールすることで、ユーザプログラムのステップ数の節約、転送時間の節約を行っている。 Some user program instructions include basic instructions that can be executed by the processor. However, in the case of high-function instructions, the actual processing program is registered in an area other than the user program in advance. By calling the processing program, the number of steps of the user program is saved and the transfer time is saved.
ユーザプログラムの運転中切替を高速に実行する手段としてメモリのバンク切替を使用する場合、各バンクに高機能命令の処理プログラムを格納しておく必要があり、メモリ容量の増大、使用効率の低下に繋がっていた。 When using memory bank switching as a means of switching user programs during operation at high speed, it is necessary to store processing programs for high-function instructions in each bank, which increases memory capacity and decreases usage efficiency. It was connected.
バンク構成をとるメモリの1つのバンクをバンク切替を行うことなく他のバンクからアクセス可能とするため、バンクレジスタの出力と命令フェッチ用アドレスの上位ビットを論理和する手段を設ける。 In order to make one bank of a memory having a bank configuration accessible from another bank without switching the bank, means for logically summing the output of the bank register and the upper bits of the instruction fetch address is provided.
1つのバンクから別のバンクに切替えるためのバンクレジスタの値を変更することなく別のバンクに格納されている処理プログラムにジャンプ可能となるため、命令実行処理の高速化、メモリの使用効率向上が図れる。 It is possible to jump to a processing program stored in another bank without changing the value of the bank register for switching from one bank to another, which speeds up instruction execution processing and improves memory usage efficiency. I can plan.
本発明を実施するための最良の形態を説明する。 The best mode for carrying out the present invention will be described.
以下、本発明のプログラマブルコントローラの実施例について、図面を用いて説明する。 Embodiments of a programmable controller according to the present invention will be described below with reference to the drawings.
本発明の実施例を図1、図2、図3に示す。 Embodiments of the present invention are shown in FIGS.
図1は、本実施例のプログラマブルコントローラのCPUモジュールのブロック図である。 FIG. 1 is a block diagram of a CPU module of the programmable controller of this embodiment.
図1において、1はCPUモジュールで、2は周辺装置、3は周辺装置インターフェース、4は演算処理を行うMPU、5はデータメモリ、6はアドレス生成部、7はユーザプログラムメモリを示す。 In FIG. 1, 1 is a CPU module, 2 is a peripheral device, 3 is a peripheral device interface, 4 is an MPU that performs arithmetic processing, 5 is a data memory, 6 is an address generator, and 7 is a user program memory.
図1において、CPUモジュール1のMPU4は、周辺装置2から転送されるユーザプログラムを周辺装置インターフェース3を経由して取込む。そしてMPU4よりアドレス生成部6を介してユーザプログラムメモリ7に書込む。CPUモジュール1のMPU4が、ユーザよりRUNされることにより、ユーザプログラムメモリ7に格納されているプログラムを順次実行し、演算結果をデータメモリ5に格納する。
In FIG. 1, the MPU 4 of the
図2は、図1のCPUモジュール1のアドレス生成部6の具体的な構成を示す。図2において、61はバンクレジスタ、62は論理和回路、63はセレクタを示す。
FIG. 2 shows a specific configuration of the
アドレス生成部6は、MPU4からのライトアクセス時とリードアクセス時のアドレスを生成する。リード時はバンクを設定するためのバンクレジスタ61の出力(ここでは2ビット)と、MPU4から出力されるアドレス(A9−A0とし、10ビットとしている)の上位ビット(図2ではA9,A8の上位2ビット)を論理和回路62に入力して、ユーザプログラムメモリ7への上位アドレスとして出力する。下位アドレスはMPU4のアドレスをそのまま出力する。ここで論理和回路に入力するMPU4からのアドレスはバンク空間をいくつに分割するかにより一意に決定される。バンクレジスタ61のビット数も同様である。
The
ここで、バンク空間を4分割とした場合のMPU4から見たユーザプログラムメモリのアドレスマップを図3に示す。周辺装置2から転送されるプログラムは論理空間でのアドレスマップにて作成することにより、格納されるバンクを意識することなくプログラミングを可能とする。
Here, FIG. 3 shows an address map of the user program memory viewed from the MPU 4 when the bank space is divided into four. A program transferred from the
また、ライト時はバンクレジスタが無効となり、バンク0−3までをリニアにMPUからアクセス可能である。
At the time of writing, the bank register is invalid, and
RUN中変更を行う場合の手順について説明する。
まず予めバンク0にユーザプログラムが格納され、MPU4はそれを実行中であるとする。この時、周辺装置2より新しいユーザプログラムが転送されると、MPU4はその格納先をバンク0以外のバンクに格納する。ここではバンク1に格納することとする。その後バンクレジスタ61の値を”01(2進数)”にすることにより以降バンク1に格納されているプログラムをMPU4からリード可能となる。
A procedure for performing a change during RUN will be described.
First, it is assumed that a user program is stored in the
ユーザプログラムはどこのバンクに格納されても動作する必要があり、図3に示す論理アドレス空間にて動作するよう作成しておく。但し、高機能命令等、実際の処理プログラムが格納されているバンク3へのジャンプ命令は、物理アドレス空間で示される絶対アドレスにてジャンプ可能である。これはバンクレジスタ61に設定されている値と、MPU4からの出力アドレスの上位2ビットとの論理和をとっているため、バンク3に対するアドレスをMPU4が出力した場合は、バンクレジスタ61の値にかかわらず“11(2進数)”となるためである。
The user program needs to operate regardless of which bank it is stored in, and is created so as to operate in the logical address space shown in FIG. However, a jump instruction to the
以上のように本実施例を用いれば、バンクレジスタにより実行するプログラムを高速に変更する場合においても、バンク間へのジャンプをバンクレジスタの値に関係なく行えるため、共通に使用されるサブルーチン等を各バンクに格納する必要がなくメモリの使用効率向上が図れる。 As described above, when this embodiment is used, even when the program executed by the bank register is changed at high speed, jumps between banks can be performed regardless of the value of the bank register. There is no need to store the data in each bank, and the use efficiency of the memory can be improved.
ユーザが作成するラダープログラムをサイクリックに実行するプログラマブルコントローラにおいて、ユーザプログラムの修正、変更等をプログラム実行中に行う場合において、プログラム切替え処理を高速に行う場合に利用する。 In a programmable controller that cyclically executes a ladder program created by a user, the program is used when a program switching process is performed at a high speed when the user program is modified or changed during the program execution.
1‥CPUモジュール
2‥周辺装置
3‥周辺装置インターフェース
4‥MPU
5‥データメモリ
6‥アドレス生成部
7‥ユーザプログラムメモリ
61‥バンクレジスタ
62‥論理和回路
63‥セレクタ
1
5
Claims (1)
前記バンクレジスタと、プログラムアドレスの上位ビットとを論理和し、その結果を実際のプログラムアドレスとするアドレス生成回路を有することを特徴とするプログラマブルコントローラ。
In a programmable controller having a bank register for setting a bank of a program memory and having a program address update method that allows a memory address to be changed by the value of the bank register.
A programmable controller, comprising: an address generation circuit that logically sums the bank register and a higher-order bit of a program address and uses the result as an actual program address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005239271A JP2007058256A (en) | 2005-08-22 | 2005-08-22 | Programmable controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005239271A JP2007058256A (en) | 2005-08-22 | 2005-08-22 | Programmable controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007058256A true JP2007058256A (en) | 2007-03-08 |
Family
ID=37921746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005239271A Pending JP2007058256A (en) | 2005-08-22 | 2005-08-22 | Programmable controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007058256A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009112700A (en) * | 2007-11-09 | 2009-05-28 | Daito Giken:Kk | Game table |
-
2005
- 2005-08-22 JP JP2005239271A patent/JP2007058256A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009112700A (en) * | 2007-11-09 | 2009-05-28 | Daito Giken:Kk | Game table |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5099317B2 (en) | Electronics | |
JP2006287675A (en) | Semiconductor integrated circuit | |
JP5119902B2 (en) | Dynamic reconfiguration support program, dynamic reconfiguration support method, dynamic reconfiguration circuit, dynamic reconfiguration support device, and dynamic reconfiguration system | |
JP2006313090A (en) | Semiconductor integrated circuit and its burn-in test method | |
JP3540796B2 (en) | Arithmetic system | |
JP2007058256A (en) | Programmable controller | |
JP3863544B1 (en) | Arithmetic processing device and arithmetic processing method | |
JP2008090455A (en) | Multiprocessor signal processor | |
WO2012008068A1 (en) | Microcontroller and method of controlling the same | |
JP6874262B2 (en) | Vector operand Bit size control | |
JP5145659B2 (en) | Vector renaming method and vector computer | |
KR20060113560A (en) | Data processing apparatus and data processing method | |
JP2005234968A (en) | Arithmetic processing unit | |
CN102902548B (en) | The generation method and device of assembly level internal memory reproducing standards built-in function | |
JP4159586B2 (en) | Information processing apparatus and information processing speed-up method | |
JP4348664B2 (en) | Programmable controller control method | |
JP2011118744A (en) | Information processor | |
US20240126709A1 (en) | Direct memory access controller | |
JP5245617B2 (en) | Register control circuit and register control method | |
JP2008107913A (en) | Program, software conversion device and computer | |
JP3597548B2 (en) | Digital signal processor | |
JP4436734B2 (en) | Processing equipment | |
JP2012103967A (en) | Information processor and method for saving data thereof | |
JP2006301776A (en) | Program writing circuit to dual-port ram | |
JP2006099335A (en) | Context processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080212 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080212 |
|
A977 | Report on retrieval |
Effective date: 20090917 Free format text: JAPANESE INTERMEDIATE CODE: A971007 |
|
A131 | Notification of reasons for refusal |
Effective date: 20090929 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A02 | Decision of refusal |
Effective date: 20091215 Free format text: JAPANESE INTERMEDIATE CODE: A02 |