JP2007058256A - Programmable controller - Google Patents

Programmable controller Download PDF

Info

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
Application number
JP2005239271A
Other languages
Japanese (ja)
Inventor
Mitsuru Soga
満 曽我
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.)
Hitachi Industrial Equipment Systems Co Ltd
Original Assignee
Hitachi Industrial Equipment Systems Co 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 Hitachi Industrial Equipment Systems Co Ltd filed Critical Hitachi Industrial Equipment Systems Co Ltd
Priority to JP2005239271A priority Critical patent/JP2007058256A/en
Publication of JP2007058256A publication Critical patent/JP2007058256A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To call out a common processing program from each bank without increasing a memory space, in a quick switching system when executing a user program, while considering the situation linked to an increase of the memory space because the program used commonly such as a subroutine is required to be arranged in a memory space other than the bank, although a bank switching system is provided as a means allowing quick rewriting when executing the user program. <P>SOLUTION: A means for logical-summing up an output from a bank register and a superordinate bit of an address for a command fetch is provided to allow an access form other bank without bank-switching the one bank of a memory with bank constitution. <P>COPYRIGHT: (C)2007,JPO&INPIT

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.

特開2000−105724号公報JP 2000-105724 A

ユーザプログラムの命令には、その命令自体をプロセッサで実行可能な基本命令もあるが、高機能命令の場合は、実際の処理プログラムはユーザプログラム以外のエリアに予め登録しておき、ユーザプログラムではその処理プログラムをコールすることで、ユーザプログラムのステップ数の節約、転送時間の節約を行っている。   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 CPU module 1 takes in the user program transferred from the peripheral device 2 via the peripheral device interface 3. Then, the data is written into the user program memory 7 from the MPU 4 via the address generator 6. When the MPU 4 of the CPU module 1 is RUN by the user, the program stored in the user program memory 7 is sequentially executed, and the calculation result is stored in the data memory 5.

図2は、図1のCPUモジュール1のアドレス生成部6の具体的な構成を示す。図2において、61はバンクレジスタ、62は論理和回路、63はセレクタを示す。   FIG. 2 shows a specific configuration of the address generation unit 6 of the CPU module 1 of FIG. In FIG. 2, 61 is a bank register, 62 is an OR circuit, and 63 is a selector.

アドレス生成部6は、MPU4からのライトアクセス時とリードアクセス時のアドレスを生成する。リード時はバンクを設定するためのバンクレジスタ61の出力(ここでは2ビット)と、MPU4から出力されるアドレス(A9−A0とし、10ビットとしている)の上位ビット(図2ではA9,A8の上位2ビット)を論理和回路62に入力して、ユーザプログラムメモリ7への上位アドレスとして出力する。下位アドレスはMPU4のアドレスをそのまま出力する。ここで論理和回路に入力するMPU4からのアドレスはバンク空間をいくつに分割するかにより一意に決定される。バンクレジスタ61のビット数も同様である。   The address generation unit 6 generates addresses at the time of write access and read access from the MPU 4. At the time of reading, the output of the bank register 61 for setting the bank (here, 2 bits) and the upper bits (A9 and A8 in FIG. 2) of the address (A9-A0 and 10 bits) output from the MPU 4 The upper 2 bits are input to the OR circuit 62 and output as an upper address to the user program memory 7. As the lower address, the MPU 4 address is output as it is. Here, the address from the MPU 4 input to the OR circuit is uniquely determined depending on how many bank spaces are divided. The same applies to the number of bits of the bank register 61.

ここで、バンク空間を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 peripheral device 2 is created by an address map in the logical space, thereby enabling programming without being conscious of the bank to be stored.

また、ライト時はバンクレジスタが無効となり、バンク0−3までをリニアにMPUからアクセス可能である。   At the time of writing, the bank register is invalid, and banks 0 to 3 can be accessed linearly from the MPU.

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 bank 0 in advance, and the MPU 4 is executing it. At this time, when a new user program is transferred from the peripheral device 2, the MPU 4 stores the storage destination in a bank other than the bank 0. Here, the data is stored in bank 1. Thereafter, by setting the value of the bank register 61 to “01 (binary number)”, the program stored in the bank 1 can be read from the MPU 4 thereafter.

ユーザプログラムはどこのバンクに格納されても動作する必要があり、図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 bank 3 in which an actual processing program is stored, such as a high function instruction, can be jumped at an absolute address indicated in the physical address space. This is the logical sum of the value set in the bank register 61 and the upper 2 bits of the output address from the MPU 4, so when the MPU 4 outputs the address for the bank 3, the value in the bank register 61 is set. This is because it is “11 (binary number)”.

以上のように本実施例を用いれば、バンクレジスタにより実行するプログラムを高速に変更する場合においても、バンク間へのジャンプをバンクレジスタの値に関係なく行えるため、共通に使用されるサブルーチン等を各バンクに格納する必要がなくメモリの使用効率向上が図れる。   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.

本発明のCPUモジュールの構成図を示す。The block diagram of CPU module of this invention is shown. 図1のCPUモジュールのアドレス生成部を示す。2 shows an address generation unit of the CPU module of FIG. 本発明のバンク空間を4分割した場合のユーザプログラムのアドレスマップを示す。An address map of a user program when the bank space of the present invention is divided into four is shown.

符号の説明Explanation of symbols

1‥CPUモジュール
2‥周辺装置
3‥周辺装置インターフェース
4‥MPU
5‥データメモリ
6‥アドレス生成部
7‥ユーザプログラムメモリ
61‥バンクレジスタ
62‥論理和回路
63‥セレクタ
1 CPU module 2 Peripheral device 3 Peripheral device interface 4 MPU
5 Data memory 6 Address generation unit 7 User program memory 61 Bank register 62 OR circuit 63 Selector

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.
JP2005239271A 2005-08-22 2005-08-22 Programmable controller Pending JP2007058256A (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009112700A (en) * 2007-11-09 2009-05-28 Daito Giken:Kk Game table

Cited By (1)

* Cited by examiner, † Cited by third party
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