JPS6211367B2 - - Google Patents

Info

Publication number
JPS6211367B2
JPS6211367B2 JP54086670A JP8667079A JPS6211367B2 JP S6211367 B2 JPS6211367 B2 JP S6211367B2 JP 54086670 A JP54086670 A JP 54086670A JP 8667079 A JP8667079 A JP 8667079A JP S6211367 B2 JPS6211367 B2 JP S6211367B2
Authority
JP
Japan
Prior art keywords
program
contact
circuit section
instruction
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP54086670A
Other languages
Japanese (ja)
Other versions
JPS5611502A (en
Inventor
Toshihiko Yomogida
Seiji Fujisaki
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.)
Toyoda Koki KK
Original Assignee
Toyoda Koki KK
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 Toyoda Koki KK filed Critical Toyoda Koki KK
Priority to JP8667079A priority Critical patent/JPS5611502A/en
Priority to FR8015186A priority patent/FR2461294A1/en
Publication of JPS5611502A publication Critical patent/JPS5611502A/en
Publication of JPS6211367B2 publication Critical patent/JPS6211367B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13052Display of ladder diagram
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13153Modification, change of program in real time

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

本発明はシーケンスコントローラのメモリに書
込まれているシーケンスプログラムを修正するプ
ログラム修正装置、詳しくは陰極線表示管(以下
CPTと呼ぶ)等の表示画面上に表示されたラダ
ーダイアグラムを見ながらプログラム修正を行う
プログラム修正装置に関する。 近年、シーケンスコントローラのメモリに記憶
されているシーケンスプログラムを、リレー接点
を連続的に接続したラダーダイアグラムに変換し
てCRT画面上に表示し、このCRT画面上に表示
されたダイアグラムを見て回路修正を行えるよう
にしたプログラム修正装置が開発され、このもの
においては、ダイアグラム上の所定の接点を指定
して消去操作を行うことによつて指定した接点に
対応するシーケンスプログラムを削除したり、所
定の接点を指定した後で接点追加の操作を行うこ
とによつてシーケンスプログラムを新たに追加挿
入することができる。しかしながら、このものに
おいては、キー操作によつて入力されたプログラ
ムを、指定された接点に対応するシーケンスプロ
グラムの前に機械的に挿入するだけであるため第
1図に示すように、複数の接点I2,I3にまた
がつて接点I5を並列的に追加接続するといつ
た、複数の接点に対して並列的に接点を追加する
場合の操作が非常に面倒であつた。 すなわち、上記の例のように、複数の接点I2
とI3にまたがつて接点I5を並列的に接続した
場合、シーケンスプログラムにおいては、接点I
4をテストするシーケンスプログラムの前に接点
I5をテストするプログラムを追加するだけでな
く、このテストプログラムの前と、接点I2のに
対応するシーケンスプログラムの前に、接点を並
列接続した場合に必要とされる補助命令を挿入し
なければならないため、従来の装置で接点I5の
追加を行う場合には、接点I4を指定して接点I
5をテストするシーケンスプログラムを挿入した
後で、補助命令を挿入し、この後、接点の指定を
I4からI2に変更して再び補助命令を書込む必
要があつた。 また、上述の説明からも明らかなように、従来
の装置においては、連続するシーケンスプログラ
ムのどの位置にテストプログラムと補助命令を追
加したら良いのかを作業者が判断しなければなら
ないだけでなく、ラダーダイアグラム上のどの接
点を指定してプログラムの追加を行うとシーケン
スプログラムのどの位置にプログラムが追加され
るということを知つていなければならず、特定の
作業者でないとプログラム修正ができない欠点が
あつた。 本発明はそのような従来の問題点に鑑み、新た
に追加する接点を並列的に接続する回路区間をシ
フトキーとカーソル残しキーの操作によつて指定
することにより、追加接点の接続モードを自動判
別し、この判別結果に応じてシーケンスプログラ
ム上の必要な位置に追加した接点のテスト命令お
よびそれに伴う分岐命令を自動的に挿入できるよ
うにして、プログラム修正が簡単にかつ短時間で
行えるようにしたもので、以下その実施例を図面
に基づいて説明する。 第2図において10は、メモリ11、演算処理
部12、入力部13、出力部14から成るシーケ
ンスコントローラで、メモリ11にはシーケンス
制御を指令するシーケンスプログラムが表1に示
す命令語を用いて書込まれている。
The present invention relates to a program modifying device for modifying a sequence program written in the memory of a sequence controller, and more particularly to a cathode ray display tube (hereinafter referred to as
This invention relates to a program modification device that performs program modification while viewing a ladder diagram displayed on a display screen such as CPT. In recent years, the sequence program stored in the memory of a sequence controller is converted into a ladder diagram in which relay contacts are connected consecutively and displayed on a CRT screen, and the circuit can be modified by looking at the diagram displayed on the CRT screen. A program correction device has been developed that allows for the deletion of a sequence program corresponding to a specified contact point by specifying a specified contact point on a diagram and performing an erase operation. After specifying a contact point, a new sequence program can be inserted by performing an operation for adding a contact point. However, in this method, the program input by key operation is simply inserted mechanically before the sequence program corresponding to the designated contact point, so as shown in Fig. 1, there are multiple contact points. It is very troublesome to add a contact in parallel to a plurality of contacts, such as adding a contact I5 in parallel across I2 and I3. That is, as in the above example, multiple contacts I2
When contact I5 is connected in parallel across I3 and I3, in the sequence program, contact I
In addition to adding a program to test contact I5 before the sequence program that tests contact I5, it is necessary to add the program that tests contact I5 before this test program and before the sequence program that corresponds to contact I2. Therefore, when adding contact I5 to a conventional device, it is necessary to specify contact I4 and add contact I5.
After inserting the sequence program for testing 5, it was necessary to insert the auxiliary command, change the contact designation from I4 to I2, and write the auxiliary command again. Furthermore, as is clear from the above explanation, in conventional equipment, not only must the operator judge where to add the test program and auxiliary commands in the continuous sequence program, but the operator must also If you specify which contact point on the diagram to add a program, you must know at which position in the sequence program the program will be added, and there is a drawback that only a specific operator can modify the program. Ta. In view of such conventional problems, the present invention automatically determines the connection mode of the additional contact by specifying the circuit section in which the newly added contact is connected in parallel by operating the shift key and the cursor leave key. Based on the results of this determination, additional contact test instructions and accompanying branch instructions can be automatically inserted into the necessary positions on the sequence program, making it easy and quick to modify the program. Embodiments thereof will be described below based on the drawings. In FIG. 2, 10 is a sequence controller consisting of a memory 11, an arithmetic processing section 12, an input section 13, and an output section 14. A sequence program for instructing sequence control is written in the memory 11 using the command words shown in Table 1. It's included.

【表】 命令語にはテスト命令(TNA〜TFE)、条件出
力命令(YON)、無条件出力命令(SON)、分岐
命令(JMY,JMN)等があり、これらの内、テ
スト命令と出力命令のオペランド部にはリミツト
スイツチ,リレー等の入出力要素を選択する入出
力アドレスがプログラムされ、分岐命令のオペラ
ンド部にはジヤンプ先のメモリアドレスがプログ
ラムされる。 演算処理部12はメモリ11に記憶されている
シーケンスプログラムに基づいて入出力部13,
14に接続されている入出力要素のテストと、テ
スト結果に基づく出力要素の付勢、無勢を繰返え
してシーケンス制御を実行するもので、外部から
割込み信号INSが与えられた場合にはシーケンス
制御を停止し、外部からの指令に応じてメモリ1
1に記憶されているシーケンスプログラムデータ
を外部へ出力したり、外部から与えられたシーケ
ンスプログラムデータをメモリ11に書込んだり
する機能を有している。 一方、20は、CRT画面上に表示されたラダ
ーダイアグラムを見ながらシーケンスプログラム
の追加修正が行えるようにしたプログラム修正装
置で、操作パネル21、演算制御回路22、バツ
フアメモリ23、リフレツシユメモリ24、パタ
ーンジエネレータ25、映像信号発生回路26、
CRT27、表示制御回路28によつて構成され
ている。 操作パネル21上には第3図に示すように多数
の操作キー30〜41が設けられており、これら
の内、読出キー30が押されると、演算制御回路
22は、第4図aに示す制御ルーチンのステツプ
(40)〜(42)を順番に実行し、シーケンスコン
トローラ10に割込み信号を送出してシーケンス
制御を中止した後、メモリ11に記憶されている
シーケンスプログラムの全てを読出して、バツフ
アメモリ23内に設けられたプログラムストアエ
リアPSAに記憶する。第5図はバツフアメモリ2
3内のエリア分けを示すもので、プログラムスト
アエリアPSAはシーケンスコントローラ10のメ
モリ11に記憶されているシーケンスプログラム
の長さに応じて設定されている。 この後、作業者が数値キー31によつて、回路
修正を行いたい回路の出力要素のアドレスを入力
した後、サーチスイツチ32を押圧すると、演算
制御回路22は第4図bに示すプログラムに基づ
き、指定された出力要素のオンオフに関連するシ
ーケンスプログラムをサーチし、これを所定のデ
ータに変換してリフレツシユメモリ24に書込む
ことによつてサーチされたシーケンスプログラム
の表示を行う。 すなわち、演算制御回路22はステツプ(43)
〜(45)のプログラムで、プログラムストアエリ
アPSAに記憶さているシーケンスプログラムを順
番に読出してバツフアメモリ23内の表示プログ
ラムエリアDPAに書込んで行き、出力命令が書
込まれたことが検出されると、ステツプ(45)か
らステツプ(46)へ移行して、書込まれた出力命
令が数値キー31で指定された出力要素に関連す
るものであるか否かをアドレス部のデータを参照
して判別する。そして、書込まれた出力命令が指
定された出力要素に関するものでないと判定され
た場合にはステツプ(47)で表示プログラムエリ
アDPAをクリアした後、ステツプ(43)へ戻
り、書込まれた出力命令が指定された出力要素に
関するものであると判定された場合にはステツプ
(46)からステツプ(48)へ移行する。これによ
り、ステツプ(48)へ移行した時点では表示プロ
グラムエリアDPAに、指定した出力要素のオン
オフに関連する一連のシーケンスプログラムが書
込まれる。 例えば、第6図aに示す回路のシーケンスプロ
グラムを表示したい場合には数値キー31によつ
てリレー01のアドレスを設定してサーチキー3
2を押圧する。これにより、プログラムストアエ
リアPSAに記憶されているシーケンスプログラム
の中からリレー01に対する出力命令を含むシー
ケンスプログラムがサーチされ、これが第6図b
に示すように表示プログラムエリアDPSの先頭番
地Rから順番に書込まれる。 ステツプ(48)は、表示プログラムエリアDPS
に書込まれたシーケンスプログラムを、命令の種
類に応じて所定の表示データに変換してリフレツ
シユメモリ24の所定の記憶エリアに書込むステ
ツプで、書込みが完了すると図略のメインルーチ
ンへ復帰する。リフレツシユメモリ24に書込ま
れた表示データは表示制御回路28の指令によつ
て一定周期毎に読出されるとともに、パターンジ
エネレータ25によつて所定のシンボルパターン
データに変換され、映像信号発生回路26に出力
される。これにより、CRTの表示画面上には第
7図aに示すように、リレー01を出力要素とす
るラダーダイアグラムが表示される。なお、この
時CRTの表示画面上の左端の接点I1の下に
は、プログラム修正時に用いられるカーソル
CORが表示される。 本実施例のプログラム修正装置は、CRT画面
上のラダーダイアグラムを参照して、シーケンス
プログラムの追加の他にシーケンスプログラムの
変更と削除ができるが、シーケンスプログラムの
変更と削除は従来装置と同様の方法で行われるた
め、プログラムの追加についてのみ述べる。 プログラムの追加には、接点を回路に対して直
列的に追加する場合と、回路に対して接点を並列
的に追加接続するとがある。前者の場合には、操
作パネル21上のシフトキー33を操作して接点
を追加したい点の後ろにある接点の下にカーソル
を移動させ、この後、新たに追加する接点の入出
力アドレスを数値キー31で入力するとともに、
接点が常開であるか否かに応じて接点キー38ま
たは39を押圧し、接点追加キー35を押す。一
方、接点を回路に対して並列的に接続する場合に
は、カーソルを接点を並列に接続する回路区間の
最初(左端)の接点の下までシフトした後で、カ
ーソル残しキー34を押圧した状態で回路区間の
最後にある接点までカーソルをシフトさせ、この
後、並列に接続する接点の入出力アドレスを数値
キー31で入力し、接点の種類に応じて接点キー
40,41のいずれかを押し、最後に、接点追加
キー35を押圧する。例えば、第6図aの回路に
おいて、入力要素I2,I3,I4にまたがつて
接点I5を並列的に接続する回路修正を行いたい
場合、シフトキー33を1回押してカーソル
CORを接点I2の下に移動させた後、カーソル
残しキー31を押した状態でシフトキー33を2
回押圧してカーソルを接点I4の下までシフトさ
せ、この後、I5の入出力アドレスを数値キー3
1で入力し、接点キー40と接点追加キー35を
次々に押圧すればよい。なお、カーソル残しキー
34を押圧した状態でカーソルをシフトさせた場
合には第7図aに示すように、カーソルCORが
前の所に残り、どの部分に接点が並列的に接続れ
るかということを確認できるようになつている。 第8図はプログラムの挿入位置を検出する挿入
位置検出ルーチンで、シフトキー33が操作され
た場合と、接点キー38〜41のいずれかが操作
された場合に実行される。前記バツフアメモリ2
3内には、第6図cに示すように、前記表示プロ
グラムエリアDPAの各番地R〜R+nに1対1
で対応した記憶番地S〜S+nを有するカーソル
位置記憶エリアCPAが設けられており、シフト
キー33また接点キー38〜41の操作に関連し
てこのカーソル位置記憶エリアに1を書込んで行
くことによつて、プログラムの書込み位置を検出
する。 すなわち、シフトキー33が操作された場合に
は第8図のステツプ(50)でカーソル残しキー3
4が押圧されているか否かを判別し、押圧されて
いる場合にはステツプ(51)で、カーソル位置記
憶エリアCPA内のデータ書込み位置を指定する
書込みポインタで指定された番地へ1を書込んだ
後、ステツプ(52)で書込みポインタを歩進して
メインルーチンへ復帰し、カーソル残しキー34
が押圧されていない場合には、ステツプ(52)で
書込みポインタの歩進だけを行つてメインルーチ
ンに復帰する。一方、接点キー38〜41のいず
れかが押圧された場合にもステツプ(51),(52)
が実行され、指定された番地への1の書込みと書
込みポインタの歩進とが行われる。 書込みポインタはカーソル位置のシフト動作が
行われる前にS番地を指示するようにセツトされ
るため、画面上のカーソルの位置と、書込みポイ
ンタが指定するエリアは1対1に対応し、上記の
例のように、接点I2〜I4の下にカーソルを表
示せしめた状態で接点I5の追加を指令すると、
第6図cに示すようにカーソル位置記憶エリアの
S+1〜S2+3までに1が書込まれる。 一方、第9図はプログラムストアエリアPSAに
転送されているシーケンスプログラムに、接点の
追加に応じて命令語を挿入するルーチンで、ステ
ツプ(60)で接点の追加態様を判別し、ステツプ
(61)で接点の追加態様に応じた命令語の挿入を
表示プログラムエリアDPA内で行い、この後、
ステツプ(62)で、命令語の挿入されたシーケン
スプログラムに基づいて表示データをリフレツシ
ユメモリ24に書込む。そして、この後、ステツ
プ(63)で、プログラムの挿入されたシーケンス
プログラムをプログラムストアエリアPSA内に
し、修正後のプログラムに分岐命令があれば、ス
テツプ(64)でこの分岐命令の分岐先のアドレス
を書込み、書込みが完了すると、プログラムスト
アエリアPSAにストアされているシーケンスプロ
グラムをステツプ(65)でシーケンスコントロー
ラ10のメモリ11へ転送して動作を完了する。
これにより、修正されたシーケンスプログラムが
シーケンスコントローラ10のメモリ11に記憶
されるとともに、CRTの表示画面には第7図c
に示すような修正後のラダーダイアグラムが表示
される。 このプログラム修正ルーチン内の接点の追加態
様の判別と命令語の挿入は第10図に示すルーチ
ンで行われる。まず接点を回路に対して直列的に
追加するか並列的に追加するかをステツプ(70)
で判別し、直列的に追加することが判別された場
合にはステツプ(71)へ移行してプログラムの追
加が行われる。 接点を直列的に追加する場合の追加態様は一種
類しかなく、カーソル位置記憶エリアCPAの1
が書込まれている番地に対応する表示プログラム
リアDPA内の番地、すなわち、表示プログラム
エリアの先頭番地に対する相対アドレスが1の書
込まれている番地の相対アドレスに等しい番地に
記憶されているシーケンスプログラムの前に、指
定された入力要素をテストするプログラムを挿入
することによつてプログラム修正が完了する。 一方、接点を第7図aに示す回路に対して並列
的に接続する場合には第11図a〜第14図aに
示すように4通りの態様MODE1〜MODE4が
あり、ステツプ(72)〜(74)で接点追加の態様
を判別する。この場合には、接点を並列接続する
回路区間内にある接点I2〜I4をテストするテ
ストプログラムの前には接点I1をテストするテ
ストプログラムがあり、後には出力命令があるこ
とから、区間の前に接点があることがステツプ
(72)で判別され、区間の後が出力命令であるこ
とがステツプ(74)で判別されて接続態様が
MODE3であると判別される。 接続態様がMODE3であると判別された場合
にはステツプ(74)からステツプ(79)へ移行し
てプログラムの追加修正が行われる。まずステツ
プ(79)では、第15図aに示すように表示プロ
グラムエリアDPA内の出力命令の4番地後を5
番地後にSKPとSOFO1のデータを書込み、この
後ステツプ(80)で出力命令YONO1を3番地だ
け番地の大きい方へシフトし、シフトが完了する
とステツプ(81)に移つて第15図bに示すよう
に出力命令の上に分岐命令と追加接点をテストす
るプログラムTNAI5を書込む。そして、この
後、ステツプ(82)に移行してカーソル位置記憶
エリアに1が書込まれている番地に対応する表示
プログラムエリアDPA内の記憶番地、この例で
は、R+1からR+3番地に記憶されている。シ
ーケンスプログラムを第15図cに示すように1
番地ずつ番地の大きい方へシフトし、ステツプ
(83)でこの上に分岐命令JMNを挿入して第15
図dに示すようにプログラム修正を完了する。 第11図b〜第14図bはそれぞれの接続態様
における修正後のシーケンスプログラムを示し、
欄外に二重丸の付されているプログラムが第10
図に示す修正ルーチンで自動的に挿入される。こ
のようにして、修正されたシーケンスプログラム
は前述のように、プログラムストアエリアPSAの
元の位置に書込まれた後、シーケンスコントロー
ラ10のメモリ11に転送され、修正を完了す
る。 なお、上記実施例においては、接点を並列的に
接続する回路区間にある接点をテストするテスト
プログラムの前後に分岐命令を挿入してプログラ
ム修正を行つていたが、シーケンスコントローラ
10が、プツシユダウンスタツクを用いて演算の
途中結果を入れておくようにして演算処理を行う
ものである場合には、回路区間にある接点をテス
トするテストプログラムの前に演算の途中結果を
プツシユダウンスタツクにストアする命令を挿入
し、テストプログラムの後に、追加接点をテスト
するプログラムと、このテスト結果とプツシユダ
ウンスタツクにストアした途中結果との間で論理
和を取る命令語を挿入するようにすればよい。 以上述べたように、本明のプログラム修正装置
においては、新たに追加する接点を並列的に接続
する回路区間をカーソルシフトキーとカーソル残
しキーとの操作により指定すると、追加接点の接
続モードが自動的に判別され、この判別結果に応
じて指定された回路区間の中にある複数の接点を
テストする一連のテストプログラムの前後に、追
加した接点をテストするテスト命令と接点を並列
的に接続した時に必要とされる補助命令とを自動
的に追加挿入するようにしたから、作業者は、接
点を並列的に追加接続する回路区間を指定した後
で、追加接点の種類と入出力アドレスを入力する
だけで回路修正を行うことができる。このため、
接点の追加によるプログラム修正を短時間に行え
るだけでなく、シーケンスコントローラに使用さ
れている命令語の使い方、性質等を全く知らなく
てもプログラム修正が行えるため、リレー回路が
理解できる作業者であればだれでもプログラム修
正ができる利点がある。
[Table] Instruction words include test instructions (TNA to TFE), conditional output instructions (YON), unconditional output instructions (SON), branch instructions (JMY, JMN), etc. Among these, test instructions and output instructions An input/output address for selecting an input/output element such as a limit switch or relay is programmed into the operand part of the branch instruction, and a memory address to jump to is programmed into the operand part of the branch instruction. The arithmetic processing unit 12 operates on the input/output unit 13 based on the sequence program stored in the memory 11.
It executes sequence control by repeatedly testing the input/output elements connected to 14 and energizing and deenergizing the output elements based on the test results.When the interrupt signal INS is given from the outside, Stops sequence control and stores memory 1 in response to external commands.
The memory 11 has a function of outputting sequence program data stored in the memory 11 to the outside and writing sequence program data given from the outside into the memory 11. On the other hand, 20 is a program modification device that allows additional modification of the sequence program while viewing a ladder diagram displayed on a CRT screen. generator 25, video signal generation circuit 26,
It is composed of a CRT 27 and a display control circuit 28. As shown in FIG. 3, a large number of operation keys 30 to 41 are provided on the operation panel 21, and when the read key 30 is pressed, the arithmetic control circuit 22 causes the Steps (40) to (42) of the control routine are executed in order, an interrupt signal is sent to the sequence controller 10 to stop the sequence control, and then all of the sequence programs stored in the memory 11 are read out and stored in the buffer memory. It is stored in the program store area PSA provided in 23. Figure 5 shows buffer memory 2.
The program store area PSA is set according to the length of the sequence program stored in the memory 11 of the sequence controller 10. Thereafter, when the operator presses the search switch 32 after inputting the address of the output element of the circuit to be modified using the numeric keys 31, the arithmetic control circuit 22 operates based on the program shown in FIG. 4b. , searches for a sequence program related to the on/off of a specified output element, converts this into predetermined data, and writes it into the refresh memory 24, thereby displaying the searched sequence program. That is, the arithmetic control circuit 22 performs step (43).
In the program (45), the sequence programs stored in the program store area PSA are sequentially read and written to the display program area DPA in the buffer memory 23, and when it is detected that an output command has been written. , moves from step (45) to step (46), and determines whether the written output command is related to the output element specified by the numerical key 31 by referring to the data in the address field. do. If it is determined that the written output command is not related to the specified output element, the display program area DPA is cleared in step (47), and then the process returns to step (43) to output the written output. If it is determined that the command relates to the specified output element, the process moves from step (46) to step (48). As a result, when the process moves to step (48), a series of sequence programs related to turning on and off the specified output element is written in the display program area DPA. For example, if you want to display the sequence program for the circuit shown in FIG.
Press 2. As a result, a sequence program including an output command for relay 01 is searched from among the sequence programs stored in the program store area PSA, and this is the sequence program shown in FIG. 6b.
As shown in the figure, data is written in order from the first address R of the display program area DPS. Step (48) is the display program area DPS
This step converts the sequence program written in the program into predetermined display data according to the type of command and writes it into a predetermined storage area of the refresh memory 24. When the writing is completed, the process returns to the main routine (not shown). . The display data written in the refresh memory 24 is read out at regular intervals according to commands from the display control circuit 28, and is converted into predetermined symbol pattern data by the pattern generator 25, and is converted into predetermined symbol pattern data by the video signal generation circuit. 26. As a result, a ladder diagram with relay 01 as an output element is displayed on the display screen of the CRT, as shown in FIG. 7a. At this time, the cursor used when modifying the program is located below contact I1 at the left end of the CRT display screen.
COR is displayed. The program modification device of this embodiment can not only add sequence programs but also change and delete sequence programs by referring to the ladder diagram on the CRT screen, but changing and deleting sequence programs can be done using the same method as in conventional devices. Since this is done in , we will only discuss the addition of programs. When adding a program, there are cases in which contacts are added in series to the circuit, and cases in which contacts are added in parallel to the circuit. In the former case, operate the shift key 33 on the operation panel 21 to move the cursor under the contact after the point to which you want to add a contact, and then press the numeric keys to enter the input/output address of the new contact. 31 and enter
Depending on whether the contact is normally open, the contact key 38 or 39 is pressed, and the contact addition key 35 is pressed. On the other hand, when connecting the contacts in parallel to the circuit, after shifting the cursor to below the first (leftmost) contact in the circuit section where the contacts are connected in parallel, press the cursor leave key 34. Shift the cursor to the last contact in the circuit section, then use the numeric keys 31 to input the input/output address of the contacts to be connected in parallel, and press either contact key 40 or 41 depending on the type of contact. , Finally, press the contact addition key 35. For example, in the circuit of FIG. 6a, if you want to modify the circuit by connecting contact I5 in parallel across input elements I2, I3, and I4, press the shift key 33 once and move the cursor.
After moving COR below contact I2, press shift key 33 while pressing cursor leave key 31.
Press the button twice to shift the cursor to the bottom of contact I4, and then set the input/output address of I5 using the numeric key 3.
1 and press the contact key 40 and the contact addition key 35 one after another. If the cursor is shifted while the cursor leave key 34 is pressed, the cursor COR remains in the previous position, as shown in Figure 7a, and it is difficult to determine which part the contacts are connected in parallel. It is now possible to check. FIG. 8 shows an insertion position detection routine for detecting the insertion position of a program, which is executed when the shift key 33 is operated or when any of the contact keys 38 to 41 is operated. Said buffer memory 2
3, as shown in FIG.
A cursor position storage area CPA is provided with memory addresses S to S+n corresponding to . Then, the writing position of the program is detected. That is, when the shift key 33 is operated, the cursor leave key 3 is pressed in step (50) in FIG.
Determine whether 4 is pressed or not, and if it is pressed, in step (51) write 1 to the address specified by the write pointer that specifies the data write position in the cursor position storage area CPA. After that, step (52) increments the write pointer and returns to the main routine, pressing the cursor leave key 34.
If is not pressed, only the write pointer is incremented in step (52) and the process returns to the main routine. On the other hand, if any of the contact keys 38 to 41 is pressed, steps (51) and (52)
is executed, writing 1 to the specified address and incrementing the write pointer. Since the write pointer is set to point to address S before the cursor position shift operation is performed, there is a one-to-one correspondence between the cursor position on the screen and the area specified by the write pointer, and the above example If you command to add contact I5 with the cursor displayed below contacts I2 to I4, as in
As shown in FIG. 6c, 1 is written in the cursor position storage areas S+1 to S2+3. On the other hand, FIG. 9 shows a routine that inserts a command word into the sequence program transferred to the program store area PSA in accordance with the addition of a contact, in which the mode of addition of a contact is determined in step (60), and the mode of addition of a contact is determined in step (61). Insert the command word according to the contact addition mode in the display program area DPA, and then
In step (62), display data is written into the refresh memory 24 based on the sequence program into which the instruction words have been inserted. Then, in step (63), the inserted sequence program is placed in the program store area PSA, and if there is a branch instruction in the modified program, the address of the branch destination of this branch instruction is entered in step (64). When the writing is completed, the sequence program stored in the program store area PSA is transferred to the memory 11 of the sequence controller 10 in step (65), and the operation is completed.
As a result, the modified sequence program is stored in the memory 11 of the sequence controller 10, and the CRT display screen is displayed as shown in FIG.
The modified ladder diagram shown in is displayed. In this program modification routine, determination of the manner in which contacts are added and insertion of command words are performed in the routine shown in FIG. First, select whether to add contacts in series or in parallel to the circuit (70).
If it is determined that the program should be added serially, the process moves to step (71) and the program is added. When adding contacts in series, there is only one way to add contacts, one in the cursor position memory area CPA.
The sequence stored at the address in the display program area DPA that corresponds to the address where is written, that is, the address whose relative address with respect to the first address of the display program area is equal to the relative address of the address where 1 is written. Program modification is completed by inserting a program that tests specified input elements before the program. On the other hand, when the contacts are connected in parallel to the circuit shown in FIG. 7a, there are four modes MODE1 to MODE4 as shown in FIGS. 11a to 14a, and steps (72) to (74) determines the mode of contact addition. In this case, there is a test program that tests contact I1 before the test program that tests contacts I2 to I4 in the circuit section where the contacts are connected in parallel, and since there is an output command after the test program that tests contacts I2 to I4 in the circuit section where the contacts are connected in parallel, It is determined in step (72) that there is a contact at
It is determined that the mode is MODE3. If it is determined that the connection mode is MODE 3, the process moves from step (74) to step (79), where additional modification of the program is performed. First, in step (79), as shown in FIG.
After the address, the data of SKP and SOFO1 are written, and then in step (80), the output command YONO1 is shifted by three addresses to the larger address, and when the shift is completed, the process moves to step (81) as shown in Figure 15b. Write the program TNAI5 that tests the branch instruction and additional contacts on top of the output instruction. After this, the process moves to step (82) and the memory address in the display program area DPA corresponding to the address where 1 is written in the cursor position memory area, in this example, addresses R+1 to R+3, are stored. There is. The sequence program is 1 as shown in Figure 15c.
Shift one address at a time to the larger address, and in step (83) insert a branch instruction JMN above this to the 15th
The program modification is completed as shown in Figure d. FIGS. 11b to 14b show modified sequence programs for each connection mode,
The program with a double circle in the margin is the 10th program.
It is automatically inserted by the modification routine shown in the figure. In this way, the modified sequence program is written to its original location in the program store area PSA, as described above, and then transferred to the memory 11 of the sequence controller 10 to complete the modification. In the above embodiment, the program was modified by inserting branch instructions before and after the test program for testing the contacts in the circuit section where the contacts are connected in parallel. If arithmetic processing is performed by using a down stack to store intermediate results of the calculation, the intermediate results of the calculation are stored in the pushdown stack before the test program that tests the contacts in the circuit section. Insert an instruction to store in the pushdown stack, and after the test program, insert a program to test additional contacts and an instruction to perform a logical OR between this test result and the intermediate result stored in the pushdown stack. Just do it. As described above, in the program correction device of the present invention, when the circuit section to which newly added contacts are connected in parallel is specified by operating the cursor shift key and the cursor leave key, the connection mode of the additional contacts is automatically changed. When the test command to test the added contacts and the contacts are connected in parallel before and after a series of test programs that test multiple contacts in the specified circuit section according to the results of this determination, Since the necessary auxiliary commands are automatically added and inserted, the operator only has to input the type and input/output address of the additional contact after specifying the circuit section in which additional contacts are to be connected in parallel. You can modify the circuit simply by For this reason,
Not only can programs be modified by adding contacts in a short time, but programs can also be modified without any knowledge of the usage or properties of the command words used in sequence controllers, making it easy for workers who understand relay circuits to do so. The advantage is that anyone can modify the program.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は接点を回路に並列的に追加接続する例
を示す図、第2図以降は本発明の実施例を示すも
ので、第2図はシーケンスコントローラにプログ
ラム修正装置を接続した状態を示すブロツク図、
第3図は第2図における操作パネル21上に設け
られた操作キーを示す図、第4図a,bは第2図
における演算制御回路22の回路表示時における
動作を示すフローチヤート、第5図は第2図にお
けるバツフアメモリ23のエリア分けを示す図、
第6図aはリレー回路の一例を示す図、第6図
b,cは第5図における表示プログラムエリア
DPAとカーソル位置記憶エリアCPAの内容を示
す図、第7図a〜cは第2図におけるCRT27
の表示画面を示す図、第8図〜第10図は第2図
における演算制御回路22のプログラム修正時に
おける動作を示すフローチヤート、第11図a,
b〜第14図a,bは第7図aに示す回路に接点
を追加する態様と接点追加後におけるシーケンス
プログラムを示す図、第15図a〜dはプログラ
ム修正時における表示プログラムエリアDPA内
のデータの変化を示す図である。 10…シーケンスコントローラ、11…記憶
部、20…プログラム修正装置、21…操作パネ
ル、22…演算制御回路、23…バツフアメモ
リ、24…リフレツシユメモリ、25…パターン
ジエネレータ、26…映像信号発生回路、27…
CRT、28…表示制御回路。
Fig. 1 is a diagram showing an example of additionally connecting contacts to a circuit in parallel, Fig. 2 and subsequent figures show embodiments of the present invention, and Fig. 2 shows a state in which a program correction device is connected to a sequence controller. block diagram,
3 is a diagram showing operation keys provided on the operation panel 21 in FIG. 2, FIGS. 4a and 4b are flowcharts showing the operation of the arithmetic control circuit 22 in FIG. The figure shows the area division of the buffer memory 23 in FIG.
Figure 6a is a diagram showing an example of a relay circuit, and Figures 6b and c are display program areas in Figure 5.
A diagram showing the contents of DPA and cursor position storage area CPA, Figures 7 a to c are CRT27 in Figure 2.
FIGS. 8 to 10 are flowcharts showing the operation of the arithmetic and control circuit 22 in FIG. 2 during program correction, and FIGS.
b - Figures 14a and 14b are diagrams showing how contacts are added to the circuit shown in Figure 7a and the sequence program after the contacts are added. Figures 15a to d are diagrams showing the sequence program in the display program area DPA when modifying the program. FIG. 3 is a diagram showing changes in data. DESCRIPTION OF SYMBOLS 10... Sequence controller, 11... Storage unit, 20... Program correction device, 21... Operation panel, 22... Arithmetic control circuit, 23... Buffer memory, 24... Refresh memory, 25... Pattern generator, 26... Video signal generation circuit, 27...
CRT, 28...Display control circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 シーケンスコントローラのメモリに書込まれ
ているシーケンスプログラムを修正するための装
置であつて、前記シーケンスコントローラのメモ
リに記憶されているシーケンスプログラムの内、
所定の出力要素のオンオフに関連する一連のシー
ケンスプログラムをリレー接点によるラダーダイ
アグラムに変換して表示器上に表示する表示手段
と、この表示器上のラダーダイアグラムを参照し
てカーソルをシフトするシフトキーおよび新たに
追加する接点を並列的に接続する回路区間内の複
数の接点にカーソルを残すカーソル残しキーを備
え、カーソル残し位置の記憶に基づいて追加接点
を並列的に接続する回路区間を指定する区間指定
手段と、この区間指定手段によつて指定された回
路区間の前に接点があるかないかならびに前記回
路区間の後が出力要素であるか否かを判別して追
加接点の接続モードを判別するモード判別手段
と、このモード判別手段により、前記回路区間の
前に接点がないと判別された場合には、その回路
区間内の接点のテスト命令に続く出力命令等を所
定番地シフトしかつシフトされた出力命令等の前
に分岐命令および追加接点のテスト命令を挿入
し、また前記回路区間の前に接点があると判別さ
れた場合には、その回路区間内の接点のテスト命
令に続く出力命令等を所定番地シフトしかつシフ
トされた出力命令等の前に分岐命令および追加接
点のテスト命令を挿入すると同時に、前記回路区
間内の接点のテスト命令を所定番地シフトしかつ
シフトされたテスト命令の前に分岐命令を挿入す
る命令挿入手段とによつて構成してなるシーケン
スコントローラにおけるプログラム修正装置。
1. A device for modifying a sequence program written in a memory of a sequence controller, which comprises:
a display means for converting a series of sequence programs relating to on/off of predetermined output elements into a ladder diagram using relay contacts and displaying the same on a display; a shift key for shifting a cursor with reference to the ladder diagram on the display; A section that has a cursor leave key that leaves a cursor on multiple contacts in a circuit section to which newly added contacts are connected in parallel, and specifies a circuit section to which additional contacts are to be connected in parallel based on the memory of the cursor leave position. specifying means, and determining whether there is a contact before the circuit section specified by the section specifying means and whether or not there is an output element after the circuit section, and determining the connection mode of the additional contact. If the mode determining means determines that there is no contact before the circuit section, the output command, etc. following the test command for the contact in the circuit section is shifted to a predetermined location and shifted. A branch instruction and an additional contact test instruction are inserted before the output instruction, etc., and if it is determined that there is a contact before the circuit section, an output instruction following the contact test instruction within that circuit section is inserted. etc. to a predetermined address, and a branch instruction and an additional contact test instruction are inserted before the shifted output instruction, etc. At the same time, a contact test instruction in the circuit section is shifted to a predetermined address and the shifted test instruction is inserted. A program correction device for a sequence controller, comprising an instruction insertion means for inserting a branch instruction before the program.
JP8667079A 1979-07-09 1979-07-09 Program correction unit in sequence controller Granted JPS5611502A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP8667079A JPS5611502A (en) 1979-07-09 1979-07-09 Program correction unit in sequence controller
FR8015186A FR2461294A1 (en) 1979-07-09 1980-07-08 Sequence program modification effects observer - has program modifier comprising processor and memory connected to display

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8667079A JPS5611502A (en) 1979-07-09 1979-07-09 Program correction unit in sequence controller

Publications (2)

Publication Number Publication Date
JPS5611502A JPS5611502A (en) 1981-02-04
JPS6211367B2 true JPS6211367B2 (en) 1987-03-12

Family

ID=13893461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8667079A Granted JPS5611502A (en) 1979-07-09 1979-07-09 Program correction unit in sequence controller

Country Status (2)

Country Link
JP (1) JPS5611502A (en)
FR (1) FR2461294A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58114203A (en) * 1981-12-28 1983-07-07 Omron Tateisi Electronics Co Crt indicating type programming device of programmable controller
JPS58121406A (en) * 1982-01-13 1983-07-19 Omron Tateisi Electronics Co Crt display type programming device of programmable controller
JPS58163004A (en) * 1982-03-23 1983-09-27 Kontetsuku:Kk Programming device of plural sequencers
JPS5933504A (en) * 1982-08-20 1984-02-23 Toshiba Corp Sequence controller
JP2526686B2 (en) * 1989-12-26 1996-08-21 三菱電機株式会社 Method of modifying program contents in control program of programmable controller
JP2706558B2 (en) * 1990-08-09 1998-01-28 ファナック株式会社 Ladder program editing method
EP0477760B1 (en) * 1990-09-20 1996-07-24 Hitachi, Ltd. Programming method and apparatus for programmable controller
JP3892405B2 (en) * 2003-03-10 2007-03-14 株式会社名機製作所 Sequence circuit display method for injection molding machine
US20110295388A1 (en) * 2009-02-04 2011-12-01 Mitsubishi Electric Corporation Ladder program edition device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS49135096A (en) * 1973-05-07 1974-12-26
JPS5329034A (en) * 1976-08-31 1978-03-17 Toshiba Corp Display area switching unit

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3964026A (en) * 1973-05-22 1976-06-15 Nissan Motor Co., Ltd. Sequence block display system
US3944984A (en) * 1974-04-23 1976-03-16 Modicon Corporation Computer controller system with a reprogrammable read only memory
GB2029986B (en) * 1978-09-13 1983-02-02 Hitachi Ltd Sequence control system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS49135096A (en) * 1973-05-07 1974-12-26
JPS5329034A (en) * 1976-08-31 1978-03-17 Toshiba Corp Display area switching unit

Also Published As

Publication number Publication date
FR2461294B1 (en) 1983-12-30
JPS5611502A (en) 1981-02-04
FR2461294A1 (en) 1981-01-30

Similar Documents

Publication Publication Date Title
US4200913A (en) Operator controlled programmable keyboard apparatus
US4455619A (en) Interactive equipment for computer programming by linkage of labeled block representations of arithmetic/logical subprograms
US7930699B2 (en) Task roster
US20050065659A1 (en) Robot control device
KR950012071B1 (en) Data processing system
US4385367A (en) Sequence block display system
US6438713B1 (en) Debugger for support of debugging of program, array data displaying method in debugger, and recording medium having array data displaying program in debugger
JPS6211367B2 (en)
US6243858B1 (en) Program construction assisting system
US8140465B2 (en) Apparatus and method for monitoring and controlling a device under test
JP3053265B2 (en) Screen display method when searching for sequence programs
JP4516224B2 (en) Ladder diagram creation program
JP4060444B2 (en) Cursor display method, inspection apparatus, and measurement apparatus
JPH07210683A (en) Picture processor
JPS63208921A (en) Switch pattern display device
JP2772047B2 (en) Plant monitoring and operation equipment
JPH06139039A (en) Computer system
JPS6211369B2 (en)
JPS5931288B2 (en) How to display system operation details
JP3490779B2 (en) Screen control device by key input
JPH0425553B2 (en)
JPS6336327A (en) Sequence display device
JPS6226498B2 (en)
JPH06214710A (en) Registration method for tablet menu
JPH0373001B2 (en)