JPH09128013A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH09128013A
JPH09128013A JP28074695A JP28074695A JPH09128013A JP H09128013 A JPH09128013 A JP H09128013A JP 28074695 A JP28074695 A JP 28074695A JP 28074695 A JP28074695 A JP 28074695A JP H09128013 A JPH09128013 A JP H09128013A
Authority
JP
Japan
Prior art keywords
input
sequence program
memory
program
sequence
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
JP28074695A
Other languages
Japanese (ja)
Inventor
Tetsumasa Asano
哲正 浅野
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP28074695A priority Critical patent/JPH09128013A/en
Publication of JPH09128013A publication Critical patent/JPH09128013A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To perform the self-check of a sequence program by executing desk simulation including the operation of a machine to be controlled or static simulation to be executed by stopping a power source for a machine only by one programmable controller. SOLUTION: A 2nd sequence program 33 inputs an ON/OFF output signal controlled by a 1st sequence program 32 to be debugged from an output image memory 21 (or a false input image memory 26 equivalent to the memory 21) and executes operation equivalent to machine operation to control an ON/OFF signal stored in a false output image memory 27. The 1st sequence program 32 inputs and processes a synthetic ON/OFF signal obtained by logically synthesizing the contents of the memory 27 and the contents of an input image memory 20 and storing the synthetic signal in a synthetic input image memory 28 as a control input.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、外部よりの多数
の入力信号のON/OFF状態に応動し、プログラマブ
ルな電子的手段によって制御対象に対する多数の出力信
号のON/OFF制御を行うプログラマブルコントロー
ラ(以下PLCと云う)に関し、特に実機に格納された
シーケンスプログラムのシミュレーションを実機にて実
行できる機能を備えたPLCに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller which responds to ON / OFF states of a large number of input signals from the outside and performs ON / OFF control of a large number of output signals to a control target by programmable electronic means ( The present invention relates to a PLC), and more particularly to a PLC having a function of executing simulation of a sequence program stored in an actual machine on the actual machine.

【0002】[0002]

【従来の技術】図5は、例えば三菱電機株式会社の「ハ
ンディシミュレーションユニットFX2−32MR−S
ET」によりシーケンスプログラムのシミュレーション
を行う場合の全体構成図を示したものである。図中、1
は入力端子台2と出力端子台3を備えた第1のPLCで
あり、この第1のPLC1にはシミュレーションを行う
べき第1のシーケンスプログラム10(図6)が格納さ
れている。
2. Description of the Related Art FIG. 5 shows, for example, "Handy Simulation Unit FX2-32MR-S" manufactured by Mitsubishi Electric Corporation.
2 is a diagram showing an overall configuration when a sequence program is simulated by "ET". In the figure, 1
Is a first PLC provided with an input terminal block 2 and an output terminal block 3, and a first sequence program 10 (FIG. 6) to be simulated is stored in this first PLC 1.

【0003】1aは入力端子台2aと出力端子台3aを
備えた第2のPLCであり、このPLC1aには第1の
PLC1によって制御される機械の動作を模擬する第2
のシーケンスプログラム10a(図6)が格納されてい
る。
Reference numeral 1a is a second PLC having an input terminal block 2a and an output terminal block 3a. The PLC 1a has a second PLC that simulates the operation of a machine controlled by the first PLC 1.
The sequence program 10a (FIG. 6) is stored.

【0004】4は第1のPLC1に接続されたシミュレ
ーションスイッチであり、第1のPLC1によって制御
される機械に設けられた図示しない手動操作スイッチに
対応している。これらシミュレーションスイッチ4は一
端を入力端子台2のコモン端子Cに共通接続され、各他
端はそれぞれ入力端子TX0,TX1,TX2,・・・
TXnに接続されている。
Reference numeral 4 is a simulation switch connected to the first PLC 1, and corresponds to a manual operation switch (not shown) provided on the machine controlled by the first PLC 1. One end of each of these simulation switches 4 is commonly connected to the common terminal C of the input terminal block 2, and the other ends thereof are respectively input terminals TX0, TX1, TX2, ...
It is connected to TXn.

【0005】なお、シミュレーションスイッチ4とし
て、出来合いのセット品を用いる時は、第1のPLC1
の全ての入力端子TX0,TX1,TX2,・・・TX
nにシミュレーションスイッチ4を接続して置いてもよ
い。しかし、制御対象となる機械に設けられたリミット
スイッチ,光電スイッチ,近接スイッチなどのセンサ用
スイッチが接続されるべき入力端子にシミュレーション
スイッチを接続した場合は、不要な入力信号を排除する
ためにこれらシミュレーションスイッチをOFFにして
おく必要がある。
When a ready-made set product is used as the simulation switch 4, the first PLC 1
Input terminals TX0, TX1, TX2, ... TX
The simulation switch 4 may be connected to n. However, if a simulation switch is connected to an input terminal to which a sensor switch such as a limit switch, photoelectric switch, or proximity switch provided on the machine to be controlled should be connected, these are used to eliminate unnecessary input signals. It is necessary to turn off the simulation switch.

【0006】5は第1のPLC1に内蔵された多数の出
力リレーの接点であり、各接点5の一端はそれぞれコモ
ン端子Cに共通接続され、各他端はそれぞれ出力端子T
Y0,TY1,TY2,・・・TYnを通して第2のP
LC1aの入力端子TX0,TX1,TX2,・・・T
Xnに接続されている。
Reference numeral 5 is a contact of a large number of output relays built in the first PLC 1, one end of each contact 5 is commonly connected to a common terminal C, and the other end is an output terminal T respectively.
Second P through Y0, TY1, TY2, ... TYn
LC1a input terminals TX0, TX1, TX2, ... T
It is connected to Xn.

【0007】5aは第2のPLC1aに内蔵された多数
の出力リレーの接点であり、各接点5aの一端はコモン
端子Cに共通接続され、各他端は出力端子TY0,TY
1,TY2,・・・TYnを通してそれぞれ第1のPL
C1の入力端子TX0,TX1,TX2・・・TXnに
接続されている。
Reference numeral 5a is a contact of a large number of output relays built in the second PLC 1a, one end of each contact 5a is commonly connected to a common terminal C, and the other end is an output terminal TY0, TY.
1, TY2, ... TYn through the first PL
It is connected to the input terminals TX0, TX1, TX2 ... TXn of C1.

【0008】ただし、入力端子台2において、制御対象
機械に設けられた手動操作スイッチが接続される入力端
子TX0,TX1,・・・には、シミュレーションスイ
ッチ4,4が接続されているので、これらの入力端子T
X0,TX1,・・・には接点5aの接続は不要であ
る。
However, in the input terminal block 2, the simulation switches 4 and 4 are connected to the input terminals TX0, TX1, ... To which the manual operation switches provided in the controlled machine are connected. Input terminal T
It is not necessary to connect the contacts 5a to X0, TX1 ,.

【0009】仮に、第2のPLC1aの全ての出力を第
1のPLC1の全ての入力端子TX0,TX1,・・・
TXnに接続しておいても、第2のPLC1a内の第2
のシーケンスプログラム10aでは、機械の手動操作ス
イッチに対応した不要な制御出力は発生しないので、実
用上の問題はない。
If all the outputs of the second PLC 1a are input to all the input terminals TX0, TX1, ... Of the first PLC 1 ...
Even if the second PLC 1a is connected to TXn, the second
In the sequence program 10a, the unnecessary control output corresponding to the manual operation switch of the machine does not occur, so there is no practical problem.

【0010】以下、従来技術の作用、動作を図6をも参
照して説明する。図6は図5に示された第1のPLC1
と、第2のPLC1aの総合的な作用及び動作を説明す
るためのシーケンス図を示したものである。図6におい
て、10は第1のPLC1内にプログラム設定された第
1のシーケンスプログラム(即ち、シミュレーション対
象となるシーケンスプログラム)の内容をリレーラダー
図で表現したものである。また、10aは、第2のPL
C1a内にプログラム設定された第2のシーケンスプロ
グラム(即ち、制御対象機械の模擬動作に相当するシー
ケンスプログラム)の内容をリレーラダー図で表現した
ものでる。
The operation and operation of the conventional technique will be described below with reference to FIG. FIG. 6 shows the first PLC1 shown in FIG.
And a sequence diagram for explaining the overall operation and operation of the second PLC 1a. In FIG. 6, 10 is a relay ladder diagram representing the contents of the first sequence program (that is, the sequence program to be simulated) programmed in the first PLC 1. 10a is the second PL
The contents of the second sequence program (that is, the sequence program corresponding to the simulated operation of the machine to be controlled) programmed in C1a is expressed by a relay ladder diagram.

【0011】まず、第1のシーケンスプログラムの動作
として、図5のシミュレーションスイッチ4のうち、入
力端子台2の入力端子TX0に接続されたスイッチ4を
ONしてリレーラダー図の中の常開接点X0CをONに
すると、右限リミットスイッチの常閉接点X10Cは閉
路状態であるため出力リレーY0が動作する。その後
は、端子TX0に接続されたシミュレーションスイッチ
4をOFFしても、自己保持用常開接点Y0Cの閉路に
より出力リレーY0の動作は継続している。
First, as the operation of the first sequence program, of the simulation switches 4 in FIG. 5, the switch 4 connected to the input terminal TX0 of the input terminal block 2 is turned on to turn on the normally open contact in the relay ladder diagram. When X0C is turned on, the normally closed contact X10C of the right limit switch is in the closed state, so that the output relay Y0 operates. After that, even if the simulation switch 4 connected to the terminal TX0 is turned off, the operation of the output relay Y0 continues due to the closed circuit of the self-holding normally open contact Y0C.

【0012】出力リレーY0が、例えば台車駆動用モー
タの右行動作用に用いられていれば、やがて図示しない
右限リミットスイッチの常閉接点X10Cが開路し、出
力リレーY0が不動作となって、右行動作を停止させよ
うとするものである。
If the output relay Y0 is used, for example, for the right action action of the truck driving motor, the normally closed contact X10C of the right limit switch (not shown) is opened and the output relay Y0 becomes inoperative. It is intended to stop the rightward movement.

【0013】次に、第2のシーケンスプログラム10a
の動作として、図5に示す第1のPLC1における出力
端子台3からの出力Y0Sは、第2のPLC1aにおけ
る入力端子台2aに入力X0Sをとして入力されリレー
ラダー図(10a)の中の常開接点X0CをONさせ
る。これにより、第2のPLC1a内のタイマT0が駆
動され、設定時間K10(例えば10秒)後に常開接点
T0Cが閉路する。
Next, the second sequence program 10a
As the operation of, the output Y0S from the output terminal block 3 in the first PLC 1 shown in FIG. 5 is input as the input X0S to the input terminal block 2a in the second PLC 1a and is normally opened in the relay ladder diagram (10a). Turn on contact X0C. As a result, the timer T0 in the second PLC 1a is driven, and the normally open contact T0C is closed after the set time K10 (for example, 10 seconds).

【0014】従って、出力リレーY10が動作し、出力
端子台3aの出力端子TY10からの出力Y10Sは、
第1のPLC1における入力端子台2の入力端子TX1
0に入力X10Sとして入力され、リレーラダー図(1
0)内の常閉接点X10Cを開路させることになる。こ
のように、第2のシーケンスプログラム10aは、第1
のPLC1によって制御されるべき機械の動作を模擬し
たものであって、タイマT0は、アクチェータの右行動
作時間に相当して設定されている。
Therefore, the output relay Y10 operates and the output Y10S from the output terminal TY10 of the output terminal block 3a is
The input terminal TX1 of the input terminal block 2 in the first PLC 1
0 is input as input X10S and relay ladder diagram (1
The normally closed contact X10C in 0) is opened. In this way, the second sequence program 10a
This is a simulation of the operation of the machine to be controlled by the PLC 1, and the timer T0 is set to correspond to the rightward operation time of the actuator.

【0015】なお、第1のシーケンスプログラム10
は、機械制御のためにごく一部を示したものであり、一
般に多数の入出力の複合的な組合せと、安全な動作手順
に基づく複雑なものとなっている。これに対し、上記第
2のシーケンスプログラム10aは、各種アクチェータ
の駆動に伴うセンサの応答を素直に表現したものであ
り、図6のような単純なタイマ回路が多数プログラムさ
れることが一般的である。
The first sequence program 10
Shows only a small part for machine control, and is generally complicated based on a complex combination of a large number of inputs and outputs and a safe operation procedure. On the other hand, the second sequence program 10a directly expresses the response of the sensor accompanying the driving of various actuators, and it is common to program a large number of simple timer circuits as shown in FIG. is there.

【0016】また、制御対象となる機械に設けられた表
示ランプなどの静止出力負荷の場合は、第1のPLC1
に設けられた出力表示LEDによって動作の確認ができ
るので、シミュレーションプログラムを作る必要はな
い。
In the case of a static output load such as an indicator lamp provided on the machine to be controlled, the first PLC 1
Since the operation can be confirmed by the output display LED provided in, it is not necessary to create a simulation program.

【0017】[0017]

【発明が解決しようとする課題】従来のPLCは以上の
とおり、格納するシーケンスプログラムの開発の最終段
階において、シーケンス制御対象とする機械がなくても
シーケンスプログラムの等価的なシミュレーションを行
ない、シーケンスプログラムの動作を検証することがで
きる。
As described above, the conventional PLC performs the equivalent simulation of the sequence program at the final stage of the development of the sequence program to be stored, even if there is no machine to be sequence controlled. You can verify the operation of.

【0018】しかし、従来の場合、シーケンスプログラ
ムをシミュレーションする際にシミュレーション対象と
なるシーケンスプログラムを格納したPLCと、シーケ
ンスプログラムによる制御対象となる機械の動作を模擬
したシーケンスプログラムを格納したPLCを2台必要
となる難点がある。
However, in the conventional case, when simulating a sequence program, there are two PLCs that store a sequence program that is a simulation target and two PLCs that store a sequence program that simulates the operation of a machine that is a control target by the sequence program. There are some drawbacks that are needed.

【0019】上記の不具合を解消するために、入出力点
数が多いPLCを用いれば余分の入出力端子台部分に対
してシミュレーション用の入出力リードを接続すること
で、開発したシーケンスプログラムを、機械動作をも模
擬したシーケンスプログラムを格納した1台のPLCで
シミュレーションすることもできるが、この場合、入出
力点数の増加に伴い入出力端子台が大きくなりPLCが
大型化してコストアップにつながる。また、入出力端子
間にシミュレーション用のリード線を配線する等の手間
がかかるという問題点があった。
In order to solve the above-mentioned problems, if a PLC having a large number of input / output points is used, the input / output leads for simulation are connected to the extra input / output terminal block portion, so that the developed sequence program It is also possible to perform simulation with one PLC that stores a sequence program that also simulates the operation, but in this case, as the number of input / output points increases, the input / output terminal block becomes larger and the PLC becomes larger, leading to cost increase. In addition, there is a problem that it takes time and effort to wire a simulation lead wire between the input and output terminals.

【0020】この発明の第1の目的は、実用されるPL
Cの入力端子にシミュレーションスイッチさえ接続すれ
ば、入出力端子間にシミュレーション用の配線を必要と
せずに、制御対象である機械動作を想定したシーケンス
プログラムの机上シミュレーションを行うことができる
PLCを得るものである。
The first object of the present invention is to put the PL into practical use.
A PLC capable of performing a desk-top simulation of a sequence program assuming a machine operation to be controlled without connecting a simulation wiring between the input and output terminals by connecting a simulation switch to the input terminal of C. Is.

【0021】また、この発明の第2の目的は、PLCが
その制御対象となる機械に対して、既に組み込まれ、各
端子台に入出力機器のリードが配線された後でも、機械
の動力源即ち、モータの電源、油圧シリンダの油圧、或
いは空圧機器の圧力源を止めて置くことにより、機械の
静止状態でシーケンスプログラムの運転シミュレーショ
ンを行うことができるPLCを得るものである。
A second object of the present invention is to provide a power source for a machine even after the PLC is already installed in the machine to be controlled and the leads of the input / output device are wired to each terminal block. In other words, by stopping the power source of the motor, the hydraulic pressure of the hydraulic cylinder, or the pressure source of the pneumatic equipment, the PLC capable of performing the operation simulation of the sequence program while the machine is stationary is obtained.

【0022】[0022]

【課題を解決するための手段】請求項1の発明にかかる
プログラマブルコントローラは、動作検証対象となる第
1のシーケンスプログラム、およびこの第1のシーケン
スプログラムの制御対象となる機器の動作を模擬した第
2のシーケンスプログラムを格納したプログラムメモリ
と、これらシーケンスプログラムに基づいてシーケンス
制御処理を行う制御処理部と、前記第1のシーケンスプ
ログラムの処理結果を格納する処理結果メモリと、この
処理結果を取り込んだ前記第2のシーケンスプログラム
の処理結果を格納する疑似出力メモリとを備え、前記制
御処理部は前記疑似出力メモリの内容を制御入力として
前記第1のシーケンスプログラムに取り込んでプログラ
ム処理をし、動作検証を行うものである。
According to a first aspect of the present invention, there is provided a programmable controller which simulates an operation of a first sequence program which is an operation verification target and a device which is a control target of the first sequence program. A program memory storing the second sequence program, a control processing unit that performs sequence control processing based on these sequence programs, a processing result memory that stores the processing result of the first sequence program, and this processing result And a pseudo output memory for storing a processing result of the second sequence program, wherein the control processing unit fetches the content of the pseudo output memory as a control input into the first sequence program to perform a program processing and an operation verification. Is to do.

【0023】請求項2の発明にかかるプログラマブルコ
ントローラは、動作検証対象となる第1のシーケンスプ
ログラム、およびこの第1のシーケンスプログラムの制
御対象となる機器の動作を模擬した第2のシーケンスプ
ログラムを格納したプログラムメモリと、これらシーケ
ンスプログラムに基づいてシーケンス制御処理を行う制
御処理部と、前記第1のシーケンスプログラムの処理結
果を格納する処理結果メモリと、この処理結果を取り込
んだ前記第2のシーケンスプログラムの処理結果を格納
する疑似出力メモリと、この疑似出力メモリに格納され
た処理結果と前記第1のシーケンスプログラムに取り込
まれる入力信号とを論理結合して合成信号とする論理結
合手段とを備え、前記制御処理部は前記合成信号を制御
入力として前記第1のシーケンスプログラムに取り込ん
でプログラム処理をし、動作検証を行うものである。
A programmable controller according to a second aspect of the present invention stores a first sequence program to be an operation verification target and a second sequence program simulating the operation of a device to be controlled by the first sequence program. Program memory, a control processing unit that performs sequence control processing based on these sequence programs, a processing result memory that stores processing results of the first sequence program, and the second sequence program that captures the processing results. A pseudo output memory for storing the processing result of the above, and a logical combination means for logically combining the processing result stored in the pseudo output memory and the input signal taken in by the first sequence program into a combined signal, The control processing unit receives the composite signal as a control input and then outputs the first signal. The program processing incorporated into the sequence program, and performs operation verification.

【0024】請求項3の発明にかかるプログラマブルコ
ントローラは、請求項2に記載のプログラマブルコント
ローラにおいて、論理結合手段は、疑似出力メモリに格
納された処理結果と第1のシーケンスプログラムに取り
込まれる入力信号とを論理和するものである。
A programmable controller according to a third aspect of the present invention is the programmable controller according to the second aspect, wherein the logic coupling means receives a processing result stored in the pseudo output memory and an input signal fetched into the first sequence program. Is to be ORed.

【0025】請求項4の発明にかかるプログラマブルコ
ントローラは、請求項1または2に記載のプログラマブ
ルコントローラにおいて、処理結果メモリと等価な内容
であって、この処理結果メモリとは異なる呼称名で記憶
内容の書込みが行われる疑似入力メモリを備え、この疑
似入力メモリの内容を第2のシーケンスプログラムに取
り込むものである。
According to a fourth aspect of the present invention, there is provided a programmable controller according to the first or second aspect, in which the stored contents have a content equivalent to that of the processing result memory and a storage name different from that of the processing result memory. A pseudo input memory for writing is provided, and the contents of this pseudo input memory are taken into the second sequence program.

【0026】請求項5の発明にかかるプログラマブルコ
ントローラは、請求項1または2に記載のプログラマブ
ルコントローラにおいて、第2のシーケンスプログラム
の実行/非実行を選択するプログラム制御手段を備えた
ものである。
A programmable controller according to a fifth aspect of the present invention is the programmable controller according to the first or second aspect, further comprising program control means for selecting execution / non-execution of the second sequence program.

【0027】請求項6の発明にかかるプログラマブルコ
ントローラは、請求項2または5に記載のプログラマブ
ルコントローラにおいて、第1のシーケンスプログラム
に取り込ます制御入力として、入力信号と第2のシーケ
ンスプログラムの処理結果である疑似出力メモリの内容
の論理和による合成信号か、或いは疑似出力メモリの内
容を選択するかの情報を入力信号の番号に対応して設定
したパラメータメモリを備え、制御処理部は入力信号を
取り込む毎に、パラメータメモリの情報を読み出して前
記第1のシーケンスプログラムに対する制御入力を選択
するものである。
A programmable controller according to a sixth aspect of the present invention is the programmable controller according to the second or fifth aspect, in which the input signal and the processing result of the second sequence program are used as control inputs to be incorporated in the first sequence program. The control processing unit takes in the input signal, which is provided with a parameter memory in which information on whether to select the content of the pseudo output memory or a synthetic signal obtained by logically adding the contents of a certain pseudo output memory is set in correspondence with the number of the input signal. Each time, the information in the parameter memory is read and the control input for the first sequence program is selected.

【0028】請求項7の発明にかかるプログラマブルコ
ントローラは、請求項2または5に記載のプログラマブ
ルコントローラにおいて、第2のシーケンスプログラム
の非実行時には論理結合を省略し、多数の入力信号を第
1のシーケンスプログラムに対する制御入力として扱う
プログラム選択手段を備えたものである。
A programmable controller according to a seventh aspect of the present invention is the programmable controller according to the second or fifth aspect, in which the logical combination is omitted when the second sequence program is not executed and a large number of input signals are input to the first sequence. It is provided with a program selecting means to be treated as a control input for the program.

【0029】[0029]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

実施の形態1.次に、この発明の実施の形態1を図につ
いて説明する。図1は本実施の形態にかかるPLCの構
成を示すブロック図である。図において、15は本実施
の形態におけるPLC、16は後述する各メモリに格納
されたデータおよびプログラムに従ってシーケンスコン
トロール処理、シーケンスプログラムのシミュレーショ
ン処理等を行う制御処理部としてのCPU、17はCP
U16の処理手順であるシステムプログラムを格納した
システムメモリ、18はPLC15の外部に設けられた
多数の入力スイッチ19をCPU16に接続する入力イ
ンタフェースである。この入力インタフェース18は、
入力信号の電圧レベルの変換や光絶縁などを行うと共
に、図示しない複数のデータセレクタの順次選択によ
り、8点単位または6点単位で入力スイッチ19よりの
ON/OFF入力信号をCPU16に供給する。
Embodiment 1 FIG. Next, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the PLC according to this embodiment. In the figure, 15 is a PLC in the present embodiment, 16 is a CPU as a control processing unit that performs sequence control processing, sequence program simulation processing, etc. according to data and programs stored in each memory described later, and 17 is a CP.
A system memory that stores a system program that is a processing procedure of U16, and 18 is an input interface that connects a large number of input switches 19 provided outside the PLC 15 to the CPU 16. This input interface 18 is
In addition to converting the voltage level of the input signal and performing optical isolation, an ON / OFF input signal from the input switch 19 is supplied to the CPU 16 in units of 8 points or 6 points by sequentially selecting a plurality of data selectors not shown.

【0030】20はCPU16を介して入力スイッチ1
9のON/OFF入力信号が格納される入力イメージメ
モリである。ただし、入力イメージメモリ20はCPU
16が制御に必要な入力スイッチ19のON/OFF入
力信号を、必要の都度に入力インタフェース18から直
接的に入力する形式のPLCにあっては、必ずしも必要
としないものである。
Reference numeral 20 denotes an input switch 1 via the CPU 16.
9 is an input image memory in which ON / OFF input signals of 9 are stored. However, the input image memory 20 is a CPU
This is not necessarily required in a PLC of the type in which the ON / OFF input signal of the input switch 19 required for control is directly input from the input interface 18 each time it is required.

【0031】21は処理結果メモリとしての出力イメー
ジメモリであり、この出力イメージメモリ21はプログ
ラムメモリ22に格納された第1のシーケンスプログラ
ム32(図3)と、入力イメージメモリ20(あるい
は、入力インタフェース18からの入力スイッチ19の
ON/OFF 信号)とに基づいて、CPU16で制
御演算された出力指令であるON/OFF出力信号が格
納される。なお、CPU16は、制御演算の過程で、出
力イメージメモリ21内のON/OFF出力信号も参照
しながら出力指令を発生している。
Reference numeral 21 denotes an output image memory as a processing result memory. The output image memory 21 is the first sequence program 32 (FIG. 3) stored in the program memory 22 and the input image memory 20 (or the input interface). Based on (ON / OFF signal of the input switch 19 from 18), an ON / OFF output signal which is an output command controlled and calculated by the CPU 16 is stored. It should be noted that the CPU 16 generates an output command while also referring to the ON / OFF output signal in the output image memory 21 during the control calculation process.

【0032】23は8点または16点単位のON/OF
F出力信号を扱う複数の出力ラッチメモリであり、この
出力ラッチメモリ23には上記出力イメージメモリ21
に格納されたON/OFF出力信号が順次選択されなが
ら格納される。その格納タイミングは、出力イメージメ
モリ21の内容が更新される都度に行われるダイレクト
方式と、CPU16の一連の動作が完了した時にサイク
リックに行われるリフレッシュ方式とがある。
23 is an ON / OF in units of 8 points or 16 points
It is a plurality of output latch memories that handle the F output signal.
The ON / OFF output signals stored in are sequentially selected and stored. The storage timing includes a direct method, which is performed each time the content of the output image memory 21 is updated, and a refresh method, which is cyclically performed when a series of operations of the CPU 16 is completed.

【0033】24は出力インタフェースであり、出力イ
ンタフェース24は出力ラッチメモリ23と直結して出
力信号の電圧レベルの変換や光絶縁などを行う。出力イ
ンタフェース24にはPLC15の外部に設けられた電
磁弁,パイロットランプ等の多数の出力負荷25が、8
点または16点単位で接続されている。26は疑似入力
イメージメモリであり、この疑似入力イメージメモリ2
6には、出力イメージメモリ21の内容(ON/OFF
出力信号)が出力ラッチメモリ23へ転送される時に、
同じON/OFF出力信号が転送される。従って、実質
的には出力イメージメモリ21と記憶内容は同一のもの
であるため、疑似入力イメージメモリ26は必ずしも必
要とはしない。
Reference numeral 24 is an output interface. The output interface 24 is directly connected to the output latch memory 23 to perform conversion of the voltage level of the output signal and optical isolation. In the output interface 24, a large number of output loads 25 such as solenoid valves and pilot lamps provided outside the PLC 15 are provided.
It is connected in units of points or 16 points. Reference numeral 26 is a pseudo input image memory.
6, the contents of the output image memory 21 (ON / OFF
Output signal) is transferred to the output latch memory 23,
The same ON / OFF output signal is transferred. Therefore, since the storage contents are substantially the same as those of the output image memory 21, the pseudo input image memory 26 is not always necessary.

【0034】ただし、出力イメージメモリ21に格納さ
れるON/OFF出力信号は、シーケンスプログラム上
では、例えばY0,Y1,Y2・・・のように出力記号
Yを伴う一連の番号で呼称されるのに対し、疑似入力イ
メージメモリ26に格納されるON/OFF出力信号
は、ユザーはON/OFF入力信号として扱うため、例
えばχ0,χ1,χ2・・・のように入力記号χを伴う
一連の番号で呼称されており、ユーザにとって識別し易
いものとなっている。この場合でも、実際にはどちらの
呼称を用いても実質的な差異はない。
However, the ON / OFF output signal stored in the output image memory 21 is referred to as a series of numbers with the output symbol Y such as Y0, Y1, Y2, ... On the sequence program. On the other hand, since the ON / OFF output signal stored in the pseudo input image memory 26 is treated as an ON / OFF input signal by the user, a series of numbers with an input symbol χ such as χ0, χ1, χ2 ... And is easy for the user to identify. Even in this case, there is practically no difference between the two names.

【0035】27は疑似出力イメージメモリであり、こ
の疑似出力イメージメモリ27は疑似入力イメージ26
(または出力イメージメモリ21)の内容と、プログラ
ムメモリ22内の第2のシーケンスプログラム33(図
3)とに基づいた制御出力が格納される。そして、疑似
出力イメージメモリ27には、例えばy0,y1,y2
・・・のように、出力記号yを伴う一連番号のON/O
FF信号が格納される。
27 is a pseudo output image memory, and this pseudo output image memory 27 is a pseudo input image 26.
The control output based on the contents of (or the output image memory 21) and the second sequence program 33 (FIG. 3) in the program memory 22 is stored. Then, in the pseudo output image memory 27, for example, y0, y1, y2
ON / O of serial number with output symbol y
The FF signal is stored.

【0036】28は合成入力イメージメモリであり、こ
の合成入力イメージメモリ28は入力イメージメモリ2
0の内容(または入力インタフェース18のON/OF
F信号)と、疑似出力イメージメモリ27の内容とをC
PU16のソフトウェア機能である論理和手段で論理結
合した合成ON/OFF信号を格納する。その結合論理
は後述のとおりである。29はPLC15の内部に設け
られたタイマ、カウンタ、データレジスタ、補助リレー
等の各種内部デバイスメモリであり、第1、第2のシー
ケンスプログラム32、33において自由に用いること
ができる。
28 is a composite input image memory, and this composite input image memory 28 is the input image memory 2
0 content (or ON / OF of input interface 18)
F signal) and the contents of the pseudo output image memory 27 are C
The combined ON / OFF signal logically combined by the logical sum means which is a software function of the PU 16 is stored. The connection logic is as described later. Reference numeral 29 denotes various internal device memories such as a timer, a counter, a data register, and an auxiliary relay provided inside the PLC 15, which can be freely used in the first and second sequence programs 32 and 33.

【0037】30はツールインタフェースであり、この
ツールインタフェース30は図示しないプログラム作成
用ツールで作成したシーケンスプログラムをプログラム
メモリ22に転送したり、各種イメージメモリやデバイ
スメモリ29の内容を人為的に設定変更したり、モニタ
表示したりするためのツールに対するインタフェースで
ある。
Reference numeral 30 denotes a tool interface. The tool interface 30 transfers a sequence program created by a program creation tool (not shown) to the program memory 22 and artificially changes the settings of various image memories and device memory 29. It is an interface to tools for displaying and displaying on a monitor.

【0038】なお、31は後述する第2の実施の形態で
用いるパラメータメモリである。また、上記各種メモリ
や、インタフェースはCPU16に対してバス接続さ
れ、CPU16を介して互いに交信することができるよ
う構成されている。
Reference numeral 31 is a parameter memory used in the second embodiment described later. The various memories and interfaces described above are connected to the CPU 16 by a bus and are configured to communicate with each other via the CPU 16.

【0039】次に、本実施の形態の作用及び動作の詳細
な説明を図2をも参照して説明する。図2は、図1に示
す通りに構成されたPLC15の作用及び動作の説明す
るブロック図である。図1、図2においてPLC15の
外部に接続された多数の入力スイッチ19の ON/O
FF入力信号は、入力インタフェース18、CPU16
を介して入力イメージメモリ20に取込まれる。CPU
16は、合成入力イメージメモリ28の内容と、出力イ
メージメモリ21の内容と、プログラムメモリ22内の
第1のシーケンスプログラム32(図3)とに基づいて
出力イメージメモリ21のON/OFF出力信号の内容
を制御、即ち1,0にて表されるON/OFF状態を更
新する。そして、制御結果は出力ラッチメモリ23及び
出力インタフェース24を介して多数の出力負荷25に
出力され、出力負荷25をON/OFF制御する。
Next, a detailed description of the operation and operation of the present embodiment will be given with reference to FIG. FIG. 2 is a block diagram for explaining the action and operation of the PLC 15 configured as shown in FIG. In FIG. 1 and FIG. 2, turning on / off a large number of input switches 19 connected to the outside of the PLC 15.
The FF input signal is input to the input interface 18 and the CPU 16.
Is taken into the input image memory 20 via. CPU
Reference numeral 16 denotes an ON / OFF output signal of the output image memory 21 based on the content of the composite input image memory 28, the content of the output image memory 21, and the first sequence program 32 (FIG. 3) in the program memory 22. The content is controlled, that is, the ON / OFF state represented by 1,0 is updated. Then, the control result is output to a large number of output loads 25 via the output latch memory 23 and the output interface 24, and the output loads 25 are ON / OFF controlled.

【0040】一方、出力イメージメモリ21(またはこ
れと等価な内容を持つ疑似入力イメージメモリ26)の
内容、疑似出力イメージメモリ27の内容、及びプログ
ラムメモリ22内の第2のシーケンスプログラム33
(図3)に基づいて、CPU16は疑似出力イメージメ
モリ27に格納されたON/OFF信号を制御する。
On the other hand, the contents of the output image memory 21 (or the pseudo input image memory 26 having contents equivalent thereto), the contents of the pseudo output image memory 27, and the second sequence program 33 in the program memory 22.
Based on (FIG. 3), the CPU 16 controls the ON / OFF signal stored in the pseudo output image memory 27.

【0041】なお、疑似出力イメージメモリ27の内容
と、上記入力イメージメモリ20(または入力インタフ
ェース18の ON/OFF 信号)の内容は、論理和
結合されて上記合成入力イメージメモリ28に格納さ
れ、これが第1のシーケンスプログラム32(図3)に
対する制御入力となるものである。
The contents of the pseudo output image memory 27 and the contents of the input image memory 20 (or ON / OFF signal of the input interface 18) are logically combined and stored in the composite input image memory 28. It serves as a control input for the first sequence program 32 (FIG. 3).

【0042】従って、入力イメージメモリ20と疑似出
力イメージメモリ27内のどちらかのON/OFF信号
がONであれば、これに対応した合成入力イメージメモ
リ28の信号もONとなるものである。
Therefore, if either the ON / OFF signal in the input image memory 20 or the pseudo output image memory 27 is ON, the signal of the combined input image memory 28 corresponding thereto is also turned ON.

【0043】図3は、図2における第1,第2のシーケ
ンスプログラム32,33の一例を示したものであり、
図3に示すのプログラムにより、第1のシーケンスプロ
グラム32の机上シミュレーションを行う場合の動作を
説明する。この場合、PLC15の入力インタフェース
18に接続された信号入力機器のうち、少なくとも制御
対象となる機械の中のセンサ入力を除いた全ての手動操
作入力機器に対しては、これに代わるものとしてシミュ
レーションスイッチが接続されているものとする。
FIG. 3 shows an example of the first and second sequence programs 32 and 33 in FIG.
The operation of the first sequence program 32 in the case of performing a desktop simulation with the program shown in FIG. 3 will be described. In this case, among the signal input devices connected to the input interface 18 of the PLC 15, all the manually operated input devices except for the sensor input in the machine to be controlled are replaced by simulation switches. Are connected.

【0044】また、PLC15の外部の出力負荷25や
入力スイッチ19そのものは、接続されていないものと
する。更に、PLC15の全ての入力端子に、シミュレ
ーションスイッチが接続されている時は、センサ用入力
スイッチが接続されべき入力端子に接続されるシミュレ
ーションスイッチは、全てOFFされているものとす
る。
The output load 25 outside the PLC 15 and the input switch 19 themselves are not connected. Further, when the simulation switches are connected to all the input terminals of the PLC 15, it is assumed that all the simulation switches connected to the input terminals to which the sensor input switch should be connected are turned off.

【0045】図3の中で、32はプログラムメモリ22
内の第1のシーケンスプログラムの内容をリレーラダー
図で表現したものであり、図において、X0Cはシミュ
レーションスイッチの入力X0をONさせて、合成イメ
ージメモリ28内の信号X0SがONした時に導通する
常開接点,Y0とY0Cはそれぞれ出力イメージメモリ
21内の信号Y0SがONの時に動作するコイルと常開
接点、X10Cは合成入力イメージメモリ28内の信号
X10SがONである時に開路となる常閉接点であり、
このリレーラダー図は、図6のものと同一の構成となっ
ている。
In FIG. 3, 32 is the program memory 22.
The content of the first sequence program in the above is expressed by a relay ladder diagram, and in the figure, X0C is a conductive state when the input X0 of the simulation switch is turned on and the signal X0S in the composite image memory 28 is turned on. Open contacts, Y0 and Y0C are coils and normally open contacts that operate when the signal Y0S in the output image memory 21 is ON, and X10C is a normally closed contact that opens when the signal X10S in the composite input image memory 28 is ON. And
This relay ladder diagram has the same configuration as that of FIG.

【0046】33はプログラムメモリ22内の第2のシ
ーケンスプログラムの内容をリレーラダー図で表現した
ものであり、図において、M9000は内部デバイスメ
モリ29内の特殊補助リレーの動作に応働する常閉接
点,CJ−P0は、常閉接点M9000が駆動された時
に、ラベルP0のステップまでのプログラムを非実行に
するジャンプ命令用コイル、χ0Cは疑似入力イメージ
メモリ26内の疑似入力信号χ0SがONの時に閉路す
る常開接点、T0、T0Cはそれぞれデバイスメモリ2
9内のタイマのコイルと常開接点であり、この常開接点
T0Cは、コイルT0が駆動されてから設定値K10
(例えば10秒)後に閉路する。
33 is a relay ladder diagram showing the contents of the second sequence program in the program memory 22. In the diagram, M9000 is a normally closed circuit which operates in response to the operation of the special auxiliary relay in the internal device memory 29. The contact, CJ-P0 is a coil for jump command which makes the program up to the step of label P0 not executed when the normally closed contact M9000 is driven, and χ0C is the pseudo input signal χ0S in the pseudo input image memory 26. Normally open contacts that are closed at times, T0 and T0C are the device memory 2 respectively.
9 is a coil of the timer and a normally open contact, and this normally open contact T0C is a set value K10 after the coil T0 is driven.
The circuit is closed (for example, 10 seconds).

【0047】y10は疑似出力イメージメモリ27内の
疑似出力信号y10SがONの時に動作する出力コイル
であり、この時、合成入力イメージメモリ28内の入力
信号X10SもONとなって、第1のシーケンスプログ
ラム32内の常閉接点X10Cが開路する。
Y10 is an output coil that operates when the pseudo output signal y10S in the pseudo output image memory 27 is ON, and at this time, the input signal X10S in the composite input image memory 28 is also ON, and the first sequence is performed. The normally closed contact X10C in the program 32 opens.

【0048】従って、これらのシーケンスプログラムの
動作は、図6に示したものと全く同一である。ただし、
第2のPLC1a(図5)の入力X0S、出力Y10S
に代わって、PLC15では疑似入力信号χ0S、疑似
出力信号y10Sが用いられている。
Therefore, the operation of these sequence programs is exactly the same as that shown in FIG. However,
Input X0S and output Y10S of the second PLC 1a (FIG. 5)
Instead of, the PLC 15 uses the pseudo input signal χ0S and the pseudo output signal y10S.

【0049】また、図3のシーケンスでは、シミュレー
ション動作を行う時に、特殊補助リレーM9000を図
示しないプログラム作成ツールを用いて、強制的にON
させる必要がある。これにより、CJ−P0のジャンプ
機能が解除され、第2のシーケンスプログラム33が有
効となる。逆に、特殊補助リレーM9000が不作動
で、常閉接点M9000が閉路しておれば、CJ−P0
のジャンプ機能により第2のシーケンスプログラム33
は、非実行となる。
In the sequence of FIG. 3, the special auxiliary relay M9000 is forcibly turned on by using a program creation tool (not shown) when performing the simulation operation.
Need to be done. As a result, the jump function of CJ-P0 is canceled and the second sequence program 33 becomes effective. On the contrary, if the special auxiliary relay M9000 is inoperative and the normally closed contact M9000 is closed, CJ-P0
The second sequence program 33 by the jump function of
Is not executed.

【0050】これは、PLC15の実用運転段階におい
て、第2のシーケンスプログラム33を無効とするため
のものであるが、実際には、実用運転段階では、第2の
シーケンスプログラム33を全て削除してしまってもよ
い。更に、特殊補助リレーM9000が不作動の時(即
ちシミュレーションを行わない時は)には、入力イメー
ジメモリ20と疑似出力イメージメモリ27の合成処理
を行わないで、入力イメージメモリ20の内容を合成入
力イメージメモリ28の内容として扱うことにより、C
PU16の合成処理のための負担も軽減される。
This is for invalidating the second sequence program 33 in the practical operation stage of the PLC 15, but actually, in the practical operation stage, all the second sequence program 33 is deleted. You can do it. Furthermore, when the special auxiliary relay M9000 is inoperative (that is, when simulation is not performed), the contents of the input image memory 20 are combined and input without combining the input image memory 20 and the pseudo output image memory 27. By handling the contents of the image memory 28, C
The load for the PU16 composition processing is also reduced.

【0051】なお、特殊補助リレーとは、内部デバイス
メモリ29内にある多数の一般用途の補助リレー,M
0,M1,M2,・・・等に比べ、その動作が予めシス
テムメモリ17上で定義されている点が異なり、例えば
PLCのRUN/STOP命令に対応してON/OFF
するM8000,PLCのエラー発生時に動作するM8
067など、PLCのメーカによって異なる番号ではあ
るが、同様の技術が広く用いられている。ここでは、本
発明のために新たにM9000を追加したことを想定し
て説明している。
The special auxiliary relay means a large number of general-purpose auxiliary relays in the internal device memory 29, M.
0, M1, M2, ... Compared with 0, M1, M2, etc., the point that the operation is defined in advance in the system memory 17, for example, ON / OFF corresponding to the RUN / STOP instruction of PLC
M8000, which operates when a PLC error occurs
Although it is a number such as 067 that differs depending on the manufacturer of the PLC, a similar technique is widely used. Here, it is assumed that M9000 is newly added for the present invention.

【0052】実施の形態2.上記、実施の形態1はPL
C15の入力にシミュレーションスイッチを接続し、こ
れらシミュレーションスイッチの内、機械の手動操作ス
イッチに対応する入力以外の全ての入力をOFFにし
て、机上シミュレーションを行うことについて説明し
た。尚、本実施の形態においてCPU16はプログラム
選択手段およびプログラム制御手段をも構成する。
Embodiment 2 The above-described first embodiment is PL
It has been described that the simulation switch is connected to the input of C15, and all the inputs other than the input corresponding to the manual operation switch of the machine are turned off to perform the desktop simulation. In the present embodiment, the CPU 16 also constitutes program selection means and program control means.

【0053】一方、PLC15が既にその制御対象とな
る機械に組み込まれ各リード線が入出力端子に配線され
ていて、機械の動力源を停止した状態での静止運転シミ
ュレーションを行う場合には、上記シミュレーションス
イッチは不要であって、実機の手動操作スイッチをその
まま用いることができる。しかし、機械の動作と連動す
るリミットスイッチ、光電スイッチ、近接スイッチなど
のセンサ入力スイッチのうち、現にON状態にあるセン
サ入力スイッチがPLC15の入力に接続されている時
は、このセンサ入力スイッチの入力を無効にする処理が
必要である。
On the other hand, when the PLC 15 is already incorporated in the machine to be controlled and each lead wire is wired to the input / output terminals, and the stationary operation simulation is performed with the power source of the machine stopped, The simulation switch is unnecessary, and the manual operation switch of the actual machine can be used as it is. However, of the sensor input switches such as limit switches, photoelectric switches, proximity switches, etc. that are interlocked with the operation of the machine, when the sensor input switch that is currently in the ON state is connected to the input of PLC 15, the input of this sensor input switch It is necessary to perform processing to invalidate.

【0054】この場合、ON状態のセンサ入力スイッチ
の数が少なければ、センサ入力スイッチを入力端子の配
線から外せばよいが、不特定多数のセンサ入力スイッチ
がON状態であると取扱性が悪くなる。また、これらセ
ンサ入力スイッチの入力を受ける入力端子台を取り外し
てスイッチ入力を一括して無効にすこともできるが、こ
れも機器の破損につながり好まれる処理の方法とは言え
ない。
In this case, if the number of sensor input switches in the ON state is small, the sensor input switches may be removed from the wiring of the input terminal, but if a large number of unspecified sensor input switches are in the ON state, the handling becomes poor. . Further, the input terminal block for receiving the inputs of these sensor input switches can be removed to invalidate the switch inputs all at once, but this is also not the preferred processing method because it will damage the equipment.

【0055】本実施の形態はこれらの不具合を改善した
ものであって、図1に示すPLC15中のパラメータメ
モリ31が使用される。パラメータメモリ31には図示
しないプログラム作成ツールを用いて、どの番号範囲の
入力が手動操作系の入力となっているのかの番号データ
を格納する。この場合の約束事項として、例えば手動操
作系の入力スイッチは入力番号を若番グループを、セン
サ系の入力に対しては入力番号を老番グループを使用す
るものとする。
The present embodiment has improved these problems, and the parameter memory 31 in the PLC 15 shown in FIG. 1 is used. In the parameter memory 31, a program creation tool (not shown) is used to store number data indicating which number range is input by the manual operation system. As a promise in this case, for example, the input switch of the manual operation system uses the young number group for the input number, and the old number group for the input of the sensor system.

【0056】図4は、このようなパラメータメモリ31
を用いた合成処理のフローチャートを示したものであ
る。このフローチャートによれば、先ず、内部デバイス
メモリ29内にあって、シミュレーション動作を行う時
に動作状態となる特殊補助リレーM9000の動作状態
を判定する(工程40)。そして、特殊補助リレーM9
000が不動作の時に、入力イメージメモリ20の内容
をそのまま合成イメージメモリ28に転送する(工程4
1)。
FIG. 4 shows such a parameter memory 31.
9 is a flowchart of a combining process using. According to this flowchart, first, the operating state of the special auxiliary relay M9000 in the internal device memory 29, which is in the operating state when performing the simulation operation, is determined (step 40). And the special auxiliary relay M9
When 000 is inoperative, the contents of the input image memory 20 are directly transferred to the composite image memory 28 (step 4).
1).

【0057】実際には、合成入力イメージメモリ28の
内容を無視して、入力イメージメモリ20の内容即ち、
入力インタフェース18のON/OFF入力信号を用い
れば上記の転送処理は不要である。工程40において、
特殊補助リレーM9000が動作時であることが判定さ
れたならば、合成処理の対象となる入力番号を設定する
(工程42)。第1のシーケンスプログラム32も動作
開始時に、入力番号は例えばX0とされている。
Actually, the content of the input image memory 20 is ignored, ignoring the content of the composite input image memory 28.
If the ON / OFF input signal of the input interface 18 is used, the above transfer processing is unnecessary. In step 40,
If it is determined that the special auxiliary relay M9000 is in operation, the input number that is the target of the combining process is set (step 42). At the start of the operation of the first sequence program 32 as well, the input number is, for example, X0.

【0058】工程42で設定された入力番号が、パラメ
ータメモリ31内で設定された弱番グループに属するか
どうかを判定する(工程43)。設定入力番号が弱番グ
ループである時に、入力イメージメモリ20と疑似出力
イメージメモリ27の論理和を合成入力イメージメモリ
28に転送する(工程44)。合成入力イメージメモリ
28の内容は第1のシーケンスプログラム32に対する
制御入力となる。第2実施例の目的に限定すれば、単に
入力イメージメモリ20の内容を合成入力イメージメモ
リ28に転送するだけでもよい。
It is determined whether the input number set in step 42 belongs to the weak number group set in the parameter memory 31 (step 43). When the set input number is a weak group, the logical sum of the input image memory 20 and the pseudo output image memory 27 is transferred to the composite input image memory 28 (step 44). The content of the composite input image memory 28 serves as a control input for the first sequence program 32. For the purposes of the second embodiment, the contents of the input image memory 20 may simply be transferred to the composite input image memory 28.

【0059】論理和合成した合成ON/OFF入力信号
が合成入力イメージメモリ28に格納された後に、設定
入力番号に1を加える同じ動作を繰り返す(工程4
5)。設定入力番号に1を加えた後に、これが工程43
により老番と判定されると、設定入力番号がPLC15
に設定された最大入力番号を超過したかどうか判定する
(工程46)。この判定工程で、最大入力番号が未超過
であると判定されたならば、疑似出力イメージメモリ2
7の内容を合成入力イメージメモリ28へ転送し、第1
のシーケンスプログラム32に対する制御入力とする
(工程47)。
After the combined ON / OFF input signal obtained by the logical sum combination is stored in the combined input image memory 28, the same operation of adding 1 to the set input number is repeated (step 4).
5). This is step 43 after adding 1 to the setting input number.
If it is determined to be an old number by, the setting input number is PLC15.
It is determined whether or not the maximum input number set in (4) is exceeded (step 46). If it is determined in this determination step that the maximum input number is not exceeded, the pseudo output image memory 2
7 is transferred to the composite input image memory 28, and the first
It is used as a control input for the sequence program 32 (step 47).

【0060】実際には、この転送処理を行わなくても、
老番グループの入力に対しては、CPU16は合成入力
イメージメモリ28の内容を無視して、疑似出力イメー
ジメモリ27の内容を読出すようにしてもよい。
Actually, even if this transfer processing is not performed,
For the input of the old number group, the CPU 16 may ignore the contents of the composite input image memory 28 and read the contents of the pseudo output image memory 27.

【0061】以上のとおり、工程41はシミュレーショ
ン動作を行わない時の処理工程、工程44は弱番グルー
プの入力(即ち手動操作系入力)に対する処理工程,工
程47は老番グループの入力(即ちセンサ系入力)に対
する処理工程であって、これらの処理工程は、システム
メモリ17(図1)内のシステムプログラムで定められ
た手順で実行される。
As described above, step 41 is the processing step when the simulation operation is not performed, step 44 is the processing step for the weak group input (ie manual operation system input), and step 47 is the old group input (ie sensor). These are the processing steps for system input), and these processing steps are executed according to the procedure determined by the system program in the system memory 17 (FIG. 1).

【0062】なお、PLC15の全ての入力を弱番グル
ープとして扱うように、パラメータメモリ31の入力番
号を設定した場合、全ての入力が論理和合成処理の対象
となるので、この場合は、第1実施例に相当することと
なる。また、入力のグループ分けについては、単に弱番
/老番の2グループではなく、同じ2グループであって
も入力番号の老弱の混在ができるようなパラメータ設定
も可能である。
When the input numbers of the parameter memory 31 are set so that all the inputs of the PLC 15 are treated as a weak group, all the inputs are subjected to the logical sum synthesis processing. This corresponds to the embodiment. Further, regarding the grouping of the input, it is possible to set the parameters such that the input numbers may be mixed with each other even if the same two groups are used instead of just the two groups of weak number / old number.

【0063】以上のとおり、センサ入力系の老番グルー
プ入力に対しては、入力イメージメモリ20の内容を無
視し、疑似出力イメージメモリ27の出力信号によっ
て、PLC15の入力に代替させているので、ON状態
のセンサ入力がPLCに接続されていても、シミュレー
ションを実行することができる。
As described above, for the old group input of the sensor input system, the contents of the input image memory 20 are ignored, and the output signal of the pseudo output image memory 27 substitutes for the input of the PLC 15. The simulation can be executed even if the sensor input in the ON state is connected to the PLC.

【0064】ただし、シミュレーション制御を完了し、
PLCの実用運転を行う時(即ち前述の特殊補助リレー
M9000が不作動のとき)には、工程41により、入
力イメージメモリ20の内容即ち入力インタフェース1
8から入力されるON/OFF信号そのものが有効とな
るように、合成処理が解除されている。
However, when the simulation control is completed,
When performing the practical operation of the PLC (that is, when the special auxiliary relay M9000 described above is not operated), the contents of the input image memory 20, that is, the input interface 1 is processed in step 41.
The synthesizing process is canceled so that the ON / OFF signal itself input from 8 is valid.

【0065】以上の説明では、リレーラダー言語に基づ
くPLCについて説明したが、その他の言語として工程
歩進形プログラム言語(SFC言語)、フローチャート
式言語など、様々の言語形式のPLCであっても同様で
あって、いずれの場合でも実機制御用の第1のシーケン
スプログラムとシミュレーション用の第2のシーケンス
プログラムとが、同一言語によってプログラムできるこ
とがユーザにとっては重要である。
In the above description, the PLC based on the relay ladder language has been described, but the same applies to PLCs in various language formats such as a step progress programming language (SFC language) and a flow chart type language as other languages. In any case, it is important for the user that the first sequence program for actual machine control and the second sequence program for simulation can be programmed in the same language.

【0066】合成入力イメージメモリ28は理論的なも
のであって、必ずしもハードウェアとしての特別なメモ
リを必要とするものではなく、CPU16が合成処理を
その都度行ってもよい。また、入力イメージメモリ20
の内容を選択するか疑似出力イメージメモリ27の内容
を選択するかの選択処理を行っても同じ目的を達成する
ことができる。
The synthetic input image memory 28 is theoretical and does not necessarily require a special memory as hardware, and the CPU 16 may perform the synthetic processing each time. In addition, the input image memory 20
The same purpose can be achieved by performing a selection process of selecting the contents of the above or the contents of the pseudo output image memory 27.

【0067】以上の説明で明らかなとおり、本発明によ
ればPLCのプログラム開発段階において、制御対象と
なる機械の動作を含めたシーケンスプログラムの運転シ
ミュレーションを行う時に、シミュレーションスイッチ
を接続した机上シミュレーションや、PLCを機械に組
込み配線された状態での静止運転シミュレーションを単
体のPLCで実行することができる。そのため、シーケ
ンスプログラムのデバッグの効率を高めると共に、誤っ
たシーケンスプログラムで機械を動かした時の損傷事故
などを未然に防止することに役立つことができる。
As is clear from the above description, according to the present invention, in the PLC program development stage, when the operation simulation of the sequence program including the operation of the machine to be controlled is performed, the desktop simulation or the simulation switch is connected. , A static operation simulation with the PLC incorporated in a machine and wired can be executed by a single PLC. Therefore, it is possible to improve the efficiency of debugging the sequence program and prevent damage accidents and the like when the machine is operated by an incorrect sequence program.

【0068】更に、PLCの物理的サイズは、入出力端
子台や入出力インタフェース及び、これに対応するDC
電源によってほぼ決定され、CPUやメモリを中心とす
る制御部分の占める割合は極小である。従って、メモリ
を拡張してシーケンスプログラム及び疑似入出力イメー
ジデータの格納領域を増やしても従来のPLCと実質的
に同一サイズのPLC単体でシミュレーション用PLC
を代行することができる。
Further, the physical size of the PLC is the input / output terminal block, the input / output interface, and the corresponding DC.
It is almost determined by the power source, and the proportion occupied by the control part centering on the CPU and memory is extremely small. Therefore, even if the memory is expanded to increase the storage area for the sequence program and the pseudo input / output image data, the PLC for simulation is practically the same as the conventional PLC.
Can act on your behalf.

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

【図1】 本発明の実施の形態1および2に適用される
プログラマブルコントローラ(PLC)の構成ブロック
図である。
FIG. 1 is a configuration block diagram of a programmable controller (PLC) applied to first and second embodiments of the present invention.

【図2】 実施の形態1の作用、動作を説明するための
ブロック図である。
FIG. 2 is a block diagram for explaining the operation and operation of the first embodiment.

【図3】 図2に示される第1,第2のシーケンスプロ
グラムの内容の一例であるリレーラダー図である。
FIG. 3 is a relay ladder diagram which is an example of the contents of first and second sequence programs shown in FIG.

【図4】 実施の形態2におけるパラメータメモリの役
割りを示すフローチャートである。
FIG. 4 is a flowchart showing the role of a parameter memory according to the second embodiment.

【図5】 従来のPLCによりシーケンスプログラムの
シミュレーションを行う時の各PLCの接続関係を説明
する構成図である。
FIG. 5 is a configuration diagram illustrating a connection relationship of each PLC when a sequence program is simulated by a conventional PLC.

【図6】 図5における第1及び第2のシーケンスプロ
グラムの内容の一例を示すリレーラダー図である。
FIG. 6 is a relay ladder diagram showing an example of contents of first and second sequence programs in FIG.

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

15 プログラマブルコントローラ、16 マイクロプ
ロセッサ、19 多数の入力スイッチ、20 入力イメ
ージメモリ、21 出力イメージメモリ、22プログラ
ムメモリ、25 多数の出力負荷、26 疑似入力イメ
ージメモリ、27 疑似出力イメージメモリ、28 合
成入力イメージメモリ(合成ON/OFF信号格納
用)、31 パラメータメモリ、32 第1のシーケン
スプログラム、33 第2のシーケンスプログラム、4
1 論理結合処理を省略する工程、47 疑似出力イメ
ージメモリを優先する工程。
15 programmable controller, 16 microprocessor, 19 multiple input switches, 20 input image memory, 21 output image memory, 22 program memory, 25 multiple output loads, 26 pseudo input image memory, 27 pseudo output image memory, 28 composite input image Memory (for storing synthetic ON / OFF signal), 31 Parameter memory, 32 First sequence program, 33 Second sequence program, 4
1 Step of omitting the logical combination processing, 47 Step of giving priority to the pseudo output image memory.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 動作検証対象となる第1のシーケンスプ
ログラム、およびこの第1のシーケンスプログラムの制
御対象となる機器の動作を模擬した第2のシーケンスプ
ログラムを格納したプログラムメモリと、 これらシーケンスプログラムに基づいてシーケンス制御
処理を行う制御処理部と、 前記第1のシーケンスプログラムの処理結果を格納する
処理結果メモリと、 この処理結果を取り込んだ前記第2のシーケンスプログ
ラムの処理結果を格納する疑似出力メモリとを備え、 前記制御処理部は前記疑似出力メモリの内容を制御入力
として前記第1のシーケンスプログラムに取り込んでプ
ログラム処理をし、動作検証を行うことを特徴とするプ
ログラマブルコントローラ。
1. A program memory storing a first sequence program to be an operation verification target and a second sequence program simulating the operation of a device to be controlled by the first sequence program, and to these sequence programs. A control processing unit that performs sequence control processing based on the above, a processing result memory that stores the processing result of the first sequence program, and a pseudo output memory that stores the processing result of the second sequence program that captures the processing result. The programmable controller, wherein the control processing unit captures the content of the pseudo output memory as a control input into the first sequence program, performs program processing, and verifies operation.
【請求項2】 動作検証対象となる第1のシーケンスプ
ログラム、およびこの第1のシーケンスプログラムの制
御対象となる機器の動作を模擬した第2のシーケンスプ
ログラムを格納したプログラムメモリと、 これらシーケンスプログラムに基づいてシーケンス制御
処理を行う制御処理部と、 前記第1のシーケンスプログラムの処理結果を格納する
処理結果メモリと、 この処理結果を取り込んだ前記第2のシーケンスプログ
ラムの処理結果を格納する疑似出力メモリと、 この疑似出力メモリに格納された処理結果と前記第1の
シーケンスプログラムに取り込まれる入力信号とを論理
結合する論理結合手段とを備え、 前記制御処理部は前記論理合成結果を制御入力として前
記第1のシーケンスプログラムに取り込んでプログラム
処理をし、動作検証を行うことを特徴とするプログラマ
ブルコントローラ。
2. A program memory storing a first sequence program to be an operation verification target and a second sequence program simulating the operation of a device to be controlled by the first sequence program, and to these sequence programs. A control processing unit that performs sequence control processing based on the above, a processing result memory that stores the processing result of the first sequence program, and a pseudo output memory that stores the processing result of the second sequence program that captures the processing result. And a logic coupling means for logically coupling the processing result stored in the pseudo output memory and the input signal fetched into the first sequence program, wherein the control processing section uses the logical synthesis result as a control input. Import into the first sequence program, process the program, and Programmable controller and performing the verification.
【請求項3】 論理結合手段は、疑似出力メモリに格納
された処理結果と第1のシーケンスプログラムに取り込
まれる入力信号とを論理和することを特徴とする請求項
2に記載のプログラマブルコントローラ。
3. The programmable controller according to claim 2, wherein the logic combination means logically ORs the processing result stored in the pseudo output memory and the input signal fetched into the first sequence program.
【請求項4】 処理結果メモリと等価な内容であって、
この処理結果メモリとは異なる呼称名で記憶内容の書込
みが行われる疑似入力メモリを備え、この疑似入力メモ
リの内容を第2のシーケンスプログラムに取り込ますこ
とを特徴とする請求項1または2に記載のプログラマブ
ルコントローラ。
4. A content equivalent to a processing result memory,
The pseudo input memory in which the stored contents are written under a different name from the processing result memory, and the contents of the pseudo input memory are fetched into the second sequence program. Programmable controller.
【請求項5】 第2のシーケンスプログラムの実行/非
実行を選択するプログラム選択手段を備えたことを特徴
とする請求項1または2に記載のプログラマブルコント
ローラ。
5. The programmable controller according to claim 1, further comprising a program selection unit that selects execution / non-execution of the second sequence program.
【請求項6】 第1のシーケンスプログラムに取り込ま
す制御入力として、入力信号と第2のシーケンスプログ
ラムの処理結果である疑似出力メモリの内容との論理和
による合成信号か、或いは疑似出力メモリの内容を選択
するかの情報を入力信号の番号に対応して設定したパラ
メータメモリを備え、制御処理部は入力信号を取り込む
毎に前記パラメータメモリの設定情報を読み出して前記
第1のシーケンスプログラムに対する制御入力を選択す
ることを特徴とする請求項2または5に記載のプログラ
マブルコントローラ。
6. A control signal to be incorporated into the first sequence program, which is a composite signal obtained by a logical sum of an input signal and the content of the pseudo output memory which is the processing result of the second sequence program, or the content of the pseudo output memory. Is provided with a parameter memory in which information on whether to select is set corresponding to the number of the input signal, and the control processing unit reads the setting information of the parameter memory every time the input signal is fetched, and inputs the control input to the first sequence program. The programmable controller according to claim 2, wherein the programmable controller is selected.
【請求項7】 第2のシーケンスプログラムの非実行時
には論理結合を省略し、多数の入力信号を第1のシーケ
ンスプログラムに対する制御入力として扱うプログラム
制御手段を備えたことを特徴とする請求項2または5に
記載のプログラマブルコントローラ。
7. A program control means for omitting logical connection when the second sequence program is not executed and for handling a large number of input signals as control inputs to the first sequence program. 5. The programmable controller according to item 5.
JP28074695A 1995-10-27 1995-10-27 Programmable controller Pending JPH09128013A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28074695A JPH09128013A (en) 1995-10-27 1995-10-27 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28074695A JPH09128013A (en) 1995-10-27 1995-10-27 Programmable controller

Publications (1)

Publication Number Publication Date
JPH09128013A true JPH09128013A (en) 1997-05-16

Family

ID=17629387

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28074695A Pending JPH09128013A (en) 1995-10-27 1995-10-27 Programmable controller

Country Status (1)

Country Link
JP (1) JPH09128013A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092061A (en) * 2004-09-22 2006-04-06 Meidensha Corp Duplex system of programmable controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092061A (en) * 2004-09-22 2006-04-06 Meidensha Corp Duplex system of programmable controller

Similar Documents

Publication Publication Date Title
EP0586813B1 (en) Programmable controller with ladder diagram macro instructions
JPH10143221A (en) System and method for supporting development of equipment control program
JPH09128013A (en) Programmable controller
JPH11272310A (en) Emulation device for programmable controller
JPH0327926B2 (en)
JPH0410081B2 (en)
JPS5942884B2 (en) Sequence control program debugging device
JPS58178408A (en) Programmable controller having simulating function
JP3325397B2 (en) Simulation system for programs executed by programmable controllers
JP3269164B2 (en) Peripheral device of programmable controller
JPH09330250A (en) Program simulator
JP2001306150A (en) Operation setting table which sets operation state of shaft control motor and control board which controls the shaft control motor by the operation setting table
JPH11134010A (en) Program executing method of programmable controller
JP2002244722A (en) Plant control system
JPS5949609A (en) Programmable controller equipped with simulation performing function
JP3871459B2 (en) Programmable display device
JPH0736516A (en) Simulating device
JPS61105606A (en) Sequence controller
JPH11134008A (en) Programmable controller
KR100423742B1 (en) Exclusive control system by sequential function chart
JP2003122408A (en) Method of preparing data for control system
JP3413860B2 (en) Debug method
JPH02138606A (en) Programmable controller
JPH0895610A (en) Programmable controller
JPS63225803A (en) Programmable controller