WO2016162935A1 - 非オブジェクト指向言語プログラム連携装置、方法およびプログラム - Google Patents

非オブジェクト指向言語プログラム連携装置、方法およびプログラム Download PDF

Info

Publication number
WO2016162935A1
WO2016162935A1 PCT/JP2015/060789 JP2015060789W WO2016162935A1 WO 2016162935 A1 WO2016162935 A1 WO 2016162935A1 JP 2015060789 W JP2015060789 W JP 2015060789W WO 2016162935 A1 WO2016162935 A1 WO 2016162935A1
Authority
WO
WIPO (PCT)
Prior art keywords
oriented language
language program
program
variable
oriented
Prior art date
Application number
PCT/JP2015/060789
Other languages
English (en)
French (fr)
Inventor
許斐 浩祐
Original Assignee
株式会社アイ・エル・シー
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 株式会社アイ・エル・シー filed Critical 株式会社アイ・エル・シー
Priority to PCT/JP2015/060789 priority Critical patent/WO2016162935A1/ja
Priority to JP2017510820A priority patent/JP6596073B2/ja
Publication of WO2016162935A1 publication Critical patent/WO2016162935A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to a non-object-oriented language program linkage device, a non-object-oriented language program linkage method, and a non-object-oriented language program linkage program for creating a sequence diagram.
  • An FBD program written in FBD is a program structured and modularized using graphics as compared with a ladder program, but is not as general purpose as a ladder program.
  • ladder programs and FBD programs are dedicated non-object-oriented language programs, respectively, and cannot be developed in cooperation with object-oriented language programs such as C ++ and Java (registered trademark) which are currently generalized. .
  • ladder and FBD programs are dedicated non-object-oriented language programs, so they can access variables and functions defined based on language use, but are generated based on object-oriented language class definitions. Access to the specified object is not allowed.
  • the present invention has been made in view of the above problems, and an object of the present invention is to be able to link a non-object-oriented language program with an object-oriented language program.
  • the non-object-oriented language program linkage apparatus of the present invention sets an object class definition in a description of an object-oriented language program, and sets the object name and variable name of the object in the description of the non-object-oriented language program. And a processing engine for accessing the variable of the object of the object-oriented language program from the non-object-oriented language program.
  • the processing engine makes an access request to the object-oriented language program to the object variable based on a predetermined access method for the non-object-oriented language program.
  • the processing engine is characterized in that the object-oriented language program executes a process based on an access request to the object variable, and the execution result is returned to the non-object-oriented language program.
  • the processing engine generates an intermediate code of the non-object-oriented language program, a first area accessible by the non-object-oriented language program, and object variables and functions accessible by the non-object-oriented language program Are stored in memory, and a third area in which a service function for accessing a variable in the second area or calling a function is stored in the memory. If the variable of the object is in the first area, the value of the variable of the intermediate code is written in the corresponding first area. If the object is not in the first area when the intermediate code is interpreted, The service function of 3 areas is called.
  • the computer sets the object class definition in the description of the object-oriented language program, and sets the object name and variable name of the object in the description of the non-object-oriented language program. And processing for accessing the variable of the object of the object-oriented language program from the non-object-oriented language program.
  • the object class definition is set in the description of the object-oriented language program in the computer, and the object name and variable name of the object are set in the description of the non-object-oriented language program. And setting and executing a process of accessing the variable of the object of the object-oriented language program from the non-object-oriented language program.
  • FIG. 1 is a diagram illustrating an object access state of an object-oriented language program implemented by the non-object-oriented language program cooperation apparatus according to the embodiment.
  • FIG. 2A is a flowchart illustrating the contents of the cooperation processing executed by the non-object-oriented language program according to the embodiment.
  • FIG. 2B is a diagram for explaining cooperation processing executed by the non-object-oriented language program according to the embodiment.
  • FIG. 3 is a block diagram illustrating a hardware configuration example of the non-object-oriented language program cooperation device.
  • FIG. 1 is a diagram illustrating an object access state of an object-oriented language program implemented by the non-object-oriented language program cooperation apparatus according to the embodiment.
  • FIG. 1 shows a description example (ladder diagram, FBD diagram) of a ladder program 101 or FBD program 102 as a non-object-oriented language program, and the right side of FIG. 1 shows C ++ or Java as an object-oriented language program 103.
  • a description example is shown.
  • the ladder program 101 uses a ladder diagram showing a connection relationship for each circuit according to the circuit connection configuration.
  • the relays 112 and 113 are operated by operating the contact 111.
  • an object-oriented development environment is provided for non-object-oriented language programs (ladder program 101 and FBD program 102). Therefore, if each part is expressed in the ladder program 101 (ladder diagram) of FIG. 1 according to the description example of the object-oriented language program 103, the contact 111 is the object (MyObj.memberA), and the relays 112 and 113 are the objects respectively. It becomes a predetermined function (MOV 0 MyObj.memberB), (CALL MyObj.FuncA (100)).
  • the non-object-oriented language program (ladder program 101) 1.
  • To refer to (specify) an object variable click “Object name.Variable name”. 2.
  • “object name.operation name (argument)” Is specified. That is, the non-object-oriented language program side performs the above 1.
  • an object class definition 131 is set.
  • the FBD program 102 also expresses the same function as the ladder program 101.
  • the FBD program 102 expresses the processing result of the input (real address, variable) 122 for the function block (function) 121 in the form of an output (real address, variable) 123.
  • the description example on the object-oriented language program 103 side corresponds to a description example (program content) of a non-object-oriented language program (ladder program 101 or FBD program 102). Description examples of the object-oriented language program 103 will be described in order.
  • a class (MyClass) definition (object design diagram) 131 is performed.
  • This class definition 131 data definitions of members (member A, B) and functions (Func A, B) are defined.
  • an object generation description (MyObj) 132 is performed.
  • program description 133 is performed.
  • This example of the program description 133 includes reference to a member variable in the object, assignment to a member variable in the object, and calling of a member function (Method) in the object.
  • This program description (service function) 133 directly accesses an object (MyObj) 132 in its own program (object-oriented language program 103).
  • An object access request 141 is issued from the oriented language program (ladder program 101 or FBD program 102) to the object oriented language program 103.
  • an access method (communication method, function CALL, etc.) determined in advance between the object-oriented language program 103 and the non-object-oriented language program (ladder program 101 or FBD program 102) is used.
  • the object-oriented language program 103 returns the processing execution result 142 based on the access request 141 to the non-object-oriented language program (the ladder program 101 or the FBD program 102).
  • FIG. 2A is a flowchart showing the contents of the cooperation processing executed by the non-object-oriented language program according to the embodiment.
  • FIG. 2B is a diagram for explaining cooperation processing executed by the non-object-oriented language program according to the embodiment.
  • the processing engine 200 generates the intermediate code 210 of the ladder program 101 and stores it in the memory.
  • the contact 111 is an object (MyObj.memberA)
  • the relay 112 is a function for the object (MOV 0 D0)
  • the relay 113 is a function for the object (MOV 0 MyObj.memberB).
  • the processing engine 200 includes an area (area 1) 211 accessible by the non-object-oriented language program (ladder program 101) and an area (object or variable or function) accessible by the object-oriented language program 103 ( An area 2) 212 and a service function area (area 3) 213 for accessing the area 2 variable and calling the function are reserved on a predetermined memory.
  • These memory areas are reserved in advance by the processing engine 200 of the non-object-oriented language program (ladder program 101).
  • the processing engine 200 of the non-object-oriented language program (ladder program 101) is different from the processing engine on the object-oriented language program 103 side, one of the processing engines may reserve the area in advance.
  • the processing engine 200 interprets the first intermediate code (MOV 0 D0) 112 program (step S201). At this time, variables (area 1) 211 and functions (areas 2 and 3) 212 and 213 are stored in the intermediate code.
  • the processing engine 200 interprets the program of the next intermediate code (MOV 0 MyObj.memberB) 113 (step S203).
  • the processing engine 200 CALLs the service function in the area 3 (213) to obtain the intermediate code (MyObj.memberB).
  • a value “0” is set in (step S204).
  • the processing engine 200 executes processing based on the CALL (access request) 141 of the service function 133 on the object-oriented language program 103, and sends the processing execution result 142 to the non-object-oriented language program (ladder program 101) side. return.
  • the memory (area 1) accessible to the non-object-oriented language program (ladder program 101) and the object-oriented language program 103 are accessed during processing based on the description of the non-object-oriented language program (ladder program 101). It is divided into possible memories (areas 2 and 3).
  • areas 2 and 3 When the intermediate code is interpreted, if the non-object-oriented language program (ladder program 101) is assigned to an accessible memory (area 1), the value is set, and the non-object-oriented language program (ladder program 101) is set. If it is not assigned to the accessible memory (area 1), the service function of area 3 is CALLed.
  • the ladder program 101 can access functions defined in the object-oriented language program 103 as a non-object-oriented language program. That is, it is possible to access an object that is not in the language specification of the non-object-oriented language program (ladder program 101).
  • the ladder program 101 has been described in the above example, the function defined in the object-oriented language program 103 can be similarly accessed in the FBD program 102.
  • object-oriented processing such as faction and inheritance can be performed in the object-oriented language program 103.
  • a non-object-oriented language (FBD) program 102 (processing engine 200) can call an arbitrary faction and inherited processing (class, function) to the object-oriented language program 103.
  • a new YourClass that inherits the above MyClass can be easily added as a memberC that inherits the above membersA and B.
  • FIG. 3 is a block diagram illustrating a hardware configuration example of the non-object-oriented language program cooperation device.
  • a non-object-oriented language program cooperation device 300 includes a control unit (CPU) 301, a read-only memory (ROM) 302, a random access memory (RAM) 303, and a storage unit such as a semiconductor memory or a disk drive. 304 and a communication interface (I / F) 305.
  • the CPU 301 to the communication interface 305, the keyboard 306, and the display 307 are connected by a bus 308, respectively.
  • the CPU 301 is an arithmetic processing device that controls the entire non-object-oriented language program cooperation device 300.
  • the ROM 302 is a non-volatile memory that stores a program of the non-object-oriented language program cooperation device 300 and the like.
  • a RAM 303 is a volatile memory that is used as a work area when the CPU 301 executes a program operation process.
  • the storage unit 304 stores and holds processing execution results and the like.
  • the communication interface 305 controls an interface with the network 310 and controls data input / output.
  • the communication interface 305 is connected to a local area network (LAN), a wide area network (WAN), the Internet, or the like, which becomes the network 310 through a communication line, and is connected to other devices via the network 310.
  • This network includes a communication path between the processing engine 200 of the above-described non-object-oriented language program (ladder program 101 or FBD program 102) and the processing engine of the object-oriented language program.
  • the keyboard 306 is an input device used for processing operations of the non-object-oriented language program cooperation device 300.
  • the display 307 is a device that displays a processing execution result or a processing execution result read from the storage unit 304 by executing a program of the CPU 301.
  • As the display 307 for example, a Thin Film Transistor (TFT) liquid crystal display unit, a plasma display unit, an organic EL display unit, and the like can be adopted.
  • TFT Thin Film Transistor
  • the processing engine 200 of the non-object-oriented language program (ladder program 101 or FBD program 102) performs processing of the non-object-oriented language program (ladder program 101 or FBD program 102) by the CPU 301 shown in FIG. In addition to executing, a process of accessing a function defined in the object-oriented language program 103 described above is performed.
  • the CPU 301 may also be configured to execute the object-oriented language program 103.
  • each of the areas of the RAM 303 can be used for the memories 1 to 3 described above.
  • a non-object-oriented language program such as a ladder program or an FBD program can access an object generated based on the class definition of the object-oriented language.
  • program development linked with a general-purpose object-oriented language program such as C ++ or Java can be performed. become able to.
  • those who are not familiar with the operation of ladder programs and FBD programs can develop programs using the object-oriented concept.
  • the present invention is suitable for use in system development using a non-object-oriented language program, and is suitable for program development for a control system such as a PLC.
  • Ladder program (ladder diagram) 102 FBD program (FBD diagram) 103 Object-oriented language program 111 Contact (object) 112, 113 relay (function for object) 200 Processing Engine 300 Non-Object-Oriented Language Program Linkage Device 301 Control Unit (CPU) 302 ROM 303 RAM 304 Storage Unit 305 Communication Interface 306 Keyboard 307 Display 308 Bus 310 Network

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Programmable Controllers (AREA)

Abstract

処理エンジンは、オブジェクト指向言語プログラム(103)の記述でオブジェクトのクラス定義を設定し、非オブジェクト指向言語プログラムであるラダープログラム(101)の記述にオブジェクトのオブジェクト名と変数名を設定し、ラダープログラム(101)からオブジェクト指向言語プログラム(103)のオブジェクトの変数へのアクセスを行う。ラダープログラム(101)は、予め取り決めたアクセス方式に基づき、オブジェクト指向言語プログラム(103)に対してオブジェクトの変数へのアクセス要求を行う。

Description

[規則37.2に基づきISAが決定した発明の名称] 非オブジェクト指向言語プログラム連携装置、方法およびプログラム
 この発明は、シーケンス図を作成する非オブジェクト指向言語プログラム連携装置、非オブジェクト指向言語プログラム連携方法および非オブジェクト指向言語プログラムの連携プログラムに関する。
 従来、ラダー(LD:LADDER)プログラム、FBD(Function Block Diagram)プログラム等があり、それぞれ専用の非オブジェクト指向言語プログラムとして用いられている。これらは、プログラマブルコントローラ(PLC)等におけるプログラミングツールとして用いられており、例えば、ラダープログラムのデバッグを容易に行うために、ラダープログラムの編集を行うツールが開示されている(例えば、下記特許文献1参照。)。
特開2012-243136号公報
 しかしながら、ラダープログラムは、ラダーの仕様が制御装置メーカ間で統一されておらず、プログラミングを行うためには特殊な知識や経験が必要になることから、その扱いが特殊であり容易ではない。また、FBDにより記述されたFBDプログラムは、ラダープログラムに比べて図形を用いて構造化およびモジュール化したプログラムであるが、ラダープログラム同様に汎用的ではない。
 このようなラダープログラムやFBDプログラムは、それぞれ専用の非オブジェクト指向言語プログラムであり、現在汎用化されているC++やJava(登録商標)などのオブジェクト指向言語プログラムと連携したプログラム開発を行うことはできない。
 特に、ラダーやFBDプログラムは、それぞれ専用の非オブジェクト指向言語プログラムであるため、言語使用に基づいて定義された変数や関数へのアクセスは可能であるが、オブジェクト指向言語のクラス定義に基づいて生成されたオブジェクトへのアクセスはできない。
 本発明は、上記課題に鑑み、非オブジェクト指向言語のプログラムをオブジェクト指向言語のプログラムと連携できることを目的とする。
 上記目的を達成するため、この発明の非オブジェクト指向言語プログラム連携装置は、オブジェクト指向言語プログラムの記述でオブジェクトのクラス定義を設定し、非オブジェクト指向言語プログラムの記述に前記オブジェクトのオブジェクト名と変数名を設定し、前記非オブジェクト指向言語プログラムから前記オブジェクト指向言語プログラムの前記オブジェクトの変数へのアクセスを行う処理エンジンを備えたことを特徴とする。
 また、前記処理エンジンは、前記非オブジェクト指向言語プログラムには、予め取り決めたアクセス方式に基づき、前記オブジェクト指向言語プログラムに対して前記オブジェクトの変数へのアクセス要求を行うことを特徴とする。
 また、前記処理エンジンは、前記オブジェクトの変数へのアクセス要求に基づく処理を前記オブジェクト指向言語プログラムが実行し、実行結果を前記非オブジェクト指向言語プログラムに返答することを特徴とする。
 また、前記処理エンジンは、前記非オブジェクト指向言語プログラムの中間コードを生成し、前記非オブジェクト指向言語プログラムがアクセス可能な第1エリアと、前記非オブジェクト指向言語プログラムがアクセス可能なオブジェクトの変数および関数が格納された第2エリアと、前記第2エリアの変数へのアクセスや関数の呼び出しを行うサービス関数が格納された第3エリアと、をメモリ上に確保し、前記中間コードの解釈実行時のオブジェクトの変数が前記第1エリアにあれば、前記中間コードの変数の値を該当する前記第1エリアに書き込み、前記中間コードの解釈実行時にオブジェクトが前記第1エリアにない場合には、前記第3エリアのサービス関数をコールする、ことを特徴とする。
 また、この発明の非オブジェクト指向言語プログラム連携方法は、コンピュータが、オブジェクト指向言語プログラムの記述でオブジェクトのクラス定義を設定し、非オブジェクト指向言語プログラムの記述に前記オブジェクトのオブジェクト名と変数名を設定し、前記非オブジェクト指向言語プログラムから前記オブジェクト指向言語プログラムの前記オブジェクトの変数へのアクセスを行う処理、を実行することを特徴とする。
 また、この発明の非オブジェクト指向言語プログラムの連携プログラムは、コンピュータに、オブジェクト指向言語プログラムの記述でオブジェクトのクラス定義を設定し、非オブジェクト指向言語プログラムの記述に前記オブジェクトのオブジェクト名と変数名を設定し、前記非オブジェクト指向言語プログラムから前記オブジェクト指向言語プログラムの前記オブジェクトの変数へのアクセスを行う処理、を実行させることを特徴とする。
 上記構成によれば、非オブジェクト指向言語プログラムであっても、オブジェクト指向言語のクラス定義に基づいて生成されたオブジェクトへのアクセスを行うことができるようになる。
 本発明によれば、非オブジェクト指向言語のプログラムをオブジェクト指向言語のプログラムと連携できるという効果を奏する。
図1は、実施の形態にかかる非オブジェクト指向言語プログラム連携装置が実施するオブジェクト指向言語プログラムのオブジェクトへのアクセス状態を示す図である。 図2Aは、実施の形態にかかる非オブジェクト指向言語プログラムが実施する連携処理の内容を示すフローチャートである。 図2Bは、実施の形態にかかる非オブジェクト指向言語プログラムが実施する連携処理を説明する図である。 図3は、非オブジェクト指向言語プログラム連携装置のハードウェア構成例を示すブロック図である。
(実施の形態)
 以下に添付図面を参照して、この発明にかかる非オブジェクト指向言語プログラム連携装置、非オブジェクト指向言語プログラム連携方法および非オブジェクト指向言語プログラムの連携プログラムの好適な実施の形態を詳細に説明する。
(状態遷移付きシーケンス図の例)
 図1は、実施の形態にかかる非オブジェクト指向言語プログラム連携装置が実施するオブジェクト指向言語プログラムのオブジェクトへのアクセス状態を示す図である。
 図1の左側には、非オブジェクト指向言語プログラムとしてラダープログラム101やFBDプログラム102の記述例(ラダー図、FBD図)を示し、図1の右側には、オブジェクト指向言語プログラム103としてC++やJavaの記述例を示している。
 図1に示すように、ラダープログラム101では、回路の接続構成にしたがって回路別の接続関係を示すラダー図を用い、例えば、接点111の操作により、リレー112,113が作動する。
 実施の形態では、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)について、オブジェクト指向型の開発環境を提供する。このため、図1のラダープログラム101(ラダー図)について、オブジェクト指向言語プログラム103の記述例に沿って各部を表現すると、接点111はオブジェクト(MyObj.memberA)、リレー112,113は、それぞれオブジェクトに対する所定の関数(MOV 0 MyObj.memberB)、(CALL MyObj.FuncA(100))となる。
 このように、非オブジェクト指向言語プログラム(ラダープログラム101)は、
1.オブジェクトの変数を参照(指定)する場合は、「オブジェクト名.変数名」
2.オブジェクトの操作(Method)を指定する場合は、「オブジェクト名.操作名(引数)」
と指定する。すなわち、非オブジェクト指向言語プログラム側が上記1.で記述できるようにオブジェクト指向言語プログラム(例えばC++言語)側では、オブジェクトのクラス(Class)定義131を設定しておく。
 FBDプログラム102についてもラダープログラム101と同様の機能を表現する。このFBDプログラム102は、ファンクションブロック(関数)121に対する入力(実アドレス,変数)122の処理結果を出力(実アドレス,変数)123の形で表現する。
 オブジェクト指向言語プログラム103側の記述例は、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)の記述例(プログラム内容)に対応したものである。このオブジェクト指向言語プログラム103の記述例を順に説明すると、最初にクラス(MyClass)の定義(オブジェクトの設計図)131を行う。このクラス定義131では、メンバ(memberA,B)のデータ定義、および関数(FuncA,B)を定義する。
 次に、オブジェクトの生成の記述(MyObj)132を行う。次に、プログラム記述133を行う。このプログラム記述133の例では、オブジェクトの中のメンバ変数の参照、オブジェクトの中のメンバ変数への代入、オブジェクトの中のメンバ関数(Method)の呼び出しが含まれている。このプログラム記述(サービス関数)133は、自分のプログラム(オブジェクト指向言語プログラム103)内のオブジェクト(MyObj)132に直接アクセスする。
 図1に示すように、オブジェクト指向言語プログラム103内で定義されているオブジェクト(MyObj)を非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)側からアクセスする場合を例に説明すると、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)からオブジェクト指向言語プログラム103にオブジェクトへのアクセス要求141を出す。
 この際、これらオブジェクト指向言語プログラム103と、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)間で予め取り決めたアクセス方式(通信方式や関数CALL等)を用いる。
 そして、オブジェクト指向言語プログラム103は、アクセス要求141に基づく処理実行の結果142を非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)に返す。
 上記のように、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)側では、オブジェクト指向言語プログラム103で生成されたオブジェクトへのアクセスを可能とする記述を行う。
 図2Aは、実施の形態にかかる非オブジェクト指向言語プログラムが実施する連携処理の内容を示すフローチャートである。図2Bは、実施の形態にかかる非オブジェクト指向言語プログラムが実施する連携処理を説明する図である。
 ここでは、非オブジェクト指向言語プログラムとして、ラダープログラム101に基づく記述を処理エンジン(ソフトウェア)200が実行処理し、オブジェクト指向言語プログラム103で定義されている関数にアクセスする処理について説明する。
 図2Bに示すように、処理エンジン200は、ラダープログラム101の中間コード210を生成しメモリに格納しておく。接点111としてオブジェクト(MyObj.memberA)、リレー112としてオブジェクトに対する関数(MOV 0 D0)、リレー113としてオブジェクトに対する関数(MOV 0 MyObj.memberB)とする。
 また、処理エンジン200は、非オブジェクト指向言語プログラム(ラダープログラム101)がアクセス可能なエリア(エリア1)211と、オブジェクト指向言語プログラム103がアクセス可能なオブジェクト(変数や関数)が格納されたエリア(エリア2)212と、エリア2の変数へのアクセスや関数の呼び出しを行うサービス関数のエリア(エリア3)213と、を所定のメモリ上に領域確保しておく。
 これらのメモリエリア(エリア1~3)は、非オブジェクト指向言語プログラム(ラダープログラム101)の処理エンジン200が予め領域確保しておく。このほか、非オブジェクト指向言語プログラム(ラダープログラム101)の処理エンジン200と、オブジェクト指向言語プログラム103側の処理エンジンとが別であれば、いずれかの処理エンジンが予め領域確保すればよい。
 図2Aに示すように、処理エンジン200は、一つ目の中間コード(MOV 0 D0)112のプログラムを解釈する(ステップS201)。この際、中間コードには変数(エリア1)211や関数(エリア2,3)212,213が格納されているようにしておく。
 次に、処理エンジン200は、エリア1(211)に割り当てられているので、エリア1のD0のメモリに値「0」を書き込む(ステップS202)。
 次に、処理エンジン200は、次の中間コード(MOV 0 MyObj.memberB)113のプログラムを解釈する(ステップS203)。
 そして、処理エンジン200は、解釈した中間コード(MyObj.memberB)はエリア1(211)には格納されていないので、エリア3(213)のサービス関数をCALLして、中間コード(MyObj.memberB)に値「0」をセットする(ステップS204)。
 なお、処理エンジン200は、オブジェクト指向言語プログラム103上で、サービス関数133のCALL(アクセス要求)141に基づく処理を実行し、処理実行の結果142を非オブジェクト指向言語プログラム(ラダープログラム101)側に返す。
 以上のように、非オブジェクト指向言語プログラム(ラダープログラム101)の記述に基づく処理時に、非オブジェクト指向言語プログラム(ラダープログラム101)がアクセス可能なメモリ(エリア1)と、オブジェクト指向言語プログラム103がアクセス可能なメモリ(エリア2,3)と、に分ける。そして、中間コードの解釈時に、非オブジェクト指向言語プログラム(ラダープログラム101)がアクセス可能なメモリ(エリア1)に割り当てられていればその値をセットし、非オブジェクト指向言語プログラム(ラダープログラム101)がアクセス可能なメモリ(エリア1)に割り当てられていなければエリア3のサービス関数をCALLする。
 これにより、非オブジェクト指向言語プログラムとして、ラダープログラム101がオブジェクト指向言語プログラム103で定義されている関数にアクセスすることができるようになる。すなわち、非オブジェクト指向言語プログラム(ラダープログラム101)の言語仕様にないオブジェクトへのアクセスが可能となる。上記例では、ラダープログラム101について説明したが、FBDプログラム102についても同様にオブジェクト指向言語プログラム103で定義されている関数へのアクセスが可能となる。
 また、実施の形態によれば、派性、継承といったオブジェクト指向処理についても、オブジェクト指向言語プログラム103内で実施することができる。そして、非オブジェクト指向言語(FBD)プログラム102(処理エンジン200)から、オブジェクト指向言語プログラム103に対して任意の派性、継承した処理(クラス、関数)を呼ぶことができる。例えば、上記のMyClassを継承した新たなYourClassを、上記memberA,Bを継承したmemberCとして簡単に追加することができる。
(非オブジェクト指向言語プログラム連携装置のハードウェア構成)
 図3は、非オブジェクト指向言語プログラム連携装置のハードウェア構成例を示すブロック図である。図3において、非オブジェクト指向言語プログラム連携装置300は、制御部(CPU)301と、Read-Only Memory(ROM)302と、Random Access Memory(RAM)303と、半導体メモリやディスクドライブ等の記憶部304と、通信インターフェース(I/F)305と、を含む。これらCPU301~通信インターフェース305、キーボード306、ディスプレイ307は、バス308によってそれぞれ接続されている。
 CPU301は、非オブジェクト指向言語プログラム連携装置300の全体の制御を司る演算処理装置である。ROM302は、非オブジェクト指向言語プログラム連携装置300のプログラム等を記憶する不揮発性メモリである。RAM303は、CPU301によるプログラムの演算処理実行時のワークエリアとして使用される揮発性メモリである。記憶部304には、処理実行の結果等が格納保持される。
 通信インターフェース305は、ネットワーク310とのインターフェースを司り、データの入出力を制御する。具体的に、通信インターフェース305は、通信回線を通じてネットワーク310となるLocal Area Network(LAN)、Wide Area Network(WAN)、インターネットなどに接続され、ネットワーク310を介して他の装置に接続される。このネットワークには、上述した非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)の処理エンジン200と、オブジェクト指向言語プログラムの処理エンジンとの間の通信路を含む。
 キーボード306は、非オブジェクト指向言語プログラム連携装置300の処理操作等に用いる入力装置である。ディスプレイ307は、CPU301のプログラム実行により、記憶部304から読み出した処理中あるいは処理実行結果を表示する装置である。ディスプレイ307には、例えば、Thin Film Transistor(TFT)液晶表示部、プラズマ表示部、有機EL表示部などを採用することができる。
 非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)の処理エンジン200は、図3に示したCPU301がROM302のプログラム実行により、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)の処理を実行するとともに、上述したオブジェクト指向言語プログラム103で定義されている関数にアクセスする処理を行う。また、このCPU301は、オブジェクト指向言語プログラム103についても実行する構成としてもよい。また、上述したメモリ1~3は、RAM303の各領域を用いることができる。
 また、上記の説明では、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)からオブジェクト指向言語プログラム103で定義されている関数にアクセスする処理を行うことについて説明した。これに限らず、オブジェクト指向言語プログラム103側から、非オブジェクト指向言語プログラム(ラダープログラム101やFBDプログラム102)に対しデータのやり取り(変換)を行うこともできる。
 以上説明したように、ラダープログラムやFBDプログラムなどの非オブジェクト指向言語プログラムであっても、オブジェクト指向言語のクラス定義に基づいて生成されたオブジェクトへのアクセスが行えるようになる。これにより、ラダープログラムやFBDプログラムを用いた各独自な仕様のプログラム言語を用いた開発を行う際に、汎用化されているC++やJavaなどのオブジェクト指向言語プログラムと連携したプログラム開発を行うことができるようになる。例えば、ラダープログラムやFBDプログラムの操作に慣れていない者でもオブジェクト指向の概念を用いてプログラム開発が行えるようになる。
 上記実施の形態では、非オブジェクト指向言語プログラムとして、ラダー(LD)、ファンクションブロック(FBD)の例について説明したが、他のストラクチャードテキスト(ST)、インストラクションリスト(IL)、シーケンシャルファンクションチャート(SFC)等の非オブジェクト指向言語プログラムについても同様に適用することができる。
 以上のように、本発明は、制御システムを非オブジェクト指向言語プログラムを用いたシステム開発に用いて好適であり、PLCなどの制御システムのプログラム開発に適している。
 101 ラダープログラム(ラダー図)
 102 FBDプログラム(FBD図)
 103 オブジェクト指向言語プログラム
 111 接点(オブジェクト)
 112,113 リレー(オブジェクトに対する関数)
 200 処理エンジン
 300 非オブジェクト指向言語プログラム連携装置
 301 制御部(CPU)
 302 ROM
 303 RAM
 304 記憶部
 305 通信インターフェース
 306 キーボード
 307 ディスプレイ
 308 バス
 310 ネットワーク

Claims (6)

  1.  オブジェクト指向言語プログラムの記述でオブジェクトのクラス定義を設定し、
     非オブジェクト指向言語プログラムの記述に前記オブジェクトのオブジェクト名と変数名を設定し、
     前記非オブジェクト指向言語プログラムから前記オブジェクト指向言語プログラムの前記オブジェクトの変数へのアクセスを行う処理エンジン
     を備えたことを特徴とする非オブジェクト指向言語プログラム連携装置。
  2.  前記処理エンジンは、
     前記非オブジェクト指向言語プログラムには、予め取り決めたアクセス方式に基づき、前記オブジェクト指向言語プログラムに対して前記オブジェクトの変数へのアクセス要求を行うことを特徴とする請求項1に記載の非オブジェクト指向言語プログラム連携装置。
  3.  前記処理エンジンは、
     前記オブジェクトの変数へのアクセス要求に基づく処理を前記オブジェクト指向言語プログラムが実行し、実行結果を前記非オブジェクト指向言語プログラムに返答することを特徴とする請求項2に記載の非オブジェクト指向言語プログラム連携装置。
  4.  前記処理エンジンは、
     前記非オブジェクト指向言語プログラムの中間コードを生成し、
     前記非オブジェクト指向言語プログラムがアクセス可能な第1エリアと、前記非オブジェクト指向言語プログラムがアクセス可能なオブジェクトの変数および関数が格納された第2エリアと、
     前記第2エリアの変数へのアクセスや関数の呼び出しを行うサービス関数が格納された第3エリアと、をメモリ上に確保し、
     前記中間コードの解釈実行時のオブジェクトの変数が前記第1エリアにあれば、前記中間コードの変数の値を該当する前記第1エリアに書き込み、
     前記中間コードの解釈実行時にオブジェクトが前記第1エリアにない場合には、前記第3エリアのサービス関数をコールする、
     ことを特徴とする請求項2または3に記載の非オブジェクト指向言語プログラム連携装置。
  5.  コンピュータが、
     オブジェクト指向言語プログラムの記述でオブジェクトのクラス定義を設定し、
     非オブジェクト指向言語プログラムの記述に前記オブジェクトのオブジェクト名と変数名を設定し、
     前記非オブジェクト指向言語プログラムから前記オブジェクト指向言語プログラムの前記オブジェクトの変数へのアクセスを行う処理、
     を実行することを特徴とする非オブジェクト指向言語プログラム連携方法。
  6.  コンピュータに、
     オブジェクト指向言語プログラムの記述でオブジェクトのクラス定義を設定し、
     非オブジェクト指向言語プログラムの記述に前記オブジェクトのオブジェクト名と変数名を設定し、
     前記非オブジェクト指向言語プログラムから前記オブジェクト指向言語プログラムの前記オブジェクトの変数へのアクセスを行う処理、
     を実行させることを特徴とする非オブジェクト指向言語プログラムの連携プログラム。
PCT/JP2015/060789 2015-04-06 2015-04-06 非オブジェクト指向言語プログラム連携装置、方法およびプログラム WO2016162935A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2015/060789 WO2016162935A1 (ja) 2015-04-06 2015-04-06 非オブジェクト指向言語プログラム連携装置、方法およびプログラム
JP2017510820A JP6596073B2 (ja) 2015-04-06 2015-04-06 非オブジェクト指向言語プログラム連携装置、方法およびプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/060789 WO2016162935A1 (ja) 2015-04-06 2015-04-06 非オブジェクト指向言語プログラム連携装置、方法およびプログラム

Publications (1)

Publication Number Publication Date
WO2016162935A1 true WO2016162935A1 (ja) 2016-10-13

Family

ID=57072522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/060789 WO2016162935A1 (ja) 2015-04-06 2015-04-06 非オブジェクト指向言語プログラム連携装置、方法およびプログラム

Country Status (2)

Country Link
JP (1) JP6596073B2 (ja)
WO (1) WO2016162935A1 (ja)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000029705A (ja) * 1998-07-09 2000-01-28 Hitachi Software Eng Co Ltd 電子計算機システム

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000029705A (ja) * 1998-07-09 2000-01-28 Hitachi Software Eng Co Ltd 電子計算機システム

Also Published As

Publication number Publication date
JPWO2016162935A1 (ja) 2018-02-01
JP6596073B2 (ja) 2019-10-23

Similar Documents

Publication Publication Date Title
US9235381B2 (en) Method and device for the programming and configuration of a programmable logic controller
US9128479B2 (en) Automation control and monitoring system and method
RU2658190C2 (ru) Управление доступом во время выполнения к интерфейсам прикладного программирования
EP3945415B1 (en) Method and apparatus for compilation optimization of hosted app, electronic device and readable storage medium
JP2018129020A (ja) インダストリアル・インターネットオペレーティングシステムに基づくインダストリアル・プロセス制御管理方法と装置
CN111026439B (zh) 应用程序的兼容方法、装置、设备及计算机存储介质
US20170277170A1 (en) Hmi system
WO2018047620A1 (ja) 実行可能プログラム作成装置、実行可能プログラム作成方法、および、実行可能プログラム作成プログラム
US11132184B2 (en) Engineering apparatus, control method, and program for executing a control application
WO2014046642A1 (en) Multiple programmable logic controller simulator
CN112988298A (zh) 可视化界面配置方法、装置、计算机设备及存储介质
WO2018096717A1 (ja) コントロールシステム及びコントロール方法
JP6596073B2 (ja) 非オブジェクト指向言語プログラム連携装置、方法およびプログラム
CN114706590B (zh) Plc应用包生成方法、plc应用执行方法及相关装置和系统
JP2001051704A (ja) プログラマブル・コントローラ
EP3734379A1 (en) Method and system for generating control programs in a cloud computing environment
EP3865959A1 (en) Control device
EP3971660A1 (en) Method and system for providing engineering of an industrial device in a cloud computing environment
US20110224809A1 (en) Method for Operating an Automation System
EP3779622B1 (en) Control device
CN107844334B (zh) 一种自动配置机器人rcs的方法及系统
JP2008040996A (ja) プログラマブルコントローラ
WO2022190418A1 (ja) 開発支援装置、開発支援方法および開発支援プログラム
CN112286533B (zh) 云端服务的热修复方法及装置
JP7151161B2 (ja) 制御システム、サポート装置、サポートプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15888429

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017510820

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15888429

Country of ref document: EP

Kind code of ref document: A1