JPH07113844B2 - Programmable controller programming device - Google Patents

Programmable controller programming device

Info

Publication number
JPH07113844B2
JPH07113844B2 JP63078630A JP7863088A JPH07113844B2 JP H07113844 B2 JPH07113844 B2 JP H07113844B2 JP 63078630 A JP63078630 A JP 63078630A JP 7863088 A JP7863088 A JP 7863088A JP H07113844 B2 JPH07113844 B2 JP H07113844B2
Authority
JP
Japan
Prior art keywords
program
instruction
read
storage unit
memory
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 - Lifetime
Application number
JP63078630A
Other languages
Japanese (ja)
Other versions
JPH01251109A (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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP63078630A priority Critical patent/JPH07113844B2/en
Publication of JPH01251109A publication Critical patent/JPH01251109A/en
Publication of JPH07113844B2 publication Critical patent/JPH07113844B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、格納されたプログラムにより各種の制御を行
うプログラマブルコントローラ(以下、PCという)のプ
ログラミング装置にかかり、詳しくは、作成されたプロ
グラムの読み出し/書き込み異常の自動チェック機能を
備えたプログラミング装置に関する。
The present invention relates to a programming device of a programmable controller (hereinafter, referred to as a PC) that performs various controls by a stored program. The present invention relates to a programming device having an automatic check function for read / write abnormalities.

(従来の技術) 周知のように、リレー盤の置き換えという着想から発達
したPCは、いわゆるFA(ファクトリーオートメーショ
ン)システム等の様々な制御分野に適用されるようにな
ってきている。このため、PCの進歩に伴ってそのプログ
ラムはますます複雑化、大規模化する傾向にある。
(Prior Art) As is well known, a PC developed from the idea of replacing a relay panel has come to be applied to various control fields such as a so-called FA (factory automation) system. For this reason, the programs tend to become more complicated and larger in scale as the PC advances.

従来、PCのプログラムを作成するプログラミング装置で
は、プログラムをリレーシンボルにて表したラダー図等
の図を入力することによりプログラムを作成するのが一
般的であり、プログラミング装置はこれらの図情報をPC
が実行できるような命令語群に変換している。この命令
語は通常、オペコードとオペランドとから構成されてお
り、オペコードは読み出し処理をするか書き込み処理を
するかの命令の種類を、また、オペランドはこれらの命
令による処理の対象となるPCの記憶部のアドレスを定義
している。
Conventionally, a programming device that creates a program for a PC generally creates a program by inputting a diagram such as a ladder diagram in which the program is represented by relay symbols.
Is converted into a command group that can be executed. This instruction word is usually composed of an opcode and an operand. The opcode indicates the type of instruction to perform read processing or write processing, and the operand indicates the memory of the PC to be processed by these instructions. The address of the department is defined.

ここで、PCの記憶部は、制御対象からの入力を記憶する
入力領域、制御対象への出力を記憶する出力領域、入力
から出力を導き出す過程で使用されるメモリ領域に大別
される。
Here, the storage unit of the PC is roughly divided into an input area for storing an input from the controlled object, an output area for storing an output to the controlled object, and a memory area used in the process of deriving an output from the input.

(発明が解決しようとする課題) 従来のプログラミング装置では、リレー回路図のイメー
ジに従ったラダー図等の図式を用いてプログラムを作成
していくため、プログラムの作成作業自体は非常に容易
で判り易いものとなっている。しかしながら、作成した
プログラムによってPCが動作しない場合はプログラムの
異常を認識することができるが、PCが動作するにも拘ら
ず読み出し/書き込み異常等により正しい制御動作が行
われないようなプログラムの自動的なチェックは行うこ
とができない。
(Problems to be solved by the invention) In a conventional programming device, a program is created by using a diagram such as a ladder diagram according to an image of a relay circuit diagram. It is easy. However, if the created program does not operate the PC, the program can be recognized as abnormal. However, even if the PC operates, a program that does not perform correct control operation due to a read / write error etc. Check cannot be done.

このため従来では、PCの試運転に先だって入手により入
念にプログラムをチェックする必要があり、かかるチェ
ック作業に多くの労力や時間を費やしていたと共に、場
合によってはプログラムの異常を発見できずに看過して
しまう危険性もあった。
For this reason, in the past, it was necessary to carefully check the program by obtaining it before the trial run of the PC, and much labor and time was spent on such checking work, and in some cases, the program abnormality could not be detected and was overlooked. There was also a risk of being lost.

本発明は上記問題点を解決するべく提案されたもので、
その目的とするところは、複雑化、大規模化して人為的
なチェックが困難になりつつあるPCのプログラムの作成
・試験効率及び信頼性を向上させるため、人手によらな
い自動的なチェックを可能としたPCのプログラミング装
置を提供することにある。
The present invention has been proposed to solve the above problems,
The purpose is to improve the efficiency and reliability of PC program creation / testing, which is becoming difficult to perform artificial checking due to complexity and large scale, so automatic checking without human intervention is possible. It is to provide a PC programming device.

(課題を解決するための手段) 上記目的を達成するため、本発明は、第1図に示すごと
く、作成されたPCのプログラムを格納するプログラム格
納メモリ10と、このプログラム格納メモリ10から前記プ
ログラムを構成する命令語を順次取り出し、この命令に
よる処理の対象となる前記PCの記憶部上のアドレスを抽
出すると共に、前記命令語が読み出し命令であるか書き
込み命令であるかの命令の種類に応じて前記PCの記憶部
に対する読み出し数及び書き込み数を加算する命令解析
部20と、前記アドレスについての読み出し数及び書き込
み数をそれぞれ格納して前記PCの記憶部の使用状況を示
す使用状況格納メモリ30と、この使用状況格納メモリ30
の内容から、前記PCの記憶部に書き込み処理を行ってい
る入力領域が存在し、または、読み出し処理のみで書き
込み処理が行われていない出力領域が存在し、あるい
は、読み出しまたは書き込み処理のみが行われているメ
モリ領域が存在することを検索する不法使用検索部40
と、この不法使用検索部40による上記検索結果を前記プ
ログラム中の読み出し/書き込み異常として警告する警
告出力装置50とを備えたことを特徴とする。
(Means for Solving the Problems) In order to achieve the above object, the present invention is, as shown in FIG. 1, a program storage memory 10 for storing a created PC program, and the program storage memory 10 for storing the program. Are sequentially taken out, the address on the storage unit of the PC to be processed by this instruction is extracted, and according to the type of instruction whether the instruction word is a read instruction or a write instruction. And an instruction analysis unit 20 that adds the number of reads and the number of writes to the storage unit of the PC, and a usage status storage memory 30 that stores the number of reads and the number of writes for the address and indicates the usage status of the storage unit of the PC. And this usage storage memory 30
From the contents of the above, there is an input area in which writing processing is being performed in the storage section of the PC, or an output area in which writing processing has not been performed, or there is reading or writing processing only. Illegal use search unit 40 that searches for the existence of a memory area
And a warning output device 50 that warns the retrieval result by the illegal use retrieval unit 40 as a read / write abnormality in the program.

(作用) 本発明によれば、プログラムを構成する各命令語につい
て、PCの記憶部上のアドレスに対する読み出し数及び書
き込み数が使用状況格納メモリ30に格納される。不法使
用検索部40は、この使用状況格納メモリ30の内容を検索
し、前記アドレスに応じた読み出し数または書き込み数
からプログラム中の読み出し/書き込み異常を検出し、
これを警告出力装置を介して警告するべく作用する。
(Operation) According to the present invention, the number of reads and the number of writes with respect to the addresses on the storage unit of the PC are stored in the usage status storage memory 30 for each instruction word that constitutes the program. The illegal use search unit 40 searches the contents of the usage status storage memory 30, detects a read / write error in the program from the number of reads or the number of writes corresponding to the address,
This serves to give a warning via a warning output device.

(実施例) 以下、図に沿って本発明の一実施例を説明する。(Example) An example of the present invention will be described below with reference to the drawings.

まず、第2図はこの実施例の構成を示すブロック図であ
る。同図において、1はプログラミングや後述するチェ
ック処理のためのキー入力を行うキーボードであり、第
3図に示す如く、このキーボード1はプログラム作成開
始キー、同作成終了キー、格納キー、チェックキー、シ
ンボルキー、テンキー、カーソル移動キーを備えていて
図情報バッファ2に接続されている。また、50′は例え
ば第4図の如きラダー図が表示される前記警告出力装置
50としてのCRTであり、このCRT50′も図情報バッファ2
に接続されている。
First, FIG. 2 is a block diagram showing the configuration of this embodiment. In FIG. 1, reference numeral 1 is a keyboard for performing key input for programming and check processing described later. As shown in FIG. 3, the keyboard 1 is a program creation start key, a creation end key, a storage key, a check key, A symbol key, a numeric keypad, and a cursor movement key are provided and are connected to the diagram information buffer 2. Further, 50 'is the warning output device for displaying a ladder diagram as shown in FIG. 4, for example.
It is a CRT as 50, and this CRT 50 'is also a figure information buffer 2
It is connected to the.

ここで、図情報バッファ2の内部構成は、第5図に示す
とおりであり、かかるバッファ2はCRT50′上のカーソ
ル位置に対応してシンボル記憶部2A、結線記憶部2B及び
オペランド記憶部2Cを複数組備えている。このうちシン
ボル記憶部2Aは、ラダー図の横結線や接点、コイル等を
数字のシンボルにて表して記憶するもので、例えばシン
ボル「0」は上記構成要素なしを、「1」は横結線を、
「2」は接点を、「3」はコイルをそれぞれ示してい
る。
Here, the internal structure of the diagram information buffer 2 is as shown in FIG. 5, and the buffer 2 has a symbol storage unit 2A, a connection storage unit 2B and an operand storage unit 2C corresponding to the cursor position on the CRT 50 '. Has multiple sets. Of these, the symbol storage unit 2A stores and represents the horizontal connections, contacts, coils, etc. of the ladder diagram by numerical symbols. For example, the symbol "0" indicates that the above components are absent, and "1" indicates the horizontal connections. ,
“2” indicates a contact, and “3” indicates a coil.

また、結線記憶部2Bは縦結線を定義し、シンボル「0」
は縦結線なしを、「1」は縦結線ありをそれぞれ示す。
更に、オペランド記憶部2CはPCの記憶部における入力領
域、出力領域、メモリ領域のアドレスをオペランドとし
て記憶するものである。
Also, the connection storage unit 2B defines a vertical connection, and the symbol "0" is set.
Indicates that there is no vertical connection, and "1" indicates that there is vertical connection.
Further, the operand storage unit 2C stores the addresses of the input area, the output area, and the memory area in the storage unit of the PC as operands.

再び第2図において、3は図情報/命令語変換部であ
り、この変換部3は図情報バッファ2と後述するプログ
ラム格納メモリ10との間で図情報と命令語とを相互に変
換するためのもので、プログラムの作成時に図情報バッ
ファ2の内容を命令語に変換し、また、作成後のプログ
ラムの訂正や確認の際にプログラム格納メモリ10から命
令語を読み出して図情報に変換し、これを図情報バッフ
ァ2に格納すると共にCRT50′に表示するためのもので
ある。
In FIG. 2 again, 3 is a figure information / instruction word conversion section, and this conversion section 3 converts the figure information and the instruction word between the figure information buffer 2 and the program storage memory 10 described later. When the program is created, the contents of the drawing information buffer 2 are converted into command words, and when the created program is corrected or confirmed, the command words are read from the program storage memory 10 and converted into drawing information. This is for storing this in the figure information buffer 2 and displaying it on the CRT 50 '.

プログラム格納メモリ10は作成されたプログラムを格納
するもので、プログラムを構成する一つの命令語はオペ
コード及びオペランドからなり、第6図に示すごとく、
これらはオペコード記憶部10A及びオペランド記憶部10B
にそれぞれ格納される。この第6図において、オペコー
ド「1」は読み出し処理(リード)を、「2」は理論積
(アンド)を、「3」は理論和(オア)を、「4」は書
き込み処理(ライト)をそれぞれ示す。
The program storage memory 10 stores the created program, and one instruction word that constitutes the program consists of an operation code and an operand. As shown in FIG.
These are the operation code storage unit 10A and the operand storage unit 10B.
Stored in each. In FIG. 6, the operation code “1” indicates a read process (read), “2” indicates a theoretical product (AND), “3” indicates a theoretical sum (OR), and “4” indicates a write process (write). Shown respectively.

更に、プログラム格納メモリ10には命令解析部20が接続
されている。この命令解析部20は、キーボード1からの
チェック信号により命令語の解析を行うためのものであ
り、その解析終了時に不法使用検索部40に対してチェッ
ク信号を送信するようになっている。
Furthermore, an instruction analysis unit 20 is connected to the program storage memory 10. The instruction analysis unit 20 is for analyzing an instruction word by a check signal from the keyboard 1, and transmits a check signal to the illegal use search unit 40 at the end of the analysis.

また、命令解析部20にはPCの記憶部の使用状況を示す使
用状況格納メモリ30が接続され、この格納メモリ30は、
第7図に示すようにPCの記憶部のアドレスであるオペラ
ンドが記憶されるオペランド記憶部30Aと、各オペラン
ドに対応して当該アドレスに対する読み出し数及び書き
込み数を記憶する読み出し数記憶部30B及び書き込み数
記憶部30Cとを備えている。
Further, the instruction analysis unit 20 is connected to a usage status storage memory 30 indicating the usage status of the storage unit of the PC, and the storage memory 30 is
As shown in FIG. 7, an operand storage unit 30A that stores an operand that is an address of the storage unit of the PC, a read number storage unit 30B that stores the number of reads and the number of writes for the address corresponding to each operand, and a write And a number storage unit 30C.

そして、この使用状況格納メモリ30と前記命令解析部20
及びCRT50′には不法使用検索部40が接続されている。
この検索部40は、命令解析部20からの解析終了を示すチ
ェック信号を受け、使用状況格納メモリ30の各オペラン
ドに対する読み出し数及び書き込み数により、PCの記憶
部に不法使用がないかどうかを検索し、その結果をCRT5
0′に表示するべく構成されている。
Then, the usage status storage memory 30 and the instruction analysis unit 20
An illegal use search unit 40 is connected to the CRT 50 '.
The search unit 40 receives a check signal indicating the end of analysis from the instruction analysis unit 20 and searches the storage unit of the PC for illegal use based on the number of reads and the number of writes for each operand of the usage status storage memory 30. And the result is CRT5
It is configured to display 0 '.

なお、第2図において、4はPCインタフェースであり、
プログラムの作成後にキーボード1から送られる格納信
号を受け、プログラム格納メモリ10内のプログラムを図
示されていないPCに送るためのものである。
In addition, in FIG. 2, 4 is a PC interface,
This is for receiving a storage signal sent from the keyboard 1 after creating the program and sending the program in the program storage memory 10 to a PC (not shown).

次に、このプログラミング装置の作用について説明す
る。
Next, the operation of this programming device will be described.

まず、プログラムを作成する際には、キーボード1のプ
ログラム作成開始キーを操作した後、CRT50′の画面に
リレー回路図を描く要領で行い、その場合にはキーボー
ド1のカーソル移動キーの操作により、カーソルを画面
の上下左右に移動させて所望の入力位置を選択する。
First, when creating a program, after operating the program creation start key of the keyboard 1, draw a relay circuit diagram on the screen of the CRT 50 ', and in that case, by operating the cursor movement key of the keyboard 1, Move the cursor vertically and horizontally on the screen to select the desired input position.

次いで、例えば接点キーが入力されると、図情報バッフ
ァ2の対応するカーソル位置のシンボル記憶部2Aにシン
ボル「2」が格納され、同時に接点の図形がCRT50′に
表示される。また、コイルキーが入力されると、図情報
バッファ2の対応するカーソル位置のシンボル記憶部2A
にシンボル「3」が格納されると共に、コイルの図形が
CRT50′に表示される。
Next, for example, when a contact key is input, the symbol "2" is stored in the symbol storage unit 2A at the corresponding cursor position in the drawing information buffer 2, and at the same time, the contact figure is displayed on the CRT 50 '. When the coil key is input, the symbol storage unit 2A at the corresponding cursor position in the drawing information buffer 2
The symbol "3" is stored in the
Displayed on CRT50 '.

また、横結線キーの入力時には対応するシンボル記憶部
2Aにシンボル「1」が格納されて表示され、縦結線キー
の入力時には結線記憶部2Bにシンボル「1」が格納され
て表示される。そして、数字キーが入力されると、対応
するカーソル位置のオペランド記憶部2Cにこの数字が格
納され、同時にCRT50′に表示される。
In addition, when the horizontal connection key is input, the corresponding symbol storage section
The symbol "1" is stored and displayed in 2A, and the symbol "1" is stored and displayed in the connection storage unit 2B when the vertical connection key is input. Then, when a numeral key is input, the numeral is stored in the operand storage unit 2C at the corresponding cursor position and simultaneously displayed on the CRT 50 '.

このようにしてCRT50′の画面上にラダー図が作成され
ていき、このラダー図のモデルが図情報バッファ2に記
憶される。第4図及び第5図は上記入力操作に対応する
CRT50′の画面及び図情報バッファ2の内容である。
In this way, the ladder diagram is created on the screen of the CRT 50 ', and the model of this ladder diagram is stored in the diagram information buffer 2. 4 and 5 correspond to the above input operation.
The contents of the screen of the CRT 50 'and the drawing information buffer 2 are shown.

プログラムの作成終了時にキーボード1のプログラム作
成終了キーが入力されると、第2図に示した図情報/命
令語変換部3に変換信号が送られ、図情報/命令語変換
部3は図情報バッファ2の内容を命令語に変換してプロ
グラム格納メモリ10に格納する。この場合、第6図に示
す如く、前記各シンボルはそれぞれオペコード「1」
(読み出し処理),「3」(論理和すなわち並列接
続),「2」(論理積すなわち直列接続),「4」(書
き込み処理)に対応付けられ、各オペコード毎にオペラ
ンド「001」,「002」,「102」,「201」が格納され
る。
When the program creation end key of the keyboard 1 is input at the end of program creation, a conversion signal is sent to the diagram information / command word conversion unit 3 shown in FIG. The contents of the buffer 2 are converted into command words and stored in the program storage memory 10. In this case, as shown in FIG. 6, each of the symbols has an opcode "1".
(Reading process), "3" (logical sum or parallel connection), "2" (logical product or series connection), "4" (writing process), and operands "001" and "002" for each opcode. , “102”, and “201” are stored.

次に、この作成後のプログラムをチェックする際の作用
を、第8図の命令解析部20の処理を示すフローチャート
及び第9図の不法使用検索部40の処理を示すフローチャ
ートを参照しつつ詳細に説明する。
Next, the operation of checking the created program will be described in detail with reference to the flowchart showing the process of the instruction analysis unit 20 in FIG. 8 and the flowchart showing the process of the illegal use search unit 40 in FIG. explain.

まず、命令解析部20は使用状況格納メモリ30を初期化す
る(第8図ステップS1)。ここで、「初期化する」と
は、使用状況格納メモリ30を何のデータも登録されてい
ない状態にすることをいう。
First, the instruction analysis unit 20 initializes the usage status storage memory 30 (step S1 in FIG. 8). Here, “initialize” means to set the usage status storage memory 30 in a state in which no data is registered.

次に、命令取り出しポインタをプログラム格納メモリ10
の先頭にセットし(同S2)、ステップS3を経て命令取り
出しポインタ位置から命令語を1語取り出す(同S4)と
共に、取り出した命令語からオペランドを抽出する(同
S5)。そして、このオペランドを使用状況格納メモリ30
のオペランド記憶部30Aから捜す(同S6)。
Next, the instruction fetch pointer is set to the program storage memory 10
Is set to the head of the instruction (step S2), and one instruction word is fetched from the instruction fetch pointer position via step S3 (step S4), and an operand is extracted from the fetched instruction word (step S3).
S5). Then, this operand is used as the usage status storage memory 30
Is searched from the operand storage unit 30A (step S6).

ここで、使用状況格納メモリ30に該当するオペランドが
ない場合(解析当初は上記ステップS1の初期化により、
最初のオペランドは常に格納されていない)、このオペ
ランドを使用状況格納メモリ30のオペランド記憶部30A
に登録し(同S7)、読み出し数記憶部30B及び書き込み
数記憶部30Cの各数をゼロにしてこの登録位置(以下、
オペランド位置という)を記憶しておく(同S81)。ま
た、2回目以後の命令語の解析において、前記オペラン
ドが使用状況格納めもり30に既に登録されている時は、
このオペランド位置を記憶する(同S82)。
Here, if there is no corresponding operand in the usage status storage memory 30 (at the beginning of the analysis, by the initialization in step S1 above,
The first operand is not always stored), this operand is used as the operand storage unit 30A of the usage storage memory 30.
(The same S7), and the respective numbers of the read number storage section 30B and the write number storage section 30C are set to zero, and this registration position (hereinafter,
The operand position) is stored (at step S81). When the operand is already registered in the usage status storage memory 30 in the analysis of the instruction word after the second time,
This operand position is stored (at step S82).

次に、ステップS4において取り出した命令語からオペコ
ードを抽出し(同S9)、このオペコードから命令語が書
き込み処理であるか否かを判定する(同S10)。ここ
で、オペコード「1」,「2」,「3」は読み出し処
理、「4」は書き込み処理である。オペコードが読み出
し処理である場合には、上記ステップS81またはS82にお
いて記憶したオペランド位置の読み出し数記憶部30Bに
対して読み出し数をインクリメント(+1)し(同S11
1)、また、オペコードが書き込み処理であれば書き込
み数記憶部30Cに対して書き込み数をインクリメントす
る(同S112)。
Next, the operation code is extracted from the instruction word fetched in step S4 (at step S9), and it is determined from this operation code whether or not the instruction word is a writing process (at step S10). Here, the operation codes “1”, “2”, and “3” are read processing, and “4” is write processing. When the operation code is a read process, the read number is incremented (+1) to the read number storage unit 30B at the operand position stored in step S81 or S82 (S11
1) If the operation code is a writing process, the writing number is incremented in the writing number storage section 30C (at step S112).

次いで、命令取り出しポインタをインクリメントし(同
S12)、上述の処理をプログラム格納メモリ10に格納さ
れているすべての命令語について繰り返す(同S3)。
Then, the instruction fetch pointer is incremented (
S12), the above process is repeated for all the instruction words stored in the program storage memory 10 (at step S3).

上記解析処理が完了した場合、命令解析部20は不法使用
検索部40に対してチェック信号を送り、この不法使用検
索部40によってPCの記憶部の不法使用が行われていない
かどうかの検索を開始する。
When the above analysis processing is completed, the instruction analysis unit 20 sends a check signal to the illegal use search unit 40, and the illegal use search unit 40 searches for illegal use of the storage unit of the PC. Start.

すなわち、第9図に示すように、まずポインタを使用状
況格納メモリ30の先頭にセットし(ステップST1)、同S
T2を経てポインタ位置のオペランドを取り出すと共に、
取り出したオペランドがPCの記憶部の入力領域のアドレ
スか、出力領域のアドレスか、またはメモリ領域のアド
レスかを判定する(同ST3,ST4)。この判定基準はPCの
仕様により、例えばオペランド「0」〜「99」が入力領
域、「100」〜「199」がメモリ領域、「200」〜「299」
が出力領域となっている。
That is, as shown in FIG. 9, first, the pointer is set at the head of the usage status storage memory 30 (step ST1), and the same S
While taking out the operand at the pointer position via T2,
It is determined whether the fetched operand is the address of the input area of the storage unit of the PC, the address of the output area, or the address of the memory area (at ST3 and ST4). Depending on the specifications of the PC, this judgment criterion is, for example, operands "0" to "99" in the input area, "100" to "199" in the memory area, and "200" to "299".
Is the output area.

ここで、入力領域とは、接点等のコントローラに対して
外部から入力されたデータを記憶する領域、出力領域と
はコイル等のコントローラから外部へ出力するデータを
記憶する領域であり、プログラマブルコントローラのプ
ログラムは、上記入力領域のデータから出力データを作
り、これを上記出力領域へ書き込んでいる。
Here, the input area is an area for storing data externally input to the controller such as a contact, and the output area is an area for storing data output from the controller such as a coil to the outside. The program creates output data from the data in the input area and writes it in the output area.

このことから、プログラムにより入力領域に対して書き
込み処理が行われることは異常と判断し、また、出力領
域をプログラムにより読み出すことは少ないため、出力
領域に対して書き込み処理がある場合には読み出し処理
が一度もなくても異常と判断しないこととしている。
From this, it is judged that it is abnormal that the writing process is performed on the input area by the program, and the output area is rarely read by the program. Even if it does not occur once, it will not be judged as abnormal.

そして、取り出したオペランドが入力領域のアドレスで
あればポインタ位置の書き込み数を取り出し、書き込み
数がゼロでない場合はこのオペランドとメッセージ「入
力に書き込み」をCRT50′に表示する(同ST51,ST61)。
つまり、「入力領域に書き込み処理が行われているこ
と」を表示する。また、この表示の後、及び書き込み数
がゼロである時には、ポインタをインクリメントして
(同ST9)ステップST2の判定に戻る。
If the fetched operand is the address of the input area, the number of writes at the pointer position is fetched, and if the number of writes is not zero, this operand and the message "Write to input" are displayed on the CRT 50 '(ST51, ST61).
That is, "the writing process is being performed in the input area" is displayed. After this display and when the number of writes is zero, the pointer is incremented (ST9 of the same) and the process returns to the determination of step ST2.

更に、取り出したオペランドが出力領域のアドレスであ
る場合、ポインタ位置の書き込み数を取り出してこれが
ゼロの場合にはこのオペランドとメッセージ「出力が読
み出しのみ」をCRT50′に表示する(同ST52,ST62)。つ
まり、「書き込み処理が行われていない出力領域に対し
て読み出し処理が行われていること」を表示する。そし
てこの表示後、及び書き込み数がゼロでない場合にはス
テップST9に移行する。
Further, when the fetched operand is the address of the output area, the number of writes at the pointer position is fetched, and when this is zero, this operand and the message "output is read only" are displayed on the CRT 50 '(at ST52, ST62). . In other words, "the reading process is performed on the output area where the writing process is not performed" is displayed. After this display and when the number of writes is not zero, the process proceeds to step ST9.

次いで、取り出したオペランドが入力領域でも出力領域
でもなく、メモリ領域のアドレスである場合には、ポイ
ンタ位置の読み出し数を取り出してこれがゼロの場合に
はこのオペランドとメッセージ「メモリが書き込みの
み」をCRT50′に表示する(同ST53,ST63)。つまり、
「書き込み処理が行われているが読み出し処理が行われ
ていないメモリ領域があること」を表示する。なお、読
み出し数がゼロでない場合はステップST7に移る。
Next, if the fetched operand is neither the input area nor the output area, but is the address of the memory area, the number of readings at the pointer position is fetched, and if this is zero, this operand and the message "Memory is write only" are sent to CRT50. Displayed in ′ (ST53, ST63). That is,
“There is a memory area where writing processing is performed but reading processing is not performed” is displayed. If the read number is not zero, the process proceeds to step ST7.

続けて、ポインタ位置の書き込み数を取り出し、これが
ゼロの場合にはオペランドとメッセージ「メモリが読み
出しのみ」をCRT50′に表示する(同ST7,ST8)。つま
り、「書き込み処理が行われていないメモリ領域に対し
て読み出し処理が行われていること」を表示する。な
お、書き込み数がゼロでない場合はステップST9に移
る。
Subsequently, the number of writings at the pointer position is taken out, and when it is zero, the operand and the message "Memory is read only" are displayed on the CRT 50 '(at ST7 and ST8). In other words, "the reading process is being performed on the memory area where the writing process is not performed" is displayed. If the number of writes is not zero, the process proceeds to step ST9.

上述の処理を使用状況格納メモリ30に格納されたすべて
のオペランドに対して行い、その完了時に検索を終える
(同ST2)。
The above-described processing is performed for all the operands stored in the usage status storage memory 30, and the search is completed when the operation is completed (ST2 of the same).

以上のようにこの実施例によれば、PCの記憶部において
制御対象からの入力を記憶するべき入力領域に対して書
き込み処理が行われている場合、制御対象への出力を記
憶するべき出力領域に対して書き込み処理が行われてい
ないにも拘らず読み出し処理が行われている場合、更に
は、PCの記憶部における書き込み処理が行われていない
メモリ領域に対して読み出し処理が行われている場合、
書き込み処理が行われているが読み出し処理が行われて
いないメモリ領域がある場合、等をCRT50′を介して警
告することにより、プログラムの読み出し/書き込み異
常を自動的にチェックして表示することができるもので
ある。
As described above, according to this embodiment, when the writing process is performed in the storage area of the PC to store the input from the controlled object, the output area to store the output to the controlled object. If the read process is performed even though the write process has not been performed on the memory, the read process is further performed on the memory area in the storage unit of the PC where the write process is not performed. If
If there is a memory area that is being written but not read, a warning such as "CRT50 '" will be displayed to automatically check and display the program read / write error. It is possible.

なお、上記実施例では、チェック結果をCRT50′に表示
出力する場合について説明したが、警告出力装置として
はプリンタ等の印字装置であってもよい。また、仕様状
況格納メモリ30には読み出し数と書き込み数ばかりでな
く、読み出しや書き込みが行われているプログラムのア
ドレスも格納し、このアドレスを警告メッセージと共に
表示することも可能である。
In the above embodiment, the case where the check result is displayed and output on the CRT 50 'has been described, but the warning output device may be a printing device such as a printer. It is also possible to store not only the number of readings and the number of writings but also the address of the program being read or written in the specification status storage memory 30 and display this address together with a warning message.

(発明の効果) 以上のように本発明によれば、作成後のプログラムを命
令解析部により解析してPCの記憶部の使用状況をメモリ
に格納し、その内容を不法使用検索部により検索して読
み出し/書き込み以上を自動的にチェックしたうえ警告
出力装置により警告するものであるから、従来多くの労
力や時間を要していたPCのプログラムチェック作業を大
幅に簡略化することができる。また、人為的なチェック
ミスも解消できるため、プログラムの信頼性向上に寄与
できる等の効果を有する。
(Effect of the invention) As described above, according to the present invention, the created program is analyzed by the instruction analysis unit, the usage status of the storage unit of the PC is stored in the memory, and the content is searched by the illegal use search unit. Since it automatically checks for read / write or more and then issues a warning by the warning output device, it can greatly simplify the PC program check work, which conventionally required a lot of labor and time. Further, since it is possible to eliminate an artificial check error, it is possible to contribute to improving the reliability of the program.

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

第1図は本発明の構成を示すブロック図、第2図は本発
明の一実施例を示すブロック図、第3図はキーボードの
説明図、第4図はCRTの表示例の説明図、第5図は図情
報バッファの説明図、第6図はプログラム格納メモリの
説明図、第7図は使用状況格納メモリの説明図、第8図
は命令解析部の処理を示すフローチャート、第9図は不
法使用検索部の処理を示すフローチャートである。 10……プログラム格納メモリ 20……命令解析部、30……使用状況格納メモリ 40……不法使用検索部、50……警告出力装置 1……キーボード、2……図情報バッファ 3……図情報/命令語変換部 4……PCインタフェース、50′……CRT
1 is a block diagram showing the configuration of the present invention, FIG. 2 is a block diagram showing an embodiment of the present invention, FIG. 3 is an explanatory diagram of a keyboard, FIG. 4 is an explanatory diagram of a display example of a CRT, and FIG. FIG. 5 is an explanatory diagram of a diagram information buffer, FIG. 6 is an explanatory diagram of a program storage memory, FIG. 7 is an explanatory diagram of a usage status storage memory, FIG. 8 is a flowchart showing processing of an instruction analysis unit, and FIG. It is a flow chart which shows processing of an illegal use search part. 10 …… Program storage memory 20 …… Instruction analysis unit, 30 …… Usage status storage memory 40 …… Illegal use search unit, 50 …… Warning output device 1 …… Keyboard, 2 …… Figure information buffer 3 …… Figure information / Command conversion unit 4 …… PC interface, 50 ′ …… CRT

フロントページの続き (72)発明者 乳井 直樹 神奈川県川崎市川崎区田辺新田1番1号 富士電機株式会社内 (56)参考文献 特開 昭57−143608(JP,A) 特開 昭63−201736(JP,A)Continuation of the front page (72) Inventor Naoki Yui, 1-1 Tanabe Nitta, Kawasaki-ku, Kawasaki-shi, Kanagawa Fuji Electric Co., Ltd. (56) References JP-A-57-143608 (JP, A) JP-A-63- 201736 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】作成されたプログラマブルコントローラの
プログラムを格納するプログラム格納メモリと、 このプログラム格納メモリから前記プログラムを構成す
る命令語を順次取り出し、この命令による処理の対象と
なる前記プログラマブルコントローラの記憶部上のアド
レスを抽出すると共に、前記命令語が読み出し命令であ
るか書き込み命令であるかの命令の種類に応じて前記プ
ログラマブルコントローラの記憶部に対する読み出し数
及び書き込み数を加算する命令解析部と、 前記アドレスについての読み出し数及び書き込み数をそ
れぞれ格納して前記プログラマブルコントローラの記憶
部の使用状況を示す使用状況格納メモリと、 この使用状況格納メモリの内容から、前記プログラマブ
ルコントローラの記憶部に書き込み処理を行っている入
力領域が存在し、または、読み出し処理のみで書き込み
処理が行われていない出力領域が存在し、あるいは、読
み出しまたは書き込み処理のみが行われているメモリ領
域が存在することを検索する不法使用検索部と、 この不法使用検索部による上記検索結果を前記プログラ
ム中の読み出し/書き込み異常として警告する警告出力
装置とを備えたことを特徴とするプログラマブルコント
ローラのプログラミング装置。
1. A program storage memory for storing a created program of a programmable controller, and an instruction word constituting the program is sequentially taken out from the program storage memory, and a storage unit of the programmable controller to be processed by the instruction. An instruction analysis unit that extracts the upper address and adds the number of reads and the number of writes to the storage unit of the programmable controller according to the type of instruction whether the instruction word is a read instruction or a write instruction; A usage status storage memory that stores the number of reads and the number of writes for an address and indicates the usage status of the storage unit of the programmable controller, and write processing to the storage unit of the programmable controller from the contents of the usage status storage memory. There is an input area that exists, or an output area that is only read processing but not writing processing, or there is a memory area that is only read or writing processing. And a warning output device that warns the search result by the illegal use search unit as a read / write abnormality in the program.
JP63078630A 1988-03-31 1988-03-31 Programmable controller programming device Expired - Lifetime JPH07113844B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63078630A JPH07113844B2 (en) 1988-03-31 1988-03-31 Programmable controller programming device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63078630A JPH07113844B2 (en) 1988-03-31 1988-03-31 Programmable controller programming device

Publications (2)

Publication Number Publication Date
JPH01251109A JPH01251109A (en) 1989-10-06
JPH07113844B2 true JPH07113844B2 (en) 1995-12-06

Family

ID=13667195

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63078630A Expired - Lifetime JPH07113844B2 (en) 1988-03-31 1988-03-31 Programmable controller programming device

Country Status (1)

Country Link
JP (1) JPH07113844B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013114540A1 (en) * 2012-01-30 2013-08-08 富士通株式会社 Control device, analysis device, analysis method, and analysis program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57143608A (en) * 1981-03-03 1982-09-04 Mitsubishi Electric Corp Programming device with crt
JPS63201736A (en) * 1987-02-18 1988-08-19 Toshiba Corp Programming device for programmable controller

Also Published As

Publication number Publication date
JPH01251109A (en) 1989-10-06

Similar Documents

Publication Publication Date Title
US4694420A (en) Inverse assembly method and apparatus
JPS60243795A (en) Alteration program setting system for electronic register
US4108360A (en) Method of error analysis and diagnosis in electronic data processing systems
JP2001034497A (en) Method for acquiring binary code of inverse assembler
CN114610557B (en) Method and device for testing equipment driving unit
JPH07113844B2 (en) Programmable controller programming device
EP0059758A1 (en) Numerical control unit
US4727502A (en) Programmable electronic calculator
JPS60159951A (en) Tracing system in information processing device
CN108932171B (en) Embedded software interaction method
JP2888242B2 (en) Microprocessor program development system
JPH06187015A (en) Program converter for sequencer
JPH0719311B2 (en) Data processing device
JP2893989B2 (en) Electronic cash register
JPH0756632B2 (en) Assembler instruction boundary error detection processing method
EP0545396A2 (en) Apparatus and method for information processing
JP2600484B2 (en) Programmable controller
JP3114199B2 (en) List output method of language processing system
JP3031732B2 (en) Image display control device
GB2126761A (en) Inverse assembler
JP2532621B2 (en) Digital processor
JP2000222243A (en) Device and method for debugging
JP2000305808A (en) Method and device for detecting event in system including microcomputer
JPH03282637A (en) Preparation system for test specifications
JPH04246726A (en) Inspection system for module specifications

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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: 20071206

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 13

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 13