JPH1063309A - Peripheral device of programmable controller - Google Patents

Peripheral device of programmable controller

Info

Publication number
JPH1063309A
JPH1063309A JP22017596A JP22017596A JPH1063309A JP H1063309 A JPH1063309 A JP H1063309A JP 22017596 A JP22017596 A JP 22017596A JP 22017596 A JP22017596 A JP 22017596A JP H1063309 A JPH1063309 A JP H1063309A
Authority
JP
Japan
Prior art keywords
macro
instruction
circuit
program
registered
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
JP22017596A
Other languages
Japanese (ja)
Inventor
Yasunobu Iwata
恭伸 岩田
Zenei Kamiya
善栄 神谷
Takayuki Nihei
貴行 二瓶
Takeshi Nishimaki
剛 西牧
Kyoko Tanaka
京子 田中
Yusuke Itaba
雄介 板場
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP22017596A priority Critical patent/JPH1063309A/en
Publication of JPH1063309A publication Critical patent/JPH1063309A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Control By Computers (AREA)
  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To enhance efficiency in the design of a sequence program. SOLUTION: This device is provided with a macroprogram registering means 1 for registering collective sequence programs as a macroprograms, a device registering means 2 for registering a device for extending the macroprogram which is registered by the macroprogram registering means 1 to be the sequence program, a correction registering means 3 for registering a history in a correction registering table when a macro-extending part is corrected after extension into the sequence program and a macro-extending means 4 for developing a part other than the part where is previously corrected by the sequence program to be the sequence program through the use of the correction registering table of the sequence program concerning contents when the macroprogram is corrected.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、機器設備を制御
するプログラマブルコントローラ(以下PCと呼ぶ)の
ためのシーケンスプログラムのプログラミングを行うプ
ログラマブルコントローラの周辺装置に関し、特にマク
ロプログラムを使用してシーケンスプログラムのプログ
ラミングを行うプログラマブルコントローラの周辺装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a peripheral device of a programmable controller for programming a sequence program for a programmable controller (hereinafter referred to as a PC) for controlling equipment, and more particularly to a peripheral device for a sequence program using a macro program. The present invention relates to a peripheral device of a programmable controller for performing programming.

【0002】[0002]

【従来の技術】図55は特開平5−189012号公報
に示されているような標準的に使用されるラダー回路の
マクロプログラムをシーケンスプログラムに展開する場
合の機能ブロックを示している。
2. Description of the Related Art FIG. 55 shows functional blocks when a macro program of a ladder circuit used as a standard as disclosed in Japanese Patent Application Laid-Open No. 5-189012 is developed into a sequence program.

【0003】なお、この明細書では、シーケンスプログ
ラムで頻繁に使用するひとまとまりのプログラムをマク
ロプログラムまたは単にマクロと呼び、これをラダー回
路表示するときマクロ回路と呼ぶ。
[0003] In this specification, a group of programs frequently used in a sequence program is called a macro program or simply a macro, and when it is displayed as a ladder circuit, it is called a macro circuit.

【0004】ファイル登録されるマクロプログラム“M
ACROA”(MP)は、マクロプログラム中のデバイ
スを、実際の制御機器やプログラミング制約から決まる
記号、番号に関係なく表現するための仮想デバイス(以
下ラベルと呼ぶ)vd0、vd1、vd2で定義してい
る。
A macro program "M" to be registered in a file
ACROA "(MP) is defined by virtual devices (hereinafter referred to as labels) vd0, vd1, and vd2 for expressing devices in a macro program irrespective of symbols and numbers determined by actual control devices and programming constraints. I have.

【0005】マクロプログラム“MACROA”をシー
ケンスプログラムSPにマクロ展開する時のラベルと実
存するデバイスNoとの対応表として、“MACROA
−1”部分のデバイス登録テーブルDT1と、“MAC
ROA−2”部分のデバイス登録テーブルDT2とがあ
る。
[0005] As a correspondence table between labels and actual device numbers when the macro program “MACROA” is macro-expanded into the sequence program SP, “MACROA” is used.
-1 "device registration table DT1 and" MAC
ROA-2 ″ part device registration table DT2.

【0006】デバイス登録テーブルDT1では、ラベル
vd0に対応するデバイスはX0、ラベルvd1に対応
するデバイスはY100、ラベルvd2に対応するデバ
イスはY101であり、デバイス登録テーブルDT2で
は、ラベルvd0に対応するデバイスはX10、ラベル
vd1に対応するデバイスはY200、ラベルvd2に
対応するデバイスはY201である。
In the device registration table DT1, the device corresponding to the label vd0 is X0, the device corresponding to the label vd1 is Y100, the device corresponding to the label vd2 is Y101, and in the device registration table DT2, the device corresponding to the label vd0. Is X10, the device corresponding to the label vd1 is Y200, and the device corresponding to the label vd2 is Y201.

【0007】マクロ展開手段100は、シーケンスプロ
グラムSPの“MACROA−1START”と“MA
CROA END”との間に、デバイス登録テーブルD
T1に登録されているラベル−デバイス対応に基づいて
マクロプログラム“MACROA”を展開し、また“M
ACROA−2 START”と“MACROAEN
D”との間に、デバイス登録テーブルDT2に登録され
ているラベル−デバイス対応に基づいてマクロプログラ
ム“MACROA”を展開する。
[0007] The macro expansion means 100 is provided with a sequence program SP “MACROA-1 START” and “MA
CROA END ”and device registration table D
The macro program “MACROA” is expanded based on the label-device correspondence registered in T1, and “MROA” is developed.
ACROA-2 START ”and“ MACROAEN
D ”, the macro program“ MACROA ”is developed based on the label-device correspondence registered in the device registration table DT2.

【0008】図56はマクロプログラム展開手段100
によるマクロ展開処理を示すフローチャートであり、既
にマクロ展開されたシーケンスプログラムSPにおい
て、マクロプログラム”MACROA”を修正した後
に、これを再展開する処理について説明する。
FIG. 56 shows a macro program expanding means 100.
Is a flowchart showing a macro expansion process according to the present invention. In the sequence program SP already macro-expanded, a process of correcting the macro program "MACROA" and then re-expanding the macro program "MACROA" will be described.

【0009】まず、シーケンスプログラムSPにおいて
マクロ展開に該当するプログラムがあるか、即ち、シー
ケンスプログラムSP中に、“MACROA”が存在す
るかを検索し(ステップS2000)、“MACRO
A”が存在する場合には(ステップS2010肯定)、
シーケンスプログラムSPにおける“MACROA−n
START”から“MACROA−n END”までの
プログラム記述を削除し(ステップS2020)、その
部分に、修正後のマクロプログラム“MACROA”を
挿入する(ステップS2030)。ただし、nは最初は
1で、ループ繰り返し毎にn+1となる。
First, it is searched whether there is a program corresponding to macro expansion in the sequence program SP, that is, whether "MACROA" exists in the sequence program SP (step S2000).
If A "exists (Yes at Step S2010),
"MACROA-n" in the sequence program SP
The program description from “START” to “MACROA-n END” is deleted (step S2020), and the modified macro program “MACROA” is inserted into that part (step S2030), where n is 1 at first, and It becomes n + 1 every time the loop is repeated.

【0010】つぎに、挿入されたマクロプログラム“M
ACROA”にラベルvd0、vd1、vd2があるか
を検索し(ステップS2040)、ラベルがある場合に
は(ステップS2050)、デバイス登録テーブルDT
nにおいてマクロプログラムMPのラベルvd0、vd
1、vd2に対応するデバイスNoを検索し(ステップ
S2060)、n=1の場合には、ラベルvd0、ラベ
ルvd1、ラベルvd2を、各々対応するデバイスX
0、デバイスY100、デバイスY101に置き換える
(ステップS2070)。
Next, the inserted macro program "M
ACROA "is searched for labels vd0, vd1, and vd2 (step S2040). If there is a label (step S2050), the device registration table DT
n, labels vd0, vd of the macro program MP
1 and vd2 are searched (step S2060), and if n = 1, the label vd0, label vd1, and label vd2 are set to the corresponding device X, respectively.
0, device Y100, and device Y101 (step S2070).

【0011】全てのラベルに対してデバイスNoの置き
換えが完了すると、デバイス登録テーブルDTnと展開
したマクロプログラム“MACROA”を対応させるた
めに、展開したマクロプログラムを“MACROA−
n”に変更する(ステップS2080)。
When the replacement of the device numbers is completed for all the labels, the developed macro program is converted to “MACROA-MAC” in order to associate the device registration table DTn with the developed macro program “MACROA”.
n ”(step S2080).

【0012】シーケンスプログラムSPにおいてマクロ
展開に該当するプログラムの全てに対して上述のステッ
プS2010からステップS2080の処理を行い、展
開処理を終了する。
In the sequence program SP, the above-described processing from step S2010 to step S2080 is performed on all the programs corresponding to macro expansion, and the expansion processing ends.

【0013】図57はプログラマブルコントローラによ
って制御される機械設備(押出生産ライン)の一例を示
している。この押出生産ラインは、一列に配置された第
1押出機201、第2押出機202、第3押出機203
と、これら押出機の配列方向に延在するコンベヤ装置2
04とを有している。
FIG. 57 shows an example of mechanical equipment (extrusion production line) controlled by a programmable controller. This extrusion production line includes a first extruder 201, a second extruder 202, and a third extruder 203 arranged in a row.
And a conveyor device 2 extending in the arrangement direction of these extruders.
04.

【0014】第1〜第3の各押出機201〜203の各
々には、押出シリンダ211〜213と、後進端スイッ
チ221〜223と、前退端スイッチ231〜233が
設けられている。
Each of the first to third extruders 201 to 203 is provided with an extrusion cylinder 211 to 213, a backward end switch 221 to 223, and a forward end switch 231 to 233.

【0015】またコンベヤ装置204が第1〜第3の各
押出機201〜203に対応する位置No1〜No3に
は、各々位置検出器241〜243が設けられている。
Position detectors 241 to 243 are provided at positions No. 1 to No. 3 where the conveyor device 204 corresponds to the first to third extruders 201 to 203, respectively.

【0016】従来より上述のような機械設備のシーケン
ス制御を行うためにPCが多く用いられている。PCの
プログラムはシーケンスプログラムと呼ばれ、ラダー回
路、または命令のニーモニックを表すリストを使用する
のが一般的に普及している。
Conventionally, a PC is often used to perform the above-described sequence control of the mechanical equipment. The PC program is called a sequence program, and it is common to use a ladder circuit or a list representing mnemonics of instructions.

【0017】リスト形式のシーケンスプログラムは、命
令と、命令を実行するデバイス番号との組み合わせによ
って1行のプログラムを構成する。図58は図57に示
されている機械設備のシーケンス制御を行うPCのシー
ケンスプログラムを示している。
The list program in the form of a list forms a one-line program by a combination of an instruction and a device number for executing the instruction. FIG. 58 shows a sequence program of a PC for performing the sequence control of the mechanical equipment shown in FIG.

【0018】このシーケンスプログラムは、条件の命令
と、条件が成立した場合の動作の命令を用いて作成され
ており、第1押出機201の制御プログラム部Aと、第
2押出機202の制御プログラム部Bと、第3押出機2
03の制御プログラム部Cとから成り立っている。これ
ら各制御プログラム部は、同一命令を使用しているが、
デバイス番号が異なっている。
This sequence program is created by using a command of a condition and a command of an operation when the condition is satisfied. The control program section A of the first extruder 201 and the control program of the second extruder 202 Part B and the third extruder 2
03, and a control program unit C. Although each of these control program units uses the same instruction,
Device numbers are different.

【0019】つぎに図59〜図62を参照してシーケン
スプログラムの従来のプログラミング方法について説明
する。
Next, a conventional method of programming a sequence program will be described with reference to FIGS.

【0020】従来のPCのプログラミング方法では、図
59(a)に示されているような一つの基本となる回路
が、図59(b)に示されているように、リレー番号や
コイル番号が異なるだけ反復して複数個存在するような
シーケンスプログラムを作成する場合、複数の同一回路
をすべて作成者がプログラミングする必要があり、プロ
グラミングに時間がかかると云う問題点があった。
In the conventional PC programming method, one basic circuit as shown in FIG. 59 (a) has a relay number and a coil number as shown in FIG. 59 (b). When creating a sequence program in which a plurality of different circuits are repeated by different numbers, it is necessary for the creator to program all of a plurality of identical circuits, and there has been a problem that programming takes time.

【0021】これを解決する一つの手段として、前述の
特開平5−189012号公報に示されているように、
マクロプログラムとその中で使用されているデバイスを
登録し(以下マクロ登録と呼ぶ)、置き換えるリレー番
号やコイル番号を設定してシーケンスプログラムに挿入
する(以下マクロ流用と呼ぶ)方法が用いられている。
As one means for solving this problem, as disclosed in the aforementioned Japanese Patent Laid-Open No. Hei 5-189012,
A method is used in which a macro program and devices used therein are registered (hereinafter referred to as macro registration), relay numbers and coil numbers to be replaced are set and inserted into a sequence program (hereinafter referred to as macro diversion). .

【0022】シーケンスプログラム中にマクロ流用した
ときの表示方法としては、図60(a)に示されている
ように、マクロであることを示すシンボルで表す方法
(以下シンボル表示と呼ぶ)や、図60(b)に示され
ているように、マクロを登録したときのシーケンスプロ
グラムの状態(以下シーケンス回路表示と呼ぶ。)で表
す方法がある。シーケンス回路表示では、マクロを流用
したことを示すコメント“MACROA”、“MACR
OA END”が付加される。
As a display method when a macro is diverted in a sequence program, as shown in FIG. 60A, a method of displaying a macro as a symbol (hereinafter referred to as a symbol display), As shown in FIG. 60 (b), there is a method of expressing the state of a sequence program when a macro is registered (hereinafter referred to as a sequence circuit display). In the sequence circuit display, the comments "MACROA" and "MACR" indicating that the macro was diverted are displayed.
OA END "is added.

【0023】ここで、作成者がシーケンスプログラムを
作成する過程で、マクロを実行するために接点を条件と
して付加しようとしたときを例にあげる。
Here, an example will be given in which the creator attempts to add a contact point as a condition for executing a macro in the process of creating a sequence program.

【0024】マクロプログラムは一つの独立した回路ブ
ロックであるため、先に接点(X0)を書き込んでから
マクロ流用すると、先に書き込んだ接点と流用したマク
ロは別の回路ブロックとなり、図61に示されているよ
うに、一つの回路として繋がらない。このため作成者
は、先ず、図62(a)に示されているように、マクロ
を流用し、つぎに、図62(b)に示されているよう
に、マクロに含まれる接点を右側にずらし、図62
(c)に示されているように、付加する接点X0を書込
み、図62(d)に示されているように、正しい回路に
なるよう縦線、横線を調整すると云った作業が必要とな
る。
Since the macro program is one independent circuit block, if the macro is diverted after writing the contact (X0) first, the previously written contact and the diverted macro become another circuit block, as shown in FIG. As has been done, they are not connected as one circuit. For this reason, the creator first diverts the macro as shown in FIG. 62A, and then places the contact included in the macro on the right side as shown in FIG. Shift, FIG. 62
As shown in FIG. 62 (c), it is necessary to write the contact X0 to be added and to adjust the vertical and horizontal lines so as to obtain a correct circuit as shown in FIG. 62 (d). .

【0025】つぎに、マクロの範囲を示すコメントにつ
いての従来技術を、以下に詳細に説明する。
Next, the prior art regarding the comment indicating the range of the macro will be described in detail below.

【0026】マクロプログラムの範囲を示すコメントは
マクロ流用時に作成される。そのため、マクロ流用後に
接点を付け加えるような修正を行った回路の場合、実際
に登録してあるマクロプログラムは、正確にはコメント
の示す範囲の一部分と云う状態になる。しかし作成者
は、図62(a)のマクロ流用直後の回路と、図62
(d)のマクロ流用後に修正した回路とでは、どちらも
同じコメントが付いるため、コメントからでは、回路が
マクロ登録した回路であるのか、修正された回路なのか
を区別することができない。
A comment indicating the range of the macro program is created when the macro is diverted. Therefore, in the case of a circuit in which a contact is added after diverting the macro, the actually registered macro program is exactly a part of the range indicated by the comment. However, the creator has decided to use the circuit shown in FIG.
Since the same comment is attached to the circuit corrected after the macro diversion in (d), it cannot be distinguished from the comment whether the circuit is a circuit registered as a macro or a corrected circuit.

【0027】図63(a)、(b)は、PCおよびPC
用プログラミング機器の構成と、PC用プログラミング
機器のモニタにシーケンスプログラム回路を表示した画
面表示例を示している。図63(a)において、300
はPC用プログラミング機器を、301はPCの電源ユ
ニットを、302はCPUユニットを、303はPCの
各種ユニットを各々示しており、PC用プログラミング
機器300とCPUユニット302とはケーブル304
によって接続されている。
FIGS. 63A and 63B show a PC and a PC.
2 shows a configuration of a programming device for PC and a screen display example in which a sequence program circuit is displayed on a monitor of the PC programming device. In FIG. 63 (a), 300
Denotes a PC programming device, 301 denotes a PC power supply unit, 302 denotes a CPU unit, and 303 denotes various PC units. The PC programming device 300 and the CPU unit 302 are connected by a cable 304.
Connected by

【0028】図63(b)はPC用プログラミング機器
300のモニタ画面の表示例を示している。この画面表
示において、“M.OUT”は登録したマクロ回路の表
示、符号Dで示す部分は通常のシーケンスプログラム回
路の表示であり、“X0”、“X1”は入力デバイス、
“Y10”、Y11”は出力デバイスである。
FIG. 63B shows a display example of a monitor screen of the PC programming device 300. In this screen display, “M.OUT” is a display of a registered macro circuit, a portion indicated by reference symbol D is a display of a normal sequence program circuit, “X0” and “X1” are input devices,
“Y10” and Y11 ”are output devices.

【0029】図64はPC用プログラミング機器におい
てPCの稼動状態をモニタする手順の動作フローを示し
ている。
FIG. 64 shows an operation flow of a procedure for monitoring the operating state of the PC in the PC programming device.

【0030】PC用プログラミング機器300にて、P
Cの稼動状態をモニタする場合、先ず、図63(a)に
示されているように、画面表示しているシーケンスプロ
グラム回路から、入力デバイスX0、X1、出力デバイ
スY10、Y11を取得する(ステップS2100)。
In the PC programming device 300, P
When monitoring the operating state of C, first, as shown in FIG. 63A, the input devices X0 and X1 and the output devices Y10 and Y11 are acquired from the sequence program circuit displayed on the screen (step S1). S2100).

【0031】つぎに、取得した入力デバイスX0、X
1、出力デバイスY10、Y11の各々のデバイス値を
CPUユニット302からケーブル304を通じてPC
用プログラミング機器300に順次読み出す(ステップ
S2110〜ステップS2150)。
Next, the acquired input devices X0, X
1. The device values of the output devices Y10 and Y11 are transmitted from the CPU unit 302 to the PC via the cable 304.
Are sequentially read to the programming device 300 for use (steps S2110 to S2150).

【0032】読み出したデバイス値から該当するデバイ
スが導通か、非導通かを判断し(ステップS212
0)、導通(ON)ならば、入力デバイスX1、出力デ
バイスY11のように反転表示し(ステップS213
0)、非導通ならば、入力デバイスX0、出力デバイス
Y10のように反転表示しない(ステップS214
0)。
It is determined from the read device value whether the corresponding device is conductive or non-conductive (step S212).
0), if it is conduction (ON), it is displayed in reverse video as in the input device X1 and the output device Y11 (step S213).
0), if it is non-conducting, it is not invertedly displayed like the input device X0 and the output device Y10 (step S214)
0).

【0033】図65はラダー回路のプログラム例を、図
66は図65に示されているラダー回路のプログラムに
より制御される装置の例を各々示している。
FIG. 65 shows an example of a program of the ladder circuit, and FIG. 66 shows an example of a device controlled by the program of the ladder circuit shown in FIG.

【0034】図66において、400はプログラマブル
コントローラを、401は押しボタンスイッチを、40
2は押しボタンスイッチ401が押されている間、動作
するモータを各々示している。
Referring to FIG. 66, reference numeral 400 denotes a programmable controller; 401, a push button switch;
Reference numeral 2 denotes motors that operate while the push button switch 401 is pressed.

【0035】図65に示されているラダー回路のプログ
ラム例において、“X1”は押しボタンスイッチ401
の状態を表す接点であり、“Y20”はモータ402の
起動を制御するスイッチの状態を表すコイルである。
In the example of the ladder circuit program shown in FIG. 65, "X1" is a push button switch 401.
And "Y20" is a coil indicating the state of a switch for controlling the start of the motor 402.

【0036】押しボタンスイッチ401が押されると、
図65に示されているラダー回路のプログラムにおける
入力デバイス(接点)X1が導通状態となり、出力デバ
イス(コイル)Y20が導通状態になり、モータ402
が起動する。
When the push button switch 401 is pressed,
In the ladder circuit program shown in FIG. 65, the input device (contact point) X1 becomes conductive, the output device (coil) Y20 becomes conductive, and the motor 402
Starts.

【0037】図65に示されているラダー回路のプログ
ラムは、押しボタンスイッチ、リミットスイッチなどの
動作条件となる複数の接点を記述する接点部と、動作条
件が成立した場合にモータなどを起動する複数のスイッ
チを記述するコイル部からなり、接点部とコイル部を組
み合わせて回路ブロックを作成し、複数の回路ブロック
を記述して機械設備の制御を行う。
The program of the ladder circuit shown in FIG. 65 includes a contact portion for describing a plurality of contacts which are operating conditions such as a push button switch and a limit switch, and a motor and the like are started when the operating conditions are satisfied. It consists of a coil unit that describes a plurality of switches, creates a circuit block by combining the contact unit and the coil unit, and describes the plurality of circuit blocks to control mechanical equipment.

【0038】従来のマクロ命令は、図67に示されてい
るように、回路ブロック単位に登録範囲を指定しマクロ
命令を登録し、図68に示されているように、マクロ命
令“M.MACRO”のみからなる回路ブロックを作成
し、流用するものであった。
As shown in FIG. 67, a conventional macro instruction registers a macro instruction by specifying a registration range in circuit block units, and as shown in FIG. 68, a macro instruction "M.MACRO". A circuit block consisting only of "" was created and diverted.

【0039】[0039]

【発明が解決しようとする課題】従来は、ラダー回路の
マクロプログラムをシーケンスプログラムに展開する場
合、シーケンスプログラム中のマクロプログラム部分を
入れ換えるため、展開されたシーケンスプログラムの一
部を追加等の変更を行った後にマクロプログラム展開を
行うと、変更箇所も展開の対象となり、図55に示され
ているような従来例で、“MACROA−1”への追加
等でマクロプログラムを修正するには(“MACROA
−2”は追加せずに現状のままにしたい場合)、マクロ
プログラムを新たに作成する必要があり、この結果、同
様なマクロプログラムを複数作成することになり、マク
ロプログラムのメンテナンスが繁雑になると云う問題点
があった。
Conventionally, when a macro program of a ladder circuit is developed into a sequence program, a change such as adding a part of the developed sequence program to replace the macro program portion in the sequence program is required. When the macro program expansion is performed after the execution, the changed part is also expanded, and in the conventional example as shown in FIG. 55, to correct the macro program by adding it to “MACROA-1” (“ MACROA
If it is desired to keep the current state without adding “−2”), it is necessary to newly create a macro program. As a result, a plurality of similar macro programs are created, and maintenance of the macro program becomes complicated. There was a problem.

【0040】また従来のシーケンスプログラムは、図5
8に示されているな構造になっているため、第1押出機
201の制御プログラム部A、第2押出機202の制御
プログラム部B、第3押出機203の制御プログラム部
Cにように、同一命令を用いてもデバイス番号が違うよ
うな場合、全てプログラムを記述する必要があり、プロ
グラム入力に時間が掛かると云う問題点があった。
FIG. 5 shows a conventional sequence program.
8, the control program section A of the first extruder 201, the control program section B of the second extruder 202, the control program section C of the third extruder 203, When the device numbers are different even if the same command is used, it is necessary to describe all programs, and there is a problem that it takes time to input the program.

【0041】また、シーケンスプログラムのデバック時
に、修正を行った場合も、プログラムの全てにおいて、
修正を必要とするため、修正時の間違いが起こり易いと
云う問題点もあった。
Also, when the sequence program is modified during debugging, the entire program
Since correction is required, there has been a problem that errors during correction are likely to occur.

【0042】また従来技術では、登録したマクロプログ
ラムは独立した回路ブロックとなっているため、ある制
御の処理を行うためのシーケンス命令の組み合わせをマ
クロプログラムとして登録する場合、その処理を行う為
のインターロックなどの条件部分は、登録する回路ブロ
ックの中に予め書き込んでおく必要があり、デバイスの
種類のみが異なり、回路のパターンや接点、コイルの数
は同じ場合にのみ、この登録したマクロプログラムを流
用することができた。
In the prior art, since the registered macro program is an independent circuit block, when registering a combination of sequence instructions for performing a certain control process as a macro program, an interface for performing the process is used. The condition part such as lock needs to be written in advance in the circuit block to be registered.Only the type of device differs, and the circuit pattern, contacts, and the number of coils are the same. Could be diverted.

【0043】しかし、ある処理を行うための条件は、登
録したマクロプログラムを流用する場合によって、デバ
イスの種類のみでなく数や条件の組み合わせが異なる場
合があり、このことに対して従来技術では、図62
(a)〜(d)に例示されているように、登録したマク
ロプログラムの回路ブロックに入出力デバイスなどを設
定して回路ブロックを作成した後に、回路ブロックとし
て成立するよう調整しなから条件の追加を行う必要があ
った。
However, the condition for performing a certain process may differ not only in the type of device but also in the combination of the number and conditions depending on the case where the registered macro program is diverted. FIG. 62
As illustrated in (a) to (d), after setting an input / output device or the like in the registered circuit block of the macro program to create the circuit block, the conditions are adjusted so that the circuit block is established. We needed to do some extra.

【0044】また、シーケンスプログラム作成者が以前
に作成した回路とデバイスの異なる類似のラダー回路を
作成しようとしたとき、以前に作成したラダー回路(シ
ーケンスプログラム)にマクロプログラムであることの
コメントが付いていれば、マクロ流用によって類似の回
路を作成しようと考える。しかし、図62(a)〜
(d)に例示されているように、コメントの示すマクロ
流用された回路が実際には編集されていたものであった
とき、つぎにマクロ流用したときには作成者が意図した
回路ではなく、元々登録されていた編集前の回路が流用
されることになるため、置き換えようとしていたデバイ
スが意図しない位置のデバイスと置き変わるなどのプロ
グラミングミスが生じ易いと云う問題点がある。
When the sequence program creator attempts to create a similar ladder circuit having a device different from the previously created circuit, a comment is added to the previously created ladder circuit (sequence program) indicating that it is a macro program. If so, consider creating a similar circuit by macro diversion. However, FIG.
As shown in (d), when the macro-diverted circuit indicated by the comment was actually edited, the next time the macro is diverted, the circuit is not the circuit intended by the creator, but is originally registered. Since the circuit before editing that has been used is diverted, there is a problem that a programming error is likely to occur such that the device to be replaced is replaced with a device at an unintended position.

【0045】また、従来技術では、マクロ回路は、図6
3、図64に示されているように、複数デバイスがシー
ケンスプログラム回路として登録されているため、デバ
イスとして扱われず、モニタすることができない。この
ため、PCの稼動状況をモニタする時にマクロ回路が存
在した場合、マクロ回路の出力が導通しているのか、非
導通しているのかを、PC用プログラミング機器におけ
るシーケンスプログラム回路の表示画面から直接確認す
ることができないと云う問題点がある。
In the prior art, the macro circuit is shown in FIG.
3. As shown in FIG. 64, since a plurality of devices are registered as a sequence program circuit, they are not treated as devices and cannot be monitored. Therefore, if a macro circuit is present when monitoring the operation status of the PC, whether the output of the macro circuit is conductive or non-conductive is determined directly from the display screen of the sequence program circuit in the PC programming device. There is a problem that it cannot be confirmed.

【0046】また、従来技術では、図67、図68に示
されているように、回路ブロック単位に登録、流用して
いたので、登録したマクロ命令と同じ接点構成、コイル
構成をした回路を作成する場合にしか流用することがで
きず、効率が悪いと云う問題点があった。
In the prior art, as shown in FIGS. 67 and 68, registration and diversion are performed in units of circuit blocks, so that a circuit having the same contact configuration and coil configuration as the registered macro instruction is created. However, there is a problem that the efficiency can be reduced only when it is used.

【0047】また、複数流用したマクロ命令の間に接点
とコイルの関係が成り立つ場合には、その関係は、別途
プログラミングする必要があり、効率が悪かった。
Further, when the relationship between the contact and the coil is established between a plurality of diverted macro instructions, the relationship must be separately programmed, which is inefficient.

【0048】この発明は、上述の如き問題点に着目して
なされたものであり、展開されたシーケンスプログラム
の一部を追加等の変更を行った後にマクロ展開を行って
も変更箇所はマクロ展開の対象とならないようにした
り、予め登録された命令を使用してプログラムを作成
し、登録された命令を使用したプログラムと命令を展開
したプログラムの表示切り替えが簡単に行われ得るよう
にしたり、マクロを実行するための条件とシンボル表現
のマクロを接続した回路を作成すれば、シーケンス回路
表示した時に回路が正しく繋ながるようシーケンスプロ
グラムを調整したり、接点とマクロを接続した回路をシ
ーケンス回路表示した時に接点を含まない元のマクロ命
令部分を区別して表示したり、モニタ時にマクロ回路と
して導通しているのか否かをシーケンスプログラム回路
表示画面から直接確認することができるようにしたりし
て、マクロプログラムの作成効率、メンテナンス性の向
上、シーケンスプログラムの設計の効率化を図ることが
でき、取扱い性に優れたプログラマブルコントローラの
周辺装置を提供することを目的としている。
The present invention has been made in view of the above-described problems. Even if a macro expansion is performed after a change such as addition of a part of the expanded sequence program is performed, the changed portion is macro expanded. Or create a program using pre-registered instructions so that the display can be easily switched between the program using the registered instructions and the program that expands the instructions. If you create a circuit that connects the conditions for executing the macro and the symbol expression macro, you can adjust the sequence program so that the circuits are connected correctly when displaying the sequence circuit, or connect the circuit that connects the contacts and the macro to the sequence circuit When displayed, the original macro instruction part that does not include the contact is displayed separately, or is it conducting as a macro circuit during monitoring? Can be checked directly from the sequence program circuit display screen to improve macro program creation efficiency, maintainability, and sequence program design efficiency. It is intended to provide a peripheral device for a controller.

【0049】[0049]

【課題を解決するための手段】上述の目的を達成するた
めに、この発明によるプログラマブルコントローラの周
辺装置は、ひとまとまりのシーケンスプログラムをマク
ロプログラムとして登録するマクロプログラム登録手段
と、前記マクロプログラム登録手段によって登録された
マクロプログラムをシーケンスプログラムに展開するた
めのデバイスを登録するデバイス登録手段と、シーケン
スプログラムへ展開された後にマクロ展開部を修正した
場合、その履歴を修正登録テーブルに登録する修正登録
手段と、マクロプログラムを修正した場合、その内容を
シーケンスプログラムの前記修正登録テーブルを用いて
既にシーケンスプログラムで修正された箇所以外をシー
ケンスプログラムに展開するマクロ展開手段とを有して
いるものである。
To achieve the above object, a peripheral device for a programmable controller according to the present invention comprises: a macro program registering means for registering a set of sequence programs as a macro program; and the macro program registering means. Device registration means for registering a device for expanding the macro program registered by the above into a sequence program, and correction registration means for registering the history of the macro expansion unit in the correction registration table when the macro expansion unit is corrected after being expanded into the sequence program And macro expansion means for, when the macro program is corrected, expanding the contents other than the part already corrected by the sequence program into the sequence program using the correction registration table of the sequence program.

【0050】この発明によるプログラマブルコントロー
ラの周辺装置では、シーケンスプログラムに展開された
マクロプログラムを修正し、再度マクロプログラムを展
開しても修正箇所は展開の対象から外すことができる。
In the peripheral device of the programmable controller according to the present invention, even if the macro program expanded in the sequence program is corrected and the macro program is expanded again, the corrected portion can be excluded from the expansion target.

【0051】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、ひとまとまりのシーケンスプログラ
ムを指定し、これを一つの命令として登録する命令登録
手段と、前記命令登録手段によって登録された命令を使
用してシーケンスプログラムを作成する命令展開処理手
段とを有しているものである。
A peripheral device for a programmable controller according to the next invention specifies instruction sequence means for designating a set of sequence programs and registering them as one instruction, and performs sequence processing using the instructions registered by the instruction registration means. And an instruction expansion processing means for creating a program.

【0052】この発明によるプログラマブルコントロー
ラの周辺装置では、ひとまとまりのシーケンスプログラ
ムを一つの命令として登録でき、この命令を使用してシ
ーケンスプログラムを作成できる。
In the peripheral device of the programmable controller according to the present invention, a group of sequence programs can be registered as one instruction, and a sequence program can be created using this instruction.

【0053】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、上述のプログラマブルコントローラ
の周辺装置において、前記命令展開処理手段によって作
成されたシーケンスプログラムの画面表示において、登
録した命令での表示と、元の一連のシーケンスプログラ
ムでの表示とを切り替える命令表示処理手段を有してい
るものである。
The peripheral device of the programmable controller according to the next invention is the same as the peripheral device of the above-mentioned programmable controller, except that the display of the sequence program created by the instruction expansion processing means is displayed by the registered instruction and the original series is displayed. Command display processing means for switching the display of the sequence program.

【0054】この発明によるプログラマブルコントロー
ラの周辺装置では、ひとまとまりのシーケンスプログラ
ムを指定し一つの命令として登録された命令を用いて作
成されたシーケンスプログラムにおいて、作成されたシ
ーケンスプログラムを周辺装置の画面に表示するとき、
登録した命令での表示と、元の一連のシーケンスプログ
ラムの表示を切り替えることにより、シーケンスプログ
ラムの動作を解析するとき詳細な解析が行い易い。
In the peripheral device for a programmable controller according to the present invention, in a sequence program created by using a command registered as one command by designating a group of sequence programs, the created sequence program is displayed on the screen of the peripheral device. When displaying,
By switching between the display with the registered instruction and the display of the original sequence program, a detailed analysis can be easily performed when analyzing the operation of the sequence program.

【0055】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、マクロプログラムを実行するための
条件とシンボル表現のマクロを接続した回路を作成する
マクロ流用処理手段と、前記マクロ流用処理手段により
作成されたマクロを実行するための条件とシンボル表現
のマクロを接続した回路をシーケンス回路表示したとき
に回路が正しく繋がるようにシーケンスプログラムを調
整するシーケンスプログラム調整手段とを有しているも
のである。
A peripheral device for a programmable controller according to the next invention comprises a macro diversion processing means for creating a circuit connecting a macro for executing a macro program and a symbol expression macro, and a macro diversion processing means created by the macro diversion processing means. And a sequence program adjusting means for adjusting a sequence program so that the circuits are correctly connected when a circuit in which conditions for executing the above are connected to a symbol expression macro is displayed as a sequence circuit.

【0056】この発明によるプログラマブルコントロー
ラの周辺装置では、マクロを実行するための条件とシン
ボル表現のマクロを接続した回路を作成すると、シーケ
ンス回路表示したときに回路が正しくつながるようシー
ケンスプログラムを調整することができる。
In the peripheral device of the programmable controller according to the present invention, when a circuit in which a macro execution condition and a symbol expression macro are connected is created, the sequence program is adjusted so that the circuit is correctly connected when the sequence circuit is displayed. Can be.

【0057】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、接点とマクロプログラムを接続した
回路をシーケンス回路表示したとき、接点を含まない元
のマクロ命令部分を抽出し、接点を含まない元のマクロ
命令部分を区別して表示する処理を行うマクロ範囲表示
処理手段を有しているものである。
In the peripheral device for a programmable controller according to the next invention, when a circuit connecting a contact and a macro program is displayed as a sequence circuit, an original macro instruction portion containing no contact is extracted and the original macro instruction not containing a contact is extracted. It has a macro range display processing means for performing a process of distinguishing and displaying parts.

【0058】この発明によるプログラマブルコントロー
ラの周辺装置では、接点とマクロを接続した回路をシー
ケンス回路表示したとき、接点を含まない元のマクロ命
令部分を区別して表示することができる。
In the peripheral device of the programmable controller according to the present invention, when the circuit connecting the contact and the macro is displayed as a sequence circuit, the original macro instruction portion not including the contact can be displayed in a distinguished manner.

【0059】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、マクロ回路に登録されたデバイスの
中から出力デバイスを取得する出力デバイス取得手段
と、前記出力デバイス取得手段によって取得した出力デ
バイスの状態をプログラマブルコントローラから取得す
る出力デバイス状態取得手段と、前記出力デバイス状態
取得手段によって取得した出力デバイスの状態からマク
ロ回路の導通・非導通状態を表示する処理を行うマクロ
状態表示処理手段とを有しているものである。
A peripheral device of a programmable controller according to the next invention comprises an output device acquiring means for acquiring an output device from devices registered in a macro circuit, and a state of the output device acquired by the output device acquiring means. From the output device state obtained by the output device state obtaining means, and macro state display processing means for performing processing for displaying the conductive / non-conductive state of the macro circuit from the state of the output device obtained by the output device state obtaining means It is.

【0060】この発明によるプログラマブルコントロー
ラの周辺装置では、登録したマクロ回路の導通、非導通
状態を、モニタ時にシーケンスプログラム回路表示画面
に表示することができる。
In the peripheral device of the programmable controller according to the present invention, the conduction / non-conduction state of the registered macro circuit can be displayed on the sequence program circuit display screen during monitoring.

【0061】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、ラダー回路のプログラミングにおい
て、複数の接点からなる回路を接点マクロ命令として登
録する接点マクロ登録手段と、複数の接点と複数のコイ
ルあるいは複数のコイルからなる回路をコイルマクロ命
令として登録するコイルマクロ登録手段と、前記接点マ
クロ登録手段によって登録した接点マクロ命令を接点部
に、前記コイルマクロ登録手段によって登録したコイル
マクロ命令をコイル部に組み合わせて流用するマクロ流
用手段とを有しているものである。
A peripheral device for a programmable controller according to the next invention comprises a contact macro registration means for registering a circuit composed of a plurality of contacts as a contact macro command in programming a ladder circuit, a plurality of contacts and a plurality of coils or a plurality of coils. Coil macro registration means for registering a circuit consisting of the following as a coil macro instruction; a contact macro instruction registered by the contact macro registration means at a contact portion; and a coil macro instruction registered by the coil macro registration means at a coil portion. Macro diverting means.

【0062】この発明によるプログラマブルコントロー
ラの周辺装置では、複数の接点からなる回路をマクロ命
令として登録し、複数の接点と複数のコイル、または、
複数のコイルからなる回路をマクロ命令として登録し、
これら登録した接点マクロ命令を接点部に、コイルマク
ロ命令をコイル部に組み合わせて流用することができ、
接点部とコイル部を別々に選択した組み合わせで流用し
てラダー回路のプログラムを作成することができる。
In the peripheral device of the programmable controller according to the present invention, a circuit including a plurality of contacts is registered as a macro instruction, and the plurality of contacts and a plurality of coils or
Register a circuit consisting of multiple coils as a macro instruction,
These registered contact macro instructions can be used in combination with the contact part, and coil macro instructions can be used in combination with the coil part.
The program of the ladder circuit can be created by diverting the combination of the contact part and the coil part separately selected.

【0063】つぎの発明によるプログラマブルコントロ
ーラの周辺装置は、ラダー回路のプログラミングにおい
て、1回路ブロックをブロックマクロ命令として登録す
るブロックマクロ命令登録手段と、前記ブロックマクロ
命令登録手段によって登録したブロックマクロ命令を接
点部とコイル部に組み合わせて流用し、接点部に記述し
たブロックマクロ命令のコイルに使用されているデバイ
スをコイル部に記述したブロックマクロ命令の前に接点
として付加して流用するマクロ流用手段とを有している
ものである。
A peripheral device for a programmable controller according to the next invention is characterized in that, in programming of a ladder circuit, a block macro instruction registration means for registering one circuit block as a block macro instruction, and a block macro instruction registered by the block macro instruction registration means. Macro diversion means for combining and diverting the contact part and the coil part, and adding the device used for the coil of the block macro instruction described in the contact part as a contact before the block macro instruction described in the coil part and diverting it, It has.

【0064】この発明によるプログラマブルコントロー
ラの周辺装置では、1回路ブロックをブロックマクロ命
令として登録し、登録したマクロ命令を接点部とコイル
部に組み合わせて流用し、接点部に記述したマクロ命令
のコイルに使用されているデバイスをコイル部に記述し
たマクロ命令の前に接点として付加して流用しプログラ
ムを作成することができる。
In the peripheral device of the programmable controller according to the present invention, one circuit block is registered as a block macro instruction, and the registered macro instruction is combined with a contact portion and a coil portion to be diverted to a coil of the macro instruction described in the contact portion. The device used can be added as a contact before the macro instruction described in the coil section to divert the program.

【0065】[0065]

【発明の実施の形態】以下に添付の図を参照してこの発
明の実施の形態を詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the accompanying drawings.

【0066】(実施の形態1)図1はこの発明よるプロ
グラマブルコントローラの周辺装置の一つの実施の形態
を示している。
(Embodiment 1) FIG. 1 shows an embodiment of a peripheral device of a programmable controller according to the present invention.

【0067】この周辺装置は、マクロプログラム登録手
段1と、デバイス登録手段2と、修正登録手段3と、マ
クロ展開手段4とを有している。
This peripheral device has a macro program registration unit 1, a device registration unit 2, a correction registration unit 3, and a macro expansion unit 4.

【0068】マクロプログラム登録手段1はひとまとま
りのシーケンスプログラムをマクロプログラムMPとし
てマクロ用メモリ5に登録する。
The macro program registration means 1 registers a set of sequence programs in the macro memory 5 as a macro program MP.

【0069】デバイス登録手段2はマクロプログラムM
Pをプログラム用メモリ6のシーケンスプログラムSP
に展開するためのデバイスをマクロ用メモリ5のデバイ
ス登録テーブルDTnに登録する。図1の例でも、従来
例と同様に、マクロプログラム“MACROA”をシー
ケンスプログラムSPにマクロ展開する時のラベルと実
存するデバイスNoとの対応表として、“MACROA
−1”部分のデバイス登録テーブルDT1と、“MAC
ROA−2”部分のデバイス登録テーブルDT2とがあ
る。
The device registration means 2 is a macro program M
P is the sequence program SP of the program memory 6
Are registered in the device registration table DTn of the macro memory 5. In the example of FIG. 1, as in the conventional example, "MACROA" is used as a correspondence table between labels and existing device numbers when the macro program "MACROA" is macro-expanded into the sequence program SP.
-1 "device registration table DT1 and" MAC
ROA-2 ″ part device registration table DT2.

【0070】修正登録手段3は、シーケンスプログラム
SPへ展開された後にマクロ展開部を修正した場合、そ
の履歴をマクロ用メモリ5の修正箇所登録テーブルCT
に登録する。修正箇所登録テーブルCTはマクロ展開部
毎に存在し、図1の例はMACROA−1用のものを示
している。修正箇所登録テーブルCTは、修正内容(変
更、追加、削除、移動)を示すデータのフィールドと、
これらの修正位置を示すデータのフィールドより構成さ
れている。
When the macro expansion unit is modified after being developed into the sequence program SP, the modification registration unit 3 stores the history of the modification in the modification location registration table CT of the macro memory 5.
Register with. The correction location registration table CT exists for each macro expansion unit, and the example of FIG. 1 shows a table for MACROA-1. The correction location registration table CT includes a data field indicating the content of the correction (change, addition, deletion, movement),
It consists of data fields indicating these correction positions.

【0071】なお、修正箇所登録テーブルCTaは追加
行をプログラムの後に移動した時の状態を示し、修正箇
所登録テーブルCTbは追加行を前詰めして修正行を再
設定した時の状態を示している。
The correction location registration table CTa shows the state when the additional row is moved after the program, and the correction location registration table CTb shows the state when the additional row is justified and the correction row is reset. I have.

【0072】マクロ展開手段4は、デバイス登録テーブ
ルDTnに登録されているラベル−デバイス対応に基づ
いてマクロプログラムMPをプログラム用メモリ6のシ
ーケンスプログラムSPに展開し、マクロプログラムM
Pを修正した場合には、その内容を修正箇所登録テーブ
ルを用いて既にシーケンスプログラムSPで修正された
箇所以外をシーケンスプログラムに展開する。
The macro expanding means 4 expands the macro program MP into the sequence program SP of the program memory 6 based on the label-device correspondence registered in the device registration table DTn,
When P is corrected, the contents are developed into the sequence program by using the corrected part registration table, except for the part already corrected by the sequence program SP.

【0073】図2(a)〜(f)は展開されたマクロプ
ログラム部分がユーザによって修正された時のシーケン
スプログラムの状態とマクロプログラム展開時の状態を
示す。
FIGS. 2A to 2F show the state of the sequence program when the expanded macro program portion is modified by the user and the state when the macro program is expanded.

【0074】図2(a)はシーケンスプログラムSPの
“MACROA−1”における“Y100”をユーザが
“Y300”に変更した時のプログラムの状態を、図2
(b)はシーケンスプログラムSPの“MACROA−
1”における“Y300”と“Y101”との間にユー
ザが“Y301”を追加した時の状態を、図2(c)は
シーケンスプログラムSPの“MACROA−1”にお
ける“Y101”をユーザが削除した時の状態を、図2
(d)は追加行を最終行に移動して削除行をブランク行
にした状態を、図2(e)は追加行を前詰めして修正行
を再設定した時の状態を、図2(f)はマクロ展開した
後の最終的な状態を各々示している。
FIG. 2A shows the state of the program when the user changes “Y100” in “MACROA-1” of the sequence program SP to “Y300”.
(B) shows the sequence program SP “MACROA-
1 shows a state when the user adds “Y301” between “Y300” and “Y101”, and FIG. 2C shows that the user deletes “Y101” in “MACROA-1” of the sequence program SP. Fig. 2
FIG. 2D shows a state in which the added line is moved to the last line and the deleted line is made a blank line, and FIG. 2E shows a state in which the added line is moved forward and the corrected line is reset. f) shows the final state after macro expansion.

【0075】つぎに図3に示されているフローチャート
を参照してユーザがシーケンスプログラムを変更(修
正)する処理手順を説明する。
Next, the processing procedure in which the user changes (modifies) the sequence program will be described with reference to the flowchart shown in FIG.

【0076】ユーザがシーケンスプログラムSPの“Y
100”を“Y300“に変更すると(ステップS1
0)、修正登録手段3は修正箇所登録テーブルCTに変
更した修正行,列と修正内容を登録する(ステップS2
0)。
When the user selects "Y" in the sequence program SP
When “100” is changed to “Y300” (step S1
0), the correction registering means 3 registers the corrected rows, columns, and corrected contents in the corrected part registration table CT (step S2).
0).

【0077】つぎに、ユーザがシーケンスプログラムS
Pの“Y300”の次行に“Y301”を追加すると
(ステップS30)、修正登録手段3は修正箇所登録テ
ーブルCTに追加した行,列と修正内容を登録する(ス
テップS40)。
Next, the user enters the sequence program S
When "Y301" is added to the next row of "Y300" of P (step S30), the correction registration unit 3 registers the added row, column, and correction content in the correction location registration table CT (step S40).

【0078】つぎに、ユーザがシーケンスプログラムS
Pから“Y101”を削除すると(ステップS50)、
修正箇所登録手段3は修正箇所登録テーブルCTに削除
した行,列と修正内容を登録し(ステップS60)、終
了する。
Next, the user enters the sequence program S
When "Y101" is deleted from P (step S50),
The correction location registration means 3 registers the deleted row, column, and correction content in the correction location registration table CT (step S60), and ends.

【0079】つぎに図4、図5に示されているフローチ
ャートを参照してユーザがシーケンスプログラムを修正
した後のマクロ展開処理について説明する。
Next, the macro expansion processing after the user modifies the sequence program will be described with reference to the flowcharts shown in FIGS.

【0080】まず、図4を参照してマクロ展開の前処理
について説明する。修正箇所登録テーブルCTより修正
内容が“追加”となっている箇所を検索し(ステップS
100)、“追加”があった場合には(ステップS11
0肯定)、追加したプログラムを削除行か、シーケンス
プログラム“MACROA−1”のどちらか大きい方の
行のあとへ追加し、元の行をブランク行として修正箇所
登録テーブルCTaへ修正行,列、修正内容“移動”を
登録する(ステップS120)。
First, the preprocessing of macro expansion will be described with reference to FIG. A search is made for a portion whose correction content is “added” from the correction portion registration table CT (Step S).
100), if there is “addition” (step S11)
0 is affirmative), the added program is added to the deleted line or after the larger line of the sequence program "MACROA-1", and the original line is set as a blank line in the corrected portion registration table CTa as the corrected line, column, and correction. The content "move" is registered (step S120).

【0081】つぎに、修正箇所登録テーブル2より修正
内容が“削除”になっている箇所を検索し(ステップS
130)、“削除”があった場合には(ステップS14
0肯定)、削除行をブランク行とし(ステップS15
0)、修正内容が“削除”になっている行を削除して前
詰めたプログラム(図2(e)参照)を作成し、修正箇
所登録テーブルCTaにおける前詰め以降の修正行,列
を前詰め行分差し引いた行,列で再登録して修正箇所登
録テーブルCTbを作成する(ステップS160)。
Next, a portion whose correction content is "deleted" is searched from the correction portion registration table 2 (step S).
130), if there is “deletion” (step S14)
0 affirmative), and set the deleted line as a blank line (step S15).
0), a program (refer to FIG. 2E) in which the line whose correction content is “deleted” is deleted and left justified is created, and the corrected lines and columns after the left justification in the correction portion registration table CTa are moved forward. The correction location registration table CTb is created by re-registering with the rows and columns deducted from the filling row (step S160).

【0082】つぎに、図5を参照してマクロ展開処理に
ついて説明する。シーケンスプログラムSP中でマクロ
展開処理の対象となるプログラムがあるかを(シーケン
スプログラムSP中に“MACROA”があるか)検索
し(ステップS170)、存在する場合には(ステップ
S180肯定)、従来技術と同様にマクロプログラムM
P内のラベルを検索する(ステップS190)。
Next, the macro expansion processing will be described with reference to FIG. A search is performed to determine whether there is a program to be subjected to macro expansion processing in the sequence program SP (whether “MACROA” is present in the sequence program SP) (step S170). Macro program M
The label in P is searched (step S190).

【0083】マクロ展開処理対象となるラベルが存在す
る場合には(ステップS200肯定)、ラベルの位置が
修正箇所登録テーブルCTに登録されているかを検索す
る(ステップS210)。例えば、ラベルvd0の位置
は、修正箇所登録テーブルCTbに登録されていないの
で(修正行,列Noとして“0、0”が登録されていな
い)、ユーザによって修正されていないと見なされ(ス
テップS220否定)、マクロ展開の対象となり、従来
技術と同様にラベルに対応するデバイスNoをデバイス
登録テーブルDT1より検索し(ステップS230)、
シーケンスプログラムSPのデバイスNoとデバイス登
録テーブルDT1に登録されたデバイスNoを入れ替え
てマクロプログラムの展開を行う(ステップS24
0)。
If there is a label to be subjected to macro expansion processing (Yes at step S200), it is searched whether the label position is registered in the correction location registration table CT (step S210). For example, since the position of the label vd0 is not registered in the correction location registration table CTb (“0, 0” is not registered as the correction row and column No.), it is considered that the position has not been corrected by the user (step S220). No), the device No. corresponding to the label is searched from the device registration table DT1 in the same manner as in the related art, as in the case of the related art (step S230).
The macro program is expanded by exchanging the device number of the sequence program SP with the device number registered in the device registration table DT1 (step S24).
0).

【0084】これに対し、マクロ展開処理の対象となる
つぎのラベルvd1は修正箇所登録テーブルCTbに、
修正行,列Noとして“0、12”が登録されているの
で(ステップS220肯定)、登録されている修正内容
が“変更”、“削除”かを判別する(ステップS25
0)。ラベルvd1は修正内容が“変更”となっている
ので、ユーザが修正した箇所と見なしてマクロ展開処理
の対象から外し、修正されたシーケンスプログラムSP
の内容を残すようにする。ラベルvd2についても同様
に、修正箇所登録テーブルCTbに、修正行,列Noと
して“1、12”が登録されているので(ステップS2
20肯定)、登録されている修正内容が“変更”、“削
除”かを判別する(ステップS250)。ラベルvd1
は修正内容が“削除”となっているので、ユーザが修正
した箇所と見なしてマクロ展開処理の対象から外し、修
正されたシーケンスプログラムSPの内容を残すように
する。
On the other hand, the next label vd1 to be subjected to macro expansion processing is added to the correction location registration table CTb.
Since “0, 12” is registered as the correction row and column No (Yes at step S220), it is determined whether the registered correction content is “change” or “delete” (step S25).
0). Since the modification content of the label vd1 is "changed", the label vd1 is regarded as a location modified by the user and is excluded from the target of the macro expansion processing, and the modified sequence program SP
Leave the contents of. Similarly, for the label vd2, "1, 12" is registered as the correction row and column No. in the correction location registration table CTb (step S2).
20 is affirmative), it is determined whether the registered correction content is “change” or “delete” (step S250). Label vd1
Since the content of the modification is "delete", it is regarded as a portion modified by the user and is excluded from the macro expansion processing, so that the content of the modified sequence program SP is left.

【0085】ステップS190〜ステップS250まで
をマクロプログラムMPの全てのラベルに対して行って
マクロ展開処理が終わると、後処理を行う。
Steps S190 to S250 are performed for all the labels of the macro program MP, and when the macro expansion processing is completed, post-processing is performed.

【0086】後処理としては、修正箇所登録テーブルC
Tbより“削除”を検索し(ステップS260)、削除
行がある場合には(ステップS270肯定)削除位置の
プログラムをブランク行で復元しているのでこれを削除
する。この例では、修正行,列No.“1、12”の位
置が“削除”となっているので、対象行を削除して前詰
めする(ステップS280)。
As post-processing, the correction location registration table C
"Delete" is retrieved from Tb (step S260), and if there is a deleted line (Yes at step S270), the program at the delete position is restored with a blank line, so that this is deleted. In this example, the correction row, column No. Since the position of “1, 12” is “delete”, the target line is deleted and the data is justified (step S280).

【0087】図2(f)が削除された後のシーケンスプ
ログラム10の状態を示している。このように、マクロ
展開処理前の状態となるので、修正箇所登録テーブルC
Tbをつぎのマクロ展開処理で使用できるように元の修
正箇所登録テーブルCTに戻し(ステップS290)、
処理を終了する。
FIG. 2F shows the state of the sequence program 10 after the deletion. As described above, since the state before the macro expansion processing is obtained, the correction location registration table C
Tb is returned to the original correction location registration table CT so that it can be used in the next macro expansion processing (step S290),
The process ends.

【0088】このようにユーザが修正した内容を記録し
ておき、マクロ展開時に修正箇所以外を展開することに
より、展開されたシーケンスプログラムの一部を追加等
の変更を行った後にマクロ展開を行っても、変更箇所は
展開の対象とならないため、修正した箇所に対応するマ
クロプログラムを新に登録する必要がなくなり、開発効
率、メンテナンス性が向上する。
The contents modified by the user are recorded in this way, and the parts other than the modified part are developed at the time of macro development, so that macro development is performed after making a change such as adding a part of the developed sequence program. However, since the changed part is not to be expanded, there is no need to newly register a macro program corresponding to the corrected part, thereby improving development efficiency and maintainability.

【0089】(実施の形態2)図6、図7はこの発明に
よるシーケンスプログラムの周辺装置(プログラミング
機器)の一つの実施の形態を示している。このプログラ
ミング機器は、補助記憶装置10と、CRTなどによる
表示器11と、入力手段であるキーボード12と、命令
登録処理部13と、命令展開処理部14と、命令表示処
理部15と、デバイス番号位置カウンタ16と、読出し
行カウンタ17と、命令格納メモリ18と、シーケンス
プログラム格納メモリ19と、使用デバイス格納メモリ
20と、検索位置カウンタ21とを有している。
(Embodiment 2) FIGS. 6 and 7 show an embodiment of a peripheral device (programming device) for a sequence program according to the present invention. The programming device includes an auxiliary storage device 10, a display 11 such as a CRT, a keyboard 12 as input means, an instruction registration processing unit 13, an instruction development processing unit 14, an instruction display processing unit 15, a device number It has a position counter 16, a read-out row counter 17, an instruction storage memory 18, a sequence program storage memory 19, a used device storage memory 20, and a search position counter 21.

【0090】命令登録処理部13は、ひとまとまりのシ
ーケンスプログラムを指定し、これを一つの命令として
補助記憶装置10に登録する。命令登録においては、各
命令毎に固有の命令名が定義され、これは、図8に示さ
れているような画面において、キーボード12より命令
名をテキスト入力することにより、“命令名:_”に命
令名が画面表示され、エンタキー入力などにより確定す
る。
The instruction registration processing section 13 designates a set of sequence programs, and registers them in the auxiliary storage device 10 as one instruction. In the instruction registration, a unique instruction name is defined for each instruction. The instruction name is input by text input from the keyboard 12 on a screen as shown in FIG. The instruction name is displayed on the screen, and is determined by the enter key input or the like.

【0091】命令展開処理部14は、補助記憶装置10
に登録、格納された命令を命令格納メモリ18に読出
し、登録された命令を使用してシーケンスプログラムを
作成する。
The instruction expansion processing unit 14
The instruction registered and stored in the memory is read out to the instruction storage memory 18, and a sequence program is created using the registered instruction.

【0092】命令表示処理部15は、作成されたシーケ
ンスプログラムを表示器11の画面に表示するときに、
登録した命令での表示と元の一連のシーケンスプログラ
ムでの表示を切り替える処理を行う。
The instruction display processor 15 displays the created sequence program on the screen of the display 11
A process of switching between display by the registered instruction and display by the original sequence program is performed.

【0093】図9は一つの命令として登録すべきひとま
とまりのシーケンスプログラムを示している。このシー
ケンスプログラムは、図63に示されている従来例にお
ける押出機の押出シリンダの一回の往復動動作のシーケ
ンスプログラムである。
FIG. 9 shows a group of sequence programs to be registered as one instruction. This sequence program is a sequence program of one reciprocating operation of the extrusion cylinder of the extruder in the conventional example shown in FIG.

【0094】上述のようなシーケンスプログラムは、命
令登録処理部13によって一つ命令(命令プログラム)
として登録することができる。図10は、図9のシーケ
ンスプログラムを、命令名“PUSHER”として登録
する例を示している。なお、括弧内は図10に具体例を
表している。
The sequence program as described above is processed by the instruction registration processing unit 13 into one instruction (instruction program).
Can be registered as FIG. 10 shows an example in which the sequence program of FIG. 9 is registered as an instruction name “PUSHER”. Note that a specific example is shown in parentheses in FIG.

【0095】この命令は、命令の先頭を表す文字列(;
命令 PUSHER)、引数の個数を宣言する行(;引
数 5)、引数定義領域(;VD1〜;VD5)、プロ
グラム領域(LD〜RST)、命令の最後を表す文字列
(;命令 END)により構成されている。プログラム
領域(LD〜RST)は、図9に示されているシーケン
スプログラムにおけるデバイス番号を引数定義領域(;
VD1〜;VD5)で定義された引数(関数)と同一名
の仮想デバイス(変数定義VD1〜VD5)で表現し、
ここに引数を渡される。
This instruction is a character string (;
Command PUSHER), a line declaring the number of arguments (; argument 5), an argument definition area (; VD1 to VD5), a program area (LD to RST), and a character string indicating the end of the instruction (; instruction END) Have been. The program area (LD to RST) indicates the device number in the sequence program shown in FIG.
VD1 to VD5) are represented by virtual devices (variable definitions VD1 to VD5) having the same names as the arguments (functions) defined in VD1;
Arguments are passed here.

【0096】図11は登録された命令を含むシーケンス
プログラムの一例を示している。このシーケンスプログ
ラムは全文をユーザによって作成されるものであり、図
64に示されている従来例のものと同一のシーケンス動
作のためのシーケンスプログラムである。このシーケン
スプログラムでは、従来例のA、B、Cの各部分が、3
行目と6行目と9行目の一行の命令文に置き換えられて
いる。この命令文は、命令名と引数よりなり、例えば3
行目では、“PUSHER”が命令名で、“M100
Y101 X101 Y100 X100”が引数であ
る。
FIG. 11 shows an example of a sequence program including registered instructions. This sequence program is created by the user for the entire sentence, and is a sequence program for the same sequence operation as that of the conventional example shown in FIG. In this sequence program, each of A, B, and C in the conventional example
It is replaced by the statement on the first line, the sixth line and the ninth line. This statement consists of a command name and an argument.
In the line, “PUSHER” is the instruction name and “M100
Y101 X101 Y100 X100 "is the argument.

【0097】使用デバイス格納メモリ20には図1に例
示されているような使用デバイス表が格納される。この
使用デバイス表は、デバイス登録テーブルと同等のもの
であり、ラベルが仮想デバイス(関数名)に相当し、使
用デバイスが実存するデバイスNo(引数)に相当す
る。
The used device storage memory 20 stores a used device table as illustrated in FIG. This used device table is equivalent to the device registration table, and has a label corresponding to a virtual device (function name) and a device No (argument) in which a used device actually exists.

【0098】図12は命令展開処理部14によって図1
1のシーケンスプログラムの命令を展開した後のシーケ
ンスプログラムを示している。図12において、A部分
は図11のシーケンスプログラムの3行目の命令の展開
部であり、B部分は図11のシーケンスプログラムの6
行目の命令の展開部であり、C部分は図11のシーケン
スプログラムの9行目の命令の展開部である。
FIG. 12 shows the instruction expansion processing unit 14 of FIG.
2 shows a sequence program after the instructions of the first sequence program are expanded. In FIG. 12, part A is an expanded part of the instruction on the third line of the sequence program of FIG. 11, and part B is part 6 of the sequence program of FIG.
This is the expansion unit of the instruction on the line, and part C is the expansion unit of the instruction on the ninth line of the sequence program in FIG.

【0099】A部分では、各関数名VD1、VD2、V
D3、VD4、VD5の後に引数であるデバイス番号M
100 Y101 X101 Y100 X100が記
述され、これが各々変数定義に渡される。
In the part A, each function name VD1, VD2, VD
Device number M as an argument after D3, VD4, VD5
100 Y101 X101 Y100 X100 are described, which are each passed to the variable definition.

【0100】使用デバイス格納メモリ20には図13に
例示されているような使用デバイス表が格納される。こ
の使用デバイス表は、デバイス登録テーブルと同等のも
のであり、ラベルが仮想デバイス(関数名)に相当し、
使用デバイスが実存するデバイスNo(引数)に相当す
る。
The used device storage memory 20 stores a used device table as illustrated in FIG. This used device table is equivalent to the device registration table, and the label corresponds to a virtual device (function name).
This corresponds to the device number (argument) in which the used device actually exists.

【0101】つぎに、動作について説明する。まず、命
令として登録するプログラムを作成する。このプログラ
ムの作成に際しては、例えば、図63に示されている機
械設備のシーケンスプログラムとして、図9に例示され
ているように作成し、作成したシーケンスプログラムを
補助記憶装置10に登録する。この登録は、例えば、図
8に示されているような画面表示で、命令名をキーボー
ド12から入力することで行う。登録を実行すると、命
令登録処理部13による命令登録処理ルーチンが開始さ
れる。
Next, the operation will be described. First, a program to be registered as an instruction is created. When creating this program, for example, it is created as shown in FIG. 9 as a sequence program of the mechanical equipment shown in FIG. 63, and the created sequence program is registered in the auxiliary storage device 10. This registration is performed, for example, by inputting an instruction name from the keyboard 12 on a screen display as shown in FIG. When the registration is executed, an instruction registration processing routine by the instruction registration processing unit 13 is started.

【0102】この命令登録処理ルーチンは図14に示さ
れており、先ず、“;命令”の文字列と、図8に示され
ているような画面表示で入力された命令名とを順に補助
記憶装置10に格納する(ステップS300,ステップ
S310)。
This instruction registration processing routine is shown in FIG. 14. First, a character string of ";instruction" and an instruction name input on the screen display as shown in FIG. It is stored in the device 10 (step S300, step S310).

【0103】つぎに、プログラムの最後である否かを判
別する(ステップS320)。最後でない場合には(ス
テップS320否定)、プログラム(図9に示されてい
るもの)の現在行のデバイス番号を取り出し(ステップ
S330)、取り出したデバイス番号が図13に示され
ているような使用デバイス表に登録済みであるか否かを
確認する(ステップS340)。
Next, it is determined whether or not the program is the last (step S320). If it is not the last (No at step S320), the device number of the current line of the program (shown in FIG. 9) is fetched (step S330), and the fetched device number is used as shown in FIG. It is confirmed whether or not it has been registered in the device table (step S340).

【0104】登録済みでない場合には(ステップS35
0否定)には、デバイス番号をデバイス番号カウンタ1
6による使用デバイス表のカウンタ指定位置に追加登録
する(ステップS360)。
If not registered (step S35)
0 negative), the device number is set to the device number counter 1
6 is additionally registered at the designated position of the counter of the used device table (step S360).

【0105】つぎに、使用デバイス表のカウンタ指定位
置の番号を仮想デバイスとしてデバイス番号と置き換え
る(ステップS370)。
Next, the number of the counter designated position in the used device table is replaced with a device number as a virtual device (step S370).

【0106】ステップS330〜ステップS370はプ
ログラムの最終と判断されるまで繰り返され、プログラ
ムの最後であると判別されると(ステップS320肯
定)、“;引数”の文字列と、使用デバイス表に登録さ
れたデバイス番号の個数nとを順に補助記憶装置10に
格納する(ステップS380)。
Steps S330 to S370 are repeated until it is determined that the program is at the end. If it is determined that the program is at the end (Yes at step S320), the character string of ";argument" and the used device table are registered. The number n of the obtained device numbers is sequentially stored in the auxiliary storage device 10 (step S380).

【0107】つぎに、デバイス番号の個数分の“;VD
n”の仮想デバイスを補助記憶装置壱0に格納する(ス
テップS390)。
Next, "; VD for the number of device numbers"
The virtual device of n ″ is stored in the auxiliary storage device 10 (step S390).

【0108】つぎに、プログラム文(シーケンスプログ
ラム)を補助記憶装置10に格納し(ステップS40
0)、最後に、“;命令 END“ の文字列を補助記
憶装置10に格納し(ステップS410)、処理を終了
する。
Next, the program statement (sequence program) is stored in the auxiliary storage device 10 (step S40).
0) Finally, the character string of “; instruction END” is stored in the auxiliary storage device 10 (step S410), and the process ends.

【0109】これにより、登録された命令は、図10に
示されているようなプログラム記述で、補助記憶装置1
0に格納される。
Thus, the registered instruction is a program description as shown in FIG.
0 is stored.

【0110】登録された命令を使用したシーケンスプロ
グラムを作成する場合には、図11に例示されているよ
うに、命令文を含むシーケンスプログラムを作成する。
When a sequence program using registered instructions is created, a sequence program including an instruction statement is created as illustrated in FIG.

【0111】図11に示されているように作成されたシ
ーケンスプログラムをプログラミング装置で表示する場
合、通常の表示と命令を展開した形式での表示と表示モ
ードを切替えることができる。これは、例えば、図7に
示されているように、キーボード12のファンクション
キーF1の操作により表示モードを切り替えるような構
成にすることが考えられる。
When a sequence program created as shown in FIG. 11 is displayed on a programming device, it is possible to switch between a normal display and a display in which instructions are expanded and a display mode. For example, as shown in FIG. 7, it is possible to adopt a configuration in which the display mode is switched by operating the function key F1 of the keyboard 12.

【0112】図11に示されているように作成されたシ
ーケンスプログラムはシーケンスプログラム格納メモリ
19に格納されており、表示モードを切替えた場合は、
命令展開処理部14によって命令展開ルーチンが図15
に示されているようなフローチャートに従って実行さ
れ、命令展開処理部14が命令を展開する。
The sequence program created as shown in FIG. 11 is stored in the sequence program storage memory 19, and when the display mode is switched,
The instruction expansion routine is executed by the instruction expansion processor 14 as shown in FIG.
Are executed according to the flowchart shown in FIG.

【0113】命令展開ルーチンでは、先ず読出しカウン
タ17によるシーケンスプログラムの読出し行を“1”
に初期化する(ステップS500)。
In the instruction expansion routine, first, the read line of the sequence program by the read counter 17 is set to "1".
(Step S500).

【0114】つぎに、最後の行であるか否かの判別を行
う(ステップS510)。最後の行でない場合には(ス
テップS510肯定)、現在の読出し行の命令(文字
列)を読出し(ステップS520)、補助記憶装置10
から読出した命令が登録されているかを検索する(ステ
ップS530)。検索で一致しないと判断すると(ステ
ップS540否定)、読出しカウンタ17による読出し
行を1つ増やし(ステップS630)、ステップS51
0に戻る。
Next, it is determined whether or not it is the last line (step S510). If it is not the last line (Yes at Step S510), the instruction (character string) of the current read line is read (Step S520), and the auxiliary storage device 10 is read.
It is searched whether the instruction read from is registered (step S530). If it is determined that they do not match (No at Step S540), the number of rows read by the read counter 17 is increased by one (Step S630), and Step S51 is performed.
Return to 0.

【0115】これに対し、検索で一致すると判断すると
(ステップS540肯定)、補助記憶装置10から、命
令格納メモリ18へ命令のプログラムを読み出す(ステ
ップS550)。読み出したプログラムは登録されたプ
ログラムであり、これは、例えば、図10に示されてい
るようなプログラムになっている。
On the other hand, if it is determined in the search that they match (Yes in step S540), the instruction program is read from the auxiliary storage device 10 to the instruction storage memory 18 (step S550). The read program is a registered program, which is, for example, a program as shown in FIG.

【0116】つぎに、デバイス番号位置カウンタ16に
よるデバイス番号位置を“1”に初期化する(ステップ
S560)。
Next, the device number position by the device number position counter 16 is initialized to "1" (step S560).

【0117】つぎに、引数個数nがデバイス番号位置カ
ウンタ16によるデバイス番号位置より小さいか否かを
判定する(ステップS570)。
Next, it is determined whether or not the argument number n is smaller than the device number position by the device number position counter 16 (step S570).

【0118】引数個数nがデバイス番号位置より小さい
と判断すると(ステップS570肯定)、現在のデバイ
ス番号位置のデバイス番号を図11のプログラム(命令
行)から読み出し(ステップS580)、そのデバイス
番号位置に相当する仮想デバイスVDnを読み出したデ
バイス番号に置き換え(ステップS590)、引数定義
領域のデバイス番号位置に相当する仮想デバイスの部分
に、置き換えたデバイス番号を入れる(ステップS60
0)。
When it is determined that the argument number n is smaller than the device number position (Yes at step S570), the device number at the current device number position is read from the program (instruction line) of FIG. 11 (step S580), and The corresponding virtual device VDn is replaced with the read device number (step S590), and the replaced device number is inserted into the portion of the virtual device corresponding to the device number position in the argument definition area (step S60).
0).

【0119】つぎに、デバイス番号位置カウンタ16に
よるデバイス番号位置を1つ増やし(ステップS61
0)、ステップS570へ戻り、引数個数nがデバイス
番号位置より大きいと判断されまでステップS580〜
S610を繰り返す。
Next, the device number position is incremented by one by the device number position counter 16 (step S61).
0), the process returns to step S570, and steps S580 to S580 until the number of arguments n is determined to be larger than the device number position.
S610 is repeated.

【0120】引数個数nがデバイス番号位置より大きい
と判断すると(ステップS570否定)、現在の読出し
行の命令を命令格納メモリ18のプログラム(図10に
示されているようなプログラム)に置き換える(ステッ
プS620)。
If it is determined that the number of arguments n is larger than the device number position (No at Step S570), the instruction of the current read line is replaced with the program of the instruction storage memory 18 (the program as shown in FIG. 10) (Step S570). S620).

【0121】つぎに、読出しカウンタ17による読出し
行を1つ増やし(ステップS630)、ステップS51
0へ戻り、最後の行と判断すると(ステップS510肯
定)、処理を終了する。
Next, the number of rows read by the read counter 17 is increased by one (step S630), and step S51 is performed.
Returning to 0, if it is determined that it is the last line (Yes at Step S510), the process ends.

【0122】このようにして、図11に示されているよ
うな命令を含むシーケンスプログラムは図12に示され
ているようなシーケンスプログラムに展開され、このプ
ログラムはシーケンスプログラム格納メモリ19に格納
されて表示器11に表示される。
In this way, the sequence program including the instruction as shown in FIG. 11 is developed into the sequence program as shown in FIG. 12, and this program is stored in the sequence program storage memory 19. It is displayed on the display 11.

【0123】図12に示されているような命令展開済み
のシーケンスプログラムを登録された命令のプログラム
で表示する場合には、命令表示処理部15によって命令
表示処理ルーチンが図16に示されているようなフロー
チャートに従って実行される。
When displaying a sequence program after instruction expansion as shown in FIG. 12 by a registered instruction program, an instruction display processing routine by the instruction display processing unit 15 is shown in FIG. It is executed according to such a flowchart.

【0124】命令表示ルーチンでは、先ず読出しカウン
タ17によるシーケンスプログラムの読出し行を“1”
に初期化する(ステップS700)。
In the instruction display routine, first, the read line of the sequence program by the read counter 17 is set to "1".
(Step S700).

【0125】つぎに、最後の行であるか否かの判別を行
う(ステップS710)。最後の行でない場合には(ス
テップS710否定)、現在の読出し行の命令(文字
列)を読出し(ステップS720)、文字列が“;命
令”であるか否かを判別する(ステップS730)。文
字列が“;命令”でない場合には(ステップS730否
定)、読出しカウンタ17による読出し行を1つ増やし
(ステップS840)、ステップS710に戻る。
Next, it is determined whether or not it is the last line (step S710). If it is not the last line (No at Step S710), the command (character string) of the current read line is read (Step S720), and it is determined whether or not the character string is “; command” (Step S730). If the character string is not “; instruction” (No at Step S730), the number of lines read by the read counter 17 is increased by one (Step S840), and the process returns to Step S710.

【0126】文字列が“;命令”である場合には(ステ
ップS730肯定)、“;命令”の文字列に続く命令
名、例えば“PUSHER”を取り出す(ステップS7
40)。
If the character string is ";instruction" (Yes at step S730), the instruction name following the character string of ";instruction", for example, "PUSHER" is extracted (step S7).
40).

【0127】つぎに、取り出した命令名を命令格納メモ
リ18に格納し(ステップS750)、引数領域のデバ
イス番号を命令格納メモリ18の命令名の後に格納する
(ステップS760)。
Next, the extracted instruction name is stored in the instruction storage memory 18 (step S750), and the device number in the argument area is stored after the instruction name in the instruction storage memory 18 (step S760).

【0128】つぎに、検索位置カウンタ21による検索
位置を“1”に初期化する(ステップS780)。
Next, the search position by the search position counter 21 is initialized to "1" (step S780).

【0129】つぎに、現在検索位置の命令(文字列)が
“;命令 END”と一致するか否かを判断する(ステ
ップS790)。違うなら(ステップS790否定)、
現在の検索位置の命令(行)を削除し(ステップS80
0)、検索位置カウンタ21による検索位置を1つ増や
し(ステップS810)、ステップS790へ戻る。
Next, it is determined whether or not the command (character string) at the current search position matches "; command END" (step S790). If not (No at Step S790),
The instruction (line) at the current search position is deleted (step S80)
0), the search position by the search position counter 21 is increased by one (step S810), and the process returns to step S790.

【0130】現在検索位置の命令(文字列)が“;命令
END”と一致する場合には(ステップS790肯
定)、現在の検索位置の命令(行)を削除し(ステップ
S820)、現在の読出し行の命令を命令格納メモリ1
8の命令に置き換え(ステップS830)、読出しカウ
ンタ17によるシーケンスプログラムの読出し行を1つ
増やし(ステップS840)、ステップS710へ戻
り、最後の行と判断すると、処理を終了する。
If the command (character string) at the current search position matches "; command END" (Yes at step S790), the command (line) at the current search position is deleted (step S820), and the current reading is performed. The instruction of the line is stored in the instruction storage memory 1.
8 (step S830), the readout line of the sequence program by the readout counter 17 is incremented by one (step S840), the process returns to step S710, and when the last line is determined, the process ends.

【0131】このようにして、展開されたシーケンスプ
ログラム(図12)は、命令を使用した図11に示され
ているようなプログラムに変換され、シーケンスプログ
ラム格納メモリ19に格納され、表示器11に表示され
る。
The developed sequence program (FIG. 12) is converted into a program using instructions as shown in FIG. 11, stored in the sequence program storage memory 19, and displayed on the display unit 11. Is displayed.

【0132】この実施の形態では、リストで表現された
シーケンスプログラムにおいて、予め登録された命令を
使用してプログラムを作成することができ、登録された
命令を使用したプログラムと、命令を展開したプログラ
ムとを簡単に切替表示することができる。
In this embodiment, in a sequence program represented by a list, a program can be created using instructions registered in advance, and a program using the registered instructions and a program expanding the instructions Can be easily switched and displayed.

【0133】(実施の形態3)図17はこの発明による
シーケンスプログラムの周辺装置の他の実施の形態を示
している。この周辺装置は、マクロ登録手段30と、デ
バイス登録テーブル格納メモリ31と、マクロ流用処理
手段32と、シンボル表示処理手段33と、シーケンス
プログラム調整処理手段34と、シーケンス回路表示処
理手段35と、CRTなどによる表示器36とを有して
いる。
(Embodiment 3) FIG. 17 shows another embodiment of a sequence program peripheral device according to the present invention. This peripheral device includes a macro registration unit 30, a device registration table storage memory 31, a macro diversion processing unit 32, a symbol display processing unit 33, a sequence program adjustment processing unit 34, a sequence circuit display processing unit 35, a CRT And the like.

【0134】マクロ登録手段30は、プログラム中で指
定されたマクロ登録対象の回路範囲、例えば図18に示
されているように回路を“A”と云う名前で一つのマク
ロプログラムとして格納し、マクロプログラムの登録デ
バイスをデバイス登録テーブル格納メモリ31に格納さ
れているデバイス登録テーブルに従って仮想デバイスに
置き換え、図19に示されているようなマクロ流用のた
めのマクロプログラムを登録する。
The macro registration means 30 stores a circuit area to be registered in the macro designated in the program, for example, as shown in FIG. 18, a circuit under the name "A" as one macro program. The registered device of the program is replaced with a virtual device according to the device registration table stored in the device registration table storage memory 31, and a macro program for macro reuse as shown in FIG. 19 is registered.

【0135】デバイス登録テーブル格納メモリ31に書
き込まれるデバイス登録テーブルは図20に例示されて
いる。デバイス登録テーブルは、マクロ登録を行うと
き、登録するマクロプログラム中で使用しているデバイ
スのうち、マクロ流用時に作成者が変更する予定のデバ
イス(登録デバイス)を登録しておくデバイス登録テー
ブルであり、各登録デバイスXn,Ynに対して仮想デ
バイスVD1、VD2…を与え、また、マクロ流用のと
きのどんな内容のデバイスであったかを判断できるよ
う、各登録デバイスXn,Ynに対してコメントを書き
込めるようになっている。
The device registration table written in the device registration table storage memory 31 is illustrated in FIG. The device registration table is a device registration table for registering a device (registered device) to be changed by a creator when diverting a macro among devices used in a macro program to be registered when performing macro registration. , The virtual devices VD1, VD2... Are given to the registered devices Xn, Yn, and comments can be written to the registered devices Xn, Yn so as to determine what kind of device was used when the macro was diverted. It has become.

【0136】マクロ流用処理手段32は、作成者によっ
てデバイスX0、X1のつぎにマクロAを流用する指定
がなされると、マクロ登録手段30に登録してあるマク
ロAの回路と、デバイス登録テーブル格納メモリ31の
デバイス登録テーブルとを内部メモリ上に読み出し、デ
バイス登録テーブルを元に図21に示されているような
デバイス流用テーブルを表示器36に画面表示する処理
を行い、作成者によって各仮想デバイスについて変更デ
バイスを指令されることにより、マクロ登録した回路中
の各仮想デバイスを、デバイス流用テーブルを元に作成
者の指定したデバイスに置き換える。
When the creator designates to divert the macro A after the devices X0 and X1, the macro diversion processing means 32 stores the macro A circuit registered in the macro registration means 30 and the device registration table storage. The device registration table of the memory 31 is read into the internal memory, and a process of displaying a device diversion table as shown in FIG. 21 on the display 36 based on the device registration table is performed. , A virtual device in the circuit registered as a macro is replaced with a device specified by the creator based on the device diversion table.

【0137】デバイス流用テーブルは、マクロ流用を行
うとき、デバイス登録テーブルで仮想デバイスとして登
録してあるデバイスに対し変更後のデバイスを指定する
ものである。
The device diversion table is used to specify a device after change for a device registered as a virtual device in the device registration table when performing macro diversion.

【0138】シンボル表示処理手段33は、図22に示
されているように、デバイスX1に続いてマクロ流用し
た回路Aを表示器36に“[M.A]”をもってシンボ
ル表示する処理を行う。図22は、“A”と云うマクロ
を実行する条件として、接点X0、X1を付加した回路
をシンボル表示したものである。
As shown in FIG. 22, the symbol display processing means 33 performs a process of displaying the circuit A, which has been diverted from the macro, following the device X1 on the display 36 with "[MA]" as a symbol. FIG. 22 is a symbol representation of a circuit to which contacts X0 and X1 are added as conditions for executing the macro "A".

【0139】シーケンスプログラム調整処理手段34
は、図22に例示されているように、マクロを実行する
ための条件とシンボル表現のマクロを接続した回路が作
成された場合、シーケンス回路表示したときに回路が正
しく繋がるようにシーケンスプログラムを調整する。こ
こで、回路が正しく繋がるようにシーケンスプログラム
を調整するとは、図23に示されているような不完全接
続の回路表示を図24に示されているよう完全接続の回
路に調整することである。
Sequence program adjustment processing means 34
As shown in FIG. 22, when a circuit is created by connecting a macro for symbol execution and a condition for executing a macro, a sequence program is adjusted so that the circuits are correctly connected when the sequence circuit is displayed. I do. Here, adjusting the sequence program so that the circuits are connected correctly means adjusting the circuit display of the incomplete connection as shown in FIG. 23 to the fully connected circuit as shown in FIG. .

【0140】シーケンス回路表示処理手段35は、シー
ケンスプログラム調整処理手段34によって調整された
シーケンスプログラムに基づいて図24に示されている
ようにシーケンス回路を表示器36に表示する処理を行
う。図24において、符号aで示されている部分がマク
ロAのシーケンス回路表示部分である。
The sequence circuit display processing means 35 performs processing for displaying the sequence circuit on the display 36 as shown in FIG. 24 based on the sequence program adjusted by the sequence program adjustment processing means 34. In FIG. 24, a portion indicated by a symbol a is a sequence circuit display portion of the macro A.

【0141】つぎに、図25〜図27に示されているフ
ローチャートを参照してこの実施の形態による周辺装置
の動作について説明する。
Next, the operation of the peripheral device according to this embodiment will be described with reference to the flowcharts shown in FIGS.

【0142】図25を参照してマクロ登録対象の回路を
マクロ登録する処理フローについて説明する。
Referring to FIG. 25, a description will be given of a processing flow for macro-registering a circuit to be registered.

【0143】作成者はプログラム中でマクロ登録したい
回路の範囲を指定する(ステップS900)。ここでは
図18にて四角形で囲まれている全範囲をマクロ登録手
段30にマクロ登録する。
The creator specifies a range of a circuit to be registered as a macro in the program (step S900). Here, the entire range enclosed by the rectangle in FIG.

【0144】つぎに、作成者は、マクロ流用時に変更す
る予定のデバイスを指定する。登録するデバイスは仮想
デバイスで表し、作成者はその仮想デバイスにそれぞれ
対応して、登録したいデバイス(登録デバイス)と、流
用時にどんな内容のデバイスであったを判断するための
コメントを指定する。これによって図20に示されてい
るようなデバイス登録テーブルを作成する(ステップS
910)。ここでは、図18に示されているマクロ登録
回路で用いているデバイス、X10、X11、X12、
Y20、Y21をマクロ登録するデバイスとしてそれぞ
れ仮想デバイスに指定する。
Next, the creator specifies a device to be changed when the macro is diverted. The device to be registered is represented by a virtual device, and the creator specifies a device to be registered (registered device) and a comment for determining what kind of device it was when diverted, corresponding to the virtual device. This creates a device registration table as shown in FIG. 20 (step S
910). Here, the devices used in the macro registration circuit shown in FIG. 18, X10, X11, X12,
Y20 and Y21 are designated as virtual devices as devices for macro registration.

【0145】つぎに、作成者が指定した登録デバイスを
マクロ登録手段30によってそれぞれ仮想デバイスに置
き換え、図19に示されているような回路を作成し(ス
テップS920)、これをマクロAとして登録する。
Next, the registered device specified by the creator is replaced with a virtual device by the macro registration means 30, and a circuit as shown in FIG. 19 is created (step S920), and this is registered as a macro A. .

【0146】マクロ流用の処理フローを図26を参照し
て説明する。作成者によって図22のデバイスX0、X
1のつぎにマクロAを流用するよう指定がなされると、
マクロ登録登録してあったマクロAの回路と、デバイス
登録テーブルメモリ31に格納されているデバイス登録
テーブルをマクロ流用処理手段32のメモリ上に読み出
す(ステップS1000)。
A processing flow for diverting a macro will be described with reference to FIG. The devices X0, X in FIG.
If the specification to divert macro A is made after 1
The macro A circuit that has been registered and registered in the macro and the device registration table stored in the device registration table memory 31 are read out to the memory of the macro diversion processing unit 32 (step S1000).

【0147】つぎに、図20に示されているようなデバ
イス登録テーブルを元に図21のデバイス流用テーブル
を表示器36に表示する。作成者はデバイス流用テーブ
ルの変更デバイスを、コメント記述を参考にして仮想デ
バイスにそれぞれ対応して指定する。この指定によりマ
クロ流用処理手段32は、マクロ登録した回路中の仮想
デバイスを、デバイス流用テーブルを元に作成者の指定
したデバイスに置き換える(ステップS1010)。
Next, the device diversion table of FIG. 21 is displayed on the display 36 based on the device registration table as shown in FIG. The creator specifies a change device of the device diversion table corresponding to each virtual device with reference to the comment description. With this designation, the macro diversion processing unit 32 replaces the virtual device in the circuit registered with the macro with the device specified by the creator based on the device diversion table (step S1010).

【0148】ここでは、マクロ登録したときのデバイス
は、図18の“X10、X11、X12、Y20、Y2
1”であり、これを図23、図24の“X20、X2
1、X22、Y30、Y31”に変更することになる。
Here, the devices at the time of macro registration are “X10, X11, X12, Y20, Y2” in FIG.
1 ”, which is represented by“ X20, X2 ”in FIGS.
1, X22, Y30, Y31 ".

【0149】つぎに、デバイスX1に続いてマクロ流用
したマクロ回路をプログラム中に書き込み、シンボル表
示処理手段33によって、図22に示されているよう
に、デバイスX1に続いてマクロ流用した回路を
“[M.A]”をもってシンボル表示する処理を行い、
これを表示器36に画面表示する(ステップS102
0)。
Next, a macro circuit diverted from the macro following the device X1 is written into the program, and the symbol diverted circuit is used by the symbol display processing means 33 as shown in FIG. [MA]] is performed to display a symbol.
This is displayed on the display 36 (step S102).
0).

【0150】回路表示するためには、メモリ上に左上を
(0、0)とした座標で順に接点やコイルのデータを作
成していく。表示器36に表示する前にメモリ上にデー
タとして持っている状態の回路では、コイル命令も接点
に続いて左詰めして作成していくが、これを表示器36
に表示するときにはコイル命令が右端に表示するよう調
整している。マクロ命令はシンボル表示の時にはコイル
命令として扱い、表示器36に表示するときは右端に表
示する。
In order to display a circuit, data of a contact point and a coil are sequentially created on the memory at coordinates with the upper left being (0, 0). In a circuit in which the data is stored in the memory before being displayed on the display 36, the coil command is also created left-justified following the contact, and this is displayed on the display 36.
Is adjusted so that the coil instruction is displayed at the right end. The macro instruction is handled as a coil instruction when displaying a symbol, and is displayed on the right end when displayed on the display 36.

【0151】シーケンス回路表示のときは、メモリ上の
回路データにマクロの回路を作成していく。このとき、
実際に作成していく座標はデバイスX1のつぎにあたる
(2、0)であるが、内部処理としては座標(2、0)
が(0、0)であるものとして回路データを作成してい
く。すると、マクロ部分を作成したときのメモリ上の回
路は、図23に示されているように、回路が繋がってい
ない状態となる。
When displaying a sequence circuit, a macro circuit is created in the circuit data on the memory. At this time,
The coordinates to be actually created are (2, 0) following the device X1, but the coordinates (2, 0) are used as internal processing.
Is (0, 0) and circuit data is created. Then, the circuit on the memory at the time of creating the macro part is in a state where the circuit is not connected as shown in FIG.

【0152】このため、つぎに、マクロAの最左列の接
点が2回路行以上から成っているか否かを判断する(ス
テップS1030)。ここでは、マクロAの最左列の接
点は、X20、X21、X22の3接点により3回路行
からなっているので(ステップS1030肯定)、シー
ケンスプログラム調整処理手段34によってマクロAの
最左列の最上回路行から最下回路行を繋ぐ縦線を引く処
理を行う(ステップS1040)。ここでは、図23に
示されている遷移状態の回路で、X20からX22まで
を縦線で繋ぐ。
Therefore, it is determined whether or not the contact in the leftmost column of the macro A is composed of two or more circuit rows (step S1030). Here, since the contact in the leftmost column of the macro A is formed of three circuit rows by three contacts X20, X21, and X22 (Yes in step S1030), the sequence program adjustment processing means 34 causes A process of drawing a vertical line connecting the uppermost circuit row to the lowermost circuit row is performed (step S1040). Here, in the transition state circuit shown in FIG. 23, X20 to X22 are connected by a vertical line.

【0153】これによりシーケンス回路表示処理手段3
5による画面表示処理によって図24に示されているよ
うな回路が正しく連がったシシーケンス回路が表示器3
6に表示される。
As a result, the sequence circuit display processing means 3
5 is a sequencer circuit in which the circuits as shown in FIG.
6 is displayed.

【0154】(実施の形態4)図27はこの発明による
シーケンスプログラムの周辺装置の他の実施の形態を示
している。尚、図27に於いて、図17に対応する部分
は図17に付した符号と同一の符号を付けてその説明を
省略する。
(Embodiment 4) FIG. 27 shows another embodiment of a sequence program peripheral device according to the present invention. In FIG. 27, portions corresponding to those in FIG. 17 are denoted by the same reference numerals as those in FIG. 17, and description thereof will be omitted.

【0155】この実施の形態では、実施の形態3のもの
に加えてマクロ範囲表示処理手段37が設けられてい
る。マクロ範囲表示処理手段37は、図24に示されて
いるように接点とマクロを接続した回路をシーケンス回
路表示したとき、元のマクロ命令部分を抽出し、接点を
含まない元のマクロ命令部分を区別して表示する処理を
行う。
In this embodiment, a macro range display processing means 37 is provided in addition to that of the third embodiment. The macro range display processing means 37 extracts the original macro instruction portion and displays the original macro instruction portion which does not include the contact when the circuit connecting the contact and the macro is displayed as a sequence circuit as shown in FIG. Perform the process of distinguishing and displaying.

【0156】つぎに、マクロ範囲表示処理手段37によ
るマクロ範囲表示の処理のフローを図28を参照して説
明する。
Next, the flow of the macro range display processing by the macro range display processing means 37 will be described with reference to FIG.

【0157】先ず、マクロAの前の最右列の接点のつぎ
のX座標とそのY座標をマクロ開始座標(SX、SY)
として記憶する(ステップS1100)。座標は左上を
(0、0)として数えることとする。ここでは、図22
のX1が最右列の接点であり、その座標は(1、0)と
なるので、マクロ開始座標は(2、0)となる。
First, the X coordinate next to the rightmost column contact point before the macro A and its Y coordinate are defined as macro start coordinates (SX, SY).
(Step S1100). The coordinates are counted as (0, 0) at the upper left. Here, FIG.
Is the contact point in the rightmost column, and its coordinates are (1, 0), so the macro start coordinates are (2, 0).

【0158】つぎに、マクロAを(0、0)から表示し
たときの右下の座標を(MX、MY)として記憶する
(ステップS1110)。ここでは、図18におけるデ
バイスY21が右下の座標であり、仮に接点やコイルは
横に10個表示しているものとすると、デバイスY21
の座標は(9、2)となる。
Next, the lower right coordinate when the macro A is displayed from (0, 0) is stored as (MX, MY) (step S1110). Here, the device Y21 in FIG. 18 is the lower right coordinates, and it is assumed that ten contacts and coils are horizontally displayed.
Are (9, 2).

【0159】つぎに、マクロ終了座標を計算する(ステ
ップS1120)。マクロ終了座標はつぎの計算式で表
される。すなわち、 マクロ終了座標(EX、EY)=(MX、SY+MY) である。これを図24に当てはめると、 (EX、EY)=(9、0+2)=(9、2) がマクロ終了座標となる。
Next, the macro end coordinates are calculated (step S1120). The macro end coordinates are expressed by the following formula. That is, macro end coordinates (EX, EY) = (MX, SY + MY). Applying this to FIG. 24, (EX, EY) = (9, 0 + 2) = (9, 2) is the macro end coordinate.

【0160】つぎに、マクロ開始座標(SX、SY)を
左上、(EX、EY)を左下とした長方形の範囲をマク
ロの範囲と判断し(ステップS1130)、マクロの範
囲を反転表示させたり、長方形で囲むなどの方法で表示
する(ステップS1140)。
Next, a rectangular range having the macro start coordinates (SX, SY) at the upper left and (EX, EY) at the lower left is determined as the macro range (step S1130), and the macro range is displayed in reverse video. It is displayed by a method such as enclosing it in a rectangle (step S1140).

【0161】以上のような処理によって、シーケンス回
路表示された回路のうちマクロである範囲を区別して示
すことができる。
By the above-described processing, a macro range can be distinguished from a circuit displayed as a sequence circuit.

【0162】(実施の形態5)図29はこの発明による
シーケンスプログラムの周辺装置(プログラミング機
器)の他の実施の形態を示している。図29において、
40はPC用プログラミング機器を、41はPCの電源
ユニットを、42はCPUユニットを、43はPCの各
種ユニットを各々示しており、PC用プログラミング機
器40とCPUユニット42とはケーブル44によって
接続されている。
(Embodiment 5) FIG. 29 shows another embodiment of a peripheral device (programming device) for a sequence program according to the present invention. In FIG. 29,
Reference numeral 40 denotes a PC programming device, 41 denotes a PC power supply unit, 42 denotes a CPU unit, and 43 denotes various PC units. The PC programming device 40 and the CPU unit 42 are connected by a cable 44. ing.

【0163】PC用プログラミング機器40は、プログ
ラミング処理部51と、図30に示されているようなマ
クロ回路の構成(デバイス)を図31に例示されている
ように記憶する内部メモリ52と、表示部53と、マク
ロ回路に登録されたデバイスの中から出力デバイスを取
得する出力デバイス取得部54と、出力デバイス取得手
段54によって取得した出力デバイスの状態をプログラ
マブルコントローラから取得する出力デバイス状態取得
部55と、出力デバイス状態取得部55によって取得し
た出力デバイスの状態からマクロ回路の導通・非導通状
態を表示部53に表示する処理を行うマクロ状態表示処
理部56とを有している。
The PC programming device 40 includes a programming processing unit 51, an internal memory 52 for storing the configuration (device) of the macro circuit as shown in FIG. 30, as shown in FIG. 31, and a display. Unit 53, an output device obtaining unit 54 for obtaining an output device from the devices registered in the macro circuit, and an output device state obtaining unit 55 for obtaining the state of the output device obtained by the output device obtaining unit 54 from the programmable controller. And a macro state display processing unit 56 that performs a process of displaying the conduction / non-conduction state of the macro circuit on the display unit 53 from the state of the output device acquired by the output device state acquisition unit 55.

【0164】図32はPC用プログラミング機器におい
て、シーケンスプログラム回路を表示部53に表示した
画面表示例を示している。図32において、N部分は通
常のシーケンスプログラム回路の表示であり、“M.O
UT”が登録したマクロ回路の表示であり、M部分がマ
クロ回路の詳細表示である。このマクロ回路における出
力デバイスは“Y20”である。
FIG. 32 shows an example of a screen display in which the sequence program circuit is displayed on the display unit 53 in the PC programming device. In FIG. 32, an N portion is a display of a normal sequence program circuit, and is denoted by “MO”.
UT "is a display of the registered macro circuit, and M is a detailed display of the macro circuit. The output device in this macro circuit is" Y20 ".

【0165】この画面表示では、マクロ状態表示処理部
56による表示処理により、出力デバイス状態取得部5
5によって取得した出力デバイスの状態から、マクロ回
路が導通ならば反転表示、非導通状態ならば非反転表示
される。
In this screen display, the output device status acquisition unit 5 is displayed by the display process by the macro status display processing unit 56.
From the state of the output device obtained in step 5, the display is inverted if the macro circuit is conductive, and non-inverted if the macro circuit is non-conductive.

【0166】つぎにPC用プログラミング機器において
PCの稼動状態をモニタする手順を図33を参照して説
明する。
Next, a procedure for monitoring the operating state of the PC in the PC programming device will be described with reference to FIG.

【0167】先ず、図32に示されているように画面表
示しているシーケンスプログラム回路から、デバイスを
取得する(ステップS1200)。
First, a device is acquired from the sequence program circuit displayed on the screen as shown in FIG. 32 (step S1200).

【0168】つぎに、画面表示のシーケンスプログラム
回路から、マクロ回路が含まれているか否かを確認する
(ステップS1210)。画面表示のシーケンスプログ
ラム回路にマクロ回路が含まれていた場合には(ステッ
プS1210肯定)、PC用プログラミング機器40の
出力デバイス取得部54によって内部メモリ52から該
当するマクロ回路の出力デバイスを検索する(ステップ
S1220)。
Next, it is confirmed from the sequence program circuit on the screen display whether or not a macro circuit is included (step S1210). If a macro circuit is included in the sequence program circuit on the screen display (Yes at step S1210), the output device acquisition unit 54 of the PC programming device 40 searches the internal memory 52 for an output device of the corresponding macro circuit (step S1210). Step S1220).

【0169】出力デバイスが検索された場合には(ステ
ップS1230肯定)、検索された出力デバイスを画面
に表示しているデバイスに追加する(ステップS124
0)。
If an output device is found (Yes at step S1230), the found output device is added to the device displayed on the screen (step S124).
0).

【0170】つぎにマクロ回路の詳細表示を指定する場
合には(ステップS1250肯定)、PC用プログラミ
ング機器40の内部メモリ42から該当するマクロ回路
の入力デバイスを検索する(ステップS1260)。入
力デバイスが検索された場合には(ステップS1270
否定)、検索された入力デバイスを画面に表示している
デバイスに追加し(ステップS1280)、該当入力デ
バイス、出力デバイスと回路記号を画面表示する(ステ
ップS1290)。
Next, when the detailed display of the macro circuit is designated (Yes at step S1250), the input device of the corresponding macro circuit is searched from the internal memory 42 of the PC programming device 40 (step S1260). If the input device is found (step S1270)
No), the found input device is added to the device displayed on the screen (step S1280), and the corresponding input device, output device and circuit symbol are displayed on the screen (step S1290).

【0171】つぎに、取得した各デバイスのデバイス値
(デバイス状態情報)をPCのCPUユニット42から
ケーブル44を通じてPC用プログラミング機器40に
読出す(ステップS1300)。このようにして読出し
たデバイス値から該当するデバイスが導通か非導通かを
判断し(ステップS1310)、導通ならば、デバイス
X1、Y11のように反転表示し(ステップS132
0)、非導通ならば、デバイスX0、Y10のように反
転表示しない(ステップS1330)。その後、全デバ
イスが終了したか否か判断し(ステップS1340)、
終了していないと判断した場合には(ステップS134
0否定)、ステップS1310に戻って処理を続行し、
反対に、終了したと判断した場合には(テップS134
0肯定)、一連の処理を終了する。
Next, the obtained device value (device status information) of each device is read from the CPU unit 42 of the PC to the PC programming device 40 via the cable 44 (step S1300). It is determined whether the corresponding device is conductive or non-conductive based on the device value read in this way (step S1310). If the device is conductive, it is displayed in reverse video as devices X1 and Y11 (step S132).
0), if it is non-conducting, the display is not inverted as in the devices X0 and Y10 (step S1330). Thereafter, it is determined whether or not all devices have been completed (step S1340),
If it is determined that the processing has not been completed (step S134)
0 negative), returning to step S1310 to continue the processing,
On the other hand, if it is determined that the processing has been completed (Step S134
(0 affirmation), the series of processing ends.

【0172】マクロ回路の場合には、出力デバイス取得
部54によって取得した出力デバイスの状態を出力デバ
イス状態取得部55によって取得し、マクロ回路に登録
されている出力デバイスのデバイス値が導通ならば、マ
クロ回路を反転表示し、非導通ならば反転表示しない。
マクロ回路の詳細表示を指定している場合、導通なら
ば、デバイスX4、Y20のように反転表示し、非導通
ならば、デバイスX3のように反転表示しない。
In the case of a macro circuit, the output device status obtained by the output device obtaining unit 54 is obtained by the output device status obtaining unit 55. If the device value of the output device registered in the macro circuit is conductive, The macro circuit is displayed inverted, and if it is not conductive, it is not displayed inverted.
When the detailed display of the macro circuit is designated, if it is conductive, it is inverted and displayed like devices X4 and Y20, and if it is not conductive, it is not inverted and displayed like device X3.

【0173】以上のように登録したマクロ回路の出力デ
バイスをモニタするデバイスとして指定し、デバイス状
態をPCから読出すことで、マクロ回路の導通、非導通
をモニタ中に表示することができる。
By specifying the output device of the macro circuit registered as described above as a device to be monitored and reading the device state from the PC, the conduction and non-conduction of the macro circuit can be displayed during monitoring.

【0174】(実施の形態6)図34はこの発明による
シーケンスプログラムの周辺装置(プログラミング機
器)の他の実施の形態を示している。このプログラミン
グ装置は、処理部60と、メモリ61と、キーボード6
2のキー入力制御部63と、表示器64の画面表示制御
部65と、補助記憶装置66の補助記憶装置制御部67
とを有している。
(Embodiment 6) FIG. 34 shows another embodiment of a peripheral device (programming device) for a sequence program according to the present invention. The programming device includes a processing unit 60, a memory 61, a keyboard 6
2 key input control unit 63, screen display control unit 65 of display 64, auxiliary storage device control unit 67 of auxiliary storage device 66
And

【0175】処理部60は、ラダー回路のプログラミン
グ処理部71と、ラダー回路のプログラミングにおい
て、複数の接点からなる回路(図36で斜線により示す
領域の回路)をマクロ命令(以下、接点マクロ命令と云
う)として登録する接点マクロ命令登録部72と、複数
の接点と複数のコイルあるいは複数のコイルからなる回
路(図37で斜線により示す領域の回路)をマクロ命令
(以下、コイルマクロ命令と云う)として登録するコイ
ルマクロ命令登録部73と、これら登録した接点マクロ
命令を接点部に、コイルマクロ命令をコイル部に組み合
わせて流用するマクロ流用部74とを含んでいる。
The processing section 60 includes a programming processing section 71 for the ladder circuit and a macro instruction (hereinafter referred to as a contact macro instruction) for programming a circuit composed of a plurality of contacts (circuits indicated by hatching in FIG. 36) in programming the ladder circuit. And a contact macro instruction registering section 72 for registering the contact macro instruction as a macro instruction (hereinafter referred to as a coil macro instruction). And a macro diversion unit 74 that diverts the registered contact macro instruction to the contact part and diverts the coil macro instruction to the coil part in combination.

【0176】図35はラダー回路の一例であり、このラ
ダー回路では、接点デバイスX0、X1が、図36で斜
線により示すように、接点マクロ命令として登録するプ
ログラム範囲であり、コイルデバイスY0、Y1が図3
7で斜線により示すように、コイルマクロ命令として登
録するプログラム範囲である。これらのマクロ命令は、
図38に示されているように、マクロ命令名、例えば接
点マクロ命令の場合には、“M.LD”を設定される。
FIG. 35 shows an example of a ladder circuit. In this ladder circuit, the contact devices X0 and X1 are program ranges to be registered as contact macro instructions, as indicated by hatching in FIG. 36, and the coil devices Y0 and Y1 Figure 3
As indicated by hatching in FIG. 7, this is a program range to be registered as a coil macro instruction. These macro instructions are
As shown in FIG. 38, in the case of a macro instruction name, for example, a contact macro instruction, “M.LD” is set.

【0177】図39は接点マクロ命令M.LDとコイル
マクロ命令M.OUTとを使用して回路を作成した例を
示しており、接点マクロ命令M.LDの登録内容は図4
2(c)に、コイルマクロ命令M.OUTの登録内容は
図44(d)に各々示されている。
FIG. 39 shows a contact macro instruction M. LD and coil macro instruction 4 shows an example in which a circuit is created by using a contact macro instruction M.OUT. Figure 4 shows the registered contents of LD.
2 (c), the coil macro instruction M. The registered contents of OUT are shown in FIG.

【0178】図40は、接点マクロ命令登録部72、コ
イルマクロ命令登録部73によってラダー回路より接点
マクロ命令、コイルマクロ命令を登録する処理フローを
示している。接点マクロ命令、コイルマクロ命令を登録
する場合には、まず、ラダー回路のプログラミング装置
により、図35に示されているようなラダー回路(プロ
グラム)を作成し、これを表示器64に表示する(ステ
ップS1400)。
FIG. 40 shows a processing flow in which the contact macro command registration unit 72 and the coil macro command registration unit 73 register the contact macro command and the coil macro command from the ladder circuit. When registering a contact macro instruction and a coil macro instruction, first, a ladder circuit (program) as shown in FIG. 35 is created by a ladder circuit programming device and is displayed on the display 64 ( Step S1400).

【0179】つぎに、図36に示されているように、接
点マクロとして登録する回路データ部分、あるいは図3
7に示されているように、コイルマクロとして登録する
回路データ部分を指定する(ステップS1410)。つ
ぎに、接点マクロあるいはコイルマクロとして指定した
回路を接点部とコイル部からなる完全な回路ブロックに
変換する(ステップS1420)。
Next, as shown in FIG. 36, the circuit data portion to be registered as a contact macro or FIG.
As shown in FIG. 7, a circuit data portion to be registered as a coil macro is specified (step S1410). Next, the circuit designated as a contact macro or a coil macro is converted into a complete circuit block including a contact portion and a coil portion (step S1420).

【0180】つぎに、図37に示されているような画面
表示で、登録する接点マクロ命令あるいはコイルマクロ
の名前をキーボード62より入力設定する(ステップS
1430)。図37は接点マクロ命令の名前に“M.L
D”を設定した時の例である。
Next, in the screen display as shown in FIG. 37, the contact macro command or the name of the coil macro to be registered is input and set from the keyboard 62 (step S).
1430). FIG. 37 shows that the name of the contact macro instruction is “ML”.
This is an example when D "is set.

【0181】つぎに、接点マクロ命令あるいはコイルマ
クロ命令として、登録する回路データを完全な回路ブロ
ックに変換した回路データと、入力設定した接点マクロ
命令名あるいはコイルマクロ命令名とを補助記憶装置6
6に記録する(ステップS1440)。記録方法は、従
来の回路ブロックを対象としたマクロ命令の記録方法と
同様なので、これの説明は省略する。
Next, as the contact macro command or the coil macro command, the circuit data obtained by converting the registered circuit data into a complete circuit block, and the input contact macro command name or the coil macro command name are stored in the auxiliary storage device 6.
6 (step S1440). The recording method is the same as the conventional method of recording a macro instruction for a circuit block, and thus the description thereof is omitted.

【0182】接点マクロ命令として、図36に示されて
いるように、指定した回路を接点部とコイル部からなる
完全な回路ブロックに変換する処理手順を図41、図4
2(a)〜(c)を参照して説明する。
As shown in FIG. 36, the processing procedure for converting a designated circuit into a complete circuit block consisting of a contact portion and a coil portion as a contact macro instruction is shown in FIGS.
This will be described with reference to FIGS.

【0183】先ず、登録部の右端の最上行から登録部右
端まで伸びている横棒の最下行まで縦棒を引く(ステッ
プS1500)。図42(a)に示す登録部の回路デー
タでは、最初から右端に縦棒があるので変化はない。
First, a vertical bar is drawn from the uppermost line on the right end of the registration unit to the lowermost line of the horizontal bar extending from the right end of the registration unit (step S1500). In the circuit data of the registration unit shown in FIG. 42A, there is no change because there is a vertical bar from the beginning to the right end.

【0184】つぎに、登録部の右端を上から下へ調査
し、右棒を削除する(ステップS1510)。この処理
により図42(a)に示す登録部の回路データが図42
(b)に示す回路データのように右端の右棒が削除され
る。
Next, the right end of the registration section is examined from top to bottom, and the right bar is deleted (step S1510). By this processing, the circuit data of the registration unit shown in FIG.
The right bar at the right end is deleted as in the circuit data shown in FIG.

【0185】つぎに、ダミーコイルDMを付加し、完全
な回路ブロックを作成する(ステップS1520)。こ
の処理により図42(b)に示す回路データが、図42
(c)に示す回路データのように、接点部とコイル部を
持つ完全な回路ブロックデータとなる。コイルマクロ命
令として、図37に示されているように、指定した回路
を接点部とコイル部からなる完全な回路ブロックに変換
する処理手順を図43、図44(a)〜(d)を参照し
て説明する。
Next, a complete circuit block is created by adding a dummy coil DM (step S1520). By this processing, the circuit data shown in FIG.
Complete circuit block data having a contact portion and a coil portion like the circuit data shown in FIG. As shown in FIG. 37, as a coil macro instruction, a processing procedure for converting a specified circuit into a complete circuit block including a contact portion and a coil portion is shown in FIGS. 43 and 44 (a) to (d). I will explain.

【0186】まず、登録部の左端の最上行から登録部の
左端まで伸びている横棒の最下行まで縦棒を引く(ステ
ップS1600)。この処理により図44(a)に示す
登録部の回路データは図44(b)に示す回路データに
変換される。
First, a vertical bar is drawn from the uppermost line at the left end of the registration unit to the lowermost line of a horizontal bar extending from the left end of the registration unit (step S1600). By this processing, the circuit data of the registration unit shown in FIG. 44A is converted into the circuit data shown in FIG.

【0187】つぎに、登録部の左端から上から下へ調査
し、左棒を削除する(ステップS1610)。この処理
によって図44(b)に示す回路データが図44(c)
に示す回路データに変換される。
Next, the registration section is checked from the left end to the top, and the left bar is deleted (step S1610). By this processing, the circuit data shown in FIG.
Is converted into the circuit data shown in FIG.

【0188】つぎに、ダミー接点DMを付加し、1回路
ブロックを完成する(ステップS1620)。この処理
によって図44(c)に示す回路データが、図44
(d)に示す回路データのように、接点部とコイル部を
持つ完全な完全な回路ブロックデータとなる。マクロ流
用部74によって接点マクロ命令、コイルマクロ命令を
使用してラダー回路のプログラムを作成する処理手順を
図45を参照して説明する。
Next, a dummy contact DM is added to complete one circuit block (step S1620). By this processing, the circuit data shown in FIG.
Like the circuit data shown in (d), it is complete and complete circuit block data having a contact portion and a coil portion. A processing procedure for creating a ladder circuit program using the contact macro instruction and the coil macro instruction by the macro diversion unit 74 will be described with reference to FIG.

【0189】先ず、まず、図39に示されているような
接点マクロ命令M.LDとコイルマクロ命令M.OUT
を使用した回路データを作成する(ステップS170
0)。回路データの作成方法は、通常の命令を使用して
ラダー回路のプログラムを作成する方法と同様なので省
略する。つぎに、接点マクロ命令、コイルマクロ命令の
展開を行う(ステップS1710)。
First, the contact macro instruction M.1 shown in FIG. LD and coil macro instruction OUT
(Step S170)
0). The method of creating the circuit data is the same as the method of creating a ladder circuit program using ordinary instructions, and a description thereof will be omitted. Next, a contact macro command and a coil macro command are developed (step S1710).

【0190】展開処理は、図46に示すフローチャート
に従って行う。接点マクロ命令M.LDの登録回路デー
タが図42(c)、コイルマクロ命令M.OUTの回路
登録データが図44(d)に示されているような場合の
例で説明すると、まず、接点マクロ命令M.LDの回路
データを補助記憶装置66からメモリ61に読込む(ス
テップS1800)。
The development process is performed according to the flowchart shown in FIG. Contact macro instruction M. The registered circuit data of the LD is shown in FIG. In the case where the circuit registration data of OUT is as shown in FIG. The circuit data of the LD is read from the auxiliary storage device 66 into the memory 61 (step S1800).

【0191】つぎに、メモリ61に読込んだ接点マクロ
命令M.LDからダミーコイルDMを削除する(ステッ
プS1810)。この処理によって回路データは、図4
2(b)のようになる。
Next, the contact macro instruction M. The dummy coil DM is deleted from the LD (step S1810). By this processing, the circuit data becomes
2 (b).

【0192】つぎに、コイルマクロ命令M.OUTの回
路データを補助記憶装置66からメモリ61に読込む
(ステップS1820)。つぎに、メモリ61に読込ん
だコイルマクロ命令M.OUTの回路データからダミー
接点MDを削除する(ステップS1830)。この処理
によって回路データは、図44(c)のようになる。
Next, the coil macro instruction M. The circuit data of OUT is read from the auxiliary storage device 66 into the memory 61 (step S1820). Next, the coil macro instruction M. The dummy contact MD is deleted from the circuit data of OUT (step S1830). With this processing, the circuit data becomes as shown in FIG.

【0193】つぎに、ダミー接点MDを削除した図44
(c)に示すコイルマクロ命令の回路データを、ダミー
コイルMDを削除した図42(b)に示す接点マクロ命
令の回路データに挿入する(ステップS1840)。こ
の処理によって図47(a)に示すような回路データが
得られる。つぎに、接点マクロ命令の回路データと、挿
入したコイルマクロ命令の間を横棒で繋ぎ、展開後の回
路データを作成し、これを表示器に表示する(ステップ
S1850)。この処理により、図47(b)に示す回
路データが作成される。
Next, FIG. 44 with the dummy contact MD removed.
The circuit data of the coil macro instruction shown in (c) is inserted into the circuit data of the contact macro instruction shown in FIG. 42B from which the dummy coil MD has been deleted (step S1840). With this processing, circuit data as shown in FIG. 47A is obtained. Next, the circuit data of the contact macro instruction and the inserted coil macro instruction are connected by a horizontal bar to create expanded circuit data, which is displayed on a display (step S1850). With this processing, the circuit data shown in FIG. 47B is created.

【0194】これにより、接点マクロ命令とコイルマク
ロ命令を登録してそれぞれ選択し、組み合わせて流用で
きるので、組み合わせにより流用できる回路データの構
造が増える効果がある。
As a result, the contact macro instruction and the coil macro instruction can be registered and selected, and can be used in combination, thereby increasing the structure of circuit data that can be used in combination.

【0195】(実施の形態7)図48はこの発明による
シーケンスプログラムの周辺装置(プログラミング機
器)の他の実施の形態を示している。尚、図48に於い
て、図34に対応する部分は図34に付した符号と同一
の符号を付けてその説明を省略する。
(Embodiment 7) FIG. 48 shows another embodiment of a peripheral device (programming device) for a sequence program according to the present invention. In FIG. 48, portions corresponding to those in FIG. 34 are denoted by the same reference numerals as those in FIG. 34, and description thereof is omitted.

【0196】この実施の形態では、処理部60は、ラダ
ー回路のプログラミング処理部71と、ラダー回路のプ
ログラミングにおいて、1回路ブロックをブロックマク
ロ命令として登録するブロックマクロ登録部75と、ブ
ロックマクロ登録部75で登録したブロックマクロ命令
を接点部とコイル部に組み合わせて流用し、接点部に記
述したマクロ命令のコイルに使用されているデバイス
を、コイル部に記述したマクロ命令の前に接点として付
加して流用するマクロ流用部76を含んでいる。
In this embodiment, the processing section 60 includes a ladder circuit programming processing section 71, a block macro registration section 75 for registering one circuit block as a block macro instruction in programming of the ladder circuit, and a block macro registration section. The block macro instruction registered in step 75 is combined with the contact part and the coil part and diverted, and the device used for the coil of the macro instruction described in the contact part is added as a contact before the macro instruction described in the coil part. And a macro diversion unit 76 to be diverted.

【0197】ブロックマクロ登録部75がブロックマク
ロ命令として登録する回路データには、図49や図50
に示されているようなものがある。ここでは、図49に
示されている回路データによるブロックマクロ命令の名
前を“M.M1”として登録し、図50に示されている
回路データによるブロックマクロ命令の名前を“M.
M”として登録することにする。これらブロックマクロ
命令の登録方法は、従来の方法と同様である省略する。
The circuit data registered by the block macro registration unit 75 as a block macro instruction includes the data shown in FIGS.
There is something like that shown in Here, the name of the block macro instruction based on the circuit data shown in FIG. 49 is registered as “MM1”, and the name of the block macro instruction based on the circuit data shown in FIG.
M ". The method of registering these block macro instructions is the same as in the conventional method, and a description thereof will be omitted.

【0198】図51は、ブロックマクロ命令を接点部と
コイル部に組み合わせて使用して作成した回路データの
例である。つぎに、ブロックマクロ命令を使用した回路
データの作成とマクロ展開の処理手順を図52を参照し
て説明する。
FIG. 51 shows an example of circuit data created by using a block macro instruction in combination with a contact portion and a coil portion. Next, a procedure for creating circuit data using a block macro instruction and expanding a macro will be described with reference to FIG.

【0199】先ず、図51に示されているように、ブロ
ックマクロ命令を使用した回路データを作成する(ステ
ップS1910)。この回路データの作成方法は、通常
の命令を使用してラダー回路のプログラムを作成する方
法と同様なので省略する。
First, as shown in FIG. 51, circuit data using a block macro instruction is created (step S1910). The method of creating the circuit data is the same as the method of creating a ladder circuit program using ordinary instructions, and a description thereof will be omitted.

【0200】つぎに、前ステップで作成した回路データ
の接点部のブロックマクロ命令M.M1の回路データを
補助記憶装置66よりメモリ61に読出し、接点部のブ
ロックマクロ命令の展開を行う(ステップS192
0)。
Next, the block macro instruction M.1 of the contact portion of the circuit data created in the previous step is executed. The circuit data of M1 is read from the auxiliary storage device 66 to the memory 61, and the block macro instruction of the contact portion is expanded (step S192).
0).

【0201】つぎに、メモリ61に読出したブロックマ
クロ命令M.M1の回路データからコイル命令に使用さ
れているデバイスを検索し、デバイスY0、Y10をメ
モリ61に書込み、図53に示されているような使用デ
バイスデータリストを作成する(ステップS193
0)。またメモリ61に読込まれた回路データをディス
プレイ64に表示する。
Next, the block macro instruction M. The device used for the coil instruction is searched from the circuit data of M1, the devices Y0 and Y10 are written in the memory 61, and a used device data list as shown in FIG. 53 is created (step S193).
0). The circuit data read into the memory 61 is displayed on the display 64.

【0202】つぎに、作成された使用デバイスデータリ
ストのデバイスを起動条件の接点としてコイル部に記述
したマクロ命令を起動する回路データ(図54(a)参
照)をメモリ61上に作成する(ステップS194
0)。
Next, circuit data (see FIG. 54 (a)) for activating a macro instruction described in the coil portion using the device of the created device data list as a contact point of the activation condition is created in the memory 61 (step S1). S194
0).

【0203】つぎに、図54(a)に示す起動条件付き
のマクロ命令を実施の形態3で説明した方法と同様の方
法により展開する(ステップS1950)。これによ
り、図54(b)に示されているように、接点部に記述
したマクロ命令のコイルに使用されているデバイスを、
コイル部に記述したマクロ命令の前に接点として付加し
て展開したラダー回路のプログラムが作成される。
Next, the macro instruction with the activation condition shown in FIG. 54A is developed by the same method as that described in the third embodiment (step S1950). As a result, as shown in FIG. 54 (b), the device used for the macro instruction coil described in the contact portion is
A ladder circuit program developed by adding a contact as a contact before the macro instruction described in the coil section is created.

【0204】これにより、登録したマクロ命令を接点部
とコイル部に組み合わせて流用し、接点部に記述したマ
クロ命令のコイルに使用されているデバイスを、コイル
部に記述したマクロ命令の前に接点として付加して流用
しプログラムを作成するために、接点部のマクロ命令と
コイル部のマクロ命令の関係を別途記述する必要がなく
なる効果がある。
[0204] Thus, the registered macro instruction is combined with the contact part and the coil part, and is diverted. The device used for the coil of the macro instruction described in the contact part is contacted before the macro instruction described in the coil part. In order to create a program to be diverted and added, it is not necessary to separately describe the relationship between the macro instruction of the contact portion and the macro instruction of the coil portion.

【0205】[0205]

【発明の効果】以上の説明から理解される如く、この発
明によるプログラマブルコントローラの周辺装置によれ
ば、展開されたシーケンスプログラムの一部を追加等の
変更を行った後にマクロプログラム展開を行っても、変
更箇所は展開の対象とならないため、マクロプログラム
を新に作成する必要がなくなり、メンテナンス性も向上
する効果がある。
As can be understood from the above description, according to the peripheral device of the programmable controller according to the present invention, even if a macro program is developed after a change such as adding a part of the developed sequence program is performed. Since the changed portion is not subject to expansion, there is no need to create a new macro program, and this has the effect of improving maintainability.

【0206】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、リストで表現されたシーケン
スプログラムにおいて、予め登録された命令を使用して
プログラムを作成することができる効果がある。
According to the peripheral device of the programmable controller according to the next invention, there is an effect that a program can be created using instructions registered in advance in a sequence program represented by a list.

【0207】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、登録された命令を使用したプ
ログラムと命令を展開したプログラムとを表示切り替え
が簡単に行える効果がある。
According to the peripheral device of the programmable controller according to the next invention, there is an effect that the display can be easily switched between the program using the registered instruction and the program in which the instruction is expanded.

【0208】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、マクロを実行するための条件
とシンボル表現のマクロを接続した回路を作成すると、
シーケンス回路表示したときに回路が正しく繋がるよう
シーケンスプログラムを調整するから、マクロの前に条
件を付加したプログラミングの作業が軽減される効果が
ある。
According to the peripheral device of the programmable controller according to the next invention, when a circuit connecting the macro execution condition and the symbol expression macro is created,
Since the sequence program is adjusted so that the circuits are correctly connected when the sequence circuit is displayed, there is an effect that the work of programming with a condition added before the macro is reduced.

【0209】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、接点とマクロを接続した回路
をシーケンス回路表示したとき、接点を含まない元のマ
クロ命令部分を区別して表示するから、作成者がマクロ
とマクロ以外の部分が明確に区別でき、流用時のプログ
ラミングミスを減らすことができる効果がある。さら
に、シンボル表示した状態では、マクロ登録した機能と
それを実行する条件との関係が分かり易くなる効果があ
る。
According to the peripheral device of the programmable controller according to the next invention, when a circuit connecting a contact and a macro is displayed in a sequence circuit, the original macro instruction portion not including the contact is displayed in a distinguished manner. And the part other than the macro can be clearly distinguished, which has the effect of reducing programming mistakes at the time of diversion. Further, in the state where the symbol is displayed, there is an effect that the relationship between the function registered as a macro and the condition for executing the function is easily understood.

【0210】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、登録したマクロ回路の出力デ
バイスをモニタするデバイスとして指定し、そのデバイ
ス状態をPCから読み出し、マクロ回路の導通、非導通
表示をモニタ中に表示するから、マクロ回路の状態が分
かり易くなる効果がある。
According to the peripheral device of the programmable controller according to the next invention, the registered output device of the macro circuit is designated as a device to be monitored, the device state is read from the PC, and the display of conduction or non-conduction of the macro circuit is being monitored. Is displayed, there is an effect that the state of the macro circuit can be easily understood.

【0211】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、接点マクロ命令とコイルマク
ロ命令を登録してそれぞれ選択し、組み合わせて流用で
きるので、組み合わせにより流用できる回路データの構
造が増える効果がある。
According to the peripheral device of the programmable controller according to the next invention, the contact macro command and the coil macro command are registered, respectively selected, and can be used in combination, so that there is an effect that the structure of the circuit data which can be used in combination is increased. .

【0212】つぎの発明によるプログラマブルコントロ
ーラの周辺装置によれば、登録したブッロクマクロ命令
を接点部とコイル部に組み合わせて流用し、接点部に記
述したブロックマクロ命令のコイルに使用されているデ
バイスを、コイル部に記述したブロックマクロ命令の前
に接点として付加して流用しプログラムを作成するため
に、接点部ブロックのマクロ命令とコイル部のブロック
マクロ命令の関係を別途記述する必要がなくなる効果が
ある。
According to the peripheral device of the programmable controller according to the next invention, the registered block macro instruction is used in combination with the contact portion and the coil portion, and the device used for the coil of the block macro instruction described in the contact portion is used. In order to create a program by adding it as a contact point before the block macro instruction described in the coil part, and divert the program, there is no need to separately describe the relationship between the macro instruction of the contact part block and the block macro instruction of the coil part. is there.

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

【図1】 この発明によるプログラマブルコントローラ
の周辺装置の実施の形態1を示すブロック線図である。
FIG. 1 is a block diagram showing a first embodiment of a peripheral device of a programmable controller according to the present invention;

【図2】 (a)〜(f)はユーザが修正した時のシー
ケンスプログラムの状態とマクロプログラム展開時の状
態を示すラダー回路図である。
FIGS. 2A to 2F are ladder circuit diagrams showing a state of a sequence program when a user corrects the state and a state when a macro program is developed.

【図3】 シーケンスプログラム変更時の処理を示すフ
ローチャートである。
FIG. 3 is a flowchart showing a process when a sequence program is changed.

【図4】 マクロプログラム展開処理の前半部を示すフ
ローチャートである。
FIG. 4 is a flowchart showing a first half of a macro program expansion process.

【図5】 マクロプログラム展開処理の後半部を示すフ
ローチャートである。
FIG. 5 is a flowchart showing a latter half of macro program expansion processing.

【図6】 この発明によるプログラマブルコントローラ
の周辺装置の実施の形態2を示すブロック線図である。
FIG. 6 is a block diagram showing a second embodiment of the peripheral device of the programmable controller according to the present invention;

【図7】 この発明によるプログラマブルコントローラ
の周辺装置の実施の形態2を示す斜視図である。
FIG. 7 is a perspective view showing a second embodiment of the peripheral device of the programmable controller according to the present invention.

【図8】 プログラマブルコントローラの周辺装置にお
ける画面表示を示す説明図である。
FIG. 8 is an explanatory diagram showing a screen display on a peripheral device of the programmable controller.

【図9】 命令として登録するシーケンスプログラムの
一例を示すリスト図である。
FIG. 9 is a list diagram showing an example of a sequence program registered as an instruction.

【図10】 命令として登録するシーケンスプログラム
の一例を示すリスト図である。
FIG. 10 is a list diagram showing an example of a sequence program registered as an instruction.

【図11】 登録された命令を使用したシーケンスプロ
グラムの一例を示すリスト図である。
FIG. 11 is a list diagram showing an example of a sequence program using registered instructions.

【図12】 登録された命令を使用したシーケンスプロ
グラムの一例を示すリスト図である。
FIG. 12 is a list diagram showing an example of a sequence program using registered instructions.

【図13】 使用デバイステーブルの構成を示す説明図
である。
FIG. 13 is an explanatory diagram showing a configuration of a used device table.

【図14】 命令登録処理のフローチャートである。FIG. 14 is a flowchart of an instruction registration process.

【図15】 登録された命令の展開処理のフローチャー
トである。
FIG. 15 is a flowchart of a process of expanding a registered instruction.

【図16】 登録された命令への変換処理のフローチャ
ートである。
FIG. 16 is a flowchart of a conversion process to a registered instruction.

【図17】 この発明によるプログラマブルコントロー
ラの周辺装置の実施の形態3を示すブロック線図であ
る。
FIG. 17 is a block diagram showing Embodiment 3 of a peripheral device of a programmable controller according to the present invention.

【図18】 マクロ登録する回路の一例を示すラダー回
路図である。
FIG. 18 is a ladder circuit diagram illustrating an example of a circuit for macro registration.

【図19】 マクロ登録した回路中のデバイスを仮想デ
バイスに置き換えてマクロAとして登録しておくときの
回路の状態を示すラダー回路図である。である。
FIG. 19 is a ladder circuit diagram illustrating a state of a circuit when a device in a circuit registered as a macro is replaced with a virtual device and registered as a macro A; It is.

【図20】 マクロ登録時に作成するデバイス登録テー
ブルを示す説明図である。
FIG. 20 is an explanatory diagram showing a device registration table created at the time of macro registration.

【図21】 マクロ流用時に作成するデバイ流用テーブ
ルを示す説明図である。
FIG. 21 is an explanatory diagram showing a Debye diversion table created at the time of macro diversion.

【図22】 マクロを実行する条件として接点を付加し
た回路をシンボル表示したラダー回路図である。
FIG. 22 is a ladder circuit diagram in which a circuit to which a contact is added as a condition for executing a macro is symbolically displayed.

【図23】 表示状態を変える処理上で周辺装置のメモ
リ上に展開する遷移状態のシーケンス回路図である。
FIG. 23 is a sequence circuit diagram of a transition state developed on a memory of a peripheral device in a process of changing a display state.

【図24】 マクロのシンボル表示部分をシーケンス回
路表示したシーケンス回図である。
FIG. 24 is a sequence diagram showing a macro symbol display portion as a sequence circuit.

【図25】 回路をマクロ登録する処理のフローチャー
トである。
FIG. 25 is a flowchart of a process of macro-registering a circuit.

【図26】 シーケンスプログラムの調整処理のフロー
チャートである。
FIG. 26 is a flowchart of a sequence program adjustment process.

【図27】 この発明によるプログラマブルコントロー
ラの周辺装置の実施の形態4を示すブロック線図であ
る。
FIG. 27 is a block diagram showing Embodiment 4 of a peripheral device of a programmable controller according to the present invention.

【図28】 シーケンス回路表示において接点を含まな
い元のマクロの部分を判断する処理のフローチャートで
ある。
FIG. 28 is a flowchart of a process of determining an original macro portion that does not include a contact point in a sequence circuit display.

【図29】 この発明によるプログラマブルコントロー
ラの周辺装置の実施の形態5を示すブロック線図であ
る。
FIG. 29 is a block diagram showing Embodiment 5 of a peripheral device of a programmable controller according to the present invention.

【図30】 マクロ回路を展開したシーケンスプログラ
ムの一例を示すラダー回路図である。
FIG. 30 is a ladder circuit diagram showing an example of a sequence program in which a macro circuit is developed.

【図31】 PC用プログラミング機器の内部メモリに
登録されたマクロ回路の一例を示す説明図である。
FIG. 31 is an explanatory diagram showing an example of a macro circuit registered in an internal memory of a PC programming device.

【図32】 PC用プログラミング機器においてシーケ
ンスプログラム回路を表示した画面表示例を示す説明図
である。
FIG. 32 is an explanatory diagram showing a screen display example in which a sequence program circuit is displayed on a PC programming device.

【図33】 PC用プログラミング機器においてPCの
稼動状態をモニタする処理のフローチャートである。
FIG. 33 is a flowchart of a process of monitoring the operating state of the PC in the PC programming device.

【図34】 この発明によるプログラマブルコントロー
ラの周辺装置の実施の形態6を示すブロック線図であ
る。
FIG. 34 is a block diagram showing a sixth embodiment of the peripheral device of the programmable controller according to the present invention.

【図35】 ラダー回路の一例を示すラダー回路図であ
る。
FIG. 35 is a ladder circuit diagram illustrating an example of a ladder circuit.

【図36】 接点マクロ命令として登録するプログラム
範囲指定例を示すラダー回路図である。
FIG. 36 is a ladder circuit diagram showing an example of specifying a program range to be registered as a contact macro instruction.

【図37】 コイルマクロ命令として登録するプログラ
ム範囲指定例を示すラダー回路図である。
FIG. 37 is a ladder circuit diagram showing an example of specifying a program range registered as a coil macro instruction.

【図38】 登録するマクロ命令の名前を設定する画面
表示例を示す説明図である。
FIG. 38 is an explanatory diagram showing a screen display example for setting the name of a macro instruction to be registered.

【図39】 接点マクロ命令とコイルマクロ命令を使用
して作成した回路例を示す回路図である。
FIG. 39 is a circuit diagram showing a circuit example created using a contact macro instruction and a coil macro instruction.

【図40】 接点、コイルマクロ命令を登録する処理の
フローチャートである。
FIG. 40 is a flowchart of a process for registering a contact and coil macro instruction.

【図41】 接点マクロ命令として登録する回路データ
を作成する処理のフローチャートである。
FIG. 41 is a flowchart of a process of creating circuit data to be registered as a contact macro instruction.

【図42】 (a)〜(c)は接点マクロ命令として登
録する回路データを作成中の回路例を示す回路図であ
る。
FIGS. 42A to 42C are circuit diagrams illustrating circuit examples during creation of circuit data to be registered as contact macro instructions.

【図43】 コイルマクロ命令として登録する回路デー
タを作成する処理のフローチャートである。
FIG. 43 is a flowchart of a process of creating circuit data to be registered as a coil macro instruction.

【図44】 (a)〜(d)はコイルマクロ命令として
登録する回路データを作成中の回路例を示す回路図であ
る。
FIGS. 44 (a) to (d) are circuit diagrams showing circuit examples during creation of circuit data to be registered as coil macro instructions.

【図45】 接点マクロ命令とコイルマクロ命令を使用
してラダー回路のプログラムを作成する処理のフローチ
ャートである。
FIG. 45 is a flowchart of a process of creating a ladder circuit program using a contact macro instruction and a coil macro instruction.

【図46】 接点マクロ命令とコイルマクロ命令を使用
してラダー回路のプログラムを展開する処理のフローチ
ャートである。
FIG. 46 is a flowchart of a process of developing a ladder circuit program using a contact macro instruction and a coil macro instruction.

【図47】 (a)、(b)は回路をマクロ展開してい
る途中の回路の例と作成される回路の例を示す回路図で
ある。
FIGS. 47A and 47B are circuit diagrams showing an example of a circuit in the process of macro-expanding a circuit and an example of a circuit to be created.

【図48】 この発明によるプログラマブルコントロー
ラの周辺装置の実施の形態7を示すブロック線図であ
る。
FIG. 48 is a block diagram showing a seventh embodiment of the peripheral device of the programmable controller according to the present invention.

【図49】 ブロックマクロ命令として登録する回路例
を示す回路図であるである。
FIG. 49 is a circuit diagram showing an example of a circuit registered as a block macro instruction.

【図50】 ブロックマクロ命令として登録する回路例
を示す回路図であるる。
FIG. 50 is a circuit diagram showing an example of a circuit registered as a block macro instruction.

【図51】 ブロツクマクロ命令を接点部およびコイル
部に使用して作成した回路例を示す回路図である。
FIG. 51 is a circuit diagram showing an example of a circuit created by using a block macro instruction for a contact portion and a coil portion.

【図52】 ブロックマクロ命令を使用した回路データ
の作成とマクロ展開する処理のフローチャートである。
FIG. 52 is a flowchart of a process of creating circuit data using a block macro instruction and performing macro expansion.

【図53】 接点部に記述したマクロ命令の回路データ
で使用されているコイル命令のデバイスを記憶した使用
コイルデータ例を示す説明図である。
FIG. 53 is an explanatory diagram showing an example of used coil data in which a device of a coil command used in circuit data of a macro command described in a contact portion is stored;

【図54】 (a)、(b)は回路データをマクロ展開
して作成される回路例を示す回路図である。
FIGS. 54A and 54B are circuit diagrams showing circuit examples created by macro-expanding circuit data.

【図55】 マクロプログラムをシーケンスプログラム
に展開する場合の従来例を示す機能ブロック図である。
FIG. 55 is a functional block diagram showing a conventional example in which a macro program is developed into a sequence program.

【図56】 マクロプログラム展開の従来例を示すフロ
ーチャートである。
FIG. 56 is a flowchart showing a conventional example of macro program expansion.

【図57】 シーケンスプログラムで制御する機械の一
例を示す概略構成図である。
FIG. 57 is a schematic configuration diagram showing an example of a machine controlled by a sequence program.

【図58】 マクロを用いたときの従来のシーケンスプ
ログラムの一例を示すリスト図である。
FIG. 58 is a list diagram showing an example of a conventional sequence program when a macro is used.

【図59】 (a)、(b)は従来のプログラミング手
順を示す説明図ある。
FIGS. 59A and 59B are explanatory diagrams showing a conventional programming procedure.

【図60】 マクロを用いたときのシーケンスプログラ
ムの表示方法の一例を示す説明図である。
FIG. 60 is an explanatory diagram showing an example of a display method of a sequence program when a macro is used.

【図61】 先に接点を書き込んでからマクロ流用した
ときのシーケンスプログラムの一例を示す説明図であ
る。
FIG. 61 is an explanatory diagram showing an example of a sequence program when a macro is diverted after writing a contact first.

【図62】 (a)〜(d)はマクロの前に接点を付加
しようとしたときのシーケンスプログラムの遷移状態を
示す説明図である。
FIGS. 62A to 62D are explanatory diagrams showing transition states of a sequence program when an attempt is made to add a contact point before a macro.

【図63】 (a)、(b)は従来のPCおよびPC用
プログラミング機器の構成とPC用プログラミング機器
においてシーケンスプログラム回路を表示した画面表示
例を示す図である。
FIGS. 63 (a) and (b) are diagrams showing a configuration of a conventional PC and a PC programming device, and a screen display example displaying a sequence program circuit in the PC programming device.

【図64】 従来のPC用プログラミング機器において
PCの稼動状態をモニタする処理のフローチャートであ
る。
FIG. 64 is a flowchart of a process of monitoring the operating state of a PC in a conventional PC programming device.

【図65】 ラダー回路のプログラムの例を示す図であ
る。
FIG. 65 is a diagram illustrating an example of a program of a ladder circuit.

【図66】 ラダー回路のプログラムにより制御される
装置の例を示すブロック線図である。
FIG. 66 is a block diagram showing an example of a device controlled by a program of a ladder circuit.

【図67】 従来におけるマクロ命令の登録例を示す図
である。
FIG. 67 is a diagram showing an example of registration of a conventional macro instruction.

【図68】 従来におけるマクロ命令の流用例を示す図
である。
FIG. 68 is a diagram showing an example of conventional diversion of macro instructions.

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

1 マクロプログラム登録手段,2 デバイス登録手
段,3 修正登録手段,4 マクロ展開手段,5 マク
ロ用メモリ,6 プログラム用メモリ,10 補助記憶
装置,11 表示器,12 キーボード,13 命令登
録処理部,14命令展開処理部,15 命令表示処理
部,16 デバイス番号位置カウンタ,17 読出し行
カウンタ,18 命令格納メモリ,19 シーケンスプ
ログラム格納メモリ,20 使用デバイス格納メモリ,
21 検索位置カウンタ,30 マクロ登録手段,31
デバイス登録テーブル格納メモリ,32 マクロ流用
処理手段,33 シンボル表示処理手段,34 シーケ
ンスプログラム調整処理手段,35 シーケンス回路表
示処理手段,36 表示器,37 マクロ範囲表示処理
手段,40 PC用プログラミング機器,41 電源ユ
ニット,42 CPUユニット,43 各種ユニット,
44 ケーブル,51 プログラミング処理部,52
内部メモリ,53 表示部,54 出力デバイス取得
部,55 出力デバイス状態取得部,56 マクロ状態
表示処理部,60 処理部,61 メモリ,62 キ
ーボード,63 キー入力制御部,64 表示器,65
画面表示制御部,66 補助記憶装置,67 補助記
憶装置制御部,71 プログラミング処理部,72 接
点マクロ命令登録部,73 コイルマクロ命令登録部,
74マクロ流用部, 75 ブロックマクロ登録部,7
6 マクロ流用部
1 macro program registration means, 2 device registration means, 3 correction registration means, 4 macro expansion means, 5 macro memory, 6 program memory, 10 auxiliary storage device, 11 display, 12 keyboard, 13 instruction registration processing section, 14 Instruction expansion processing unit, 15 instruction display processing unit, 16 device number position counter, 17 read line counter, 18 instruction storage memory, 19 sequence program storage memory, 20 used device storage memory,
21 search position counter, 30 macro registration means, 31
Device registration table storage memory, 32 macro diversion processing means, 33 symbol display processing means, 34 sequence program adjustment processing means, 35 sequence circuit display processing means, 36 display, 37 macro range display processing means, 40 PC programming equipment, 41 Power supply unit, 42 CPU unit, 43 various units,
44 cable, 51 programming processing unit, 52
Internal memory, 53 display unit, 54 output device acquisition unit, 55 output device state acquisition unit, 56 macro state display processing unit, 60 processing unit, 61 memory, 62 keyboard, 63 key input control unit, 64 display, 65
Screen display control unit, 66 auxiliary storage device, 67 auxiliary storage device control unit, 71 programming processing unit, 72 contact macro instruction registration unit, 73 coil macro instruction registration unit,
74 macro diversion part, 75 block macro registration part, 7
6 Macro diversion part

───────────────────────────────────────────────────── フロントページの続き (72)発明者 西牧 剛 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 (72)発明者 田中 京子 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 (72)発明者 板場 雄介 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Tsuyoshi Nishimaki 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Inside Mitsui Electric Co., Ltd. (72) Kyoko Tanaka 2-3-2 Marunouchi 3-chome, Chiyoda-ku, Tokyo (72) Inventor Yusuke Itaba 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Sanishi Electric Co., Ltd.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 ひとまとまりのシーケンスプログラムを
マクロプログラムとして登録するマクロプログラム登録
手段と、 前記マクロプログラム登録手段によって登録されたマク
ロプログラムをシーケンスプログラムに展開するための
デバイスを登録するデバイス登録手段と、 シーケンスプログラムへ展開された後にマクロ展開部を
修正した場合、その履歴を修正登録テーブルに登録する
修正登録手段と、 マクロプログラムを修正した場合、その内容をシーケン
スプログラムの前記修正登録テーブルを用いて既にシー
ケンスプログラムで修正された箇所以外をシーケンスプ
ログラムに展開するマクロ展開手段と、 を有していることを特徴とするプログラマブルコントロ
ーラの周辺装置。
1. A macro program registration unit for registering a group of sequence programs as a macro program, a device registration unit for registering a device for expanding the macro program registered by the macro program registration unit into a sequence program, When the macro expansion unit is modified after being developed into the sequence program, the modification registration means for registering the history in the modification registration table, and when the macro program is modified, the contents thereof are already read using the modification registration table of the sequence program. A peripheral device for a programmable controller, comprising: macro expansion means for expanding a portion other than a portion corrected by the sequence program into a sequence program.
【請求項2】 ひとまとまりのシーケンスプログラムを
指定し、これを一つの命令として登録する命令登録手段
と、 前記命令登録手段によって登録された命令を使用してシ
ーケンスプログラムを作成する命令展開処理手段と、 を有していることを特徴とするプログラマブルコントロ
ーラの周辺装置。
2. An instruction registering means for designating a group of sequence programs and registering them as one instruction, and an instruction expansion processing means for creating a sequence program using the instructions registered by the instruction registering means. A peripheral device for a programmable controller, comprising:
【請求項3】 前記命令展開処理手段によって作成され
たシーケンスプログラムの画面表示において、登録した
命令での表示と、元の一連のシーケンスプログラムでの
表示とを切り替える命令表示処理手段を有していること
を特徴とする請求項2に記載のプログラマブルコントロ
ーラの周辺装置。
3. A screen display of a sequence program created by the instruction expansion processing means, comprising instruction display processing means for switching between display with a registered instruction and display with an original series of sequence programs. 3. The peripheral device for a programmable controller according to claim 2, wherein:
【請求項4】 マクロプログラムを実行するための条件
とシンボル表現のマクロを接続した回路を作成するマク
ロ流用処理手段と、 前記マクロ流用処理手段により作成されたマクロを実行
するための条件とシンボル表現のマクロを接続した回路
をシーケンス回路表示したときに回路が正しく繋がるよ
うにシーケンスプログラムを調整するシーケンスプログ
ラム調整手段と、 を有していることを特徴とするプログラマブルコントロ
ーラの周辺装置。
4. A macro diversion processing means for creating a circuit connecting a macro for executing a macro program and a symbol expression macro, and a condition and a symbol expression for executing the macro generated by the macro diversion processing means. And a sequence program adjusting means for adjusting a sequence program so that the circuits are correctly connected when a circuit connected to the macro is displayed as a sequence circuit.
【請求項5】 接点とマクロプログラムを接続した回路
をシーケンス回路表示したとき、接点を含まない元のマ
クロ命令部分を抽出し、接点を含まない元のマクロ命令
部分を区別して表示する処理を行うマクロ範囲表示処理
手段を有していることを特徴とするプログラマブルコン
トローラの周辺装置。
5. When a circuit connecting a contact and a macro program is displayed as a sequence circuit, an original macro instruction portion not including a contact is extracted, and a process of displaying the original macro instruction portion not including a contact is performed. A peripheral device for a programmable controller, comprising macro range display processing means.
【請求項6】 マクロ回路に登録されたデバイスの中か
ら出力デバイスを取得する出力デバイス取得手段と、 前記出力デバイス取得手段によって取得した出力デバイ
スの状態をプログラマブルコントローラから取得する出
力デバイス状態取得手段と、 前記出力デバイス状態取得手段によって取得した出力デ
バイスの状態からマクロ回路の導通・非導通状態を表示
する処理を行うマクロ状態表示処理手段と、 を有していることを特徴とするプログラマブルコントロ
ーラの周辺装置。
6. An output device acquisition unit for acquiring an output device from devices registered in a macro circuit, and an output device state acquisition unit for acquiring a state of the output device acquired by the output device acquisition unit from a programmable controller. And a macro state display processing means for performing a process of displaying a conductive / non-conductive state of the macro circuit from a state of the output device obtained by the output device state obtaining means. apparatus.
【請求項7】 ラダー回路のプログラミングにおいて、
複数の接点からなる回路を接点マクロ命令として登録す
る接点マクロ登録手段と、 複数の接点と複数のコイルあるいは複数のコイルからな
る回路をコイルマクロ命令として登録するコイルマクロ
登録手段と、 前記接点マクロ登録手段によって登録した接点マクロ命
令を接点部に、前記コイルマクロ登録手段によって登録
したコイルマクロ命令をコイル部に組み合わせて流用す
るマクロ流用手段と、 を有していることを特徴とするプログラマブルコントロ
ーラの周辺装置。
7. In programming a ladder circuit,
Contact macro registration means for registering a circuit consisting of a plurality of contacts as a contact macro instruction; coil coil registration means for registering a circuit consisting of a plurality of contacts and a plurality of coils or a coil as a coil macro instruction; Macro diversion means for diverting the contact macro instruction registered by the means to the contact part and combining the coil macro instruction registered by the coil macro registration means with the coil part. apparatus.
【請求項8】 ラダー回路のプログラミングにおいて、
1回路ブロックをブロックマクロ命令として登録するブ
ロックマクロ命令登録手段と、 前記ブロックマクロ命令登録手段によって登録したブロ
ックマクロ命令を接点部とコイル部に組み合わせて流用
し、接点部に記述したブロックマクロ命令のコイルに使
用されているデバイスをコイル部に記述したブロックマ
クロ命令の前に接点として付加して流用するマクロ流用
手段と、 を有していることを特徴とするプログラマブルコントロ
ーラの周辺装置。
8. In the programming of the ladder circuit,
A block macro instruction registering means for registering one circuit block as a block macro instruction; and a block macro instruction registered by the block macro instruction registering means being combined with a contact portion and a coil portion, and diverted to the block macro instruction described in the contact portion. And a macro diversion means for adding a device used for the coil as a contact before a block macro instruction described in the coil part and diverting the macro instruction. A peripheral device for a programmable controller, comprising:
JP22017596A 1996-08-21 1996-08-21 Peripheral device of programmable controller Pending JPH1063309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22017596A JPH1063309A (en) 1996-08-21 1996-08-21 Peripheral device of programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22017596A JPH1063309A (en) 1996-08-21 1996-08-21 Peripheral device of programmable controller

Publications (1)

Publication Number Publication Date
JPH1063309A true JPH1063309A (en) 1998-03-06

Family

ID=16747069

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22017596A Pending JPH1063309A (en) 1996-08-21 1996-08-21 Peripheral device of programmable controller

Country Status (1)

Country Link
JP (1) JPH1063309A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7986429B2 (en) 2005-09-12 2011-07-26 Kabushiki Kaisha Toshiba Printer and printing method
WO2013140497A1 (en) * 2012-03-19 2013-09-26 三菱電機株式会社 Sequence program creation device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7986429B2 (en) 2005-09-12 2011-07-26 Kabushiki Kaisha Toshiba Printer and printing method
WO2013140497A1 (en) * 2012-03-19 2013-09-26 三菱電機株式会社 Sequence program creation device
CN104169818A (en) * 2012-03-19 2014-11-26 三菱电机株式会社 Sequence program creation device
JP5677620B2 (en) * 2012-03-19 2015-02-25 三菱電機株式会社 Sequence program creation device
CN104169818B (en) * 2012-03-19 2016-08-31 三菱电机株式会社 Sequencer generating means
US9747529B2 (en) 2012-03-19 2017-08-29 Mitsubishi Electric Corporation Sequence program creation device

Similar Documents

Publication Publication Date Title
JPH087748B2 (en) Document coloring device
CA1169569A (en) Method for editing spatially related data in an interactive text processing system
JPH02235664A (en) Output device
JPH1063309A (en) Peripheral device of programmable controller
WO1989002117A1 (en) Data processing apparatus and editing apparatus using the same
US5287538A (en) Word processor for reformatting a character group by locating line feed codes and selecting the beginning and end of the text when the line feed codes cannot be located
US4850726A (en) Word processor provided with an automatic tabset means
JPH0219462B2 (en)
JP2815158B2 (en) Character processor
JPH0675948A (en) Document processor
JPH0823744B2 (en) Character string processor
JPH0366157B2 (en)
JP3006203B2 (en) Document processing device
JPH08185452A (en) Document preparation device
EP0253652B1 (en) Word processor
JP2001005703A (en) Method and system for generating text type file
JP3572054B2 (en) Graphic processing apparatus and method
JP2607044B2 (en) Document creation device and display output control method in document creation device
JP2611971B2 (en) Output device
JPH0863218A (en) Program constitution display system
JPH07200560A (en) Document preparing device
JP2573174B2 (en) Document creation device
US5200892A (en) Intelligent electronic word processor with plural print wheels and tables used to identify displayed characters supported by designated print wheels
JP2592840B2 (en) Character processor
JPH11282962A (en) Character recognition device and computer readable storage medium recording character recognition program