Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4853370B2 - Programmable logic controller and programmable logic controller memory management method - Google Patents
[go: Go Back, main page]

JP4853370B2 - Programmable logic controller and programmable logic controller memory management method - Google Patents

Programmable logic controller and programmable logic controller memory management method Download PDF

Info

Publication number
JP4853370B2
JP4853370B2 JP2007113781A JP2007113781A JP4853370B2 JP 4853370 B2 JP4853370 B2 JP 4853370B2 JP 2007113781 A JP2007113781 A JP 2007113781A JP 2007113781 A JP2007113781 A JP 2007113781A JP 4853370 B2 JP4853370 B2 JP 4853370B2
Authority
JP
Japan
Prior art keywords
instance
area
pou
storage area
programmable logic
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.)
Active
Application number
JP2007113781A
Other languages
Japanese (ja)
Other versions
JP2008269449A (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.)
Meidensha Corp
Original Assignee
Meidensha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meidensha Corp filed Critical Meidensha Corp
Priority to JP2007113781A priority Critical patent/JP4853370B2/en
Publication of JP2008269449A publication Critical patent/JP2008269449A/en
Application granted granted Critical
Publication of JP4853370B2 publication Critical patent/JP4853370B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、プログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法であって、例えば、メモリ管理方法に関するものである。   The present invention relates to a programmable logic controller and a programmable logic controller memory management method, for example, a memory management method.

今日では、コントローラの動作は専用のプログラムによって制御されることが、一般的になっている(例えば、特許文献1及び2)。例えば、そのプログラムの記述言語は、IEC(International Electrotechnical Commission)61131−3規格に準拠した言語などが使用される。   Nowadays, the operation of the controller is generally controlled by a dedicated program (for example, Patent Documents 1 and 2). For example, the language of the program is based on the IEC (International Electrotechnical Commission) 61131-3 standard.

その言語によってプログラミングされたPLC(Programmable Logic Controller;プログラマブルロジックコントローラ)中のプログラムを、その動作中にオンライン変更することは、困難であることも知られている。   It is also known that it is difficult to change a program in a PLC (Programmable Logic Controller) programmed by the language during the operation.

ここで、一般的なPLCメモリ管理方法を図4に基づいて以下に説明する。なお、図4は、一般的なPLC内のメモリ空間を表す概念図である。   Here, a general PLC memory management method will be described below with reference to FIG. FIG. 4 is a conceptual diagram showing a memory space in a general PLC.

通常、PLC中のプログラムは、図4中の符号1で示されるPOU(Program Organization Unit)によって構成されている。   Usually, the program in the PLC is configured by a POU (Program Organization Unit) indicated by reference numeral 1 in FIG.

なお、前記POU1は、アルゴリズム(即ち、プログラムコード)1b,該アルゴリズム1bで使用される変数定義1a,該POU1中の変数定義1aに対応するインスタンスを格納する領域(以下、インスタンス領域と称する)1d,該インスタンス領域1dを格納する領域(以下、インスタンス格納領域と称する)1cを、PLCの記憶装置(即ち、メモリ)内に有している。即ち、POU毎にインスタンス格納領域を有しており、さらに、該インスタンス格納領域内部に変数定義に対応するインスタンス領域を有していることになる。一般的には、用途別に1つのPOUに対して複数のインスタンス領域を有することがある。   The POU 1 includes an algorithm (ie, program code) 1b, a variable definition 1a used in the algorithm 1b, and an area for storing an instance corresponding to the variable definition 1a in the POU 1 (hereinafter referred to as an instance area) 1d. , A storage area (namely, memory) of the PLC has an area (hereinafter referred to as an instance storage area) 1c for storing the instance area 1d. That is, each POU has an instance storage area, and further, an instance area corresponding to the variable definition is provided in the instance storage area. Generally, there may be a plurality of instance areas for one POU for each application.

また、前記プログラムの実行単位にはタスクが存在し、該タスク内に任意のPOUを登録し実行できるものである。   A task exists in the execution unit of the program, and an arbitrary POU can be registered and executed in the task.

例えば、前記プログラムが変更された場合、前記POU1のインスタンス領域1d(あるいは、インスタンス格納領域1c)のアドレスも変更されてしまうことがあるため、該プログラムのオンライン変更を困難にしている。   For example, when the program is changed, the address of the instance area 1d (or instance storage area 1c) of the POU 1 may be changed, which makes it difficult to change the program online.

また、前記の言語によるプログラミングの特徴は、ユーザがインスタンス領域の位置のアドレスを意識しないことである。しかし、動作中プログラムの変更を行うためには、その動作中プログラムのインスタンス領域を確認し、その変更のための新規プログラムのインスタンス領域を、既存のプログラムが使っていない領域に配置する必要がある。
特開平10−207512(段落[0020]〜[0026]等)。 特開2001−142510(段落[0023]〜[0028]等)。
A feature of programming in the language is that the user is not aware of the address of the location of the instance area. However, in order to change the running program, it is necessary to check the instance area of the running program and to place the instance area of the new program for the change in an area that is not used by the existing program. .
JP-A-10-207512 (paragraphs [0020] to [0026] etc.). JP 2001-142510 (paragraphs [0023] to [0028] etc.).

前述のようなプログラムをオンライン変更するためには、該プログラムの実行に使用されるインスタンスが格納されているインスタンス領域の内容及びアドレスを変更しないようにすることが必要である。   In order to change the program as described above online, it is necessary not to change the contents and address of the instance area in which the instance used to execute the program is stored.

例えば、PLCに対してプログラム(即ち、POU)を追加した場合、該POUを追加した分だけ、使用するインスタンス容量が大きくなる。そのため、前記POUに対応するインスタンス領域のための空き領域が無かった場合には、オンライン変更はできないことになる。   For example, when a program (i.e., POU) is added to the PLC, the instance capacity to be used is increased by the added POU. Therefore, if there is no free area for the instance area corresponding to the POU, online change cannot be performed.

前記のようなプログラム追加に対応するために、例えば、図5のように、POU作成時において、インスタンス格納領域1cの大きさに、予め余裕(即ち、所定の空き領域;例えば、図5中の空き領域f1)を持たせておくPLCも現存する。   In order to cope with the addition of the program as described above, for example, as shown in FIG. 5, when the POU is created, the size of the instance storage area 1c is set in advance (ie, a predetermined free area; for example, in FIG. There is also a PLC that has a free area f1).

しかし、前記のような空き領域f1は、POU毎に数W(Word)から数10Wの容量となることが一般的であり、この容量を超えるようなプログラム変更を行うことはできない。   However, the free area f1 as described above generally has a capacity of several W (Word) to several tens of W for each POU, and the program cannot be changed to exceed this capacity.

本発明は、前記課題に基づいてなされたものであり、追加するPOUのインスタンス領域を確保するために、POUのインスタンス格納領域をタスク毎に管理するプログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法を提供することにある。   The present invention has been made based on the above problems, and provides a programmable logic controller and a programmable logic controller memory management method for managing an instance storage area of a POU for each task in order to secure an instance area of the POU to be added. There is to do.

本発明は、前記課題の解決を図るために、請求項1記載の発明は、POUによって構成されたタスク毎にインスタンス格納領域プログラマブルロジックコントローラのメモリ内に確保し、前記POUのインスタンス領域を該インスタンス格納領域内に置いて管理するプログラマブルロジックコントローラであって、前記プログラマブルロジックコントローラが前記インスタンス格納領域内の空き領域の位置情報を提出する手段と、該プログラマブルロジックコントローラが追加されるPOUのインスタンス領域の位置情報を受け取る手段と、該追加されるPOUのインスタンス領域の位置情報に基づいて、前記インスタンス格納領域内に存在する空き領域中に、該追加されるPOUのインスタンス領域を確保する手段と、を含むことを特徴とする。 In order to solve the above problems, the present invention provides an instance storage area in a memory of a programmable logic controller for each task configured by a POU, and the instance area of the POU is allocated to the POU instance area. A programmable logic controller that is placed and managed in an instance storage area , wherein the programmable logic controller submits position information of an empty area in the instance storage area, and an instance area of the POU to which the programmable logic controller is added Means for receiving the position information of the POU, and means for securing the instance area of the added POU in the free area existing in the instance storage area based on the position information of the instance area of the added POU. characterized in that it comprises a To.

請求項2記載の発明は、請求項1記載の発明において、前記インスタンス格納領域とは独立に拡張インスタンス格納領域を確保し、追加されるPOUに該拡張インスタンス格納領域をアクセスさせる手段を含むことを特徴とする。 The invention according to claim 2 includes means for securing an extended instance storage area independently of the instance storage area and allowing the added POU to access the extended instance storage area in the invention according to claim 1. Features.

請求項3記載の発明は、POUによって構成されたタスク毎にインスタンス格納領域プログラマブルロジックコントローラのメモリ内に確保し、前記POUのインスタンス領域を該インスタンス格納領域内に置いて管理するプログラマブルロジックコントローラメモリ管理方法であって、前記プログラマブルロジックコントローラが前記インスタンス格納領域内の空き領域の位置情報を提出し、該プログラマブルロジックコントローラが追加されるPOUのインスタンス領域の位置情報を受け取り、該追加されるPOUのインスタンス領域の位置情報に基づいて、前記インスタンス格納領域内に存在する空き領域中に、該追加されるPOUのインスタンス領域を確保する、ことを特徴とする。 According to a third aspect of the present invention, an instance storage area is secured in the memory of the programmable logic controller for each task configured by the POU, and the instance area of the POU is placed in the instance storage area for management. The programmable logic controller submits position information of an empty area in the instance storage area, receives position information of an instance area of the POU to which the programmable logic controller is added, and Based on the position information of the instance area, an instance area of the added POU is secured in a free area existing in the instance storage area .

請求項4記載の発明は、請求項3記載の発明において、前記インスタンス格納領域とは独立に拡張インスタンス格納領域を確保し、追加されるPOUに該拡張インスタンス格納領域をアクセスさせることを特徴とする。 According to a fourth aspect of the present invention, in the third aspect of the present invention, an extended instance storage area is secured independently of the instance storage area, and the POU to be added is made to access the extended instance storage area. .

前記の請求項1,4記載の発明によれば、POUのインスタンス領域を統合できる。   According to the first and fourth aspects of the present invention, the POU instance areas can be integrated.

前記の請求項2,5記載の発明によれば、追加されるPOUのインスタンス領域の位置を精細に指定できる。   According to the second and fifth aspects of the present invention, the position of the instance area of the POU to be added can be specified precisely.

前記の請求項3,6記載の発明によれば、独立したインスタンス格納領域を確保できる。   According to the third and sixth aspects of the invention, an independent instance storage area can be secured.

以上示したように、請求項1,4記載の発明によれば、タスク毎にインスタンス格納領域を管理できる。   As described above, according to the first and fourth aspects of the invention, the instance storage area can be managed for each task.

請求項2,5記載の発明によれば、インスタンス格納領域を無駄なく使用できる。   According to the second and fifth aspects of the invention, the instance storage area can be used without waste.

請求項3,6記載の発明によれば、動作中のPLC(もしくは、PLC中のプログラム)に影響を及ぼさずに、POU追加を行うことができる。   According to the third and sixth aspects of the invention, POU addition can be performed without affecting the operating PLC (or the program in the PLC).

これらを以ってPLCの分野に貢献できる。   These can contribute to the field of PLC.

以下、本発明の実施の第1乃至第3形態におけるプログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法を図面等に基づいて詳細に説明する。   Hereinafter, a programmable logic controller and a programmable logic controller memory management method according to first to third embodiments of the present invention will be described in detail with reference to the drawings.

本発明の実施の第1乃至第3形態は、PLCのメモリ内において、POUのインスタンス格納領域をタスク毎に確保し、該インスタンス格納領域内に該POUのインスタンス領域を置いて、該PLCのメモリを管理するプログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法である。   In the first to third embodiments of the present invention, the POU instance storage area is secured for each task in the PLC memory, and the POU instance area is placed in the instance storage area. A programmable logic controller and a programmable logic controller memory management method.

まず、本実施の第1乃至第3形態におけるPLCのプログラム変更時の装置構成を図6に基づいて説明する。   First, an apparatus configuration when changing the PLC program in the first to third embodiments will be described with reference to FIG.

図6中のPADT(Programing And Debug Tool)10とPLC本体11は、通信回線(或いは、伝送回線)100で接続されおり、PADT10からの指示によって、PLC本体11中のプログラムを変更する。   A programming and debugging tool (PADT) 10 and the PLC main body 11 in FIG. 6 are connected by a communication line (or transmission line) 100, and a program in the PLC main body 11 is changed according to an instruction from the PADT 10.

次に、本実施の第1乃至第3形態におけるPLC本体の構成を図7に基づいて説明する。   Next, the configuration of the PLC main body in the first to third embodiments will be described with reference to FIG.

図7中のPLC本体11は、PLC本体11中の各装置を制御し、PADT10との通信を行う管理CPU(Central Processing Unit)11a,POUを格納し管理するプログラムメモリ11b,各POUに対応するインスタンス格納領域を有するデータメモリ11cを備えている。例えば、図7中のPOU1に対応するインスタンス格納領域はインスタンス格納領域i1、図7中のPOU2に対応するインスタンス格納領域はインスタンス格納領域in、図7中のPOUnに対応するインスタンス格納領域はインスタンス格納領域i2となる。 The PLC main body 11 in FIG. 7 controls each device in the PLC main body 11 and corresponds to a management CPU (Central Processing Unit) 11a that communicates with the PADT 10, a program memory 11b that stores and manages the POU, and each POU. A data memory 11c having an instance storage area is provided. For example, the instance storage area corresponding to POU1 in Figure 7 instance storage area i 1, instance storage areas instance storage area i n that corresponds to POU2 in FIG instance storage area corresponding to POUn in FIG. 7 an instance storage area i 2.

[本実施の第1形態]
本実施の第1形態は、タスク単位にインスタンス格納領域を確保するプログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法である。
[First Embodiment]
The first embodiment is a programmable logic controller and a programmable logic controller memory management method that secures an instance storage area for each task.

POU毎にインスタンス格納領域を確保した場合、各々のPOUに空き領域が生じ、その空き領域が無駄な領域になり易い。そこで、プログラム変更を行う場合、タスク(即ち、POUの集合体)単位に変更が行われることが多いことに着目し、タスク中のPOU毎に割り当てられたインスタンス格納領域を統合することによって、POU毎の空き領域も統合し、無駄な領域を作らないようにする。   When an instance storage area is secured for each POU, an empty area is generated in each POU, and the empty area tends to become a useless area. Therefore, when changing the program, paying attention to the fact that the change is often performed in units of tasks (that is, a collection of POUs), and by integrating the instance storage areas allocated for each POU in the task, Integrate each free area to avoid creating a useless area.

即ち、本実施の第1形態では、インスタンス領域をPOU単位で管理するのではなく、タスク単位で管理することを特徴とする。   That is, the first embodiment is characterized in that the instance area is not managed in units of POUs but managed in units of tasks.

本実施の第1形態を図1に基づいて以下に説明する。なお、図1は本実施の第1形態におけるPLC内のメモリ空間を表す概念図である。   The first embodiment will be described below with reference to FIG. FIG. 1 is a conceptual diagram showing a memory space in the PLC according to the first embodiment.

まず、図1中のPOU1とPOU2によって1タスクが構成されているものとする。さらに、前記タスクに対応するインスタンス格納領域D1がPLCの記憶装置(即ち、メモリ)内に確保されているものとする。即ち、前記インスタンス格納領域は、1タスクを生成する際に、PLCによってメモリ中に確保されることになる。   First, it is assumed that one task is constituted by POU1 and POU2 in FIG. Furthermore, it is assumed that an instance storage area D1 corresponding to the task is secured in a storage device (that is, a memory) of the PLC. That is, the instance storage area is secured in the memory by the PLC when one task is generated.

例えば、PLCによってメモリ内に領域が確保されると、PLC内に該領域の開始アドレス及び終了アドレスが登録される。そして、前記タスク中のPOUからPLCに該領域に対するアクセス指示があった場合に、それらの開始アドレス及び終了アドレスが参照されて、該領域にアクセスされる。   For example, when an area is secured in the memory by the PLC, the start address and end address of the area are registered in the PLC. When the POU in the task gives an access instruction to the area from the PLC, the start address and the end address are referred to and the area is accessed.

また、前記のPOU1,POU2は、インスタンス格納領域D1中のインスタンス領域d1にアクセスできるように、アルゴリズム1b,アルゴリズム2bを設計(即ち、プログラミング)する。例えば、前記のプログラミングとしては、POU中の変数定義にインスタンス格納領域の開始アドレスから所望のインスタンス領域までのオフセットを設定しても良い。   The POU1 and POU2 design (ie, program) the algorithms 1b and 2b so that the instance area d1 in the instance storage area D1 can be accessed. For example, as the programming described above, an offset from the start address of the instance storage area to a desired instance area may be set in the variable definition in the POU.

前記のようなオフセットを利用してPOUから該POUのインスタンスに対するアクセス方法は、例えば、次の通りである。   For example, a method of accessing an instance of the POU from the POU using the offset as described above is as follows.

まず、PLCが、タスク単位のインスタンス格納領域を所定の位置及びサイズで該PLCのメモリ内に確保する。   First, the PLC secures an instance storage area for each task in a memory of the PLC at a predetermined position and size.

次に、前記POUが、該POUのインスタンスに対するアクセスを、変数定義中のオフセットに基づいてPLCに指示する。   Next, the POU instructs the PLC to access the instance of the POU based on the offset in the variable definition.

次に、前記PLCが、前記インスタンス格納領域の開始アドレスに前記オフセットを加えて得られたアドレスに基づいて、前記POUに前記インスタンス格納領域中のインスタンス領域に対してアクセスさせる。   Next, the PLC causes the POU to access the instance area in the instance storage area based on the address obtained by adding the offset to the start address of the instance storage area.

例えば、前記タスクに対して図1中のPOU3を新たに追加する場合、前記のインスタンス格納領域D1中の空き領域f2に、該POU3のインスタンス領域を新たに確保することになる。   For example, when a POU 3 in FIG. 1 is newly added to the task, a new instance area of the POU 3 is secured in the empty area f2 in the instance storage area D1.

以上のような本実施の第1形態によれば、プログラム変更(即ち、POU追加)に係るインスタンス領域を、タスク毎のインスタンス格納領域内の空き領域から容易に確保できる。   According to the first embodiment as described above, the instance area related to the program change (ie, POU addition) can be easily secured from the free area in the instance storage area for each task.

例えば、空き領域として1KW(KiloWord)を予め確保できれば、1KW以内のオンライン変更ができることになる。通常、1KW程度あれば、一般的なプログラムの変更に対して十分である。   For example, if 1 KW (KiloWord) can be secured in advance as a free area, online change within 1 KW can be performed. Usually, about 1 KW is sufficient for a general program change.

[本実施の第2形態]
本実施の第2形態は、インスタンス領域の位置情報を指定して、該インスタンス領域を確保するプログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法である。
[Second Embodiment]
The second embodiment of the present invention is a programmable logic controller and a programmable logic controller memory management method that designates position information of an instance area and secures the instance area.

本実施の第2形態の前提として、タスク単位に確保されたインスタンス格納領域中には空き領域(即ち、未使用領域)が存在するものとする。その前提の下に、本実施の第2形態は、前記の空き領域中に新たなインスタンス領域を確保する際に、その新たなインスタンス領域の位置情報を指定して確保するものである。   As a premise of the second embodiment, it is assumed that there is an empty area (that is, an unused area) in the instance storage area reserved for each task. Under the premise, in the second embodiment, when a new instance area is secured in the empty area, the position information of the new instance area is designated and secured.

なお、領域の位置情報は、例えば、開始アドレスまたは終了アドレス、それらに加えて好ましくは、その領域のサイズ、によって表現されたものとする。   Note that the position information of the area is expressed by, for example, the start address or the end address, and preferably the size of the area.

本実施の第2形態を図2に基づいて以下に説明する。なお、図2は本実施の第2形態におけるPLC内のメモリ空間を表す概念図である。   The second embodiment will be described below with reference to FIG. FIG. 2 is a conceptual diagram showing a memory space in the PLC according to the second embodiment.

まず、図2中のPOU1及びPOU2は、インスタンス格納領域D1を使用しているものとする。   First, it is assumed that POU1 and POU2 in FIG. 2 use the instance storage area D1.

図2中のPOU3をPLCに追加する手順の例は次の通りである。   An example of a procedure for adding the POU 3 in FIG. 2 to the PLC is as follows.

まず、空き領域の位置情報の取得をPLCに対して指示する。なお、前記の指示の方法は、例えば、PLCに接続した端末からの通信(即ち、コマンドなど)によって指示する方法でも良い。   First, the PLC is instructed to acquire the position information of the free area. Note that the instruction method may be, for example, an instruction method by communication (ie, a command or the like) from a terminal connected to the PLC.

次に、前記PLCは空き領域f2の位置情報を提出する。なお、前記の提出の方法は、例えば、PLCに接続された端末に対して、PLCが通信によって前記の位置情報を提出する方法でも良い。   Next, the PLC submits position information of the empty area f2. The submission method may be, for example, a method in which the PLC submits the position information through communication to a terminal connected to the PLC.

次に、前記POU3が空き領域f2にアクセスできるように、前記の空き領域f2の位置情報に基づいて該POU3を作成する。   Next, the POU 3 is created based on the position information of the free area f2 so that the POU 3 can access the free area f2.

例えば、前記POU3のインスタンス領域が前記の空き領域f2に収まるように、インスタンス格納領域D1の開始アドレスからPOU3のインスタンス領域までのオフセットを決定し、該POU3中の変数定義3aに該オフセットが設定されるように該POU3を作成する。 For example, an offset from the start address of the instance storage area D1 to the instance area of POU3 is determined so that the instance area of the POU3 fits in the empty area f2, and the offset is set in the variable definition 3a in the POU3. The POU 3 is created as follows.

次に、前記POU3のインスタンス領域の位置情報を前記PLCに対して指定し、該POU3を該PLCに新たに追加する。前記の指定方法は、例えば、POUを追加するためのコマンド中に前記の位置情報を含め、PLCに対して指示する方法でもよい。   Next, the position information of the instance area of the POU 3 is designated for the PLC, and the POU 3 is newly added to the PLC. The designation method may be, for example, a method of instructing the PLC by including the position information in a command for adding a POU.

そして、前記PLCは、前記POU3のインスタンス領域の位置情報に基づいて、空き領域f2内に該POU3のインスタンス領域を確保する。   Then, the PLC secures the instance area of the POU 3 in the free area f2 based on the position information of the instance area of the POU 3.

以上のような本実施の第2形態によれば、PLCのメモリ上の的確な位置に、インスタンス領域を確保することができる。   According to the second embodiment as described above, the instance area can be secured at an appropriate position on the PLC memory.

[本実施の第3形態]
本実施の第3形態は、独立に拡張されたインスタンス格納領域を確保するプログラマブルロジックコントローラおよびプログラマブルロジックコントローラメモリ管理方法である。
[Third Embodiment]
The third embodiment is a programmable logic controller and a programmable logic controller memory management method that secures an independently expanded instance storage area.

即ち、本実施の第3形態は、タスク単位に確保されたインスタンス格納領域中の空き領域が不足した(即ち、インスタンス格納領域がインスタンスで満たされている)場合に、該インスタンス格納領域とは独立に確保された(或いは、拡張された)インスタンス格納領域(以後、拡張インスタンス格納領域と称する)を確保及び使用して、その不足を補うものである。   That is, the third embodiment is independent of the instance storage area when the free area in the instance storage area reserved for each task is insufficient (that is, the instance storage area is filled with instances). The instance storage area secured (or expanded) in (1) is secured and used to make up for the shortage.

なお、前記の拡張インスタンス格納領域は、PLCの記憶装置内に1つ確保され、該PLC内の各POUが共通に使用できる領域である。   Note that one extended instance storage area is secured in the PLC storage device and can be used in common by each POU in the PLC.

本実施の第3形態を図3に基づいて以下に説明する。なお、図3は本実施の第3形態におけるPLC内のメモリ空間を表す概念図である。   The third embodiment will be described below with reference to FIG. FIG. 3 is a conceptual diagram showing a memory space in the PLC according to the third embodiment.

まず、図3中のPOU1及びPOU2は、インスタンス格納領域D1を使用しているものとする。さらに、空き領域f2は追加POUのために必要なサイズを有していないものとする。   First, it is assumed that POU1 and POU2 in FIG. 3 use the instance storage area D1. Furthermore, it is assumed that the empty area f2 does not have a size necessary for the additional POU.

図3中のPOU3をPLCに追加する場合、該POU3が拡張インスタンス格納領域D2にアクセスできるように該POU3を作成する。例えば、前記POU3中の変数定義3aに拡張インスタンス格納領域D2の開始アドレスから該POU3のインスタンス領域までのオフセットが設定されるように、該POU3を作成する。   When the POU 3 in FIG. 3 is added to the PLC, the POU 3 is created so that the POU 3 can access the extended instance storage area D2. For example, the POU 3 is created so that an offset from the start address of the extended instance storage area D2 to the instance area of the POU 3 is set in the variable definition 3a in the POU 3.

また、前記POU3から拡張インスタンス格納領域D2に対するアクセス方法は、例えば、次の通りである。   The access method from the POU 3 to the extended instance storage area D2 is, for example, as follows.

まず、PLCが、前記の拡張インスタンス格納領域D2を所定の位置及びサイズで該PLCのメモリ内に確保する。   First, the PLC secures the extended instance storage area D2 in a memory of the PLC at a predetermined position and size.

次に、前記POU3が該POU3のインスタンスに対するアクセスを、変数定義3a中のオフセットに基づいてPLCに指示する。なお、前記オフセットは、拡張インスタンス格納領域D2の開始アドレスから該POU3のインスタンス領域までのオフセットである。   Next, the POU 3 instructs the PLC to access the instance of the POU 3 based on the offset in the variable definition 3a. The offset is an offset from the start address of the extended instance storage area D2 to the instance area of the POU3.

次に、前記PLCが、前記拡張インスタンス格納領域D2の開始アドレスに前記オフセットを加算して得られたアドレス(即ち、インスタンス領域の開始アドレス)に基づいて、POUに該拡張インスタンス格納領域D2に対してアクセスさせる。   Next, based on the address obtained by adding the offset to the start address of the extension instance storage area D2 (that is, the start address of the instance area), the PLC sends the POU to the extension instance storage area D2. To access.

以上のような本実施の第3形態によれば、前記の拡張インスタンス格納領域D2が、インスタンス格納領域D1から独立しているため、前記のインスタンス格納領域に影響を及ぼさずに、オンライン変更(例えば、PLCに対するPOU追加)を行うことができる。   According to the third embodiment as described above, since the extended instance storage area D2 is independent of the instance storage area D1, online change (for example, without affecting the instance storage area) , POU addition to PLC).

以上、本発明において、記載された具体例に対してのみ詳細に説明したが、本発明の技術思想の範囲で多彩な変形および修正が可能であることは、当業者にとって明白なことであり、このような変形および修正が特許請求の範囲に属することは当然のことである。   Although the present invention has been described in detail only for the specific examples described above, it is obvious to those skilled in the art that various changes and modifications are possible within the scope of the technical idea of the present invention. Such variations and modifications are naturally within the scope of the claims.

例えば、本実施の第2形態における位置情報は、インスタンス格納領域の開始アドレスからのオフセット、それらに加えて好ましくは、その領域のサイズ、によって表現されたものでも良い。即ち、前記のオフセットは、PLCによってインスタンス格納領域の開始アドレスに基づいたアドレスに変換される。   For example, the position information in the second embodiment may be expressed by an offset from the start address of the instance storage area, and preferably in addition to them, the size of the area. That is, the offset is converted into an address based on the start address of the instance storage area by the PLC.

本実施の第1形態におけるPLC内のメモリ空間概念図。The memory space conceptual diagram in PLC in the 1st Embodiment. 本実施の第2形態におけるPLC内のメモリ空間概念図。The conceptual diagram of the memory space in PLC in the 2nd Embodiment. 本実施の第3形態におけるPLC内のメモリ空間概念図。The conceptual diagram of the memory space in PLC in the 3rd Embodiment. 一般的なPLC内のメモリ空間の例1を表す概念図。The conceptual diagram showing the example 1 of the memory space in a general PLC. 一般的なPLC内のメモリ空間の例2を表す概念図。The conceptual diagram showing the example 2 of the memory space in general PLC. PLCのプログラム変更時の装置構成図。The apparatus block diagram at the time of the program change of PLC. PLC本体の構成図。The block diagram of the PLC main body.

符号の説明Explanation of symbols

1,2,3,n…POU
1a,2a,3a…変数定義
1b,2b,3b…アルゴリズム(プログラムコード)
1c…POU単位のインスタンス格納領域
1d…POU単位のインスタンス領域
10…PADT(Programing And Debug Tool)
11…PLC本体
100…通信回線(或いは、伝送回線)
11a…管理CPU
11b…プログラムメモリ
11c…データメモリ
f1…POU単位の空き領域
f2…タスク単位の空き領域
d1…タスク単位のインスタンス領域
1,i2,in…インスタンス格納領域
D1…タスク単位のインスタンス格納領域
D2…拡張インスタンス格納領域
1, 2, 3, n ... POU
1a, 2a, 3a ... Variable definition 1b, 2b, 3b ... Algorithm (program code)
1c: Instance storage area in POU units 1d: Instance area in POU units 10: PADT (Programming And Debug Tool)
11 ... PLC main body 100 ... Communication line (or transmission line)
11a ... Management CPU
11b ... Program memory 11c ... Data memory f1 ... Empty area in POU units f2 ... Empty area in task units d1 ... Instance areas in task units i 1 , i 2 , i n ... Instance storage areas D1 ... Instance storage areas in task units D2 ... Extended instance storage area

Claims (4)

POUによって構成されたタスク毎にインスタンス格納領域プログラマブルロジックコントローラのメモリ内に確保し、前記POUのインスタンス領域を該インスタンス格納領域内に置いて管理するプログラマブルロジックコントローラであって、
前記プログラマブルロジックコントローラが前記インスタンス格納領域内の空き領域の位置情報を提出する手段と、
該プログラマブルロジックコントローラが追加されるPOUのインスタンス領域の位置情報を受け取る手段と、
該追加されるPOUのインスタンス領域の位置情報に基づいて、前記インスタンス格納領域内に存在する空き領域中に、該追加されるPOUのインスタンス領域を確保する手段と、
を含むことを特徴とするプログラマブルロジックコントローラ。
A programmable logic controller that secures an instance storage area in a memory of a programmable logic controller for each task configured by the POU, and manages the instance area of the POU in the instance storage area ,
Means for the programmable logic controller to submit location information of an empty area in the instance storage area;
Means for receiving location information of an instance area of a POU to which the programmable logic controller is added;
Means for securing an instance area of the added POU in a free area existing in the instance storage area based on position information of the instance area of the added POU;
Programmable logic controller, which comprises a.
前記インスタンス格納領域とは独立に拡張インスタンス格納領域を確保し、追加されるPOUに該拡張インスタンス格納領域をアクセスさせる手段を含むことを特徴とする請求項1記載のプログラマブルロジックコントローラ。 2. The programmable logic controller according to claim 1 , further comprising means for securing an extended instance storage area independently of the instance storage area and causing the added POU to access the extended instance storage area. POUによって構成されたタスク毎にインスタンス格納領域プログラマブルロジックコントローラのメモリ内に確保し、前記POUのインスタンス領域を該インスタンス格納領域内に置いて管理するプログラマブルロジックコントローラメモリ管理方法であって、
前記プログラマブルロジックコントローラが前記インスタンス格納領域内の空き領域の位置情報を提出し、
該プログラマブルロジックコントローラが追加されるPOUのインスタンス領域の位置情報を受け取り、
該追加されるPOUのインスタンス領域の位置情報に基づいて、前記インスタンス格納領域内に存在する空き領域中に、該追加されるPOUのインスタンス領域を確保する、
ことを特徴とするプログラマブルロジックコントローラメモリ管理方法。
A programmable logic controller memory management method for securing an instance storage area in a memory of a programmable logic controller for each task configured by a POU, and managing the POU instance area in the instance storage area ,
The programmable logic controller submits position information of an empty area in the instance storage area,
Receiving position information of an instance area of the POU to which the programmable logic controller is added;
Based on the location information of the instance area of the added POU, the instance area of the added POU is secured in the free area existing in the instance storage area.
A programmable logic controller memory management method.
前記インスタンス格納領域とは独立に拡張インスタンス格納領域を確保し、追加されるPOUに該拡張インスタンス格納領域をアクセスさせることを特徴とする請求項3記載のプログラマブルロジックコントローラメモリ管理方法。 4. The programmable logic controller memory management method according to claim 3 , wherein an extended instance storage area is secured independently of the instance storage area, and the added POU is accessed by the added POU.
JP2007113781A 2007-04-24 2007-04-24 Programmable logic controller and programmable logic controller memory management method Active JP4853370B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007113781A JP4853370B2 (en) 2007-04-24 2007-04-24 Programmable logic controller and programmable logic controller memory management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007113781A JP4853370B2 (en) 2007-04-24 2007-04-24 Programmable logic controller and programmable logic controller memory management method

Publications (2)

Publication Number Publication Date
JP2008269449A JP2008269449A (en) 2008-11-06
JP4853370B2 true JP4853370B2 (en) 2012-01-11

Family

ID=40048831

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007113781A Active JP4853370B2 (en) 2007-04-24 2007-04-24 Programmable logic controller and programmable logic controller memory management method

Country Status (1)

Country Link
JP (1) JP4853370B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102009033967A1 (en) * 2009-07-21 2011-01-27 Robert Bosch Gmbh Method for programming a programmable logic controller with resistant data storage

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3389592B2 (en) * 1997-01-27 2003-03-24 オムロン株式会社 Programmable controller
JP2001142510A (en) * 1999-11-11 2001-05-25 Omron Corp Controller system and programming tool and controller
JP2006018759A (en) * 2004-07-05 2006-01-19 Toshiba Corp Control apparatus and method

Also Published As

Publication number Publication date
JP2008269449A (en) 2008-11-06

Similar Documents

Publication Publication Date Title
KR101860252B1 (en) Plotting device and control system
JP5144409B2 (en) Inverter control system, peripheral equipment of inverter device
JP6312648B2 (en) Numerical control system linked with tool catalog database
JP6378144B2 (en) Servo control system having learning control device having function of optimizing learning memory allocation
JP4853370B2 (en) Programmable logic controller and programmable logic controller memory management method
CN107621946B (en) Software development method, device and system
CN104516929A (en) Method and device for file system
CN112272821B (en) Control device and control method
JP2018502391A (en) Computer-implemented method for displaying a user interface
CN114116197B (en) Programmable logic device and its memory management system
JP5407631B2 (en) Circuit information generation device, function execution system, and program
JP6746040B1 (en) Instruction conversion device, method, and program
JP4821717B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
JP6119452B2 (en) Programmable controller system, its support device, programmable controller, program
JP4867703B2 (en) Numerical control device, control program, and storage medium
JPH113105A (en) Programming device for programmable controller
US9459999B2 (en) Memory control method for a computer system
JP4877257B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
JP2014099066A (en) Programmable controller system, support device for the same, and programmable controller
JP2018018248A (en) Programmable controller
CN109932997A (en) A kind of programmable logic controller (PLC) core system
KR100714103B1 (en) File Management Methods and Smart Cards on Smart Cards
JP4479558B2 (en) Programmable controller and programming tool thereof
CN108228768A (en) Chip information querying method, device, equipment and storage medium
JP2008090635A (en) Programmable controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110323

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110523

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110523

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

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

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

Free format text: PAYMENT UNTIL: 20141104

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4853370

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150