JP4442430B2 - Programmable controller system, controller and program - Google Patents

Programmable controller system, controller and program Download PDF

Info

Publication number
JP4442430B2
JP4442430B2 JP2005004501A JP2005004501A JP4442430B2 JP 4442430 B2 JP4442430 B2 JP 4442430B2 JP 2005004501 A JP2005004501 A JP 2005004501A JP 2005004501 A JP2005004501 A JP 2005004501A JP 4442430 B2 JP4442430 B2 JP 4442430B2
Authority
JP
Japan
Prior art keywords
transition
connection relation
active
control
temporary storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005004501A
Other languages
Japanese (ja)
Other versions
JP2006195590A (en
Inventor
吉晴 丸山
東洋史 門崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Systems Co Ltd filed Critical Fuji Electric Systems Co Ltd
Priority to JP2005004501A priority Critical patent/JP4442430B2/en
Publication of JP2006195590A publication Critical patent/JP2006195590A/en
Application granted granted Critical
Publication of JP4442430B2 publication Critical patent/JP4442430B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、プログラマブルロジックコントローラ(PLC)におけるSFC(シーケンシャルファンクションチャート)の実行方式に関する。   The present invention relates to a method for executing an SFC (sequential function chart) in a programmable logic controller (PLC).

PLC(プログラマブル・ロジック・コントローラ)等の制御装置においてSFC(シーケンシャル・ファンクション・チャート)を使用したプログラム(以下、SFCプログラム)を用いる方法が普及しつつある。   A method using a program (hereinafter referred to as an SFC program) using an SFC (sequential function chart) in a control device such as a PLC (programmable logic controller) is becoming widespread.

SFCはPLCの実行順序を示す処理構造を記述するための共通要素としてIEC61131-3(JIS B 3503)として規格化されている(SFCの詳細についてはIEC61131-3(JIS B 3503)参照)。   SFC is standardized as IEC61131-3 (JIS B 3503) as a common element for describing the processing structure indicating the execution order of PLC (refer to IEC61131-3 (JIS B 3503) for details of SFC).

SFCのステップ/トランジションの接続は、図19(a)〜(d)に示すような、単一シーケンス、シーケンス選択分岐と収束、同時シーケンス分岐と収束、シーケンスループ等の組み合わせによって構成される。通常、SFCプログラムは、PLCとは別に用意されたプログラミング装置(ローダ)で編集され、PLCの実行形式に変換された後、PLCにロードされる。または、編集後、PLCのインターフェースに合わせた形式に変換されPLCにロード・PLC内で実行形式に変換される。   The SFC step / transition connection is configured by a combination of a single sequence, a sequence selection branch and convergence, a simultaneous sequence branch and convergence, a sequence loop, and the like as shown in FIGS. Usually, the SFC program is edited by a programming device (loader) prepared separately from the PLC, converted into a PLC execution format, and then loaded into the PLC. Or, after editing, it is converted into a format that matches the PLC interface, loaded into the PLC, and converted into an executable format within the PLC.

SFCプログラムをPLCで実行する方式として、例えば、SFCの各ステップと各トランジションの接続関係を表形式に変換し、これに基づいてSFCの遷移をPLCの内部プログラムで実行する方法がある(特許文献1参照)。その実行方法は、活性状態直下のトランジションが成立すると、次のステップに進むというルールのみが開示されている。   As a method of executing the SFC program by the PLC, for example, there is a method in which the connection relationship between each step of the SFC and each transition is converted into a table format, and based on this, the SFC transition is executed by the PLC internal program (Patent Literature). 1). As for the execution method, only a rule that proceeds to the next step when a transition immediately under the active state is established is disclosed.

また、上記のルールに従うように所要のSET/RESET命令を並べることでSFCプログラムを実現する方法が、特許文献2に開示されている。
また、SFCプログラムの実行時に複数ステップの同時実行する方式の例が、特許文献3に開示されている。この方法は、活性ステップの移行後に直ちに移行先ステップの実行を行い、複数ステップを連続的に実行するというものである。
Further, Patent Document 2 discloses a method for realizing an SFC program by arranging necessary SET / RESET instructions so as to follow the above rules.
Further, Patent Document 3 discloses an example of a method of executing a plurality of steps at the same time when executing an SFC program. In this method, the transition destination step is executed immediately after the transition of the active step, and a plurality of steps are continuously executed.

また、特許文献4には、実行中の活性ステップの処理が完全に終了してから次ステップの処理を開始することで、処理の追い越しを防ぐという方法が開示されている。
特開平8−54911号公報 特開平11−338525号公報 特開平8−63205号公報 特開平5−241625号公報
Patent Document 4 discloses a method of preventing overtaking of a process by starting the process of the next step after the process of the active step being executed is completely completed.
JP-A-8-54911 JP 11-338525 A JP-A-8-63205 JP-A-5-241625

上記特許文献1等のように全てのステップ/トランジションに応じた命令群を作成して実行する構成では、SFCプログラムを実行する場合、ステップの移行を判定する処理毎に全てのステップ/トランジションを評価するため、ステップ/トランジションの数に応じてプログラムのスキャン時間が伸びる。これは、特に、大規模な(ステップ数、トランジション数が多い)SFCプログラムを実行する場合に、顕著な問題となる。この問題は、上記特許文献3,4のように、複数ステップの同時実行を許容する場合においても同様である。   In the configuration in which an instruction group corresponding to all the steps / transitions is created and executed as in the above-mentioned Patent Document 1, all the steps / transitions are evaluated for each process for determining the transition of the step when the SFC program is executed. Therefore, the scan time of the program increases according to the number of steps / transitions. This becomes a significant problem particularly when a large-scale SFC program (the number of steps and the number of transitions is large) is executed. This problem is the same even when the simultaneous execution of a plurality of steps is allowed as in Patent Documents 3 and 4 above.

本発明の課題は、大規模SFCプログラムを実行する場合でも、高速なスキャン実行を実現することができ、あるいは同一シーケンス内でのステップの追いかけ実行を許容しながらも高速なスキャン実行を実現することができる制御システム、その制御装置、プログラム等を提供することである。   An object of the present invention is to realize a high-speed scan execution even when a large-scale SFC program is executed, or to realize a high-speed scan execution while allowing a follow-up execution of steps in the same sequence. It is to provide a control system, a control device, a program, etc.

本発明の制御システムは、各種制御対象機器を制御する制御装置と、該制御装置を支援する支援装置とが通信線により接続されてなる制御システムにおいて、前記支援装置は、 SFCの図示表現プログラムを作成させる図示表現プログラム作成支援手段と、該図示表現プログラムにおける各ステップと各トランジションの接続関係を、表形式に変換する変換手段と、該表形式の接続関係データを前記制御装置に送信する送信手段とを有し、前記制御装置は、前記送信手段により送られてくる前記表形式の接続関係データを保存する接続関係データ保存手段と、該接続関係データを用いて前記制御対象機器の制御処理を実行する制御処理実行手段と、前記制御処理実行手段による前記制御処理の実行中に、現在活性となっているステップの番号群を一時的に記憶する第1の一時記憶手段と、この活性ステップに応じて評価すべきトランジションの番号群を一時的に記憶する第2の一時記憶手段とを有し、前記制御処理実行手段は、各スキャン毎に、前記第2の一時記憶手段に記憶されている前記評価対象のトランジションのみを評価対象として、該各評価対象トランジション毎に、当該トランジションの成立条件に基づき活性ステップの移行の有無を判断し、移行するステップに関して次スキャンの為に前記第1、第2の一時記憶手段の記憶内容を前記接続関係データを参照して更新するように構成する。   The control system of the present invention is a control system in which a control device that controls various control target devices and a support device that supports the control device are connected by a communication line. Graphical representation program creation support means to be created, conversion means for converting the connection relationship between each step and each transition in the graphical representation program into a table format, and transmission means for transmitting the connection relationship data in the table format to the control device And the control device stores connection relation data storage means for saving the connection relation data in the table format sent by the transmission means, and performs control processing of the control target device using the connection relation data. Control process execution means to be executed, and a group of numbers of steps currently active during execution of the control process by the control process execution means A first temporary storage means for temporarily storing; a second temporary storage means for temporarily storing a number group of transitions to be evaluated according to the activation step; For each scan, only the transition of the evaluation target stored in the second temporary storage means is set as the evaluation target, and for each of the evaluation target transitions, the presence or absence of transition of the active step is determined based on the conditions for establishing the transition. The contents stored in the first and second temporary storage means are updated with reference to the connection relation data for the next scan regarding the step of judging and shifting.

上記制御システムでは、まず、ユーザにプログラム等を作成させてPLC等の制御装置にロードする機能等を有する支援装置において、SFC図示表現プログラムを、PLC側で実行可能な形式に変換する。すなわち、表形式の接続関係データへと変換し、これを制御装置側にロードする。制御装置側では、制御処理実行手段が、この表形式の接続関係データを参照することで制御処理を実行するが、実行中、第1、第2の一時記憶手段を用いてその記憶内容を随時更新し且つ参照することで、現在評価すべきランジションのみを評価対象として処理することができる。   In the control system, first, an SFC illustrated representation program is converted into a format that can be executed on the PLC side in a support device that has a function of causing a user to create a program or the like and load it into a control device such as a PLC. That is, it is converted into tabular connection relation data, which is loaded on the control device side. On the control device side, the control processing execution means executes the control processing by referring to the tabular connection relation data. During execution, the stored contents are stored as needed using the first and second temporary storage means. By updating and referring, it is possible to process only the transition to be evaluated as an evaluation target.

上記制御システムは、例えば、前記制御処理実行手段が、ステップの追いかけ実行を許容するものであって、最先頭のステップは各スキャン毎に必ず活性状態とし、前記活性ステップの移行を判断する際に、前記接続関係データを参照して後続のステップを特定し、該特定したステップが現在活性状態か否かを前記第1の一時記憶手段を参照して判定し、現在活性状態である場合には、前記当該トランジションの成立条件に係わらずステップの移行は行わないようにするものであってもよい。   In the above control system, for example, the control processing execution means permits the follow-up execution of a step, and the top step is always in an active state for each scan, and when determining the transition of the active step Referring to the connection relation data, a subsequent step is identified, and it is determined by referring to the first temporary storage means whether the identified step is currently active. The step may not be shifted regardless of the conditions for establishing the transition.

つまり、上記制御装置は、同一シーケンス内でのステップの追いかけ実行を許容するものであってもよい。但し、ステップの追いつきが生じないようにする為に、上記特定した後続ステップが、現在活性状態である場合には、移行は行わないようにする。   That is, the control device may allow the follow-up execution of steps within the same sequence. However, in order not to catch up with the step, the transition is not performed when the identified subsequent step is currently active.

また、上記制御システムにおいて、例えば、前記第1の一時記憶手段は、前記活性ステップ番号を格納すると共に既に移行済みか否かを示すフラグが格納され、前記制御処理実行手段は、前記活性ステップの移行の有無の判断において、該フラグが移行済みを示していた場合には、前記当該トランジションの成立条件に係わらずステップの移行は行わないようにする。すなわち、“選択分岐と収束”のシーケンスの処理実行において、誤って2つ以上のステップが活性にならないようにする。   In the control system, for example, the first temporary storage means stores the active step number and a flag indicating whether or not the transition has already been performed, and the control processing execution means stores the active step number. In the determination of whether or not there is a transition, if the flag indicates that the transition has been completed, the transition of the step is not performed regardless of the conditions for the transition. That is, two or more steps are not erroneously activated in the execution of the “selective branch and convergence” sequence.

本発明の制御システム、その制御装置、プログラム等によれば、大きなSFCプログラムを実行する場合でも、高速なスキャン実行を実現することができ、あるいは同一シーケンス内でのステップの追いかけ実行を許容しながらも高速なスキャン実行を実現することができる。   According to the control system, the control device, the program, and the like of the present invention, even when a large SFC program is executed, high-speed scan execution can be realized, or while stepping execution of steps in the same sequence is allowed. Even high-speed scan execution can be realized.

以下、図面を参照して、本発明の実施の形態について説明する。
尚、以下の説明では、制御システムとして、プログラマブル・コントローラ・システムを例にして説明するが、本発明はこの例に限らない。
Embodiments of the present invention will be described below with reference to the drawings.
In the following description, a programmable controller system will be described as an example of the control system, but the present invention is not limited to this example.

図1は、本例のプログラマブル・コントローラ・システムの概略構成図である。
図示のシステムでは、コントローラ支援装置1と、PLC本体(制御装置)であるコントローラ2とが、通信線3を介して接続している。コントローラ支援装置1は、ユーザ(作業員やオペレータ等)に任意の制御プログラムを作成させたり、コントローラ2や当該コントローラ2が制御する不図示の各種制御対象機器の状態をモニタリングする為の装置である。つまり、上述したプログラミング装置(ローダ)としての機能やモニタリング装置としての機能を有する装置である。上記ユーザは、コントローラ支援装置1を用いて、図示表現によるSFCプログラムを作成する。コントローラ支援装置1は、作成されたSFCプログラムを、コントローラ2で実行可能な形式に変換した後、これを通信線3を介して、コントローラ2へロードする。
FIG. 1 is a schematic configuration diagram of the programmable controller system of this example.
In the illustrated system, a controller support device 1 and a controller 2 that is a PLC main body (control device) are connected via a communication line 3. The controller support apparatus 1 is an apparatus for allowing a user (a worker, an operator, or the like) to create an arbitrary control program, or for monitoring the status of the controller 2 or various control target devices (not shown) controlled by the controller 2. . That is, it is a device having the above-described function as a programming device (loader) and the function as a monitoring device. The user uses the controller support device 1 to create an SFC program with a graphical representation. The controller support apparatus 1 converts the created SFC program into a format that can be executed by the controller 2, and then loads the program into the controller 2 via the communication line 3.

本例では、上記コントローラ2で実行可能な形式とは、後述するステップ/トランジション接続関係テーブル13のことであり、コントローラ2はこの接続関係テーブル13を受信して記憶しておき、制御実行の際には、このテーブル13を参照し、更に後述する活性ステップ群管理テーブル14、評価トランジション群テーブル15を随時作成しつつ、制御実行手順を管理する。   In this example, the format that can be executed by the controller 2 is a step / transition connection relation table 13 to be described later. The controller 2 receives and stores the connection relation table 13 and executes the control. In order to manage the control execution procedure, the table 13 is referred to and an active step group management table 14 and an evaluation transition group table 15 described later are created as needed.

図2は、本例のプログラマブル・コントローラ・システムの機能ブロック図である。
図2において、符号11は、上記コントローラ支援装置1においてユーザによって作成されたSFC図示表現プログラムである。コントローラ支援装置1は、SFC図示表現−ステップ/トランジション接続関係テーブル変換部12(以下、省略して、SFC−接続関係テーブル変換部12と記す)を有しており、これにより上記SFC図示表現プログラム11を、ステップ/トランジション接続関係テーブル13へと変換する。作成されたステップ/トランジション接続関係テーブル13は、コントローラ2へ送信されて格納される。
FIG. 2 is a functional block diagram of the programmable controller system of this example.
In FIG. 2, reference numeral 11 denotes an SFC illustrated representation program created by the user in the controller support apparatus 1. The controller support apparatus 1 includes an SFC graphical representation-step / transition connection relationship table conversion unit 12 (hereinafter, abbreviated as SFC-connection relationship table conversion unit 12), and thereby the SFC graphical representation program described above. 11 is converted into a step / transition connection relation table 13. The created step / transition connection relation table 13 is transmitted to the controller 2 and stored.

コントローラ2は、制御実行部16を有しており、この制御実行部16は、ステップ/トランジション接続関係テーブル13を参照して、活性ステップ群管理テーブル14、評価トランジション群テーブル15を随時作成し参照しつつ、制御実行管理を行う。   The controller 2 has a control execution unit 16. The control execution unit 16 refers to the step / transition connection relation table 13, and creates and refers to the active step group management table 14 and the evaluation transition group table 15 as needed. However, control execution management is performed.

尚、以下の説明では各テーブルの名称は省略して記す。すなわち、ステップ/トランジション接続関係テーブル13は接続関係テーブル13と記し、活性ステップ群管理テーブル14は活性SPテーブル14と記し、評価トラジション群テーブル15は評価TNテーブル15と記す。   In the following description, the names of the tables are omitted. That is, the step / transition connection relationship table 13 is described as a connection relationship table 13, the active step group management table 14 is described as an active SP table 14, and the evaluation transition group table 15 is described as an evaluation TN table 15.

ここで、活性SPテーブル14及び評価TNテーブル15は、1スキャン中に評価するトランジションを限定するために、各スキャン毎に、現在活性となっているステップ群と、これら各活性ステップに応じて評価すべきトランジション群のみを記憶するテーブルである。トランジション評価部17はこの“現在評価すべき各トランジション”を評価し、制御実行部16は、この評価結果及び接続関係テーブル13や活性SPテーブル14,評価TNテーブル15を参照しつつ、次ステップへの移行判定や活性SPテーブルテーブル14、評価TNテーブル15の内容を更新していくことで、制御実行管理を行う。   Here, the active SP table 14 and the evaluation TN table 15 are evaluated according to the currently active step group and each active step for each scan in order to limit the transition to be evaluated during one scan. It is a table that stores only transition groups to be processed. The transition evaluation unit 17 evaluates the “each transition to be evaluated”, and the control execution unit 16 proceeds to the next step while referring to the evaluation result, the connection relation table 13, the active SP table 14, and the evaluation TN table 15. The control execution management is performed by updating the contents of the active SP table table 14 and the evaluation TN table 15.

SFCプログラムは一つの初期ステップをもち(JIS B3503 2.6.2「ステップ」参照)、最初にこの1つのステップが活性となり、その後、この活性状態が、後続するステップに順次伝わっていくことから、通常、SFCプログラムは、同時シーケンス分岐がない限り、活性となるステップはただ一つであり、評価すべきトランジションは、活性となっているステップに続くトランジションだけである。同時シーケンス分岐が存在した場合でも、同時に活性となるステップはたかだか分岐によって分かれたシーケンスの数と同じであり、SFCプログラム全体のステップからすればわずかな数に限られる。トランジションの評価およびその評価結果によるステップの状態変更(移行)は、そのトランジションに先行するステップが活性となっている場合にのみ有効であるので、1スキャン中に評価するトランジションを、活性となっているステップに続くものだけに限定することで、プログラムの実行を高速化することが可能である。   The SFC program has one initial step (see JIS B3503 2.6.2 “Step”). This one step becomes active first, and then this active state is sequentially transmitted to the subsequent steps. In the SFC program, there is only one active step unless there is a simultaneous sequence branch, and the transition to be evaluated is only the transition following the active step. Even when there are simultaneous sequence branches, the number of steps that are active at the same time is at most the same as the number of sequences divided by the branches, and is limited to a small number from the steps of the entire SFC program. Since the transition evaluation and the step state change (transition) based on the evaluation result are effective only when the step preceding the transition is active, the transition evaluated during one scan becomes active. It is possible to speed up the execution of the program by limiting to only those following a certain step.

図3に、上記SFC図示表現プログラム11の一例を示す。
また、図4には、接続関係テーブル13のデータ構造例を示す。
図3に示す図示表現プログラムは、従来技術で説明した“単一シーケンス”、“シーケンス選択分岐と収束”、“同時シーケンス分岐と収束”等を組み合わせたものであり、特に説明しないが、図示のS1、S2、・・・は、各ステップに割り当てられる識別番号(以下、SP番号と記す)であり、T1、T2、・・・は各トランジションに割り当てられる識別番号(以下、TN番号と記す)である。また、図4の接続関係テーブル13中のSPやTNは、各々、ステップやトランジションの略である。接続関係テーブル13は、従来技術と同様、コントローラ支援装置1内で図示表現の接続関係を調べる事から簡単に作成する事が可能である。
FIG. 3 shows an example of the SFC graphic representation program 11.
FIG. 4 shows an example of the data structure of the connection relationship table 13.
The illustrated representation program shown in FIG. 3 is a combination of “single sequence”, “sequence selection branching and convergence”, “simultaneous sequence branching and convergence”, etc., described in the prior art. S1, S2,... Are identification numbers assigned to each step (hereinafter referred to as SP numbers), and T1, T2,... Are identification numbers assigned to respective transitions (hereinafter referred to as TN numbers). It is. Further, SP and TN in the connection relation table 13 in FIG. 4 are abbreviations of steps and transitions, respectively. The connection relationship table 13 can be easily created by examining the connection relationship of the illustrated representation in the controller support device 1 as in the prior art.

図4の接続関係テーブル13は、各ステップに関するテーブルと、各トランジションに関するテーブルとから成る。各ステップに関するテーブルは、各ステップのSP番号に対応付けて、そのステップの後続のトランジションの数(後続TN数)と、これら後続TNのTN番号が格納される。例えばSP番号がS2のステップを例にすると、後続TN数は2つであり、そのTN番号はT2とT6である。また、各トランジションに関するテーブルは、各トランジションのTN番号に対応付けて、そのトランジションの前のステップの数(先行SP数)とこれら先行SPのSP番号、及びそのトランジションに後続するステップの数(後続SP数)とこれら後続SPのSP番号が格納される。例えば、TN番号がT9のトランジションを例にすると、先行SP数は2つ(S8とS10)であり、後続SP数も2つ(S9とS11)である。   The connection relation table 13 in FIG. 4 includes a table relating to each step and a table relating to each transition. The table relating to each step stores the number of transitions subsequent to that step (the number of subsequent TNs) and the TN number of these subsequent TNs in association with the SP number of each step. For example, taking the step with the SP number S2 as an example, the number of subsequent TNs is two, and the TN numbers are T2 and T6. The table relating to each transition is associated with the TN number of each transition, the number of steps before the transition (the number of preceding SPs), the SP number of these preceding SPs, and the number of steps following the transition (following). SP number) and the SP numbers of these subsequent SPs are stored. For example, taking the transition with TN number T9 as an example, the number of preceding SPs is two (S8 and S10), and the number of subsequent SPs is also two (S9 and S11).

図5(a)に活性SPテーブル14の構造例を示し、図5(b)に評価TNテーブル15の構造例を示す。これらのテーブル14,15のフォーマットは、予めコントローラ2内の不図示の記憶装置に格納されており、これらテーブル14,15に格納されるデータは、制御実行部16によって随時更新されていく。   FIG. 5A shows an example of the structure of the active SP table 14, and FIG. 5B shows an example of the structure of the evaluation TN table 15. The formats of these tables 14 and 15 are stored in advance in a storage device (not shown) in the controller 2, and the data stored in these tables 14 and 15 are updated as needed by the control execution unit 16.

図5(a)に活性SPテーブル14には、現在活性されているステップの数とこれらステップのSP番号とが、制御実行部16によって格納・更新される。更に、格納される各SP番号に対応付けてフラグが用意される。このフラグは、基本的には、図19(b)に示す“選択分岐と収束”のシーケンスの場合にのみ必要なものであり、図3の例では、S2が当該テーブル14に格納されているときのみ、必要なものである。すなわち、選択分岐では、複数あるステップのうち1つのステップのみが活性になるので、誤って2つ以上のステップが活性にならないようにする為に、上記フラグが利用される。詳しくは、後に説明する。   In the active SP table 14 shown in FIG. 5A, the number of currently active steps and the SP numbers of these steps are stored and updated by the control execution unit 16. Further, a flag is prepared in association with each stored SP number. This flag is basically necessary only in the case of the “selection branch and convergence” sequence shown in FIG. 19B, and S2 is stored in the table 14 in the example of FIG. Only when it is necessary. That is, in the selective branch, only one step among a plurality of steps is activated, and thus the above flag is used to prevent two or more steps from being activated by mistake. Details will be described later.

図5(b)の評価TNテーブル15には、現在の評価対象であるトランジションの数とこれらトランジションのTN番号とが、制御実行部16によって格納・更新される。
制御実行部16は、制御管理処理を実行する場合には、まず図6の初期化処理を実行し、その後、図7の処理を実行する。尚、図6、図7の処理をコンピュータにより実行させる為のアプリケーション・プログラムは、予めコントローラ2内の不図示の記憶装置に格納されている。コントローラ2内の不図示のCPU/MPU等がこのアプリケーション・プログラムを読出し実行することにより、図6、図7の処理が実現される。
In the evaluation TN table 15 of FIG. 5B, the number of transitions that are the current evaluation target and the TN numbers of these transitions are stored and updated by the control execution unit 16.
When executing the control management process, the control execution unit 16 first executes the initialization process of FIG. 6 and then executes the process of FIG. Note that an application program for causing the computer to execute the processes of FIGS. 6 and 7 is stored in a storage device (not shown) in the controller 2 in advance. The CPU / MPU (not shown) in the controller 2 reads out and executes the application program, thereby realizing the processes of FIGS.

ここで、コントローラ2は、通常、1つだけでなく様々な制御処理を実行するものであり、この各種制御処理毎に接続関係テーブル13が作成されて、コントローラ2内の不図示の記憶装置に記憶されている。制御実行部16は、これら各種制御処理のうち任意の制御処理を実行する際には、この制御処理に該当する接続関係テーブル13を認識したうえで上記アプリケーション・プログラムを起動し、認識した接続関係テーブル13を用いて、図6、図7の処理を実行する。   Here, the controller 2 usually executes not only one but also various control processes, and the connection relation table 13 is created for each of these various control processes and is stored in a storage device (not shown) in the controller 2. It is remembered. When executing any control process among these various control processes, the control execution unit 16 recognizes the connection relation table 13 corresponding to the control process, starts the application program, and recognizes the connection relation recognized. The processing of FIGS. 6 and 7 is executed using the table 13.

図6(a)、(b)は、初期化処理のフローチャートを示す。
図6(a)において、制御実行部16は、まず、初期ステップのSP番号を活性SPテーブル14に格納する(ステップS001)。当然、活性ステップ数は1である。尚、初期ステップのSP番号は固定的であり(例えばS1)、予め登録されているものとする。これにより、初期ステップのみが活性化し、他のステップを全て不活性化する。
6A and 6B show a flowchart of the initialization process.
6A, the control execution unit 16 first stores the SP number of the initial step in the active SP table 14 (step S001). Naturally, the number of active steps is one. It is assumed that the SP number of the initial step is fixed (for example, S1) and registered in advance. As a result, only the initial step is activated and all other steps are deactivated.

次に、評価TNテーブル15の初期化を行う(ステップS002)。このステップS002の処理の詳細フローを図6(b)に示す。図6(b)においては、まず、評価TNテーブル15をクリアし(ステップS011)、続いて、活性SPテーブル14に現在格納されているSP番号(活性SP番号;ここではS1)を取り出し(ステップS012)、接続関係テーブル13を参照して、この活性SP番号に対応する後続TN数、後続TN番号群を取得し、これら取得したデータを評価TNテーブル15に格納する(ステップS013)。活性SPテーブル14に複数のSP番号が格納されている場合には、残りのSP番号についても同様にしてステップS012,S013の処理を実行し、全てのSP番号について処理を行ったら(ステップS014,YES)当該処理を終了する。   Next, the evaluation TN table 15 is initialized (step S002). A detailed flow of the processing in step S002 is shown in FIG. In FIG. 6B, first, the evaluation TN table 15 is cleared (step S011), and then the SP number currently stored in the active SP table 14 (active SP number; here, S1) is extracted (step S011). S012) Referring to the connection relation table 13, the subsequent TN number and the subsequent TN number group corresponding to this active SP number are acquired, and these acquired data are stored in the evaluation TN table 15 (step S013). When a plurality of SP numbers are stored in the active SP table 14, the processing of steps S012 and S013 is executed in the same manner for the remaining SP numbers, and the processing is performed for all the SP numbers (step S014, S014). YES) The process ends.

尚、ステップS014の処理は、当該初期化処理の際には必要ないが、図6(b)の処理は図7(a)のステップS109の処理の際にも用いるので、ステップS014の処理も記してある。また、尚、本説明における処理フローチャートのステップ番号は、SFCプログラムのステップ番号と区別する為、全て3桁で示してある。   Note that the process of step S014 is not necessary in the initialization process, but the process of FIG. 6B is also used in the process of step S109 of FIG. It is written. Note that the step numbers in the processing flowchart in this description are all shown in three digits to distinguish them from the step numbers of the SFC program.

上記初期化処理が完了したら、その後は、1スキャン毎に、図7(a)のフローチャートの処理を実行する。ここで、図7(b)は図7(a)のステップS105のSP/TN評価処理の詳細フローチャートであり、図7(c)は図7(a)のステップS107のSP移行処理の詳細フローチャートである。   When the initialization process is completed, the process shown in the flowchart of FIG. 7A is executed for each scan thereafter. 7B is a detailed flowchart of the SP / TN evaluation process in step S105 of FIG. 7A, and FIG. 7C is a detailed flowchart of the SP transition process in step S107 of FIG. 7A. It is.

以下、図7(a)〜(c)の処理について説明するが、その際、具体例を参照して具体的な一例の説明も行う。すなわち、図8に、図3の図示表現プログラムに基づいて作成された接続関係テーブル13の例を示し、図9にはこの例に応じて各スキャン毎に活性SPテーブル14、評価TNテーブル15に格納されるSP番号、TN番号を示す。図9において、1スキャン目の初期状態では、上記初期化処理により、活性SPテーブル14にはS1、評価TNテーブル15にはT1が格納されている。更に図10、図11には、図7の処理中のテーブル14,15や次スキャン用テーブルの状態遷移を示す。以下、これらの図面も参照しながら、図7の処理について説明する。   Hereinafter, the processing of FIGS. 7A to 7C will be described, and a specific example will be described with reference to a specific example. That is, FIG. 8 shows an example of the connection relation table 13 created based on the illustrated representation program of FIG. 3, and FIG. 9 shows the active SP table 14 and the evaluation TN table 15 for each scan according to this example. The stored SP number and TN number are shown. In FIG. 9, in the initial state of the first scan, S1 is stored in the active SP table 14 and T1 is stored in the evaluation TN table 15 by the initialization process. Further, FIGS. 10 and 11 show state transitions of the tables 14 and 15 and the next scan table being processed in FIG. Hereinafter, the processing of FIG. 7 will be described with reference to these drawings.

図7(a)において、まず、現在の活性SPテーブル14のコピーを作成する(ステップS101)。このコピーは、次回スキャン時のテーブル14の初期状態を作成する為に用いられるものであり、以下、次スキャン用テーブルと呼ぶものとする。第1スキャン時における活性SPテーブル14、次スキャン用テーブル、及び評価TNテーブル15の格納データの状態遷移は、図10に示すようになる。図10において、図上左側には活性SPテーブル14の状態遷移、図上真中には次スキャン用テーブルの状態遷移、図上右側には評価TNテーブル15の状態遷移を示す。上記の通り、1スキャン目には、テーブル14にはS1が格納されており、活性SP数は1であるので、テーブル14の状態は図10(a)に示す通りであり、これをコピーすることで、図10(b)に示す次スキャン用テーブルが作成される。   In FIG. 7A, first, a copy of the current active SP table 14 is created (step S101). This copy is used to create an initial state of the table 14 at the next scan, and is hereinafter referred to as a next scan table. The state transition of the stored data in the active SP table 14, the next scan table, and the evaluation TN table 15 during the first scan is as shown in FIG. 10, the state transition of the active SP table 14 is shown on the left side of the figure, the state transition of the next scan table is shown in the middle of the figure, and the state transition of the evaluation TN table 15 is shown on the right side of the figure. As described above, since S1 is stored in the table 14 and the number of active SPs is 1 at the first scan, the state of the table 14 is as shown in FIG. Thus, the next scan table shown in FIG. 10B is created.

活性SPテーブル14における各フラグは、各スキャンの最初には不定状態にされており、全てのフラグをセット(ON)することで(ステップS102)、図10(c)に示す状態となる。このフラグは、セット状態は次の移行(活性化)対象のステップ全てが未だ移行されていない事を示し、リセット状態は移行対象ステップのうちの1つのステップへと既に移行したことを示す。たとえば図3においてS2からの移行対象ステップはS3とS6であるが、S3へ移行した場合、S2に対応するフラグをリセット状態にすることで、S6が活性化しないようにする。   Each flag in the active SP table 14 is in an indefinite state at the beginning of each scan, and when all the flags are set (ON) (step S102), the state shown in FIG. 10C is obtained. This flag indicates that the set state has not yet been transferred to all the next transition (activation) target steps, and the reset state indicates that the transition has already been made to one of the transition target steps. For example, in FIG. 3, the transition target steps from S2 are S3 and S6. However, when the process proceeds to S3, the flag corresponding to S2 is reset so that S6 is not activated.

続いて、評価TNテーブル15に格納されているTN番号のトランジション全てを評価対象として、各評価対象トランジション毎にステップS104〜S107の処理を実行する。まず、テーブル15に格納されているTN番号を1つ取り出し(ステップS104)、SP/TN評価処理を行う(ステップS105)。このステップS105の処理は、概略的には、評価対象トランジションの後続のステップへと移行するか否かを判定するものであり、その詳細フローは、図7(b)に示す通りである。すなわち、図7(b)において、まず、トランジション評価部17が、ステップS104で取り出したTN番号のトランジションの評価を行う(ステップS111)。   Subsequently, the processing of steps S104 to S107 is executed for each evaluation target transition with all the transitions of the TN number stored in the evaluation TN table 15 as evaluation targets. First, one TN number stored in the table 15 is extracted (step S104), and SP / TN evaluation processing is performed (step S105). The process of this step S105 roughly determines whether or not to move to the subsequent step of the transition to be evaluated, and its detailed flow is as shown in FIG. 7B. That is, in FIG. 7B, first, the transition evaluation unit 17 evaluates the transition of the TN number extracted in step S104 (step S111).

この評価とは、そのトランジションに関する移行条件が成立しているか否かを判定するものである。SFCに使用される全てのトランジションに関するトランジション条件が、例えば図5(c)に示すようにがメモリ上にテーブル化されている。このメモリ上のテーブルの内容は、別途存在するプログラム(PLCのI/O更新や、演算処理等を実行するプログラム)によって随時更新されている。トランジション評価部17は、このメモリ上のテーブルを参照すれば、各トランジションに関する移行条件が成立しているか否かを知ることができる。   This evaluation is to determine whether or not the transition condition regarding the transition is satisfied. Transition conditions relating to all transitions used in the SFC are tabulated on the memory as shown in FIG. 5C, for example. The contents of the table on the memory are updated at any time by a separately existing program (a program for executing PLC I / O update, arithmetic processing, etc.). The transition evaluation unit 17 can know whether or not the transition condition regarding each transition is satisfied by referring to the table on the memory.

ステップS111の評価の結果、移行条件が成立していない場合には(ステップS111,NO)場合には、SP移行なしと判定し(ステップS118)、ステップS106の処理(SP移行のあり/なしの判定)へ進む。これより、ステップS106の判定はNOとなり、そのままステップS103に戻る。   If the transition condition is not satisfied as a result of the evaluation in step S111 (step S111, NO), it is determined that there is no SP transition (step S118), and the processing in step S106 (whether or not there is SP transition). Proceed to (Judgment). Accordingly, the determination in step S106 is NO, and the process returns to step S103 as it is.

一方、ステップS111の評価の結果、移行条件が成立していた場合には(ステップS111,YES)、接続関係テーブル13から、当該評価対象のトランジションに対応する先行SP番号群33から、最初の先行SP番号を取り出す(ステップS112)。そして、取り出した先行SP番号を用いて活性SPテーブル14を検索して、SP番号が一致するレコードを求め(ステップS113)、そのフラグを参照して、フラグがセット状態かリセット状態かを判定する(ステップS114)。フラグがリセット状態(OFF)であれば(ステップS114,NO)、そのステップに関しては、現在評価中のトランジション以前のトランジション評価によって既に次のステップへの移行が行われているので、現在評価中のトランジションによってはステップの移行ができないと判定する(ステップS118)。   On the other hand, if the transition condition is satisfied as a result of the evaluation in step S111 (step S111, YES), the first preceding leading number from the preceding SP number group 33 corresponding to the transition to be evaluated is determined from the connection relation table 13. The SP number is extracted (step S112). Then, the active SP table 14 is searched using the extracted preceding SP number to obtain a record having the same SP number (step S113), and the flag is referred to to determine whether the flag is set or reset. (Step S114). If the flag is in the reset state (OFF) (step S114, NO), since the transition to the next step has already been performed by the transition evaluation before the transition currently being evaluated, the current evaluation is being performed. It is determined that the transition of the step cannot be performed depending on the transition (step S118).

一方、フラグがセット状態(ON)であったならば(ステップS114,YES)、上記判定を残りの先行ステップ全てについて行う。すなわち、先行SP番号群33から次の先行SP番号を取り出す(ステップS115)。次の先行SP番号が無ければ、全ての先行ステップについて処理を完了したことになるので(ステップS116,YES)、SP移行ありと判定する(ステップS117)。先行SP番号群33の中に1つでもフラグがリセット状態である先行ステップが存在した場合には、SP移行なし(ステップS118)と判定されるので、SP移行あり(ステップS117)と判定されるのは、先行SP番号群33の全ての先行ステップについてフラグがセット状態である場合のみとなる。   On the other hand, if the flag is in the set state (ON) (step S114, YES), the above determination is performed for all remaining preceding steps. That is, the next preceding SP number is extracted from the preceding SP number group 33 (step S115). If there is no next preceding SP number, the processing has been completed for all preceding steps (step S116, YES), so it is determined that there is an SP transition (step S117). If there is at least one preceding step whose flag is reset in the preceding SP number group 33, it is determined that there is no SP transition (step S118), so it is determined that there is SP transition (step S117). Is only when the flags are set for all preceding steps in the preceding SP number group 33.

以上説明した図7(b)の処理は、上記具体例では、テーブル14、15の状態は図10(c)、(d)に示す通りであるので、評価対象のトランジションはT1であり、これに対応する先行SP番号群33はS1のみであり、図10(c)に示すようにS1のフラグはセット状態であるので、SP移行ありと判定されることになる。   In the processing shown in FIG. 7B described above, the state of the tables 14 and 15 is as shown in FIGS. 10C and 10D in the above specific example. Therefore, the transition to be evaluated is T1. Since the preceding SP number group 33 corresponding to is only S1, and the flag of S1 is set as shown in FIG. 10C, it is determined that there is SP transition.

上記図7(b)の処理により、SP移行なしと判定された場合には(ステップS106,NO)、そのままステップS103の処理に戻り、SP移行ありと判定された場合には(ステップS106,YES)、ステップS107のSP移行処理に進む。   If it is determined that there is no SP transition by the process of FIG. 7B (step S106, NO), the process returns to step S103 as it is, and if it is determined that there is an SP transition (step S106, YES). ), The process proceeds to the SP transition process in step S107.

このステップS107の処理の詳細フローを図7(c)に示す。
図7(c)において、まず、接続関係テーブル13から、当該処理対象のトランジションのTN番号に対応する先行SP番号群33、後続SP番号群35を取り出し(ステップS121)、活性SPテーブル14において先行SP番号群33にある各SP番号に対応するフラグをリセットする(ステップS122)。上記一例では、先行SP番号群33にはS1のみが存在するので、図10(e)に示すように、活性SPテーブル14においてS1のフラグがリセットされる。次に、上記ステップS101で作成してあった次スキャン用テーブルから、先行SP番号群33にある各SP番号のレコードを削除する(ステップS123)。上記の例ではS1のレコードが削除されるので、次スキャン用テーブルは図10(f)に示すように空となる。続いて、次スキャン用テーブルに、上記後続SP番号群35にある各SP番号を追加する(ステップS124)。上記一例では、後続SP番号群35にはS2とS7があるので、図10(g)に示すように、次スキャン用テーブルにS2、S7のレコードが追加されると共に、その活性SP数を‘2’とする。
A detailed flow of the processing in step S107 is shown in FIG.
7C, first, the preceding SP number group 33 and the succeeding SP number group 35 corresponding to the TN number of the transition to be processed are extracted from the connection relation table 13 (step S121), and the preceding SP number group in the active SP table 14 is extracted. The flag corresponding to each SP number in the SP number group 33 is reset (step S122). In the above example, since only S1 exists in the preceding SP number group 33, the flag of S1 is reset in the active SP table 14 as shown in FIG. Next, the record of each SP number in the preceding SP number group 33 is deleted from the next scan table created in step S101 (step S123). In the above example, since the record of S1 is deleted, the next scan table becomes empty as shown in FIG. Subsequently, each SP number in the subsequent SP number group 35 is added to the next scan table (step S124). In the above example, since the succeeding SP number group 35 includes S2 and S7, as shown in FIG. 10G, records S2 and S7 are added to the next scan table, and the number of active SPs is changed to ' 2 ′.

尚、後続SP番号の追加処理の際には、次スキャン用テーブルに同じSP番号が複数存在しないようにするため、すでにテーブル中に同じSP番号が存在する場合には、追加しないようにする。   It should be noted that when the subsequent SP number is added, in order to prevent the same SP number from existing in the next scan table, it is not added if the same SP number already exists in the table.

以上のSP移行処理が終わったら、ステップS103に戻り、評価対象のトランジションが未だある場合には(ステップS103,NO)、評価TNテーブル15から次の評価対象のTN番号を取り出し(ステップS104)、上記と同様にステップS105〜S107の処理を実行し、全ての評価対象トランジションについて評価が完了したら(ステップS103,YES)、ステップS108の処理に進む。ステップS108では、次スキャン用テーブルによって、活性SPテーブル14の内容を更新する(上書きコピーする)。これによって、上記一例では、テーブル14は図10(h)に示す状態となる。つまり、図10(g)に示す内容が上書きコピーされ、S1に関するデータは消えている。   When the above SP migration processing is completed, the process returns to step S103, and if there is still an evaluation target transition (NO in step S103), the next evaluation target TN number is extracted from the evaluation TN table 15 (step S104). Similarly to the above, the process of steps S105 to S107 is executed, and when the evaluation is completed for all the transitions to be evaluated (step S103, YES), the process proceeds to step S108. In step S108, the contents of the active SP table 14 are updated (overwritten copy) with the next scan table. Thus, in the above example, the table 14 is in the state shown in FIG. That is, the contents shown in FIG. 10G are overwritten and copied, and the data regarding S1 disappears.

最後に、評価TNテーブル15を次のスキャン用に初期化する(ステップS109)。この処理は、図6(b)の処理と同じである。上記一例では、テーブル14にS2,S7が格納されているので、S2の後続TN番号群23はT2、T6であり、S7の後続TN番号群23はT8であるので、ステップS109の処理によって、テーブル15の内容は図10(i)に示す通りとなる。   Finally, the evaluation TN table 15 is initialized for the next scan (step S109). This process is the same as the process of FIG. In the above example, since S2 and S7 are stored in the table 14, the subsequent TN number group 23 of S2 is T2 and T6, and the subsequent TN number group 23 of S7 is T8. The contents of the table 15 are as shown in FIG.

以上、ステップS108、S109により、テーブル14,15の内容が次スキャン用に再構成される。
以上説明したようにして、1スキャン分の処理が実行される。
As described above, the contents of the tables 14 and 15 are reconfigured for the next scan in steps S108 and S109.
As described above, processing for one scan is executed.

次スキャンに入ったら、これら再構成したテーブル14、15を用いて、再び図7の処理を実行する。
上記一例に沿って、2スキャン目の処理について説明する。
When the next scan is started, the process shown in FIG. 7 is executed again using the reconstructed tables 14 and 15.
The process of the second scan will be described along the above example.

図11は、2スキャン目の処理中の活性SPテーブル14と次スキャン用テーブルのデータ格納内容の状態遷移を示す。図上左側にはテーブル14の状態遷移、図上右側には次スキャン用テーブルの状態遷移を示す。また、図11には示さないが、テーブル15の内容は図10(i)に示した通りである。   FIG. 11 shows the state transition of the data storage contents of the active SP table 14 and the next scan table being processed in the second scan. The left side of the figure shows the state transition of the table 14, and the right side of the figure shows the state transition of the next scan table. Although not shown in FIG. 11, the contents of the table 15 are as shown in FIG.

2スキャン目では、活性SPテーブル14の内容は、図11(a)に示す通り、上記図10(h)の状態から始まる。これをステップS101でコピーすることで、次スキャン用テーブルは図11(b)に示す通りとなる。更に、ステップS102によって、テーブル14の各フラグは、図11(c)の通り、全てセット状態となる。   In the second scan, the content of the active SP table 14 starts from the state of FIG. 10 (h) as shown in FIG. 11 (a). By copying this in step S101, the next scan table becomes as shown in FIG. Further, in step S102, all the flags in the table 14 are set as shown in FIG.

そして、まず、T2が評価対象となり、仮にステップS111の判定がYESであったとすると、該当するSP番号はS2のみであり、図11(c)の通りS2のフラグはセット状態であるので、SP移行あり(ステップS117)と判定し、図7(c)に示すSP移行処理を実行することになる。これより、まず、ステップS121で、先行SP番号ととしてS2、後続SP番号としてS3が取り出され、ステップS122で、テーブル14におけるS2のフラグがリセットされることで、テーブル14は図11(d)に示す状態となる。また、ステップS123によって次スキャン用テーブルからS2が削除され、図11(e)に示す状態となる。更に、ステップS124によってS3が次スキャン用テーブルに追加され、図11(f)に示す状態となる。つまり、S2からS3へ移行することになる。   First, if T2 is an evaluation target and the determination in step S111 is YES, the corresponding SP number is only S2, and the flag of S2 is set as shown in FIG. It is determined that there is a migration (step S117), and the SP migration process shown in FIG. 7C is executed. Accordingly, first, in step S121, S2 is extracted as the preceding SP number and S3 is extracted as the subsequent SP number. In step S122, the flag of S2 in the table 14 is reset, so that the table 14 is changed to FIG. It will be in the state shown in In step S123, S2 is deleted from the next scan table, and the state shown in FIG. Further, S3 is added to the next scan table in step S124, and the state shown in FIG. That is, the process proceeds from S2 to S3.

以上でT2を対象とする処理が終了したら、ステップS103に戻ると、未だ評価対象が残っている(T6とT8)ので、今度はT6を対象として処理を実行するが、S2からの移行は、S3とS6の何れか一方への選択分岐であるので、上記の通り既にS3へ移行されている以上、S6にも移行されることになってはならない。この為に上記フラグが用意されているのであり、上記ステップS122でS2のフラグがリセットされていることから、S6には移行しないようになる。すなわち、T6を対象とする処理において、図7(b)に示す処理は、まず、ステップS112でS2が取り出され、ステップS113、S114の処理を実行すると、上記の通りS2のフラグはリセット状態となっているので、S114の判定はNOとなり、SP移行なし(ステップS118)と判定されるので、ステップS107のSP移行処理は実行されることなく、ステップS103に戻り、今度はT8を対象とする処理を実行する。   When the process for T2 is completed as described above, the process returns to step S103, and the evaluation object still remains (T6 and T8), so this time the process is executed for T6. Since this is a selective branch to one of S3 and S6, it should not be transferred to S6 as long as it has already been transferred to S3 as described above. For this reason, the flag is prepared. Since the flag of S2 is reset in step S122, the process does not proceed to S6. That is, in the process for T6, in the process shown in FIG. 7B, first, S2 is extracted in step S112, and when the processes of steps S113 and S114 are executed, the flag of S2 is set to the reset state as described above. Therefore, the determination in S114 is NO and it is determined that there is no SP transition (step S118). Therefore, the SP transition processing in step S107 is not executed, and the process returns to step S103, and this time T8 is targeted. Execute the process.

T8に対応する先行SP番号はS7のみであり、S7に関するステップS114の判定はYESとなり、S122によってS7のフラグはリセットされるので、活性SPテーブル14は図11(g)に示す状態となる。また、次スキャン用テーブルは、ステップS123によりS7が削除されるので図11(h)に示す状態となり、T8の後続SP番号群35はS8とS10であることから、次のステップS124により、図11(i)に示す状態となる。これが、3スキャン目用のテーブル14の初期状態となる。   The preceding SP number corresponding to T8 is only S7, the determination in step S114 regarding S7 is YES, and the flag of S7 is reset by S122, so the active SP table 14 is in the state shown in FIG. The next scan table is in the state shown in FIG. 11H because S7 is deleted in step S123, and the subsequent SP number group 35 of T8 is S8 and S10. 11 (i). This is the initial state of the table 14 for the third scan.

3スキャン目以降については、図9に、各スキャンの最初におけるテーブル14、15の状態を示すものとし、特に説明しない。
以上説明したように、本例のプログラマブル・コントローラ・システムによれば、ステップ/トランジション接続関係テーブル13だけでなく、活性ステップ群管理テーブル14、評価トランジション群テーブル15を用いてこれらを随時更新していくことで、各スキャン毎に、評価すべきトランジションのみを評価対象として処理実行できるので、大きなSFCプログラムを実行する場合でも、高速なスキャン実行を実現することができる。また、“選択分岐と収束”のシーケンスの処理実行において、誤って2つ以上のステップが活性にならないようにすることができる。
For the third and subsequent scans, FIG. 9 shows the state of the tables 14 and 15 at the beginning of each scan, and is not specifically described.
As described above, according to the programmable controller system of this example, not only the step / transition connection relation table 13 but also the active step group management table 14 and the evaluation transition group table 15 are updated as needed. Accordingly, for each scan, only the transition to be evaluated can be processed and evaluated, so that even when a large SFC program is executed, high-speed scan execution can be realized. It is also possible to prevent two or more steps from being erroneously activated in the execution of the “selective branch and convergence” sequence.

以上説明した実施例を、第1の実施例とし、以下、第2の実施例について説明する。
ここで、第1の実施例では、上記の通り、通常のSFCプログラムでは、プログラム全体においてある瞬間において活性化しているステップは、同時シーケンス分岐がない限り、ただ一つである。しかし、この様な通常の手法に限らず、同時シーケンス分岐がなくても複数のステップが同時に活性化することを許容する手法が存在する。
The embodiment described above is the first embodiment, and the second embodiment will be described below.
Here, in the first embodiment, as described above, in the normal SFC program, there is only one step activated at a certain moment in the entire program unless there is a simultaneous sequence branch. However, the present invention is not limited to such a normal method, and there is a method that allows a plurality of steps to be activated simultaneously even if there is no simultaneous sequence branch.

この説明を簡単にする為に、図12に、単一シーケンスが直列に並ぶSFC図示表現プログラム例を示す。このプログラムは、図12(a)に示す通り、S1→S2→S3→S4の順に並んでいる。尚、各ステップ間には当然トランジションがあるが、ここでは無視して説明する。   In order to simplify this explanation, FIG. 12 shows an example of an SFC graphical representation program in which a single sequence is arranged in series. This program is arranged in the order of S1, S2, S3, and S4 as shown in FIG. Of course, there is a transition between each step, but it will be ignored here.

上記第1の実施例では、このプログラム実行の際には、図12(b)〜(e)に示すように、S1→S2→S3→S4の順に活性化されていく。すなわち、単一シーケンスのみであれば、常に1つのステップのみが活性状態となっている。尚、図上、黒丸が記してあるステップが、活性状態のステップである。   In the first embodiment, when this program is executed, activation is performed in the order of S1, S2, S3, and S4 as shown in FIGS. 12B to 12E. That is, if there is only a single sequence, only one step is always active. In the figure, the steps marked with black circles are the active steps.

これに対して、第2の実施例では、図12(f)〜(h)に示すように、単一シーケンスのみであっても複数ステップが同時に活性状態となることを、許容している。これは、例えば、工程管理するプログラム等に適用される。すなわち、製造ライン等において原材料投入から中間品を経て製品完成までを複数の工程により行うことはよく知られていることであり、S1〜S4は例えば第1工程〜第4工程に対応するものとする。図12(f)〜(h)は、例えば第1ロットを投入して第1工程→第2工程→第3工程と作業を実行していく途中で、第2ロットも第1工程に投入して、第1ロットの後を追うようにして同様の作業を実行していくことに相当する。   On the other hand, in the second embodiment, as shown in FIGS. 12F to 12H, a plurality of steps are allowed to be simultaneously activated even in a single sequence. This is applied to, for example, a program for managing processes. That is, it is well known to perform a plurality of processes from raw material input to intermediate product completion in a production line or the like, and S1 to S4 correspond to, for example, the first to fourth processes. To do. 12 (f) to 12 (h), for example, in the middle of performing the operation of the first process → the second process → the third process by introducing the first lot, the second lot is also input to the first process. This is equivalent to performing the same work as following the first lot.

尚、上記のように同時シーケンス分岐がなくても許容される複数ステップの同時実行を、“ステップの追いかけ実行”と呼ぶものとする。
第2の実施例では、まず、図13に示すように、SFCプログラムの先頭のステップは、スキャン毎に常時活性状態にする。これにより、先頭ステップ直後のトランジションの条件が成立すれば、シーケンス中に既に別の活性ステップがあっても、新たにステップが活性化することを可能にする。また、SFCプログラムの最後のステップは、その直前の活性ステップから制御が移行しても、常に各スキャンの最後に非活性となるステップとする。
Note that the simultaneous execution of a plurality of steps which is allowed even if there is no simultaneous sequence branch as described above is referred to as “step chase execution”.
In the second embodiment, first, as shown in FIG. 13, the head step of the SFC program is always activated every scan. As a result, if the transition condition immediately after the first step is satisfied, even if there is another active step in the sequence, a new step can be activated. Further, the last step of the SFC program is a step that is always inactive at the end of each scan even if control is transferred from the immediately preceding active step.

第2の実施例の説明におけるSFCプログラムの具体例を、図15に示す。図15に示す具体例は、上記図3とほぼ同じであるが、図3では最後のトランジションT5の後には先頭ステップのS1へとループしていたが、図15では上記の通り最後に常時非活性のステップを設ける必要がある為、図示の通り、トランジションT5の後には常時非活性のステップであるS12がある。また、図15の示すSFC図示表現プログラムに対応する接続関係テーブルの具体例を図16に示す。これも図8に示す具体例とほぼ同じであり、相違点は、上記S12があることから、SP番号21が‘S12’、後続TN数22が‘0’のレコードが加わっており、またT5に対応する後続SP番号群35がS12になっている点である。   A specific example of the SFC program in the description of the second embodiment is shown in FIG. The specific example shown in FIG. 15 is almost the same as FIG. 3, but in FIG. 3, after the last transition T5, it loops to the first step S1, but in FIG. Since it is necessary to provide an active step, as shown in the figure, after the transition T5, there is a step S12 that is always inactive. FIG. 16 shows a specific example of a connection relationship table corresponding to the SFC graphic representation program shown in FIG. This is also almost the same as the specific example shown in FIG. 8, and the difference is that there is S12, so that a record with SP number 21 of “S12” and subsequent TN number 22 of “0” is added, and T5 The subsequent SP number group 35 corresponding to is S12.

また各テーブル14,15のデータ構造は、図5(a)、(b)に示したものと同じである。但し、各スキャンにおいてテーブル14,15に格納されるデータは、図17に示す通りとなる。また、上記アプリケーション・プログラムにより実行される処理は、基本的には図7(a)、(c)と図14に示す通りである。すなわち、第1の実施例と異なるのは、基本的には、SP/TN評価処理の詳細フローであり、この処理を図14に示す。よって、図7(a)、(c)の説明は(後述する相違点を除いて)ここでは省略し、図14について説明する。これは、換言すれば、第2の実施例は、第1の実施例と同様にSFCプログラムの高速実行を実現するものであるが、これを“ステップの追いかけ実行”を許容しながらも実現できるものである。但し、上記の通り、最後のステップであるS12に関しては、あるスキャンにおいてもし活性状態となった場合には、そのスキャンの最後で非活性とする必要があるので、図7(a)のステップS109の処理の後に、テーブル14を参照して、もしS12がテーブル14に格納されていたならば、これを削除する処理が加わる。   The data structures of the tables 14 and 15 are the same as those shown in FIGS. 5 (a) and 5 (b). However, data stored in the tables 14 and 15 in each scan is as shown in FIG. The processing executed by the application program is basically as shown in FIGS. 7A and 7C and FIG. That is, the difference from the first embodiment is basically a detailed flow of the SP / TN evaluation process, which is shown in FIG. Therefore, the description of FIGS. 7A and 7C will be omitted here (except for the differences described later), and FIG. 14 will be described. In other words, the second embodiment achieves high-speed execution of the SFC program as in the first embodiment, but this can be realized while allowing “step-following execution”. Is. However, as described above, regarding S12 which is the last step, if it becomes active in a certain scan, it is necessary to deactivate it at the end of the scan, so step S109 in FIG. After the above processing, referring to the table 14, if S12 is stored in the table 14, processing for deleting it is added.

図14に示す処理のうち、ステップS201、S202、S203、S204、及びS209の処理は、それぞれ、図7(b)のステップS111、S112とS115、S113、S114の処理と略同様であり、ここでは特に説明しない。図14では、図7(b)の処理に、ステップS205〜S208の処理が加わっている。これは上記“ステップの追いかけ実行”において、後続のものが、先行するものに追いついたりしないようにする為の処理である。例えば上記図12(f)〜(h)の例で言うと、第1ロットに係わる活性ステップがS3のときに何らかの理由により停滞した状態で、第2ロットに係わる活性ステップがS1→S2→S3と移行してきて追いついてしまうという事態は、避けなければならない。これより、第2ロットに係わる活性ステップがS2のときに、仮に「SP移行あり」と判定されるべき状況になっても、第1ロットに係わる活性ステップがS4に移行しない限り、「SP移行なし」と判定されるようにする為の処理が、ステップS205〜S208の処理である。   Of the processes shown in FIG. 14, the processes of steps S201, S202, S203, S204, and S209 are substantially the same as the processes of steps S111, S112 and S115, S113, and S114 of FIG. Then, I will not explain in particular. In FIG. 14, the processes of steps S205 to S208 are added to the process of FIG. This is a process for preventing the succeeding one from catching up with the preceding one in the “step chase execution”. For example, referring to the examples of FIGS. 12 (f) to 12 (h), when the activation step relating to the first lot is S3, the activation step relating to the second lot is S1 → S2 → S3 while stagnating for some reason. You must avoid the situation where you have caught up and caught up. As a result, when the activation step related to the second lot is S2, even if it is determined that “SP transfer is present”, unless the activation step related to the first lot shifts to S4, “SP transfer” Processing for determining “None” is processing in steps S205 to S208.

すなわち、ステップS204の判定で、先行SP番号に対応するフラグがセット状態であると判定された場合(ステップS204,YES)、まず、接続関係テーブル13を参照して、現在の処理対象のトランジションのTN番号に対応する後続SP番号群35を取り出し、続いて、取り出した各後続SP番号を用いて活性SPテーブル14又は次スキャン用テーブルを検索して(ステップS206)、後続SP番号群35にあるSP番号の何れか1つでも活性SPテーブル14又は次スキャン用テーブルに登録されていた場合には(ステップS207,YES)、「SP移行なし」と判定する(ステップS211)。後続SP番号群35の何れも、次スキャン用テーブルに登録されていない場合には、ステップS209の処理に進み、全ての先行SPについて評価するまで、上述した処理を繰り返し実行する。   That is, if it is determined in step S204 that the flag corresponding to the preceding SP number is set (YES in step S204), first, the connection relation table 13 is referred to and the current process target transition is determined. The subsequent SP number group 35 corresponding to the TN number is extracted, and then the active SP table 14 or the next scan table is searched using each extracted subsequent SP number (step S206). If any one of the SP numbers is registered in the active SP table 14 or the next scan table (YES in step S207), it is determined that “no SP migration” (step S211). If none of the subsequent SP number group 35 is registered in the next scan table, the process proceeds to step S209, and the above-described process is repeatedly executed until all the preceding SPs are evaluated.

ステップS205〜S208の処理について、図17に示す具体例を用いて説明する。まず、図17におけるテーブル14のデータ格納内容が図9のそれと異なる点は、全てのスキャンにおいて必ずS1が含まれている点である。これは、図13で説明したように、本例では先頭ステップは常時活性化されるからである。これより、本例では、上記ステップS124の処理が、第1の実施例とは多少異なる。すなわち、ステップS124では、次スキャン用テーブルに後続SP番号群が追加されるが、更に必ずS1も追加する。これより、例えば2スキャン目を例にすると、図9ではS2とS7であったが更にS1が加わっている。   The processing in steps S205 to S208 will be described using a specific example shown in FIG. First, the data storage content of the table 14 in FIG. 17 is different from that in FIG. 9 in that S1 is always included in all scans. This is because the first step is always activated in this example, as described with reference to FIG. Thus, in this example, the process of step S124 is slightly different from that of the first example. That is, in step S124, the subsequent SP number group is added to the next scan table, but S1 is also necessarily added. Thus, for example, in the second scan, S2 and S7 in FIG. 9 are added, but S1 is further added.

また、これより、評価トランジション群テーブル15の内容も、図9とは異なる。例えば2スキャン目を例にすると、1スキャン目の最後にステップS109の処理を行う際には既にテーブル14の内容は上記S1、S2、S7となっているので、これらに対応する後続TN番号は、T1、T2、T6、T8となる。   Further, the contents of the evaluation transition group table 15 are also different from those in FIG. For example, taking the second scan as an example, when the process of step S109 is performed at the end of the first scan, the contents of the table 14 are already S1, S2, and S7. , T1, T2, T6, and T8.

尚、図17に示す「後続SP番号」は、テーブルに格納されたデータを意味するものではなく、ステップS205で取り出す番号を意味する。
上記2スキャン目を例にすると、T1、T2、T6、T8が評価対象となるが、もし先頭(T1)から順に処理すると、次スキャン用テーブルは上記テーブル14の内容がコピーされたときの状態、すなわちS1,S2,S7が格納された状態となっているので、ステップS205でT1の後続SP番号群としてS2、S7が取り出され、ステップS206の判定を行うと、判定YESとなり、SP移行なしとなってしまう。これは、図12(f)〜(h)に示す例のように処理したい場合にはよいが、間を空けずに連続して移行させたい場合には、最後尾(T8)から順に処理を行うようにする。
Note that the “subsequent SP number” shown in FIG. 17 does not mean the data stored in the table, but the number extracted in step S205.
Taking the second scan as an example, T1, T2, T6, and T8 are subject to evaluation. If processing is performed sequentially from the top (T1), the next scan table is the state when the contents of the table 14 are copied. That is, since S1, S2, and S7 are stored, S2 and S7 are extracted as the subsequent SP number group of T1 in step S205, and if the determination in step S206 is made, the determination becomes YES and there is no SP transition. End up. This is good when processing is desired as in the example shown in FIGS. 12 (f) to 12 (h). However, when it is desired to move continuously without a gap, processing is performed in order from the tail (T8). To do.

ここでは、図12(f)〜(h)に示す例のように処理するものとすると、まず、T1に関する処理は、上記の通りSP移行なしと判定され、T1に関する処理が終わった時点では、図11(c)、(b)に近い状態となっている(但し、S1のデータは残っているが、ここでは無視する)。その後の処理は、図11(d)〜(i)に示す通りとなる。すなわち、T2の評価処理では、後続SP番号群はS3であり、ステップS206の判定はNOとなるので、SP移行ありと判定される。T6に関しては、ステップS204の判定がNOとなるので、SP移行なしと判定される。T8に関しては、後続SP番号群がS8、S10であり、このときの次スキャン用テーブルの内容は図11(f)に示す通りS3とS7であるので、ステップS206の判定はNOとなるので、SP移行ありと判定される。   Here, assuming that processing is performed as in the example shown in FIGS. 12F to 12H, first, the processing related to T1 is determined to have no SP transition as described above, and when the processing related to T1 ends, It is in a state close to FIGS. 11C and 11B (however, the data of S1 remains, but is ignored here). Subsequent processing is as shown in FIGS. That is, in the evaluation process of T2, the subsequent SP number group is S3, and the determination in step S206 is NO, so it is determined that there is SP transition. Regarding T6, since the determination in step S204 is NO, it is determined that there is no SP transition. Regarding T8, the subsequent SP number group is S8 and S10, and the contents of the next scan table at this time are S3 and S7 as shown in FIG. 11 (f), so the determination in step S206 is NO. It is determined that there is SP transition.

そして、次スキャン用テーブルの内容は図11(i)に示す通りとなり、これにS1が加わって3スキャン目のテーブル14の初期状態が作成されると、3スキャン目でのT1の評価では、次スキャン用テーブルにはS1、S3、S8、S10が格納されており、ステップS205でT1の後続SP番号群としてS2、S7が取り出されるので、ステップS206の判定はNOとなり、SP移行ありと判定される。   Then, the contents of the next scan table are as shown in FIG. 11 (i). When S1 is added to this and the initial state of the table 14 for the third scan is created, the evaluation of T1 at the third scan is as follows. Since S1, S3, S8, and S10 are stored in the next scan table, and S2 and S7 are extracted as the subsequent SP number group of T1 in step S205, the determination in step S206 is NO and it is determined that there is an SP transition. Is done.

最後に、上記コントローラ支援装置1のハードウェア構成例を図18に示す。
同図に示すコンピュータ100は、CPU101、メモリ102、入力部103、出力部104、記憶部105、記録媒体駆動部106、及びネットワーク接続部107を有し、これらがバス108に接続された構成となっている。同図に示す構成は一例であり、これに限るものではない。
Finally, FIG. 18 shows a hardware configuration example of the controller support device 1.
A computer 100 shown in the figure includes a CPU 101, a memory 102, an input unit 103, an output unit 104, a storage unit 105, a recording medium drive unit 106, and a network connection unit 107, which are connected to a bus 108. It has become. The configuration shown in the figure is an example, and the present invention is not limited to this.

CPU101は、当該コンピュータ100全体を制御する中央処理装置である。
メモリ102は、プログラム実行、データ更新等の際に、記憶部105(あるいは可搬型記録媒体109)に記憶されているプログラムあるいはデータを一時的に格納するRAM等のメモリである。CPU101は、メモリ102に読み出したプログラム/データを用いて、上述してあるSFC図示表現プログラムの作成支援機能や、これをステップ/トランジション接続関係テーブル13へと変換する機能等を実行する。
The CPU 101 is a central processing unit that controls the entire computer 100.
The memory 102 is a memory such as a RAM that temporarily stores a program or data stored in the storage unit 105 (or the portable recording medium 109) during program execution, data update, or the like. The CPU 101 uses the program / data read out to the memory 102 to execute the above-described SFC graphic representation program creation support function, a function of converting this into the step / transition connection relation table 13, and the like.

出力部104は、例えばディスプレイ等であり、ユーザがSFC図示表現プログラムを作成する際には、その入力に応じた図示表現プログラムを表示する。
入力部103は、例えば、キーボード、マウス等であり、ユーザはこれらを操作して、上記SFC図示表現プログラムの入力操作等を行う。
The output unit 104 is a display or the like, for example. When the user creates an SFC graphical representation program, the graphical representation program corresponding to the input is displayed.
The input unit 103 is, for example, a keyboard, a mouse, and the like, and the user operates these to perform an input operation of the SFC illustrated expression program.

ネットワーク接続部107は、上記通信線3と接続しており、この通信線3を介してコントローラ2との間でコマンド/データ等の送受信を行う。あるいは、ネットワーク接続部107は、更に例えばイントラネットやインターネット等のネットワークに接続して、他の情報処理装置とのコマンド/データ送受信を行うものであってもよい。   The network connection unit 107 is connected to the communication line 3 and transmits / receives commands / data and the like to / from the controller 2 via the communication line 3. Alternatively, the network connection unit 107 may be further connected to a network such as an intranet or the Internet to perform command / data transmission / reception with another information processing apparatus.

記憶部105は、例えばハードディスク等であり、上述した各種機能を上記CPU101により実行させるための所定のアプリケーション・プログラムやデータ等が格納される。 あるいは、これらプログラム/データは、可搬型記録媒体109に記憶されているものであってもよい。この場合、可搬型記録媒体109に記憶されているプログラム/データは、記録媒体駆動部106によって読み出される。可搬型記録媒体109とは、例えば、FD(フレキシブル・ディスク)109a、CD−ROM109b、その他、DVD、光磁気ディスク等である。   The storage unit 105 is, for example, a hard disk or the like, and stores predetermined application programs and data for causing the CPU 101 to execute the various functions described above. Alternatively, these programs / data may be stored in the portable recording medium 109. In this case, the program / data stored in the portable recording medium 109 is read by the recording medium driving unit 106. The portable recording medium 109 is, for example, an FD (flexible disk) 109a, a CD-ROM 109b, a DVD, a magneto-optical disk, or the like.

あるいは、また、上記プログラム/データは、ネットワーク接続部107により接続しているネットワークを介して、他の装置内に記憶されているものをダウンロードするものであってもよい。あるいは、更に、インターネットを介して、外部の他の装置内に記憶されているものをダウンロードするものであってもよい。   Alternatively, the program / data may be downloaded from another apparatus via a network connected by the network connection unit 107. Or you may download further what was memorize | stored in the other external apparatus via the internet.

また、コントローラ2のハードウェア構成については、特に図示しないが、例えばCPU/MPUや記憶部(ROM、RAM、フラッシュメモリ等)や通信部等を備えている。通信部は、上記通信線3と接続して上記コントローラ支援装置1と通信を行う。例えば上記接続関係テーブル13をダウンロードする。また、通信部は、不図示の制御ネットワークにも接続しており、不図示の各種制御対象機器との間でデータ送受信を行う。   The hardware configuration of the controller 2 is not particularly shown, but includes, for example, a CPU / MPU, a storage unit (ROM, RAM, flash memory, etc.), a communication unit, and the like. The communication unit is connected to the communication line 3 and communicates with the controller support device 1. For example, the connection relation table 13 is downloaded. The communication unit is also connected to a control network (not shown), and performs data transmission / reception with various control target devices (not shown).

コントローラ2が備える上記記憶部には、図6、図7(a)〜(c)、図14等に示す処理を、CPU/MPUにより実行させる為のアプリケーション・プログラムが格納されている。また、当該記憶部には、上記ダウンロードした接続関係テーブル13が格納される。また、図5に示すテーブル14,15のフォーマットも格納されており、処理中にこれらテーブル14、15にデータが格納・更新されていく。   The storage unit included in the controller 2 stores an application program for causing the CPU / MPU to execute the processes shown in FIGS. 6, 7A to 7C, FIG. 14 and the like. In addition, the downloaded connection relation table 13 is stored in the storage unit. Further, the formats of the tables 14 and 15 shown in FIG. 5 are also stored, and data is stored and updated in these tables 14 and 15 during processing.

また、本発明は、上記本発明の各種処理をコンピュータ上で実現するプログラムを記録した可搬型記憶媒体として構成できるだけでなく、当該プログラム自体として構成することもできる。   In addition, the present invention can be configured not only as a portable storage medium recording a program for realizing the various processes of the present invention on a computer, but also as the program itself.

本例のプログラマブル・コントローラ・システムの概略構成図である。It is a schematic block diagram of the programmable controller system of this example. プログラマブル・コントローラ・システムの機能ブロック図である。It is a functional block diagram of a programmable controller system. SFC図示表現プログラムの一例を示す図である。It is a figure which shows an example of a SFC illustration representation program. ステップ/トランジション接続関係テーブルのデータ構造例を示す図である。It is a figure which shows the example of a data structure of a step / transition connection relationship table. (a)は活性ステップ群管理テーブル、(b)は評価トランジション群テーブル、(c)はトランジション成立条件テーブルの一例を示す図である。(A) is an active step group management table, (b) is an evaluation transition group table, (c) is a figure which shows an example of a transition formation condition table. (a)、(b)は、制御処理における初期化処理のフローチャート図である。(A), (b) is a flowchart figure of the initialization process in a control process. 制御処理フローチャート図であり、(a)は全体フロー、(b)、(c)はそのステップS105、S107の詳細フローである。It is a control process flowchart figure, (a) is a whole flow, (b), (c) is the detailed flow of step S105, S107. 図3の図示表現プログラム例に基づいて作成された接続関係テーブルの例である。FIG. 4 is an example of a connection relationship table created based on the illustrated representation program example of FIG. 3. FIG. 各スキャン毎に活性ステップ群管理テーブル、評価トランジション群テーブルに格納されるSP番号、TN番号を示す図である。It is a figure which shows SP number and TN number which are stored in an active step group management table and an evaluation transition group table for every scan. 図7の処理中の各テーブルの状態遷移を示す図(その1)である。FIG. 8 is a diagram (part 1) illustrating a state transition of each table being processed in FIG. 7; 図7の処理中の各テーブルの状態遷移を示す図(その2)である。FIG. 8 is a diagram (part 2) illustrating a state transition of each table being processed in FIG. 7; 単一シーケンスが直列に並ぶSFC図示表現プログラム例における活性ステップの遷移状態を示す図である。It is a figure which shows the transition state of the active step in the example of a SFC illustration representation program in which a single sequence is located in series. “ステップの追いかけ実行”を実現する処理を示す図である。It is a figure which shows the process which implement | achieves "step chasing execution." 第2の実施例におけるSP/TN評価処理の詳細フローチャート図である。It is a detailed flowchart figure of SP / TN evaluation processing in the 2nd example. 第2の実施例におけるSFC図示表現プログラムの一例を示す図である。It is a figure which shows an example of the SFC illustration representation program in a 2nd Example. 図15の図示表現プログラム例に基づいて作成された接続関係テーブルの例である。FIG. 16 is an example of a connection relationship table created based on the illustrated representation program example of FIG. 15. FIG. 第2の実施例における各テーブルのデータ格納状態遷移例を示す図である。It is a figure which shows the data storage state transition example of each table in a 2nd Example. コンピュータ・ハードウェア構成図である。It is a computer hardware block diagram. (a)〜(d)はSFCプログラムにおけるステップ/トランジションの基本的な接続関係例を示す図である。(A)-(d) is a figure which shows the example of a basic connection relationship of the step / transition in a SFC program.

符号の説明Explanation of symbols

1 コントローラ支援装置
2 コントローラ
3 通信線
11 SFC図示表現プログラム
12 SFC図示表現−ステップ/トランジション接続関係テーブル変換部
13 ステップ/トランジション接続関係テーブル
14 活性ステップ群管理テーブル
15 評価トランジション群テーブル
16 制御実行部
17 トランジション評価部
21 SP番号
22 後続TN数
23 後続TN番号群
31 TN番号
32 先行SP数
33 先行SP番号群
34 後続SP数
35 後続SP番号群
100 コンピュータ
101 CPU
102 メモリ
103 入力部
104 出力部
105 記憶部
106 記録媒体駆動部
107 ネットワーク接続部
108 バス
109 可搬型記録媒体
109a FD(フレキシブル・ディスク)
109b CD−ROM
DESCRIPTION OF SYMBOLS 1 Controller support apparatus 2 Controller 3 Communication line 11 SFC illustration representation program 12 SFC illustration representation-step / transition connection relation table conversion part 13 Step / transition connection relation table 14 Active step group management table 15 Evaluation transition group table 16 Control execution part 17 Transition evaluation unit 21 SP number 22 Subsequent TN number 23 Subsequent TN number group 31 TN number 32 Predecessor SP number 33 Predecessor SP number group 34 Subsequent SP number 35 Subsequent SP number group 100 Computer 101 CPU
DESCRIPTION OF SYMBOLS 102 Memory 103 Input part 104 Output part 105 Storage part 106 Recording medium drive part 107 Network connection part 108 Bus 109 Portable recording medium 109a FD (flexible disk)
109b CD-ROM

Claims (6)

各種制御対象機器を制御する制御装置と、該制御装置を支援する支援装置とが通信線により接続されてなる制御システムにおいて、
前記支援装置は、
SFCの図示表現プログラムを作成させる図示表現プログラム作成支援手段と、
該図示表現プログラムにおける各ステップと各トランジションの接続関係を、表形式に変換する変換手段と、
該表形式の接続関係データを前記制御装置に送信する送信手段とを有し、
前記制御装置は、
前記送信手段により送られてくる前記表形式の接続関係データを保存する接続関係データ保存手段と、
該接続関係データを用いて前記制御対象機器の制御処理を実行する制御処理実行手段と、
前記制御処理実行手段による前記制御処理の実行中に、現在活性となっているステップの番号群を一時的に記憶する第1の一時記憶手段と、この活性ステップに応じて評価すべきトランジションの番号群を一時的に記憶する第2の一時記憶手段とを有し、
前記制御処理実行手段は、各スキャン毎に、前記第2の一時記憶手段に記憶されている前記評価対象のトランジションのみを評価対象として、該各評価対象トランジション毎に、当該トランジションの成立条件に基づき活性ステップの移行の有無を判断し、移行するステップに関して次スキャンの為に前記第1、第2の一時記憶手段の記憶内容を前記接続関係データを参照して更新することを特徴とする制御システム。
In a control system in which a control device that controls various devices to be controlled and a support device that supports the control device are connected by a communication line.
The support device includes:
Graphic representation program creation support means for creating an SFC graphic representation program,
Conversion means for converting the connection relationship between each step and each transition in the illustrated representation program into a table format;
Transmission means for transmitting the tabular connection relation data to the control device,
The controller is
Connection relation data storage means for storing the tabular connection relation data sent by the transmission means;
Control processing execution means for executing control processing of the device to be controlled using the connection relation data;
During the execution of the control process by the control process execution means, a first temporary storage means for temporarily storing a number group of steps currently active, and a transition number to be evaluated according to the active step Second temporary storage means for temporarily storing the group,
The control processing execution means sets, for each scan, only the evaluation target transition stored in the second temporary storage means as an evaluation target, and for each evaluation target transition based on a condition for establishing the transition. A control system for determining whether or not there is a transition of an active step and updating the storage contents of the first and second temporary storage means with reference to the connection relation data for the next scan regarding the transition step .
前記制御処理実行手段は、ステップの追いかけ実行を許容するものであって、最先頭のステップは各スキャン毎に必ず活性状態とし、前記活性ステップの移行を判断する際に、前記接続関係データを参照して後続のステップを特定し、該特定したステップが現在活性状態か否かを前記第1の一時記憶手段を参照して判定し、現在活性状態である場合には、前記当該トランジションの成立条件に係わらずステップの移行は行わないことを特徴とする請求項1記載の制御システム。   The control processing execution means allows a follow-up execution of a step, and the first step is always in an active state for each scan, and the connection relation data is referred to when determining the transition of the active step. The subsequent step is identified, and it is determined whether or not the identified step is currently active by referring to the first temporary storage means. If the current step is currently active, the condition for establishing the transition is determined. 2. The control system according to claim 1, wherein the step transition is not performed regardless of the above. 前記制御処理実行手段による前記制御処理の初期化処理の際に、前記第1の一時記憶手段には最先頭のステップの番号を記憶させ、前記第2の一時記憶手段には該最先頭のステップに後続する全てのトランジションの番号を記憶させることを特徴とする請求項1記載の制御システム。   In the initialization process of the control process by the control process execution unit, the first temporary storage unit stores the number of the topmost step, and the second temporary storage unit stores the topmost step. The control system according to claim 1, wherein the numbers of all the transitions following are stored. 各種制御対象機器を制御する制御装置と、該制御装置を支援する支援装置とが通信線により接続されてなる制御システムにおける前記制御装置であって、
SFCの図示表現プログラムにおける各ステップと各トランジションの接続関係が、表形式に変換されて成る接続関係テーブルが、外部から送信されてくると、これを保存する接続関係データ保存手段と、
該接続関係データを用いて前記制御対象機器の制御処理を実行する制御処理実行手段と、
前記制御処理実行手段による前記制御処理の実行中に、現在活性となっているステップの番号群を一時的に記憶する第1の一時記憶手段と、この活性ステップに応じて評価すべきトランジションの番号群を一時的に記憶する第2の一時記憶手段とを有し、
前記制御処理実行手段は、各スキャン毎に、前記第2の一時記憶手段に記憶されている前記評価対象のトランジションのみを評価対象として、該各評価対象トランジション毎に、当該トランジションの成立条件に基づき活性ステップの移行の有無を判断し、移行するステップに関して次スキャンの為に前記第1、第2の一時記憶手段の記憶内容を前記接続関係データを参照して更新することを特徴とする制御装置。
A control device in a control system in which a control device that controls various devices to be controlled and a support device that supports the control device are connected by a communication line,
A connection relation data storage means for storing a connection relation table formed by converting the connection relation between each step and each transition in the SFC graphical representation program into a table format, when the connection relation table is transmitted from the outside;
Control processing execution means for executing control processing of the device to be controlled using the connection relation data;
During the execution of the control process by the control process execution means, a first temporary storage means for temporarily storing a number group of steps currently active, and a transition number to be evaluated according to the active step Second temporary storage means for temporarily storing the group,
The control processing execution means sets, for each scan, only the evaluation target transition stored in the second temporary storage means as an evaluation target, and for each evaluation target transition based on a condition for establishing the transition. A control device that judges whether or not there is a transition of an active step and updates the storage contents of the first and second temporary storage means with reference to the connection relation data for the next scan regarding the transition step .
前記制御処理実行手段は、ステップの追いかけ実行を許容するものであって、最先頭のステップは各スキャン毎に必ず活性状態とし、前記活性ステップの移行を判断する際に、前記接続関係データを参照して後続のステップを特定し、該特定したステップが現在活性状態か否かを前記第1の一時記憶手段を参照して判定し、現在活性状態である場合には、前記当該トランジションの成立条件に係わらずステップの移行は行わないことを特徴とする請求項4記載の制御装置。   The control processing execution means allows a follow-up execution of a step, and the first step is always in an active state for each scan, and the connection relation data is referred to when determining the transition of the active step. The subsequent step is identified, and it is determined whether or not the identified step is currently active by referring to the first temporary storage means. If the current step is currently active, the condition for establishing the transition is determined. 5. The control device according to claim 4, wherein step transition is not performed regardless of whether or not. 各種制御対象機器を制御する制御装置と、該制御装置を支援する支援装置とが通信線により接続されてなる制御システムにおける前記制御装置のコンピュータに、
SFCの図示表現プログラムにおける各ステップと各トランジションの接続関係が、表形式に変換されて成る接続関係テーブルが、外部から送信されてくると、これを保存する保存機能と、
該接続関係データを用いて前記制御対象機器の制御処理を実行する制御処理実行機能と、
前記制御処理実行機能による前記制御処理の実行中に、現在活性となっているステップの番号群を一時的に記憶する第1の一時記憶機能と、この活性ステップに応じて評価すべきトランジションの番号群を一時的に記憶する第2の一時記憶機能とを有し、
前記制御処理実行機能であって、各スキャン毎に、前記第2の一時記憶機能に記憶されている前記評価対象のトランジションのみを評価対象として、該各評価対象トランジション毎に、当該トランジションの成立条件に基づき活性ステップの移行の有無を判断し、移行するステップに関して次スキャンの為に前記第1、第2の一時記憶機能の記憶内容を前記接続関係データを参照して更新する機能と、
を実現させる為のプログラム。
A computer of the control device in a control system in which a control device that controls various control target devices and a support device that supports the control device are connected by a communication line.
When a connection relation table in which the connection relation between each step and each transition in the SFC graphic representation program is converted into a table format is transmitted from the outside, a storage function for saving the connection relation table;
A control processing execution function for executing control processing of the control target device using the connection relation data;
During execution of the control process by the control process execution function, a first temporary storage function for temporarily storing a group of steps that are currently active, and a transition number to be evaluated according to the active step A second temporary storage function for temporarily storing the group;
In the control processing execution function, for each scan, only the transition of the evaluation target stored in the second temporary storage function is set as an evaluation target, and the condition for establishing the transition is determined for each transition of the evaluation target A function for determining whether or not there is a transition of the active step based on, and updating the storage contents of the first and second temporary storage functions with reference to the connection relation data for the next scan with respect to the transition step;
A program to realize
JP2005004501A 2005-01-11 2005-01-11 Programmable controller system, controller and program Expired - Fee Related JP4442430B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005004501A JP4442430B2 (en) 2005-01-11 2005-01-11 Programmable controller system, controller and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005004501A JP4442430B2 (en) 2005-01-11 2005-01-11 Programmable controller system, controller and program

Publications (2)

Publication Number Publication Date
JP2006195590A JP2006195590A (en) 2006-07-27
JP4442430B2 true JP4442430B2 (en) 2010-03-31

Family

ID=36801648

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005004501A Expired - Fee Related JP4442430B2 (en) 2005-01-11 2005-01-11 Programmable controller system, controller and program

Country Status (1)

Country Link
JP (1) JP4442430B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4747990B2 (en) * 2006-08-10 2011-08-17 株式会社明電舎 Programmable controller
US8903520B2 (en) * 2009-04-14 2014-12-02 General Electric Company Method for executing sequential function charts as function blocks in a control system
JP6742689B2 (en) 2015-01-09 2020-08-19 株式会社ジェイテクト Operation program editing device and program
JP6911408B2 (en) * 2017-03-13 2021-07-28 オムロン株式会社 Evaluation system, safety controller, evaluation program, and evaluation method
CN109857393B (en) * 2019-01-31 2022-03-29 南京南瑞继保电气有限公司 Visual realization method and device of sequence control chart and storage medium

Also Published As

Publication number Publication date
JP2006195590A (en) 2006-07-27

Similar Documents

Publication Publication Date Title
JP4442430B2 (en) Programmable controller system, controller and program
JP2006134097A (en) Programmable display, display control program, and recording medium with the program recorded thereon
US20060075352A1 (en) Property independent in-place editing
WO1991018343A1 (en) Production system
US7237005B2 (en) Job network setup method, job network execution method, job management system, management terminal and program
JPH08106380A (en) Program production device/method and program treating controller
US20160378098A1 (en) Numerical controller having function of automatically selecting storage destination of machining program
US5204936A (en) Process status supervisory system
JP2006178818A (en) Motion controller, engineering tool, and c language execution system
JP4322780B2 (en) Screen creation device, screen creation program and recording medium
JP4222236B2 (en) Connection setting device and program
US11009848B2 (en) Scalable intelligent query-based interface to navigate and find industrial information on a visual interface
JP3143330B2 (en) Programmable controller
JP4443436B2 (en) Control system and control method
JP3910184B2 (en) Sequence program editing device
JPH07210394A (en) Program management method for distributed system
JP2006344046A (en) Computer system, application program, and display method
JP4322130B2 (en) Timing chart editing system
JP2000163329A (en) Data transfer system
JPS62295109A (en) Sequence program execution system for programmable controller
JP3730684B2 (en) Display device for programmable controller and display information writing method thereof
CN117349203A (en) Control data processing method and device
JPH07306789A (en) Method and device for inference control of expert system
JP2007048094A (en) Plan execution device, plan execution method and plan execution program
JPH0830457A (en) Inferring method of production system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090825

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091021

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091222

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100104

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130122

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130122

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20130122

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130122

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140122

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees