JP3493525B2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JP3493525B2
JP3493525B2 JP33641393A JP33641393A JP3493525B2 JP 3493525 B2 JP3493525 B2 JP 3493525B2 JP 33641393 A JP33641393 A JP 33641393A JP 33641393 A JP33641393 A JP 33641393A JP 3493525 B2 JP3493525 B2 JP 3493525B2
Authority
JP
Japan
Prior art keywords
storage area
signal
input
output
stored
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
Application number
JP33641393A
Other languages
Japanese (ja)
Other versions
JPH07199795A (en
Inventor
克二 豊岡
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.)
Koyo Electronics Industries Co Ltd
Original Assignee
Koyo Electronics Industries Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koyo Electronics Industries Co Ltd filed Critical Koyo Electronics Industries Co Ltd
Priority to JP33641393A priority Critical patent/JP3493525B2/en
Publication of JPH07199795A publication Critical patent/JPH07199795A/en
Application granted granted Critical
Publication of JP3493525B2 publication Critical patent/JP3493525B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、別々に管理されたプロ
グラムを同時並列処理するプログラマブルコントローラ
(以下、「PC」という)に関するものである。 【0002】 【従来の技術及び発明が解決しようとする課題】一般的
なPCのプログラムの構造は、繰り返し走査されて演算
処理されるメインプログラムに、タイマ割り込や外部か
らの割り込みによって起動されるプログラムを付け加え
た形になっている。このようなPCのシーケンスプログ
ラムを作成する場合には、個々の出力条件を一連のプロ
グラムの中に組み込まなければならないのでプログラム
が複雑になったり、また出力条件とは関係のないプログ
ラムの変更などがあった場合でもその影響を受けるた
め、プログラムの変更作業に時間を要し、しかも変更ミ
スを起こし易かった。また、作成されたシーケンスプロ
グラムが複雑、かつ膨大な量の場合には、前述したよう
にそのプログラムが一本化されているために一走査に時
間を要し、高速化を図ることができなかった。 【0003】また、一般的なプログラマブルコントロー
ラでは、ビット信号のオン・オフ状態を格納する記憶領
域は一つであり、条件演算で参照する領域が演算結果の
書き込みにより影響を受けることからプログラムの書き
順によりプログラムの実行結果が影響を受けるため、そ
のことを考慮してプログラムの作成を行わなければなら
なかった。 【0004】さらに、例えば、図5(a)に示すように
モータの正転・逆転のような出力を連続したステージに
プログラムした場合、一走査分重なって出力されるた
め、ラダーのように出力条件命令を付けて回避している
が、プログラムが複雑になっていた。また同図(b)を
プログラムした場合、ステージS5がオンしてその入力
I5が既にオンしていたとき、外部でのステージ条件を
使用していた場合によく起こるトラブルで、ステージ1
0で使用している入力I5の条件が一走査もオンしない
ことがあった。 【0005】本発明は、このような課題を解決するため
になされたもので、装置が安全に動作するために必要な
条件及びその処理プログラムと通常のプログラムとを切
り離して別個管理できるようにして、プログラムの変更
等の管理レベルの細分化を可能にすると共に、別々に管
理されたプログラムを並列に高速処理できるPC、ま
た、プログラムの書き順によってプログラムの実行結果
が影響を受けることのないPCを得ることを目的とす
る。 【0006】 【課題を解決するための手段】本発明に係るプログラマ
ブルコントローラは、メインプログラムが格納される第
1記憶部と、2系統の入出力端子が設けられ、入力信号
と出力信号及び内部信号とが格納される書き込み用記憶
領域、及びその書き込み用記憶領域に格納された前記入
出力信号及び内部信号が書き写される読み出し用記憶領
域を有する第2記憶部と、入出力判定処理プログラムが
格納される第3記憶部と、メインプログラムを第2記憶
部の読み出し用記憶領域内の入出力信号及び内部信号を
参照しつつ実行・演算し、その演算結果の出力信号及び
内部信号をその第2記憶部の書き込み用記憶領域に格納
する第1CPUと、この第1CPUがメインプログラム
を実行している間に、入出力判定処理プログラムを第2
記憶部の読み出し用記憶領域内の入出力信号及び内部信
号を参照しつつ実行し、そのプログラムの実行により、
第2記憶部の読み出し用記憶領域に書き写された出力信
号を外部に転送する際には、その出力信号が所定の条件
を満たしているかどうかを判定し、前記条件を満たして
いるときはそのまま外部に転送し、前記条件を満たして
いないときは所定の演算処理を行ってその異常に対応し
た信号を生成して外部に転送し、また、外部からの入力
信号を読み取ったときは第2記憶部の書き込み用記憶領
域に格納する第2CPUとを備え、第1CPUは、メイ
ンプログラムの演算処理を終了する度に、第2記憶部の
書き込み用記憶領域に格納した出力信号と内部信号、及
び第2CPUによりその書き込み用記憶領域に格納され
た入力信号を第2記憶部の読み出し用記憶領域に書き写
す。 【0007】 【作用】本発明においては、第1CPUは、メインプロ
グラムの演算処理を終了する度に、第2記憶部の書き込
み用記憶領域に格納した出力信号と内部信号、及び第2
CPUにより格納された入力信号をその第2記憶部の読
み出し用記憶領域に書き写し、第2CPUは、第1CP
Uがメインプログラムを実行している間に、入出力判定
処理プログラムを第2記憶部の読み出し用記憶領域内の
入出力信号及び内部信号を参照しつつ実行する。 【0008】 【0009】 【実施例】図1は本発明の一実施例に係るPCのCPU
モジュールのハード構成を示すブロック図、図2は双方
向RAMの構成図、図3は2CPUが双方向RAMにア
クセスするタイミングを示すタイミングチャート、図4
は本実施例の動作を説明するためのフローチャートであ
る。 【0010】図において、1はPCのCPUモジュー
ル、2はメインプログラムが格納されている本発明の第
1記憶部のRAM、3は第2記憶部の一例を示す双方向
RAMで、図2に示すようにCPU6によって書き込ま
れる外部の入力信号及びCPU4のメインプログラム実
行・演算による出力信号と内部信号が格納される書き込
み用記憶領域と、その書き込み用記憶領域に格納された
その入出力信号及び内部信号が書き写される読み出し用
記憶領域とを備えている。 【0011】前記のCPU4は、本発明の第1CPUの
機能を有し、ROM5に格納されたシステムプログラム
に基づいてRAM2のメインプログラムを実行・演算す
る。メインプログラム演算の際、図3に示すように関連
する入出力信号及び内部信号を双方向RAM3の読み出
し用記憶領域から読み出して参照し、その演算結果の出
力信号及び内部信号を双方向RAM3の書き込み用記憶
領域に格納する。そして、メインプログラムの一走査が
終了すると、双方向RAM3の書き込み用記憶領域に格
納した出力信号及び内部信号を読み出し用記憶領域に書
き写す。このとき、CPU6によって格納される外部の
入力信号も読み出し用記憶領域に書き写す。この転送処
理が終了すると、再び、読み出し用記憶領域に書き写し
た入出力信号及び内部信号を参照しつつメインプログラ
ムを実行・演算し、その結果の出力信号及び内部信号を
書き込み用記憶領域に格納する。このように、メインプ
ログラを一走査終了する毎に書き込み用記憶領域に格納
した各信号を読み出し用記憶領域に書き写すようになっ
ている。 【0012】CPU6は、本発明の第2CPUの機能を
有し、CPU4がメインプログラムを実行している間、
ROM7に格納されたシステムプログラムに基づいてR
AM8(第3記憶部)の入出力判定処理プログラムを実
行する。読み出し用記憶領域に書き写された出力信号を
外部に転送する際、図3に示すようにその出力信号が所
定の条件を満たしているかどうかを判定するために必要
な入出力信号及び内部信号を読み出し用記憶領域から読
み出す。条件を満たしているときには入出力用IF(イ
ンタフェース)10を介して出力モジュール21にその
まま転送し、前記条件を満たしていないときには、所定
の演算処理を行って当該異常に対応する信号を生成し、
入出力用IF10を介して出力モジュール21に転送す
る。また、CPU6は、入力モジュール20を介して入
出力用IF10に信号が入力されると、その入力信号を
出力信号に関連する事項として読み取む。このとき、入
力信号に異常ありと判断したときには例えばPC一時停
止あるいは停止処理を行うためのポーズ状態にして双方
向RAM3の書き込み用記憶領域に格納する。 【0013】なお、前述した入出力判定処理プログラム
は、入出力信号がそれぞれに条件を満たしているかどう
かを判定するためのプログラムと、条件を満たしていな
いときにその異常に対応した処理を施すためのプログラ
ムとから構成され、以下に示す内容がプログラム化され
ている。 (A)PCの運転状態やプログラム実行の全体又は部
分、或いは出力動作の全体又は部分を制御する条件とそ
の場合の制御内容。 (B)出力ON(又はOFF)動作の正常/異常判定条
件。動作確認信号と動作監視時間。インタロック条件
(動作条件/禁止条件)。 (C)出力動作異常判定時の処理内容。 【0014】9はユーザがアプリケーションで使用する
リード/ライトの対象の数値や文字等のデータが格納さ
れるRAM、11は表示装置22と接続されたIFで、
この表示装置22は、双方向RAM3の読み出し用記憶
領域に書き写されるそれぞれの信号を逐次表示するよう
になっている。 【0015】前記のように構成されたPCにおいて図4
のフローチャートに基づいて動作を説明する。ここでは
説明の便宜上、RUN開始処理(初期設定)が終了し、
さらにはCPU4がRAM2のメインプログラムを一走
査終了したものとする(S1〜S6)。このとき、CP
U4は、双方向RAM3の書き込み用記憶領域に格納し
た出力信号及び内部信号と、CPU6によって格納され
た外部の入力信号を読み出し用記憶領域にそれぞれ書き
写す(S7)。そして、再びメインプログラムの実行を
開始し(S1)、プログラムの命令がビット処理命令の
ときには(S2)、その命令に従って演算してその結果
を双方向RAM3の書き込み用記憶領域に格納し(S
3)、また命令が条件命令のときには(S2)、それに
関連する入出力信号及び内部信号を読み出し用記憶領域
から読み出して参照する(S4)。そして、プログラム
命令がEND命令かどうかを判定する(S5)。END
命令のときはステップ6に進が、END命令でないとき
はステップ2に戻って命令に従う。この一連の動作は、
メインプログラムの命令に従って順次に行い、その演算
結果の出力及び内部信号を書き込み用記憶領域に格納し
ていく(S2〜S5)。 【0016】このとき、CPU6は、双方向RAM3の
読み出し用記憶領域に格納された出力信号及び外部から
入力される信号をRAM8に格納されている入出力判定
処理プログラムに基づいて処理しており、双方向RAM
3の読み出し用記憶領域に格納された出力信号を外部に
転送するとき、読み出し用記憶領域に書き写された関連
の入出力信号及び内部信号を参照しながらその出力信号
が所定の条件を満たしているかどうかを判定する(S1
1)。条件を満たしているときにはそのままの状態で入
出力用I/F10を介して出力モジュール21に転送し
(S12)、また条件を満たしていないときには、所定
の演算処理を行って当該異常に対応した信号を生成し
て、その信号を入出力用I/F10を介して出力モジュ
ール21に転送する(S12)。 【0017】そして、出力信号に対する応答の信号が入
力モジュール20に入力されると、CPU6は、その入
力信号を取り込み(S13)、所定の条件を満たしてい
るかどうかを、その信号に関連する入出力信号及び内部
信号を参照しながら判断する(S14)。条件を満たし
ているときにはそのままの状態を双方向RAM3の書き
込み用記憶領域に格納し、条件を満たしていないときに
は、例えばPC一時停止をさせるためのポーズ状態にし
て書き込み用記憶領域に格納する。このとき、読み出し
用記憶領域に格納されている入出力信号及び内部信号の
内容がI/F11を介して表示装置22に表示される。 【0018】一方、CPU4が、メインプログラム実行
中にEND命令を確認すると(S5)、そのプログラム
の実行を終了し(S6)、双方向RAM3の書き込み用
記憶領域に書き込んだ演算結果の出力及び内部信号とC
PU6によって書き込まれた入力信号とを双方向RAM
3の読み出し用記憶領域に書き写し(S7)、CPU6
と共に前記と同様の動作を繰り返し行う。 【0019】なお、前記の実施例では、双方向RAM3
に書き込み用記憶領域と読み出し用記憶領域とを設け、
その書き込み用記憶領域に書き込んだ各信号を読み出し
用記憶領域に書き写すことについて例示したが、書き込
み用のインデックスレジスタと読み出し用のインデック
スレジスタを準備し、メインプログラム走査毎に書き込
み用と読み出し用のインデックスアドレスデータを入れ
変えるようにしてもよい。また、書き込み用記憶領域に
書き込んだ各信号を読み出し用記憶領域に書き写す機能
をCPU6に持たせてもよい。この場合、CPU4がメ
インプログラムの実行を終了したときにその旨を知らせ
る信号をCPU6に出力して信号書き写しのタイミング
を与えるようにする。 【0020】 【発明の効果】以上のように本発明によれば、メインプ
ログラムと入出力判定処理プログラムとをそれぞれ分離
して独立に管理するようにしたので、動作順等の変更が
必要になった場合でも変わらない入出力判定処理プログ
ラムを別個管理することができ、プログラムの変更等の
管理レベルの細分化が可能になり、さらには、メインプ
ログラムにインタロックや監視時間等の安全回路を入れ
る必要がなくなったために、シーケンス変更によるプロ
グラム変更の作業が容易になるという効果が得られてい
る。 【0021】また、第2記憶部の双方向RAMに書き込
み用記憶領域と読み出し用記憶領域とを設けたため、以
下の通りの効果が得られている。 (1)2つのCPUがそれぞれのプログラムを同時に並
列処理でき、しかも高速走査が可能になっている。 (2)メイプログラム実行中、読み出し用記憶領域内の
各種信号が変化しないため、プログラムの書き順による
動作の違いが生じなくなり、オルタネート動作等のプロ
グラムを簡単に作ることができる。また表示部が実際の
状況を表示することができる。 (3)また、正転、逆転のような出力を連続したステー
ジにプログラムした場合でも、前の出力(オフ)が読み
出し用記憶領域に、後の出力(オン)が書き込み用記憶
領域に格納される形となるので、従来のように出力条件
命令を付けるという複雑なプログラムを要しない。さら
に、ステージの移行条件が最初から成立していた場合、
外部でそのステージ条件を使用していた場合によく起こ
るトラブル、すなわちステージを通過したのにステージ
条件が一走査もオンしないということがなくなってい
る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller (hereinafter, referred to as a "PC") for simultaneously and separately processing programs managed separately. 2. Description of the Related Art A general PC program has a main program which is repeatedly scanned and operated by a timer interrupt or an external interrupt. It has a program added. When creating such a PC sequence program, each output condition must be incorporated into a series of programs, which complicates the program, and changes in the program that are not related to the output condition require changes. Even if it did, the program was affected, so it took time to change the program, and it was easy to make a mistake. In addition, when the created sequence program is complex and huge, as described above, the program is unified, so that one scan requires time and high speed cannot be achieved. Was. In a general programmable controller, there is only one storage area for storing on / off states of bit signals, and an area referred to in a conditional operation is affected by writing of an operation result. Since the execution result of the program is affected by the order, the program must be created in consideration of that. Further, for example, as shown in FIG. 5 (a), when outputs such as forward and reverse rotations of a motor are programmed in a continuous stage, the output is overlapped by one scan, so that the output is like a ladder. It was avoided by adding a conditional instruction, but the program was complicated. Also, when programming the same figure (b), when the stage S5 is turned on and its input I5 is already on, a trouble often occurs when an external stage condition is used.
In some cases, the condition of input I5 used at 0 did not turn on even one scan. SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems. The present invention has been made so that conditions necessary for safe operation of an apparatus and its processing program can be separately managed from a normal program. , A PC that enables the management level to be subdivided, such as a change of a program, and that can separately process a separately managed program at high speed, and a PC in which the execution order of the program is not affected by the writing order of the program The purpose is to obtain. A programmable controller according to the present invention is provided with a first storage unit for storing a main program, two input / output terminals, and an input signal, an output signal, and an internal signal. And a second storage unit having a read storage area in which the input / output signal and the internal signal stored in the write storage area are stored. A third storage unit to be stored and a main program are executed and operated by referring to input / output signals and internal signals in a read storage area of the second storage unit, and an output signal and an internal signal of the operation result are output to the third storage unit. A first CPU stored in a write storage area of a second storage unit, and an input / output determination processing program stored in a second CPU while the first CPU is executing a main program.
Execute while referring to the input / output signals and internal signals in the read storage area of the storage unit, and by executing the program,
When transferring the output signal written in the read storage area of the second storage unit to the outside, it is determined whether or not the output signal satisfies a predetermined condition. When the above condition is not satisfied, a predetermined arithmetic processing is performed to generate a signal corresponding to the abnormality and the signal is transferred to the outside, and when an external input signal is read, a second memory is stored. And a second CPU that stores the output signal and the internal signal stored in the write storage area of the second storage unit each time the first CPU finishes the arithmetic processing of the main program. The input signal stored in the write storage area by the 2CPU is copied to the read storage area of the second storage unit. In the present invention, each time the first CPU terminates the arithmetic processing of the main program, the first CPU outputs the output signal and the internal signal stored in the write storage area of the second storage section, and outputs the second signal.
The input signal stored by the CPU is copied to the read storage area of the second storage unit, and the second CPU
While U is executing the main program, the input / output determination processing program is executed while referring to the input / output signals and the internal signals in the read storage area of the second storage unit. FIG. 1 shows a CPU of a PC according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a hardware configuration of the module, FIG. 2 is a configuration diagram of a bidirectional RAM, FIG. 3 is a timing chart showing timings at which two CPUs access the bidirectional RAM, and FIG.
9 is a flowchart for explaining the operation of the present embodiment. In the figure, 1 is a CPU module of a PC, 2 is a RAM of a first storage unit of the present invention in which a main program is stored, and 3 is a bidirectional RAM showing an example of a second storage unit. As shown, an external input signal written by the CPU 6, an output signal by execution and calculation of the main program of the CPU 4, and an internal signal are stored in the write storage area, and the input / output signal and the internal signal stored in the write storage area are stored. A read storage area to which signals are written. The CPU 4 has the function of the first CPU of the present invention, and executes and calculates the main program of the RAM 2 based on the system program stored in the ROM 5. At the time of the main program operation, as shown in FIG. 3, related input / output signals and internal signals are read out from the read storage area of the bidirectional RAM 3 and referred to, and output signals and internal signals of the operation result are written into the bidirectional RAM 3. In the storage area for When one scan of the main program is completed, the output signal and the internal signal stored in the write storage area of the bidirectional RAM 3 are copied to the read storage area. At this time, the external input signal stored by the CPU 6 is also copied to the read storage area. When this transfer processing is completed, the main program is executed and operated again with reference to the input / output signals and internal signals copied to the read storage area, and the resulting output signals and internal signals are stored in the write storage area. . In this way, each time the main program completes one scan, the signals stored in the write storage area are copied to the read storage area. The CPU 6 has the function of the second CPU of the present invention, and while the CPU 4 is executing the main program,
R based on the system program stored in the ROM 7
The input / output determination processing program of AM8 (third storage unit) is executed. When the output signal written to the read storage area is transferred to the outside, as shown in FIG. 3, input / output signals and internal signals necessary to determine whether the output signal satisfies a predetermined condition are determined. Read from the read storage area. When the condition is satisfied, the data is transferred to the output module 21 via the input / output IF (interface) 10 as it is. When the condition is not satisfied, a predetermined arithmetic processing is performed to generate a signal corresponding to the abnormality,
The data is transferred to the output module 21 via the input / output IF 10. When a signal is input to the input / output IF 10 via the input module 20, the CPU 6 reads the input signal as an item related to the output signal. At this time, when it is determined that the input signal is abnormal, the input signal is stored in the write storage area of the bidirectional RAM 3, for example, in a pause state for temporarily stopping the PC or performing a stop process. The above-mentioned input / output determination processing program is a program for determining whether each input / output signal satisfies a condition, and a program for performing processing corresponding to the abnormality when the condition is not satisfied. And the following contents are programmed. (A) Conditions for controlling the operating state of the PC, the whole or part of the program execution, or the whole or part of the output operation, and the control contents in that case. (B) Normal / abnormal judgment condition of output ON (or OFF) operation. Operation check signal and operation monitoring time. Interlock condition (operating condition / prohibiting condition). (C) Processing details at the time of output operation abnormality determination. Reference numeral 9 denotes a RAM for storing data such as numerical values and characters to be read / written by a user in an application, and 11 denotes an IF connected to a display device 22.
The display device 22 sequentially displays each signal written to the read storage area of the bidirectional RAM 3. In the PC constructed as described above, FIG.
The operation will be described based on the flowchart of FIG. Here, for convenience of explanation, the RUN start processing (initial setting) ends,
It is also assumed that the CPU 4 has completed one scan of the main program in the RAM 2 (S1 to S6). At this time, CP
U4 writes the output signal and the internal signal stored in the write storage area of the bidirectional RAM 3 and the external input signal stored by the CPU 6 to the read storage area, respectively (S7). Then, execution of the main program is started again (S1). When the instruction of the program is a bit processing instruction (S2), the operation is performed according to the instruction and the result is stored in the write storage area of the bidirectional RAM 3 (S1).
3) If the instruction is a conditional instruction (S2), the input / output signal and the internal signal related thereto are read from the read storage area and referenced (S4). Then, it is determined whether the program instruction is an END instruction (S5). END
When the instruction is an instruction, the process proceeds to step 6, and when the instruction is not the END instruction, the process returns to step 2 and follows the instruction. This series of actions
The operation is sequentially performed according to the instruction of the main program, and the output of the operation result and the internal signal are stored in the write storage area (S2 to S5). At this time, the CPU 6 processes the output signal stored in the read storage area of the bidirectional RAM 3 and the signal input from the outside based on the input / output determination processing program stored in the RAM 8. Bidirectional RAM
3, when the output signal stored in the read storage area is transferred to the outside, the output signal satisfies a predetermined condition while referring to the related input / output signal and the internal signal written in the read storage area. (S1)
1). If the condition is satisfied, the signal is transferred to the output module 21 via the input / output I / F 10 as it is (S12). If the condition is not satisfied, a predetermined arithmetic processing is performed to output a signal corresponding to the abnormality. Is generated, and the signal is transferred to the output module 21 via the input / output I / F 10 (S12). When a response signal to the output signal is input to the input module 20, the CPU 6 fetches the input signal (S13) and determines whether or not a predetermined condition is satisfied. The determination is made with reference to the signal and the internal signal (S14). When the condition is satisfied, the state is stored as it is in the write storage area of the bidirectional RAM 3, and when the condition is not satisfied, for example, a pause state for temporarily stopping the PC is stored in the write storage area. At this time, the contents of the input / output signal and the internal signal stored in the read storage area are displayed on the display device 22 via the I / F 11. On the other hand, when the CPU 4 confirms the END instruction during the execution of the main program (S5), the execution of the program is terminated (S6), and the output of the operation result written in the write storage area of the bidirectional RAM 3 and the internal Signal and C
The input signal written by PU6 and the bidirectional RAM
3 is copied to the read storage area (S7), and the CPU 6
At the same time, the same operation as described above is repeated. In the above embodiment, the bidirectional RAM 3
Is provided with a storage area for writing and a storage area for reading,
Although the example of copying each signal written to the write storage area to the read storage area has been described above, an index register for writing and an index register for reading are prepared, and an index for writing and an index for reading are prepared every main program scan. The address data may be replaced. Further, the CPU 6 may have a function of copying each signal written in the write storage area to the read storage area. In this case, when the CPU 4 finishes executing the main program, a signal notifying the end is output to the CPU 6 so as to give a timing of signal copying. As described above, according to the present invention, the main program and the input / output determination processing program are separately managed independently of each other, so that it is necessary to change the operation order and the like. The input / output judgment processing program that does not change even if the program is changed can be separately managed, and the management level can be divided, such as a change in the program, and a safety circuit such as an interlock and monitoring time can be included in the main program. Since the necessity is eliminated, the effect of facilitating the work of changing the program by changing the sequence is obtained. Further, since the write storage area and the read storage area are provided in the bidirectional RAM of the second storage section, the following effects are obtained. (1) Two CPUs can process each program simultaneously in parallel, and high-speed scanning is possible. (2) Since various signals in the read storage area do not change during execution of the main program, there is no difference in operation due to the writing order of the program, and a program such as an alternate operation can be easily created. Further, the display unit can display an actual situation. (3) Even when outputs such as normal rotation and reverse rotation are programmed in successive stages, the previous output (OFF) is stored in the read storage area, and the subsequent output (ON) is stored in the write storage area. Therefore, there is no need for a complicated program for attaching an output condition instruction as in the related art. In addition, if the stage transition conditions were met from the beginning,
The trouble that often occurs when the stage condition is used externally, that is, that the stage condition does not turn on even one scan after passing through the stage is eliminated.

【図面の簡単な説明】 【図1】本発明の一実施例に係るPCのCPUモジュー
ルのハード構成を示すブロック図である。 【図2】双方向RAMの構成図である。 【図3】2CPUが双方向RAMにアクセスするタイミ
ングを示すタイミングチャートである。 【図4】本実施例の動作を説明するためのフローチャー
トである。 【図5】従来の課題を説明するための説明図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a hardware configuration of a CPU module of a PC according to one embodiment of the present invention. FIG. 2 is a configuration diagram of a bidirectional RAM. FIG. 3 is a timing chart showing the timing at which the two CPUs access the bidirectional RAM. FIG. 4 is a flowchart for explaining the operation of the present embodiment. FIG. 5 is an explanatory diagram for explaining a conventional problem.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G05B 19/05 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) G05B 19/05

Claims (1)

(57)【特許請求の範囲】 【請求項1】 メインプログラムが格納される第1記憶
部と、 2系統の入出力端子が設けられ、入力信号と出力信号及
び内部信号とが格納される書き込み用記憶領域、及びそ
の書き込み用記憶領域に格納された前記入出力信号及び
内部信号が書き写される読み出し用記憶領域を有する第
2記憶部と、 入出力判定処理プログラムが格納される第3記憶部と、前記の メインプログラムを前記第2記憶部の読み出し用
記憶領域内の入出力信号及び内部信号を参照しつつ実行
・演算し、その演算結果の出力信号及び内部信号をその
第2記憶部の書き込み用記憶領域に格納する第1CPU
と、この第1CPUがメインプログラムを実行している間
に、前記の入出力判定処理プログラムを前記第2記憶部
の読み出し用記憶領域内の入出力信号及び内部信号を参
照しつつ実行し、そのプログラムの実行により、前記第
2記憶部の読み出し用記憶領域に書き写された前記出力
信号を外部に転送する際には、その出力信号が所定の条
件を満たしているかどうかを判定し、前記条件を満たし
ているときはそのまま外部に転送し、前記条件を満たし
ていないときは所定の演算処理を行って当該異常に対応
した信号を生成して外部に転送し、また、外部からの入
力信号を読み取ったときは前記第2記憶部の書き込み用
記憶領域に格納する 第2CPUとを備え、前記第1CPUは、前記のメインプログラムの演算処理
を終了する度に、前記第2記憶部の書き込み用記憶領域
に格納した出力信号と内部信号、及び前記第2CPUに
よりその書き込み用記憶領域に格納された入力信号を前
記第2記憶部の読み出し用記憶領域に書き写す ことを特
徴とするプログラマブルコントローラ。
(57) [Claim 1] A first storage section in which a main program is stored, and two input / output terminals are provided, and an input signal and an output signal are stored.
And a write storage area in which an internal signal is stored , and the input / output signal stored in the write storage area and
A second storage unit having a read storage area in which an internal signal is written , a third storage unit storing an input / output determination processing program, and the main program stored in the read storage area of the second storage unit . the 1CPU the input and output signals and executing, calculated with reference to the internal signal, stores the output signal and an internal signal of the operation result to the write memory area of the <br/> second storage unit
While the first CPU is executing the main program.
The input / output determination processing program is stored in the second storage unit.
Refer to the input / output signals and internal signals in the read storage area.
While executing the program, and by executing the program,
2 The output copied to the read storage area of the storage unit
When transferring a signal to the outside, the output signal
Judge whether the condition is satisfied and satisfy the above conditions
Transfer to the outside as it is, satisfying the above conditions
If not, perform the specified calculation to deal with the abnormality
Generated signals are transferred to the outside, and input from outside
When the force signal is read, it is used for writing in the second storage unit.
A second CPU for storing the data in a storage area , wherein the first CPU performs arithmetic processing of the main program.
Every time is completed, the write storage area of the second storage unit
Output signal and internal signal stored in the second CPU
Input signal stored in the write storage area
A programmable controller for writing data to a read storage area of the second storage unit .
JP33641393A 1993-12-28 1993-12-28 Programmable controller Expired - Fee Related JP3493525B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33641393A JP3493525B2 (en) 1993-12-28 1993-12-28 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33641393A JP3493525B2 (en) 1993-12-28 1993-12-28 Programmable controller

Publications (2)

Publication Number Publication Date
JPH07199795A JPH07199795A (en) 1995-08-04
JP3493525B2 true JP3493525B2 (en) 2004-02-03

Family

ID=18298876

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33641393A Expired - Fee Related JP3493525B2 (en) 1993-12-28 1993-12-28 Programmable controller

Country Status (1)

Country Link
JP (1) JP3493525B2 (en)

Also Published As

Publication number Publication date
JPH07199795A (en) 1995-08-04

Similar Documents

Publication Publication Date Title
JP2526688B2 (en) Programmable controller and partial execution method of sequence program
JP2875842B2 (en) Programmable controller
JPH04133102A (en) Programmable controller and its control method
JP3493525B2 (en) Programmable controller
US4807178A (en) Programmable sequence controller having indirect and direct input/output apparatus
JPH08243276A (en) Sewing machine control device and control method thereof
JPS6410854B2 (en)
KR950005523B1 (en) Step-run processing method of programmable logic controller
JP3024719B2 (en) Arithmetic processing method of programmable controller
JP2687476B2 (en) Vector data processing device
JP2621477B2 (en) In-circuit emulator
JP3171615B2 (en) Data transfer retry control method
JP2803394B2 (en) Servo motor control device
JPH0635757A (en) Abnormality detector of cpu
JPH05173832A (en) Trace control mechanism
JPH0159608B2 (en)
JPS595931B2 (en) Address stop method for arithmetic processing system
JPH1153224A (en) Watch dog timer and microcomputer
JPS63126007A (en) Programmable controller
JPS58221405A (en) Programmable controller
JPS62241041A (en) Information processor
JPH0553790A (en) Method and device for protecting controller memory
JPH07253908A (en) Memory access device
JPH0154729B2 (en)
JPS59168552A (en) Preventing system for runaway due to retry of program

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081121

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081121

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091121

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees