JPH09185402A - Execution system for sequence program - Google Patents

Execution system for sequence program

Info

Publication number
JPH09185402A
JPH09185402A JP35117995A JP35117995A JPH09185402A JP H09185402 A JPH09185402 A JP H09185402A JP 35117995 A JP35117995 A JP 35117995A JP 35117995 A JP35117995 A JP 35117995A JP H09185402 A JPH09185402 A JP H09185402A
Authority
JP
Japan
Prior art keywords
program
transition
sequence
function
execution
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.)
Withdrawn
Application number
JP35117995A
Other languages
Japanese (ja)
Inventor
Yasushi Onishi
靖史 大西
Yoshiharu Saiki
嘉春 斎木
Kazuo Sato
和生 佐藤
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP35117995A priority Critical patent/JPH09185402A/en
Publication of JPH09185402A publication Critical patent/JPH09185402A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the burden of measures for abnormal state, etc. SOLUTION: Concerning a sequence control system for executing a sequence program through a programmable controller, the programmable controller is provided with a function for controlling the execution of one sequence program corresponding to the instruction of other sequence program among plural sequence programs through the functions of task jump function (TSKJMP), execution end function (TSKEND), transition stop function (TSKSTP) and execution run function (TSKRUN). Thus, the burden of measures for abnormal state, etc., is reduced.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プログラマブルコ
ントローラによるシーケンス・プログラムの実行方式に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sequence program execution method by a programmable controller.

【0002】[0002]

【従来の技術】従来のシーケンス制御システムにおい
て、制御装置側と機械側との間に、多数のリレー群を含
む強電回路からなるシーケンス回路を介在させ、制御装
置からの指令により所定のレリーを動作させ、これによ
り該指令に応じた動作を機械要素に行わせている。この
ようなシーケンス制御システムにおいて、プログラマブ
ルコントローラを使用したシステムでは、上記シーケン
ス回路の情報をPCのメモリ内にプログラムの形態で記
憶させ、これによりシーケンス制御を行わせている。
2. Description of the Related Art In a conventional sequence control system, a sequence circuit composed of a high-voltage circuit including a large number of relay groups is interposed between a control device side and a machine side, and a predetermined relay is operated by a command from the control device. By doing so, the mechanical element is caused to perform an operation according to the command. In such a sequence control system, in a system using a programmable controller, the information of the sequence circuit is stored in the memory of the PC in the form of a program, and thereby the sequence control is performed.

【0003】例えば、上記シーケンス回路を図11で示
すようなSFC(Sequential Fuunction Chart) で代表
されるフローチャート形式のシーケンス・プログラムを
プログラマブル・コントローラのメモリに記憶させ制御
させている。このSFCでは順序制御における実行順序
や処理内容を、処理(ステップ)、遷移(トランジショ
ン)、つなぎ線(リンク)等の記述要素により表現して
いる。
For example, the sequence circuit is stored in a memory of a programmable controller and controlled by a sequence program in a flow chart format represented by SFC (Sequential Fuunction Chart) as shown in FIG. In this SFC, the execution order and the processing contents in the order control are expressed by descriptive elements such as a process (step), a transition (transition), and a connecting line (link).

【0004】従来のフローチャート形式のシーケンス・
プログラムにおいて、機械の故障等の異常状態が発生し
た場合には、電源を落とした後に処理を再起動させた
り、あるいは、プログラムの各処理に異常事態用の処理
をあらかじめ加えておく等の対処が行われている。
Conventional flow chart type sequence
If an abnormal state such as a machine failure occurs in the program, take measures such as restarting the process after turning off the power, or adding an abnormal situation process to each process of the program in advance. Has been done.

【0005】[0005]

【発明が解決しようとする課題】従来のシーケンス・プ
ログラムの実行方式では、異常状態等に対するシーケン
ス・プログラムの実行の点で問題点がある。機械の故障
等の異常状態が発生したときに、従来のように電源を落
とした後に処理を再起動させる場合には、故障処理後に
電源を入れ直したときに機械の調整を再度行う必要があ
り、また、システムがネットワーク上のものである場合
には、ネットワーク上でつながった他のシステムに影響
を与えるおそれがある。また、プログラムの各処理に異
常事態用の処理をあらかじめ加えておくことは、正常時
の基本的な処理の流れ以外に、処理毎に異常事態用の処
理を特定してプログラミングを行う必要があり、プログ
ラムが複雑となるとともにプログラミングにも長時間を
要することになる。
The conventional method of executing a sequence program has a problem in executing the sequence program for an abnormal state or the like. When an abnormal state such as a machine failure occurs and the process is restarted after turning off the power as in the conventional case, it is necessary to re-adjust the machine when the power is turned on again after the failure process. Further, if the system is on the network, it may affect other systems connected on the network. In addition, adding processing for abnormal situations to each processing of the program beforehand requires that the processing for abnormal situations be specified for each processing in addition to the basic flow of normal processing. , The program becomes complicated and it takes a long time to program.

【0006】例えば図11に示すシーケンス・プログラ
ムの場合では、ステップS1〜ステップS4の各ステッ
プにおいて、ステップS11〜ステップS41のアラー
ム処理を想定してプログラムを作成する必要がある。そ
こで、本発明は前記した従来の問題点を解決して、シー
ケンス・プログラムの実行方式において、異常状態等に
対する対処の負担を軽減することを目的とする。
For example, in the case of the sequence program shown in FIG. 11, in each step of steps S1 to S4, it is necessary to create the program assuming the alarm processing of steps S11 to S41. Therefore, an object of the present invention is to solve the above-mentioned conventional problems and reduce the burden of coping with an abnormal state or the like in the execution method of a sequence program.

【0007】[0007]

【課題を解決するための手段】本発明は、プログラマブ
ル・コントローラによりシーケンス・プログラムの実行
を行うシーケンス制御システムにおいて、プログラマブ
ル・コントローラに、複数個のシーケンス・プログラム
において、一のシーケンス・プログラムの命令によって
他のシーケンス・プログラムの実行を制御する機能を備
えさせることによって、異常状態等に対する対処の負担
を軽減してシーケンス・プログラムを実行することがで
きる。
According to the present invention, in a sequence control system for executing a sequence program by a programmable controller, a programmable controller is instructed by a command of one sequence program in a plurality of sequence programs. By providing the function of controlling the execution of another sequence program, it is possible to execute the sequence program while reducing the burden of dealing with an abnormal state or the like.

【0008】本発明のシーケンス・プログラムの実行方
式によれば、複数個のシーケンス・プログラムにおい
て、一のシーケンス・プログラムが他のシーケンス・プ
ログラムの実行を制御することができるため、別個に設
定した複数のシーケンス・プログラムを関連させて実行
することができる。また、一のシーケンス・プログラム
中の各処理において行う処理内容を他のシーケンス・プ
ログラムとして設定することができるため、各プログラ
ムを単純化することができる。
According to the sequence program execution method of the present invention, in a plurality of sequence programs, one sequence program can control the execution of another sequence program. Can be executed in association with each other. Further, since the processing contents performed in each processing in one sequence program can be set as another sequence program, each program can be simplified.

【0009】本発明のシーケンス・プログラムの実行方
式において、一のシーケンス・プログラムの命令によっ
て他のシーケンス・プログラムの実行を制御する機能
は、シーケンス・プログラムの処理位置を移動させる遷
移機能と、シーケンス・プログラムの実行を中止させる
実行中止機能と、シーケンス・プログラムにおいて次処
理への移動を中止させる遷移中止機能と、シーケンス・
プログラムの処理を実行させる実行開始機能により実現
することができる。
In the execution method of the sequence program of the present invention, the function of controlling the execution of another sequence program by the instruction of one sequence program includes a transition function for moving the processing position of the sequence program and a sequence function. The execution stop function that stops the execution of the program, the transition stop function that stops the movement to the next process in the sequence program, and the sequence
It can be realized by an execution start function for executing the processing of the program.

【0010】遷移機能は、指定したシーケンス・プログ
ラム内においてどの処理を実行中であっても、この処理
を指定した位置に移動させる機能であり、移動先の位置
は任意のシーケンス・プログラムとすることができる。
また、実行中止機能は指定したシーケンス・プログラム
の実行を中止する機能であり、遷移中止機能は指定した
シーケンス・プログラムにおいて遷移が成立した場合で
あっても、次の処理への遷移を中止させる機能である。
また、実行開始機能は指定したプログラムの実行を開始
させたり、前記した実行中止機能あるいは遷移中止機能
によって中止しているシーケンス・プログラムの処理を
再開させる機能である。プログラマブル・コントローラ
が備える遷移機能と実行中止機能と遷移中止機能と実行
開始機能によって、複数個のシーケンス・プログラムに
おいて、一のシーケンス・プログラムからの他のシーケ
ンス・プログラムの実行制御を行うことが可能となる。
The transition function is a function for moving this process to a specified position, regardless of which process is being executed in the specified sequence program. The position to which the process is moved should be an arbitrary sequence program. You can
In addition, the execution stop function is a function that stops the execution of the specified sequence program, and the transition stop function is a function that stops the transition to the next process even if a transition is established in the specified sequence program. Is.
The execution start function is a function for starting the execution of the designated program and for restarting the processing of the sequence program stopped by the execution stop function or transition stop function. With the transition function, execution stop function, transition stop function, and execution start function of the programmable controller, it is possible to control execution of one sequence program to another sequence program in multiple sequence programs. Become.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態を図を
参照しながら詳細に説明する。図1は本発明のシーケン
ス・プログラムの実行方式においてプログラマブル・コ
ントローラが備える機能を説明するための図である。図
1では、各機能をラダー図により示しており、シーケン
ス・プログラムをSFCの形式を用いて示す場合には、
各機能は例えば各処理がオンとなったときに実行される
アクションの形式で表すことができる。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a diagram for explaining the functions of the programmable controller in the execution method of the sequence program of the present invention. In FIG. 1, each function is shown by a ladder diagram, and when the sequence program is shown by using the SFC format,
Each function can be represented, for example, in the form of an action executed when each process is turned on.

【0012】本発明のプログラマブル・コントローラ
は、遷移機能と、実行中止機能と、遷移中止機能と、実
行開始機能の各機能を備えている。以下該機能について
説明する。図1(a)は遷移機能を表しており、左右の
母線間に挟まれた矩形中の「TSKJMP」は遷移機能
があることを示し、「P1」は遷移を適用する場所を示
し、「L2」は遷移先を示している。したがって、図1
(a)の遷移機能は、フローチャート形式のプログラム
P1において実行中の処理をラベルL2に移動し、引き
続いてラベルL2から実行を行うことを示している。こ
の遷移を開始する処理は、指定されたプログラム中の全
ての処理の中で、遷移命令が指令された時点で実行中の
処理に対して適用することになる。したがって、この機
能を適用させるシーケンス・プログラムを、該機能が記
載されてるシーケンス・プログラムと異ならせることに
よって、他のシーケンス・プログラムの制御に移動する
ことができる。
The programmable controller of the present invention has a transition function, an execution stop function, a transition stop function, and an execution start function. The function will be described below. FIG. 1A shows a transition function. “TSKJMP” in a rectangle sandwiched between left and right busbars indicates that there is a transition function, “P1” indicates a place to which the transition is applied, and “L2”. Indicates the transition destination. Therefore, FIG.
The transition function of (a) indicates that the process being executed in the flowchart-type program P1 is moved to the label L2, and then the process is executed from the label L2. The process of starting the transition is applied to the process being executed at the time when the transition command is instructed among all the processes in the designated program. Therefore, by making the sequence program to which this function is applied different from the sequence program in which the function is described, it is possible to move to the control of another sequence program.

【0013】図1(b)は実行中止機能を表しており、
左右の母線間に挟まれた矩形中の「TSKEND」は実
行中止機能があることを示し、「P1」は実行を中止さ
せる場所を示している。したがって、図1(b)の実行
中止機能は、フローチャート形式のプログラムP1にお
いて実行中の処理を中止させることを示している。この
実行が中止される処理は、指定されたプログラム中の全
ての処理の中で、実行中止命令が指令された時点で実行
中の処理に対して適用することになる。したがって、こ
の機能を適用させるシーケンス・プログラムを、該機能
が記載されてるシーケンス・プログラムと異ならせるこ
とによって、他のシーケンス・プログラムの制御して実
行を中止させることができる。
FIG. 1B shows the execution stop function.
"TSKEND" in the rectangle sandwiched between the left and right busbars indicates that there is an execution stop function, and "P1" indicates the place where execution is stopped. Therefore, the execution stop function shown in FIG. 1B indicates that the process being executed in the flow chart program P1 is stopped. The process of which the execution is stopped is applied to the process being executed at the time when the execution stop instruction is commanded among all the processes in the designated program. Therefore, by making the sequence program to which this function is applied different from the sequence program in which the function is described, it is possible to control other sequence programs to stop their execution.

【0014】図1(c)は遷移中止機能を表しており、
左右の母線間に挟まれた矩形中の「TSKSTP」は遷
移中止機能があることを示し、「P1」は遷移を中止さ
せる場所を示している。したがって、図1(c)の遷移
中止機能は、指定したプログラムP1において、遷移
(トランジション)が成立した場合であっても、次の処
理への遷移を中止させることを示している。この遷移が
中止される処理は、指定されたプログラム中の全ての処
理の中で、遷移中止命令が指令された時点以後の遷移に
対して適用することになる。したがって、この機能を適
用させるシーケンス・プログラムを、該機能が記載され
てるシーケンス・プログラムと異ならせることによっ
て、他のシーケンス・プログラムでの遷移を中止させる
ことができる。
FIG. 1C shows the transition cancel function.
"TSKSTP" in the rectangle sandwiched between the left and right busbars indicates that there is a transition stop function, and "P1" indicates the place where the transition is stopped. Therefore, the transition stop function of FIG. 1C indicates that the transition to the next process is stopped even if the transition is established in the designated program P1. The process in which the transition is canceled is applied to the transition after the time point when the transition cancel command is instructed among all the processes in the designated program. Therefore, by making the sequence program to which this function is applied different from the sequence program in which the function is described, the transition in another sequence program can be stopped.

【0015】図1(d)は実行開始機能を表しており、
左右の母線間に挟まれた矩形中の「TSKRUN」は実
行開始機能があることを示し、「P1」は実行を開始さ
せる場所を示している。この実行開始機能は、指定した
プログラムの実行を開始させたり、実行中止機能あるい
は遷移中止機能によって中止しているシーケンス・プロ
グラムの処理を再開させる機能である。したがって、図
1(d)の実行開始機能は、指定したプログラムP1の
処理を開始させることを示している。この実行が開始さ
れる処理は、指定されたプログラムで処理が停止してい
る箇所に対して適用することになる。したがって、この
機能を適用させるシーケンス・プログラムを、該機能が
記載されてるシーケンス・プログラムと異ならせること
によって、他のシーケンス・プログラムでの処理を開始
あるいは再開させることができる。
FIG. 1D shows the execution start function.
In the rectangle sandwiched between the left and right buses, "TSKRUN" indicates that there is an execution start function, and "P1" indicates the place where execution is started. The execution start function is a function of starting the execution of the designated program and restarting the processing of the sequence program which has been stopped by the execution stop function or the transition stop function. Therefore, the execution start function of FIG. 1D indicates that the processing of the designated program P1 is started. The process in which the execution is started is applied to the part where the process is stopped in the designated program. Therefore, by making the sequence program to which this function is applied different from the sequence program in which the function is described, the processing in another sequence program can be started or restarted.

【0016】次に、本発明のシーケンス・プログラムの
実行方式を適用したプログラマブル・コントローラの構
成について図2,図3を用いて説明する。図2のブロッ
ク線図において、プログラマブル・コントローラ1は、
シーケンス制御手段10を備え、入力回路3やプログラ
マブル・コントローラの内部に記憶されているコントロ
ールレリー5からの信号を受け、シーケンス・プログラ
ムによって処理した出力を出力回路4からCN装置等の
機械側に送出して制御を行う。また、図3はプログラマ
ブル・コントローラのハードウェア構成図において、1
6はプログラマブル・コントローラ全体を制御する制御
プログラムを記憶するメモリ(ROM)、17はシーケ
ンス・プログラムを記憶するメモリ(ROM)、18は
シーケンス回路のレリー等の各要素の状態を記憶するデ
ータメモリ(RAM)、11は制御プログラムやシーケ
ンス・プログラムに応じて所定のシーケンス処理を行う
処理装置(CPU)、12はCRTやプリン等の表示装
置、13はキーボード、14,15はNC装置や工作機
械等とプログラマブル・コントローラ1とを接続するた
めの入力回路、および出力回路である。なお、19はバ
スである。CPU11は、メモリ17に記憶されている
シーケンス・プログラムによって外部機械をシーケンシ
ャルに制御し、入力回路14および出力回路15から入
力,出力される信号によりシーケンス回路の各要素の信
号状態はデータメモリ18の所定のアドレスに記憶され
る。
Next, the configuration of the programmable controller to which the sequence program execution method of the present invention is applied will be described with reference to FIGS. In the block diagram of FIG. 2, the programmable controller 1 is
The sequence control means 10 is provided, receives signals from the control relay 5 stored inside the input circuit 3 and the programmable controller, and outputs an output processed by the sequence program from the output circuit 4 to a machine side such as a CN device. And control. In addition, FIG. 3 is a hardware configuration diagram of the programmable controller.
6 is a memory (ROM) for storing a control program for controlling the entire programmable controller, 17 is a memory (ROM) for storing a sequence program, and 18 is a data memory (for storing the state of each element such as the relay of the sequence circuit). RAM), 11 is a processing device (CPU) that performs a predetermined sequence process according to a control program or a sequence program, 12 is a display device such as a CRT or pudding, 13 is a keyboard, 14 and 15 are NC devices or machine tools, etc. And an input circuit for connecting the programmable controller 1 to the programmable controller 1. In addition, 19 is a bus. The CPU 11 controls the external machine sequentially by the sequence program stored in the memory 17, and the signal state of each element of the sequence circuit is stored in the data memory 18 by the signals input and output from the input circuit 14 and the output circuit 15. It is stored at a predetermined address.

【0017】次に、プログラマブル・コントローラの本
発明の機能について図4の機能説明図を用いて説明す
る。図4はプログラマブル・コントローラの本発明の機
能を説明するために模式的に示したものである。図4に
おいて、シーケンス・プログラムはプログラム領域21
に格納されており、該シーケンス・プログラムの内容は
シーケンス実行手段22によって実行され、レリー群3
1やコイル群32を駆動する。格納されるシーケンス・
プログラムは、例えばメインタスクと複数のサブタスク
(第1サブタスク,第2サブタスク,第3サブタスク,
・・・)を含んでいる。
Next, the function of the present invention of the programmable controller will be described with reference to the function explanatory diagram of FIG. FIG. 4 is a schematic diagram for explaining the function of the present invention of the programmable controller. In FIG. 4, the sequence program is the program area 21.
Stored in the sequence program, the contents of the sequence program are executed by the sequence execution means 22, and the release group 3
1 and the coil group 32 are driven. Sequence to be stored
The program is, for example, a main task and a plurality of subtasks (first subtask, second subtask, third subtask,
...) is included.

【0018】また、プログラマブル・コントローラは、
シーケンス・プログラムから読み出された命令内に遷移
機能や遷移中止機能や実行中止機能あるいは実行開始機
能を実現する各命令25〜28が含まれているかを判定
する命令判定手段23を備え、該命令が含まれる場合に
はそれぞれの機能に対応してシーケンス実行手段22を
制御したり、他のプログラムの制御をプログラム制御手
段24を介して行う。
Further, the programmable controller is
The instruction read means 23 for determining whether or not each instruction 25 to 28 for realizing the transition function, the transition stop function, the execution stop function, or the execution start function is included in the instruction read from the sequence program, In the case where is included, the sequence execution means 22 is controlled corresponding to each function, and the control of other programs is performed via the program control means 24.

【0019】次に、シーケンス・プログラム上におい
て、前記した各機能の動作について図5のフローチャー
トを用いて説明する。図5のフローチャートでは、プロ
グラム領域21内に格納されているプログラムが実行さ
れている場合において(ステップS1)、本発明のシー
ケンス・プログラム実行方式が備える各機能の動作につ
いてのみ説明する。プログラム領域3から読み出される
各命令中に、前記した遷移機能や遷移中止機能や実行中
止機能あるいは実行開始機能を実現する命令が含まれて
いるか否かを判定し(ステップS2)、該命令が含まれ
ている場合にはその命令の種類を判定して、遷移命令か
遷移中止命令か実行中止命令あるいは実行開始命令の何
れであるかを判定する(ステップS3)。
Next, the operation of each function described above on the sequence program will be described with reference to the flowchart of FIG. In the flowchart of FIG. 5, only the operation of each function of the sequence program execution method of the present invention will be described when the program stored in the program area 21 is being executed (step S1). It is determined whether or not each instruction read from the program area 3 includes an instruction that realizes the above-described transition function, transition stop function, execution stop function, or execution start function (step S2), and the instruction is included. If so, the type of the instruction is determined to determine whether it is a transition instruction, a transition stop instruction, an execution stop instruction, or an execution start instruction (step S3).

【0020】遷移命令である場合には(ステップS
4)、遷移命令中の遷移先が他のプログラムのラベルで
ある場合には該ラベルからの処理を行う(ステップS
6)。また、実行中止命令あるいは遷移中止命令である
場合には指定されたシーケンス・プログラムの実行を中
止したり、指定されたシーケンス・プログラムの遷移
(トランジション)が成立した場合でも次の処理への遷
移を中止する(ステップS7,8)。また、実行開始命
令である場合には(ステップS9)、指定されたシーケ
ンス・プログラムが実行前の状態であったり、あるいは
実行中止や遷移中止の状態であるとき(ステップS1
0)、実行を開始したり実行を再開する(ステップS1
1)。
If it is a transition command (step S
4) If the transition destination in the transition instruction is the label of another program, the process from that label is performed (step S).
6). Also, if it is an execution stop instruction or a transition stop instruction, execution of the specified sequence program is stopped, or even if the transition (transition) of the specified sequence program is established, the transition to the next processing is performed. The process is stopped (steps S7 and 8). If it is an execution start instruction (step S9), the designated sequence program is in a state before execution, or is in an execution stop state or a transition stop state (step S1).
0), start or resume execution (step S1)
1).

【0021】次に、前記図11で示したプログラム処理
を本発明のシーケンス・プログラムの実行方式で実施し
た場合について、図6のシーケンス・プログラム図を用
いて説明する。図11中で1つのシーケンス・プログラ
ムで示される処理は、図6においてメインタスクである
メインプログラムP0と、サブタスクである監視プログ
ラムP1の2つのプログラムによって構成される。メイ
ンプログラムP0は、処理S1から処理S4を含む。一
方、監視プログラムP1は各処理の遷移時間を監視する
処理S100と、内部タイマで計時した遷移時間が所定
の時間を越えたことを条件とする遷移(トランジショ
ン)TR100と、アラーム処理を行う処理S101
と、該アラーム処理が終了したことを条件とする遷移
(トランジション)TR101と、メインプログラムP
0の実行をラベルL1に遷移する処理S102と、該処
理S102が終了したことを条件として監視プログラム
の処理を終了する遷移(トランジション)TR102と
を含んでいる。
Next, a case where the program processing shown in FIG. 11 is executed by the execution method of the sequence program of the present invention will be described with reference to the sequence program diagram of FIG. The processing shown by one sequence program in FIG. 11 is composed of two programs, a main program P0 which is a main task and a monitoring program P1 which is a subtask in FIG. The main program P0 includes processes S1 to S4. On the other hand, the monitoring program P1 processes S100 for monitoring the transition time of each process, transition TR100 on condition that the transition time measured by the internal timer exceeds a predetermined time, and process S101 for performing an alarm process.
A transition TR101 on condition that the alarm processing is completed, and the main program P
It includes a process S102 for transitioning the execution of 0 to the label L1 and a transition TR102 for terminating the process of the monitoring program on condition that the process S102 is terminated.

【0022】メインプログラムP0と監視プログラムP
1は同時に並行して実行され、メインプログラムP0の
各処理が実行されている間に、監視プログラムP1が実
行され、アラーム処理後にはラベルL100に遷移され
る。したがって、本発明のシーケンス・プログラムの実
行方式を適用することによって(図6の例では、遷移機
能を適用することによって)、複数のシーケンス・プロ
グラムを調整して処理することができ、異常状態等に対
する対処の負担を軽減したシーケンス・プログラムの実
行を行うことができる。
Main program P0 and monitoring program P
1 is simultaneously executed in parallel, the monitoring program P1 is executed while each processing of the main program P0 is executed, and after the alarm processing, the label L100 is transited to. Therefore, by applying the execution method of the sequence program of the present invention (in the example of FIG. 6, by applying the transition function), a plurality of sequence programs can be adjusted and processed, and abnormal states, etc. It is possible to execute a sequence program that reduces the burden of dealing with.

【0023】本発明のシーケンス・プログラムの実行方
式を適応した他の例について、図7を用いて説明する。
図7に示す処理は、メインタスクであるメインプログラ
ムP0と、2つのサブタスクであるプログラムP101
とプログラムP102の合計3個のプログラムによって
構成される。メインプログラムPは、処理S1から処理
S4と、遷移(トランジション)TR1から遷移(トラ
ンジション)TR4を含む。図7に示す例では、各遷移
(トランジション)TR1〜TR4にはアクションとし
てPxx,P101あるいはPxx,P102が含まれ
る。ここで、アクションPxx,P101,Pxx,P
102は、その右側のラダー図に示される内容である。
例えば、アクションPxx,P101は、Pxxのプロ
グラムにおいてプログラムP101に遷移することを示
し、アクションPxx,P102は、Pxxのプログラ
ムにおいてプログラムP102に遷移することを示して
いる。なお、図8は、前記図7と同様の内容を別の形式
で書き換えた例であり、各遷移(トランジション)にお
いて、プログラムP101あるいはP102とTR1〜
TR4とをリンクに沿って順に記述したものである。
Another example in which the execution method of the sequence program of the present invention is applied will be described with reference to FIG.
The process shown in FIG. 7 is performed by a main program P0 which is a main task and a program P101 which is two subtasks.
And a program P102, a total of three programs. The main program P includes processing S1 to processing S4 and transition (transition) TR1 to transition (transition) TR4. In the example shown in FIG. 7, each of the transitions TR1 to TR4 includes Pxx, P101 or Pxx, P102 as an action. Here, the actions Pxx, P101, Pxx, P
102 is the content shown in the ladder diagram on the right side.
For example, actions Pxx and P101 indicate transition to the program P101 in the program of Pxx, and actions Pxx and P102 indicate transition to the program P102 in the program of Pxx. Note that FIG. 8 is an example in which the same contents as in FIG. 7 are rewritten in a different format. At each transition, the program P101 or P102 and TR1 to TR1.
TR4 and TR4 are sequentially described along the link.

【0024】さらに、本発明のシーケンス・プログラム
の実行方式を適応した別の例について、図9および図1
0を用いて説明する。図9,10に示す処理は、メイン
タスクであるメインプログラムP0と、3つのサブタス
クであるプログラムP101とプログラムP102とプ
ログラムP103の合計4個のプログラムによって構成
される。メインプログラムPは、処理S1から処理S4
および遷移(トラジション)TR1からTR4、および
ラベルL2を含む。一方、第1サブタスクであるプログ
ラムP1は、処理S11から処理S13と、遷移(トラ
ンジション)TR11から遷移(トランジション)TR
13を含み、処理S12は図中のラダー図で示される内
容を含んでいる。ラダー図で示される処理S12の内容
は、プログラムP0中の処理をラベルL2に移動させる
遷移命令である。第2サブタスクであるプログラムP2
は、処理S21から処理S23と、遷移(トランジショ
ン)TR21から遷移(トランジション)TR23を含
み、処理S22は図中のラダー図で示される内容を含ん
でいる。ラダー図で示される処理S22の内容は、プロ
グラムP1における遷移(トランジション)の実行を中
止する遷移中止命令である。
Furthermore, FIG. 9 and FIG. 1 show another example in which the execution method of the sequence program of the present invention is applied.
Explanation will be made using 0. The processing shown in FIGS. 9 and 10 is composed of a main program P0 which is a main task, and three programs P101, programs P102 and P103 which are three subtasks in total. The main program P processes S1 to S4.
And transitions TR1 to TR4 and a label L2. On the other hand, the program P1 which is the first sub-task, the process S11 to the process S13, transition (transition) TR11 to transition (transition) TR
13, the process S12 includes the contents shown in the ladder diagram in the figure. The content of the process S12 shown in the ladder diagram is a transition instruction for moving the process in the program P0 to the label L2. Program P2, which is the second subtask
Includes processing S21 to processing S23 and transition (transition) TR21 to transition (transition) TR23, and processing S22 includes the contents shown in the ladder diagram in the figure. The content of the process S22 shown in the ladder diagram is a transition stop instruction for stopping the execution of the transition in the program P1.

【0025】また、第3サブタスクであるプログラムP
3は、処理S31から処理S33と、遷移(トランジシ
ョン)TR31から遷移(トランジション)TR33、
およびラベルL1を含み、処理S32および処理S33
は図中のラダー図で示される内容を含んでいる。ラダー
図で示される処理S32の内容は、プログラムP0にの
実行を中止する実行中止命令であり、処理S33の内容
は、プログラムP0において中止されているタスクを再
開させる実行開始命令と、プログラムP1において遷移
が中止されているタスクの遷移を再開させる実行開始命
令とを含んでいる。
The program P which is the third subtask
3 is processing S31 to processing S33, transition (transition) TR31 to transition (transition) TR33,
And the label L1 are included, and processing S32 and processing S33
Contains the contents shown in the ladder diagram in the figure. The contents of the process S32 shown in the ladder diagram are execution stop commands for stopping the execution of the program P0, and the contents of the process S33 are the execution start command for restarting the task stopped in the program P0 and the program P1. And an execution start instruction for resuming the transition of the task whose transition has been canceled.

【0026】次に、図9のシーケンス・プログラムの動
作例を図10のタイムチャートを用いて説明する。4つ
のシーケンス・プログラムはそれぞれ並列して実行さ
れ、例えば、ある時刻t0において各プログラムP0〜
P4はそれぞれの処理S1,S11,S21,S31を
実行しているものとする。ここで、時刻t1において、
プログラムP1の遷移(トラジション)TR11が成立
すると処理S12の遷移命令が実行される。この遷移命
令は、プログラムP0において処理をラベル2に遷移す
る内容であるため、プログラムP0は処理S2を実行す
る。その後、時刻t2において遷移(トラジション)T
R12の成立によって、プログラムP1は処理S13を
実行し、また、時刻t3に遷移(トラジション)TR2
が成立すると、プログラムP0は処理S3を実行する。
Next, an operation example of the sequence program of FIG. 9 will be described with reference to the time chart of FIG. The four sequence programs are executed in parallel, and each program P0 to P0 is executed at a certain time t0.
It is assumed that P4 is executing the respective processes S1, S11, S21, S31. Here, at time t1,
When the transition (transition) TR11 of the program P1 is established, the transition instruction of process S12 is executed. Since this transition instruction has the content of transitioning the process to label 2 in the program P0, the program P0 executes the process S2. After that, at time t2, a transition (transition) T
When R12 is established, the program P1 executes the process S13, and also transits to a time t3 (transition) TR2.
When is satisfied, the program P0 executes the process S3.

【0027】その後、時刻t4に遷移(トラジション)
TR2が成立すると、プログラムP2は処理22の遷移
中止命令を実行する。この遷移中止命令は、プログラム
P1において遷移(トラジション)TR13が成立した
場合であっても次の処理への遷移を中止するものであ
る。そのため、その後の時刻t6において遷移(トラジ
ション)TR13が成立しても、処理S13は次の処理
に進まないことになる。
After that, a transition (transition) occurs at time t4.
When TR2 is established, the program P2 executes the transition stop instruction of process 22. This transition stop instruction stops the transition to the next process even when the transition TR13 is established in the program P1. Therefore, even if the transition (transition) TR13 is established at the subsequent time t6, the process S13 does not proceed to the next process.

【0028】また、時刻t5において、遷移(トラジシ
ョン)TR31が成立すると、プログラムP3は処理3
2の実行中止命令を実行する。この実行中止命令は、プ
ログラムP0の実行を中止するものであるため、プログ
ラムP0は実行中の処理S3を中止する。さらに、時刻
t7において、遷移(トラジション)TR32が成立す
ると、プログラムP3は処理33の実行開始命令を実行
する。この実行開始命令は、プログラムP0およびプロ
グラムP1の実行を再開するものであるため、プログラ
ムP0は実行を中止していた処理S3を再開し、また、
プログラムP1は遷移を中止していた処理S13につい
て、遷移を実行してプログラムP1を終了する。
When the transition TR31 is established at time t5, the program P3 executes the process 3
Execute the instruction 2 to stop execution. Since this execution stop instruction is to stop the execution of the program P0, the program P0 stops the process S3 being executed. Further, at time t7, when the transition TR32 is established, the program P3 executes the execution start instruction of the process 33. Since this execution start instruction restarts the execution of the programs P0 and P1, the program P0 restarts the processing S3 which has been suspended, and
The program P1 ends the program P1 by executing the transition with respect to the process S13 that has stopped the transition.

【0029】また、時刻t8において遷移(トラジショ
ン)TR22が成立すると、プログラムP2は処理S2
3を実行する。本発明の実施の形態によれば、通常の処
理のみをメインプログラムとし、アラーム処理等の付随
する複数の処理は別のサブタスクとして他のプログラム
とすることができるため、プログラムの流れを単純化し
て明確なものとすることができ、また、プログラミング
に要する工程を減らすことができる。また、本発明の実
施の形態が備える機能によって、複数のプログラム間に
おける処理の制御が可能となる。
When the transition TR22 is established at time t8, the program P2 executes the process S2.
Execute 3. According to the embodiment of the present invention, only normal processing can be used as a main program, and a plurality of accompanying processing such as alarm processing can be used as another program as another subtask. Therefore, the flow of the program can be simplified. It can be clear and can reduce the steps required for programming. Further, the function provided in the embodiment of the present invention enables control of processing among a plurality of programs.

【0030】[0030]

【発明の効果】以上説明したように、本発明によれば、
シーケンス・プログラムの実行方式において、異常状態
等に対する対処の負担を軽減することができる。
As described above, according to the present invention,
In the execution method of the sequence program, it is possible to reduce the burden of dealing with an abnormal state or the like.

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

【図1】本発明のシーケンス・プログラムの実行方式に
おいてプログラマブル・コントローラが備える機能を説
明するための図である。
FIG. 1 is a diagram for explaining a function provided in a programmable controller in an execution system of a sequence program of the present invention.

【図2】本発明のシーケンス・プログラムの実行方式を
適用したプログラマブル・コントローラの構成を説明す
るためのブロック線図である。
FIG. 2 is a block diagram for explaining the configuration of a programmable controller to which the execution method of the sequence program of the present invention is applied.

【図3】本発明のシーケンス・プログラムの実行方式を
適用したプログラマブル・コントローラのハードウェア
構成図である。
FIG. 3 is a hardware configuration diagram of a programmable controller to which the execution method of the sequence program of the present invention is applied.

【図4】本発明のプログラマブル・コントローラの機能
を説明するための機能図である。
FIG. 4 is a functional diagram for explaining the function of the programmable controller of the present invention.

【図5】本発明のシーケンス・プログラム上における機
能の動作を説明するためのフローチャートである。
FIG. 5 is a flow chart for explaining the operation of the function on the sequence program of the present invention.

【図6】本発明のシーケンス・プログラムの実行方式を
適用したプログラム例である。
FIG. 6 is an example of a program to which the execution method of the sequence program of the present invention is applied.

【図7】本発明のシーケンス・プログラムの実行方式を
適用した他のプログラム例である。
FIG. 7 is another example of a program to which the execution method of the sequence program of the present invention is applied.

【図8】本発明のシーケンス・プログラムの実行方式を
適用した別のプログラム例である。
FIG. 8 is another program example to which the execution method of the sequence program of the present invention is applied.

【図9】本発明のシーケンス・プログラムの実行方式を
適用したプログラム例である。
FIG. 9 is an example of a program to which the execution method of the sequence program of the present invention is applied.

【図10】図9に示すシーケンス・プログラムの動作例
を説明するためのタイムチャートである。
FIG. 10 is a time chart for explaining an operation example of the sequence program shown in FIG.

【図11】従来のシーケンス・プログラムを説明するた
めの図である。
FIG. 11 is a diagram for explaining a conventional sequence program.

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

1 プログラマブル・コントローラ 2 CN装置 3 入力回路 4 出力回路 5 コントロールレリー 11 CPU 16,17 メモリ 18 データメモリ 21 プログラム領域 22 シーケンス実行手段 23 命令判定手段 24 プログラム制御手段 25 遷移命令 26 遷移中止命令 27 実行中止命令 28 実行開始命令 1 Programmable Controller 2 CN Device 3 Input Circuit 4 Output Circuit 5 Control Release 11 CPU 16, 17 Memory 18 Data Memory 21 Program Area 22 Sequence Execution Means 23 Command Judgment Means 24 Program Control Means 25 Transition Command 26 Transition Stop Command 27 Execution Stop Command 28 Execution start command

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラマブル・コントローラによりシ
ーケンス・プログラムの実行を行うシーケンス制御シス
テムにおいて、前記プログラマブル・コントローラは、
複数個のシーケンス・プログラムにおいて、一のシーケ
ンス・プログラムの命令によって他のシーケンス・プロ
グラムの実行を制御する機能を備えたことを特徴とする
シーケンス・プログラムの実行方式。
1. A sequence control system for executing a sequence program by a programmable controller, wherein the programmable controller comprises:
In a plurality of sequence programs, a sequence program execution method having a function of controlling execution of another sequence program by an instruction of one sequence program.
【請求項2】 前記制御機能は、プログラムの処理位置
を移動させる遷移機能と、プログラムの実行を中止させ
る実行中止機能と、プログラムにおいて次処理への移動
を中止させる遷移中止機能と、プログラムの処理を実行
させる実行開始機能を含むことを特徴とする請求項1記
載のシーケンス・プログラムの実行方式。
2. The control function includes a transition function for moving a processing position of a program, an execution stop function for stopping the execution of the program, a transition stop function for stopping the movement to the next process in the program, and a process of the program. The execution method of the sequence program according to claim 1, further comprising an execution start function for executing.
JP35117995A 1995-12-27 1995-12-27 Execution system for sequence program Withdrawn JPH09185402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35117995A JPH09185402A (en) 1995-12-27 1995-12-27 Execution system for sequence program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35117995A JPH09185402A (en) 1995-12-27 1995-12-27 Execution system for sequence program

Publications (1)

Publication Number Publication Date
JPH09185402A true JPH09185402A (en) 1997-07-15

Family

ID=18415591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35117995A Withdrawn JPH09185402A (en) 1995-12-27 1995-12-27 Execution system for sequence program

Country Status (1)

Country Link
JP (1) JPH09185402A (en)

Similar Documents

Publication Publication Date Title
JPH0561646B2 (en)
WO2012124197A1 (en) Control device, system program, and storage medium
WO2012124198A1 (en) Control device and system program, and recording medium
JPH09134210A (en) Execution system for sequence program
JP2001265412A (en) Programmable controller
JPH09128255A (en) Programable logic controller
JPH09185402A (en) Execution system for sequence program
JP2002251291A (en) Control method, control program, memory cell and controller for technical process inside vehicle
WO2018061538A1 (en) Safety control unit, safety control method, and safety control program
WO2018061537A1 (en) Control unit, data refreshing method, data refreshing program
JP3207333B2 (en) Programmable controller
JPH03288906A (en) Instruction executing system for pc
JP2958470B2 (en) Sequence controller
JP2555182B2 (en) Process control system with monitor function
JPH10268914A (en) Programmable controller
JP2001306116A (en) Programmable controller
JPH11134010A (en) Program executing method of programmable controller
JP2001034464A (en) Program updating method
JPS63311446A (en) Power supply on/off function test system for logical device
JPH1195825A (en) Method for executing numerical control program
JP2001147802A (en) Image processor
JP2009223417A (en) Industrial controller
JPH09128259A (en) Automatic equalization device for duplex control system
WO1992021073A1 (en) Method for debugging sequential program
JPH11202913A (en) Controller for pmc

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030304