JPH08161010A - Ladder sequence program arithmetic unit - Google Patents

Ladder sequence program arithmetic unit

Info

Publication number
JPH08161010A
JPH08161010A JP29823994A JP29823994A JPH08161010A JP H08161010 A JPH08161010 A JP H08161010A JP 29823994 A JP29823994 A JP 29823994A JP 29823994 A JP29823994 A JP 29823994A JP H08161010 A JPH08161010 A JP H08161010A
Authority
JP
Japan
Prior art keywords
network
ladder
execution
address
flag
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
JP29823994A
Other languages
Japanese (ja)
Inventor
Norihiro Yamaki
憲裕 山木
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.)
Sharp Corp
Sharp Manufacturing Systems Corp
Original Assignee
Sharp Corp
Sharp Manufacturing Systems 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 Sharp Corp, Sharp Manufacturing Systems Corp filed Critical Sharp Corp
Priority to JP29823994A priority Critical patent/JPH08161010A/en
Publication of JPH08161010A publication Critical patent/JPH08161010A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE: To shorten the time of processing for ladder sequence operation by skipping the addresses of other networks when it is judged that a network execution flag is set, indicating head address information on the network to be executed next, and resetting the network execution flag. CONSTITUTION: When it is judged that the network execution flag A40 is set, the addresses of other networks for which network execution flags 40 are not set are skipped and the head address information A39 on the network to be executed for which the network execution flag 40 is set is indicated. Then the indicated head address information A39 is moved to the execution address of a central arithmetic processor and when operation is done, the network flag 40 of the network which has done the operation is reset. Consequently, the processing time of the ladder sequence operation can be shortened.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、プログラマブルコント
ローラ(PC)やNC(数値制御)装置などに用いられ
るラダーシーケンスプログラム演算装置に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a ladder sequence program arithmetic unit used for a programmable controller (PC), an NC (numerical control) unit or the like.

【0002】[0002]

【従来の技術】ラダーシーケンスプログラムを演算する
装置のうち、ここでの従来例は、プログラマブルコント
ローラを取り上げて説明する。
2. Description of the Related Art Among devices for calculating a ladder sequence program, a conventional example here will be described by taking a programmable controller.

【0003】一般的なプログラマブルコントローラPC
は、図1のように構成されている。
General programmable controller PC
Are configured as shown in FIG.

【0004】入力部A11は制御対象となる外部機器か
らの状態信号や動作指令信号を取り込むインターフェイ
スである。中央演算処理装置(CPU)A12はプログ
ラマブルコントローラPCの全体の動作をコントロール
するとともにラダーシーケンス演算を実行するものであ
る。システムプログラムメモリA13は中央演算処理装
置A12を動作制御するためのプログラムを格納するも
のである。シーケンスプログラムメモリA14はユーザ
ーがプログラミングした図11のようなラダーシーケン
スプログラム(ラダーシーケンス命令語)A18を格納
するものである。
The input section A11 is an interface for receiving a status signal and an operation command signal from an external device to be controlled. The central processing unit (CPU) A12 controls the entire operation of the programmable controller PC and executes the ladder sequence operation. The system program memory A13 stores a program for controlling the operation of the central processing unit A12. The sequence program memory A14 stores a ladder sequence program (ladder sequence command word) A18 as shown in FIG. 11 programmed by the user.

【0005】データメモリA15は入出力データや内部
データなどのラダーシーケンス演算に必要なデータを格
納するものである。出力部A16はラダーシーケンス演
算の結果得られた信号を制御対象となる外部機器のアク
チュエータや表示器に送出するインターフェイスであ
る。周辺装置インターフェイスA17はユーザープログ
ラミング装置やデータ通信装置などの周辺装置とデータ
のやりとりを行うインターフェイスである。
The data memory A15 stores data necessary for ladder sequence calculation such as input / output data and internal data. The output unit A16 is an interface that sends a signal obtained as a result of the ladder sequence calculation to an actuator or a display of an external device to be controlled. The peripheral device interface A17 is an interface for exchanging data with peripheral devices such as a user programming device and a data communication device.

【0006】図10はラダーシーケンス回路の回路図、
図11は図10に相応するラダーシーケンスプログラム
(ラダーシーケンス命令語)A18を示している。図1
0,図11中に記載されている「10」とか「11」と
か「100」とかの数値はデータメモリA15における
データメモリ番号(リレー番号)を示している。
FIG. 10 is a circuit diagram of a ladder sequence circuit,
FIG. 11 shows a ladder sequence program (ladder sequence command word) A18 corresponding to FIG. FIG.
The numerical value 0, “10”, “11”, or “100” described in FIG. 11 indicates the data memory number (relay number) in the data memory A15.

【0007】次に、上記構成のプログラマブルコントロ
ーラPCの動作について説明する。
Next, the operation of the programmable controller PC having the above configuration will be described.

【0008】例外処理は除いておおまかには図12のフ
ローチャートで示すような処理を行う。まず、制御対象
とする外部機器の状態信号や動作指令信号などのデータ
を入力部A11を介して取り込み、データメモリA15
に格納する(S01)。次いで、シーケンスプログラム
メモリA14に格納されている図11のようなラダーシ
ーケンスプログラムA18のラダーシーケンス命令を読
み出す(S02)。そして、S03〜S06により、前
記の入力したデータと読み出したラダーシーケンスプロ
グラムA18に基づいてラダーシーケンス演算を行う。
すなわち、まず、END命令かどうかを判断し(S0
3)、そうでなければ、データメモリA15からデータ
を読み出し(S04)、ラダーシーケンス命令に基づい
て演算を行ってその結果をデータメモリA15に格納し
(S05)、次のラダーシーケンス命令の読み出しを行
い(S06)、その後にステップS03へ戻る。このス
テップS03〜S06がラダーシーケンス演算である
が、このラダーシーケンス演算をEND命令がくるまで
繰り返し実行する。END命令により、ラダーシーケン
ス演算は終了し、出力すべきデータを出力部A16を介
して外部機器に出力する(S07)。そして、周辺装置
インターフェイスA17を介してユーザープログラミン
グ装置やデータ通信装置などの周辺装置との間でデータ
の授受を行う(S08)。
Roughly except for the exception processing, the processing shown in the flowchart of FIG. 12 is performed. First, data such as a status signal and an operation command signal of an external device to be controlled is fetched via the input unit A11, and the data memory A15
(S01). Next, the ladder sequence command of the ladder sequence program A18 as shown in FIG. 11 stored in the sequence program memory A14 is read (S02). Then, in S03 to S06, the ladder sequence calculation is performed based on the input data and the read ladder sequence program A18.
That is, first, it is judged whether or not it is the END instruction (S0
3) Otherwise, read the data from the data memory A15 (S04), perform the operation based on the ladder sequence instruction, store the result in the data memory A15 (S05), and read the next ladder sequence instruction. Perform (S06), and then return to step S03. These steps S03 to S06 are the ladder sequence operation, and this ladder sequence operation is repeatedly executed until the END instruction comes. The ladder sequence operation is completed by the END command, and the data to be output is output to the external device via the output unit A16 (S07). Then, data is exchanged with a peripheral device such as a user programming device or a data communication device via the peripheral device interface A17 (S08).

【0009】一般的に、フローチャートの先頭ステップ
S01から最後のステップS08までの1回分の処理の
ことを1スキャンと呼び、プログラマブルコントローラ
PCの演算方式として、このスキャンを繰り返して実行
することから、サイクリック演算と呼んでいる。
Generally, the process from the first step S01 to the last step S08 of the flow chart is called one scan, and this scan is repeatedly executed as an arithmetic method of the programmable controller PC. It is called a click operation.

【0010】ラダーシーケンス演算の部分であるステッ
プS03〜S06において、プログラマブルコントロー
ラPCはラダーシーケンス命令を最初から順に読み出
し、演算を実行している。終了命令または最終アドレス
部分の演算実行ののち、サブルーチン命令やジャンプ命
令などの飛び越し命令がなければ、すべてのプログラミ
ングされた命令を順番に演算実行する。
In steps S03 to S06, which are a part of the ladder sequence operation, the programmable controller PC reads the ladder sequence instructions in order from the beginning and executes the operation. After execution of the end instruction or the final address portion, if there is no jump instruction such as a subroutine instruction or a jump instruction, all programmed instructions are sequentially executed.

【0011】[0011]

【発明が解決しようとする課題】従来のプログラマブル
コントローラPCなどが行っているラダーシーケンス演
算は、入力情報や内部情報の変化に関係なく、ユーザー
によってプログラミングされたとおりに演算を実行して
いる。つまり、1つ前のスキャンにおいて入力した情報
や得られた内部情報の変化がない場合であっても、1つ
前のスキャンで実行したものと全く同じ演算を行い、そ
して全く同じ演算結果を得ることになる。
A ladder sequence operation performed by a conventional programmable controller PC or the like executes an operation as programmed by a user regardless of changes in input information and internal information. That is, even when there is no change in the information input in the previous scan or the obtained internal information, the same calculation as that executed in the previous scan is performed, and the same calculation result is obtained. It will be.

【0012】さらに、幾つかのスキャンにわたりこれら
の情報の変化がなかった場合には、同じ演算を何回も繰
り返し実行する。また、一部の入力情報や内部情報が変
化した場合についても、その変化した情報が関連する部
分はラダーシーケンスプログラム全体の中で少しの部分
にしか係わっていないことが多いにもかかわらず、その
係わりのないプログラム部分につき前と同じ演算を実行
し、同じ結果を得ている。すなわち、無用な演算を繰り
返し実行しているのである。
Furthermore, if there is no change in these information over several scans, the same operation is repeated many times. In addition, even if some input information or internal information changes, the part related to the changed information is often related to only a small part of the entire ladder sequence program. The same operation as before is executed for the unrelated program part and the same result is obtained. That is, useless calculations are repeatedly executed.

【0013】ところで、1スキャンを処理するのに要す
る時間を短くすれば入力から出力までの時間が短くな
り、制御に対する応答速度が向上する。また、スキャン
動作を繰り返すサイクリック演算の立場からみた場合、
スキャン時間が短くなれば単位時間当たりのスキャン回
数が増え、外部からの情報変化に対しての応答性が向上
する。従来では、使用する中央演算処理装置(CPU)
の高速化を図ることによって、このような応答性の向上
を図ってきた。しかし、CPUの高速化では、単位時間
当たりに上記した無用な演算をより多く実行しているこ
とになる。これでは、ラダーシーケンス演算以外の各種
の処理を開始するまでの待ち時間が長くなり、根本的な
問題解決とはなっていない。
By the way, if the time required to process one scan is shortened, the time from input to output is shortened and the response speed to control is improved. Also, from the viewpoint of cyclic calculation that repeats scanning operation,
When the scan time is shortened, the number of scans per unit time is increased, and the responsiveness to external information changes is improved. Conventionally, the central processing unit (CPU) used
The responsiveness has been improved by increasing the speed. However, when the CPU speed is increased, the above-mentioned useless calculations are executed more per unit time. This increases the waiting time until the start of various processes other than the ladder sequence calculation, and is not a fundamental solution to the problem.

【0014】本発明は、このような事情に鑑みて創案さ
れたものであって、入力情報や内部情報の変化に対して
必要な部分のみの演算は行うが無用な演算は行わないよ
うにすることにより、ラダーシーケンス演算の処理時間
を短縮化することを目的としている。
The present invention was devised in view of such circumstances, and performs only the necessary parts for changes in input information and internal information, but does not perform unnecessary operations. This aims to shorten the processing time of the ladder sequence calculation.

【0015】[0015]

【課題を解決するための手段】本発明に係るラダーシー
ケンスプログラム演算装置は、ラダーシーケンスプログ
ラムのうちの個々のラダーネットワークについてネット
ワーク番号を定めておき、そのネットワーク番号に対応
してそのネットワーク番号のラダーネットワークの先頭
アドレス情報を格納しておく手段と、各アドレスのデー
タが他のラダーネットワークでのデータと同じであると
きにそのアドレスに対応して次実行ネットワーク番号を
格納しておく手段と、入力情報の変化を検出する手段
と、内部情報の変化を検出する手段と、前記変化があっ
た情報部分に対して変化フラグをセットする手段と、前
記次実行ネットワーク番号の格納手段から該当する次実
行ネットワーク番号を読み出す手段と、読み出した次実
行ネットワーク番号が番号無しを示しているときに前記
変化フラグをリセットする手段と、前記変化フラグがセ
ットされているか否かを判断する手段と、前記変化フラ
グがセットされていると判断したときに、前記読み出し
た次実行ネットワーク番号に該当するネットワーク番号
に基づいて、前記先頭アドレス情報に関連させてネット
ワーク実行フラグをセットする手段と、前記ネットワー
ク実行フラグがセットされているか否かを判断する手段
と、前記ネットワーク実行フラグがセットされていると
判断したときに、ネットワーク実行フラグがセットされ
ていない他のネットワークのアドレスを飛ばして、ネッ
トワーク実行フラグがセットされている次に実行すべき
ネットワークにおける前記先頭アドレス情報が指示する
アドレスを中央演算処理装置の実行するアドレスに移す
手段と、演算が行われたときに演算を行ったネットワー
クに対する前記ネットワーク実行フラグをリセットする
手段とを備えたことを特徴とするものである。
A ladder sequence program arithmetic unit according to the present invention defines a network number for each ladder network of a ladder sequence program, and the ladder of the network number corresponding to the network number. Input the means to store the network start address information and the means to store the next execution network number corresponding to the address when the data of each address is the same as the data of other ladder networks. A means for detecting a change in information, a means for detecting a change in internal information, a means for setting a change flag for the changed information portion, and a next execution corresponding to the next execution network number storage means. Means to read the network number and read next execution network number The means for resetting the change flag when there is no number, the means for judging whether or not the change flag is set, and the means for reading out when it is judged that the change flag is set Means for setting a network execution flag in association with the start address information based on a network number corresponding to a next execution network number; means for determining whether the network execution flag is set; and the network execution When it is determined that the flag is set, the addresses of other networks for which the network execution flag is not set are skipped, and the network execution flag is set. Address to be executed by the central processing unit Means for transferring the address, is characterized in that a means for resetting the network execution flag to the network performing the operation when the operation is performed.

【0016】[0016]

【作用】中央演算処理装置は、あるラダーネットワーク
において演算(ラダーシーケンス演算)を行う途上で、
次実行ネットワーク番号を読み出し、また、その演算を
行ったネットワークに対するネットワーク実行フラグを
リセットする。しかし、入力情報または内部情報に変化
があると、変化フラグがセットされ、この変化フラグの
セットによって、次実行ネットワーク番号に該当するネ
ットワーク番号に基づいて先頭アドレス情報に関連させ
てネットワーク実行フラグがセットされる。入力情報や
内部情報に変化がないとき、および、次実行ネットワー
ク番号が番号無しを示しているときは、変化フラグがリ
セットされるため、上記のようなネットワーク実行フラ
グのセットは行われない。ネットワーク実行フラグがセ
ットされているときは、そのネットワーク実行フラグが
セットされている次に実行すべきネットワークにおける
先頭アドレスへ中央演算処理装置の実行アドレスを移
す。その結果、変化フラグがリセット状態にあるために
ネットワーク実行フラグがリセット状態となっている他
のネットワークのアドレスは飛ばされることになり、そ
のネットワークでの演算が行われないことになる。すな
わち、入力情報の変化や内部情報の変化に対して無用な
演算は一切実行しないことになり、ラダーシーケンス演
算の処理時間が大幅に短縮される。
The central processing unit is in the middle of performing an operation (ladder sequence operation) in a ladder network,
The next execution network number is read, and the network execution flag for the network that performed the calculation is reset. However, when there is a change in the input information or internal information, the change flag is set, and by setting this change flag, the network execution flag is set in association with the head address information based on the network number corresponding to the next execution network number. To be done. When there is no change in the input information or the internal information, and when the next execution network number indicates that there is no number, the change flag is reset, so the above network execution flag is not set. When the network execution flag is set, the execution address of the central processing unit is moved to the head address in the network to be executed next where the network execution flag is set. As a result, the address of the other network whose network execution flag is in the reset state because the change flag is in the reset state is skipped, and the operation in that network is not performed. That is, no unnecessary calculation is executed for a change in the input information or a change in the internal information, and the processing time of the ladder sequence calculation is significantly shortened.

【0017】換言すれば、1スキャンの実行速度が速く
なり、外部機器の状態情報を入力してから演算結果を出
力するまでの時間が短くなり、応答性の良い制御が可能
となる。また、サイクリック演算の観点から見た場合、
1スキャンの実行速度が速くなるということは、単位時
間当たりのスキャンの回数が多くなることになり、入力
処理から次の入力処理までの時間が短くなる。
In other words, the execution speed of one scan becomes faster, the time from the input of the status information of the external device to the output of the calculation result becomes shorter, and control with good responsiveness becomes possible. From the viewpoint of cyclic calculation,
The increase in the execution speed of one scan means that the number of scans per unit time increases, and the time from the input processing to the next input processing becomes short.

【0018】[0018]

【実施例】以下、本発明に係るラダーシーケンスプログ
ラム演算装置の一実施例を図面に基づいて詳細に説明す
る。本実施例ではプログラマブルコントローラを例に挙
げる。そのプログラマブルコントローラPCの構成は図
1に示して説明したものと同じである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a ladder sequence program computing device according to the present invention will be described in detail below with reference to the drawings. In this embodiment, a programmable controller is taken as an example. The configuration of the programmable controller PC is the same as that shown and described in FIG.

【0019】本実施例のラダーシーケンスプログラム処
理の動作を図6〜図9のフローチャートに示してある
が、演算を開始する前に、以下に述べる〔1〕〜〔5〕
のデータテーブルを作成し、データメモリA15に格納
しておく(ステップS11)。
The operation of the ladder sequence program processing of this embodiment is shown in the flow charts of FIGS. 6 to 9. Before starting the calculation, the following [1] to [5] will be described.
Data table is created and stored in the data memory A15 (step S11).

【0020】以下、まず、これらのデータテーブルの作
成について説明しておく。
First, the creation of these data tables will be described below.

【0021】〔1〕次実行ネットワークメモリの設定 図3(c)に示すのが次実行ネットワークメモリA34
である。ラダーシーケンス命令語A33(図3(b))
の1つ1つに対応した状態で、プログラムアドレス(図
3(b)のA32)の増加方向に同じデータを取り扱う
命令が存在しているラダーネットワーク番号(図3
(a)のA31)を次実行ネットワークメモリA34に
格納する(図6のステップS11の1行目)。
[1] Setting of Next Execution Network Memory A next execution network memory A34 is shown in FIG. 3 (c).
Is. Ladder sequence command word A33 (Fig. 3 (b))
Of the ladder network number (FIG. 3) in which the instruction to handle the same data is present in the increasing direction of the program address (A32 in FIG. 3B) in a state corresponding to each
(A31) of (a) is stored in the next execution network memory A34 (first line of step S11 in FIG. 6).

【0022】プログラマブルコントローラPCなどの機
器を扱うユーザーにおいては、一般には、図2に示すよ
うなラダーシーケンス回路A21の設計を行う。母線に
つながった個々の回路のことをラダーネットワークと呼
ぶ。すなわち、A50,A51,A52‥‥A56がそ
れぞれラダーネットワークである。図2の左側には各ラ
ダーネットワークA51〜A56のネットワーク番号が
示されているが、ラダーシーケンス回路A21はこのネ
ットワーク番号で管理されている。なお、ネットワーク
番号の下で括弧内に記載したものは各ラダーネットワー
クの先頭命令のアドレスであり、これは図5(b)のネ
ットワーク先頭プログラムアドレスA39において先頭
命令のアドレスに対応している。
A user handling equipment such as a programmable controller PC generally designs a ladder sequence circuit A21 as shown in FIG. The individual circuits connected to the busbar are called a ladder network. That is, A50, A51, A52 ... A56 are ladder networks. Although the network numbers of the ladder networks A51 to A56 are shown on the left side of FIG. 2, the ladder sequence circuit A21 is managed by this network number. The address in parentheses below the network number is the address of the head instruction of each ladder network, and this corresponds to the address of the head instruction in the network head program address A39 of FIG. 5B.

【0023】図2に示すラダーシーケンス回路A21の
論理をラダーシーケンス命令語A33に変換したものが
図3(b)の命令語である。このラダーシーケンス命令
語A33は図1のシーケンスプログラムメモリA14に
格納される。プログラマブルコントローラPC内では、
このラダーシーケンス命令語A33に従って順次に演算
を実行する。
The instruction word of FIG. 3B is obtained by converting the logic of the ladder sequence circuit A21 shown in FIG. 2 into the ladder sequence instruction word A33. This ladder sequence command word A33 is stored in the sequence program memory A14 of FIG. In the programmable controller PC,
Calculations are sequentially executed according to the ladder sequence command word A33.

【0024】このラダーシーケンス命令語A33に基づ
いて処理を行い、図3(c)の次実行ネットワークメモ
リA34に次実行ネットワーク番号を格納する。すなわ
ち、そのアドレスに存在する命令が扱うデータメモリ番
号と同じデータメモリ番号をアドレス増加方向に検索
し、次に存在するラダーネットワーク番号を次実行ネッ
トワークメモリA34に格納する。例えば、アドレス
「0000」にはラダーシーケンス命令語A33として
「STR 10」が格納されている。ここで、「10」
はデータメモリ番号(リレー番号)であるが、ラダーシ
ーケンス命令語A33であるラダーシーケンスプログラ
ム上において、このデータメモリ番号「10」が命令に
付属して存在する次のラダーネットワークのネットワー
ク番号が「0002」(アドレス0016の「STR
10」のネットワーク番号)であるから、次実行ネット
ワークメモリA34のアドレス「0000」には次実行
ネットワーク番号として「0002」を格納する(図中
の鎖線の矢印を参照)。また、以降のラダーネットワー
クに同じデータメモリ番号が存在しないときは、番号無
しを意味する情報「FFFF」を次実行ネットワークメ
モリA34に格納する。
Processing is performed based on this ladder sequence command word A33, and the next execution network number is stored in the next execution network memory A34 of FIG. 3 (c). That is, the same data memory number as the data memory number handled by the instruction existing at that address is searched in the direction of increasing addresses, and the ladder network number existing next is stored in the next execution network memory A34. For example, “STR 10” is stored as the ladder sequence command word A33 at the address “0000”. Where "10"
Is the data memory number (relay number), but on the ladder sequence program which is the ladder sequence command word A33, the network number of the next ladder network in which this data memory number "10" is attached to the command is "0002. ("STR at address 0016
10)), "0002" is stored as the next execution network number in the address "0000" of the next execution network memory A34 (see the chained arrow in the figure). If the same data memory number does not exist in the subsequent ladder network, the information "FFFF" meaning no number is stored in the next execution network memory A34.

【0025】なお、OUT命令や、ここでは説明しない
がタイマ命令、カウンタ命令などの出力を指令する命令
において使用されるデータメモリ番号については、ラダ
ーシーケンスプログラム上で最後に存在する出力を指令
する命令に対応する次実行ネットワーク番号として、ラ
ダーシーケンスプログラム上で最初に位置するネットワ
ーク番号「0000」を格納する(図3(c)のA34
a参照)。
Regarding the data memory numbers used in the OUT instruction and the instruction for instructing the output such as the timer instruction and the counter instruction which are not described here, the instruction for instructing the last output existing in the ladder sequence program. As the next execution network number corresponding to, the network number “0000” located first in the ladder sequence program is stored (A34 in FIG. 3C).
a)).

【0026】〔2〕初期ネットワークメモリの設定 図1のデータメモリA15には制御情報であるリレーデ
ータ(オン,オフのデータ)や数値データなどが格納さ
れている。図4(a)に示すこのデータメモリA35の
データメモリ番号の1ビットごとに対応した領域をもつ
図4(b)に示す初期ネットワークメモリA36(これ
は図1のデータメモリA15に存在する)に、ラダーシ
ーケンスプログラム(ラダーシーケンス命令語A33)
上、そのデータメモリ番号が最初に記述されているラダ
ーネットワーク番号(初期ネットワーク番号)を格納す
る。例えば、データメモリA35のデータメモリ番号
「0010」はラダーシーケンス命令語A33のネット
ワーク番号「0000」(これが「STR 10」とな
っていることに対応)で初めて記述されているので、デ
ータメモリA35のデータメモリ番号「0010」に対
応する初期ネットワークメモリA36の部分には図4
(b)に示すようにネットワーク番号「0000」を格
納する。また、データメモリA35のデータメモリ番号
「0013」はラダーシーケンス命令語A33のネット
ワーク番号「0001」(これが「AND13」となっ
ていることに対応)で初めて記述されているので、デー
タメモリA35のデータメモリ番号「0013」に対応
する初期ネットワークメモリA36の部分には図4
(b)に示すようにネットワーク番号「0001」を格
納する。
[2] Setting of initial network memory The data memory A15 in FIG. 1 stores relay data (ON / OFF data) and numerical data as control information. In the initial network memory A36 (which exists in the data memory A15 of FIG. 1) shown in FIG. 4B having an area corresponding to each bit of the data memory number of the data memory A35 shown in FIG. 4A. , Ladder sequence program (Ladder sequence command word A33)
The ladder network number (initial network number) in which the data memory number is described first is stored. For example, since the data memory number “0010” of the data memory A35 is first described by the network number “0000” of the ladder sequence command word A33 (corresponding to this being “STR 10”), the data memory number of the data memory A35 is The portion of the initial network memory A36 corresponding to the data memory number "0010" is shown in FIG.
The network number "0000" is stored as shown in (b). Further, since the data memory number “0013” of the data memory A35 is first described by the network number “0001” of the ladder sequence command word A33 (corresponding to this being “AND13”), the data of the data memory A35 is written. The portion of the initial network memory A36 corresponding to the memory number "0013" is shown in FIG.
The network number "0001" is stored as shown in (b).

【0027】〔3〕ネットワーク実行アドレスメモリの
設定 図5(b)は各ラダーネットワークの先頭命令がラダー
シーケンスプログラム(ラダーシーケンス命令語A3
3)上、どのアドレスに存在するかを参照するために設
けたネットワーク先頭プログラムアドレスメモリA39
である。このネットワーク先頭プログラムアドレスメモ
リA39は図1のデータメモリA15に存在する。ネッ
トワーク先頭プログラムアドレスメモリA39のアドレ
ス(図5(a))はラダーネットワーク番号A38と同
じであり、各ラダーネットワーク番号A38に各ラダー
ネットワークの実行開始アドレスを格納する。例えば、
図3(a),(b)から分かるようにネットワーク番号
「0001」の実行開始アドレスが「0006」となっ
ているので、図5(a),(b)のようにネットワーク
番号A38の「0001」に対応してネットワーク先頭
プログラムアドレスメモリA39には実行開始アドレス
「0006」を格納する。こうすることで、ネットワー
ク番号A38をアドレスとしてネットワーク先頭プログ
ラムアドレスメモリA39の内容を読み出すと、そのデ
ータはそのラダーネットワークの実行開始アドレスとな
る。
[3] Setting of network execution address memory In FIG. 5B, the first instruction of each ladder network is a ladder sequence program (ladder sequence instruction word A3).
3) The network top program address memory A39 provided to refer to which address the address is located above
Is. This network top program address memory A39 exists in the data memory A15 of FIG. The address of the network top program address memory A39 (FIG. 5A) is the same as the ladder network number A38, and the execution start address of each ladder network is stored in each ladder network number A38. For example,
As can be seen from FIGS. 3A and 3B, since the execution start address of the network number “0001” is “0006”, the network number A38 of “0001” is as shown in FIGS. Corresponding to ".", The execution start address "0006" is stored in the network head program address memory A39. By doing so, when the contents of the network head program address memory A39 are read with the network number A38 as an address, the data becomes the execution start address of the ladder network.

【0028】〔4〕ネットワーク実行フラグメモリのセ
ット(「1」の書き込み) 図5(c)のネットワーク実行フラグメモリA40は図
5(b)のネットワーク先頭プログラムアドレスメモリ
A39に対応している。このネットワーク実行フラグメ
モリA40は図1のデータメモリA15に存在する。ネ
ットワーク実行フラグメモリA40は実行を必要とする
ラダーネットワークの管理を行うためのものである。こ
のネットワーク実行フラグメモリA40は、必要部分の
演算を行うに当たり、同じラダーネットワークを重複し
て演算しないように設けている。
[4] Set Network Execution Flag Memory (Write "1") The network execution flag memory A40 in FIG. 5C corresponds to the network head program address memory A39 in FIG. 5B. This network execution flag memory A40 exists in the data memory A15 of FIG. The network execution flag memory A40 is for managing the ladder network that needs to be executed. The network execution flag memory A40 is provided so that the same ladder network will not be duplicated when the necessary portion is calculated.

【0029】演算開始前にはこのネットワーク実行フラ
グメモリA40のすべてのアドレスに「1」を書き込ん
でおく。
Before the calculation is started, "1" is written in all the addresses of the network execution flag memory A40.

【0030】ネットワーク実行フラグメモリA40のフ
ラグが「1」のときは、対応するラダーネットワークの
演算を実行する。演算が実行されたラダーネットワーク
についてはフラグを「0」にリセットする。フラグが
「0」のときは、対応するラダーネットワークの演算は
実行せず、飛び越す。
When the flag of the network execution flag memory A40 is "1", the operation of the corresponding ladder network is executed. The flag is reset to "0" for the ladder network for which the calculation has been executed. When the flag is "0", the operation of the corresponding ladder network is not executed and the program jumps.

【0031】〔5〕データ変化フラグメモリのクリア
(「0」の書き込み) 図4(c)に示すデータ変化フラグメモリA37は図1
のデータメモリA15に存在する。初期では、データメ
モリA35のすべてのアドレスにおいてデータ変化フラ
グメモリA37をクリアしておく。
[5] Clearing the data change flag memory (writing "0") The data change flag memory A37 shown in FIG.
Data memory A15. Initially, the data change flag memory A37 is cleared at all addresses of the data memory A35.

【0032】外部からの入力情報が変化した場合、ある
いはラダーネットワークを演算した結果として内部情報
が変化した場合には、データ変化フラグメモリA37の
対応アドレスに変化フラグとして「1」をセットし、ま
た、これらの情報が変化しないときは、対応アドレスに
変化フラグとして「0」にリセットする。変化フラグが
「1」のときは対応する次のラダーネットワークのネッ
トワーク実行フラグを「1」にセットすることを通じて
次のラダーネットワークの命令を実行するようにし、変
化フラグが「0」のときは次のラダーネットワークのネ
ットワーク実行フラグを「0」にリセットすることを通
じて次のラダーネットワークの命令は飛ばして実行しな
いようにする。
When the input information from the outside has changed, or when the internal information has changed as a result of computing the ladder network, "1" is set as the change flag in the corresponding address of the data change flag memory A37, and When these pieces of information do not change, the corresponding address is reset to "0" as a change flag. When the change flag is "1", the instruction of the next ladder network is executed by setting the network execution flag of the corresponding next ladder network to "1". When the change flag is "0", the next ladder network is executed. The instruction of the next ladder network is skipped and not executed by resetting the network execution flag of the second ladder network to "0".

【0033】上記した〔1〕〜〔5〕の設定(図6のス
テップS11)は、プログラム格納時またはプログラム
モードから運転モードへの変更時に自動的に行われる。
データメモリA15の初期設定を行うために、最初のス
キャンでは必ずすべてのラダーネットワークの命令を実
行するものとする。これは、ネットワーク実行フラグメ
モリA40においてすべてのネットワーク実行フラグを
「1」にセットすることで達成される。
The above-mentioned settings [1] to [5] (step S11 in FIG. 6) are automatically performed when the program is stored or when the program mode is changed to the operation mode.
In order to initialize the data memory A15, it is assumed that all the ladder network instructions are executed in the first scan. This is accomplished by setting all network execution flags in the network execution flag memory A40 to "1".

【0034】以下、図6のステップS12からの処理に
ついて説明する。
The processing from step S12 of FIG. 6 will be described below.

【0035】ステップS12で、入力部A11より外部
機器の状態を示す情報を取り込み、データメモリA15
に格納する。ステップS13で、前回の入力情報と今回
の入力情報との比較を行い、入力情報に変化があったと
きはステップS14に進んで図4(c)のデータ変化フ
ラグメモリA37においてその入力情報を格納している
アドレス(データメモリ番号)での変化フラグを「1」
にセットする。入力情報は代表的にはオンとオフで表さ
れ、オンからオフになったとき、およびオフからオンに
なったときに入力情報に変化があったとして変化フラグ
をセットする。
In step S12, information indicating the state of the external device is fetched from the input section A11, and the data memory A15 is read.
To be stored. In step S13, the previous input information is compared with the current input information, and when there is a change in the input information, the process proceeds to step S14 and the input information is stored in the data change flag memory A37 of FIG. 4C. The change flag at the address (data memory number) that is being set to "1"
Set to. The input information is typically represented by ON and OFF, and a change flag is set when there is a change in the input information when it is turned from ON to OFF and from OFF to ON.

【0036】なお、入力情報の変化の有無の判定を入力
部A11で行い、その結果を中央演算処理装置A12に
転送するようにしてもよい。判定の手段としては種々の
ものがあり、限定するものではない。公知の技術として
は例えば特開平4−174008号公報がある。
The input section A11 may determine whether or not the input information has changed, and the result may be transferred to the central processing unit A12. There are various means for determination, and there is no limitation. As a known technique, for example, there is JP-A-4-174008.

【0037】ステップS15では、1スキャンのラダー
シーケンスプログラムの先頭アドレスからの命令の実行
を開始させるために、ネットワーク番号レジスタを「0
000」にセットしておく。次いで、ステップS16
で、図5(a)のネットワーク番号A38に基づいて図
5(c)のネットワーク実行フラグメモリA40から対
応するネットワーク実行フラグを読み出す。そして、ス
テップS17で、読み出したネットワーク実行フラグが
「1」か否かを判断する。初回の1スキャンでは、予め
ステップS11ですべてのネットワーク番号のネットワ
ーク実行フラグが「1」にセットされているから、ステ
ップS19へ進む。初回の1スキャンにおけるラダーシ
ーケンス演算では、S16→S17→S19→S20→
S21→S22→S23→S24(またはS25)→S
26→S27(またはS28〜S31)→S32→S3
4(またはS33〜S34)→S35(またはS36)
→S22(またはS16)のルーチンを通る。具体的に
は次のとおりである。
In step S15, the network number register is set to "0" in order to start execution of an instruction from the start address of the ladder scan program for one scan.
000 ”. Then, step S16
Then, the corresponding network execution flag is read from the network execution flag memory A40 of FIG. 5C based on the network number A38 of FIG. 5A. Then, in step S17, it is determined whether the read network execution flag is "1". In the first one scan, the network execution flags of all the network numbers are set to "1" in advance in step S11, and therefore the process proceeds to step S19. In the first ladder scan operation in one scan, S16 → S17 → S19 → S20 →
S21 → S22 → S23 → S24 (or S25) → S
26 → S27 (or S28 to S31) → S32 → S3
4 (or S33 to S34) → S35 (or S36)
→ Go through the routine of S22 (or S16). Specifically, it is as follows.

【0038】ステップS19で、ネットワーク実行フラ
グを「0」にリセットする。それは、あとのステップS
27かステップS28で命令に応じた演算が必ず行われ
るから、演算が行われたことを示すために予めリセット
しておくのである。ただし、後述するように、ステップ
S33でネットワーク実行フラグが再び「1」にセット
されることはあり得る。次のステップS20で、プログ
ラムカウンタにラダーネットワークの先頭プログラムの
アドレスを格納する。そのラダーネットワークの先頭の
命令から演算を実行させるためである。ステップS21
で、プログラムカウンタで指定されている現在アドレス
で図3(b)のラダーシーケンス命令語A33における
命令を読み出す。また、図3(c)の次実行ネットワー
クメモリA34から現在アドレスの次実行ネットワーク
番号を読み出しておく。この次実行ネットワーク番号の
読み出しは、あとのステップS23,S33で使用する
ための準備である。ステップS22で、END命令か否
かを判断するが、ここでは否定されてステップS23に
進み、先に読み出しておいた次実行ネットワーク番号が
「FFFF」(無し)かどうかを判断する。「FFF
F」のときは、次回には当該データメモリ番号は使用し
ないで飛び越すので、ステップS25に進み、図4
(c)のデータ変化フラグメモリA37において当該デ
ータメモリ番号の変化フラグを「0」にリセットし、か
つ、プログラムカウンタで指定されている現在アドレス
の命令で指定されたデータメモリ番号のデータを読み出
す。一方、次実行ネットワーク番号が「FFFF」(無
し)以外であったときは、ステップS24に進んで現在
アドレスの命令で指定されたデータメモリ番号のデータ
を読み出すとともに、データメモリ番号に対応した変化
フラグを読み出しておく。これは、ステップS32で使
うためである。
In step S19, the network execution flag is reset to "0". That is the next step S
Since the operation according to the instruction is always performed at 27 or step S28, it is reset in advance to indicate that the operation is performed. However, as will be described later, the network execution flag may be set to "1" again in step S33. In the next step S20, the address of the leading program of the ladder network is stored in the program counter. This is because the operation is executed from the first instruction of the ladder network. Step S21
Then, the instruction in the ladder sequence instruction word A33 in FIG. 3B is read at the current address designated by the program counter. Further, the next execution network number of the current address is read from the next execution network memory A34 of FIG. 3 (c). The reading of the next execution network number is a preparation for use in subsequent steps S23 and S33. In step S22, it is determined whether or not it is the END instruction. However, the determination is negative here, the flow proceeds to step S23, and it is determined whether or not the previously executed next execution network number is "FFFF" (none). "FFF
When it is “F”, the data memory number is skipped next time without using the data memory number.
In the data change flag memory A37 of (c), the change flag of the data memory number is reset to "0", and the data of the data memory number designated by the instruction of the current address designated by the program counter is read. On the other hand, if the next execution network number is other than "FFFF" (none), the process proceeds to step S24 to read the data of the data memory number designated by the instruction of the current address, and change flag corresponding to the data memory number. Is read out. This is because it is used in step S32.

【0039】次いで、ステップS26で、命令がOUT
命令か否かを判断する。OUT命令以外であれば、ステ
ップS27に進んで所定のシーケンス演算を実行し、ス
テップS32に進む。OUT命令であるときは、ステッ
プS28に進んでOUT演算を実行する。そして、ステ
ップS29で、そのOUT演算の結果、当該データメモ
リ番号のデータ(内部情報)に変化があったか否かを判
断し、変化がなければステップS30に進んで変化フラ
グを「0」にリセットし、変化があったときはステップ
S31に進んで変化フラグを「1」にセットし、ステッ
プS32に進む。なお、このように、一般の演算または
OUT演算のいずれにしても演算が行われることが必然
であるから、演算が行われたことを示すために、先のス
テップS19において予めネットワーク実行フラグを
「0」にリセットしておいたのである。
Then, in step S26, the instruction is OUT.
Determine if it is an instruction. If it is other than the OUT instruction, the process proceeds to step S27 to execute a predetermined sequence operation, and proceeds to step S32. If it is an OUT instruction, the operation proceeds to step S28 to execute an OUT operation. Then, in step S29, as a result of the OUT operation, it is determined whether or not the data (internal information) of the data memory number has changed. If there is no change, the process proceeds to step S30 to reset the change flag to "0". If there is a change, the process proceeds to step S31, the change flag is set to "1", and the process proceeds to step S32. In this way, since it is inevitable that the operation is performed in either the general operation or the OUT operation, in order to indicate that the operation has been performed, the network execution flag is set to "in advance" in step S19. It was reset to "0".

【0040】ステップS32で、変化フラグが「1」に
セットされているか否かを判断する。「1」にセットさ
れているときは、ステップS33に進んで、予めステッ
プS21で読み出しておいた図3(c)の次実行ネット
ワーク番号をアドレスとして図5(c)の該当するネッ
トワーク実行フラグを「1」にセットし、これで、変化
後のデータを用いた次のネットワークが後で実行される
ように準備しておく。
In step S32, it is determined whether or not the change flag is set to "1". If it is set to "1", the process proceeds to step S33, and the next execution network number of FIG. 3 (c) read in advance in step S21 is used as an address to set the corresponding network execution flag of FIG. 5 (c). It is set to "1", so that the next network using the changed data is ready for later execution.

【0041】このあと、ステップS34に進む。変化フ
ラグが「0」であったときは、現在時点で使用したデー
タが後で使用されることはないから、ネットワーク実行
フラグをセットすることなく、ステップS19で行われ
たリセットによる「0」の状態のままにしておいて次の
ステップS34に進む。。
Then, the process proceeds to step S34. When the change flag is "0", the data used at the present time will not be used later, so that the data of "0" is reset by the reset performed in step S19 without setting the network execution flag. The state is left as it is and the process proceeds to the next step S34. .

【0042】次に、ステップS34で、現在ラダーネッ
トワークの演算が終了したか否かを判断し、終了してい
ないときはステップS35に進み、プログラムカウンタ
をインクリメントして次のアドレスで図3(b)のラダ
ーシーケンス命令語A33における命令を読み出す。ま
た、図3(c)の次実行ネットワークメモリA34から
新たなアドレスの次実行ネットワーク番号を読み出して
おく。そして、ステップS22に戻り、上記同様の動作
を繰り返す。その結果として現在ラダーネットワークの
演算が終了したときは、ステップS34からステップS
36に進み、ネットワーク番号レジスタをインクリメン
トして、次に実行すべきネットワークを検索するために
ステップS16へ戻る。ステップS16で、ネットワー
ク実行フラグを読み出し、ステップS17でネットワー
ク実行フラグが「1」か否かを判断するが、初回のスキ
ャンではEND命令がくるまではすべてのネットワーク
番号についてネットワーク実行フラグが「1」となって
いるので、ステップS19へ進んで、上記と同様の動作
を繰り返す。
Next, in step S34, it is judged whether or not the operation of the ladder network is finished at present, and if it is not finished, the routine proceeds to step S35, where the program counter is incremented and the next address shown in FIG. ), The instruction in the ladder sequence instruction word A33 is read. Further, the next execution network number of the new address is read from the next execution network memory A34 of FIG. 3 (c). Then, the process returns to step S22 and the same operation as above is repeated. As a result, when the operation of the ladder network is finished at present, steps S34 to S34 are performed.
Proceeding to 36, the network number register is incremented, and the process returns to step S16 to search for the network to be executed next. In step S16, the network execution flag is read, and in step S17 it is determined whether the network execution flag is "1". In the first scan, the network execution flag is "1" for all network numbers until the END instruction comes. Therefore, the process proceeds to step S19 and the same operation as above is repeated.

【0043】そして、END命令がきたときは、ステッ
プS22からステップS37に進むことでラダーシーケ
ンス演算を終了する。なお、END命令が含まれるネッ
トワーク番号のネットワーク実行フラグは常に「1」に
セットしておくものとし、必ず演算させてラダーシーケ
ンス演算を終了させる。
When the END instruction is received, the process proceeds from step S22 to step S37 to end the ladder sequence calculation. The network execution flag of the network number including the END instruction is always set to "1", and the operation is always performed to end the ladder sequence operation.

【0044】ラダーシーケンス演算が終了してステップ
S37に進むと、図1の出力部A16へデータを出力
し、外部機器の制御を行う。次に、ステップS38で、
周辺装置インターフェイスA17を介してプログラミン
グ装置などの周辺装置との間でデータのやりとりを行
う。そして、ステップS39で、演算停止の指示があっ
たか否かを判断し、あったときはステップS40へと進
んで演算を終了するが、そうでない限りステップS41
へ進んで、入力部A11より外部機器の次の状態を示す
情報を取り込み、データメモリA15に格納する。ステ
ップS42で、前回の入力情報と今回の入力情報との比
較を行い、入力情報に変化があったときはステップS4
3に進んで図4(c)のデータ変化フラグメモリA37
においてその入力情報を格納しているアドレス(データ
メモリ番号)での変化フラグを「1」にセットする。こ
れで入力情報が変化したことが設定される。
When the ladder sequence calculation is completed and the process proceeds to step S37, the data is output to the output section A16 in FIG. 1 to control the external equipment. Next, in step S38,
Data is exchanged with a peripheral device such as a programming device via the peripheral device interface A17. Then, in step S39, it is determined whether or not there is an instruction to stop the arithmetic operation. If so, the process proceeds to step S40 to end the arithmetic operation, but otherwise, step S41.
Then, the process proceeds to step S11 and the information indicating the next state of the external device is fetched from the input unit A11 and stored in the data memory A15. In step S42, the previous input information and the current input information are compared, and if there is a change in the input information, step S4
3, the data change flag memory A37 of FIG.
At 1, the change flag at the address (data memory number) storing the input information is set to "1". This sets that the input information has changed.

【0045】以上で1スキャン分の処理が終了し、再び
ステップS15へ戻り、次のスキャンへと進む。
The processing for one scan is completed as described above, and the process returns to step S15 again to proceed to the next scan.

【0046】今回の入力取り込みでのデータが前回の入
力取り込みのデータと同じであって入力情報に変化がな
く、したがって前述したように変化フラグが「0」にセ
ットされていることによるネットワーク実行フラグが
「0」になっていることで、ステップS16→S17→
S18の閉ループルーチンにおいて、ネットワーク番号
がインクリメントされる結果、入力情報が関係する部分
のシーケンス演算は行わない。ただし、前回のスキャン
で変化した内部情報が関係する部分(この部分では変化
フラグが「1」にセットされ、ネットワーク実行フラグ
が「1」となっている)については、ステップS17→
S19へと進むことで、その変化した内部情報が関係し
ている部分のみのシーケンス演算を行う。もし、内部情
報にも変化がない場合には、シーケンス演算のルーチン
には移行せず、再び入力取り込みを行う。
Since the data in the current input fetch is the same as the data in the previous input fetch and the input information has no change, the network execution flag due to the change flag being set to "0" as described above. Is set to “0”, the steps S16 → S17 →
In the closed loop routine of S18, as a result of the network number being incremented, the sequence operation of the part related to the input information is not performed. However, for the portion related to the internal information changed in the previous scan (in this portion, the change flag is set to "1" and the network execution flag is "1"), step S17 →
By proceeding to S19, the sequence calculation is performed only on the portion related to the changed internal information. If there is no change in the internal information, the input operation is performed again without shifting to the sequence operation routine.

【0047】以上のようにして、入力情報や内部情報の
変化に対して必要な部分のみの演算は行うが、無用な演
算が行われることを回避しているので、ラダーシーケン
ス演算の処理時間を短縮化することができるとともに、
入力情報の変化に対する応答性を向上することができ
る。
As described above, only the necessary parts for the change of the input information and the internal information are calculated. However, since unnecessary calculation is avoided, the processing time of the ladder sequence calculation is reduced. Can be shortened,
The responsiveness to changes in input information can be improved.

【0048】なお、以上のようなシーケンス演算は汎用
の中央演算処理装置(CPU)が実行するのが一般的で
あるが、専用のハードウエアを用いてメインのCPUと
並行して実行する方がより高速な演算を実現できる。
The above-described sequence operation is generally executed by a general-purpose central processing unit (CPU), but it is better to execute it in parallel with the main CPU using dedicated hardware. A faster calculation can be realized.

【0049】[0049]

【発明の効果】本発明のラダーシーケンスプログラム演
算装置によれば、入力情報の変化や内部情報の変化に対
して無用な演算は実行しないので、ラダーシーケンス演
算の処理時間を大幅に短縮化することができる。すなわ
ち、ラダーシーケンス演算の高速化を実現し、外部機器
からの情報変化に対してより速く応答できるようになる
ため、外部機器稼働の大幅な効率化を図ることができ
る。
According to the ladder sequence program computing device of the present invention, unnecessary computation is not executed for changes in input information and changes in internal information, so that the processing time for ladder sequence computation is greatly shortened. You can That is, since the ladder sequence calculation can be speeded up and a change in information from an external device can be responded more quickly, the efficiency of operation of the external device can be significantly improved.

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

【図1】本発明の一実施例に係るラダーシーケンスプロ
グラム演算装置の例としてプログラマブルコントローラ
の構成を示すブロック図である(従来例にも共通)。
FIG. 1 is a block diagram showing a configuration of a programmable controller as an example of a ladder sequence program operation device according to an embodiment of the present invention (common to conventional examples).

【図2】実施例における図3のラダーシーケンス命令語
に対応するラダーシーケンス回路の回路図である。
FIG. 2 is a circuit diagram of a ladder sequence circuit corresponding to the ladder sequence instruction word of FIG. 3 in the embodiment.

【図3】実施例においてネットワーク番号とラダーシー
ケンス命令語と次実行ネットワークメモリとを関連付け
て示したメモリ内容図である。
FIG. 3 is a memory content diagram showing a network number, a ladder sequence command word, and a next execution network memory in association with each other in the embodiment.

【図4】実施例においてデータメモリと初期ネットワー
クメモリとデータ変化フラグメモリとを関連付けて示し
たメモリ内容図である。
FIG. 4 is a memory content diagram showing a data memory, an initial network memory, and a data change flag memory in association with each other in an embodiment.

【図5】実施例においてネットワーク番号とネットワー
ク先頭プログラムアドレスメモリとを関連付けて示した
メモリ内容図である。
FIG. 5 is a memory content diagram showing a network number and a network head program address memory in association with each other in an embodiment.

【図6】実施例のラダーシーケンスプログラム処理の動
作説明に供するフローチャート(一部)である。
FIG. 6 is a flowchart (part) used for explaining the operation of the ladder sequence program processing of the embodiment.

【図7】実施例の動作説明に供するフローチャート(図
6の続き)である。
FIG. 7 is a flowchart (continuation of FIG. 6) provided for explaining the operation of the embodiment.

【図8】実施例の動作説明に供するフローチャート(図
7の続き)である。
FIG. 8 is a flowchart (continuation of FIG. 7) used for explaining the operation of the embodiment.

【図9】実施例の動作説明に供するフローチャート(図
8の続き)である。
FIG. 9 is a flowchart (continuation of FIG. 8) provided for explaining the operation of the embodiment.

【図10】従来のラダーシーケンスプログラム演算装置
を説明するために示したラダーシーケンス回路の回路図
である。
FIG. 10 is a circuit diagram of a ladder sequence circuit shown for explaining a conventional ladder sequence program operation device.

【図11】従来のラダーシーケンスプログラム演算装置
を説明するために示したラダーシーケンスプログラム
(ラダーシーケンス命令語)の例示図である。
FIG. 11 is an exemplary diagram of a ladder sequence program (ladder sequence command word) shown for explaining a conventional ladder sequence program arithmetic device.

【図12】従来のラダーシーケンスプログラム演算装置
の動作説明に供するフローチャートである。
FIG. 12 is a flowchart for explaining the operation of a conventional ladder sequence program calculation device.

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

PC……プログラマブルコントローラ(ラダーシーケン
スプログラム演算装置の一例) A11……入力部 A12……中央演算処理装置 A13……システムプログラムメモリ A14……シーケンスプログラムメモリ A15……データメモリ A16……出力部 A17……周辺装置インターフェイス A21……ラダーシーケンス回路 A31……ラダーネットワーク番号 A32……アドレス A33……ラダーシーケンス命令語 A34……次実行ネットワークメモリ A35……データメモリ A36……初期ネットワークメモリ A37……データ変化フラグメモリ A38……ネットワーク番号 A39……ネットワーク実行アドレスメモリ A40……ネットワーク実行フラグメモリ A50〜A56……ラダーネットワーク
PC: Programmable controller (an example of ladder sequence program arithmetic unit) A11 ... Input unit A12 ... Central processing unit A13 ... System program memory A14 ... Sequence program memory A15 ... Data memory A16 ... Output unit A17 ... ... Peripheral device interface A21 ... Ladder sequence circuit A31 ... Ladder network number A32 ... Address A33 ... Ladder sequence command A34 ... Next execution network memory A35 ... Data memory A36 ... Initial network memory A37 ... Data change Flag memory A38 …… Network number A39 …… Network execution address memory A40 …… Network execution flag memory A50 to A56 …… Ladder network

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ラダーシーケンスプログラムのうちの個
々のラダーネットワークについてネットワーク番号を定
めておき、そのネットワーク番号に対応してそのネット
ワーク番号のラダーネットワークの先頭アドレス情報を
格納しておく手段と、 各アドレスのデータが他のラダーネットワークでのデー
タと同じであるときにそのアドレスに対応して次実行ネ
ットワーク番号を格納しておく手段と、 入力情報の変化を検出する手段と、 内部情報の変化を検出する手段と、 前記変化があった情報部分に対して変化フラグをセット
する手段と、 前記次実行ネットワーク番号の格納手段から該当する次
実行ネットワーク番号を読み出す手段と、 読み出した次実行ネットワーク番号が番号無しを示して
いるときに前記変化フラグをリセットする手段と、 前記変化フラグがセットされているか否かを判断する手
段と、 前記変化フラグがセットされていると判断したときに、
前記読み出した次実行ネットワーク番号に該当するネッ
トワーク番号に基づいて、前記先頭アドレス情報に関連
させてネットワーク実行フラグをセットする手段と、 前記ネットワーク実行フラグがセットされているか否か
を判断する手段と、 前記ネットワーク実行フラグがセットされていると判断
したときに、ネットワーク実行フラグがセットされてい
ない他のネットワークのアドレスを飛ばして、ネットワ
ーク実行フラグがセットされている次に実行すべきネッ
トワークにおける前記先頭アドレス情報が指示するアド
レスを中央演算処理装置の実行するアドレスに移す手段
と、 演算が行われたときに演算を行ったネットワークに対す
る前記ネットワーク実行フラグをリセットする手段とを
備えたことを特徴とするラダーシーケンスプログラム演
算装置。
1. A means for storing a network number for each ladder network of the ladder sequence program, and storing the start address information of the ladder network of the network number corresponding to the network number, and each address. When the data of the same is the same as the data of other ladder network, the means to store the next execution network number corresponding to the address, the means to detect the change of the input information, and the change to the internal information are detected. Means, a means for setting a change flag for the changed information part, a means for reading the corresponding next execution network number from the storage means for storing the next execution network number, and the read next execution network number being a number. Means for resetting the change flag when indicating no , Means for determining whether the change flag is set, and when it is determined that the change flag is set,
A means for setting a network execution flag in association with the start address information based on a network number corresponding to the read next execution network number; a means for determining whether or not the network execution flag is set; When it is determined that the network execution flag is set, the addresses of other networks for which the network execution flag is not set are skipped, and the network execution flag is set. Ladder comprising means for moving an address indicated by information to an address executed by the central processing unit, and means for resetting the network execution flag for the network on which the operation is performed when the operation is performed. Sequence program Beam computing device.
【請求項2】 ネットワーク実行フラグをリセットする
手段は、ネットワーク実行フラグのセットを判断する手
段がセットと判断した後であって、次に実行すべきネッ
トワークにおける先頭アドレス情報が指示するアドレス
を中央演算処理装置の実行するアドレスに移す前に、動
作するように構成されていることを特徴とする請求項1
に記載のラダーシーケンスプログラム演算装置。
2. The means for resetting the network execution flag, after the means for judging the setting of the network execution flag judges that the set, and the central operation of the address indicated by the head address information in the network to be executed next. The processing device is configured to operate before moving to an address executed by the processing device.
Ladder sequence program calculation device according to item 1.
【請求項3】 変化フラグのセットを判断する手段は、
中央演算処理装置が1つのアドレスにおける演算の実行
を終了した後であって、次のアドレスの命令読み出し前
に、動作するように構成されていることを特徴とする請
求項1または請求項2に記載のラダーシーケンスプログ
ラム演算装置。
3. The means for determining the change flag setting includes:
The central processing unit is configured to operate after completion of execution of an operation at one address and before reading an instruction at the next address. Ladder sequence program calculation device described.
JP29823994A 1994-12-01 1994-12-01 Ladder sequence program arithmetic unit Pending JPH08161010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29823994A JPH08161010A (en) 1994-12-01 1994-12-01 Ladder sequence program arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29823994A JPH08161010A (en) 1994-12-01 1994-12-01 Ladder sequence program arithmetic unit

Publications (1)

Publication Number Publication Date
JPH08161010A true JPH08161010A (en) 1996-06-21

Family

ID=17857042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29823994A Pending JPH08161010A (en) 1994-12-01 1994-12-01 Ladder sequence program arithmetic unit

Country Status (1)

Country Link
JP (1) JPH08161010A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001014155A (en) * 1999-07-01 2001-01-19 Japan Radio Co Ltd Controller for executing software parts
JP2010225071A (en) * 2009-03-25 2010-10-07 Yamatake Corp Controller and control method of control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001014155A (en) * 1999-07-01 2001-01-19 Japan Radio Co Ltd Controller for executing software parts
JP2010225071A (en) * 2009-03-25 2010-10-07 Yamatake Corp Controller and control method of control system

Similar Documents

Publication Publication Date Title
KR0138468B1 (en) Microcomputer
JP2875842B2 (en) Programmable controller
JPH0682320B2 (en) Data processing device
JPH08161010A (en) Ladder sequence program arithmetic unit
JP4037941B2 (en) Control device
JP2506591B2 (en) Auxiliary processor
KR960001977B1 (en) Control method in programmable controller
JP3441262B2 (en) Data processing device
JPH1011320A (en) Rom program monitor device of processor of computer or the like
JPH09185525A (en) Protocol debugging system
JP3013619B2 (en) Programmable controller
JP2000056991A (en) Micro computer programmable controller provided with multi-task function and its control method
JPH10222361A (en) Rom program monitor device in processor of computer or the like
JPS63170703A (en) Loader command processing device
JPH03174638A (en) Data processor
JPH04332003A (en) Programmable controller
JPH05233319A (en) Register saving system
JPH01243124A (en) Simulation system
JPH0261725A (en) Micro branch system
JPH0772908A (en) Programmable controller
JPH07334215A (en) Sequence control method of programmable controller
JPS5878234A (en) Microprogram controller
JPH09204206A (en) Programmable controller
JPH05241853A (en) Programmable controller
JPH1069401A (en) Emulator device