JPH08272409A - Sequence controller - Google Patents

Sequence controller

Info

Publication number
JPH08272409A
JPH08272409A JP7615195A JP7615195A JPH08272409A JP H08272409 A JPH08272409 A JP H08272409A JP 7615195 A JP7615195 A JP 7615195A JP 7615195 A JP7615195 A JP 7615195A JP H08272409 A JPH08272409 A JP H08272409A
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.)
Granted
Application number
JP7615195A
Other languages
Japanese (ja)
Other versions
JP3316779B2 (en
Inventor
Yoshihiko Okayama
喜彦 岡山
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.)
Azbil Corp
Original Assignee
Azbil Corp
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 Azbil Corp filed Critical Azbil Corp
Priority to JP7615195A priority Critical patent/JP3316779B2/en
Publication of JPH08272409A publication Critical patent/JPH08272409A/en
Application granted granted Critical
Publication of JP3316779B2 publication Critical patent/JP3316779B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

PURPOSE: To perform simulation even when no real input/output equipment is provided. CONSTITUTION: A real I/O address representing a position on a real I/O space, a virtual I/O address representing the position on a virtual space, memory addresses in accordance with them, and an effective flag representing whether or not the virtual I/O address is effective are set on a mapping table 6. As a virtual I/O, a simulator module loaded on, for example, a connector 5 is set. When the information of the flag is validated, input/output information is transferred between the simulator module and memory 3a based on the correspondent relation of the virtual I/O address and the memory address. In such a way, the simulation is performed even when no real inpu/output equipment is provided.

Description

【発明の詳細な説明】Detailed Description of the Invention

【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 particularly to a virtual I / O space as well as a virtual I / O space.
The present invention relates to a sequence controller that can also access O space.

【0002】[0002]

【従来の技術】従来よりFA(Factory Automation)の
分野においては、作成されたプログラムに従って生産シ
ステム等の自動制御を行うシーケンスコントローラ(プ
ログラマブルコントローラ)が幅広く使われている。こ
のシーケンスコントローラには、スイッチ、リレー接
点、モータ、あるいはバルブなど実際の入出力機器(以
下、実I/Oという)との間で直接入出力情報のやり取
りを行う方式と、実I/Oと内部メモリとの間で1スキ
ャンごとに入出力情報のやり取りを行って、実際の演算
は内部メモリ上で行う方式とがあり、一般には後者の方
式(これを一括リフレッシュ方式という)が主流になっ
ている。
2. Description of the Related Art Conventionally, in the field of FA (Factory Automation), a sequence controller (programmable controller) for automatically controlling a production system according to a created program has been widely used. This sequence controller has a method of directly exchanging input / output information with an actual input / output device (hereinafter referred to as an actual I / O) such as a switch, a relay contact, a motor, or a valve, and an actual I / O. There is a method in which input / output information is exchanged with the internal memory for each scan and the actual calculation is performed on the internal memory. Generally, the latter method (this is called a batch refresh method) is the mainstream. 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 system, it is necessary to set the correspondence between the internal memory and the real I / O. As a method for setting this correspondence, the actual I /
According to the method of fixedly determining the correspondence depending on where the I / O card having the interface function with O is mounted in the I / O connector which is the input / output terminal of the controller, and the mounting order of the I / O card There are a method of making a decision and a method of making a decision based on a mapping table which stores the correspondence between the internal memory and the actual I / O. In the method in which the correspondence is fixedly determined depending on the mounting position of the I / O card, if the I / O cards are mounted disjointly, the positions of the corresponding internal memory become disjointed and the handling becomes difficult. . In addition, the method of deciding according to the mounting order of I / O cards allows the internal memory to be used efficiently, but if the card is removed during the process or added later, the correspondence needs to be changed. turn into.

【0004】そこで、内部メモリと実I/Oとの対応関
係の設定を容易にするために、シーケンスコントローラ
の内部に上記対応関係を記憶するマッピングテーブルを
備える方式が考えられている。しかし、上述したいずれ
の方式であっても、上記対応関係に基づいて内部メモリ
と実I/Oとの間で入出力情報をやり取りするものなの
で、I/Oカードが装着されていない、つまり実I/O
が接続されていないと、コントローラとしての動作を行
うことができなかった。
Therefore, in order to facilitate the setting of the correspondence relationship between the internal memory and the actual I / O, there has been considered a method of providing a mapping table for storing the correspondence relationship inside the sequence controller. However, in any of the above-mentioned methods, since the input / output information is exchanged between the internal memory and the real I / O based on the above correspondence, the I / O card is not installed, that is, the real memory. I / O
If was not connected, it could not operate as a controller.

【0005】[0005]

【発明が解決しようとする課題】以上のように従来のシ
ーケンスコントローラでは、実際の入出力機器が接続さ
れていないと、動作することができず、シミュレーショ
ンを行うことができないという問題点があった。本発明
は、上記課題を解決するためになされたもので、実際の
入出力機器がなくてもシミュレーションを行うことがで
きるシーケンスコントローラを提供することを目的とす
る。
As described above, the conventional sequence controller has a problem that it cannot operate unless the actual input / output device is connected, and the simulation cannot be performed. . The present invention has been made to solve the above problems, and an object of the present invention is to provide a sequence controller that can perform a simulation without an actual input / output device.

【0006】[0006]

【課題を解決するための手段】本発明のシーケンスコン
トローラは、実際の入出力機器のI/Oアドレスを与え
る実I/Oアドレス、仮想の入出力機器のI/Oアドレ
スを与える仮想I/Oアドレス、この仮想I/Oアドレ
スが有効かどうかを示す有効フラグ、並びに実I/Oア
ドレス及び仮想I/Oアドレスに対応するメモリアドレ
スを記憶するマッピングテーブルを有するものである。
A sequence controller according to the present invention is a real I / O address which gives an I / O address of an actual input / output device and a virtual I / O which gives an I / O address of a virtual input / output device. It has a mapping table that stores an address, a valid flag indicating whether this virtual I / O address is valid, and a memory address corresponding to the real I / O address and the virtual I / O address.

【0007】[0007]

【作用】本発明によれば、通常は、実I/Oアドレスと
メモリアドレスの対応関係に基づいて、実際の入出力機
器とI/Oメモリとの間で入出力情報のやり取りが行わ
れる。そして、仮想I/Oアドレスが有効であることを
有効フラグが示すと、仮想I/Oアドレスとメモリアド
レスの対応関係に基づいて、仮想の入出力機器とI/O
メモリとの間で入出力情報のやり取りが行われる。
According to the present invention, the input / output information is normally exchanged between the actual input / output device and the I / O memory based on the correspondence between the actual I / O address and the memory address. Then, when the valid flag indicates that the virtual I / O address is valid, the virtual input / output device and the I / O are 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 an embodiment of the present invention. Reference numeral 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 realizes a function as a controller,
3 is an internal memory, 3a is an internal memory in the internal memory 3, and
I / O in which input / output information exchanged with O is written
The O memory 3b is a data memory that is also in the memory 3 and is used when the sequence program is executed.

【0009】また、4は図示しないROMに格納された
特殊命令の実行時に使用されるワークRAM、5はコン
トローラの入出力端子であるI/Oコネクタ、6はI/
O空間と内部メモリの対応関係を記憶するマッピングテ
ーブルである。
Further, 4 is a work RAM used when executing a special instruction stored in a ROM (not shown), 5 is an I / O connector which is an input / output terminal of the controller, and 6 is an I / O connector.
It is a mapping table which stores the correspondence between the O space and the 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 in which the correspondence between the I / O space and the internal memory is set on the mapping table 6. A is a position in the actual I / O space (actually I / O
A real I / O address indicating the connector number of the O connector 5, and B is 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 the 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から入力情報を得ることができる。
The CPU 2 of the sequence controller normally uses the real I / O address A set in the mapping table 6 and the real memory I based on the corresponding relationship between the real I / O address A and the internal memory address C.
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 an input device such as a switch or a relay contact connected to an I / O card (not shown) attached to the I / O connector 5. Is read every scan and I / I indicated by the corresponding internal memory address C
It is written in the position of the O memory 3a. Thus, the CPU
2 can obtain input information from the real I / O.

【0012】また、アドレスAが示す実I/Oに与えら
れる出力情報、すなわちコネクタ5に装着されたI/O
カードに接続されるモータやバルブ等の出力機器に与え
られる情報は、メモリアドレスCが示すI/Oメモリ3
aの位置に1スキャンごとに書き込まれ、対応するアド
レスAが示すI/Oコネクタ5に出力される。こうし
て、シーケンスコントローラから実I/Oに出力情報が
与えられる。
Output information given to the real I / O indicated by the address A, that is, the I / O attached to the connector 5
The information given to the output device such as the motor and valve connected to the card is the I / O memory 3 indicated by the memory address C.
It is written in the position of a for each scan and is output to the I / O connector 5 indicated by the corresponding address A. In this way, output information is given 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 the exchange of such 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 O address B, virtual I / O space and I / O memory 3
Input / output information is exchanged with a. As the virtual I / O space, the data memory 3b, work RAM 4, real I / O
O space (here, I / O attached to I / O connector 5
Simulator module which is a kind of O card) can be set.

【0014】例えば、マッピングテーブル6の仮想I/
OアドレスBとしてデータメモリ3bのアドレスを設定
しておき、データメモリ3bが仮想の入出力機器として
機能するようなシミュレーション用のラダープログラム
をプログラムメモリ1に格納する。これにより、CPU
2にメモリ1に格納されたプログラムを実行させると、
データメモリ3b上に仮想の入出力機器の入出力情報が
現れる。
For example, the virtual I / of the mapping table 6
The address of the data memory 3b is set as the O address B, and a ladder program for simulation that allows the data memory 3b to function 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,
Input / output information of a 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 effective bit F is significant, C
The PU 2 is a virtual I / O and has a data memory 3b and an I / O.
Input / output information is exchanged with the memory 3a. In this way, by operating the data memory 3b as a virtual input / output device, even if the actual I / O is not connected to the I / O connector 5, simulation can be performed only by the CPU 2 of the controller.

【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, and the work RAM 4 is set.
A special instruction for simulation is stored in the ROM to function as a virtual input / output device. The special instruction is provided by firmware by the manufacturer of the sequence controller, and the work RAM is a memory used when the special instruction is executed and cannot be directly accessed from the ladder program created by the user. Thus, if the valid bit F is made significant while the CPU 2 is executing 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 that operates in the same way as an actual I / O is attached to the I / O connector 5, and a virtual I / O is installed.
As the I / O address B, the number of the I / O connector 5 to which the simulator module is attached is set. In this case, the CPU 2 only needs to make the effective bit F significant.
Input / output information is exchanged between the simulator module and the I / O memory 3a. As a result, a simulation assuming an actual operation can be performed without changing the sequence program stored in the memory 1, and the program can be debugged.

【0018】[0018]

【発明の効果】本発明によれば、仮想I/Oアドレスと
有効フラグを記憶できるようにマッピングテーブルを拡
張することにより、フラグの情報を有効にするだけで、
仮想I/Oアドレスが示す仮想の入出力機器とメモリア
ドレスが示すI/Oメモリとの間で入出力情報のやり取
りが行われるので、実際の入出力機器がなくてもシミュ
レーションを行うことができる。
According to the present invention, by expanding the mapping table so that the virtual I / O address and the valid flag can be stored, the flag information can be validated.
Since the 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, the simulation can be performed without the actual input / output device. .

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の1実施例を示すシーケンスコントロ
ーラのブロック図である。
FIG. 1 is a block diagram of a sequence controller showing an embodiment of the present invention.

【図2】 I/O空間と内部メモリとの対応関係をマッ
ピングテーブル上に設定した様子を示す図である。
FIG. 2 is a diagram showing a state in which a correspondence relationship between an I / O space and an internal memory is set on a mapping table.

【符号の説明】[Explanation of symbols]

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 ... Real I / O address, B ... Virtual I / O address,
C ... Internal memory address, F ... Valid flag.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 入出力機器の接続位置を示すI/Oアド
レスとI/Oメモリ上の位置を示すメモリアドレスの対
応関係に基づいて、入出力機器とI/Oメモリとの間で
入出力情報のやり取りを行うシーケンスコントローラに
おいて、 実際の入出力機器のI/Oアドレスを与える実I/Oア
ドレス、仮想の入出力機器のI/Oアドレスを与える仮
想I/Oアドレス、この仮想I/Oアドレスが有効かど
うかを示す有効フラグ、並びに実I/Oアドレス及び仮
想I/Oアドレスに対応するメモリアドレスを記憶する
マッピングテーブルを有し、仮想I/Oアドレスが有効
であることを前記有効フラグが示すときに、実I/Oア
ドレスの代わりに仮想I/Oアドレスを用いるようにし
たことを特徴とするシーケンスコントローラ。
1. Input / output 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 that exchanges information, a real I / O address that gives an I / O address of an actual input / output device, a virtual I / O address that gives an I / O address of a virtual input / output device, and this virtual I / O A valid flag indicating whether the address is valid, and a mapping table storing memory addresses corresponding to the real I / O address and the virtual I / O address, and the valid flag indicating that the virtual I / O address is valid , The virtual I / O address is used instead of the real I / O address.
JP7615195A 1995-03-31 1995-03-31 Sequence controller Expired - Fee Related JP3316779B2 (en)

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 true JPH08272409A (en) 1996-10-18
JP3316779B2 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012198636A (en) * 2011-03-18 2012-10-18 Mitsubishi Electric Corp Controller
WO2015137505A1 (en) * 2014-03-14 2015-09-17 オムロン株式会社 Programmable controller and device control method using said programmable controller

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012198636A (en) * 2011-03-18 2012-10-18 Mitsubishi Electric Corp Controller
WO2015137505A1 (en) * 2014-03-14 2015-09-17 オムロン株式会社 Programmable controller and device control method using said programmable controller
JP2015176340A (en) * 2014-03-14 2015-10-05 オムロン株式会社 Programmable controller and device control method by programmable controller
CN106068480A (en) * 2014-03-14 2016-11-02 欧姆龙株式会社 Programmable logic controller and apparatus control method based on programmable logic controller

Also Published As

Publication number Publication date
JP3316779B2 (en) 2002-08-19

Similar Documents

Publication Publication Date Title
JPH05134861A (en) Computer system
JP3456692B2 (en) Data processing device
US6192331B1 (en) Method for simulating control functions of a control device
US8464016B2 (en) Method and device for switching over in a memory for a control device
US5867383A (en) Programmable logic controller
JP3068353U (en) Equipment for the control of printing presses
JPH08272409A (en) Sequence controller
US4792918A (en) Programmable controller monitoring system for simultaneous multiple line display of original and updated data program execution
KR100716076B1 (en) Interrupt processing method, os support system, information processing device, and storage medium
JP3516607B2 (en) Programmable display device
JP4479131B2 (en) Control device
JP3562783B2 (en) How to debug a programmable display device
JP3269164B2 (en) Peripheral device of programmable controller
JP2854248B2 (en) Programmable controller
JPH10283004A (en) Programmable display device
JP2000231481A (en) Apparatus control system
JPH08335201A (en) Test system device for input/output control
JP3479238B2 (en) Screen data creation device for display device
JPH0518138B2 (en)
CN115981286A (en) Method and device for realizing virtual calibration of automobile based on virtual simulation platform
JPH11134010A (en) Program executing method of programmable controller
JPS62266604A (en) Remote programming console device
JPH10105226A (en) Programmable display device
JPH02133801A (en) Programmable controller
JPH07104662A (en) Programable controller

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