JP2008040995A - Programmable controller - Google Patents

Programmable controller Download PDF

Info

Publication number
JP2008040995A
JP2008040995A JP2006217625A JP2006217625A JP2008040995A JP 2008040995 A JP2008040995 A JP 2008040995A JP 2006217625 A JP2006217625 A JP 2006217625A JP 2006217625 A JP2006217625 A JP 2006217625A JP 2008040995 A JP2008040995 A JP 2008040995A
Authority
JP
Japan
Prior art keywords
pou
transition
action
management table
instruction
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.)
Granted
Application number
JP2006217625A
Other languages
Japanese (ja)
Other versions
JP4747990B2 (en
Inventor
Masato Fujii
正人 藤井
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP2006217625A priority Critical patent/JP4747990B2/en
Publication of JP2008040995A publication Critical patent/JP2008040995A/en
Application granted granted Critical
Publication of JP4747990B2 publication Critical patent/JP4747990B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To easily change a program by simplifying the description of an SFC program. <P>SOLUTION: In the case of executing a step instruction, when a step shown by a step management table 13 is put in an active status, the management number and instance address of an action POU shown by an action management table 15 are identified, and the address of an action POU 30 to be executed from the target entry of a POU management table 20 is identified from the POU management number, and the action POU is executed. In the case of executing the transition instruction, the management number of the step instruction connected before the transition instruction shown by a transition management table 14 is referenced to identify the management number and instance address of the transition POU 40 when the step is put in an active status, and the address of the transition POU to be executed is identified from the target entry of the POU management table from the POU management number to execute the transition POU. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、JISB3503(IEC61131−3)に規定されているSFC(Sequencial Function Chart)言語を使用して演算を実行するプログラマブルコントローラに関わり、特に、PLCopen−XMLスキーマに対応するSFC演算方式に関わるものである。   The present invention relates to a programmable controller that executes an operation using the SFC (Sequential Function Chart) language defined in JISB3503 (IEC61131-3), and particularly relates to an SFC operation method corresponding to the PLCenpen-XML schema. It is.

JISB3503にはSFCのほかにテキスト言語であるIL(Instruction List)言語、ST(Structured Text)言語、グラフィック言語であるLD(Ladder Diagram)言語、FBD(Function BIock Diagram)がある。SFC以外の言語はプログラムの先頭から順番に命令を実行するので、通常のコンピュータプログラムと同様の演算方法が可能である。   In addition to SFC, JIS B3503 includes text language IL (Instruction List) language, ST (Structured Text) language, graphic language LD (Ladder Diagram) language, and FBD (Function BIock Diagram). Languages other than SFC execute instructions in order from the beginning of the program, so that the same calculation method as that of a normal computer program is possible.

しかし、SFCでは、実際に動作するプログラムは活性化したSTEPのみとなり、活性化したSTEPに続くトランジション条件が成立した場合に、次STEPが活性化され、元STEPは非活性状態になる。例えば、図3でStep2が活性化状態であるとき、Tran(トランジション)2の条件が成立した時にStep3が活性化され、Step2は非活性状態になる。   However, in the SFC, the program that actually operates is only the activated STEP, and when the transition condition following the activated STEP is satisfied, the next STEP is activated and the original STEP becomes inactive. For example, when Step 2 is in an activated state in FIG. 3, Step 3 is activated when Step 2 (transition) 2 conditions are satisfied, and Step 2 is inactivated.

このように、SFC演算を実行するには通常のコンピュータプログラム言語では表現が難しい。ましてや、通常のプログラマブルコントローラが持っているインストラクション(演算命令)で、SFC演算を実現するのは困難である。そのため、SFC演算に関しては、プログラマブルコントローラの演算LSIを使用しないで、汎用マイコンで実施しているプログラマブルコントローラもある。   As described above, it is difficult to express an SFC operation in a normal computer program language. In addition, it is difficult to realize the SFC calculation with the instructions (calculation instructions) of a normal programmable controller. Therefore, there is a programmable controller that is implemented by a general-purpose microcomputer without using an arithmetic LSI of a programmable controller for SFC calculation.

また、SFC演算をプログラマブルコントローラが持っているインストラクションで実施する場合には、SFCプログラムをトランジション群プログラム、アクション群プログラム、リンク群プログラムに分けて実行する方式が提案されている(例えば、特許文献1、特許文献2参照)。
特開平6−242810号公報 、特開平5−150814号公報
In addition, in the case where the SFC calculation is executed by an instruction possessed by the programmable controller, a method has been proposed in which the SFC program is divided into a transition group program, an action group program, and a link group program (for example, Patent Document 1). , See Patent Document 2).
JP-A-6-242810 JP-A-5-150814

JISB3503では規定はないが、PLCopen−XMLスキーマではSFCの構成要素であるトランジションとアクションはPOU(Program Organization Unit)として定義されている。   Although there is no provision in JISB3503, transitions and actions that are constituent elements of SFC are defined as POU (Program Organization Unit) in the PLCopy-XML schema.

これまでのプログラマブルコントローラのSFCではトランジションやアクションをPOUとして定義して使うようになっていない。即ち、トランジションやアクションを同じアルゴリズムとしたい場合に、そのアルゴリズムとデータ定義の組み合わせをPOUとして定義して、変数部分を格納するデータ領域をインスタンスとすることで、何度もPOUを使いまわすような使い方ができなかった。即ち、同じアルゴリズムを別々のトランジションやアクションで、プログラミングする必要があった。   Conventional SFCs of programmable controllers do not define and use transitions and actions as POUs. In other words, if you want to use the same algorithm for transitions and actions, define a combination of the algorithm and data definition as POU, and use the POU as many times as an instance of the data area that stores the variable part. I couldn't use it. In other words, it was necessary to program the same algorithm with different transitions and actions.

例えば、図4でStep2とStep3が同じアルゴリズムのアクションでプログラムできるとする。アクションをPOUとして記述できない場合には、Step2,Step3のアクションである、Action2とAction3は、同じアルゴリズムであるにもかかわらず、全く別なプログラムとして記述する必要がある。すなわち、プログラムメモリを別々に消費することになる。Tran2とTran3についても、遷移条件アルゴリズムが同じであれば同様なことになる。   For example, assume that Step 2 and Step 3 can be programmed with the same algorithm action in FIG. If the action cannot be described as a POU, Step 2 and Step 3 actions Action 2 and Action 3 need to be described as completely different programs even though they are the same algorithm. That is, the program memory is consumed separately. The same applies to Tran2 and Tran3 if the transition condition algorithm is the same.

また、前記の特許文献1,2によれば、トランジションやアクションはPOUとして定義できるとはなっていない。プログラマブルコントローラのインストラクションで、トランジションやアクションの実行部分を記述している。この方式によれば、トランジション群プログラム、アクション群プログラムの一部を変更する場合には、SFCプログラム全体をコンパイルする必要がある。このことから、SFCプログラムのオンライン変更にも対応しにくい構造であると言える。   Further, according to Patent Documents 1 and 2, transitions and actions cannot be defined as POUs. Programmable controller instructions describe the execution part of transitions and actions. According to this method, when changing a part of the transition group program or action group program, it is necessary to compile the entire SFC program. From this, it can be said that the structure is difficult to cope with online change of the SFC program.

本発明の目的は、SFCプログラムの記述を簡易にし、プログラムの変更を容易にしたプログラマブルコントローラを提供することにある。   An object of the present invention is to provide a programmable controller in which the description of the SFC program is simplified and the program can be easily changed.

前記の課題を解決する本発明は、以下の構成を特徴とする。   The present invention for solving the above-described problems is characterized by the following configuration.

(1)ステップ命令群とトランジション命令群およびステップ移行命令群で記述したSFCプログラムによって演算を実行するプログラマブルコントローラであって、
前記ステップ命令のアクションを変数定義部と演算命令を記述するボディ部から構成されるアクションPOUと、
前記トランジションを変数定義部と演算命令を記述するボディ部から構成されるトランジションPOUと、
前記ステップ命令群のアクションの管理番号とそのステップ命令が使用するインスタンス領域のアドレスを有してステップ管理番号順に並べたステップ管理テーブルと、
前記トランジションPOUのPOU管理番号とそのトランジションが使用するインスタンス領域のアドレスを有してトランジション管理番号順に並べたトランジション管理テーブルと、
前記アクションPOUのPOU管理番号とそのアクションが使用するインスタンス領域のアドレスを有してアクション管理番号順に並べたアクション管理テーブルと、
前記トランジションPOUおよびアクションPOUを管理番号順にPOUのパラメータを記述したPOU管理テーブルとを備え、
ステップ命令の実行は、前記ステップ管理テーブルで示す当該ステップが活性状態か否かを判定し、活性状態であれば前記アクション管理テーブルで示す前記アクションPOUの管理番号とインスタンスアドレスを識別し、該POU管理番号から前記POU管理テーブルの目的エントリから実行すべきアクションPOUのアドレスを識別して当該アクションPOUを実行し、
前記ステップ命令の実行後、トランジション命令の実行は、前記トランジション管理テーブルの管理番号で示す当該トランジション命令の前に接続されているステップ命令の管理番号を参照し、該ステップ管理番号に対応する前記ステップ管理テーブルのエントリを参照して対応するステップが活性状態か否かを判定し、当該ステップ命令が活性状態であれば前記トランジション管理テーブルで示す前記トランジションPOUの管理番号とインスタンスアドレスを識別し、該POU管理番号から前記POU管理テーブルの目的エントリから実行すべきトランジションPOUのアドレスを識別して当該トランジションPOUを実行し、
前記トランジション命令の終了後、前記ステップ移行命令の実行は、トランジション命令の実行で確立したステップ遷移演算結果を使って、ステップ活性化フラグを更新する、
ことを特徴とする。
(1) A programmable controller that executes an operation by an SFC program described by a step instruction group, a transition instruction group, and a step transition instruction group,
An action POU composed of a variable definition part and a body part describing an operation instruction for the action of the step instruction;
A transition POU composed of a variable definition part and a body part describing an operation instruction;
A step management table in which the management number of the action of the step command group and the address of the instance area used by the step command are arranged in the order of the step management number;
A transition management table having the POU management number of the transition POU and the address of the instance area used by the transition and arranged in the order of the transition management number;
An action management table having a POU management number of the action POU and an address of an instance area used by the action and arranged in order of the action management number;
A POU management table in which the POU parameters are described for the transition POU and the action POU in the order of management numbers;
The execution of the step command determines whether or not the step indicated in the step management table is in an active state. If the step is active, the management number and instance address of the action POU indicated in the action management table are identified, and the POU is identified. Identify the address of the action POU to be executed from the target entry in the POU management table from the management number, and execute the action POU.
After execution of the step instruction, the execution of the transition instruction refers to the management number of the step instruction connected before the transition instruction indicated by the management number in the transition management table, and the step corresponding to the step management number It is determined whether or not the corresponding step is in an active state with reference to an entry in the management table. If the step command is in an active state, the management number and instance address of the transition POU indicated in the transition management table are identified, The address of the transition POU to be executed is identified from the target entry of the POU management table from the POU management number, and the transition POU is executed.
After completion of the transition instruction, the execution of the step transition instruction updates the step activation flag using the step transition calculation result established by the execution of the transition instruction.
It is characterized by that.

(2)前記トランジションPOUとアクションPOUはSFCプログラムの外に置くことを特徴とする。   (2) The transition POU and the action POU are placed outside the SFC program.

(3)前記SFCプログラムの内部に前記ステップ管理テーブル、トランジション管理テーブル、アクション管理テーブル、STEP命令群、TRAN命令群、STEP移行命令群を置くことを特徴とする。   (3) The step management table, transition management table, action management table, STEP instruction group, TRAN instruction group, and STEP transition instruction group are placed in the SFC program.

以上のとおり、本発明によれば、SFCプログラムの記述が簡易になり、プログラムの変更も容易になる。具体的には、以下の効果が得られる。   As described above, according to the present invention, the description of the SFC program is simplified and the program can be easily changed. Specifically, the following effects can be obtained.

(1)トランジションやアクションをPOUとして定義できるため、同じアルゴリズムのトランジションやアクションをインスタンス領域を用意するだけで、何度でもSFCプログラム中で使用することができる。   (1) Since transitions and actions can be defined as POUs, transitions and actions of the same algorithm can be used in an SFC program any number of times simply by preparing an instance area.

(2)PLCopen−XML形式に準拠したプログラムが作成できる。   (2) A program compliant with the PLCOpen-XML format can be created.

(3)SFCプログラム内部にSTEP命令群を持ち、STEP命令のオペランドにステップ管理テーブルの管理番号を示すことで、ステップ管理テーブルを介した、ステップ用インスタンス領域、及びアクション用インスタンス領域へのアクセスや関連するアクションPOUの実行が可能になる。   (3) By having a STEP instruction group in the SFC program and indicating the management number of the step management table in the operand of the STEP instruction, access to the step instance area and action instance area via the step management table The associated action POU can be executed.

(4)SFCプログラム内部にTRAN命令群を持ち、TRAN命令のオペランドにトランジション管理テーブルの管理番号を示すことで、トランジション管理テーブルを介した、トランジション用インスタンス領域アクセスや関連するトランジションPOUの実行が可能になる。   (4) By having a TRAN instruction group in the SFC program and indicating the management number of the transition management table in the operand of the TRAN instruction, it is possible to access the transition instance area and execute the associated transition POU via the transition management table. become.

(5)トランジションPOUとアクションPOUをPOU管理テーブルを介して実行することで、その他の型のPOUと同様な管理が実施できる。   (5) By executing the transition POU and the action POU via the POU management table, the same management as other types of POUs can be performed.

(6)トランジションPOUとアクションPOUの管理をSFCプログラムのトランジション管理テーブルとアクション管理テーブルを介して実行することで、そのSFCプログラムだけの管理下でSFCプログラム演算が実施できる。   (6) By executing the management of the transition POU and the action POU via the transition management table and the action management table of the SFC program, the SFC program calculation can be performed under the management of only the SFC program.

(7)トランジションPOUとアクションPOUをSFCプログラムの外に置いているために、トランジションPOUやアクションPOUのアルゴリズムに変更があっても、SFCプログラムを再度コンパイルする必要がない。そのため、オンライン変更処理が簡単に実施可能になる。   (7) Since the transition POU and the action POU are placed outside the SFC program, it is not necessary to recompile the SFC program even if the algorithm of the transition POU or the action POU is changed. Therefore, online change processing can be easily performed.

(実施形態1)
図1は、本実施形態を示すSFCブログラムの構成例であり、以下の特徴を持つ。
(Embodiment 1)
FIG. 1 is a configuration example of an SFC program showing this embodiment, and has the following features.

(1)アクションとトランジションをPOUとして定義できる。   (1) Actions and transitions can be defined as POUs.

(2)アクションPOUを呼び出すためにSTEP命令を用意する。   (2) A STEP command is prepared to call the action POU.

(3)トランジションPOUを呼び出すためにTRAN命令を用意する。   (3) Prepare a TRAN command to call the transition POU.

(4)STEP命令とアクションを結びつけるためにステップ管理テーブルを用意する。   (4) A step management table is prepared for associating a STEP command with an action.

(5)アクションPOUを管理するためにアクション管理テーブルを用意する。   (5) An action management table is prepared for managing the action POU.

(6)トランジションPOUを管理するためにトランジションPOUを用意する。   (6) Prepare a transition POU to manage the transition POU.

(7)POUを管理するためのPOU管理テーブルを用意する。   (7) A POU management table for managing POUs is prepared.

(8)SFCプログラムのオンライン変更に対応しやすい。   (8) Easy to respond to online change of SFC program.

(9)SFCプログラム内部にステップ管理テーブル、トランジション管理テーブル、アクション管理テーブル、STEP命令群、TRAN命令群、STEP移行命令群を置く。   (9) Place a step management table, transition management table, action management table, STEP instruction group, TRAN instruction group, and STEP transition instruction group in the SFC program.

(10)トランジションPOUとアクションPOUはSFCプログラムの外に置く。   (10) Place the transition POU and action POU outside the SFC program.

図1において、SFCプログラム10は以下の要素で構成される。   In FIG. 1, the SFC program 10 includes the following elements.

ヘッダ11は、プログラムインスタンスとしてのSFCプログラムの各種属性情報を示す。変数定義12はSFCプログラムが使用する変数を定義する領域であり、この管理用インスタンスや内部変数は後述のインスタンス領域50に格納される。   The header 11 shows various attribute information of the SFC program as a program instance. The variable definition 12 is an area for defining variables used by the SFC program, and the management instance and internal variables are stored in an instance area 50 described later.

ステップ管理テーブル13は、SFCプログラム内部に存在する各ステップに管理番号を付けて、その管理番号順に並べたSTEP管理用テーブルである。この中に、対応するステップに関連するアクションの管理番号とそのステップが使用するインスタンス領域のアドレスが示される。STEP命令のオペランドにこのステップ管理テーブル13の管理番号が示される。1つのステップに関連するアクションは複数あっても良い。また、アクションでなく、直接BOOL型変数を設定することもできる。   The step management table 13 is a STEP management table in which a management number is assigned to each step existing in the SFC program and arranged in the order of the management number. In this, the management number of the action related to the corresponding step and the address of the instance area used by that step are shown. The management number of the step management table 13 is indicated in the operand of the STEP instruction. There may be a plurality of actions related to one step. Also, a Boolean variable can be set directly instead of an action.

トランジション管理テーブル14は、SFCプログラム内部に存在する各トランジションに管理番号を付けて、その管理番号順に並べたトランジション管理用テーブルである。この中に、対応するトランジションPOUのPOU管理番号とそのトランジションが使用するインスタンス領域のアドレスが示される。TRAN命令のオペランドにこのトランジション管理テーブル14の管理番号が示される。   The transition management table 14 is a transition management table in which management numbers are assigned to the respective transitions existing in the SFC program and are arranged in the order of the management numbers. This shows the POU management number of the corresponding transition POU and the address of the instance area used by the transition. The management number of the transition management table 14 is indicated in the operand of the TRAN instruction.

アクション管理テーブル15は、SFCプログラム内部に存在するアクションに管理番号を付けて、その管理番号順に並べたアクション管理用テーブルである。この中に、対応するアクションPOUのPOU管理番号とそのアクションが使用するインスタンス領域のアドレスが示される。ステップ管理テーブル13にこのアクション管理テーブル15の管理番号が示される。   The action management table 15 is an action management table in which management numbers are assigned to actions existing in the SFC program and arranged in the order of the management numbers. In this, the POU management number of the corresponding action POU and the address of the instance area used by the action are shown. The step management table 13 shows the management number of the action management table 15.

STEP命令群16は、SFCプログラム内部に存在するSTEPを実行する命令群である。これらSTEP命令のオペランドには、ステップ管理テーブル13の管理番号が示される。ステップの活性状態により、関連するアクションを実行するかどうかが決まる。   The STEP instruction group 16 is an instruction group for executing STEP existing in the SFC program. The management number of the step management table 13 is shown in the operand of these STEP instructions. The active state of a step determines whether the associated action is performed.

TRAN命令群17は、SFCプログラム内部に存在するトランジションを実行する命令群である。これらTRAN命令のオペランドには、トランジション管理テーブル14の管理番号が示される。上位に接続されるステップの活性状態により、トランジション演算を実行するかどうかが決まる。   The TRAN instruction group 17 is an instruction group for executing a transition existing in the SFC program. In the operands of these TRAN instructions, the management number of the transition management table 14 is indicated. Whether or not to execute the transition operation is determined by the active state of the step connected to the host.

STEP移行命令群18は、TRAN命令群の演算結果により、ステップ移行条件が成立した場合、活性化しているステップを非活性状態にして、次ステップを活性化状態にするためのLD命令の集まりである。これらの演算により、ステップ用インスタンスにあるステップ活性化フラグが更新される。   The STEP transition instruction group 18 is a collection of LD instructions for deactivating the activated step and activating the next step when the step transition condition is satisfied according to the operation result of the TRAN instruction group. is there. By these operations, the step activation flag in the step instance is updated.

以上までのSFCプログラム以外に、POU管理テーブル20を用意する。このPOU管理テーブル20は、プログラマブルコントローラに登録されているPOUに管理番号を付けて、その管理番号順にPOUのパラメータを記述したものである。POUにはトランジションやアクションの他に、ファンクション、ファンクションブロック、プログラムという型が存在する。POU管理テーブル20はそれらのPOUを全体として管理するものである。アクション管理テーブル15とトランジション管理テーブル14には、POU管理テーブル20の管理番号が示され、実行しようとするPOUのアドレスなどが示される。このPOU管理テーブル20を介して、実際のトランジションPOUやアクションPOUが実行できるようになる。   In addition to the above SFC programs, a POU management table 20 is prepared. In this POU management table 20, management numbers are assigned to POUs registered in the programmable controller, and POU parameters are described in the order of the management numbers. In addition to transitions and actions, POU has types of functions, function blocks, and programs. The POU management table 20 manages these POUs as a whole. The action management table 15 and the transition management table 14 indicate the management number of the POU management table 20 and the address of the POU to be executed. An actual transition POU and action POU can be executed via the POU management table 20.

以下に、図1を例にして、SFCプログラムの演算方式を説明する。なお、プログラムメモリとして、アクションPOU30、トランジションPOU40が用意され、さらにデータメモリとしてSFC用インスタンスを格納するインスタンス領域50が用意される。   Hereinafter, the calculation method of the SFC program will be described with reference to FIG. An action POU 30 and a transition POU 40 are prepared as program memories, and an instance area 50 for storing SFC instances is prepared as a data memory.

(S1)SFCプログラムが起動すると、STEP命令群16の先頭命令が実行される。STEP命令のオペランドにはステップ管理テーブル13の管理番号が示されており、目的のステップ管理番号が参照される。   (S1) When the SFC program is activated, the first instruction of the STEP instruction group 16 is executed. The operand of the STEP instruction indicates the management number of the step management table 13, and the target step management number is referred to.

(S2)ステップ管理テーブル13にはステップが活性状態か否かを示す、ステップ活性化フラグが格納されているステップ用インスタンス領域のアドレスが格納されているステップが活性かどうかはXやTから判定する。   (S2) It is determined from X or T whether the step in which the address of the step instance area in which the step activation flag is stored indicating whether the step is in the active state is stored in the step management table 13 is active. To do.

(S3)対応するステップ活性化フラグが活性状態であれば、ステップ管理テーブル13に示されているアクション管理テーブル15の管理番号を参照する。このことで、目的のアクションPOUのアドレスを識別することができる。なお、1つのステップでは複数のアクション管理番号を登録できる。   (S3) If the corresponding step activation flag is in the active state, the management number of the action management table 15 shown in the step management table 13 is referred to. Thus, the address of the target action POU can be identified. In one step, a plurality of action management numbers can be registered.

(S4)アクション管理テーブル15で目的のアクションPOUのPOU管理番号と、アクション用インスタンス領域のアドレスを識別する。   (S4) The action management table 15 identifies the POU management number of the target action POU and the address of the action instance area.

(S5)POU管理番号からPOU管理テーブル20の目的エントリを識別し、実行すべきアクションPOUのアドレスを識別する。   (S5) The purpose entry of the POU management table 20 is identified from the POU management number, and the address of the action POU to be executed is identified.

(S6)アクションPOU30はアクション用インスタンス領域のアドレスをパラメータとして起動され、アクション演算を実行する。アクションPOUの最後はRET命令となっており、次STEP命令を実行することになる。   (S6) The action POU 30 is activated with the address of the action instance area as a parameter, and executes an action calculation. The end of the action POU is a RET instruction, and the next STEP instruction is executed.

したがって、ステップ命令の実行は、前記ステップ管理テーブルで示す当該ステップが活性状態か否かを判定し、活性状態であれば前記アクション管理テーブルで示す前記アクションPOUのPOU管理番号とインスタンスアドレスを識別し、該POU管理番号から前記POU管理テーブルの目的エントリから実行すべきアクションPOUのアドレスを識別して当該アクションPOUを実行する。   Therefore, the execution of the step command determines whether or not the step indicated in the step management table is in the active state, and if it is in the active state, identifies the POU management number and the instance address of the action POU indicated in the action management table. The address of the action POU to be executed is identified from the target entry of the POU management table from the POU management number, and the action POU is executed.

(S7)上記のSTEP命令の実行後、TRAN命令群17のTRAN命令が実行される。TRAN命令オペランドにはトランジション管理テーブル14の管理番号が示されており、目的のトランジション管理データが参照される。   (S7) After executing the above STEP instruction, the TRAN instruction of the TRAN instruction group 17 is executed. The TRAN command operand indicates the management number of the transition management table 14 and refers to the target transition management data.

(S8)トランジション管理テーブル14には、そのTRAN命令の前に接続されているステップ命令のステップ管理番号が示されている。そのステップ管理番号に対応するステップ管理テーブル13のエントリを参照し、対応するステップが活性状態か否かを判定する。   (S8) The transition management table 14 shows the step management number of the step command connected before the TRAN command. With reference to the entry of the step management table 13 corresponding to the step management number, it is determined whether or not the corresponding step is in an active state.

(S9)対応するステップ命令のフラグが活性状態であれば、トランジション管理テーブル14に示されているトランジションPOU管理番号を参照する。このことで、目的のPOU管理テーブル20のアドレスを知ることができる。また、トランジション管理テーブル20にはトランジション演算で使用するトランジション用インスタンス領域のアドレスが示されている。   (S9) If the flag of the corresponding step instruction is active, the transition POU management number shown in the transition management table 14 is referred to. Thus, the address of the target POU management table 20 can be known. In addition, the transition management table 20 shows addresses of transition instance areas used in the transition calculation.

(S10)POU管理番号からPOU管理テーブル20の目的エントリを知り、実行すべきトランジションPOU40のアドレスを判定する。トランジションPOU40はトランジション用インスタンス領域のアドレスをパラメータとして起動され、トランジション演算を実行する。トランジションPOUの最後はRET命令となっており、次TRAN命令を実行することになる。   (S10) The purpose entry of the POU management table 20 is known from the POU management number, and the address of the transition POU 40 to be executed is determined. The transition POU 40 is activated with the address of the transition instance area as a parameter, and performs a transition operation. The end of the transition POU is a RET instruction, and the next TRAN instruction is executed.

したがって、トランジション命令の実行は、前記トランジション管理テーブルの管理番号で示す当該トランジション命令の前に接続されているステップ命令のステップ管理番号を参照し、該ステップ管理番号に対応する前記ステップ管理テーブルのエントリを参照して対応するステップが活性状態か否かを判定し、当該ステップ命令が活性状態であれば前記トランジション管理テーブルで示す前記トランジションPOUの管理番号とインスタンスアドレスを識別し、該POU管理番号から前記POU管理テーブルの目的エントリから実行すべきトランジションPOUのアドレスを識別して当該トランジションPOUを実行する。   Therefore, the execution of the transition instruction refers to the step management number of the step instruction connected before the transition instruction indicated by the management number of the transition management table, and the entry of the step management table corresponding to the step management number To determine whether or not the corresponding step is in an active state, and if the step command is in an active state, identify the management number and instance address of the transition POU indicated in the transition management table, and from the POU management number The address of the transition POU to be executed is identified from the target entry in the POU management table, and the transition POU is executed.

(S11)TRAN命令が終了すると、STEP移行命令群18が実行される。TRAN命令群で確立したステップ遷移演算結果を使って、ステップ活性化フラグを更新する。   (S11) When the TRAN instruction is completed, the STEP transition instruction group 18 is executed. The step activation flag is updated using the result of the step transition operation established by the TRAN instruction group.

(実施形態2)
実施形態1ではすべてのPOUを総括的に管理するPOU管理テーブル20を別途用意していた。しかし、SFCプログラムで使用するトランジションやアクションは、他言語で使用することは少ない。また、あるSFCプログラムで作成したトランジションPOUとアクションPOUを他SFCプログラムで使用することは少ない。そのため、トランジションPOUとアクションPOUの管理を行うPOU管理テーブル20をSFCプログラム10に含めてしまうことができる。図2はその構成図であり、SFCプログラム10Aにはトランジション管理テーブル14およびアクション管理テーブル15内にPOU管理テーブルを含めておく。このことで、SFCと他言語を切り離して管理することが可能になる。
(Embodiment 2)
In the first embodiment, a POU management table 20 that collectively manages all POUs is prepared separately. However, transitions and actions used in SFC programs are rarely used in other languages. In addition, transition POUs and action POUs created with a certain SFC program are rarely used with other SFC programs. Therefore, the PFC management table 20 for managing the transition POU and the action POU can be included in the SFC program 10. FIG. 2 is a configuration diagram thereof, and the PFC management table is included in the transition management table 14 and the action management table 15 in the SFC program 10A. This makes it possible to manage SFC and other languages separately.

本発明の実施形態1を示すSFCプログラムの構成例。The structural example of the SFC program which shows Embodiment 1 of this invention. 本発明の実施形態2を示すSFCプログラムの構成例。The structural example of the SFC program which shows Embodiment 2 of this invention. SFCプログラムの活性/非活性の例。Example of active / inactive SFC program. SFCプログラムの処理手順例。An example of the processing procedure of the SFC program.

符号の説明Explanation of symbols

10 SFCプログラム
20 POU管理テーブル
30 アクションPOU
40 トランジションPOU
50 SFC用インスタンス領域
11 ヘッダ
12 変数定義
13 ステップ管理テーブル
14 トランジション管理テーブル
15 アクション管理テーブル
16 STEP命令群
17 TRAN命令群
18 STEP移行命令群
10 SFC program 20 POU management table 30 Action POU
40 Transition POU
50 SFC instance area 11 Header 12 Variable definition 13 Step management table 14 Transition management table 15 Action management table 16 STEP instruction group 17 TRAN instruction group 18 STEP transition instruction group

Claims (3)

ステップ命令群とトランジション命令群およびステップ移行命令群で記述したSFCプログラムによって演算を実行するプログラマブルコントローラであって、
前記ステップ命令のアクションを変数定義部と演算命令を記述するボディ部から構成されるアクションPOUと、
前記トランジションを変数定義部と演算命令を記述するボディ部から構成されるトランジションPOUと、
前記ステップ命令群のアクションの管理番号とそのステップ命令が使用するインスタンス領域のアドレスを有してステップ管理番号順に並べたステップ管理テーブルと、
前記トランジションPOUのPOU管理番号とそのトランジションが使用するインスタンス領域のアドレスを有してトランジション管理番号順に並べたトランジション管理テーブルと、
前記アクションPOUのPOU管理番号とそのアクションが使用するインスタンス領域のアドレスを有してアクション管理番号順に並べたアクション管理テーブルと、
前記トランジションPOUおよびアクションPOUを管理番号順にPOUのパラメータを記述したPOU管理テーブルとを備え、
ステップ命令の実行は、前記ステップ管理テーブルで示す当該ステップが活性状態か否かを判定し、活性状態であれば前記アクション管理テーブルで示す前記アクションPOUの管理番号とインスタンスアドレスを識別し、該POU管理番号から前記POU管理テーブルの目的エントリから実行すべきアクションPOUのアドレスを識別して当該アクションPOUを実行し、
前記ステップ命令の実行後、トランジション命令の実行は、前記トランジション管理テーブルの管理番号で示す当該トランジション命令の前に接続されているステップ命令の管理番号を参照し、該ステップ管理番号に対応する前記ステップ管理テーブルのエントリを参照して対応するステップが活性状態か否かを判定し、当該ステップ命令が活性状態であれば前記トランジション管理テーブルで示す前記トランジションPOUの管理番号とインスタンスアドレスを識別し、該POU管理番号から前記POU管理テーブルの目的エントリから実行すべきトランジションPOUのアドレスを識別して当該トランジションPOUを実行し、
前記トランジション命令の終了後、前記ステップ移行命令の実行は、トランジション命令の実行で確立したステップ遷移演算結果を使って、ステップ活性化フラグを更新する、
ことを特徴とするプログラマブルコントローラ。
A programmable controller that executes an operation by an SFC program described by a step instruction group, a transition instruction group, and a step transition instruction group,
An action POU composed of a variable definition part and a body part describing an operation instruction for the action of the step instruction;
A transition POU composed of a variable definition part and a body part describing an operation instruction;
A step management table in which the management number of the action of the step command group and the address of the instance area used by the step command are arranged in the order of the step management number;
A transition management table having the POU management number of the transition POU and the address of the instance area used by the transition and arranged in the order of the transition management number;
An action management table having a POU management number of the action POU and an address of an instance area used by the action and arranged in order of the action management number;
A POU management table in which the POU parameters are described for the transition POU and the action POU in the order of management numbers;
The execution of the step command determines whether or not the step indicated in the step management table is in an active state. If the step is active, the management number and instance address of the action POU indicated in the action management table are identified, and the POU is identified. Identify the address of the action POU to be executed from the target entry in the POU management table from the management number, and execute the action POU.
After execution of the step instruction, the execution of the transition instruction refers to the management number of the step instruction connected before the transition instruction indicated by the management number in the transition management table, and the step corresponding to the step management number It is determined whether or not the corresponding step is in an active state with reference to an entry in the management table. If the step command is in an active state, the management number and instance address of the transition POU indicated in the transition management table are identified, The address of the transition POU to be executed is identified from the target entry of the POU management table from the POU management number, and the transition POU is executed.
After completion of the transition instruction, the execution of the step transition instruction updates the step activation flag using the step transition calculation result established by the execution of the transition instruction.
A programmable controller characterized by that.
前記トランジションPOUとアクションPOUはSFCプログラムの外に置くことを特徴とする請求項1に記載のプログラマブルコントローラ。   The programmable controller according to claim 1, wherein the transition POU and the action POU are placed outside the SFC program. 前記SFCプログラムの内部に前記ステップ管理テーブル、トランジション管理テーブル、アクション管理テーブル、STEP命令群、TRAN命令群、STEP移行命令群を置くことを特徴とする請求項1または2に記載のプログラマブルコントローラ。
The programmable controller according to claim 1 or 2, wherein the step management table, transition management table, action management table, STEP instruction group, TRAN instruction group, and STEP transition instruction group are placed in the SFC program.
JP2006217625A 2006-08-10 2006-08-10 Programmable controller Active JP4747990B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006217625A JP4747990B2 (en) 2006-08-10 2006-08-10 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006217625A JP4747990B2 (en) 2006-08-10 2006-08-10 Programmable controller

Publications (2)

Publication Number Publication Date
JP2008040995A true JP2008040995A (en) 2008-02-21
JP4747990B2 JP4747990B2 (en) 2011-08-17

Family

ID=39175890

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006217625A Active JP4747990B2 (en) 2006-08-10 2006-08-10 Programmable controller

Country Status (1)

Country Link
JP (1) JP4747990B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250819A (en) * 2009-04-14 2010-11-04 General Electric Co <Ge> Method for executing sequential function charts as function blocks in control system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05150814A (en) * 1991-11-30 1993-06-18 Fuji Electric Co Ltd Programmable controller
JPH06242810A (en) * 1993-02-18 1994-09-02 Fuji Electric Co Ltd Programmable controller
JP2005332370A (en) * 2004-04-19 2005-12-02 Toshiba Corp Control unit
JP2006195590A (en) * 2005-01-11 2006-07-27 Fuji Electric Systems Co Ltd Programmable controller system, and controller and program therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05150814A (en) * 1991-11-30 1993-06-18 Fuji Electric Co Ltd Programmable controller
JPH06242810A (en) * 1993-02-18 1994-09-02 Fuji Electric Co Ltd Programmable controller
JP2005332370A (en) * 2004-04-19 2005-12-02 Toshiba Corp Control unit
JP2006195590A (en) * 2005-01-11 2006-07-27 Fuji Electric Systems Co Ltd Programmable controller system, and controller and program therefor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250819A (en) * 2009-04-14 2010-11-04 General Electric Co <Ge> Method for executing sequential function charts as function blocks in control system
US8903520B2 (en) 2009-04-14 2014-12-02 General Electric Company Method for executing sequential function charts as function blocks in a control system
CN105404232A (en) * 2009-04-14 2016-03-16 通用电气公司 Method for executing sequential function charts as function blocks in a control system

Also Published As

Publication number Publication date
JP4747990B2 (en) 2011-08-17

Similar Documents

Publication Publication Date Title
CN105911885B (en) Industrial control unit (ICU) for improving industrial control system
JP5291912B2 (en) Method and dynamic modifier functional block for modifying and changing the operation of a functional block used in a process control system
US8806470B2 (en) System, method, and apparatus for software maintenance of sensor and control systems
US8893144B2 (en) Systems and methods for parallel execution of a portion of a script by interpreting comments in the script as parallel control statements
CN103207797A (en) Capsule type customized updating method based on universal extensible firmware interface firmware system
JPWO2013080332A1 (en) Project data creation device and programmable display
JP5757098B2 (en) Program creation support apparatus and program creation support method
JP4747990B2 (en) Programmable controller
JP4319082B2 (en) Programming system
JP2013084112A (en) Programmable controller system, programming device thereof, programmable controller, program and debug method
JP2005310144A (en) Synchronous formal language for programming deterministic finite state machine
JP5566473B2 (en) System design equipment
US20130218300A1 (en) Method for operating an automation system
JP6119452B2 (en) Programmable controller system, its support device, programmable controller, program
JP2007065914A (en) Screen generation device and program, and recording medium recording program
JP4760607B2 (en) Programmable controller
JP2017157219A (en) Controlled provision of controlled data
Zyubin Using process-oriented programming in LabVIEW
US20230315038A1 (en) Method and system for providing engineering of an industrial device in a cloud computing environment
JP6455096B2 (en) Control system, its support device, programmable control device
JP4877257B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
WO2016167797A1 (en) Morphed instruction according to configuration update
JP7499966B2 (en) Control device and address management method
WO2015019421A1 (en) Program development method for embedded software, programming device, and embedded device
JP6295914B2 (en) Programmable controller system, its support device, programmable controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090513

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110125

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110322

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110502

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4747990

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140527

Year of fee payment: 3