JP3316779B2 - Sequence controller - Google Patents
Sequence controllerInfo
- Publication number
- JP3316779B2 JP3316779B2 JP7615195A JP7615195A JP3316779B2 JP 3316779 B2 JP3316779 B2 JP 3316779B2 JP 7615195 A JP7615195 A JP 7615195A JP 7615195 A JP7615195 A JP 7615195A JP 3316779 B2 JP3316779 B2 JP 3316779B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- virtual
- memory
- input
- real
- 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
Landscapes
- Testing And Monitoring For Control Systems (AREA)
- Programmable Controllers (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、I/O空間と内部メモ
リとの間で入出力情報のやり取りを行うシーケンスコン
トローラに関し、特に実I/O空間だけでなく仮想I/
O空間にもアクセスすることができるシーケンスコント
ローラに関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sequence controller for exchanging input / output information between an I / O space and an internal memory, and more particularly to a sequence controller for not only a real I / O space but also a virtual I / O space.
The present invention relates to a sequence controller capable of accessing the O space.
【0002】[0002]
【従来の技術】従来よりFA(Factory Automation)の
分野においては、作成されたプログラムに従って生産シ
ステム等の自動制御を行うシーケンスコントローラ(プ
ログラマブルコントローラ)が幅広く使われている。こ
のシーケンスコントローラには、スイッチ、リレー接
点、モータ、あるいはバルブなど実際の入出力機器(以
下、実I/Oという)との間で直接入出力情報のやり取
りを行う方式と、実I/Oと内部メモリとの間で1スキ
ャンごとに入出力情報のやり取りを行って、実際の演算
は内部メモリ上で行う方式とがあり、一般には後者の方
式(これを一括リフレッシュ方式という)が主流になっ
ている。2. Description of the Related Art Conventionally, in the field of factory automation (FA), a sequence controller (programmable controller) for automatically controlling a production system or the like according to a created program has been widely used. The sequence controller includes a system for directly exchanging input / output information with actual input / output devices (hereinafter, referred to as actual I / O) such as switches, relay contacts, motors, and valves. There is a method in which input / output information is exchanged with the internal memory for each scan, and the actual operation is performed on the internal memory. In general, the latter method (this is called a batch refresh method) is mainly used. ing.
【0003】このような一括リフレッシュ方式において
は、内部メモリと実I/Oとの対応関係を設定する必要
がある。この対応関係を設定する方式としては、実I/
Oとのインタフェース機能を有するI/Oカードがコン
トローラの入出力端子であるI/Oコネクタ中のどこに
装着されるかによって対応関係を固定的に決定する方式
と、I/Oカードの装着順に従って決定する方式と、内
部メモリと実I/Oとの対応関係を記憶するマッピング
テーブルに基づいて決定する方式とがある。I/Oカー
ドの装着位置によって固定的に対応関係を決定する方式
では、I/Oカードがとびとびに装着されていると、対
応する内部メモリの位置もとびとびになって扱いにくい
ものとなってしまう。また、I/Oカードの装着順によ
って決定する方式では、内部メモリを効率良く使用する
ことができるが、途中でカードを抜いたり、後でカード
を追加しようとすると、対応関係の変更が必要になって
しまう。In such a batch refresh method, it is necessary to set the correspondence between the internal memory and the real I / O. As a method of setting this correspondence, an actual I / O
According to a method of fixedly determining a correspondence relationship depending on where an I / O card having an interface function with O is mounted in an I / O connector which is an input / output terminal of a controller, and a mounting order of the I / O card. There are a method of determining the value and a method of determining the value based on a mapping table that stores the correspondence between the internal memory and the real I / O. In the method in which the correspondence is fixedly determined according to the mounting position of the I / O card, if the I / O card is mounted in an intermittent manner, the corresponding internal memory position becomes uneven and becomes difficult to handle. . In addition, the method of determining the order of mounting I / O cards allows efficient use of the internal memory. However, if a card is removed in the middle or a card is added later, the correspondence needs to be changed. turn into.
【0004】そこで、内部メモリと実I/Oとの対応関
係の設定を容易にするために、シーケンスコントローラ
の内部に上記対応関係を記憶するマッピングテーブルを
備える方式が考えられている。しかし、上述したいずれ
の方式であっても、上記対応関係に基づいて内部メモリ
と実I/Oとの間で入出力情報をやり取りするものなの
で、I/Oカードが装着されていない、つまり実I/O
が接続されていないと、コントローラとしての動作を行
うことができなかった。In order to facilitate the setting of the correspondence between the internal memory and the real I / O, a method has been proposed in which a mapping table for storing the correspondence is stored inside the sequence controller. However, in any of the above-mentioned methods, input / output information is exchanged between the internal memory and the real I / O based on the above-mentioned correspondence relationship. I / O
If it was not connected, it could not operate as a controller.
【0005】[0005]
【発明が解決しようとする課題】以上のように従来のシ
ーケンスコントローラでは、実際の入出力機器が接続さ
れていないと、動作することができず、シミュレーショ
ンを行うことができないという問題点があった。本発明
は、上記課題を解決するためになされたもので、実際の
入出力機器がなくてもシミュレーションを行うことがで
きるシーケンスコントローラを提供することを目的とす
る。As described above, the conventional sequence controller has a problem that unless an actual input / output device is connected, it cannot operate and cannot perform a simulation. . The present invention has been made to solve the above problems, and has as its object to provide a sequence controller capable of performing a simulation without an actual input / output device.
【0006】[0006]
【課題を解決するための手段】本発明のシーケンスコン
トローラは、実際の入出力機器のI/Oアドレスを与え
る実I/Oアドレス、仮想の入出力機器のI/Oアドレ
スを与える仮想I/Oアドレス、この仮想I/Oアドレ
スが有効かどうかを示す有効フラグ、並びに実I/Oア
ドレス及び仮想I/Oアドレスに対応するメモリアドレ
スを記憶するマッピングテーブルを有し、前記仮想I/
Oアドレスとして、シミュレーション用のラダープログ
ラムの実行により仮想の入出力機器として機能するデー
タメモリのアドレス、シミュレーション用の特殊命令の
実行により仮想の入出力機器として機能するワークRA
Mのアドレス、もしくは実際の入出力機器と同等のシミ
ュレータモジュールが装着された実I/Oのアドレスが
設定可能なものである。SUMMARY OF THE INVENTION A sequence controller according to the present invention comprises a real I / O address for giving an I / O address of an actual I / O device and a virtual I / O for giving an I / O address of a virtual I / O device. address, the virtual I / O address is valid flag that indicates whether valid, as well as have a mapping table for storing a memory address corresponding to the real I / O address and the virtual I / O address, the virtual I /
Ladder program for simulation as O address
Data that functions as virtual I / O devices by executing
Memory address, special instruction for simulation
Work RA functioning as a virtual input / output device by execution
M address or stain equivalent to actual I / O device
The address of the real I / O to which the
It can be set .
【0007】[0007]
【作用】本発明によれば、通常は、実I/Oアドレスと
メモリアドレスの対応関係に基づいて、実際の入出力機
器とI/Oメモリとの間で入出力情報のやり取りが行わ
れる。そして、仮想I/Oアドレスが有効であることを
有効フラグが示すと、仮想I/Oアドレスとメモリアド
レスの対応関係に基づいて、仮想の入出力機器とI/O
メモリとの間で入出力情報のやり取りが行われる。According to the present invention, input / output information is normally exchanged between an actual input / output device and an I / O memory based on the correspondence between an actual I / O address and a memory address. Then, when the valid flag indicates that the virtual I / O address is valid, the virtual I / O device and the I / O device are connected based on the correspondence between the virtual I / O address and the memory address.
Input / output information is exchanged with the memory.
【0008】[0008]
【実施例】図1は本発明の1実施例を示すシーケンスコ
ントローラのブロック図である。1はシーケンスプログ
ラム(ラダープログラム)を格納するプログラムメモ
リ、2はメモリ1に格納されたシーケンスプログラムを
実行し、コントローラとしての機能を実現するCPU、
3は内部メモリ、3aは内部メモリ3中にあって実I/
Oとの間でやり取りする入出力情報が書き込まれるI/
Oメモリ、3bは同じくメモリ3中にあってシーケンス
プログラムの実行時に使用されるデータメモリである。FIG. 1 is a block diagram of a sequence controller showing one embodiment of the present invention. 1 is a program memory that stores a sequence program (ladder program), 2 is a CPU that executes the sequence program stored in the memory 1 and implements a function as a controller,
3 is the internal memory, 3a is the internal memory 3
I / O where input / output information exchanged with O is written
The O memory 3b is a data memory which is also used in executing the sequence program in the memory 3.
【0009】また、4は図示しないROMに格納された
特殊命令の実行時に使用されるワークRAM、5はコン
トローラの入出力端子であるI/Oコネクタ、6はI/
O空間と内部メモリの対応関係を記憶するマッピングテ
ーブルである。Reference numeral 4 denotes a work RAM used when executing a special instruction stored in a ROM (not shown), 5 denotes an I / O connector which is an input / output terminal of a controller, and 6 denotes an I / O connector.
4 is a mapping table that stores a correspondence between an O space and an internal memory.
【0010】次に、このようなシーケンスコントローラ
の動作を説明する。図2はI/O空間と内部メモリとの
対応関係をマッピングテーブル6上に設定した様子を示
す図である。Aは実I/O空間上の位置(実際にはI/
Oコネクタ5のコネクタ番号)を示す実I/Oアドレ
ス、Bは後述する仮想I/O空間上の位置を示す仮想I
/Oアドレス、Cは実I/OアドレスA及び仮想I/O
アドレスBに対応するI/Oメモリ3a上の位置を示す
内部メモリアドレス、Fは仮想I/OアドレスBが有効
かどうかを示す有効フラグである。Next, the operation of such a sequence controller will be described. FIG. 2 is a diagram showing a state where the correspondence between the I / O space and the internal memory is set on the mapping table 6. A is a position on the real I / O space (actually, I / O
A real I / O address indicating the connector number of the O connector 5), and a virtual I indicating a position in a virtual I / O space described later.
/ O address, C is real I / O address A and virtual I / O
An internal memory address indicating a position on the I / O memory 3a corresponding to the address B, and F is a valid flag indicating whether the virtual I / O address B is valid.
【0011】シーケンスコントローラのCPU2は、通
常、マッピングテーブル6に設定された実I/Oアドレ
スAと内部メモリアドレスCの対応関係に基づいて実I
/OとI/Oメモリ3aとの間で入出力情報をやり取り
する。実I/OアドレスAが示す実I/Oから得られる
入力情報、すなわちI/Oコネクタ5に装着された図示
しないI/Oカードに接続されるスイッチやリレー接点
等の入力機器から得られる情報は、1スキャンごとに読
み込まれて、対応する内部メモリアドレスCが示すI/
Oメモリ3aの位置に書き込まれる。こうして、CPU
2は、実I/Oから入力情報を得ることができる。Normally, the CPU 2 of the sequence controller performs the real I / O based on the correspondence between the real I / O address A set in the mapping table 6 and the internal memory address C.
The input / output information is exchanged between the / O and the I / O memory 3a. Input information obtained from the real I / O indicated by the real I / O address A, that is, information obtained from input devices such as switches and relay contacts connected to an I / O card (not shown) attached to the I / O connector 5 Is read every scan, and the I / I indicated by the corresponding internal memory address C
The data is written to the position of the O memory 3a. Thus, the CPU
2 can obtain input information from real I / O.
【0012】また、アドレスAが示す実I/Oに与えら
れる出力情報、すなわちコネクタ5に装着されたI/O
カードに接続されるモータやバルブ等の出力機器に与え
られる情報は、メモリアドレスCが示すI/Oメモリ3
aの位置に1スキャンごとに書き込まれ、対応するアド
レスAが示すI/Oコネクタ5に出力される。こうし
て、シーケンスコントローラから実I/Oに出力情報が
与えられる。The output information given to the real I / O indicated by the address A, that is, the I / O attached to the connector 5
Information given to output devices such as motors and valves connected to the card is stored in the I / O memory 3 indicated by the memory address C.
The data is written to the position a for each scan and output to the I / O connector 5 indicated by the corresponding address A. Thus, the output information is provided from the sequence controller to the real I / O.
【0013】このような入出力情報のやり取りにおい
て、有効フラグFが有意(例えば「1」)になると、C
PU2は、仮想I/OアドレスBが有効になったと判断
する。そして、実I/OアドレスAの代わりに仮想I/
OアドレスBを用い、仮想I/O空間とI/Oメモリ3
aとの間で入出力情報をやり取りする。仮想I/O空間
としては、データメモリ3b、ワークRAM4、実I/
O空間(ここでは、I/Oコネクタ5に装着されるI/
Oカードの一種であるシミュレータモジュール)が設定
できる。In such exchange of input / output information, when the valid flag F becomes significant (for example, “1”), C
PU2 determines that the virtual I / O address B has become valid. Then, instead of the real I / O address A, the virtual I / O
Using the O address B, the virtual I / O space and the I / O memory 3
The input / output information is exchanged with a. As the virtual I / O space, the data memory 3b, the work RAM 4, the real I / O
O space (here, I / O attached to the I / O connector 5)
A simulator module, which is a type of O card, can be set.
【0014】例えば、マッピングテーブル6の仮想I/
OアドレスBとしてデータメモリ3bのアドレスを設定
しておき、データメモリ3bが仮想の入出力機器として
機能するようなシミュレーション用のラダープログラム
をプログラムメモリ1に格納する。これにより、CPU
2にメモリ1に格納されたプログラムを実行させると、
データメモリ3b上に仮想の入出力機器の入出力情報が
現れる。For example, the virtual I /
The address of the data memory 3b is set as the O address B, and a ladder program for simulation such that the data memory 3b functions as a virtual input / output device is stored in the program memory 1. This allows the CPU
2 causes the program stored in the memory 1 to execute,
The input / output information of the virtual input / output device appears on the data memory 3b.
【0015】ここで、有効ビットFを有意にすれば、C
PU2は、仮想I/Oであるデータメモリ3bとI/O
メモリ3aとの間で入出力情報をやり取りする。こうし
て、データメモリ3bを仮想の入出力機器として動作さ
せることにより、実I/OがI/Oコネクタ5に接続さ
れていなくても、コントローラのCPU2だけでシミュ
レーションができる。Here, if the valid bit F is made significant, C
The PU 2 has a data memory 3b, which is a virtual I / O, and an I / O
The input / output information is exchanged with the memory 3a. By operating the data memory 3b as a virtual input / output device in this manner, a simulation can be performed only by the CPU 2 of the controller even when the real I / O is not connected to the I / O connector 5.
【0016】同様に、仮想I/OアドレスBとしてワー
クRAM4のアドレスを設定しておき、ワークRAM4
が仮想の入出力機器として機能するようなシミュレーシ
ョン用の特殊命令をROMに格納する。なお、特殊命令
はシーケンスコントローラのメーカがファームウェアで
提供するものであり、ワークRAMはこの特殊命令の実
行時に使うメモリであって、ユーザが作成するラダープ
ログラムから直接アクセスすることはできない。こうし
て、この命令をCPU2に実行させながら、有効ビット
Fを有意にすれば、上記と同様の効果を得ることができ
る。Similarly, the address of the work RAM 4 is set as the virtual I / O address B,
Stores in the ROM a special instruction for simulation that functions as a virtual input / output device. The special instruction is provided by the maker of the sequence controller as firmware, and the work RAM is a memory used when executing the special instruction and cannot be directly accessed from a ladder program created by a user. Thus, if the valid bit F is made significant while causing the CPU 2 to execute this instruction, the same effect as described above can be obtained.
【0017】また、実I/Oと同等の動作をするシミュ
レータモジュールをI/Oコネクタ5に装着し、仮想I
/OアドレスBとしてシミュレータモジュールが装着さ
れたI/Oコネクタ5の番号を設定しておく。この場合
には、有効ビットFを有意にするだけで、CPU2は、
シミュレータモジュールとI/Oメモリ3aとの間で入
出力情報をやり取りする。これにより、メモリ1に格納
されたシーケンスプログラムを変更することなく実際の
動作を想定したシミュレーションを行うことができ、プ
ログラムのデバッグを行うことができる。Further, a simulator module which operates in the same manner as the real I / O is mounted on the I / O connector
The number of the I / O connector 5 to which the simulator module is attached is set as the / O address B. In this case, only by making the valid bit F significant, the CPU 2
Input / output information is exchanged between the simulator module and the I / O memory 3a. As a result, it is possible to perform a simulation assuming an actual operation without changing the sequence program stored in the memory 1, and to debug the program.
【0018】[0018]
【発明の効果】本発明によれば、仮想I/Oアドレスと
有効フラグを記憶できるようにマッピングテーブルを拡
張することにより、フラグの情報を有効にするだけで、
仮想I/Oアドレスが示す仮想の入出力機器とメモリア
ドレスが示すI/Oメモリとの間で入出力情報のやり取
りが行われるので、実際の入出力機器がなくてもシミュ
レーションを行うことができる。According to the present invention, the mapping table is extended so that the virtual I / O address and the valid flag can be stored.
Since input / output information is exchanged between the virtual input / output device indicated by the virtual I / O address and the I / O memory indicated by the memory address, a simulation can be performed without an actual input / output device. .
【図1】 本発明の1実施例を示すシーケンスコントロ
ーラのブロック図である。FIG. 1 is a block diagram of a sequence controller showing one embodiment of the present invention.
【図2】 I/O空間と内部メモリとの対応関係をマッ
ピングテーブル上に設定した様子を示す図である。FIG. 2 is a diagram showing a state where a correspondence between an I / O space and an internal memory is set on a mapping table.
1…プログラムメモリ、2…CPU、3…内部メモリ、
3a…I/Oメモリ、3b…データメモリ、4…ワーク
RAM、5…I/Oコネクタ、6…マッピングテーブ
ル、A…実I/Oアドレス、B…仮想I/Oアドレス、
C…内部メモリアドレス、F…有効フラグ。1 ... program memory, 2 ... CPU, 3 ... internal memory,
3a I / O memory, 3b data memory, 4 work RAM, 5 I / O connector, 6 mapping table, A actual I / O address, B virtual I / O address,
C: Internal memory address, F: Valid flag.
───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平7−56500(JP,A) 特開 平7−28521(JP,A) 特開 平6−318106(JP,A) 特開 平6−289913(JP,A) 特開 平4−318606(JP,A) 特開 昭63−223903(JP,A) 特開 昭62−99807(JP,A) (58)調査した分野(Int.Cl.7,DB名) G05B 19/04 - 19/05 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-7-56500 (JP, A) JP-A-7-28521 (JP, A) JP-A-6-318106 (JP, A) JP-A-6-318106 289913 (JP, A) JP-A-4-318606 (JP, A) JP-A-63-223903 (JP, A) JP-A-62-99807 (JP, A) (58) Fields investigated (Int. 7 , DB name) G05B 19/04-19/05
Claims (1)
レスとI/Oメモリ上の位置を示すメモリアドレスの対
応関係に基づいて、入出力機器とI/Oメモリとの間で
入出力情報のやり取りを行うシーケンスコントローラに
おいて、 実際の入出力機器のI/Oアドレスを与える実I/Oア
ドレス、仮想の入出力機器のI/Oアドレスを与える仮
想I/Oアドレス、この仮想I/Oアドレスが有効かど
うかを示す有効フラグ、並びに実I/Oアドレス及び仮
想I/Oアドレスに対応するメモリアドレスを記憶する
マッピングテーブルを有し、前記仮想I/Oアドレスとして、シミュレーション用の
ラダープログラムの実行により仮想の入出力機器として
機能するデータメモリのアドレス、シミュレーション用
の特殊命令の実行により仮想の入出力機器として機能す
るワークRAMのアドレス、もしくは実際の入出力機器
と同等のシミュレータモジュールが装着された実I/O
のアドレスが設定可能であり、 仮想I/Oアドレスが有効であることを前記有効フラグ
が示すときに、実I/Oアドレスの代わりに仮想I/O
アドレスを用いるようにしたことを特徴とするシーケン
スコントローラ。An input / output device between an input / output device and an I / O memory based on a correspondence relationship between an I / O address indicating a connection position of the input / output device and a memory address indicating a position on the I / O memory. In a sequence controller for exchanging information, a real I / O address giving an I / O address of an actual I / O device, a virtual I / O address giving an I / O address of a virtual I / O device, and a virtual I / O A mapping table for storing a valid flag indicating whether the address is valid, and a memory address corresponding to the real I / O address and the virtual I / O address, wherein the virtual I / O address is
As a virtual input / output device by executing a ladder program
Functioning data memory address, for simulation
Function as virtual I / O devices by executing
Work RAM address or actual input / output device
Real I / O with simulator module equivalent to
Can be set, and when the valid flag indicates that the virtual I / O address is valid , the virtual I / O address is used instead of the real I / O address.
A sequence controller characterized by using an address.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7615195A JP3316779B2 (en) | 1995-03-31 | 1995-03-31 | Sequence controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7615195A JP3316779B2 (en) | 1995-03-31 | 1995-03-31 | Sequence controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08272409A JPH08272409A (en) | 1996-10-18 |
| JP3316779B2 true JP3316779B2 (en) | 2002-08-19 |
Family
ID=13597030
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7615195A Expired - Fee Related JP3316779B2 (en) | 1995-03-31 | 1995-03-31 | Sequence controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3316779B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012198636A (en) * | 2011-03-18 | 2012-10-18 | Mitsubishi Electric Corp | Controller |
| JP2015176340A (en) * | 2014-03-14 | 2015-10-05 | オムロン株式会社 | Programmable controller and device control method by programmable controller |
-
1995
- 1995-03-31 JP JP7615195A patent/JP3316779B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH08272409A (en) | 1996-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3456692B2 (en) | Data processing device | |
| JP3316779B2 (en) | Sequence controller | |
| CN103678099A (en) | Method and device for achieving communications of hardware platform and software platform | |
| US7516265B2 (en) | System and method for providing an application with memory access methods | |
| US6279104B1 (en) | Debugging system for parallel processed program and debugging method thereof | |
| US8464016B2 (en) | Method and device for switching over in a memory for a control device | |
| JP7419956B2 (en) | Information processing device, information processing method and program | |
| JP3562783B2 (en) | How to debug a programmable display device | |
| JP3516607B2 (en) | Programmable display device | |
| JP3400315B2 (en) | Profibus data transmission system | |
| JP5492573B2 (en) | Device / PLC simulator device, method, and program having trace function | |
| JP4479131B2 (en) | Control device | |
| JPH0895610A (en) | Programmable controller | |
| JPH0518138B2 (en) | ||
| JPH08335201A (en) | I / O control test system equipment | |
| JP3335728B2 (en) | Programmable controller | |
| JP2876576B2 (en) | Numerical control unit | |
| JPH07109589B2 (en) | Instruction processing method | |
| JPH10268923A (en) | Numerical controller | |
| JPH11249715A (en) | Automatic generation method of sequence program and motion controller | |
| JPH10312307A (en) | Emulator applied to computer system | |
| JP2000214921A (en) | Display device | |
| JPH03113562A (en) | Compact industrial computer | |
| JPH08314801A (en) | Memory managing system | |
| JP2001100831A (en) | Industrial controller, control method therefor and information recording medium with the method stored therein |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080614 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |